branch(2rheolef)

πŸ“¦
version 7.2 Β· 4 versions
, in debian trixie, ubuntu noble, ubuntu questing

✨ NAME ✨

okay bestie, this is branch from the rheolef manual, section 2 (that's the library-functions section, iykyk) β€” a parameter-dependent sequence of field, fr fr πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

So the branch class is out here storing a whole field sequence together with its associated parameter value. Like, they're a package deal, they don't do long distance πŸ’…

A branch variable is literally representing the pair (t,uh(t)) for one specific value of the parameter t. It's giving main character energy for:

  • time-dependent problems ⏰
  • continuation methods 🌈

and it's also super convenient for file inputs/outputs and for building animations ✨

And it's not even monogamous β€” it extends to multi-field sequences like (t,uh(t),ph(t)), up to an arbitrarily number of fields. The polyamory of data structures, honestly 🫢

also go peep the branch(1) unix command if you wanna run animations, no cap 🎬

πŸ’… IMPLEMENTATION πŸ’…

This documentation has been generated from file main/lib/branch.h πŸ“„

The branch class is simply an alias to the branch_basic class β€” iconic behaviour, honestly:

typedef branch_basic<Float> branch;

The branch_basic class provides an interface to a n-uplet of fields together with a parameter value:

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();
  branch_basic (const branch_basic<T,M>&);
  branch_basic<T,M>& operator= (const branch_basic<T,M>&);

  template <typename... Args>
  branch_basic(const std::string& parameter, Args... names);

// 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);

};
template <class T, class M> idiststream& operator>> (idiststream&, branch_basic<T,M>&);
template <class T, class M> odiststream& operator<< (odiststream&, const branch_basic<T,M>&);

like, the whole class is just vibing on top of a std::vector<std::pair<std::string,field_basic<T,M> > > and honestly? slay πŸ’…


πŸ‘‘ AUTHOR πŸ‘‘

Pierre Saramito <Pierre.Saramito@imag.fr> β€” the legend, the moment, the icon 🫢


Copyright (C) 2000-2018 Pierre Saramito <Pierre.Saramito@imag.fr>

GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

bestie it is literally free software, go wild, redistribute it, but there is NO WARRANTY so don't come for anyone if it acts up 😭

and that's the whole page, periodt πŸ’– this was rheolef, Version 7.2, branch(2rheolef) β€” mwah, take care of her πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from