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


Public Member Functions | |
| TriplePattern (const Triple &triple, bool isNegated=false) | |
| TriplePattern (const PredicatePtr &predicate, bool isNegated=false) | |
| TriplePattern (const TermPtr &s, const TermPtr &p, const TermPtr &o, bool isNegated=false) | |
| void | setTripleFrame (const GraphSelector &frame) |
| void | getTripleFrame (GraphSelector &frame) const |
| auto & | subjectTerm () const |
| void | setSubjectTerm (const TermPtr &subjectTerm) |
| auto & | propertyTerm () const |
| auto & | objectTerm () const |
| void | setObjectTerm (const TermPtr &objectTerm) |
| auto & | objectVariable () const |
| void | setObjectVariable (const VariablePtr &objectVariable) |
| auto & | graphTerm () const |
| void | setGraphTerm (const groundable< Atom > &graphTerm) |
| void | setGraphName (const std::string_view &graphName) |
| auto & | perspectiveTerm () const |
| void | setPerspectiveTerm (const groundable< Atom > &perspectiveTerm) |
| auto & | beginTerm () const |
| void | setBeginTerm (const groundable< Double > &beginTerm) |
| auto & | endTerm () const |
| void | setEndTerm (const groundable< Double > &endTerm) |
| auto & | confidenceTerm () const |
| void | setConfidenceTerm (const groundable< Double > &confidenceTerm) |
| auto | objectOperator () const |
| void | setObjectOperator (FilterType objectOperator) |
| auto & | isOccasionalTerm () const |
| void | setIsOccasionalTerm (const groundable< Numeric > &isOccasional) |
| auto & | isUncertainTerm () const |
| void | setIsUncertainTerm (const groundable< Numeric > &isUncertain) |
| bool | isOptional () const |
| void | setIsOptional (bool isOptional) |
| uint32_t | numVariables () const override |
| std::vector< VariablePtr > | getVariables (bool includeObjectVar=true) const |
| bool | filter (const Triple &triple) const |
| bool | instantiateInto (Triple &triple, const std::shared_ptr< const Bindings > &bindings=Bindings::emptyBindings()) const |
| TriplePattern (const Triple &triple, bool isNegated=false) | |
| TriplePattern (const PredicatePtr &predicate, bool isNegated=false) | |
| TriplePattern (const TermPtr &s, const TermPtr &p, const TermPtr &o, bool isNegated=false) | |
| void | setTripleFrame (const GraphSelector &frame) |
| void | getTripleFrame (GraphSelector &frame) const |
| auto & | subjectTerm () const |
| void | setSubjectTerm (const TermPtr &subjectTerm) |
| auto & | propertyTerm () const |
| auto & | objectTerm () const |
| void | setObjectTerm (const TermPtr &objectTerm) |
| auto & | objectVariable () const |
| void | setObjectVariable (const VariablePtr &objectVariable) |
| auto & | graphTerm () const |
| void | setGraphTerm (const groundable< Atom > &graphTerm) |
| void | setGraphName (const std::string_view &graphName) |
| auto & | perspectiveTerm () const |
| void | setPerspectiveTerm (const groundable< Atom > &perspectiveTerm) |
| auto & | beginTerm () const |
| void | setBeginTerm (const groundable< Double > &beginTerm) |
| auto & | endTerm () const |
| void | setEndTerm (const groundable< Double > &endTerm) |
| auto & | confidenceTerm () const |
| void | setConfidenceTerm (const groundable< Double > &confidenceTerm) |
| auto | objectOperator () const |
| void | setObjectOperator (FilterType objectOperator) |
| auto & | isOccasionalTerm () const |
| void | setIsOccasionalTerm (const groundable< Numeric > &isOccasional) |
| auto & | isUncertainTerm () const |
| void | setIsUncertainTerm (const groundable< Numeric > &isUncertain) |
| bool | isOptional () const |
| void | setIsOptional (bool isOptional) |
| uint32_t | numVariables () const override |
| std::vector< VariablePtr > | getVariables (bool includeObjectVar=true) const |
| bool | filter (const Triple &triple) const |
| bool | instantiateInto (Triple &triple, const std::shared_ptr< const Bindings > &bindings=Bindings::emptyBindings()) 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 |
| 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 |
| 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 |
Static Public Member Functions | |
| static std::shared_ptr< Predicate > | getRDFPredicate (const PredicatePtr &predicate) |
| static std::shared_ptr< Predicate > | getRDFPredicate (const PredicatePtr &predicate) |
Static Protected Member Functions | |
| static std::shared_ptr< Atom > | getGraphTerm (const std::string_view &graphName) |
| static std::shared_ptr< Predicate > | getRDFPredicate (const TermPtr &s, const TermPtr &p, const TermPtr &o) |
| static std::shared_ptr< Predicate > | getRDFPredicate (const Triple &data) |
| static std::shared_ptr< Atom > | getGraphTerm (const std::string_view &graphName) |
| static std::shared_ptr< Predicate > | getRDFPredicate (const TermPtr &s, const TermPtr &p, const TermPtr &o) |
| static std::shared_ptr< Predicate > | getRDFPredicate (const Triple &data) |
Protected Attributes | |
| TermPtr | subjectTerm_ |
| TermPtr | propertyTerm_ |
| TermPtr | objectTerm_ |
| VariablePtr | objectVariable_ |
| FilterType | objectOperator_ |
| bool | isOptional_ |
| groundable< Atom > | graphTerm_ |
| groundable< Atom > | perspectiveTerm_ |
| groundable< Double > | beginTerm_ |
| groundable< Double > | endTerm_ |
| groundable< Double > | confidenceTerm_ |
| groundable< Numeric > | isOccasional_ |
| groundable< Numeric > | isUncertain_ |
Protected Attributes inherited from knowrob::FirstOrderLiteral | |
| const PredicatePtr | predicate_ |
| bool | isNegated_ |
A triple expression where subject, predicate and object are represented as a term, and an additional unary operator can be applied to the object.
Definition at line 43 of file TriplePattern.h.
|
explicit |
Copy char data of StatementData object into Term data structures.
| triple | a triple. |
| isNegated | a value of true refers to the statement being false. |
Definition at line 39 of file TriplePattern.cpp.
|
explicit |
| predicate | a predicate with two arguments. |
| isNegated | a value of true refers to the statement being false. |
Definition at line 69 of file TriplePattern.cpp.
| TriplePattern::TriplePattern | ( | const TermPtr & | s, |
| const TermPtr & | p, | ||
| const TermPtr & | o, | ||
| bool | isNegated = false |
||
| ) |
| s | the subject term. |
| p | the property term. |
| o | the object term. |
| isNegated | a value of true refers to the statement being false. |
Definition at line 78 of file TriplePattern.cpp.
|
explicit |
Copy char data of StatementData object into Term data structures.
| triple | a triple. |
| isNegated | a value of true refers to the statement being false. |
|
explicit |
| predicate | a predicate with two arguments. |
| isNegated | a value of true refers to the statement being false. |
| knowrob::TriplePattern::TriplePattern | ( | const TermPtr & | s, |
| const TermPtr & | p, | ||
| const TermPtr & | o, | ||
| bool | isNegated = false |
||
| ) |
| s | the subject term. |
| p | the property term. |
| o | the object term. |
| isNegated | a value of true refers to the statement being false. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| bool TriplePattern::filter | ( | const Triple & | triple | ) | const |
| triple | a triple query. |
Definition at line 247 of file TriplePattern.cpp.
| bool knowrob::TriplePattern::filter | ( | const Triple & | triple | ) | const |
| triple | a triple query. |
|
staticprotected |
Definition at line 135 of file TriplePattern.cpp.
|
staticprotected |
|
static |
Definition at line 154 of file TriplePattern.cpp.
|
static |
|
staticprotected |
Definition at line 150 of file TriplePattern.cpp.
|
staticprotected |
Definition at line 166 of file TriplePattern.cpp.
|
staticprotected |
| void TriplePattern::getTripleFrame | ( | GraphSelector & | frame | ) | const |
Apply this pattern to a frame.
| frame | a triple frame. |
Definition at line 111 of file TriplePattern.cpp.
| void knowrob::TriplePattern::getTripleFrame | ( | GraphSelector & | frame | ) | const |
Apply this pattern to a frame.
| frame | a triple frame. |
| std::vector< VariablePtr > TriplePattern::getVariables | ( | bool | includeObjectVar = true | ) | const |
Definition at line 182 of file TriplePattern.cpp.
| std::vector<VariablePtr> knowrob::TriplePattern::getVariables | ( | bool | includeObjectVar = true | ) | const |
|
inline |
|
inline |
| bool TriplePattern::instantiateInto | ( | Triple & | triple, |
| const std::shared_ptr< const Bindings > & | bindings = Bindings::emptyBindings() |
||
| ) | const |
Map the instantiation of this expression into a triple.
| triple | the triple to be instantiated. |
| bindings | the substitution to be applied. |
Definition at line 286 of file TriplePattern.cpp.
| bool knowrob::TriplePattern::instantiateInto | ( | Triple & | triple, |
| const std::shared_ptr< const Bindings > & | bindings = Bindings::emptyBindings() |
||
| ) | const |
Map the instantiation of this expression into a triple.
| triple | the triple to be instantiated. |
| bindings | the substitution to be applied. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
overridevirtual |
Reimplemented from knowrob::FirstOrderLiteral.
Definition at line 202 of file TriplePattern.cpp.
|
overridevirtual |
Reimplemented from knowrob::FirstOrderLiteral.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 108 of file TriplePattern.h.
|
inline |
Definition at line 108 of file TriplePattern.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Set the begin term of this expression.
| beginTerm | the begin term. |
Definition at line 153 of file TriplePattern.h.
|
inline |
Set the begin term of this expression.
| beginTerm | the begin term. |
Definition at line 153 of file TriplePattern.h.
|
inline |
Set the confidence term of this expression.
| confidenceTerm | the confidence term. |
Definition at line 175 of file TriplePattern.h.
|
inline |
Set the confidence term of this expression.
| confidenceTerm | the confidence term. |
Definition at line 175 of file TriplePattern.h.
|
inline |
Set the end term of this expression.
| endTerm | the end term. |
Definition at line 164 of file TriplePattern.h.
|
inline |
Set the end term of this expression.
| endTerm | the end term. |
Definition at line 164 of file TriplePattern.h.
|
inline |
Set the graph term of this expression.
| graphName | the name of the graph. |
Definition at line 131 of file TriplePattern.h.
|
inline |
Set the graph term of this expression.
| graphName | the name of the graph. |
Definition at line 131 of file TriplePattern.h.
|
inline |
Set the graph term of this expression.
| graphTerm | the graph term. |
Definition at line 125 of file TriplePattern.h.
|
inline |
Set the graph term of this expression.
| graphTerm | the graph term. |
Definition at line 125 of file TriplePattern.h.
|
inline |
Set the isOccasional term of this expression.
| isOccasional | the isOccasional term. |
Definition at line 197 of file TriplePattern.h.
|
inline |
Set the isOccasional term of this expression.
| isOccasional | the isOccasional term. |
Definition at line 197 of file TriplePattern.h.
|
inline |
Set this expression to be optional.
| isOptional | true if this expression is optional. |
Definition at line 219 of file TriplePattern.h.
|
inline |
Set this expression to be optional.
| isOptional | true if this expression is optional. |
Definition at line 219 of file TriplePattern.h.
|
inline |
Set the isUncertain term of this expression.
| isUncertain | the isUncertain term. |
Definition at line 208 of file TriplePattern.h.
|
inline |
Set the isUncertain term of this expression.
| isUncertain | the isUncertain term. |
Definition at line 208 of file TriplePattern.h.
|
inline |
Set the operator for the object of the triple.
| objectOperator | the operator. |
Definition at line 186 of file TriplePattern.h.
|
inline |
Set the operator for the object of the triple.
| objectOperator | the operator. |
Definition at line 186 of file TriplePattern.h.
|
inline |
Set the object term of this expression.
| objectTerm | the object term. |
Definition at line 103 of file TriplePattern.h.
|
inline |
Set the object term of this expression.
| objectTerm | the object term. |
Definition at line 103 of file TriplePattern.h.
|
inline |
Set the object variable of this expression.
| objectVariable | the object variable. |
Definition at line 114 of file TriplePattern.h.
|
inline |
Set the object variable of this expression.
| objectVariable | the object variable. |
Definition at line 114 of file TriplePattern.h.
|
inline |
Set the agent term of this expression.
| perspectiveTerm | the perspective term. |
Definition at line 142 of file TriplePattern.h.
|
inline |
Set the agent term of this expression.
| perspectiveTerm | the perspective term. |
Definition at line 142 of file TriplePattern.h.
|
inline |
Set the subject term of this expression.
| subjectTerm | the subject term. |
Definition at line 87 of file TriplePattern.h.
|
inline |
Set the subject term of this expression.
| subjectTerm | the subject term. |
Definition at line 87 of file TriplePattern.h.
| void TriplePattern::setTripleFrame | ( | const GraphSelector & | frame | ) |
Apply a frame to this pattern.
| frame | a triple frame. |
Definition at line 87 of file TriplePattern.cpp.
| void knowrob::TriplePattern::setTripleFrame | ( | const GraphSelector & | frame | ) |
Apply a frame to this pattern.
| frame | a triple frame. |
|
inline |
|
inline |
|
protected |
Definition at line 259 of file TriplePattern.h.
|
protected |
Definition at line 261 of file TriplePattern.h.
|
protected |
Definition at line 260 of file TriplePattern.h.
|
protected |
Definition at line 257 of file TriplePattern.h.
|
protected |
Definition at line 262 of file TriplePattern.h.
|
protected |
Definition at line 254 of file TriplePattern.h.
|
protected |
Definition at line 263 of file TriplePattern.h.
|
protected |
Definition at line 253 of file TriplePattern.h.
|
protected |
Definition at line 251 of file TriplePattern.h.
|
protected |
Definition at line 252 of file TriplePattern.h.
|
protected |
Definition at line 258 of file TriplePattern.h.
|
protected |
Definition at line 250 of file TriplePattern.h.
|
protected |
Definition at line 249 of file TriplePattern.h.