aGrUM 3.2.0
a C++ library for (probabilistic) graphical models
gum::credal::lp::LpCol Class Reference

Class representing a variable ( a column ) of a linear program, i.e. More...

#include <agrum/CN/LpInterface.h>

Public Member Functions

unsigned int id () const
 Variable id accessor.
std::string toString () const
 Get the string representation of a calling variable.
Constructor / Destructor
 LpCol (unsigned int id)
 Default constructor.
 LpCol (const LpCol &col)
 Default copy constructor.
 ~LpCol ()
 Default destructor.

Private Attributes

unsigned int _id_
 Variable id.

Operators overload

bool operator< (const LpCol &col) const
 Test of ordering < between two variables.
bool operator== (const LpCol &col) const
 Test of equality == between two variables.
bool operator!= (const LpCol &col) const
 Opposite of equality != test between two variables.
LpCol & operator= (const LpCol &col)
 Assignment operator = by copy.
std::ostream & operator<< (std::ostream &out, const LpCol &col)
 Overload of << to use with output streams ( such as std::cout << ).

Detailed Description

Class representing a variable ( a column ) of a linear program, i.e.

a dimension of the problem.

Author
Matthieu HOURBRACQ and Pierre-Henri WUILLEMIN(_at_LIP6)

Definition at line 80 of file LpInterface.h.

Constructor & Destructor Documentation

◆ LpCol() [1/2]

gum::credal::lp::LpCol::LpCol ( unsigned int id)
explicit

Default constructor.

class LpCol

Parameters
idThe id of the variable.

Definition at line 64 of file LpInterface.cpp.

64 : _id_(id) {
65 GUM_CONSTRUCTOR(LpCol);
66 ;
67 }
LpCol(unsigned int id)
Default constructor.
unsigned int _id_
Variable id.

References LpCol(), _id_, and id().

Referenced by LpCol(), LpCol(), ~LpCol(), gum::credal::lp::LpInterface< GUM_SCALAR >::addCols(), operator!=(), operator<(), operator<<, operator=(), and operator==().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LpCol() [2/2]

gum::credal::lp::LpCol::LpCol ( const LpCol & col)

Default copy constructor.

Parameters
colThe constant reference to the variable to copy.

Definition at line 69 of file LpInterface.cpp.

69 : _id_(col._id_) {
70 GUM_CONS_CPY(LpCol);
71 ;
72 }

References LpCol(), and _id_.

Here is the call graph for this function:

◆ ~LpCol()

gum::credal::lp::LpCol::~LpCol ( )

Default destructor.

Definition at line 74 of file LpInterface.cpp.

74 {
75 GUM_DESTRUCTOR(LpCol);
76 ;
77 }

References LpCol().

Here is the call graph for this function:

Member Function Documentation

◆ id()

unsigned int gum::credal::lp::LpCol::id ( ) const

Variable id accessor.

Returns
The id of the variable.

Referenced by LpCol().

Here is the caller graph for this function:

◆ operator!=()

bool gum::credal::lp::LpCol::operator!= ( const LpCol & col) const

Opposite of equality != test between two variables.

For use with maps, hashTable etc

Parameters
colThe constant reference to the variable to compare to this ( the caller ).
Returns
True if this id is not the same than col id, false otherwise.

References LpCol().

Here is the call graph for this function:

◆ operator<()

bool gum::credal::lp::LpCol::operator< ( const LpCol & col) const

Test of ordering < between two variables.

For use with maps, hashTable etc

Parameters
colThe constant reference to the variable to compare to this ( the caller ).
Returns
True if this id is smaller than col id, false otherwise.

References LpCol().

Here is the call graph for this function:

◆ operator=()

LpCol & gum::credal::lp::LpCol::operator= ( const LpCol & col)

Assignment operator = by copy.

Parameters
colThe constant reference to the variable to copy in this ( the caller ).
Returns
The address of the caller.

References LpCol().

Here is the call graph for this function:

◆ operator==()

bool gum::credal::lp::LpCol::operator== ( const LpCol & col) const

Test of equality == between two variables.

For use with maps, hashTable etc

Parameters
colThe constant reference to the variable to compare to this ( the caller ).
Returns
True if this id is equals to col id, false otherwise.

References LpCol().

Here is the call graph for this function:

◆ toString()

std::string gum::credal::lp::LpCol::toString ( ) const

Get the string representation of a calling variable.

Returns
The string representation of the calling variable.

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const LpCol & col )
friend

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

Parameters
outThe reference to the caller, i.e. left side of <<.
colThe constant reference to the variable whose representation we want.
Returns
The address of the caller.

References LpCol().

Member Data Documentation

◆ _id_

unsigned int gum::credal::lp::LpCol::_id_
private

Variable id.

Definition at line 182 of file LpInterface.h.

Referenced by LpCol(), and LpCol().


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