Package org.xcsp.parser.entries
Class XObjectives.OObjectiveSpecial
- java.lang.Object
-
- org.xcsp.parser.entries.ParsingEntry
-
- org.xcsp.parser.entries.ParsingEntry.OEntry
-
- org.xcsp.parser.entries.XObjectives.XObj
-
- org.xcsp.parser.entries.XObjectives.OObjectiveSpecial
-
- Enclosing class:
- XObjectives
public static final class XObjectives.OObjectiveSpecial extends XObjectives.XObj
The class for representing objectives defined from a list of variables, and possibly a list of coefficients.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.xcsp.parser.entries.ParsingEntry
ParsingEntry.CEntry, ParsingEntry.OEntry, ParsingEntry.VEntry
-
-
Field Summary
Fields Modifier and Type Field Description Values.SimpleValue[]
coeffs
The list of coefficients.Object[]
terms
The list of variables or trees of the objective.-
Fields inherited from class org.xcsp.parser.entries.ParsingEntry.OEntry
minimize, type
-
Fields inherited from class org.xcsp.parser.entries.ParsingEntry
attributes, classes, flags, id, note
-
-
Constructor Summary
Constructors Constructor Description OObjectiveSpecial(boolean minimize, Types.TypeObjective type, Object[] terms, Values.SimpleValue[] coeffs)
Builds an objective from the specified arrays of variables and coefficients.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toString()
XVariables.XVar[]
vars()
-
Methods inherited from class org.xcsp.parser.entries.ParsingEntry.OEntry
getType
-
Methods inherited from class org.xcsp.parser.entries.ParsingEntry
copyAttributesOf, getAttributeValue, getAttributeValue, getAttributeValue
-
-
-
-
Field Detail
-
terms
public final Object[] terms
The list of variables or trees of the objective.
-
coeffs
public final Values.SimpleValue[] coeffs
The list of coefficients. Either this field is null, or there are as many coefficients as variables.
-
-
Constructor Detail
-
OObjectiveSpecial
public OObjectiveSpecial(boolean minimize, Types.TypeObjective type, Object[] terms, Values.SimpleValue[] coeffs)
Builds an objective from the specified arrays of variables and coefficients.
-
-
Method Detail
-
vars
public XVariables.XVar[] vars()
- Specified by:
vars
in classParsingEntry.OEntry
-
toString
public String toString()
- Overrides:
toString
in classParsingEntry.OEntry
-
-