public class ProductConstraint extends Object implements LogisticConstraint
getValue(Sequence,int)
returns the product of the values for the positions defined in the constructor.Constructor and Description |
---|
ProductConstraint(int... pos)
This is the main constructor creating an instance from a given set of positions.
|
ProductConstraint(StringBuffer xml)
This is the constructor for
Storable . |
Modifier and Type | Method and Description |
---|---|
ProductConstraint |
clone() |
int[] |
getPositions()
Returns a clone of the internal positions.
|
double |
getValue(Sequence seq,
int start)
This method returns the value f(seq) used in
LogisticDiffSS |
String |
toString() |
StringBuffer |
toXML()
This method returns an XML representation as
StringBuffer of an
instance of the implementing class. |
public ProductConstraint(int... pos)
pos
- the positions to be used in getValue(Sequence, int)
public ProductConstraint(StringBuffer xml) throws NonParsableException
xml
- the XML representation as StringBuffer
NonParsableException
- if the XML representation could not be parsedpublic StringBuffer toXML()
Storable
StringBuffer
of an
instance of the implementing class.public ProductConstraint clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public double getValue(Sequence seq, int start)
LogisticConstraint
LogisticDiffSS
getValue
in interface LogisticConstraint
seq
- the sequencestart
- the start position within the sequencepublic int[] getPositions()