Public Member Functions | Protected Member Functions

VariableManager Class Reference

keeps all functions and variables More...

#include <mgr.h>

Inheritance diagram for VariableManager:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 VariableManager (const Ftk *F)
void register_model (Model *m)
void unregister_model (const Model *m)
int make_variable (const std::string &name, VMData *vd)
int add_variable (Variable *new_var)
 puts Variable into `variables_' vector, checking dependencies
void sort_variables ()
std::string assign_variable_copy (const Variable *orig, const std::map< int, std::string > &varmap)
void delete_variables (const std::vector< std::string > &name)
int find_variable_nr (const std::string &name) const
 returns -1 if not found or idx in variables if found
const Variablefind_variable (const std::string &name) const
int find_nr_var_handling_param (int p) const
const Variablefind_variable_handling_param (int p) const
void remove_unreferred ()
 remove unreffered variables and parameters
void auto_remove_functions ()
 remove unreffered functions
bool is_function_referred (int n) const
const std::vector< realt > & parameters () const
const std::vector< Variable * > & variables () const
const Variableget_variable (int n) const
Variableget_variable (int n)
int assign_func (const std::string &name, Tplate::Ptr tp, std::vector< VMData * > &args)
 returns index of the new function in functions_
int assign_func_copy (const std::string &name, const std::string &orig)
 returns index of the new function in functions_
void substitute_func_param (const std::string &name, const std::string &param, VMData *vd)
void delete_funcs (const std::vector< std::string > &names)
int find_function_nr (const std::string &name) const
 returns -1 if not found or idx in variables if found
const Functionfind_function (const std::string &name) const
const std::vector< Function * > & functions () const
const Functionget_function (int n) const
void use_parameters ()
void use_external_parameters (const std::vector< realt > &ext_param)
void put_new_parameters (const std::vector< realt > &aa)
realt variation_of_a (int n, realt variat) const
std::vector< std::string > get_variable_references (const std::string &name) const
void update_indices_in_models ()
std::string next_var_name ()
std::string next_func_name ()
 generate name for "anonymous" variable

Protected Member Functions

void do_reset ()
 generate name for "anonymous" function

Detailed Description

keeps all functions and variables

Definition at line 19 of file mgr.h.


Member Function Documentation

void VariableManager::remove_unreferred (  ) 

remove unreffered variables and parameters

search for "simple" variable which handles parameter par returns -1 if not found or idx in variables if found

Definition at line 211 of file mgr.cpp.

Referenced by add_variable(), and auto_remove_functions().

void VariableManager::use_parameters (  ) 

calculate value and derivatives of all variables; do precomputations for all functions

Definition at line 445 of file mgr.cpp.

Referenced by Model::approx_max().


The documentation for this class was generated from the following files:

Generated on Mon Jul 18 2011 17:25:28 for Fityk by Doxygen 1.7.1