Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set
// doxy/ or-tools/ src/ constraint_solver/

operations_research::RevBitMatrix Class Reference

Matrix version of the RevBitSet class. More...

#include <constraint_solveri.h>

Inheritance diagram for operations_research::RevBitMatrix:

operations_research::RevBitSet

List of all members.

Public Member Functions

 RevBitMatrix (int64 rows, int64 columns)
 RevBitMatrix.
 ~RevBitMatrix ()
void SetToOne (Solver *const solver, int64 row, int64 column)
 Sets the 'column' bit in the 'row' row..
void SetToZero (Solver *const solver, int64 row, int64 column)
 Erases the 'column' bit in the 'row' row..
bool IsSet (int64 row, int64 column) const
 Returns whether the 'column' bit in the 'row' row is set.
int64 Cardinality (int row) const
 Returns the number of bits set to one in the 'row' row.
bool IsCardinalityZero (int row) const
 Is bitset of row 'row' null?
bool IsCardinalityOne (int row) const
 Does the 'row' bitset contains only one bit set?
int64 GetFirstBit (int row, int start) const
 Returns the first bit in the row 'row' which position is >= 'start'.
void ClearAll (Solver *const solver)
 Cleans all bits.


Detailed Description

Matrix version of the RevBitSet class.

Definition at line 481 of file constraint_solveri.h.


Constructor & Destructor Documentation

operations_research::RevBitMatrix::RevBitMatrix ( int64  rows,
int64  columns 
)

RevBitMatrix.

Definition at line 162 of file utilities.cc.

operations_research::RevBitMatrix::~RevBitMatrix (  ) 

Definition at line 168 of file utilities.cc.


Member Function Documentation

void operations_research::RevBitMatrix::SetToOne ( Solver *const   solver,
int64  row,
int64  column 
)

Sets the 'column' bit in the 'row' row..

Definition at line 170 of file utilities.cc.

void operations_research::RevBitMatrix::SetToZero ( Solver *const   solver,
int64  row,
int64  column 
)

Erases the 'column' bit in the 'row' row..

Definition at line 178 of file utilities.cc.

bool operations_research::RevBitMatrix::IsSet ( int64  row,
int64  column 
) const [inline]

Returns whether the 'column' bit in the 'row' row is set.

Definition at line 491 of file constraint_solveri.h.

int64 operations_research::RevBitMatrix::Cardinality ( int  row  )  const

Returns the number of bits set to one in the 'row' row.

Definition at line 186 of file utilities.cc.

bool operations_research::RevBitMatrix::IsCardinalityZero ( int  row  )  const

Is bitset of row 'row' null?

Definition at line 198 of file utilities.cc.

bool operations_research::RevBitMatrix::IsCardinalityOne ( int  row  )  const

Does the 'row' bitset contains only one bit set?

Definition at line 193 of file utilities.cc.

int64 operations_research::RevBitMatrix::GetFirstBit ( int  row,
int  start 
) const

Returns the first bit in the row 'row' which position is >= 'start'.

It returns -1 if there are none.

Definition at line 203 of file utilities.cc.

void operations_research::RevBitMatrix::ClearAll ( Solver *const   solver  ) 

Cleans all bits.

Reimplemented from operations_research::RevBitSet.

Definition at line 218 of file utilities.cc.


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