16 typedef std::map<std::string, std::map<dword,float> >
Ratings;
17 typedef const std::map<std::string, std::map<dword,float> >
CRatings;
24 float rateBy(
const std::string& creatorname,
dword creatorid,
float rating);
26 const BestRatings::mapped_type&
29 const Ratings::mapped_type&
getRatingList(
const std::string& sname)
const 31 const std::pair<dword,float>
getBest(
const std::string& sname)
const;
52 { m_Integral = integral; }
114 : m_InputEMD(input), m_Origin(origin), m_Mean(0.f), m_Stdev(1.f) {
115 assert(input !=
NULL);
124 delete m_InputEMD; m_InputEMD =
NULL;
148 { setRepresentative(model); }
155 void setRepresentative(
const Model &model);
159 void add(
const EDistributions &distlist);
160 bool erase(
dword wid);
161 bool hasDist(
dword wid)
const;
165 virtual PropVec getPropVec()
const;
166 Model* generateInstance()
const;
167 float updateIntegral();
168 void clear(
bool oldonly=
false);
171 operator bool()
const {
return !m_Distributions.empty(); }
186 if(tfmat.
sizeX() == propDM.sizeY()) {
187 propDM = propDM.
mulLeft(tfmat);
188 prop = &*propDM.getData().
begin();
189 }
else if(tfmat.
sizeX() == propDM.sizeY()+1) {
190 DMatrixf propDMH(1,propDM.sizeY()+1, 1.f);
192 propDMH = propDMH.
mulLeft(tfmat);
193 prop = &*propDMH.getData().
begin();
const std::map< std::string, dword > CBestRatings
BestRatings m_BestRatings
virtual PropVec getPropVec() const
virtual ~EMDistribution()
const Ratings::mapped_type & getRatingList(const std::string &sname) const
void setAvg(const PropVec &avg)
EDistributions m_Distributions
virtual EMDistribution * copy() const
std::map< std::string, std::map< dword, float > > Ratings
std::map< std::string, dword > BestRatings
const std::pair< dword, float > getBest(const std::string &sname) const
VVector< float, 4 > PropVec
PropVec & clamp(PropVec &v)
dword getShootCount() const
PropTF getIdentityPropTF()
VT & clamp(const VT &lb, const VT &ub)
DMatrix< float > DMatrixf
void setShootCount(dword scount)
void setCreator(const Winner &creator)
PropVec & hgPropTF(const DMatrixf &tfmat, PropVec &prop)
std::map< float, EMDistribution * > m_SortDist
void setFlags(dword flags)
void setStructName(const std::string &sname)
void setUB(const PropVec &ub)
void unsetFlags(dword flags=0xffffffff)
float getConnection(const std::string &sname, dword wid) const
bool hasConnection(const std::string &sname) const
virtual float ratePropVec(const PropVec &prop, Winner *winner=NULL) const
const PropVec & getLB() const
const std::map< std::string, std::map< dword, float > > CRatings
ExpectationMap(const ExpectationMap &rhs)
MT mulLeft(const MT &rhs) const
EMDRect(const PropVec &lb=PropVec(0.f), const PropVec &ub=PropVec(1.f))
float rateBy(const std::string &creatorname, dword creatorid, float rating)
Model & getRepresentative()
virtual void setIntegral(float integral)
bool hasFlags(dword flags) const
const PropVec & getUB() const
ExpectationMap(const Model &model)
DMatrix< T > avg(const DMatrix< T > &mat)
virtual EMDistribution * copy() const
MT & setRange(dword ox, dword oy, const MT &mat)
DMatrix< T > stdev(const DMatrix< T > &mat)
std::map< dword, EMDistribution * > EDistributions
EDistributions & getDistList()
const BestRatings::mapped_type & getBestRatingID(const std::string &sname) const
EMDGauss(const PropVec &avg=PropVec(0.f), const PropVec &stdev=PropVec(1.f))
static unsigned int size()
virtual ~ExpectationMap()
void setLB(const PropVec &lb)
virtual EMDistribution * copy() const