![]() |
aGrUM 3.2.0
a C++ library for (probabilistic) graphical models
|
Class representing a row of the linear program, i.e. More...
#include <agrum/CN/LpInterface.h>
Public Member Functions | |
| std::string | toString () const |
| Get the string representation of a calling row. | |
Constructors / Destructors | |
| LpRow (const LpExpr &expr, const std::vector< LpCol > &cols) | |
| Constructor from an expression and the address of the vector of variables of the problem. | |
| LpRow (LpExpr &&expr, const std::vector< LpCol > &cols) | |
| Move constructor from a temporary expression and the address of the vector of variables of the problem. | |
| LpRow (const LpRow &row) | |
| Copy constructor. | |
| LpRow (LpRow &&row) | |
| Move copy constructor from temporary. | |
| ~LpRow () | |
| Default destructor. | |
Assignment operators | |
| LpRow & | operator= (const LpRow &row) |
| LpRow & | operator= (LpRow &&row) |
Private Attributes | |
| double | _cste_ |
| The constant of the linear inequality. | |
| HashTable< LpCol, double > * | _coeffs_ |
| The coefficients of the variables of the linear inequality. | |
Friends | |
| template<GUM_Numeric GUM_SCALAR> | |
| class | LpInterface |
| std::ostream & | operator<< (std::ostream &out, const LpRow &row) |
Overload of << to use with output streams ( such as std::cout << ). | |
Class representing a row of the linear program, i.e.
an inequality.
Definition at line 521 of file LpInterface.h.
Constructor from an expression and the address of the vector of variables of the problem.
class LpRow
| expr | the constant reference to the expression to convert into rows ( inequalities ). |
| cols | the constant reference to the vector of variables of the problem. |
Definition at line 519 of file LpInterface.cpp.
References _coeffs_, _cste_, gum::credal::lp::LpExpr::_ileft_, gum::credal::lp::LpExpr::_iright_, gum::credal::lp::LpExpr::_lValue_, and gum::credal::lp::LpExpr::_mValue_.
Referenced by LpRow(), LpRow(), LpRow(), ~LpRow(), gum::credal::lp::LpInterface< GUM_SCALAR >::addRow(), gum::credal::lp::LpInterface< GUM_SCALAR >::addRow(), LpInterface, operator<<, gum::credal::lp::LpInterface< GUM_SCALAR >::operator=(), operator=(), and operator=().
Move constructor from a temporary expression and the address of the vector of variables of the problem.
| expr | the temporary expression to move into rows ( inequalities ). |
| cols | the constant reference to the vector of variables of the problem. |
Definition at line 561 of file LpInterface.cpp.
References LpRow(), _coeffs_, and _cste_.
| gum::credal::lp::LpRow::LpRow | ( | const LpRow & | row | ) |
| gum::credal::lp::LpRow::LpRow | ( | LpRow && | row | ) |
| gum::credal::lp::LpRow::~LpRow | ( | ) |
| row | The constant reference to the row to be copied. |
Definition at line 618 of file LpInterface.cpp.
References LpRow(), _coeffs_, and _cste_.
Referenced by LpInterface.
| row | The temporary row to be moved to this. |
Definition at line 624 of file LpInterface.cpp.
References LpRow(), _coeffs_, _cste_, and gum::credal::lp::swap().
| std::string gum::credal::lp::LpRow::toString | ( | ) | const |
Get the string representation of a calling row.
Definition at line 635 of file LpInterface.cpp.
References _coeffs_, and _cste_.
Referenced by LpInterface, and operator<<.
|
friend |
Definition at line 523 of file LpInterface.h.
References LpRow(), LpInterface, operator<<, operator=(), and toString().
Referenced by LpInterface.
|
friend |
Overload of << to use with output streams ( such as std::cout << ).
| out | the reference to the caller, i.e. left side of <<. |
| row | the constant reference to the row whose representation we want. |
Definition at line 630 of file LpInterface.cpp.
References LpRow(), operator<<, and toString().
Referenced by LpInterface, and operator<<.
The coefficients of the variables of the linear inequality.
Definition at line 613 of file LpInterface.h.
Referenced by LpRow(), LpRow(), LpRow(), LpRow(), ~LpRow(), operator=(), operator=(), and toString().
|
private |
The constant of the linear inequality.
Definition at line 609 of file LpInterface.h.
Referenced by LpRow(), LpRow(), LpRow(), LpRow(), operator=(), operator=(), and toString().