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);
249 void setNumberItems(
int number);
253 return maximumItems_;
256 inline const char *
const *
names()
const 264 int hash(
const char *name)
const;
267 void addHash(
int index,
const char *name);
269 void deleteHash(
int index);
271 const char *name(
int which)
const;
273 char *getName(
int which)
const;
275 void setName(
int which,
char *name);
277 void validateHash()
const;
281 int hashValue(
const char *name)
const;
334 return maximumItems_;
345 void deleteHash(
CoinBigIndex index,
int row,
int column);
394 int numberMajor,
int numberMinor,
405 return maximumMajor_;
410 return numberElements_;
415 return maximumElements_;
420 return first_[maximumMajor_];
425 return last_[maximumMajor_];
430 return first_[which];
459 void addHard(
int minorIndex,
CoinBigIndex numberOfElements,
const int *indices,
485 void fill(
int first,
int last);
CoinModelLink & operator=(const CoinModelLink &)
=
void setValue(double value)
Set value.
int numberMajor_
Number of major items i.e. rows if just row links.
CoinBigIndex last(int which) const
Last on chain.
CoinBigIndex maximumItems_
Maximum number of items.
CoinBigIndex position() const
Get position.
double value_
Value as double.
int rowInTriple(const CoinModelTriple &triple)
int maximumMajor_
Maximum number of major items i.e. rows if just row links.
~CoinModelLink()
Destructor.
CoinBigIndex first(int which) const
First on chain.
void setOnRow(bool onRow)
Set onRow.
void setRowAndStringInTriple(CoinModelTriple &triple, int iRow, bool string)
This is for various structures/classes needed by CoinModel.
CoinBigIndex * last_
Last - maximumMajor+1 long (last free element chain)
int column() const
Get column.
CoinBigIndex * next_
Next - maximumElements long.
CoinBigIndex maximumItems() const
Maximum number of items.
CoinBigIndex lastSlot_
Last slot looked at.
double value() const
Get value.
int maximumItems() const
Maximum number of items.
CoinBigIndex numberElements_
Number of elements.
bool onRow() const
Get onRow.
CoinBigIndex numberElements() const
Number of elements.
int type_
0 row list, 1 column list
void setPosition(CoinBigIndex position)
Set position.
CoinModelHashLink * hash_
hash
CoinModelLink()
Default constructor.
void setStringInTriple(CoinModelTriple &triple, bool string)
bool onRow_
If on row chain.
CoinBigIndex * first_
First - maximumMajor+1 long (last free element chain)
CoinBigIndex maximumElements() const
Maximum number of elements.
int numberItems_
Number of items.
CoinBigIndex lastFree() const
Last on free chain.
void setColumn(int column)
Set column.
bool stringInTriple(const CoinModelTriple &triple)
void setElement(double value)
Set value.
int lastSlot_
Last slot looked at.
int maximumItems_
Maximum number of items.
CoinBigIndex position_
Position in data.
CoinBigIndex maximumElements_
Maximum number of elements.
int numberItems() const
Number of items i.e. rows if just row names.
void setRowInTriple(CoinModelTriple &triple, int iRow)
const char *const * names() const
Names.
void setRow(int row)
Set row.
int numberMajor() const
Number of major items i.e. rows if just row links.
const CoinBigIndex * next() const
Next array.
CoinBigIndex firstFree() const
First on free chain.
double element() const
Get value.
CoinBigIndex numberItems() const
Number of items.
int maximumMajor() const
Maximum number of major items i.e. rows if just row links.
CoinBigIndex numberItems_
Number of items.
const CoinBigIndex * previous() const
Previous array.