net.sourceforge.combean.mathprog.grooml
Class GRows

A set of rows in an LP with a common name and different indices. This object consists of - a set of (symbolic) index values of the rows in the set - a closure which generates the individual rows; the closure is called with the symbolic index of the row and shall return a list of arguments which will be given to the convert method of GRow. - the environment in which the index variables shall be bound This class is responsible for mapping between the simple indices of the variables in the LPConstraintSequence and the symbolic indices in the GLPModel.

Field Summary
 Object env
           
 Closure generateRow
           
 GIndexBinding idxBinding
           
 GLPModel lpModel
           
 
Constructor Summary
GRows(String name, Object bindDef, GLPModel lpModel, Object env, Closure generateRow)
            Constructor "name[
 
Method Summary
Iterator getColumnOffsetIds()
          
LPConstraint getLPConstraint(int localRow)
          
String getName()
          
int getNumColumns()
          
int getNumConstrs()
          
int getNumRows()
          
VectorOrientation getOrientation()
          
GRow getRow(int localRow)
           Return the row for a given local index
Iterator getRowOffsetIds()
          
LPSparseVector getRowVector(int localRow)
          
void setName(String name)
          
String toString()
          
String toSummaryString()
          
 

Constructor Detail

GRows

public GRows(String name, Object bindDef, GLPModel lpModel, Object env, Closure generateRow)
Constructor
params:
name the name of the rows. the individual rows will get the name
"name[
params:
bindDef the definition of the binding of the index values of
the rows (given object must be convertable to an index binding)
params:
lpModel the LP model in which the rows shall live (for mapping
local indices to global columns indices in the LP)
params:
env the environment where the index variables shall be bound
params:
generateRow a closure which returns a row definition (i.e. an
object which is convertable to a row)


Method Detail

getColumnOffsetIds

Iterator getColumnOffsetIds()


getLPConstraint

LPConstraint getLPConstraint(int localRow)


getName

String getName()


getNumColumns

int getNumColumns()


getNumConstrs

int getNumConstrs()


getNumRows

int getNumRows()


getOrientation

VectorOrientation getOrientation()


getRow

GRow getRow(int localRow)
Return the row for a given local index
params:
localRow the local index (in the range [0..number of rows-1]
returns:
the corresponding LP row


getRowOffsetIds

Iterator getRowOffsetIds()


getRowVector

LPSparseVector getRowVector(int localRow)


setName

void setName(String name)


toString

String toString()


toSummaryString

String toSummaryString()