#include <row.h>
Inheritance diagram for ABA_ROW:
Public Member Functions | |
ABA_ROW (ABA_GLOBAL *glob, int nnz, const ABA_ARRAY< int > &s, const ABA_ARRAY< double > &c, const ABA_CSENSE sense, double r) | |
ABA_ROW (ABA_GLOBAL *glob, int nnz, const ABA_ARRAY< int > &s, const ABA_ARRAY< double > &c, const ABA_CSENSE::SENSE sense, double r) | |
This is an equivalent constructor using ABA_CSENSE::SENSE instead of an object of the class SENSE to initialize the sense of the constraint. | |
ABA_ROW (ABA_GLOBAL *glob, int nnz, int *s, double *c, ABA_CSENSE::SENSE sense, double r) | |
This is also an equivalent constructor except that s and c are C-style arrays. | |
ABA_ROW (ABA_GLOBAL *glob, int size) | |
~ABA_ROW () | |
The destructor. | |
double | rhs () const |
void | rhs (double r) |
This version of rhs() sets the right hand side of the row. | |
ABA_CSENSE * | sense () |
void | sense (ABA_CSENSE &s) |
This version of sense() sets the sense of the row. | |
void | sense (ABA_CSENSE::SENSE s) |
And another version of sense() to set the sense of the row. | |
void | copy (const ABA_ROW &row) |
Behaves like an assignment operator, however, the maximal number of the elements of this row only has to be at least the number of nonzeros of row. | |
void | delInd (ABA_BUFFER< int > &buf, double rhsDelta) |
Removes the indices listed in buf from the support of the row and subtracts rhsDelta from its right hand side. | |
Protected Attributes | |
ABA_CSENSE | sense_ |
double | rhs_ |
Friends | |
ostream & | operator<< (ostream &out, const ABA_ROW &rhs) |
The output operator writes the row on an output stream in format like { -2.5 x1 + 3 x3 <= 7}. |
Definition at line 48 of file row.h.
ABA_ROW::ABA_ROW | ( | ABA_GLOBAL * | glob, | |
int | nnz, | |||
const ABA_ARRAY< int > & | s, | |||
const ABA_ARRAY< double > & | c, | |||
const ABA_CSENSE | sense, | |||
double | r | |||
) |
A constructor.
glob | A pointer to the corresponding global object. | |
nnz | The number of nonzero elements of the row. | |
s | The array storing the nonzero elements. | |
c | The array storing the nonzero coefficients of the elements of s. | |
sense | The sense of the row. | |
r | The right hand side of the row. |
ABA_ROW::ABA_ROW | ( | ABA_GLOBAL * | glob, | |
int | nnz, | |||
const ABA_ARRAY< int > & | s, | |||
const ABA_ARRAY< double > & | c, | |||
const ABA_CSENSE::SENSE | sense, | |||
double | r | |||
) |
This is an equivalent constructor using ABA_CSENSE::SENSE instead of an object of the class SENSE to initialize the sense of the constraint.
ABA_ROW::ABA_ROW | ( | ABA_GLOBAL * | glob, | |
int | nnz, | |||
int * | s, | |||
double * | c, | |||
ABA_CSENSE::SENSE | sense, | |||
double | r | |||
) |
This is also an equivalent constructor except that s and c are C-style arrays.
ABA_ROW::ABA_ROW | ( | ABA_GLOBAL * | glob, | |
int | size | |||
) |
A constructor without initialization of the nonzeros of the row.
glob | A pointer to the corresponding global object. | |
size | The maximal numbers of nonzeros. |
ABA_ROW::~ABA_ROW | ( | ) |
The destructor.
double ABA_ROW::rhs | ( | ) | const [inline] |
void ABA_ROW::rhs | ( | double | r | ) | [inline] |
ABA_CSENSE * ABA_ROW::sense | ( | ) | [inline] |
void ABA_ROW::sense | ( | ABA_CSENSE & | s | ) | [inline] |
void ABA_ROW::sense | ( | ABA_CSENSE::SENSE | s | ) | [inline] |
void ABA_ROW::copy | ( | const ABA_ROW & | row | ) |
Behaves like an assignment operator, however, the maximal number of the elements of this row only has to be at least the number of nonzeros of row.
row | The row that is copied. |
void ABA_ROW::delInd | ( | ABA_BUFFER< int > & | buf, | |
double | rhsDelta | |||
) |
Removes the indices listed in buf from the support of the row and subtracts rhsDelta from its right hand side.
buf | The components being removed from the row. | |
rhsDelta | The correction of the right hand side of the row. |
ostream& operator<< | ( | ostream & | out, | |
const ABA_ROW & | rhs | |||
) | [friend] |
The output operator writes the row on an output stream in format like { -2.5 x1 + 3 x3 <= 7}.
Only variables with nonzero coefficients are output. The output operator does neither output a '+' before the first coefficient of a row, if it is positive, nor outputs coefficients with absolute value 1.
out | The output stream. | |
rhs | The row being output. |
ABA_CSENSE ABA_ROW::sense_ [protected] |
double ABA_ROW::rhs_ [protected] |