- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# CoinModelLinkedList Class Reference

`#include <CoinModelUseful.hpp>`

List of all members.

## Public Member Functions
Constructors, destructor
| CoinModelLinkedList ()
| Default constructor.
| ~CoinModelLinkedList ()
| Destructor.
Copy method
| CoinModelLinkedList (const CoinModelLinkedList &)
| The copy constructor.
CoinModelLinkedList & | operator= (const CoinModelLinkedList &)
| =
sizing (just increases)
void | resize (int maxMajor, int maxElements)
| Resize list - for row list maxMajor is maximum rows.
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.
int | numberMajor () const
| Number of major items i.e. rows if just row links.
int | maximumMajor () const
| Maximum number of major items i.e. rows if just row links.
int | numberElements () const
| Number of elements.
int | maximumElements () const
| Maximum number of elements.
int | firstFree () const
| First on free chain.
int | lastFree () const
| Last on free chain.
int | first (int which) const
| First on chain.
int | last (int which) const
| Last on chain.
const int * | next () const
| Next array.
const int * | previous () const
| Previous array.
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.
void | addHard (int minorIndex, int numberOfElements, const int *indices, const double *elements, CoinModelTriple *triples, CoinModelHash2 &hash)
| Adds to list - hard case i.e.
void | addHard (int first, const CoinModelTriple *triples, int firstFree, int lastFree, const int *nextOther)
| Adds to list - hard case i.e.
void | deleteSame (int which, CoinModelTriple *triples, CoinModelHash2 &hash, bool zapTriples)
| Deletes from list - same case i.e.
void | updateDeleted (int which, CoinModelTriple *triples, CoinModelLinkedList &otherList)
| Deletes from list - other case i.e.
void | deleteRowOne (int position, CoinModelTriple *triples, CoinModelHash2 &hash)
| Deletes one element from Row list.
void | updateDeletedOne (int position, const CoinModelTriple *triples)
| Update column list for one element when one element deleted from row copy.
void | fill (int first, int last)
| Fills first,last with -1.
void | synchronize (CoinModelLinkedList &other)
| Puts in free list from other list.
void | validateLinks (const CoinModelTriple *triples) const
| Checks that links are consistent.
## Private Attributes
Data members
int * | previous_
| Previous - maximumElements long.
int * | next_
| Next - maximumElements long.
int * | first_
| First - maximumMajor+1 long (last free element chain).
int * | last_
| Last - maximumMajor+1 long (last free element chain).
int | numberMajor_
| Number of major items i.e. rows if just row links.
int | maximumMajor_
| Maximum number of major items i.e. rows if just row links.
int | numberElements_
| Number of elements.
int | maximumElements_
| Maximum number of elements.
int | type_
| 0 row list, 1 column list

## Detailed Description

Definition at line 275 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 307 of file CoinModelUseful.hpp.

References numberMajor_.

int CoinModelLinkedList::maximumMajor | ( |  | ) | const`[inline]`

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

Definition at line 310 of file CoinModelUseful.hpp.

References maximumMajor_.

int CoinModelLinkedList::numberElements | ( |  | ) | const`[inline]`

Number of elements.

Definition at line 313 of file CoinModelUseful.hpp.

References numberElements_.

int CoinModelLinkedList::maximumElements | ( |  | ) | const`[inline]`

Maximum number of elements.

Definition at line 316 of file CoinModelUseful.hpp.

References maximumElements_.

int CoinModelLinkedList::firstFree | ( |  | ) | const`[inline]`

First on free chain.

Definition at line 319 of file CoinModelUseful.hpp.

References first_, and maximumMajor_.

int CoinModelLinkedList::lastFree | ( |  | ) | const`[inline]`

Last on free chain.

Definition at line 322 of file CoinModelUseful.hpp.

References last_, and maximumMajor_.

int CoinModelLinkedList::first | ( | int | which | ) | const`[inline]`

First on chain.

Definition at line 325 of file CoinModelUseful.hpp.

References first_.

int CoinModelLinkedList::last | ( | int | which | ) | const`[inline]`

Last on chain.

Definition at line 328 of file CoinModelUseful.hpp.

References last_.

const int* CoinModelLinkedList::next | ( |  | ) | const`[inline]`

Next array.

Definition at line 331 of file CoinModelUseful.hpp.

References next_.

const int* CoinModelLinkedList::previous | ( |  | ) | const`[inline]`

Previous array.

Definition at line 334 of file CoinModelUseful.hpp.

References previous_.

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 384 of file CoinModelUseful.hpp.

Referenced by previous().

int* CoinModelLinkedList::next_`[private]`

Next - maximumElements long.

Definition at line 386 of file CoinModelUseful.hpp.

Referenced by next().

int* CoinModelLinkedList::first_`[private]`

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

Definition at line 388 of file CoinModelUseful.hpp.

Referenced by first(), and firstFree().

int* CoinModelLinkedList::last_`[private]`

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

Definition at line 390 of file CoinModelUseful.hpp.

Referenced by last(), and lastFree().

int CoinModelLinkedList::numberMajor_`[private]`

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

Definition at line 392 of file CoinModelUseful.hpp.

Referenced by numberMajor().

int CoinModelLinkedList::maximumMajor_`[private]`

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

Definition at line 394 of file CoinModelUseful.hpp.

Referenced by firstFree(), lastFree(), and maximumMajor().

int CoinModelLinkedList::numberElements_`[private]`

Number of elements.

Definition at line 396 of file CoinModelUseful.hpp.

Referenced by numberElements().

int CoinModelLinkedList::maximumElements_`[private]`

Maximum number of elements.

Definition at line 398 of file CoinModelUseful.hpp.

Referenced by maximumElements().

int CoinModelLinkedList::type_`[private]`

0 row list, 1 column list

Definition at line 400 of file CoinModelUseful.hpp.

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

- /home/coin/SVN-release/Osi-0.98.1/CoinUtils/src/CoinModelUseful.hpp