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

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

public class ConcatenatedLPModelColumns
extends AbstractLPModelComponent
implements LPModelColumns

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


Constructor Summary
ConcatenatedLPModelColumns()
          Constructor.
 
Method Summary
 void concatenateColumns(LPModelColumns newComponent)
          Concatenate further columns to the component.
 LPModelIndex getColumnModelIndex(int localColumn)
          Convert a local index into a model index.
 Iterator getColumnOffsetIds()
          Get an iterator through all column offset ids used by the component.
 LPSparseVector getColumnVector(int localColumn)
           
 int getNumColumns()
          Return the number of columns of the model component.
 int getNumRows()
          Return the number of rows of the model component.
 Iterator getRowOffsetIds()
          Get an iterator through all row offset ids used by the component.
 
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

ConcatenatedLPModelColumns

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

Method Detail

getColumnModelIndex

public LPModelIndex getColumnModelIndex(int localColumn)
Description copied from interface: LPModelColumns
Convert a local index into a model index.

Specified by:
getColumnModelIndex in interface LPModelColumns
Parameters:
localColumn - the local column.
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.

getColumnVector

public LPSparseVector getColumnVector(int localColumn)
Specified by:
getColumnVector in interface LPModelColumns

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.

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.

concatenateColumns

public void concatenateColumns(LPModelColumns newComponent)
Concatenate further columns to the component.

Parameters:
newComponent - new columnwise component to be concatenated.