|
|||||
FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A single row of an LP model, i.e., a binding of an expression to a concrete LP model. Implements the LPSparseVector interface, i.e., can directly be used together with a Combean LP model. This object consists of - a constraint (i.e. the rhs of the row) - an expression (i.e. the lhs of the row) - a reference to an LP model (required to retrieve the columns in the LP when a concrete sparse LP vector is generated from the expression)
Field Summary | |
---|---|
GConstraint |
constr
|
Object |
env
|
GExpression |
expr
|
GLPModel |
lpModel
|
int |
numIter
|
Constructor Summary | |
GRow(GExpression expr, GConstraint constr)
Constructor (without setting an environment and an LP model yet). |
|
GRow(GExpression expr, GConstraint constr, GLPModel lpModel, Object env)
Constructor. |
Method Summary | |
---|---|
static GRow |
convert(Object rowDef, String name, GLPModel lpModel, Object env)
Convert a row definition to a row object. |
GConstraint |
getConstraint()
|
GExpression |
getExpr()
|
GLPModel |
getLPModel()
|
int |
getNumIterations()
lhs of the row. |
void |
initNumIter()
Helper function: calculate the number of non-zero entries in the sparse vector on the lhs of the row. |
VectorIterator |
iterator()
|
void |
setConstraint(GConstraint constr)
Set the rhs of the row. |
void |
setEnv(Object env)
Set the environment. |
void |
setLPModel(GLPModel lpModel)
|
String |
toString()
|
String |
toSummaryString()
|
Constructor Detail |
---|
public GRow(GExpression expr, GConstraint constr)
public GRow(GExpression expr, GConstraint constr, GLPModel lpModel, Object env)
Method Detail |
---|
public static GRow convert(Object rowDef, String name, GLPModel lpModel, Object env)
public GConstraint getConstraint()
public GExpression getExpr()
public GLPModel getLPModel()
public int getNumIterations()
void initNumIter()
public VectorIterator iterator()
void setConstraint(GConstraint constr)
public void setEnv(Object env)
public void setLPModel(GLPModel lpModel)
public String toString()
public String toSummaryString()