Skip to content

Commit

Permalink
new definition of functions data structure to handle full support to …
Browse files Browse the repository at this point in the history
…numeric fluents
  • Loading branch information
francescofuggitti committed Oct 12, 2023
1 parent 8515202 commit ee87a47
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 140 deletions.
17 changes: 0 additions & 17 deletions pddl/logic/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,6 @@ def __rshift__(self, other: "Formula") -> "Formula":
return Or(Not(self), other)


@cache_hash
class Number:
"""Base class for all the numbers."""

def __init__(self, value: float) -> None:
"""Init the number object."""
self._value = value

def __hash__(self) -> int:
"""Compute the hash of the object."""
return hash(self._value)

def __str__(self) -> str:
"""Get the string representation."""
return str(self._value)


class BinaryOp(Formula):
"""Binary operator."""

Expand Down
Loading

0 comments on commit ee87a47

Please sign in to comment.