Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
CoinModelLinkedList Class Reference

#include <CoinModelUseful.hpp>

Public Member Functions

Constructors, destructor
 CoinModelLinkedList ()
 Default constructor. More...
 
 ~CoinModelLinkedList ()
 Destructor. More...
 
Copy method
 CoinModelLinkedList (const CoinModelLinkedList &)
 The copy constructor. More...
 
CoinModelLinkedListoperator= (const CoinModelLinkedList &)
 = More...
 
sizing (just increases)
void resize (int maxMajor, int maxElements)
 Resize list - for row list maxMajor is maximum rows. More...
 
void create (int maxMajor, int maxElements, int numberMajor, int numberMinor, int type, int numberElements, const CoinModelTriple *triples)
 Create list - for row list maxMajor is maximum rows. More...
 
int numberMajor () const
 Number of major items i.e. rows if just row links. More...
 
int maximumMajor () const
 Maximum number of major items i.e. rows if just row links. More...
 
int numberElements () const
 Number of elements. More...
 
int maximumElements () const
 Maximum number of elements. More...
 
int firstFree () const
 First on free chain. More...
 
int lastFree () const
 Last on free chain. More...
 
int first (int which) const
 First on chain. More...
 
int last (int which) const
 Last on chain. More...
 
const int * next () const
 Next array. More...
 
const int * previous () const
 Previous array. More...
 
does work
int addEasy (int majorIndex, int numberOfElements, const int *indices, const double *elements, CoinModelTriple *triples, CoinModelHash2 &hash)
 Adds to list - easy case i.e. More...
 
void addHard (int minorIndex, int numberOfElements, const int *indices, const double *elements, CoinModelTriple *triples, CoinModelHash2 &hash)
 Adds to list - hard case i.e. More...
 
void addHard (int first, const CoinModelTriple *triples, int firstFree, int lastFree, const int *nextOther)
 Adds to list - hard case i.e. More...
 
void deleteSame (int which, CoinModelTriple *triples, CoinModelHash2 &hash, bool zapTriples)
 Deletes from list - same case i.e. More...
 
void updateDeleted (int which, CoinModelTriple *triples, CoinModelLinkedList &otherList)
 Deletes from list - other case i.e. More...
 
void deleteRowOne (int position, CoinModelTriple *triples, CoinModelHash2 &hash)
 Deletes one element from Row list. More...
 
void updateDeletedOne (int position, const CoinModelTriple *triples)
 Update column list for one element when one element deleted from row copy. More...
 
void fill (int first, int last)
 Fills first,last with -1. More...
 
void synchronize (CoinModelLinkedList &other)
 Puts in free list from other list. More...
 
void validateLinks (const CoinModelTriple *triples) const
 Checks that links are consistent. More...
 

Private Attributes

Data members
int * previous_
 Previous - maximumElements long. More...
 
int * next_
 Next - maximumElements long. More...
 
int * first_
 First - maximumMajor+1 long (last free element chain) More...
 
int * last_
 Last - maximumMajor+1 long (last free element chain) More...
 
int numberMajor_
 Number of major items i.e. rows if just row links. More...
 
int maximumMajor_
 Maximum number of major items i.e. rows if just row links. More...
 
int numberElements_
 Number of elements. More...
 
int maximumElements_
 Maximum number of elements. More...
 
int type_
 0 row list, 1 column list More...
 

Detailed Description

Definition at line 312 of file CoinModelUseful.hpp.

Constructor & Destructor Documentation

CoinModelLinkedList::CoinModelLinkedList ( )

Default constructor.

CoinModelLinkedList::~CoinModelLinkedList ( )

Destructor.

CoinModelLinkedList::CoinModelLinkedList ( const CoinModelLinkedList )

The copy constructor.

Member Function Documentation

CoinModelLinkedList& CoinModelLinkedList::operator= ( const CoinModelLinkedList )

=

void CoinModelLinkedList::resize ( int  maxMajor,
int  maxElements 
)

Resize list - for row list maxMajor is maximum rows.

void CoinModelLinkedList::create ( int  maxMajor,
int  maxElements,
int  numberMajor,
int  numberMinor,
int  type,
int  numberElements,
const CoinModelTriple triples 
)

Create list - for row list maxMajor is maximum rows.

type 0 row list, 1 column list

int CoinModelLinkedList::numberMajor ( ) const
inline

Number of major items i.e. rows if just row links.

Definition at line 344 of file CoinModelUseful.hpp.

