6 #ifndef CoinModelUseful_H 7 #define CoinModelUseful_H 51 inline int row()
const 116 {
return triple.
row&0x7fffffff;}
118 { triple.
row = iRow|(triple.
row&0x80000000);}
120 {
return (triple.
row&0x80000000)!=0;}
122 { triple.
row = (
string ? 0x80000000 : 0)|(triple.
row&0x7fffffff);}
124 int iRow,
bool string)
125 { triple.
row = (
string ? 0x80000000 : 0)|iRow;}
157 CoinYacc() : symtable(NULL), symbuf(NULL), length(0), unsetValue(0) {}
201 void resize(
int maxItems,
bool forceReHash=
false);
205 {
return numberItems_;}
207 void setNumberItems(
int number);
210 {
return maximumItems_;}
212 inline const char *
const *
names()
const 218 int hash(
const char * name)
const;
221 void addHash(
int index,
const char * name);
223 void deleteHash(
int index);
225 const char * name(
int which)
const;
227 char * getName(
int which)
const;
229 void setName(
int which,
char * name ) ;
231 void validateHash()
const;
234 int hashValue(
const char * name)
const;
274 void resize(
int maxItems,
const CoinModelTriple * triples,
bool forceReHash=
false);
278 {
return numberItems_;}
280 void setNumberItems(
int number);
283 {
return maximumItems_;}
291 void addHash(
int index,
int row,
int column,
const CoinModelTriple * triples);
293 void deleteHash(
int index,
int row,
int column);
296 int hashValue(
int row,
int column)
const;
335 void resize(
int maxMajor,
int maxElements);
339 void create(
int maxMajor,
int maxElements,
340 int numberMajor,
int numberMinor,
345 {
return numberMajor_;}
348 {
return maximumMajor_;}
351 {
return numberElements_;}
354 {
return maximumElements_;}
357 {
return first_[maximumMajor_];}
360 {
return last_[maximumMajor_];}
363 {
return first_[which];}
365 inline int last(
int which)
const 366 {
return last_[which];}
368 inline const int *
next()
const 380 int addEasy(
int majorIndex,
int numberOfElements,
const int * indices,
385 void addHard(
int minorIndex,
int numberOfElements,
const int * indices,
392 int firstFree,
int lastFree,
const int * nextOther);
411 void fill(
int first,
int last);
435 int maximumElements_;
CoinModelLink & operator=(const CoinModelLink &)
=
void setValue(double value)
Set value.
int rowInTriple(const CoinModelTriple &triple)
~CoinModelLink()
Destructor.
void setOnRow(bool onRow)
Set onRow.
void setRowAndStringInTriple(CoinModelTriple &triple, int iRow, bool string)
This is for various structures/classes needed by CoinModel.
const int * next() const
Next array.
int column() const
Get column.
double value() const
Get value.
int maximumItems() const
Maximum number of items.
bool onRow() const
Get onRow.
CoinModelLink()
Default constructor.
void setStringInTriple(CoinModelTriple &triple, bool string)
int lastFree() const
Last on free chain.
void setPosition(int position)
Set position.
void setColumn(int column)
Set column.
bool stringInTriple(const CoinModelTriple &triple)
void setElement(double value)
Set value.
int first(int which) const
First on chain.
int maximumElements() const
Maximum number of elements.
int maximumItems() const
Maximum number of items.
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.
int firstFree() const
First on free chain.
void setRow(int row)
Set row.
int numberMajor() const
Number of major items i.e. rows if just row links.
int numberElements() const
Number of elements.
int last(int which) const
Last on chain.
double element() const
Get value.
int position() const
Get position.
const int * previous() const
Previous array.
int numberItems() const
Number of items.
int maximumMajor() const
Maximum number of major items i.e. rows if just row links.