knowrob
2.1.0
A Knowledge Base System for Cognition-enabled Robots
|
#include <Answer.h>
Public Member Functions | |
Answer () | |
Answer (const Answer &other) | |
auto & | frame () const |
void | setFrame (const std::shared_ptr< GraphSelector > &frame) |
void | applyFrame (const GraphSelector &frame) |
bool | isNegative () const |
bool | isPositive () const |
bool | isUncertain () const |
bool | isCertain () const |
void | setIsUncertain (bool val, std::optional< double > confidence) |
bool | isOccasionallyTrue () const |
bool | isAllwaysTrue () const |
void | setIsOccasionallyTrue (bool val) |
void | setReasonerTerm (const AtomPtr &reasonerTerm) |
auto & | reasonerTerm () const |
size_t | hashOfAnswer () const |
std::string | stringFormOfAnswer () const |
std::string | humanReadableForm () const |
Answer () | |
Answer (const Answer &other) | |
auto & | frame () const |
void | setFrame (const std::shared_ptr< GraphSelector > &frame) |
void | applyFrame (const GraphSelector &frame) |
bool | isNegative () const |
bool | isPositive () const |
bool | isUncertain () const |
bool | isCertain () const |
void | setIsUncertain (bool val, std::optional< double > confidence) |
bool | isOccasionallyTrue () const |
bool | isAllwaysTrue () const |
void | setIsOccasionallyTrue (bool val) |
void | setReasonerTerm (const AtomPtr &reasonerTerm) |
auto & | reasonerTerm () const |
size_t | hashOfAnswer () const |
std::string | stringFormOfAnswer () const |
std::string | humanReadableForm () const |
Public Member Functions inherited from knowrob::Token | |
Token (TokenType tokenType) | |
virtual | ~Token ()=default |
TokenType | tokenType () const |
size_t | hash () const |
std::string | stringForm () const |
bool | isControlToken () const |
bool | isAnswerToken () const |
bool | indicatesEndOfEvaluation () const |
void | write (std::ostream &os) const override |
Token (TokenType tokenType) | |
virtual | ~Token ()=default |
TokenType | tokenType () const |
size_t | hash () const |
std::string | stringForm () const |
bool | isControlToken () const |
bool | isAnswerToken () const |
bool | indicatesEndOfEvaluation () 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 Member Functions | |
void | setIsPositive (bool val) |
void | setIsNegative (bool val) |
void | setIsPositive (bool val) |
void | setIsNegative (bool val) |
Protected Attributes | |
std::shared_ptr< GraphSelector > | frame_ |
AtomPtr | reasonerTerm_ |
bool | isPositive_ = false |
bool | isNegative_ = false |
Protected Attributes inherited from knowrob::Token | |
TokenType | tokenType_ |
bool | isTerminalToken_ = false |
The answer to a (sub)-query. It can be positive, negative or neither.
void Answer::applyFrame | ( | const GraphSelector & | frame | ) |
Apply a frame to this answer.
frame | a graph selector. |
Definition at line 25 of file Answer.cpp.
void knowrob::Answer::applyFrame | ( | const GraphSelector & | frame | ) |
Apply a frame to this answer.
frame | a graph selector. |
|
inline |
The answer is framed in the context of a graph selector which determines the set of graphs in which the answer is valid. This can be used to e.g. address graphs that represent the world state from the perspective of a specific agent, or a specific point in time.
Definition at line 35 of file Answer.h.
|
inline |
The answer is framed in the context of a graph selector which determines the set of graphs in which the answer is valid. This can be used to e.g. address graphs that represent the world state from the perspective of a specific agent, or a specific point in time.
Definition at line 35 of file Answer.h.
size_t Answer::hashOfAnswer | ( | ) | const |
Definition at line 64 of file Answer.cpp.
size_t knowrob::Answer::hashOfAnswer | ( | ) | const |
std::string Answer::humanReadableForm | ( | ) | const |
Definition at line 101 of file Answer.cpp.
std::string knowrob::Answer::humanReadableForm | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool Answer::isOccasionallyTrue | ( | ) | const |
Definition at line 45 of file Answer.cpp.
bool knowrob::Answer::isOccasionallyTrue | ( | ) | const |
|
inline |
|
inline |
bool Answer::isUncertain | ( | ) | const |
Definition at line 35 of file Answer.cpp.
bool knowrob::Answer::isUncertain | ( | ) | const |
|
inline |
|
inline |
void Answer::setFrame | ( | const std::shared_ptr< GraphSelector > & | frame | ) |
Assign a graph selector to this answer.
frame | a graph selector. |
Definition at line 17 of file Answer.cpp.
void knowrob::Answer::setFrame | ( | const std::shared_ptr< GraphSelector > & | frame | ) |
Assign a graph selector to this answer.
frame | a graph selector. |
|
inlineprotected |
|
inlineprotected |
void Answer::setIsOccasionallyTrue | ( | bool | val | ) |
Mark this answer as occasionally true.
val | true if the answer is occasionally true. |
Definition at line 60 of file Answer.cpp.
void knowrob::Answer::setIsOccasionallyTrue | ( | bool | val | ) |
Mark this answer as occasionally true.
val | true if the answer is occasionally true. |
|
inlineprotected |
|
inlineprotected |
void Answer::setIsUncertain | ( | bool | val, |
std::optional< double > | confidence | ||
) |
Mark this answer as uncertain by modification of the associated frame.
val | true if the answer is uncertain. |
confidence | the confidence value. |
Definition at line 49 of file Answer.cpp.
void knowrob::Answer::setIsUncertain | ( | bool | val, |
std::optional< double > | confidence | ||
) |
Mark this answer as uncertain by modification of the associated frame.
val | true if the answer is uncertain. |
confidence | the confidence value. |
|
inline |
|
inline |
std::string Answer::stringFormOfAnswer | ( | ) | const |
std::string knowrob::Answer::stringFormOfAnswer | ( | ) | const |
|
protected |