Structural deformable models
|
#include <StructTable.h>
Public Types | |
typedef std::map< std::string, std::set< std::string > > | Interpretations |
typedef std::map< dword, StructPath > | NodePaths |
Public Member Functions | |
StructTable (Brain &brain, const std::string &filename=std::string()) | |
~StructTable () | |
void | clear () |
void | attachBrain (Brain &brain) |
dataset_ptr | getDataset () |
SensorCollection * | getSensors () |
void | reattachSensors () |
void | adaptDataScale () |
bool | load (const std::string &filename) |
bool | read (ParseFile &is) |
void | write (std::ostream &os) const |
const std::string & | getFilename () const |
const std::string & | getPath () const |
std::map< std::string, MStructure > & | getStructs () |
const std::map< std::string, MStructure > & | getStructs () const |
bool | hasStructure (const std::string &sname) const |
const MStructure & | getStructure (const std::string &sname) const |
MStructure & | getNextStruct (int dir=1, bool wrap=true) |
void | evalRelations () |
void | rebuildExpMaps () |
void | draw () const |
void | startSearch (bool dostart=true) |
int | searchDone () const |
bool | stepSearch (float dt) |
bool | triggerTest (int mx, int my, int what) |
float | findBestConnection () |
bool | findBestConnection (StructPath &path, const Winner &winner) const |
const StructPath & | getBestPath () const |
const std::string & | getBestInterpretation () const |
const std::map< std::string, StructPath > & | getIPaths () const |
void | setShownIP (const std::string &curip) const |
const std::string & | getShownIP () const |
bool | showNextIP (int dir=1) const |
Static Public Member Functions | |
static DMatrixf & | adjustByAvgDir (DMatrixf &mat) |
Protected Types | |
enum | TimeMarks { TM_UPDEM, TM_TIMEOUT, TM_LAST } |
enum | StateFlags { ST_RUN =1, ST_RESULT =2, ST_DONE =4, ST_TIMEOUT =16 } |
Protected Member Functions | |
void | connectSubSuper () |
bool | readInterpreations (ParseFile &is) |
Protected Attributes | |
std::map< std::string, MStructure > | m_Structs |
std::string | m_FileName |
std::string | m_Path |
Brain * | m_Brain |
std::string | m_CurStruct |
StructPath | m_BestPath |
float | m_Time |
dword | m_State |
std::vector< float > | m_TMarks |
Interpretations | m_Interpretations |
std::map< std::string, StructPath > | m_IPaths |
std::string | m_BestIP |
std::string | m_CurIP |
std::map< std::string, NodePaths > | m_NodePaths |
Friends | |
ParseFile & | operator>> (ParseFile &is, StructTable &st) |
std::ostream & | operator<< (std::ostream &os, const StructTable &st) |
Definition at line 49 of file StructTable.h.
typedef std::map<std::string, std::set<std::string> > StructTable::Interpretations |
Definition at line 51 of file StructTable.h.
typedef std::map<dword, StructPath> StructTable::NodePaths |
Definition at line 52 of file StructTable.h.
|
protected |
Enumerator | |
---|---|
ST_RUN | |
ST_RESULT | |
ST_DONE | |
ST_TIMEOUT |
Definition at line 106 of file StructTable.h.
|
protected |
Enumerator | |
---|---|
TM_UPDEM | |
TM_TIMEOUT | |
TM_LAST |
Definition at line 105 of file StructTable.h.
StructTable::StructTable | ( | Brain & | brain, |
const std::string & | filename = std::string() |
||
) |
Definition at line 18 of file StructTable.cpp.
StructTable::~StructTable | ( | ) |
Definition at line 26 of file StructTable.cpp.
void StructTable::adaptDataScale | ( | ) |
Definition at line 216 of file StructTable.cpp.
References Point2D::angle(), DMatrix< T >::getData(), mapAnglePI(), Point2D::rotate(), and DMatrix< T >::size().
Referenced by SubStructure::analyseTF().
|
inline |
Definition at line 57 of file StructTable.h.
void StructTable::clear | ( | ) |
Definition at line 31 of file StructTable.cpp.
|
protected |
Definition at line 206 of file StructTable.cpp.
void StructTable::draw | ( | ) | const |
Definition at line 377 of file StructTable.cpp.
References Model::draw(), and Winner::m_Model.
Referenced by Brain::drawAllModels().
void StructTable::evalRelations | ( | ) |
float StructTable::findBestConnection | ( | ) |
Definition at line 400 of file StructTable.cpp.
References StructPath::blockOtherPaths(), StructPath::getRelGoodness(), MStructure::getSearcher(), Searcher::getWinList(), and StructPath::m_Goodness.
bool StructTable::findBestConnection | ( | StructPath & | path, |
const Winner & | winner | ||
) | const |
Definition at line 463 of file StructTable.cpp.
References StructPath::branch(), Model::getQualityOfFit(), MStructure::getWeight(), MStructure::getWinner(), StructPath::m_Goodness, StructPath::m_Maxness, Winner::m_Model, SubStructure::m_RateTH, SubStructure::m_RateWeight, Winner::m_Ratings, Winner::m_StructName, MStructure::m_SubStructures, Winner::m_WinnerID, StructPath::merge(), TRACE0, Winner::WID_EMPTY, and Winner::WID_FRAME.
|
inline |
|
inline |
Definition at line 91 of file StructTable.h.
dataset_ptr StructTable::getDataset | ( | ) |
Definition at line 43 of file StructTable.cpp.
Referenced by MStructure::addExpectation(), MStructure::MStructure(), and MStructure::rebuildExpMap().
|
inline |
Definition at line 69 of file StructTable.h.
Referenced by MStructure::getInfoFilename(), and Brain::triggerTest().
|
inline |
Definition at line 93 of file StructTable.h.
Referenced by Brain::drawAllModels(), Brain::run(), and Brain::triggerTest().
MStructure & StructTable::getNextStruct | ( | int | dir = 1 , |
bool | wrap = true |
||
) |
Definition at line 156 of file StructTable.cpp.
Referenced by Brain::doCommand(), Brain::load(), Brain::run(), and Brain::triggerTest().
|
inline |
SensorCollection * StructTable::getSensors | ( | ) |
Definition at line 48 of file StructTable.cpp.
Referenced by MStructure::MStructure().
|
inline |
Definition at line 97 of file StructTable.h.
Referenced by Brain::drawAllModels(), and Brain::triggerTest().
|
inline |
Definition at line 71 of file StructTable.h.
Referenced by StructPath::blockOtherPaths(), MStructure::buildAllStats(), StructPath::protectWinners(), MStructure::rebuildExpMap(), MStructure::refSubSuper(), MStructure::showStats(), Brain::triggerTest(), StructPath::unprotectWinners(), and MStructure::verifyWinnerRating().
|
inline |
Definition at line 72 of file StructTable.h.
const MStructure & StructTable::getStructure | ( | const std::string & | sname | ) | const |
bool StructTable::hasStructure | ( | const std::string & | sname | ) | const |
Definition at line 146 of file StructTable.cpp.
bool StructTable::load | ( | const std::string & | filename | ) |
Definition at line 69 of file StructTable.cpp.
Referenced by Brain::load(), and Brain::triggerTest().
bool StructTable::read | ( | ParseFile & | is | ) |
Definition at line 78 of file StructTable.cpp.
References ParseFile::error(), ParseFile::getErrorMsg(), MStructure::getName(), ParseFile::getPath(), MStructure::read(), and ParseFile::setParseError().
|
protected |
Definition at line 99 of file StructTable.cpp.
References ParseFile::getKey(), ParseFile::getNextLine(), ParseFile::getValue(), ParseFile::pushLine(), and ParseFile::setParseError().
void StructTable::reattachSensors | ( | ) |
Definition at line 51 of file StructTable.cpp.
void StructTable::rebuildExpMaps | ( | ) |
Definition at line 199 of file StructTable.cpp.
|
inline |
Definition at line 81 of file StructTable.h.
Referenced by Brain::run().
|
inline |
bool StructTable::showNextIP | ( | int | dir = 1 | ) | const |
void StructTable::startSearch | ( | bool | dostart = true | ) |
Definition at line 287 of file StructTable.cpp.
Referenced by Brain::run().
bool StructTable::stepSearch | ( | float | dt | ) |
Definition at line 305 of file StructTable.cpp.
References getSearchPara(), and SearcherParams::m_EvolveCycle.
Referenced by Brain::evolve(), and MStructure::getExpMap().
bool StructTable::triggerTest | ( | int | mx, |
int | my, | ||
int | what | ||
) |
Definition at line 229 of file StructTable.cpp.
Referenced by Brain::triggerTest().
void StructTable::write | ( | std::ostream & | os | ) | const |
|
friend |
Definition at line 67 of file StructTable.h.
|
friend |
Definition at line 65 of file StructTable.h.
|
protected |
Definition at line 118 of file StructTable.h.
|
protected |
Definition at line 112 of file StructTable.h.
|
protected |
Definition at line 110 of file StructTable.h.
|
mutableprotected |
Definition at line 119 of file StructTable.h.
|
protected |
Definition at line 111 of file StructTable.h.
|
protected |
Definition at line 108 of file StructTable.h.
|
protected |
Definition at line 116 of file StructTable.h.
|
protected |
Definition at line 117 of file StructTable.h.
|
mutableprotected |
Definition at line 120 of file StructTable.h.
|
protected |
Definition at line 109 of file StructTable.h.
|
protected |
Definition at line 114 of file StructTable.h.
|
protected |
Definition at line 107 of file StructTable.h.
|
protected |
Definition at line 113 of file StructTable.h.
|
protected |
Definition at line 115 of file StructTable.h.