# CoinModelLinkedList Class Reference

`#include <CoinModelUseful.hpp>`

Collaboration diagram for CoinModelLinkedList:
[legend]

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 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:

- /home/coin/svn-release/CoinUtils-2.9.4/CoinUtils/src/CoinModelUseful.hpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines