|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.combean.graph.alg.lp.GraphAsLPModelColumns
public class GraphAsLPModelColumns
Converts a graph into an LP model based on the incidence matrix, i.e., the rows correspond to the nodes and the columns correspond to the edges. The entry (v,e) is set to -1 if edge e is an outgoing edge of v, set to 1 if edge e is an incoming edge of v and zero otherwise. The orientation of the resulting LP component is columnwise.
Field Summary | |
---|---|
protected String |
nodeRowsOffsetId
|
Constructor Summary | |
---|---|
GraphAsLPModelColumns(String edgeColumnsOffsetId,
String nodeRowOffsetId,
Graph g)
Constructor. |
Method Summary | |
---|---|
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)
|
String |
getNodeRowsOffsetId()
|
int |
getNumColumns()
Return the number of columns of the model component. |
int |
getNumRows()
Return the number of rows of the model component. |
VectorOrientation |
getOrientation()
Get the orientation how the component shall be inserted into the global model (either row-by-row or column-by-column). |
LPModelIndex |
getRowModelIndex(int localRow)
|
Iterator |
getRowOffsetIds()
Get an iterator through all row offset ids used by the component. |
void |
setEdgeColumnsOffsetId(String edgeColumnsOffsetId)
|
void |
setNodeRowsOffsetId(String nodeRowsOffsetId)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String nodeRowsOffsetId
Constructor Detail |
---|
public GraphAsLPModelColumns(String edgeColumnsOffsetId, String nodeRowOffsetId, Graph g)
g
- The graph to be represented by the LP model.Method Detail |
---|
public LPSparseVector getColumnVector(int localColumn)
getColumnVector
in interface LPModelColumns
public int getNumColumns()
AbstractMatrix
getNumColumns
in interface AbstractMatrix
public int getNumRows()
AbstractMatrix
getNumRows
in interface AbstractMatrix
public LPModelIndex getRowModelIndex(int localRow)
public LPModelIndex getColumnModelIndex(int localColumn)
LPModelColumns
getColumnModelIndex
in interface LPModelColumns
localColumn
- the local column.
public VectorOrientation getOrientation()
LPModelComponent
getOrientation
in interface LPModelComponent
public Iterator getColumnOffsetIds()
LPModelComponent
getColumnOffsetIds
in interface LPModelComponent
public Iterator getRowOffsetIds()
LPModelComponent
getRowOffsetIds
in interface LPModelComponent
public final void setEdgeColumnsOffsetId(String edgeColumnsOffsetId)
edgeColumnsOffsetId
- The edgeColumnsOffsetId to set.public String getNodeRowsOffsetId()
public final void setNodeRowsOffsetId(String nodeRowsOffsetId)
nodeRowsOffsetId
- The nodeRowsOffsetId to set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |