aGrUM  0.18.1
a C++ library for (probabilistic) graphical models
gum::credal::lp::LpInterface< GUM_SCALAR > Class Template Reference

Class representing a linear program. More...

#include <agrum/CN/LpInterface.h>

+ Collaboration diagram for gum::credal::lp::LpInterface< GUM_SCALAR >:

Public Member Functions

LpCol addCol ()
 Insert a new column, i.e. More...
 
std::vector< LpColaddCols (const unsigned int &cols)
 Insert new columns, i.e. More...
 
void addRow (const LpExpr &expr)
 Add rows to the linear program according to a given expression ( which must be at least an inequality ). More...
 
void addRow (LpExpr &&expr)
 Add rows to the linear program according to a given expression ( which must be at least an inequality ). More...
 
void addPositivity ()
 Add positivity constraints for all variables. More...
 
void addSumIsOne ()
 Add sum of variables is 1 constraints. More...
 
void addProba ()
 Add positivity constraints and sum of variables is 1 ( probability constraints ) More...
 
std::vector< std::vector< GUM_SCALAR > > solve ()
 Solve the linear program (H-representation of the polytope) by enumeration (of the polytope vertices) using lexicographic reverse search (lrs). More...
 
std::vector< LpColgetCols () const
 Get the variables of the LP. More...
 
std::string toString () const
 Get the string representation of a calling linear program. More...
 
void clear ()
 Reset the rows (inequalities) and columns (variables) of the LP as if it was created. More...
 
void clearRows ()
 Reset the rows (inequalities) of the LP but not the columns (variables are kept). More...
 
Constructor / Destructor
 LpInterface ()
 Default constructor, empty problem. More...
 
 LpInterface (const LpInterface< GUM_SCALAR > &from)
 Copy constructor. More...
 
 LpInterface (LpInterface< GUM_SCALAR > &&from)
 Move copy constructor. More...
 
 ~LpInterface ()
 Default destructor. More...
 
Compound assignment operator
LpInterface< GUM_SCALAR > & operator= (const LpInterface< GUM_SCALAR > &from)
 Copy compound assignment. More...
 
LpInterface< GUM_SCALAR > & operator= (LpInterface< GUM_SCALAR > &&from)
 Move coumpound assignment. More...
 

Friends

template<typename T >
std::ostream & operator<< (std::ostream &out, const LpInterface< T > &lpi)
 Overload of << to use with output streams ( such as std::cout << ). More...
 

Detailed Description

template<typename GUM_SCALAR>
class gum::credal::lp::LpInterface< GUM_SCALAR >

Class representing a linear program.

Author
Matthieu HOURBRACQ and Pierre-Henri WUILLEMIN()

Definition at line 49 of file LpInterface.h.

Constructor & Destructor Documentation

◆ LpInterface() [1/3]

template<typename GUM_SCALAR >
gum::credal::lp::LpInterface< GUM_SCALAR >::LpInterface ( )

Default constructor, empty problem.

class LpInterface

Definition at line 750 of file LpInterface_tpl.h.

750  {
751  positivity__ = false;
752  sumIsOne__ = false;
753  GUM_CONSTRUCTOR(LpInterface);
754  }
bool sumIsOne__
true if addSumIsOne() has been called, false otherwise.
Definition: LpInterface.h:761
LpInterface()
Default constructor, empty problem.
bool positivity__
true if addPositivity() has been called, false otherwise.
Definition: LpInterface.h:758

◆ LpInterface() [2/3]

template<typename GUM_SCALAR >
gum::credal::lp::LpInterface< GUM_SCALAR >::LpInterface ( const LpInterface< GUM_SCALAR > &  from)

Copy constructor.

Parameters
fromThe LpInterface to be copied.

Definition at line 757 of file LpInterface_tpl.h.

References gum::credal::lp::LpInterface< GUM_SCALAR >::rows__.

758  :
759  cols__(from.cols__),
760  positivity__(from.positivity__), sumIsOne__(from.sumIsOne__) {
761  rows__.resize(from.rows__.size());
762 
763  for (unsigned int i = 0, end = from.rows__.size(); i < end; i++)
764  rows__[i] = new LpRow(*from.rows__[i]);
765 
766  GUM_CONS_CPY(LpInterface);
767  }
bool sumIsOne__
true if addSumIsOne() has been called, false otherwise.
Definition: LpInterface.h:761
LpInterface()
Default constructor, empty problem.
std::vector< LpCol > cols__
Variables of the problem.
Definition: LpInterface.h:754
bool positivity__
true if addPositivity() has been called, false otherwise.
Definition: LpInterface.h:758
std::vector< LpRow *> rows__
Rows of the problem.
Definition: LpInterface.h:752

