28 const std::string& supStructName=
"",
37 const PropVec& wprop,
float ppmm,
float radius = 3)
const;
62 void setName(
const std::string& name);
63 const std::string&
getName()
const {
return m_Name; }
64 void setSize(
float size) { m_Size = size; }
76 operator bool()
const {
return !m_Name.empty(); }
80 {
return m_SubStructures.find(sname)->second; }
82 {
return m_SubStructures.find(sname) != m_SubStructures.end(); }
84 {
return *m_SupStructures.find(sname)->second; }
86 {
return m_SupStructures.find(sname) != m_SupStructures.end(); }
89 void write(std::ostream &os)
const;
91 { st.
read(is);
return is; }
93 { st.
write(os);
return os; }
94 void showStats(
const SubStructure& subs, std::ostream& os=std::cout)
const;
96 std::string getInfoFilename(
const std::string& suffix)
const;
97 bool getRefModel(
dword id,
Model& model)
const;
98 void setRefModel(
dword id,
const Model& model);
101 template<
class Iter>
dword getRefModelIDs(Iter iter)
const;
103 void saveRefProp()
const;
105 void buildAllStats();
106 bool buildMasterModel(
float scscale=1.f);
107 void rebuildExpMap();
108 void verifyWinnerRating();
110 {
return m_Searcher.getExpectationMap(); }
114 void refSubSuper(
bool doclear=
false);
134 for(std::map<dword,PropVec>::const_iterator rp=m_RefProp.begin();
135 rp!=m_RefProp.end(); rp++, count++)
139 std::string filemask = getInfoFilename(
"*");
140 std::list<std::string> files;
143 for(std::list<std::string>::iterator cf=files.begin();
144 cf != files.end(); cf++) {
145 std::string suff = cf->substr(cf->rfind(
'_')+1);
146 suff = suff.substr(0, suff.find(
'.'));
void analyseTF(const DMatrixf &tfmat)
std::string m_SubStructName
DMatrix< T > inverse(const DMatrix< T > &dmat)
bool hasSubStruct(const std::string sname) const
T & fromString(const std::string &str, T &v)
std::map< std::string, SubStructure > m_SubStructures
std::map< std::string, SubStructure * > m_SupStructures
StructTable * m_PStructTable
void setWeight(float weight)
int findFiles(const std::string &fmask, T iter)
float m_Size
stdradius in mm
std::map< dword, PropVec > m_RefProp
friend std::ostream & operator<<(std::ostream &os, const SubStructure &ss)
dword getRefModelIDs(Iter iter) const
bool stepSearch(float dt)
std::string m_SupStructName
const Searcher & getSearcher() const
const Model & getModel() const
friend ParseFile & operator>>(ParseFile &is, MStructure &st)
StructTable * getStructTable()
SubStructure(const std::string &subStructName="", const std::string &supStructName="", const PropTF &transform=PropTF(0.f), int pivot=-1)
void write(std::ostream &os) const
friend std::ostream & operator<<(std::ostream &os, const MStructure &st)
void setModel(const Model &model)
const std::string & getName() const
void write(std::ostream &os) const
const ExpectationMap & getExpMap() const
EMDistribution * generateEMDist(const PropVec &wprop, float ppmm, bool inverse=false, dword dtype=EMD_RECT) const
const SubStructure & getSubStruct(const std::string sname) const
bool hasSupStruct(const std::string sname) const
void getLBUB(PropVec &lb, PropVec &ub, const PropVec &wprop, float ppmm, float radius=3) const
void attachStructTable(StructTable *psTable)
const SubStructure & getSupStruct(const std::string sname) const