25 #include <boost/bind.hpp>
27 #include <opencog/util/Config.h>
31 using namespace opencog;
64 logger().fine(
"AVChanged: fundsSTI = %d, old_av: %d, new_av: %d",
65 fundsSTI, old_av->getSTI(), new_av->getSTI());
73 afch(h, old_av, new_av);
79 afch(h, old_av, new_av);
172 if (normaliser == 0) {
178 if (normaliser == 0) {
184 return std::max(-1.0f, std::min(val,1.0f));
196 return (s / normaliser);
205 if (normaliser == 0) {
208 val = (s -
getMinSTI(average)) / (
float) normaliser;
210 return std::max(0.0f, std::min(val,1.0f));
float getNormalisedSTI(AttentionValuePtr, bool average, bool clip) const
AttentionValue::sti_t setAttentionalFocusBoundary(AttentionValue::sti_t s)
std::shared_ptr< AttentionValue > AttentionValuePtr
short lti_t
long-term importance type
AVCHSigl & AVChangedSignal()
AttentionValue::sti_t getAttentionalFocusBoundary() const
short sti_t
short-term importance type
AFCHSigl & RemoveAFSignal()
AttentionValue::sti_t getMaxSTI(bool average=true) const
float getNormalisedZeroToOneSTI(AttentionValuePtr, bool average, bool clip) const
AttentionValue::sti_t getMinSTI(bool average=true) const
void updateMinSTI(AttentionValue::sti_t m)
long updateLTIFunds(AttentionValue::lti_t diff)
AttentionValue::sti_t attentionalFocusBoundary
boost::signals2::signal< void(const Handle &, const AttentionValuePtr &, const AttentionValuePtr &)> AFCHSigl
AttentionBank(AtomTable &)
void updateMaxSTI(AttentionValue::sti_t m)
long updateSTIFunds(AttentionValue::sti_t diff)
opencog::recent_val< AttentionValue::sti_t > maxSTI
opencog::recent_val< AttentionValue::sti_t > minSTI
boost::signals2::connection AVChangedConnection
void AVChanged(Handle, AttentionValuePtr, AttentionValuePtr)