net.sourceforge.combean.mathprog.lp.model
Class ConcatenatedLPModelRows

Package class diagram package ConcatenatedLPModelRows
java.lang.Object
  extended by net.sourceforge.combean.mathprog.lp.model.AbstractLPModelComponent
      extended by net.sourceforge.combean.mathprog.lp.model.ConcatenatedLPModelRows
All Implemented Interfaces:
AbstractMatrix, LPModelComponent, LPModelRows

public class ConcatenatedLPModelRows
extends AbstractLPModelComponent
implements LPModelRows

A rowwise LP model component which consists of a set of rowwise LP model components which are joined rowwise. This means that the first row of the first subcomponent is concatenated with the first row of the second subcomponent etc. to make up the first row of the joint component). The concatenated components must have distinct row offset ids. These will be retained by the composite object. The row offset ids are taken from the component with the highest number of rows and the mapping to the model index for a given local id must be indentical for all internal components.


Constructor Summary
ConcatenatedLPModelRows()
          Constructor.
 
Method Summary
 void concatenateRows(LPModelRows newComponent)
          Concatenate further rows to the component.
 Iterator getColumnOffsetIds()
          Get an iterator through all column offset ids used by the component.
 int getNumColumns()
          Return the number of columns of the model component.
 int getNumRows()
          Return the number of rows of the model component.
 LPModelIndex getRowModelIndex(int localRow)
          Convert a local index into a model index.
 Iterator getRowOffsetIds()
          Get an iterator through all row offset ids used by the component.
 LPSparseVector getRowVector(int localRow)
           
 
Methods inherited from class net.sourceforge.combean.mathprog.lp.model.AbstractLPModelComponent
getOrientation, setOrientation, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sourceforge.combean.interfaces.mathprog.lp.model.LPModelComponent
getOrientation
 

Constructor Detail

ConcatenatedLPModelRows

public ConcatenatedLPModelRows()
Constructor. The component will be empty after construction.

Method Detail

getRowModelIndex

public LPModelIndex getRowModelIndex(int localRow)
Description copied from interface: LPModelRows
Convert a local index into a model index.

Specified by:
getRowModelIndex in interface LPModelRows
Parameters:
localRow - the local row.
Returns:
the correponding model index.

getRowOffsetIds

public Iterator getRowOffsetIds()
Description copied from interface: LPModelComponent
Get an iterator through all row offset ids used by the component.

Specified by:
getRowOffsetIds in interface LPModelComponent
Returns:
an iterator through all row offset ids used by the component.

getColumnOffsetIds

public Iterator getColumnOffsetIds()
Description copied from interface: LPModelComponent
Get an iterator through all column offset ids used by the component.

Specified by:
getColumnOffsetIds in interface LPModelComponent
Returns:
an iterator through all column offset ids used by the component.

getRowVector

public LPSparseVector getRowVector(int localRow)
Specified by:
getRowVector in interface LPModelRows

getNumRows

public int getNumRows()
Description copied from interface: AbstractMatrix
Return the number of rows of the model component.

Specified by:
getNumRows in interface AbstractMatrix
Returns:
the number of rows.

getNumColumns

public int getNumColumns()
Description copied from interface: AbstractMatrix
Return the number of columns of the model component.

Specified by:
getNumColumns in interface AbstractMatrix
Returns:
the number of columns.

concatenateRows

public void concatenateRows(LPModelRows newComponent)
Concatenate further rows to the component.

Parameters:
newComponent - new rowwise component to be concatenated.