knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
knowrob::Computable Class Reference

#include <Computable.h>

Inheritance diagram for knowrob::Computable:
Collaboration diagram for knowrob::Computable:

Public Member Functions

 Computable (const FirstOrderLiteral &literal, const std::vector< DefiningReasoner > &reasonerList)
 
 Computable (const PredicatePtr &predicate, bool isNegative, const std::vector< DefiningReasoner > &reasonerList)
 
const auto & reasonerList () const
 
 Computable (const FirstOrderLiteral &literal, const std::vector< DefiningReasoner > &reasonerList)
 
 Computable (const PredicatePtr &predicate, bool isNegative, const std::vector< DefiningReasoner > &reasonerList)
 
const auto & reasonerList () const
 
- Public Member Functions inherited from knowrob::FirstOrderLiteral
 FirstOrderLiteral (const PredicatePtr &predicate, bool isNegative)
 
const auto & predicate () const
 
auto isNegated () const
 
void setIsNegated (bool isNegated)
 
auto & functor () const
 
auto arity () const
 
virtual uint32_t numVariables () const
 
void write (std::ostream &os) const override
 
 FirstOrderLiteral (const PredicatePtr &predicate, bool isNegative)
 
const auto & predicate () const
 
auto isNegated () const
 
void setIsNegated (bool isNegated)
 
auto & functor () const
 
auto arity () const
 
virtual uint32_t numVariables () const
 
void write (std::ostream &os) const override
 
- Public Member Functions inherited from knowrob::Printable
virtual ~Printable ()=default
 
virtual std::string format () const
 
virtual ~Printable ()=default
 
virtual std::string format () const
 

Protected Attributes

std::vector< DefiningReasonerreasonerList_
 
- Protected Attributes inherited from knowrob::FirstOrderLiteral
const PredicatePtr predicate_
 
bool isNegated_
 

Detailed Description

A computable first-order literal that can be evaluated by a goal-driven reasoner.

See also
GoalDrivenReasoner

Definition at line 17 of file Computable.h.

Constructor & Destructor Documentation

◆ Computable() [1/4]

Computable::Computable ( const FirstOrderLiteral literal,
const std::vector< DefiningReasoner > &  reasonerList 
)

Create a computable first-order literal.

Parameters
literalthe first-order literal.
reasonerListthe list of reasoners.

Definition at line 10 of file Computable.cpp.

const auto & reasonerList() const
Definition: Computable.h:39
std::vector< DefiningReasoner > reasonerList_
Definition: Computable.h:42
FirstOrderLiteral(const PredicatePtr &predicate, bool isNegative)

◆ Computable() [2/4]

Computable::Computable ( const PredicatePtr predicate,
bool  isNegative,
const std::vector< DefiningReasoner > &  reasonerList 
)

Create a computable first-order literal.

Parameters
predicatethe predicate of the literal.
isNegativetrue if the literal is negated.
reasonerListthe list of reasoners that define the predicate.

Definition at line 13 of file Computable.cpp.

◆ Computable() [3/4]

knowrob::Computable::Computable ( const FirstOrderLiteral literal,
const std::vector< DefiningReasoner > &  reasonerList 
)

Create a computable first-order literal.

Parameters
literalthe first-order literal.
reasonerListthe list of reasoners.

◆ Computable() [4/4]

knowrob::Computable::Computable ( const PredicatePtr predicate,
bool  isNegative,
const std::vector< DefiningReasoner > &  reasonerList 
)

Create a computable first-order literal.

Parameters
predicatethe predicate of the literal.
isNegativetrue if the literal is negated.
reasonerListthe list of reasoners that define the predicate.

Member Function Documentation

◆ reasonerList() [1/2]

const auto& knowrob::Computable::reasonerList ( ) const
inline
Returns
the list of reasoners.

Definition at line 39 of file Computable.h.

39 { return reasonerList_; }

◆ reasonerList() [2/2]

const auto& knowrob::Computable::reasonerList ( ) const
inline
Returns
the list of reasoners.

Definition at line 39 of file Computable.h.

39 { return reasonerList_; }

Member Data Documentation

◆ reasonerList_

std::vector< DefiningReasoner > knowrob::Computable::reasonerList_
protected

Definition at line 42 of file Computable.h.


The documentation for this class was generated from the following files: