6 #ifndef CoinModelUseful_H 
    7 #define CoinModelUseful_H 
   50   inline int row()
 const 
  140   return triple.
row & 0x7fffffff;
 
  144   triple.
row = iRow | (triple.
row & 0x80000000);
 
  148   return (triple.
row & 0x80000000) != 0;
 
  152   triple.
row = (
string ? 0x80000000 : 0) | (triple.
row & 0x7fffffff);
 
  155   int iRow, 
bool string)
 
  157   triple.
row = (
string ? 0x80000000 : 0) | iRow;
 
  241   void resize(
int maxItems, 
bool forceReHash = 
false);
 
  256   inline const char *
const *
names()
 const 
  271   const char *
name(
int which) 
const;
 
  273   char *
getName(
int which) 
const;
 
CoinBigIndex firstFree() const 
First on free chain. 
 
CoinBigIndex maximumElements() const 
Maximum number of elements. 
 
CoinBigIndex numberElements_
Number of elements. 
 
void setStringInTriple(CoinModelTriple &triple, bool string)
 
void validateHash() const 
Validates. 
 
double value() const 
Get value. 
 
int numberMajor() const 
Number of major items i.e. rows if just row links. 
 
This is for various structures/classes needed by CoinModel. 
 
const CoinBigIndex * next() const 
Next array. 
 
void addHash(int index, const char *name)
Adds to hash. 
 
int numberItems() const 
Number of items i.e. rows if just row names. 
 
void addHash(CoinBigIndex index, int row, int column, const CoinModelTriple *triples)
Adds to hash. 
 
CoinBigIndex numberElements() const 
Number of elements. 
 
CoinModelLinkedList()
Default constructor. 
 
CoinBigIndex maximumItems() const 
Maximum number of items. 
 
char * getName(int which) const 
Returns non const name at position (or NULL) 
 
void updateDeleted(int which, CoinModelTriple *triples, CoinModelLinkedList &otherList)
Deletes from list - other case i.e. 
 
CoinBigIndex addEasy(int majorIndex, CoinBigIndex numberOfElements, const int *indices, const double *elements, CoinModelTriple *triples, CoinModelHash2 &hash)
Adds to list - easy case i.e. 
 
CoinModelLinkedList & operator=(const CoinModelLinkedList &)
= 
 
void deleteHash(CoinBigIndex index, int row, int column)
Deletes from hash. 
 
~CoinModelLink()
Destructor. 
 
void setElement(double value)
Set value. 
 
void resize(int maxMajor, CoinBigIndex maxElements)
Resize list - for row list maxMajor is maximum rows. 
 
double element() const 
Get value. 
 
CoinBigIndex hash(int row, int column, const CoinModelTriple *triples) const 
Returns index or -1. 
 
bool stringInTriple(const CoinModelTriple &triple)
 
double value_
Value as double. 
 
int maximumItems() const 
Maximum number of items. 
 
int maximumMajor_
Maximum number of major items i.e. rows if just row links. 
 
void resize(int maxItems, bool forceReHash=false)
Resize hash (also re-hashs) 
 
CoinBigIndex hashValue(int row, int column) const 
Returns a hash value. 
 
CoinBigIndex last(int which) const 
Last on chain. 
 
void setRowAndStringInTriple(CoinModelTriple &triple, int iRow, bool string)
 
CoinModelHash & operator=(const CoinModelHash &)
= 
 
void updateDeletedOne(CoinBigIndex position, const CoinModelTriple *triples)
Update column list for one element when one element deleted from row copy. 
 
bool onRow_
If on row chain. 
 
CoinBigIndex position_
Position in data. 
 
void deleteSame(int which, CoinModelTriple *triples, CoinModelHash2 &hash, bool zapTriples)
Deletes from list - same case i.e. 
 
void setPosition(CoinBigIndex position)
Set position. 
 
CoinBigIndex * previous_
Previous - maximumElements long. 
 
const CoinBigIndex * previous() const 
Previous array. 
 
int type_
0 row list, 1 column list 
 
void resize(CoinBigIndex maxItems, const CoinModelTriple *triples, bool forceReHash=false)
Resize hash (also re-hashs) 
 
void setOnRow(bool onRow)
Set onRow. 
 
const char * name(int which) const 
Returns name at position (or NULL) 
 
CoinBigIndex * last_
Last - maximumMajor+1 long (last free element chain) 
 
int hash(const char *name) const 
Returns index or -1. 
 
~CoinModelHash2()
Destructor. 
 
~CoinModelHash()
Destructor. 
 
void validateLinks(const CoinModelTriple *triples) const 
Checks that links are consistent. 
 
void setNumberItems(int number)
Set number of items. 
 
~CoinModelLinkedList()
Destructor. 
 
CoinModelLink()
Default constructor. 
 
void synchronize(CoinModelLinkedList &other)
Puts in free list from other list. 
 
void setRowInTriple(CoinModelTriple &triple, int iRow)
 
int hashValue(const char *name) const 
Returns a hash value. 
 
void setColumn(int column)
Set column. 
 
CoinBigIndex lastSlot_
Last slot looked at. 
 
void deleteHash(int index)
Deletes from hash. 
 
CoinBigIndex first(int which) const 
First on chain. 
 
int numberItems_
Number of items. 
 
CoinBigIndex maximumItems_
Maximum number of items. 
 
CoinYacc & operator=(const CoinYacc &rhs)
 
CoinBigIndex maximumElements_
Maximum number of elements. 
 
int numberMajor_
Number of major items i.e. rows if just row links. 
 
CoinBigIndex numberItems_
Number of items. 
 
CoinModelHashLink2 * hash_
hash 
 
CoinModelHash()
Default constructor. 
 
void addHard(int minorIndex, CoinBigIndex numberOfElements, const int *indices, const double *elements, CoinModelTriple *triples, CoinModelHash2 &hash)
Adds to list - hard case i.e. 
 
CoinModelHashLink * hash_
hash 
 
CoinModelHash2()
Default constructor. 
 
CoinBigIndex numberItems() const 
Number of items. 
 
int lastSlot_
Last slot looked at. 
 
CoinBigIndex * next_
Next - maximumElements long. 
 
void setValue(double value)
Set value. 
 
int maximumMajor() const 
Maximum number of major items i.e. rows if just row links. 
 
int column() const 
Get column. 
 
CoinModelHash2 & operator=(const CoinModelHash2 &)
= 
 
void create(int maxMajor, CoinBigIndex maxElements, int numberMajor, int numberMinor, int type, CoinBigIndex numberElements, const CoinModelTriple *triples)
Create list - for row list maxMajor is maximum rows. 
 
CoinBigIndex position() const 
Get position. 
 
void fill(int first, int last)
Fills first,last with -1. 
 
const char *const * names() const 
Names. 
 
CoinModelLink & operator=(const CoinModelLink &)
= 
 
void setRow(int row)
Set row. 
 
void deleteRowOne(CoinBigIndex position, CoinModelTriple *triples, CoinModelHash2 &hash)
Deletes one element from Row list. 
 
int rowInTriple(const CoinModelTriple &triple)
 
CoinBigIndex lastFree() const 
Last on free chain. 
 
void setName(int which, char *name)
Sets name at position (does not create) 
 
int maximumItems_
Maximum number of items. 
 
CoinBigIndex * first_
First - maximumMajor+1 long (last free element chain) 
 
bool onRow() const 
Get onRow. 
 
void setNumberItems(CoinBigIndex number)
Set number of items.