ABA_ROW Class Reference

class refines its base class ABA_SPARVEC for the representation of constraints in the row format More...

#include <row.h>

Inheritance diagram for ABA_ROW:

ABA_SPARVEC ABA_ABACUSROOT List of all members.

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_CSENSEsense ()
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}.

Detailed Description

class refines its base class ABA_SPARVEC for the representation of constraints in the row format

Definition at line 48 of file row.h.


Constructor & Destructor Documentation

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.

Parameters:
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.

Parameters:
glob A pointer to the corresponding global object.
size The maximal numbers of nonzeros.

ABA_ROW::~ABA_ROW (  ) 

The destructor.


Member Function Documentation

double ABA_ROW::rhs (  )  const [inline]

Returns:
The right hand side stored in the row format.

Definition at line 190 of file row.h.

void ABA_ROW::rhs ( double  r  )  [inline]

This version of rhs() sets the right hand side of the row.

Parameters:
r The new value of the right hand side.

Definition at line 195 of file row.h.

ABA_CSENSE * ABA_ROW::sense (  )  [inline]

Returns:
A pointer to the sense of the row.

Definition at line 200 of file row.h.

void ABA_ROW::sense ( ABA_CSENSE s  )  [inline]

This version of sense() sets the sense of the row.

Parameters:
s The new sense of the row.

Definition at line 205 of file row.h.

void ABA_ROW::sense ( ABA_CSENSE::SENSE  s  )  [inline]

And another version of sense() to set the sense of the row.

Parameters:
s The new sense of the row.

Definition at line 210 of file row.h.

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.

Parameters:
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.

Parameters:
buf The components being removed from the row.
rhsDelta The correction of the right hand side of the row.


Friends And Related Function Documentation

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.

Returns:
A reference to the output stream.
Parameters:
out The output stream.
rhs The row being output.


Member Data Documentation

ABA_CSENSE ABA_ROW::sense_ [protected]

The sense of the row.

Definition at line 182 of file row.h.

double ABA_ROW::rhs_ [protected]

The right hand side of the row.

Definition at line 186 of file row.h.


The documentation for this class was generated from the following file:
Generated on Tue Aug 14 18:09:58 2007 for ABACUS by  doxygen 1.5.1