For int,int hashing. More...
#include <CoinModelUseful.hpp>
Public Member Functions | |
Constructors, destructor | |
CoinModelHash2 () | |
Default constructor. | |
~CoinModelHash2 () | |
Destructor. | |
Copy method | |
CoinModelHash2 (const CoinModelHash2 &) | |
The copy constructor. | |
CoinModelHash2 & | operator= (const CoinModelHash2 &) |
= | |
sizing (just increases) | |
void | resize (int maxItems, const CoinModelTriple *triples, bool forceReHash=false) |
Resize hash (also re-hashs). | |
int | numberItems () const |
Number of items. | |
void | setNumberItems (int number) |
Set number of items. | |
int | maximumItems () const |
Maximum number of items. | |
Private Attributes | |
Data members | |
CoinModelHashLink * | hash_ |
hash | |
int | numberItems_ |
Number of items. | |
int | maximumItems_ |
Maximum number of items. | |
int | lastSlot_ |
Last slot looked at. | |
hashing | |
| |
int | hash (int row, int column, const CoinModelTriple *triples) const |
Returns index or -1. | |
void | addHash (int index, int row, int column, const CoinModelTriple *triples) |
Adds to hash. | |
void | deleteHash (int index, int row, int column) |
Deletes from hash. | |
int | hashValue (int row, int column) const |
Returns a hash value. |
For int,int hashing.
Definition at line 216 of file CoinModelUseful.hpp.
CoinModelHash2::CoinModelHash2 | ( | ) |
Default constructor.
CoinModelHash2::~CoinModelHash2 | ( | ) |
Destructor.
CoinModelHash2::CoinModelHash2 | ( | const CoinModelHash2 & | ) |
The copy constructor.
CoinModelHash2& CoinModelHash2::operator= | ( | const CoinModelHash2 & | ) |
=
void CoinModelHash2::resize | ( | int | maxItems, | |
const CoinModelTriple * | triples, | |||
bool | forceReHash = false | |||
) |
Resize hash (also re-hashs).
int CoinModelHash2::numberItems | ( | ) | const [inline] |
Number of items.
Definition at line 240 of file CoinModelUseful.hpp.
void CoinModelHash2::setNumberItems | ( | int | number | ) |
Set number of items.
int CoinModelHash2::maximumItems | ( | ) | const [inline] |
Maximum number of items.
Definition at line 245 of file CoinModelUseful.hpp.
int CoinModelHash2::hash | ( | int | row, | |
int | column, | |||
const CoinModelTriple * | triples | |||
) | const |
Returns index or -1.
void CoinModelHash2::addHash | ( | int | index, | |
int | row, | |||
int | column, | |||
const CoinModelTriple * | triples | |||
) |
Adds to hash.
void CoinModelHash2::deleteHash | ( | int | index, | |
int | row, | |||
int | column | |||
) |
Deletes from hash.
int CoinModelHash2::hashValue | ( | int | row, | |
int | column | |||
) | const [private] |
Returns a hash value.
CoinModelHashLink* CoinModelHash2::hash_ [private] |
hash
Definition at line 266 of file CoinModelUseful.hpp.
int CoinModelHash2::numberItems_ [private] |
Number of items.
Definition at line 268 of file CoinModelUseful.hpp.
int CoinModelHash2::maximumItems_ [private] |
Maximum number of items.
Definition at line 270 of file CoinModelUseful.hpp.
int CoinModelHash2::lastSlot_ [private] |
Last slot looked at.
Definition at line 272 of file CoinModelUseful.hpp.