OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <AttentionValue.h>
Classes | |
struct | LTIAndTVAscendingSort |
functor for comparing atom's attention value More... | |
struct | LTIThenTVAscendingSort |
functor for comparing atom's attention value More... | |
struct | STISort |
functor for comparing atom's attention value More... | |
Public Types | |
typedef short | sti_t |
short-term importance type More... | |
typedef short | lti_t |
long-term importance type More... | |
typedef short | vlti_t |
very long-term importance type More... | |
Public Member Functions | |
AttentionValue (sti_t STI=DEFAULTATOMSTI, lti_t LTI=DEFAULTATOMLTI, vlti_t VLTI=DEFAULTATOMVLTI) | |
~AttentionValue () | |
sti_t | getSTI () const |
return STI property value More... | |
float | getScaledSTI () const |
lti_t | getLTI () const |
return LTI property value More... | |
vlti_t | getVLTI () const |
return VLTI property value More... | |
std::string | toString () const |
Returns const string "[sti_val, lti_val, vlti_val]". More... | |
AttentionValuePtr | clone () const |
Returns An AttentionValue* cloned from this AttentionValue. More... | |
AttentionValue * | rawclone () const |
bool | operator== (const AttentionValue &av) const |
bool | operator!= (const AttentionValue &rhs) const |
Static Public Member Functions | |
static AttentionValuePtr | DEFAULT_AV () |
to be used as default attention value More... | |
Static Public Attributes | |
static const int | DISPOSABLE = 0 |
Status flag for vlti. More... | |
static const sti_t | DEFAULTATOMSTI = 0 |
short-term importance default More... | |
static const lti_t | DEFAULTATOMLTI = 0 |
long-term importance default More... | |
static const vlti_t | DEFAULTATOMVLTI = 0 |
very long-term default More... | |
static const sti_t | MAXSTI = SHRT_MAX |
static const lti_t | MAXLTI = SHRT_MAX |
static const sti_t | MINSTI = SHRT_MIN |
static const lti_t | MINLTI = SHRT_MIN |
Private Member Functions | |
void | decaySTI () |
default attention value More... | |
Private Attributes | |
sti_t | m_STI |
short-term importance More... | |
lti_t | m_LTI |
long-term importance More... | |
vlti_t | m_VLTI |
Static Private Attributes | |
static AttentionValuePtr | m_defaultAV |
Friends | |
class | ImportanceIndex |
Definition at line 44 of file AttentionValue.h.
typedef short opencog::AttentionValue::lti_t |
long-term importance type
Definition at line 49 of file AttentionValue.h.
typedef short opencog::AttentionValue::sti_t |
short-term importance type
Definition at line 48 of file AttentionValue.h.
typedef short opencog::AttentionValue::vlti_t |
very long-term importance type
Definition at line 50 of file AttentionValue.h.
|
inline |
STI | (int): The STI value to set for the atom |
LTI | (int): The LTI value to set for the atom |
VLTI | (unsigned short): The VLTI value to set for this atom |
Definition at line 93 of file AttentionValue.h.
|
inline |
Definition at line 98 of file AttentionValue.h.
|
inline |
Returns An AttentionValue* cloned from this AttentionValue.
Definition at line 116 of file AttentionValue.h.
References createAV, m_LTI, m_STI, and m_VLTI.
|
private |
default attention value
Decays short term importance Private, because changing the AV without emitting a signal will confuse everyone, so we sharply limit who is allowed to do this.
Definition at line 34 of file AttentionValue.cc.
References m_STI.
|
inlinestatic |
to be used as default attention value
Definition at line 65 of file AttentionValue.h.
References createAV.
|
inline |
return LTI property value
Definition at line 105 of file AttentionValue.h.
References m_LTI.
|
inline |
Definition at line 102 of file AttentionValue.h.
References m_STI.
|
inline |
return STI property value
Definition at line 101 of file AttentionValue.h.
References m_STI.
|
inline |
return VLTI property value
Definition at line 108 of file AttentionValue.h.
References m_VLTI.
|
inline |
Definition at line 125 of file AttentionValue.h.
|
inline |
|
inline |
Definition at line 117 of file AttentionValue.h.
References AttentionValue(), m_LTI, m_STI, and m_VLTI.
std::string AttentionValue::toString | ( | ) | const |
Returns const string "[sti_val, lti_val, vlti_val]".
Definition at line 41 of file AttentionValue.cc.
|
friend |
Definition at line 85 of file AttentionValue.h.
|
static |
long-term importance default
Definition at line 56 of file AttentionValue.h.
|
static |
short-term importance default
Definition at line 55 of file AttentionValue.h.
|
static |
very long-term default
Definition at line 57 of file AttentionValue.h.
|
static |
Status flag for vlti.
Definition at line 52 of file AttentionValue.h.
|
staticprivate |
Definition at line 77 of file AttentionValue.h.
|
private |
long-term importance
Definition at line 74 of file AttentionValue.h.
|
private |
short-term importance
Definition at line 73 of file AttentionValue.h.
|
private |
represents the number of processes that currently need the atom as nondisposable. So it's only disposable if this is 0
Definition at line 75 of file AttentionValue.h.
|
static |
Definition at line 60 of file AttentionValue.h.
|
static |
Definition at line 59 of file AttentionValue.h.
|
static |
Definition at line 62 of file AttentionValue.h.
|
static |
Definition at line 61 of file AttentionValue.h.