Package fr.uga.pddl4j.problem.operator
Class AbstractFluentDescription
java.lang.Object
fr.uga.pddl4j.problem.operator.AbstractFluentDescription
- All Implemented Interfaces:
FluentDescription,Serializable
- Direct Known Subclasses:
Condition,Effect,InitialState
This class implements a common methods to manipulate a fluent description.
- Since:
- 4.0
- See Also:
BitVector, Serialized Form
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new fluent description.Creates a new fluent description from an other one.AbstractFluentDescription(BitVector positive, BitVector negative)Creates a new fluent description from a specified positive and negative timed fluent description. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the cardinality of the fluent description, i.e., the number of fluents defined the positive and negative timed fluent description.Returns the positive fluents of the fluent description.Returns the positive fluents of the fluent description.booleanReturns if this abstract fluent description is consistent.booleanisEmpty()Returns if fluent description is empty, i.e., if the fluent description has no positive and no negative fluent.
-
Constructor Details
-
AbstractFluentDescription
public AbstractFluentDescription()Creates a new fluent description. By default the fluent description has no positive and no negative fluents. -
AbstractFluentDescription
Creates a new fluent description from an other one. This constructor create a deep copy of the object in parameter.- Parameters:
other- the other one.
-
AbstractFluentDescription
Creates a new fluent description from a specified positive and negative timed fluent description.- Parameters:
positive- the positive bit vector of fluent description.negative- the positive bit vector of fluent description.
-
-
Method Details
-
getPositiveFluents
Returns the positive fluents of the fluent description.- Specified by:
getPositiveFluentsin interfaceFluentDescription- Returns:
- the positive fluents of the goal description.
-
getNegativeFluents
Returns the positive fluents of the fluent description.- Specified by:
getNegativeFluentsin interfaceFluentDescription- Returns:
- the negative fluents of the goal description.
-
isEmpty
public boolean isEmpty()Returns if fluent description is empty, i.e., if the fluent description has no positive and no negative fluent. Such a goal description is always true.- Specified by:
isEmptyin interfaceFluentDescription- Returns:
trueif the fluent description is empty;falseotherwise.
-
cardinality
public final int cardinality()Returns the cardinality of the fluent description, i.e., the number of fluents defined the positive and negative timed fluent description.- Specified by:
cardinalityin interfaceFluentDescription- Returns:
- the cardinality of the goal description.
-
isConsistent
public final boolean isConsistent()Returns if this abstract fluent description is consistent. A fluent description is consistent a fluent is at the same postive and negative.- Specified by:
isConsistentin interfaceFluentDescription- Returns:
trueif this abstract fluent description is consistentfalseotherwise.
-