Man pages sections > man2 > branch

branch - a parameter-dependent sequence of field

branch(2rheolef) rheolef-6.7 branch(2rheolef)

NAME

branch - a parameter-dependent sequence of field

DESCRIPTION

Stores a field sequence together with its associated parameter value: a branch variable represents a pair (t,uh(t)) for a specific value of the parameter t. Applications concern time-dependent problems and continuation methods.
This class is convenient for file inputs/outputs and building graphical animations.

EXAMPLES

Coming soon...

LIMITATIONS

This class is under development.
The branch class store pointers on field class without reference counting. Thus, branch automatic variables cannot be returned by functions. branch variable are limited to local variables.

IMPLEMENTATION

template <class T, class M = rheo_default_memory_model>
class branch_basic : public std::vector<std::pair<std::string,field_basic<T,M> > > {
public :
// typedefs:
typedef std::vector<std::pair<std::string,field_basic<T,M> > > base; typedef typename base::size_type size_type;
// allocators:
branch_basic (); ~branch_basic();
#ifdef _RHEOLEF_HAVE_VARIADIC_TEMPLATE template <typename... Args> branch_basic(const std::string& parameter, Args... names); #else // ! _RHEOLEF_HAVE_VARIADIC_TEMPLATE branch_basic (const std::string& parameter_name, const std::string& u0); branch_basic (const std::string& parameter_name, const std::string& u0, const std::string& u1); branch_basic (const std::string& parameter_name, const std::string& u0, const std::string& u1, const std::string& u2); #endif // ! _RHEOLEF_HAVE_VARIADIC_TEMPLATE
// accessors:
const T& parameter () const; const std::string& parameter_name () const; size_type n_value () const; size_type n_field () const;
// modifiers:
void set_parameter_name (const std::string& name); void set_parameter (const T& value); void set_range (const std::pair<T,T>& u_range);
// input/output:
// get/set current value #ifdef _RHEOLEF_HAVE_VARIADIC_TEMPLATE template <typename... Args> __obranch<T,M> operator() (const T& t, const field_basic<T,M>& u0, Args... uk); template <typename... Args> __iobranch<T,M> operator() (T& t, field_basic<T,M>& u0, Args&... uk); #else // ! _RHEOLEF_HAVE_VARIADIC_TEMPLATE __obranch<T,M> operator() (const T& t, const field_basic<T,M>& u0); __obranch<T,M> operator() (const T& t, const field_basic<T,M>& u0, const field_basic<T,M>& u1); __obranch<T,M> operator() (const T& t, const field_basic<T,M>& u0, const field_basic<T,M>& u1, const field_basic<T,M>& u2); __iobranch<T,M> operator() (T& t, field_basic<T,M>& u0); __iobranch<T,M> operator() (T& t, field_basic<T,M>& u0, field_basic<T,M>& u1); __iobranch<T,M> operator() (T& t, field_basic<T,M>& u0, field_basic<T,M>& u1, field_basic<T,M>& u2); #endif // ! _RHEOLEF_HAVE_VARIADIC_TEMPLATE
__branch_header<T,M> header (); __const_branch_header<T,M> header () const; __const_branch_finalize<T,M> finalize () const;
 
rheolef-6.7 rheolef-6.7