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

operations_research::SmallRevBitSet Class Reference

This class represents a small reversible bitset (size <= 64). More...

#include <constraint_solveri.h>

List of all members.

Public Member Functions

 SmallRevBitSet (int64 size)
 SmallRevBitSet.
void SetToOne (Solver *const solver, int64 pos)
 Sets the 'pos' bit.
void SetToZero (Solver *const solver, int64 pos)
 Erases the 'pos' bit.
int64 Cardinality () const
 Returns the number of bits set to one.
bool IsCardinalityZero () const
 Is bitset null?
bool IsCardinalityOne () const
 Does it contains only one bit set?
int64 GetFirstOne () const
 Gets the index of the first bit set starting from 0.


Detailed Description

This class represents a small reversible bitset (size <= 64).

This class is useful to maintain supports.

Definition at line 421 of file constraint_solveri.h.


Constructor & Destructor Documentation

operations_research::SmallRevBitSet::SmallRevBitSet ( int64  size  )  [explicit]

SmallRevBitSet.

Definition at line 33 of file utilities.cc.


Member Function Documentation

void operations_research::SmallRevBitSet::SetToOne ( Solver *const   solver,
int64  pos 
)

Sets the 'pos' bit.

Definition at line 38 of file utilities.cc.

void operations_research::SmallRevBitSet::SetToZero ( Solver *const   solver,
int64  pos 
)

Erases the 'pos' bit.

Definition at line 43 of file utilities.cc.

int64 operations_research::SmallRevBitSet::Cardinality (  )  const

Returns the number of bits set to one.

Definition at line 48 of file utilities.cc.

bool operations_research::SmallRevBitSet::IsCardinalityZero (  )  const [inline]

Is bitset null?

Definition at line 431 of file constraint_solveri.h.

bool operations_research::SmallRevBitSet::IsCardinalityOne (  )  const [inline]

Does it contains only one bit set?

Definition at line 433 of file constraint_solveri.h.

int64 operations_research::SmallRevBitSet::GetFirstOne (  )  const

Gets the index of the first bit set starting from 0.

It returns -1 if the bitset is empty.

Definition at line 52 of file utilities.cc.


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