![]() |
aGrUM 3.2.0
a C++ library for (probabilistic) graphical models
|
namespace for constraint-based description of credal sets More...
Classes | |
| class | LpInterface |
| Class representing a linear program. More... | |
| class | LpCol |
| Class representing a variable ( a column ) of a linear program, i.e. More... | |
| class | LpExpr |
| Class representing a linear expression. More... | |
| class | LpRow |
| Class representing a row of the linear program, i.e. More... | |
Functions | |
| std::ostream & | operator<< (std::ostream &out, const LpRow &row) |
| void | swap (HashTable< LpCol, double > *&a, HashTable< LpCol, double > *&b) |
| Swap the addresses of two pointers to hashTables. | |
| template<typename T> | |
| std::ostream & | operator<< (std::ostream &out, const LpInterface< T > &lpi) |
| template<typename T2> | |
| LpExpr | operator+ (const LpExpr &lhs, const T2 &rhs) |
| template<typename T2> | |
| LpExpr | operator- (const LpExpr &lhs, const T2 &rhs) |
Non-members operators + | |
| template<typename T2> | |
| LpExpr | operator+ (LpExpr &&lhs, const T2 &rhs) |
Overload of operator + between anything ( a scalar, a variable or an expression ) and anything except a temporary expression. | |
| template<typename T2> | |
| LpExpr | operator+ (LpExpr &lhs, const T2 &rhs) |
Overload of operator + between anything ( a scalar, a variable or an expression ) and anything except a temporary expression. | |
| template<typename T1, forbidden_type< T1, LpExpr > = 0> | |
| LpExpr | operator+ (const T1 &lhs, LpExpr &&rhs) |
Overload of operator + between anything ( a scalar, a variable or an expression ) and a temporary expression. | |
| template<typename T1, forbidden_type< T1, LpExpr > = 0> | |
| LpExpr | operator+ (const T1 &lhs, LpExpr &rhs) |
Overload of operator + between anything ( a scalar, a variable or an expression ) and anything except a temporary expression. | |
| template<typename T2, forbidden_type< T2, LpExpr > = 0> | |
| LpExpr | operator+ (const LpCol &lhs, const T2 &rhs) |
| operator+ between LpCol lhs and not LpExpr rhs | |
| template<typename T1, forbidden_type< T1, LpExpr > = 0, forbidden_type< T1, LpCol > = 0> | |
| LpExpr | operator+ (const T1 &lhs, const LpCol &rhs) |
| operator+ between neither LpExpr nor LpCol lhs and LpCol rhs | |
Non-members operators - | |
| template<typename T2> | |
| LpExpr | operator- (LpExpr &&lhs, const T2 &rhs) |
Overload of operator - between anything ( a scalar, a variable or an expression ) and anything except a temporary expression. | |
| template<typename T2> | |
| LpExpr | operator- (LpExpr &lhs, const T2 &rhs) |
Overload of operator - between anything ( a scalar, a variable or an expression ) and anything except a temporary expression. | |
| template<typename T1, forbidden_type< T1, LpExpr > = 0> | |
| LpExpr | operator- (const T1 &lhs, LpExpr &&rhs) |
Overload of operator - between anything ( a scalar, a variable or an expression ) and a temporary expression. | |
| template<typename T1, forbidden_type< T1, LpExpr > = 0> | |
| LpExpr | operator- (const T1 &lhs, LpExpr &rhs) |
Overload of operator - between anything ( a scalar, a variable or an expression ) and anything except a temporary expression. | |
| template<typename T2, forbidden_type< T2, LpExpr > = 0> | |
| LpExpr | operator- (const LpCol &lhs, const T2 &rhs) |
| operator- between LpCol lhs and not LpExpr rhs | |
| template<typename T1, forbidden_type< T1, LpExpr > = 0, forbidden_type< T1, LpCol > = 0> | |
| LpExpr | operator- (const T1 &lhs, const LpCol &rhs) |
| operator- between neither LpExpr nor LpCol lhs and LpCol rhs | |
Non-members operators * | |
| template<typename SCALAR> | |
| LpExpr | operator* (const SCALAR &lhs, const LpCol &rhs) |
Overload of operator * between a scalar and a variable. | |
| template<typename SCALAR> | |
| LpExpr | operator* (const LpCol &lhs, const SCALAR &rhs) |
Overload of operator * between a variable and a scalar. | |
Non-members operators <= | |
| template<typename T2> | |
| LpExpr | operator<= (const LpExpr &lhs, T2 &&rhs) |
Overload of operator <= between anything and anything. | |
| template<typename T2> | |
| LpExpr | operator<= (const LpCol &lhs, T2 &&rhs) |
Overload of operator <= between anything and anything. | |
| template<typename T1, forbidden_type< T1, LpExpr & > = 0, forbidden_type< T1, LpCol & > = 0> | |
| LpExpr | operator<= (T1 &&lhs, const LpExpr &rhs) |
Overload of operator <= between anything and anything. | |
| template<typename T1, forbidden_type< T1, LpExpr & > = 0, forbidden_type< T1, LpCol & > = 0> | |
| LpExpr | operator<= (T1 &&lhs, const LpCol &rhs) |
Overload of operator <= between anything and anything. | |
| template<typename T2> | |
| LpExpr | operator<= (LpExpr &&lhs, T2 &&rhs) |
Overload of operator <= between anything and anything. | |
| template<typename T2> | |
| LpExpr | operator<= (LpCol &&lhs, T2 &&rhs) |
Overload of operator <= between anything and anything. | |
| template<typename T1, forbidden_type< T1, LpExpr > = 0, forbidden_type< T1, LpCol > = 0> | |
| LpExpr | operator<= (T1 &&lhs, LpExpr &&rhs) |
Overload of operator <= between anything and anything. | |
| template<typename T1, forbidden_type< T1, LpExpr > = 0, forbidden_type< T1, LpCol > = 0> | |
| LpExpr | operator<= (T1 &&lhs, LpCol &&rhs) |
Overload of operator <= between anything and anything. | |
namespace for constraint-based description of credal sets
| LpExpr gum::credal::lp::operator* | ( | const LpCol & | lhs, |
| const SCALAR & | rhs ) |
Overload of operator * between a variable and a scalar.
| lhs | the constant reference to the variable on the left hand side of the operator. |
| rhs | the constant reference to the scalar on the right hand side of the operator. |
| SCALAR | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
lhs * rhs. Definition at line 508 of file LpInterface_tpl.h.
References gum::credal::lp::LpExpr::multiply(), and operator*().
| LpExpr gum::credal::lp::operator* | ( | const SCALAR & | lhs, |
| const LpCol & | rhs ) |
Overload of operator * between a scalar and a variable.
| lhs | the constant reference to the scalar on the left hand side of the operator. |
| rhs | the constant reference to the variable on the right hand side of the operator. |
| SCALAR | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
lhs * rhs. Definition at line 503 of file LpInterface_tpl.h.
References gum::credal::lp::LpExpr::multiply(), and operator*().
Referenced by operator*(), operator*(), and operator-().
| LpExpr gum::credal::lp::operator+ | ( | const LpCol & | lhs, |
| const T2 & | rhs ) |
operator+ between LpCol lhs and not LpExpr rhs
Definition at line 422 of file LpInterface_tpl.h.
References operator+().
Definition at line 397 of file LpInterface_tpl.h.
References operator+().
operator+ between neither LpExpr nor LpCol lhs and LpCol rhs
Definition at line 431 of file LpInterface_tpl.h.
References operator+().
| LpExpr gum::credal::lp::operator+ | ( | const T1 & | lhs, |
| LpExpr && | rhs ) |
Overload of operator + between anything ( a scalar, a variable or an expression ) and a temporary expression.
This overload is used because only one side of the operator profit from move operation; the one with a temporary expression. If the expression if on the right hand side, we always add it first to profit from move operation. Otherwise another overload is used.
Implements both the copy operator + and move operator + because operator + is implemented on top of operators +=. Because of template type deduction lhs is a "universal reference", i.e. either an lvalue or an rvalue reference. To force rvalue reference with template deduction one should use const : const T&& lhs : lhs is an rvalue reference and WILL be modified ( not intuitive const ). Therefor std::forward must be used to forward the type of lhs. rhs is an rvalue reference and std::move must be used to forward it's type.
| lhs | the universal reference to either a scalar, a variable or an expression on the left hand side of the operator. |
| rhs | the rvalue reference to the temporary expression on the right hand side of the operator. |
lhs + rhs. Definition at line 405 of file LpInterface_tpl.h.
References operator+().
| LpExpr gum::credal::lp::operator+ | ( | const T1 & | lhs, |
| LpExpr & | rhs ) |
Overload of operator + between anything ( a scalar, a variable or an expression ) and anything except a temporary expression.
Implements both the copy operator + and move operator + because operator + is implemented on top of operators +=. Because of template type deduction both lhs and rhs are "universal
references", i.e. either an lvalue or an rvalue reference. Therefor std::forward must be used to forward the type of lhs and rhs.
| lhs | the rvalue reference to the temporary expression on the right hand side of the operator. |
| rhs | the universal reference to either a scalar, a variable or a lvalue expression on the right hand side of the operator. |
lhs + rhs. Definition at line 414 of file LpInterface_tpl.h.
References operator+().
Overload of operator + between anything ( a scalar, a variable or an expression ) and anything except a temporary expression.
Implements both the copy operator + and move operator + because operator + is implemented on top of operators +=. Because of template type deduction both lhs and rhs are "universal
references", i.e. either an lvalue or an rvalue reference. Therefor std::forward must be used to forward the type of lhs and rhs.
| lhs | the rvalue reference to the temporary expression on the right hand side of the operator. |
| rhs | the universal reference to either a scalar, a variable or a lvalue expression on the right hand side of the operator. |
lhs + rhs. Definition at line 389 of file LpInterface_tpl.h.
References operator+().
Referenced by operator+(), operator+(), operator+(), operator+(), operator+(), operator+(), operator+(), and swap().
Overload of operator + between anything ( a scalar, a variable or an expression ) and anything except a temporary expression.
Implements both the copy operator + and move operator + because operator + is implemented on top of operators +=. Because of template type deduction both lhs and rhs are "universal
references", i.e. either an lvalue or an rvalue reference. Therefor std::forward must be used to forward the type of lhs and rhs.
| lhs | the rvalue reference to the temporary expression on the right hand side of the operator. |
| rhs | the universal reference to either a scalar, a variable or a lvalue expression on the right hand side of the operator. |
lhs + rhs. References operator+(), and operator-().
| LpExpr gum::credal::lp::operator- | ( | const LpCol & | lhs, |
| const T2 & | rhs ) |
operator- between LpCol lhs and not LpExpr rhs
| lhs | the universal reference to either a scalar, a variable or an expression on the left hand side of the operator. |
| rhs | the rvalue reference to the temporary expression on the right hand side of the operator. |
Definition at line 476 of file LpInterface_tpl.h.
References operator-().
Definition at line 449 of file LpInterface_tpl.h.
References operator-().
operator- between neither LpExpr nor LpCol lhs and LpCol rhs
| lhs | the universal reference to either a scalar, a variable or an expression on the left hand side of the operator. |
| rhs | the rvalue reference to the temporary expression on the right hand side of the operator. |
Definition at line 485 of file LpInterface_tpl.h.
References operator-().
| LpExpr gum::credal::lp::operator- | ( | const T1 & | lhs, |
| LpExpr && | rhs ) |
Overload of operator - between anything ( a scalar, a variable or an expression ) and a temporary expression.
This overload is used because only one side of the operator profit from move operation; the one with a temporary expression. If the expression if on the right hand side, we always add it first to profit from move operation. Otherwise another overload is used.
Implements both the copy operator - and move operator - because operator - is implemented on top of operators -=. Because of template type deduction lhs is a "universal reference", i.e. either an lvalue or an rvalue reference. To force rvalue reference with template deduction one should use const : const T&& lhs : lhs is an rvalue reference and WILL be modified ( not intuitive const ). Therefor std::forward must be used to forward the type of lhs. rhs is an rvalue reference and std::move must be used to forward it's type.
| lhs | the universal reference to either a scalar, a variable or an expression on the left hand side of the operator. |
| rhs | the rvalue reference to the temporary expression on the right hand side of the operator. |
lhs - rhs. Definition at line 457 of file LpInterface_tpl.h.
References operator-().
| LpExpr gum::credal::lp::operator- | ( | const T1 & | lhs, |
| LpExpr & | rhs ) |
Overload of operator - between anything ( a scalar, a variable or an expression ) and anything except a temporary expression.
Implements both the copy operator - and move operator - because operator - is implemented on top of operators -=. Because of template type deduction both lhs and rhs are "universal
references", i.e. either an lvalue or an rvalue reference. Therefor std::forward must be used to forward the type of lhs and rhs.
| lhs | the rvalue reference to the temporary expression on the right hand side of the operator. |
| rhs | the universal reference to either a scalar, a variable or a lvalue expression on the right hand side of the operator. |
lhs -rhs. Definition at line 467 of file LpInterface_tpl.h.
References operator-().
Overload of operator - between anything ( a scalar, a variable or an expression ) and anything except a temporary expression.
Implements both the copy operator - and move operator - because operator - is implemented on top of operators -=. Because of template type deduction both lhs and rhs are "universal
references", i.e. either an lvalue or an rvalue reference. Therefor std::forward must be used to forward the type of lhs and rhs.
| lhs | the rvalue reference to the temporary expression on the right hand side of the operator. |
| rhs | the universal reference to either a scalar, a variable or a lvalue expression on the right hand side of the operator. |
lhs -rhs. Definition at line 441 of file LpInterface_tpl.h.
References operator-().
Referenced by operator+(), operator-(), operator-(), operator-(), operator-(), operator-(), operator-(), and operator-().
Overload of operator - between anything ( a scalar, a variable or an expression ) and anything except a temporary expression.
Implements both the copy operator - and move operator - because operator - is implemented on top of operators -=. Because of template type deduction both lhs and rhs are "universal
references", i.e. either an lvalue or an rvalue reference. Therefor std::forward must be used to forward the type of lhs and rhs.
| lhs | the rvalue reference to the temporary expression on the right hand side of the operator. |
| rhs | the universal reference to either a scalar, a variable or a lvalue expression on the right hand side of the operator. |
lhs -rhs. References operator*(), operator-(), and operator<=().
| std::ostream & gum::credal::lp::operator<< | ( | std::ostream & | out, |
| const LpInterface< T > & | lpi ) |
| out | the reference to the caller, i.e. left side of <<. |
| lpi | the constant reference to the linear program whose representation we want. |
Definition at line 178 of file LpInterface_tpl.h.
| std::ostream & gum::credal::lp::operator<< | ( | std::ostream & | out, |
| const LpRow & | row ) |
| 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.
Overload of operator <= between anything and anything.
Implements both the copy operator <= and move operator <=. Because of template type deduction both lhs and rhs are "universal references", i.e. either an lvalue or an rvalue reference. Therefor std::forward must be used to forward the type of lhs and rhs.
| lhs | the universal reference to either a ( temporary ) scalar, a ( temporary ) variable or a ( temporary ) expression on the left hand side of the operator. |
| rhs | the universal reference to either a ( temporary ) scalar, a ( temporary ) variable or a ( temporary ) expression on the right hand side of the operator. |
| T1 | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
| T2 | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
lhs <= rhs. Definition at line 528 of file LpInterface_tpl.h.
References gum::credal::lp::LpExpr::lessThan(), and operator<=().
Overload of operator <= between anything and anything.
Implements both the copy operator <= and move operator <=. Because of template type deduction both lhs and rhs are "universal references", i.e. either an lvalue or an rvalue reference. Therefor std::forward must be used to forward the type of lhs and rhs.
| lhs | the universal reference to either a ( temporary ) scalar, a ( temporary ) variable or a ( temporary ) expression on the left hand side of the operator. |
| rhs | the universal reference to either a ( temporary ) scalar, a ( temporary ) variable or a ( temporary ) expression on the right hand side of the operator. |
| T1 | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
| T2 | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
lhs <= rhs. Definition at line 523 of file LpInterface_tpl.h.
References gum::credal::lp::LpExpr::lessThan(), and operator<=().
Referenced by operator-(), operator<=(), operator<=(), operator<=(), operator<=(), operator<=(), operator<=(), operator<=(), and operator<=().
Overload of operator <= between anything and anything.
Implements both the copy operator <= and move operator <=. Because of template type deduction both lhs and rhs are "universal references", i.e. either an lvalue or an rvalue reference. Therefor std::forward must be used to forward the type of lhs and rhs.
| lhs | the universal reference to either a ( temporary ) scalar, a ( temporary ) variable or a ( temporary ) expression on the left hand side of the operator. |
| rhs | the universal reference to either a ( temporary ) scalar, a ( temporary ) variable or a ( temporary ) expression on the right hand side of the operator. |
| T1 | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
| T2 | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
lhs <= rhs. Definition at line 549 of file LpInterface_tpl.h.
References gum::credal::lp::LpExpr::lessThan(), and operator<=().
Overload of operator <= between anything and anything.
Implements both the copy operator <= and move operator <=. Because of template type deduction both lhs and rhs are "universal references", i.e. either an lvalue or an rvalue reference. Therefor std::forward must be used to forward the type of lhs and rhs.
| lhs | the universal reference to either a ( temporary ) scalar, a ( temporary ) variable or a ( temporary ) expression on the left hand side of the operator. |
| rhs | the universal reference to either a ( temporary ) scalar, a ( temporary ) variable or a ( temporary ) expression on the right hand side of the operator. |
| T1 | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
| T2 | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
lhs <= rhs. Definition at line 544 of file LpInterface_tpl.h.
References gum::credal::lp::LpExpr::lessThan(), and operator<=().
Overload of operator <= between anything and anything.
Implements both the copy operator <= and move operator <=. Because of template type deduction both lhs and rhs are "universal references", i.e. either an lvalue or an rvalue reference. Therefor std::forward must be used to forward the type of lhs and rhs.
| lhs | the universal reference to either a ( temporary ) scalar, a ( temporary ) variable or a ( temporary ) expression on the left hand side of the operator. |
| rhs | the universal reference to either a ( temporary ) scalar, a ( temporary ) variable or a ( temporary ) expression on the right hand side of the operator. |
| T1 | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
| T2 | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
lhs <= rhs. Definition at line 538 of file LpInterface_tpl.h.
References gum::credal::lp::LpExpr::lessThan(), and operator<=().
Overload of operator <= between anything and anything.
Implements both the copy operator <= and move operator <=. Because of template type deduction both lhs and rhs are "universal references", i.e. either an lvalue or an rvalue reference. Therefor std::forward must be used to forward the type of lhs and rhs.
| lhs | the universal reference to either a ( temporary ) scalar, a ( temporary ) variable or a ( temporary ) expression on the left hand side of the operator. |
| rhs | the universal reference to either a ( temporary ) scalar, a ( temporary ) variable or a ( temporary ) expression on the right hand side of the operator. |
| T1 | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
| T2 | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
lhs <= rhs. Definition at line 533 of file LpInterface_tpl.h.
References gum::credal::lp::LpExpr::lessThan(), and operator<=().
Overload of operator <= between anything and anything.
Implements both the copy operator <= and move operator <=. Because of template type deduction both lhs and rhs are "universal references", i.e. either an lvalue or an rvalue reference. Therefor std::forward must be used to forward the type of lhs and rhs.
| lhs | the universal reference to either a ( temporary ) scalar, a ( temporary ) variable or a ( temporary ) expression on the left hand side of the operator. |
| rhs | the universal reference to either a ( temporary ) scalar, a ( temporary ) variable or a ( temporary ) expression on the right hand side of the operator. |
| T1 | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
| T2 | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
lhs <= rhs. Definition at line 559 of file LpInterface_tpl.h.
References gum::credal::lp::LpExpr::lessThan(), and operator<=().
Overload of operator <= between anything and anything.
Implements both the copy operator <= and move operator <=. Because of template type deduction both lhs and rhs are "universal references", i.e. either an lvalue or an rvalue reference. Therefor std::forward must be used to forward the type of lhs and rhs.
| lhs | the universal reference to either a ( temporary ) scalar, a ( temporary ) variable or a ( temporary ) expression on the left hand side of the operator. |
| rhs | the universal reference to either a ( temporary ) scalar, a ( temporary ) variable or a ( temporary ) expression on the right hand side of the operator. |
| T1 | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
| T2 | A scalar type ( integer or float ( any precision ) ) or a LpCol or a LpExpr. |
lhs <= rhs. Definition at line 554 of file LpInterface_tpl.h.
References gum::credal::lp::LpExpr::lessThan(), and operator<=().
Swap the addresses of two pointers to hashTables.
Used by move operations as the temporary will take care of the delete operations.
| a | the address of the first pointer. |
| b | the address of the second pointer. |
References operator+(), and swap().
Referenced by gum::credal::lp::LpExpr::LpExpr(), gum::credal::lp::LpExpr::_addSide_(), gum::credal::lp::LpExpr::operator+=(), gum::credal::lp::LpExpr::operator=(), gum::credal::lp::LpRow::operator=(), and swap().