net.sourceforge.combean.graph.alg.lp
Class EdgesAsLPConstraintSequence

Package class diagram package EdgesAsLPConstraintSequence
java.lang.Object
  extended by net.sourceforge.combean.mathprog.lp.model.AbstractLPConstraintSequence
      extended by net.sourceforge.combean.graph.alg.lp.EdgesAsLPConstraintSequence
All Implemented Interfaces:
LPConstraintSequence

public class EdgesAsLPConstraintSequence
extends AbstractLPConstraintSequence
implements LPConstraintSequence

An LPConstraintSequence which contains one constraint per edge in a graph with numbered edges. All constraints have the same relation symbol.


Field Summary
 
Fields inherited from interface net.sourceforge.combean.interfaces.mathprog.lp.model.LPConstraintSequence
OFFSET_UNDEFINED
 
Constructor Summary
EdgesAsLPConstraintSequence(String offsetId, GlobalNumberedEdgesGraphProp numberedEdges)
          Constructor
 
Method Summary
 LPConstraint getLPConstraint(int localRow)
          Get the constraint for a given (local) row index.
 int getNumConstrs()
          Get the number of elements in the sequence.
 void setEdgeRhs(FixedDoubleEdgeMap edgeRhs)
           
 void setRelation(byte relation)
           
 
Methods inherited from class net.sourceforge.combean.mathprog.lp.model.AbstractLPConstraintSequence
getConstrOffset, getConstrOffsetId, getRowModelIndex, setConstrOffset, setConstrOffsetId, 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.LPConstraintSequence
getConstrOffset, getConstrOffsetId, setConstrOffset, setConstrOffsetId
 

Constructor Detail

EdgesAsLPConstraintSequence

public EdgesAsLPConstraintSequence(String offsetId,
                                   GlobalNumberedEdgesGraphProp numberedEdges)
Constructor

Parameters:
numberedEdges - the graph for which the edges shall be turned into LP variables.
Method Detail

getNumConstrs

public int getNumConstrs()
Description copied from interface: LPConstraintSequence
Get the number of elements in the sequence.

Specified by:
getNumConstrs in interface LPConstraintSequence
Returns:
the number of elements in the sequence.

getLPConstraint

public LPConstraint getLPConstraint(int localRow)
Description copied from interface: LPConstraintSequence
Get the constraint for a given (local) row index.

Specified by:
getLPConstraint in interface LPConstraintSequence
Parameters:
localRow - a local row index.
Returns:
the corresponding LP constraint.

setEdgeRhs

public final void setEdgeRhs(FixedDoubleEdgeMap edgeRhs)
Parameters:
edgeRhs - The edgeRhs to set.

setRelation

public final void setRelation(byte relation)
Parameters:
relation - The relation to set.