|
knowrob
2.1.0
A Knowledge Base System for Cognition-enabled Robots
|
#include <Predicate.h>


Public Member Functions | |
| Predicate (std::string_view functor, const std::vector< TermPtr > &arguments={}) | |
| Predicate (AtomPtr functor, const std::vector< TermPtr > &arguments={}) | |
| auto & | functor () const |
| auto | arity () const |
| const std::vector< TermPtr > & | arguments () const |
| const std::set< std::string_view > & | variables () |
| void | write (std::ostream &os) const override |
| size_t | hash () const |
| Predicate (std::string_view functor, const std::vector< TermPtr > &arguments={}) | |
| Predicate (AtomPtr functor, const std::vector< TermPtr > &arguments={}) | |
| auto & | functor () const |
| auto | arity () const |
| const std::vector< TermPtr > & | arguments () const |
| const std::set< std::string_view > & | variables () |
| void | write (std::ostream &os) const override |
| size_t | hash () const |
Public Member Functions inherited from knowrob::Formula | |
| Formula (const FormulaType &type) | |
| virtual | ~Formula ()=default |
| bool | operator== (const Formula &other) const |
| FormulaType | type () const |
| bool | isAtomic () const |
| bool | isGround () const |
| bool | isTop () const |
| bool | isBottom () const |
| Formula (const FormulaType &type) | |
| virtual | ~Formula ()=default |
| bool | operator== (const Formula &other) const |
| FormulaType | type () const |
| bool | isAtomic () const |
| bool | isGround () const |
| bool | isTop () const |
| bool | isBottom () const |
Public Member Functions inherited from knowrob::Printable | |
| virtual | ~Printable ()=default |
| virtual std::string | format () const |
| virtual | ~Printable ()=default |
| virtual std::string | format () const |
Static Public Member Functions | |
| static FunctionPtr | toFunction (const std::shared_ptr< Predicate > &predicate) |
| static std::shared_ptr< Predicate > | fromFunction (const FunctionPtr &fn) |
| static FunctionPtr | toFunction (const std::shared_ptr< Predicate > &predicate) |
| static std::shared_ptr< Predicate > | fromFunction (const FunctionPtr &fn) |
Protected Member Functions | |
| std::set< std::string_view > | getVariables1 () const |
| bool | isEqual (const Formula &other) const override |
| std::set< std::string_view > | getVariables1 () const |
| bool | isEqual (const Formula &other) const override |
Protected Attributes | |
| const AtomPtr | functor_ |
| const std::vector< TermPtr > | arguments_ |
| const std::set< std::string_view > | variables_ |
Protected Attributes inherited from knowrob::Formula | |
| const FormulaType | type_ |
| bool | isGround_ = true |
A predicate with a functor and a number of term arguments.
Definition at line 22 of file Predicate.h.
|
explicit |
| functor | the functor name. |
| arguments | vector of predicate arguments. |
Definition at line 14 of file Predicate.cpp.
| functor | the functor name. |
| arguments | vector of predicate arguments. |
Definition at line 18 of file Predicate.cpp.
|
explicit |
| functor | the functor name. |
| arguments | vector of predicate arguments. |
|
explicit |
| functor | the functor name. |
| arguments | vector of predicate arguments. |
|
inline |
Get the arguments of this predicate.
Definition at line 52 of file Predicate.h.
|
inline |
Get the arguments of this predicate.
Definition at line 52 of file Predicate.h.
|
inline |
|
inline |
|
static |
Definition at line 89 of file Predicate.cpp.
|
static |
|
inline |
|
inline |
|
protected |
Definition at line 38 of file Predicate.cpp.
|
protected |
| size_t Predicate::hash | ( | ) | const |
Definition at line 46 of file Predicate.cpp.
| size_t knowrob::Predicate::hash | ( | ) | const |
|
overrideprotectedvirtual |
Implements knowrob::Formula.
Reimplemented in knowrob::Top, knowrob::Bottom, and knowrob::Top.
Definition at line 26 of file Predicate.cpp.
|
overrideprotectedvirtual |
Implements knowrob::Formula.
Reimplemented in knowrob::Top.
|
static |
Definition at line 85 of file Predicate.cpp.
|
static |
|
inline |
Definition at line 55 of file Predicate.h.
|
inline |
Definition at line 55 of file Predicate.h.
|
overridevirtual |
Print this object to a stream.
| os | the stream to print to. |
Implements knowrob::Printable.
Reimplemented in knowrob::Top, knowrob::Bottom, and knowrob::Top.
Definition at line 62 of file Predicate.cpp.
|
overridevirtual |
Print this object to a stream.
| os | the stream to print to. |
Implements knowrob::Printable.
Reimplemented in knowrob::Top.
|
protected |
Definition at line 69 of file Predicate.h.
|
protected |
Definition at line 68 of file Predicate.h.
|
protected |
Definition at line 70 of file Predicate.h.