25 #include <opencog/util/Config.h>
26 #include <opencog/util/functional.h>
27 #include <opencog/util/oc_assert.h>
33 using namespace opencog;
36 #define IMPORTANCE_INDEX_SIZE (1 << 11)
53 if (bin == newbin)
return;
90 std::copy_if(sl.begin(), sl.end(), inserter(set),
93 atom->getAttentionValue()->getSTI();
94 return (lowerBound <= sti and sti <= upperBound);
99 if (lowerBin == upperBin) {
101 std::transform(set.begin(), set.end(), inserter(ret),
108 while (++lowerBin < upperBin) {
110 set.insert(ss.begin(), ss.end());
115 std::copy_if(uset.begin(), uset.end(), inserter(set),
118 return (lowerBound <= sti and sti <= upperBound);
122 std::transform(set.begin(), set.end(), inserter(ret),
AttentionValuePtr getAttentionValue()
std::vector< UnorderedAtomSet > idx
static unsigned int importanceBin(short)
short sti_t
short-term importance type
std::unordered_set< Atom * > UnorderedAtomSet
#define IMPORTANCE_INDEX_SIZE
4092 importance bins means each bin has STI range of 32
void updateImportance(Atom *, int)
void insert(size_t i, Atom *a)
std::unordered_set< Handle, handle_hash > UnorderedHandleSet
a hash that associates the handle to its unique identificator
UnorderedHandleSet getHandleSet(const AtomTable *, AttentionValue::sti_t, AttentionValue::sti_t) const