◆ LpInterface() [3/3]

template<typename GUM_SCALAR >
gum::credal::lp::LpInterface< GUM_SCALAR >::LpInterface ( LpInterface< GUM_SCALAR > &&  from)

Move copy constructor.

Parameters
fromThe temporary LpInterface to be moved.

Definition at line 770 of file LpInterface_tpl.h.

References gum::credal::lp::LpInterface< GUM_SCALAR >::cols__, and gum::credal::lp::LpInterface< GUM_SCALAR >::rows__.

770  :
771  positivity__(from.positivity__), sumIsOne__(from.sumIsOne__) {
772  rows__.swap(from.rows__);
773  cols__.swap(from.cols__);
774  GUM_CONS_CPY(LpInterface);
775  }
bool sumIsOne__
true if addSumIsOne() has been called, false otherwise.
Definition: LpInterface.h:761
LpInterface()
Default constructor, empty problem.
std::vector< LpCol > cols__
Variables of the problem.
Definition: LpInterface.h:754
bool positivity__
true if addPositivity() has been called, false otherwise.
Definition: LpInterface.h:758
std::vector< LpRow *> rows__
Rows of the problem.
Definition: LpInterface.h:752

◆ ~LpInterface()

template<typename GUM_SCALAR >
gum::credal::lp::LpInterface< GUM_SCALAR >::~LpInterface ( )

Default destructor.

Definition at line 778 of file LpInterface_tpl.h.

References gum::credal::lp::LpInterface< GUM_SCALAR >::rows__.

778  {
779  for (const auto row: rows__)
780  delete row;
781 
782  GUM_DESTRUCTOR(LpInterface);
783  }
LpInterface()
Default constructor, empty problem.
std::vector< LpRow *> rows__
Rows of the problem.
Definition: LpInterface.h:752

Member Function Documentation

◆ addCol()

template<typename GUM_SCALAR >
LpCol gum::credal::lp::LpInterface< GUM_SCALAR >::addCol ( )

Insert a new column, i.e.

a new variable.

Returns
A copy of the variable.

Definition at line 826 of file LpInterface_tpl.h.

References gum::credal::lp::LpInterface< GUM_SCALAR >::cols__.

826  {
827  LpCol col((unsigned int)cols__.size());
828 
829  cols__.push_back(col);
830 
831  return col;
832  }
std::vector< LpCol > cols__
Variables of the problem.
Definition: LpInterface.h:754

◆ addCols()

template<typename GUM_SCALAR >
std::vector< LpCol > gum::credal::lp::LpInterface< GUM_SCALAR >::addCols ( const unsigned int &  cols)

Insert new columns, i.e.

new variables.

Parameters
colsthe constant reference to the number of variables we want.
Returns
The copy of the vector of all variables of the problem.

Definition at line 836 of file LpInterface_tpl.h.

References gum::credal::lp::LpInterface< GUM_SCALAR >::cols__, and GUM_ERROR.

836  {
837  if (cols < 1)
838  GUM_ERROR(OperationNotAllowed,
839  "LpInterface::addCols ( cols ) : cols "
840  "needs must be equal or greater than 1 : "
841  << cols << " < 1");
842 
843  for (unsigned int i = 0; i < cols; i++) {
844  cols__.push_back(LpCol((unsigned int)cols__.size()));
845  }
846 
847  return cols__;
848  }
std::vector< LpCol > cols__
Variables of the problem.
Definition: LpInterface.h:754
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55

◆ addPositivity()

template<typename GUM_SCALAR >
void gum::credal::lp::LpInterface< GUM_SCALAR >::addPositivity ( )

Add positivity constraints for all variables.

Definition at line 903 of file LpInterface_tpl.h.

References gum::credal::lp::LpInterface< GUM_SCALAR >::addRow(), gum::credal::lp::LpInterface< GUM_SCALAR >::cols__, and gum::credal::lp::LpInterface< GUM_SCALAR >::positivity__.

Referenced by gum::credal::lp::LpInterface< GUM_SCALAR >::addProba().

903  {
904  if (positivity__) return;
905 
906  for (const auto& col: cols__)
907  addRow(0 <= col);
908 
909  positivity__ = true;
910  }
void addRow(const LpExpr &expr)
Add rows to the linear program according to a given expression ( which must be at least an inequality...
std::vector< LpCol > cols__
Variables of the problem.
Definition: LpInterface.h:754
bool positivity__
true if addPositivity() has been called, false otherwise.
Definition: LpInterface.h:758
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addProba()

template<typename GUM_SCALAR >
void gum::credal::lp::LpInterface< GUM_SCALAR >::addProba ( )

Add positivity constraints and sum of variables is 1 ( probability constraints )

Definition at line 927 of file LpInterface_tpl.h.

References gum::credal::lp::LpInterface< GUM_SCALAR >::addPositivity(), gum::credal::lp::LpInterface< GUM_SCALAR >::addRow(), gum::credal::lp::LpInterface< GUM_SCALAR >::addSumIsOne(), gum::credal::lp::LpInterface< GUM_SCALAR >::cols__, gum::credal::lp::LpInterface< GUM_SCALAR >::positivity__, and gum::credal::lp::LpInterface< GUM_SCALAR >::sumIsOne__.

927  {
928  if (positivity__ && sumIsOne__) {
929  return;
930  } else if (positivity__ && !sumIsOne__) {
931  addSumIsOne();
932  return;
933  } else if (!positivity__ && sumIsOne__) {
934  addPositivity();
935  return;
936  }
937 
938  // we can do both with one loop, don't call the above functions.
939  // addPositivity();
940  // addSumIsOne();
941  LpExpr expr;
942 
943  for (const auto& col: cols__) {
944  addRow(0 <= col);
945  expr += col;
946  }
947 
948  addRow(1 <= std::move(expr) <= 1);
949 
950  sumIsOne__ = true;
951  positivity__ = true;
952  }
void addRow(const LpExpr &expr)
Add rows to the linear program according to a given expression ( which must be at least an inequality...
void addPositivity()
Add positivity constraints for all variables.
void addSumIsOne()
Add sum of variables is 1 constraints.
bool sumIsOne__
true if addSumIsOne() has been called, false otherwise.
Definition: LpInterface.h:761
std::vector< LpCol > cols__
Variables of the problem.
Definition: LpInterface.h:754
bool positivity__
true if addPositivity() has been called, false otherwise.
Definition: LpInterface.h:758
+ Here is the call graph for this function:

◆ addRow() [1/2]

template<typename GUM_SCALAR >
void gum::credal::lp::LpInterface< GUM_SCALAR >::addRow ( const LpExpr expr)

Add rows to the linear program according to a given expression ( which must be at least an inequality ).

Parameters
exprthe constant reference to the expression to convert to rows.

Definition at line 851 of file LpInterface_tpl.h.

References gum::credal::lp::LpInterface< GUM_SCALAR >::cols__, GUM_ERROR, gum::credal::lp::LpExpr::ileft__, gum::credal::lp::LpExpr::iright__, gum::credal::lp::LpInterface< GUM_SCALAR >::rows__, and gum::credal::lp::LpExpr::toString().

Referenced by gum::credal::lp::LpInterface< GUM_SCALAR >::addPositivity(), gum::credal::lp::LpInterface< GUM_SCALAR >::addProba(), and gum::credal::lp::LpInterface< GUM_SCALAR >::addSumIsOne().

851  {
852  if (!expr.ileft__ && !expr.iright__)
853  GUM_ERROR(OperationNotAllowed,
854  "addRow ( const LpExpr & expr ) : expr : "
855  << expr.toString() << "is not an inequality.");
856 
857  if ((expr.ileft__ && !expr.iright__) || (!expr.ileft__ && expr.iright__)) {
858  rows__.push_back(new LpRow(expr, cols__));
859  } else {
860  LpExpr lexpr(expr, true, true, false);
861  LpExpr rexpr(expr, false, true, true);
862 
863  rows__.push_back(
864  new LpRow(std::move(lexpr),
865  cols__));
866  rows__.push_back(
867  new LpRow(std::move(rexpr),
868  cols__));
869  }
870  }
std::vector< LpCol > cols__
Variables of the problem.
Definition: LpInterface.h:754
std::vector< LpRow *> rows__
Rows of the problem.
Definition: LpInterface.h:752
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addRow() [2/2]

template<typename GUM_SCALAR >
void gum::credal::lp::LpInterface< GUM_SCALAR >::addRow ( LpExpr &&  expr)

Add rows to the linear program according to a given expression ( which must be at least an inequality ).

Parameters
exprthe temporary expression to move to rows.

Definition at line 873 of file LpInterface_tpl.h.

References gum::credal::lp::LpInterface< GUM_SCALAR >::cols__, GUM_ERROR, gum::credal::lp::LpExpr::imiddle__, gum::credal::lp::LpExpr::mCoeffs__, gum::credal::lp::LpExpr::mValue__, and gum::credal::lp::LpInterface< GUM_SCALAR >::rows__.

873  {
874  if (!expr.ileft__ && !expr.iright__)
875  GUM_ERROR(OperationNotAllowed,
876  "addRow ( const LpExpr & expr ) : expr : "
877  << expr.toString() << "is not an inequality.");
878 
879  if ((expr.ileft__ && !expr.iright__) || (!expr.ileft__ && expr.iright__)) {
880  rows__.push_back(new LpRow(std::move(expr), cols__));
881  } else {
882  LpExpr lexpr(std::move(expr), true, true, false);
883 
885  LpExpr rexpr(std::move(expr), false, false, true);
886 
888 
889  *rexpr.mCoeffs__ = *lexpr.mCoeffs__;
890  rexpr.mValue__ = lexpr.mValue__;
891  rexpr.imiddle__ = true;
892 
893  rows__.push_back(
894  new LpRow(std::move(lexpr),
895  cols__));
896  rows__.push_back(
897  new LpRow(std::move(rexpr),
898  cols__));
899  }
900  }
std::vector< LpCol > cols__
Variables of the problem.
Definition: LpInterface.h:754
std::vector< LpRow *> rows__
Rows of the problem.
Definition: LpInterface.h:752
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55

◆ addSumIsOne()

template<typename GUM_SCALAR >
void gum::credal::lp::LpInterface< GUM_SCALAR >::addSumIsOne ( )

Add sum of variables is 1 constraints.

Definition at line 913 of file LpInterface_tpl.h.

References gum::credal::lp::LpInterface< GUM_SCALAR >::addRow(), gum::credal::lp::LpInterface< GUM_SCALAR >::cols__, and gum::credal::lp::LpInterface< GUM_SCALAR >::sumIsOne__.

Referenced by gum::credal::lp::LpInterface< GUM_SCALAR >::addProba().

913  {
914  if (sumIsOne__) return;
915 
916  LpExpr expr;
917 
918  for (const auto& col: cols__)
919  expr += col;
920 
921  addRow(1 <= std::move(expr) <= 1);
922 
923  sumIsOne__ = true;
924  }
void addRow(const LpExpr &expr)
Add rows to the linear program according to a given expression ( which must be at least an inequality...
bool sumIsOne__
true if addSumIsOne() has been called, false otherwise.
Definition: LpInterface.h:761
std::vector< LpCol > cols__
Variables of the problem.
Definition: LpInterface.h:754
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clear()

template<typename GUM_SCALAR >
void gum::credal::lp::LpInterface< GUM_SCALAR >::clear ( )

Reset the rows (inequalities) and columns (variables) of the LP as if it was created.

Definition at line 1005 of file LpInterface_tpl.h.

References gum::credal::lp::LpInterface< GUM_SCALAR >::cols__, gum::credal::lp::LpInterface< GUM_SCALAR >::positivity__, gum::credal::lp::LpInterface< GUM_SCALAR >::rows__, and gum::credal::lp::LpInterface< GUM_SCALAR >::sumIsOne__.

1005  {
1006  for (const auto& row: rows__)
1007  delete row;
1008 
1009  rows__.clear();
1010  rows__.shrink_to_fit();
1011 
1015  cols__.clear();
1016  cols__.shrink_to_fit();
1017 
1018  positivity__ = false;
1019  sumIsOne__ = false;
1020  }
bool sumIsOne__
true if addSumIsOne() has been called, false otherwise.
Definition: LpInterface.h:761
std::vector< LpCol > cols__
Variables of the problem.
Definition: LpInterface.h:754
bool positivity__
true if addPositivity() has been called, false otherwise.
Definition: LpInterface.h:758
std::vector< LpRow *> rows__
Rows of the problem.
Definition: LpInterface.h:752

◆ clearRows()

template<typename GUM_SCALAR >
void gum::credal::lp::LpInterface< GUM_SCALAR >::clearRows ( )

Reset the rows (inequalities) of the LP but not the columns (variables are kept).

Definition at line 1023 of file LpInterface_tpl.h.

References gum::credal::lp::LpInterface< GUM_SCALAR >::positivity__, gum::credal::lp::LpInterface< GUM_SCALAR >::rows__, and gum::credal::lp::LpInterface< GUM_SCALAR >::sumIsOne__.

1023  {
1024  for (const auto& row: rows__)
1025  delete row;
1026 
1027  rows__.clear();
1028  rows__.shrink_to_fit();
1029 
1030  positivity__ = false;
1031  sumIsOne__ = false;
1032  }
bool sumIsOne__
true if addSumIsOne() has been called, false otherwise.
Definition: LpInterface.h:761
bool positivity__
true if addPositivity() has been called, false otherwise.
Definition: LpInterface.h:758
std::vector< LpRow *> rows__
Rows of the problem.
Definition: LpInterface.h:752

◆ getCols()

template<typename GUM_SCALAR >
std::vector< LpCol > gum::credal::lp::LpInterface< GUM_SCALAR >::getCols ( ) const

Get the variables of the LP.

Returns
A copy of the variables as a vector of variables.

Definition at line 981 of file LpInterface_tpl.h.

References gum::credal::lp::LpInterface< GUM_SCALAR >::cols__.

981  {
982  return cols__;
983  }
std::vector< LpCol > cols__
Variables of the problem.
Definition: LpInterface.h:754

◆ operator=() [1/2]

template<typename GUM_SCALAR >
LpInterface< GUM_SCALAR > & gum::credal::lp::LpInterface< GUM_SCALAR >::operator= ( const LpInterface< GUM_SCALAR > &  from)

Copy compound assignment.

Parameters
fromThe LpInterface to be copied.

Definition at line 786 of file LpInterface_tpl.h.

References gum::credal::lp::LpInterface< GUM_SCALAR >::cols__, gum::credal::lp::LpInterface< GUM_SCALAR >::positivity__, gum::credal::lp::LpInterface< GUM_SCALAR >::rows__, and gum::credal::lp::LpInterface< GUM_SCALAR >::sumIsOne__.

787  {
789  for (const auto& row: rows__)
790  delete row;
791 
792  rows__.clear();
793  rows__.shrink_to_fit();
794 
795  rows__.resize(from.rows__.size());
796 
797  for (unsigned int i = 0, end = from.rows__.size(); i < end; i++)
798  rows__[i] = new LpRow(*from.rows__[i]);
799 
800  cols__ = from.cols__;
801  positivity__ = from.positivity__;
802  sumIsOne__ = from.sumIsOne__;
803 
804  return *this;
805  }
bool sumIsOne__
true if addSumIsOne() has been called, false otherwise.
Definition: LpInterface.h:761
std::vector< LpCol > cols__
Variables of the problem.
Definition: LpInterface.h:754
bool positivity__
true if addPositivity() has been called, false otherwise.
Definition: LpInterface.h:758
std::vector< LpRow *> rows__
Rows of the problem.
Definition: LpInterface.h:752

◆ operator=() [2/2]

template<typename GUM_SCALAR >
LpInterface< GUM_SCALAR > & gum::credal::lp::LpInterface< GUM_SCALAR >::operator= ( LpInterface< GUM_SCALAR > &&  from)

Move coumpound assignment.

Parameters
fromThe temporary LpInterface to be moved.

Definition at line 809 of file LpInterface_tpl.h.

References gum::credal::lp::LpInterface< GUM_SCALAR >::cols__, gum::credal::lp::LpInterface< GUM_SCALAR >::positivity__, gum::credal::lp::LpInterface< GUM_SCALAR >::rows__, and gum::credal::lp::LpInterface< GUM_SCALAR >::sumIsOne__.

809  {
810  rows__.swap(from.rows__);
811  cols__.swap(from.cols__);
812 
813  positivity__ = from.positivity__;
814  sumIsOne__ = from.sumIsOne__;
815 
816  return *this;
817  }
bool sumIsOne__
true if addSumIsOne() has been called, false otherwise.
Definition: LpInterface.h:761
std::vector< LpCol > cols__
Variables of the problem.
Definition: LpInterface.h:754
bool positivity__
true if addPositivity() has been called, false otherwise.
Definition: LpInterface.h:758
std::vector< LpRow *> rows__
Rows of the problem.
Definition: LpInterface.h:752

◆ solve()

template<typename GUM_SCALAR >
std::vector< std::vector< GUM_SCALAR > > gum::credal::lp::LpInterface< GUM_SCALAR >::solve ( )

Solve the linear program (H-representation of the polytope) by enumeration (of the polytope vertices) using lexicographic reverse search (lrs).

Only works with bounded polyhedron (polytopes) and not unbounded ones (i.e. defined by vertices and rays).

Returns
The V-representation (vertices) of the polytope as a vector of vectors (vector of vertices).

Definition at line 955 of file LpInterface_tpl.h.

References gum::credal::lp::LpInterface< GUM_SCALAR >::cols__, gum::credal::LRSWrapper< GUM_SCALAR >::fillMatrix(), gum::credal::LRSWrapper< GUM_SCALAR >::getOutput(), gum::credal::LRSWrapper< GUM_SCALAR >::H2V(), gum::credal::lp::LpInterface< GUM_SCALAR >::rows__, and gum::credal::LRSWrapper< GUM_SCALAR >::setUpH().

955  {
956  LRSWrapper< GUM_SCALAR > lrs;
957 
958  lrs.setUpH((unsigned int)cols__.size());
959 
960  std::vector< std::vector< GUM_SCALAR > > lrsMatrix;
961 
962  for (const auto& row: rows__) {
963  std::vector< GUM_SCALAR > expandedRow(cols__.size() + 1, 0);
964 
965  expandedRow[0] = row->cste__;
966 
967  for (const auto& elt: *row->coeffs__)
968  expandedRow[elt.first.id() + 1] = elt.second;
969 
970  lrsMatrix.push_back(expandedRow);
971  }
972 
973  lrs.fillMatrix(lrsMatrix);
974 
975  lrs.H2V();
976 
977  return lrs.getOutput();
978  }
std::vector< LpCol > cols__
Variables of the problem.
Definition: LpInterface.h:754
std::vector< LpRow *> rows__
Rows of the problem.
Definition: LpInterface.h:752
+ Here is the call graph for this function:

◆ toString()

template<typename GUM_SCALAR >
std::string gum::credal::lp::LpInterface< GUM_SCALAR >::toString ( ) const

Get the string representation of a calling linear program.

Returns
The string representation of the calling linear program.

Definition at line 986 of file LpInterface_tpl.h.

References gum::credal::lp::LpInterface< GUM_SCALAR >::cols__, and gum::credal::lp::LpInterface< GUM_SCALAR >::rows__.

986  {
987  std::ostringstream s;
988 
989  s << std::endl << std::endl << "Variables : " << std::endl;
990 
991  for (const auto& col: cols__)
992  s << " " << col.toString();
993 
994  s << std::endl;
995 
996  for (const auto& row: rows__)
997  s << std::endl << row->toString();
998 
999  s << std::endl << std::endl;
1000 
1001  return s.str();
1002  }
std::vector< LpCol > cols__
Variables of the problem.
Definition: LpInterface.h:754
std::vector< LpRow *> rows__
Rows of the problem.
Definition: LpInterface.h:752

Friends And Related Function Documentation

◆ operator<<

template<typename GUM_SCALAR>
template<typename T >
std::ostream& operator<< ( std::ostream &  out,
const LpInterface< T > &  lpi 
)
friend

Overload of << to use with output streams ( such as std::cout << ).

Parameters
outthe reference to the caller, i.e. left side of <<.
lpithe constant reference to the linear program whose representation we want.
Returns
The address of the caller.

Definition at line 820 of file LpInterface_tpl.h.

820  {
821  out << lpi.toString();
822  return out;
823  }

Member Data Documentation

◆ cols__

◆ positivity__

◆ rows__

◆ sumIsOne__


The documentation for this class was generated from the following files: