#include <inspectable.h>
Inherited by AbstractController, AbstractModel, AbstractWiring, GenContext, Generation, InspectableProxy, IValue, StatisticTools, and WiredController.
Inheritance diagram for Inspectable:
Public Types | |
typedef std::string | iparamkey |
typedef double | iparamval |
typedef std::pair< iparamkey, iparamval * > | iparampair |
typedef std::pair< iparamkey, std::pair< matrix::Matrix *, bool > > | imatrixpair |
typedef std::list< iparamkey > | iparamkeylist |
typedef std::list< iparamval > | iparamvallist |
typedef std::list< iparamval * > | iparamvalptrlist |
typedef std::list< iparampair > | iparampairlist |
typedef std::list< imatrixpair > | imatrixpairlist |
typedef Inspectable::ILayer | ILayer |
typedef Inspectable::IConnection | IConnection |
typedef std::list< ILayer > | ilayerlist |
typedef std::list< IConnection > | iconnectionlist |
Public Member Functions | |
Inspectable () | |
TYPEDEFS END. | |
virtual | ~Inspectable () |
virtual iparamkeylist | getInternalParamNames () const |
The list of the names of all internal parameters given by getInternalParams(). | |
virtual iparamvallist | getInternalParams () const |
virtual iparamvalptrlist | getInternalParamsPtr () const |
be careful: matrices will be ignored | |
virtual ilayerlist | getStructuralLayers () const |
Specifies which parameter vector forms a structural layer (in terms of a neural network) The ordering is important. | |
virtual iconnectionlist | getStructuralConnections () const |
Specifies which parameter matrix forms a connection between layers (in terms of a neural network) The orderning is not important. | |
virtual void | addInspectableValue (const iparamkey &key, iparamval *val, const std::string &descr=std::string()) |
This is the new style for adding inspectable values. | |
virtual void | addInspectableMatrix (const iparamkey &key, matrix::Matrix *m, bool only4x4AndDiag=true, const std::string &descr=std::string()) |
This is the new style for adding inspectable values. | |
virtual void | addInspectableDescription (const iparamkey &key, const std::string &descr) |
adds a description for the given parameter using info-lines The line will start (appart from the I) with a D for description followed by the key end then followed by the string. | |
virtual void | addInfoLine (std::string infoLine) |
Adds an info line to this inspectable instance. | |
virtual void | addInfoLines (std::list< std::string > infoLineList) |
Adds a bunch of infolines with addInfoLine to this inspectable instance. | |
virtual void | removeInfoLines () |
Removes all infolines from this inspectable instance. | |
virtual const std::list< std::string > & | getInfoLines () const |
Returns all infolines added to this inspectable instance. | |
Protected Attributes | |
iparampairlist | mapOfValues |
imatrixpairlist | mapOfMatrices |
std::list< std::string > | infoLineStringList |
Classes | |
struct | IConnection |
struct | ILayer |
struct | matchName |
nice predicate function for finding a Layer with its vectorname More... |
That means that one can read out some internal parameters indentified by string keys
typedef struct Inspectable::IConnection IConnection |
typedef std::list<IConnection> iconnectionlist |
typedef struct Inspectable::ILayer ILayer |
typedef std::list<ILayer> ilayerlist |
typedef std::pair<iparamkey,std::pair< matrix::Matrix*, bool > > imatrixpair |
typedef std::list<imatrixpair> imatrixpairlist |
typedef std::string iparamkey |
typedef std::list<iparamkey> iparamkeylist |
typedef std::pair<iparamkey,iparamval*> iparampair |
typedef std::list<iparampair> iparampairlist |
typedef double iparamval |
typedef std::list<iparamval> iparamvallist |
typedef std::list<iparamval*> iparamvalptrlist |
Inspectable | ( | ) |
TYPEDEFS END.
~Inspectable | ( | ) | [virtual] |
void addInfoLine | ( | std::string | infoLine | ) | [virtual] |
Adds an info line to this inspectable instance.
All infolines are plotted by the PlotOptionEngine and therefore appear e.g. in the logfile. They are leaded by a I. If you have your own identifiers, just begin with your one (e.g. N for number of NOTE: You must not add e.g. carriage return, all this is handled by the PlotOptionsEngine itself. If you like to add multiple lines, call this function a lot more or use instead addInfoLines.
infoLine | the line (as string) to be added |
void addInfoLines | ( | std::list< std::string > | infoLineList | ) | [virtual] |
Adds a bunch of infolines with addInfoLine to this inspectable instance.
Every infoline is separated by an carriage return automatically, done by the PlotOptionsEngine.
infoLineList | the infoLines to be added as a string list. |
void addInspectableDescription | ( | const iparamkey & | key, | |
const std::string & | descr | |||
) | [virtual] |
adds a description for the given parameter using info-lines The line will start (appart from the I) with a D for description followed by the key end then followed by the string.
key | parameter name (no spaces allowed) | |
descr | descriptive string (no newlines allowed) |
void addInspectableMatrix | ( | const iparamkey & | key, | |
matrix::Matrix * | m, | |||
bool | only4x4AndDiag = true , |
|||
const std::string & | descr = std::string() | |||
) | [virtual] |
This is the new style for adding inspectable values.
Just call this function for each parameter and you are done. Inspects elements of the given matrix or vector (automatic detection) For Matrixes Either all or only the values given by store4x4AndDiagonalFieldNames(Matrix& m,string& matrixName); are used.
key | the name of the matrix, shown e.g. in guilogger (no spaces allowed) | |
m | the address of the matrix to inspect | |
only4x4AndDiag | of true only 4x4 matrix plus the diagonal is used | |
descr | description string to be exported (for the entire matrix with key_) (using infolines) |
void addInspectableValue | ( | const iparamkey & | key, | |
iparamval * | val, | |||
const std::string & | descr = std::string() | |||
) | [virtual] |
This is the new style for adding inspectable values.
Just call this function for each parameter and you are done. registers a single value
key | the name of the inspectable, shown e.g. in guilogger (no spaces allowed) | |
val | the address of the value to inspect | |
descr | description string to be exported (using infolines) |
const std::list< std::string > & getInfoLines | ( | ) | const [virtual] |
Returns all infolines added to this inspectable instance.
This function is called by the PlotOptionEngine.
Inspectable::iparamkeylist getInternalParamNames | ( | ) | const [virtual] |
The list of the names of all internal parameters given by getInternalParams().
The naming convention is "v[i]" for vectors and "A[i][j]" for matrices, where i, j start at 0.
Reimplemented in AbstractControllerAdapter, AbstractMultiController, BasicController, ClassicReinforce, DiscreteControllerAdapter, Elman, FFNNController, InvertMotorBigModel, MeasureAdapter, MultiLayerFFNN, MutualInformationController, OneActiveMultiPassiveController, ReplayController, use_java_controller, FeedbackWiring, and WiringSequence.
Inspectable::iparamvallist getInternalParams | ( | ) | const [virtual] |
Reimplemented in AbstractControllerAdapter, AbstractMultiController, BasicController, ClassicReinforce, DiscreteControllerAdapter, Elman, FFNNController, InvertMotorBigModel, MeasureAdapter, MultiLayerFFNN, MutualInformationController, OneActiveMultiPassiveController, ReplayController, use_java_controller, FeedbackWiring, and WiringSequence.
Inspectable::iparamvalptrlist getInternalParamsPtr | ( | ) | const [virtual] |
be careful: matrices will be ignored
Inspectable::iconnectionlist getStructuralConnections | ( | ) | const [virtual] |
Specifies which parameter matrix forms a connection between layers (in terms of a neural network) The orderning is not important.
Reimplemented in BasicController, ClassicReinforce, Elman, InvertMotorBigModel, InvertMotorNStep, InvertMotorSpace, InvertNChannelController, and MultiLayerFFNN.
Inspectable::ilayerlist getStructuralLayers | ( | ) | const [virtual] |
Specifies which parameter vector forms a structural layer (in terms of a neural network) The ordering is important.
The first entry is the input layer and so on.
Reimplemented in BasicController, ClassicReinforce, Elman, InvertMotorBigModel, InvertMotorNStep, InvertMotorSpace, InvertNChannelController, and MultiLayerFFNN.
void removeInfoLines | ( | ) | [virtual] |
Removes all infolines from this inspectable instance.
This is useful if you have new infoLines and would like to restart the PlotOptionEngine.
std::list<std::string> infoLineStringList [protected] |
imatrixpairlist mapOfMatrices [protected] |
iparampairlist mapOfValues [protected] |