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

Package class diagram package AbstractLPConstraintSequence
java.lang.Object
  extended by net.sourceforge.combean.mathprog.lp.model.AbstractLPConstraintSequence
All Implemented Interfaces:
LPConstraintSequence
Direct Known Subclasses:
DoubleLPConstraintSequence, EdgesAsLPConstraintSequence, NodesAsLPConstraintSequence

public abstract class AbstractLPConstraintSequence
extends Object
implements LPConstraintSequence

An abstract base class for an LP constraint sequences. Takes care of the offset id and the offset and makes own implementations of LPConstraintSequence a bit simpler.


Field Summary
 
Fields inherited from interface net.sourceforge.combean.interfaces.mathprog.lp.model.LPConstraintSequence
OFFSET_UNDEFINED
 
Constructor Summary
AbstractLPConstraintSequence(String offsetId)
          constructor
 
Method Summary
 int getConstrOffset()
          Get the global index of the first element of the sequence.
 String getConstrOffsetId()
          Return the identifier for the offset in the global LP model.
 LPModelIndex getRowModelIndex(int localRow)
          Create a row model index for a given local index
 void setConstrOffset(int offset)
          Set the offset, i.e., the index of the first row resp. column of the sequence in the global model.
 void setConstrOffsetId(String offsetId)
          Set the identifier which defines the offset of the condition sequence in a global LP model.
 String 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
getLPConstraint, getNumConstrs
 

Constructor Detail

AbstractLPConstraintSequence

public AbstractLPConstraintSequence(String offsetId)
constructor

Method Detail

setConstrOffsetId

public void setConstrOffsetId(String offsetId)
Description copied from interface: LPConstraintSequence
Set the identifier which defines the offset of the condition sequence in a global LP model.

Specified by:
setConstrOffsetId in interface LPConstraintSequence
Parameters:
offsetId - the offset identifier.

getConstrOffsetId

public String getConstrOffsetId()
Description copied from interface: LPConstraintSequence
Return the identifier for the offset in the global LP model.

Specified by:
getConstrOffsetId in interface LPConstraintSequence
Returns:
the identifier for the offset in the global LP model.

setConstrOffset

public void setConstrOffset(int offset)
Description copied from interface: LPConstraintSequence
Set the offset, i.e., the index of the first row resp. column of the sequence in the global model.

Specified by:
setConstrOffset in interface LPConstraintSequence
Parameters:
offset - the global index of the first element of the sequence.

getConstrOffset

public int getConstrOffset()
Description copied from interface: LPConstraintSequence
Get the global index of the first element of the sequence.

Specified by:
getConstrOffset in interface LPConstraintSequence
Returns:
the global index of the first element of the sequence.

toString

public String toString()
Overrides:
toString in class Object

getRowModelIndex

public LPModelIndex getRowModelIndex(int localRow)
Create a row model index for a given local index

Parameters:
localRow - the local index.
Returns:
the corresponding row model index.