3.2.13.5. flow/Solution.hpp¶
3.2.13.5.1. Class flow::SolutionRange
¶
-
class flow::SolutionRange¶
A range of solutions for a flow model.
3.2.13.5.1.1. Synopsis¶
-
type const_iterator
-
type iterator
-
std::shared_ptr<Flow> getFlow()
-
friend std::ostream &operator<<(std::ostream &s, const SolutionRange &r)
-
int size() const
-
const_iterator begin() const
-
const_iterator end() const
-
Solution operator[](int i) const
-
void list() const
-
void print() const
-
void print(const Printer &printer, const dg::PrintData &data) const
3.2.13.5.1.2. Details¶
-
friend std::ostream &operator<<(std::ostream &s, const SolutionRange &r)¶
-
int size() const¶
- Returns
the number of solutions in the range.
-
const_iterator begin() const¶
-
const_iterator end() const¶
- Returns
the begin and end iterators for the range.
-
Solution operator[](int i) const¶
- Returns
the i th solution in the range.
- Throws
LogicError
if the index is out of bounds.
-
void list() const¶
List overall information about each solution.
-
void print() const¶
-
void print(const Printer &printer, const dg::PrintData &data) const¶
Print solutions using the settings in the given printer and the structure information in the data object.
The data defaults to dg::PrintData(getFlow()->getDG()) and printer defaults to Printer().
- Throws
LogicError
if the given print data does not belong to the underlying derivation graph.
3.2.13.5.2. Class flow::Solution
¶
-
class flow::Solution¶
A solution for a flow model.
3.2.13.5.2.1. Synopsis¶
-
std::shared_ptr<Flow> getFlow()
-
int getId() const
-
friend std::ostream &operator<<(std::ostream &s, const Solution &sol)
-
friend bool operator==(const Solution &a, const Solution &b)
-
friend bool operator!=(const Solution &a, const Solution &b)
-
friend bool operator<(const Solution &a, const Solution &b)
-
std::variant<int, double> eval(const LinExp &exp) const
-
void list() const
-
std::pair<std::optional<std::string>, std::optional<std::string>> print() const
-
std::pair<std::optional<std::string>, std::optional<std::string>> print(const Printer &printer, const dg::PrintData &data) const
3.2.13.5.2.2. Details¶
-
int getId() const¶
- Returns
an ID for the solution which is unique among all solutions from the parent
Flow
object.
-
friend bool operator==(const Solution &a, const Solution &b)¶
-
friend bool operator!=(const Solution &a, const Solution &b)¶
-
friend bool operator<(const Solution &a, const Solution &b)¶
Compares the solution objects, i.e., the values of getFlow() and getId().
-
std::variant<int, double> eval(const LinExp &exp) const¶
- Returns
the value of the given linear expression evaluated on the solution.
-
void list() const¶
List overall information about the solution.
-
std::pair<std::optional<std::string>, std::optional<std::string>> print() const¶
-
std::pair<std::optional<std::string>, std::optional<std::string>> print(const Printer &printer, const dg::PrintData &data) const¶
Print the solution using the settings in the given printer and the structure information in the data object.
The data defaults to dg::PrintData(getFlow()->getDG()) and printer defaults to Printer().
- Returns
the name of the PDF-files that will be compiled in post-processing for respectively the filtered and unfiltered depictions. If either is not requested by the given printer the corresponding entry has no string.
- Throws
LogicError
if the given print data does not belong to the underlying derivation graph.
3.2.13.5.3. Class flow::SolutionOld
¶
-
class flow::SolutionOld¶
An object of this class represents a solution for a specific flow model.
3.2.13.5.3.1. Synopsis¶
3.2.13.5.3.2. Details¶
-
unsigned int getId() const¶
- Returns
an id for the solution which is unique among all solutions from the parent
Flow
object.
-
double eval(const LinExp &exp) const¶
- Returns
the value of the given linear expression evaluated on the solution.
-
void print(const dg::PrintData &data, const Printer &printer) const¶
Print the solution using the settings in the given printer.
- Returns
the name of the PDF-file that will be compiled in post-processing for the filtered graph.
- Throws
LogicError
if the given print data does not belong to the underlying derivation graph.
-
void haxListDerivations() const¶
List the solution in more human readable form. Don’t expect this function to stay in this form.
3.2.13.5.4. Class flow::SolutionSet
¶
-
class flow::SolutionSet¶
An object of this class represents the solutions for a specific flow model.
3.2.13.5.4.1. Synopsis¶
3.2.13.5.4.2. Details¶
Construct a representation of the solutions for the given flow model.
-
void list() const¶
List overall information about each solution.
-
unsigned int size() const¶
- Returns
the number of solutions in the flow model.
-
void print(const dg::PrintData &data, const Printer &printer) const¶
Print all solutions using the given flow printer.
-
const_iterator begin() const¶
- Returns
an iterator to the first solution.
-
const_iterator end() const¶
- Returns
an iterator to after the last solution.
-
Solution operator[](unsigned int i) const¶
- Returns
the solution at the given index.
- Throws
LogicError
if the index is out of bounds.