int CoinModelLinkedList::maximumMajor ( ) const
inline

Maximum number of major items i.e. rows if just row links.

Definition at line 347 of file CoinModelUseful.hpp.

int CoinModelLinkedList::numberElements ( ) const
inline

Number of elements.

Definition at line 350 of file CoinModelUseful.hpp.

int CoinModelLinkedList::maximumElements ( ) const
inline

Maximum number of elements.

Definition at line 353 of file CoinModelUseful.hpp.

int CoinModelLinkedList::firstFree ( ) const
inline

First on free chain.

Definition at line 356 of file CoinModelUseful.hpp.

int CoinModelLinkedList::lastFree ( ) const
inline

Last on free chain.

Definition at line 359 of file CoinModelUseful.hpp.

int CoinModelLinkedList::first ( int  which) const
inline

First on chain.

Definition at line 362 of file CoinModelUseful.hpp.

int CoinModelLinkedList::last ( int  which) const
inline

Last on chain.

Definition at line 365 of file CoinModelUseful.hpp.

const int* CoinModelLinkedList::next ( ) const
inline

Next array.

Definition at line 368 of file CoinModelUseful.hpp.

const int* CoinModelLinkedList::previous ( ) const
inline

Previous array.

Definition at line 371 of file CoinModelUseful.hpp.

int CoinModelLinkedList::addEasy ( int  majorIndex,
int  numberOfElements,
const int *  indices,
const double *  elements,
CoinModelTriple triples,
CoinModelHash2 hash 
)

Adds to list - easy case i.e.

add row to row list Returns where chain starts

void CoinModelLinkedList::addHard ( int  minorIndex,
int  numberOfElements,
const int *  indices,
const double *  elements,
CoinModelTriple triples,
CoinModelHash2 hash 
)

Adds to list - hard case i.e.

add row to column list

void CoinModelLinkedList::addHard ( int  first,
const CoinModelTriple triples,
int  firstFree,
int  lastFree,
const int *  nextOther 
)

Adds to list - hard case i.e.

add row to column list This is when elements have been added to other copy

void CoinModelLinkedList::deleteSame ( int  which,
CoinModelTriple triples,
CoinModelHash2 hash,
bool  zapTriples 
)

Deletes from list - same case i.e.

delete row from row list

void CoinModelLinkedList::updateDeleted ( int  which,
CoinModelTriple triples,
CoinModelLinkedList otherList 
)

Deletes from list - other case i.e.

delete row from column list This is when elements have been deleted from other copy

void CoinModelLinkedList::deleteRowOne ( int  position,
CoinModelTriple triples,
CoinModelHash2 hash 
)

Deletes one element from Row list.

void CoinModelLinkedList::updateDeletedOne ( int  position,
const CoinModelTriple triples 
)

Update column list for one element when one element deleted from row copy.

void CoinModelLinkedList::fill ( int  first,
int  last 
)

Fills first,last with -1.

void CoinModelLinkedList::synchronize ( CoinModelLinkedList other)

Puts in free list from other list.

void CoinModelLinkedList::validateLinks ( const CoinModelTriple triples) const

Checks that links are consistent.

Member Data Documentation

int* CoinModelLinkedList::previous_
private

Previous - maximumElements long.

Definition at line 421 of file CoinModelUseful.hpp.

int* CoinModelLinkedList::next_
private

Next - maximumElements long.

Definition at line 423 of file CoinModelUseful.hpp.

int* CoinModelLinkedList::first_
private

First - maximumMajor+1 long (last free element chain)

Definition at line 425 of file CoinModelUseful.hpp.

int* CoinModelLinkedList::last_
private

Last - maximumMajor+1 long (last free element chain)

Definition at line 427 of file CoinModelUseful.hpp.

int CoinModelLinkedList::numberMajor_
private

Number of major items i.e. rows if just row links.

Definition at line 429 of file CoinModelUseful.hpp.

int CoinModelLinkedList::maximumMajor_
private

Maximum number of major items i.e. rows if just row links.

Definition at line 431 of file CoinModelUseful.hpp.

int CoinModelLinkedList::numberElements_
private

Number of elements.

Definition at line 433 of file CoinModelUseful.hpp.

int CoinModelLinkedList::maximumElements_
private

Maximum number of elements.

Definition at line 435 of file CoinModelUseful.hpp.

int CoinModelLinkedList::type_
private

0 row list, 1 column list

Definition at line 437 of file CoinModelUseful.hpp.


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