|
OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <ImportanceIndex.h>
Inheritance diagram for opencog::ImportanceIndex:
Collaboration diagram for opencog::ImportanceIndex:Public Member Functions | |
| ImportanceIndex (void) | |
| void | insertAtom (Atom *) |
| void | removeAtom (Atom *) |
| void | updateImportance (Atom *, int) |
| UnorderedHandleSet | getHandleSet (const AtomTable *, AttentionValue::sti_t, AttentionValue::sti_t) const |
Public Member Functions inherited from opencog::FixedIntegerIndex | |
| ~FixedIntegerIndex () | |
| void | insert (size_t i, Atom *a) |
| void | remove (size_t i, Atom *a) |
| size_t | size (size_t i) const |
| size_t | size (void) const |
Static Public Member Functions | |
| static unsigned int | importanceBin (short) |
Additional Inherited Members | |
Protected Member Functions inherited from opencog::FixedIntegerIndex | |
| void | resize (size_t sz) |
Protected Attributes inherited from opencog::FixedIntegerIndex | |
| std::vector< UnorderedAtomSet > | idx |
Implements an index with additional routines needed for managing short-term importance. This index is not thread-safe, by itself. Users of this class must gauarantee single-threaded access!
Definition at line 42 of file ImportanceIndex.h.
| ImportanceIndex::ImportanceIndex | ( | void | ) |
Definition at line 38 of file ImportanceIndex.cc.
References IMPORTANCE_INDEX_SIZE, and opencog::FixedIntegerIndex::resize().
| UnorderedHandleSet ImportanceIndex::getHandleSet | ( | const AtomTable * | atomtable, |
| AttentionValue::sti_t | lowerBound, | ||
| AttentionValue::sti_t | upperBound | ||
| ) | const |
Definition at line 73 of file ImportanceIndex.cc.
References python.atom_type_names::atom, opencog::FixedIntegerIndex::idx, and importanceBin().
Here is the caller graph for this function:
|
static |
This method returns which importance bin an atom with the given importance should be placed.
| Importance | value to be mapped. |
Definition at line 43 of file ImportanceIndex.cc.
References IMPORTANCE_INDEX_SIZE.
Here is the caller graph for this function:| void ImportanceIndex::insertAtom | ( | Atom * | atom | ) |
Definition at line 59 of file ImportanceIndex.cc.
References opencog::Atom::getAttentionValue(), importanceBin(), and opencog::FixedIntegerIndex::insert().
Here is the caller graph for this function:| void ImportanceIndex::removeAtom | ( | Atom * | atom | ) |
Definition at line 66 of file ImportanceIndex.cc.
References python.atom_type_names::atom, opencog::Atom::getAttentionValue(), and importanceBin().
Here is the caller graph for this function:| void ImportanceIndex::updateImportance | ( | Atom * | atom, |
| int | bin | ||
| ) |
Updates the importance index for the given atom. According to the new importance of the atom, it may change importance bins.
| The | atom whose importance index will be updated. |
| The | old importance bin where the atom originally was. |
Definition at line 50 of file ImportanceIndex.cc.
References python.atom_type_names::atom, opencog::Atom::getAttentionValue(), importanceBin(), and opencog::FixedIntegerIndex::insert().
Here is the caller graph for this function: