Class AbstractFluentDescription

java.lang.Object
fr.uga.pddl4j.problem.operator.AbstractFluentDescription
All Implemented Interfaces:
FluentDescription, Serializable
Direct Known Subclasses:
Condition, Effect, InitialState

public abstract class AbstractFluentDescription extends Object implements FluentDescription
This class implements a common methods to manipulate a fluent description.
Since:
4.0
See Also:
BitVector, Serialized Form
  • Constructor Details

    • AbstractFluentDescription

      public AbstractFluentDescription()
      Creates a new fluent description. By default the fluent description has no positive and no negative fluents.
    • AbstractFluentDescription

      public AbstractFluentDescription(FluentDescription other)
      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

      public AbstractFluentDescription(BitVector positive, BitVector negative)
      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

      public final BitVector getPositiveFluents()
      Returns the positive fluents of the fluent description.
      Specified by:
      getPositiveFluents in interface FluentDescription
      Returns:
      the positive fluents of the goal description.
    • getNegativeFluents

      public final BitVector getNegativeFluents()
      Returns the positive fluents of the fluent description.
      Specified by:
      getNegativeFluents in interface FluentDescription
      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:
      isEmpty in interface FluentDescription
      Returns:
      true if the fluent description is empty; false otherwise.
    • 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:
      cardinality in interface FluentDescription
      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:
      isConsistent in interface FluentDescription
      Returns:
      true if this abstract fluent description is consistent false otherwise.