OpenCog Framework  Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
opencog::ProbabilisticTruthValue Class Reference

a TruthValue that stores a mean, a confidence and the number of observations More...

#include <ProbabilisticTruthValue.h>

+ Inheritance diagram for opencog::ProbabilisticTruthValue:
+ Collaboration diagram for opencog::ProbabilisticTruthValue:

Public Member Functions

 ProbabilisticTruthValue (strength_t, confidence_t, count_t)
 
 ProbabilisticTruthValue (const TruthValue &)
 
 ProbabilisticTruthValue (ProbabilisticTruthValue const &)
 
virtual bool operator== (const TruthValue &rhs) const
 
std::string toString () const
 
TruthValueType getType () const
 
strength_t getMean () const
 
count_t getCount () const
 
confidence_t getConfidence () const
 
virtual TruthValuePtr merge (TruthValuePtr, TVMergeStyle ms=DEFAULT) const
 
TruthValuePtr clone () const
 
TruthValuerawclone () const
 
- Public Member Functions inherited from opencog::TruthValue
virtual ~TruthValue ()
 
bool operator!= (const TruthValue &rhs) const
 
virtual bool isNullTv () const
 
virtual bool isDefaultTV () const
 

Static Public Member Functions

static TruthValuePtr createTV (strength_t s, confidence_t f, count_t c)
 
- Static Public Member Functions inherited from opencog::TruthValue
static TruthValuePtr NULL_TV ()
 
static TruthValuePtr TRUE_TV ()
 
static TruthValuePtr DEFAULT_TV ()
 
static TruthValuePtr FALSE_TV ()
 
static TruthValuePtr TRIVIAL_TV ()
 

Protected Attributes

strength_t mean
 
confidence_t confidence
 
count_t count
 

Detailed Description

a TruthValue that stores a mean, a confidence and the number of observations

Definition at line 42 of file ProbabilisticTruthValue.h.

Constructor & Destructor Documentation

ProbabilisticTruthValue::ProbabilisticTruthValue ( strength_t  m,
confidence_t  n,
count_t  c 
)

Definition at line 37 of file ProbabilisticTruthValue.cc.

References confidence, count, reorder_log::m, and mean.

+ Here is the caller graph for this function:

ProbabilisticTruthValue::ProbabilisticTruthValue ( const TruthValue source)
ProbabilisticTruthValue::ProbabilisticTruthValue ( ProbabilisticTruthValue const &  source)

Definition at line 50 of file ProbabilisticTruthValue.cc.

References confidence, count, and mean.

Member Function Documentation

TruthValuePtr opencog::ProbabilisticTruthValue::clone ( ) const
inlinevirtual

Implements opencog::TruthValue.

Definition at line 73 of file ProbabilisticTruthValue.h.

+ Here is the caller graph for this function:

static TruthValuePtr opencog::ProbabilisticTruthValue::createTV ( strength_t  s,
confidence_t  f,
count_t  c 
)
inlinestatic

Definition at line 67 of file ProbabilisticTruthValue.h.

confidence_t ProbabilisticTruthValue::getConfidence ( ) const
virtual

Implements opencog::TruthValue.

Definition at line 67 of file ProbabilisticTruthValue.cc.

References confidence.

+ Here is the caller graph for this function:

count_t ProbabilisticTruthValue::getCount ( ) const
virtual

Implements opencog::TruthValue.

Definition at line 62 of file ProbabilisticTruthValue.cc.

References count.

+ Here is the caller graph for this function:

strength_t ProbabilisticTruthValue::getMean ( ) const
virtual

Implements opencog::TruthValue.

Definition at line 57 of file ProbabilisticTruthValue.cc.

References mean.

+ Here is the caller graph for this function:

TruthValueType ProbabilisticTruthValue::getType ( ) const
virtual

Implements opencog::TruthValue.

Definition at line 96 of file ProbabilisticTruthValue.cc.

References opencog::PROBABILISTIC_TRUTH_VALUE.

TruthValuePtr ProbabilisticTruthValue::merge ( TruthValuePtr  ,
TVMergeStyle  ms = DEFAULT 
) const
virtual

Merge this TV object with the given TV object argument. It always returns a new TV object with the result of the merge, even if it is equal to one of the merged TV objects.

Parameters
msthe merge style as described in https://github.com/opencog/opencog/issues/1295

Implements opencog::TruthValue.

Definition at line 104 of file ProbabilisticTruthValue.cc.

References clone(), count, and mean.

bool ProbabilisticTruthValue::operator== ( const TruthValue rhs) const
virtual

Equality. Used to determine if two truth values are the same, or not. Primarily useful see if a TV is equal to NULL_TV, TRUE_TV, FALSE_TV, etc.

Implements opencog::TruthValue.

Definition at line 82 of file ProbabilisticTruthValue.cc.

References confidence, count, DOUBLE_ACCEPTABLE_ERROR, FLOAT_ACCEPTABLE_ERROR, and mean.

TruthValue* opencog::ProbabilisticTruthValue::rawclone ( ) const
inlinevirtual

Implements opencog::TruthValue.

Definition at line 77 of file ProbabilisticTruthValue.h.

References ProbabilisticTruthValue().

std::string ProbabilisticTruthValue::toString ( ) const
virtual

Implements opencog::TruthValue.

Definition at line 72 of file ProbabilisticTruthValue.cc.

References getConfidence(), getCount(), and getMean().

Member Data Documentation

confidence_t opencog::ProbabilisticTruthValue::confidence
protected

Definition at line 47 of file ProbabilisticTruthValue.h.

count_t opencog::ProbabilisticTruthValue::count
protected

Definition at line 48 of file ProbabilisticTruthValue.h.

strength_t opencog::ProbabilisticTruthValue::mean
protected

Definition at line 46 of file ProbabilisticTruthValue.h.


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