![]() |
VPTissue Reference Manual
|
Class describing a parameter exploration and its simulation tasks. More...
#include <ParameterExploration.h>


Public Member Functions | |
| ParameterExploration (const std::string &name, const boost::property_tree::ptree &original, const boost::property_tree::ptree &preferences) | |
| Constructor. More... | |
| ParameterExploration (const boost::property_tree::ptree &pt) | |
| Constructor. More... | |
| ParameterExploration (const ParameterExploration &other) | |
| Copy constructor. | |
| virtual | ~ParameterExploration () |
| Destructor. | |
| virtual ParameterExploration * | Clone () const |
| Clone function. | |
| virtual SimTask * | CreateTask (unsigned int index) const |
| Creates a task with the parameters on the given index. More... | |
| virtual unsigned int | GetNumberOfTasks () const |
| Returns the number of tasks the exploration currently contains. | |
| std::string | GetOriginalValue (const std::string ¶meter) const |
| Returns the original value of the parameter. More... | |
| virtual std::vector< std::string > | GetParameters () const |
| Returns all the parameters in the exploration. | |
| virtual std::vector< std::string > | GetPossibleParameters () const |
| Returns all the possible parameters for the exploration. | |
| const ISweep * | GetSweep (const std::string ¶meter) const |
| Returns the sweep associated with the given parameter. More... | |
| const std::list< std::pair< std::string, ISweep * > > & | GetSweeps () const |
| Returns all the sweeps. | |
| virtual std::vector< std::string > | GetValues (unsigned int index) const |
| Return the values of a certain task. More... | |
| ParameterExploration & | operator= (const ParameterExploration &other) |
| Assignment operator. | |
| void | RemoveSweep (const std::string ¶meter) |
| Removes the sweep (if any) for the given parameter. | |
| void | SetSweep (const std::string ¶meter, ISweep *sweep) |
| Set a sweep for the given parameter. More... | |
| virtual boost::property_tree::ptree | ToPtree () const |
| Convert the exploration to a ptree. More... | |
Public Member Functions inherited from SimPT_Parex::Exploration | |
| Exploration (const std::string &name, const boost::property_tree::ptree &preferences) | |
| Constructor. More... | |
| Exploration (const boost::property_tree::ptree &pt) | |
| Constructor. More... | |
| Exploration (const Exploration &other) | |
| Copy constructor. | |
| virtual | ~Exploration () |
| Destructor. | |
| const std::string & | GetName () const |
| Returns the name of the exploration. | |
| const boost::property_tree::ptree & | GetPreferences () const |
| Returns the preferences of the exploration. | |
| Exploration & | operator= (const Exploration &other) |
| Assignment operator. | |
| void | SetName (const std::string &name) |
| Changes the name of the exploration. More... | |
Additional Inherited Members | |
Protected Attributes inherited from SimPT_Parex::Exploration | |
| std::string | m_name |
| boost::property_tree::ptree | m_preferences |
Class describing a parameter exploration and its simulation tasks.
Definition at line 33 of file ParameterExploration.h.
| SimPT_Parex::ParameterExploration::ParameterExploration | ( | const std::string & | name, |
| const boost::property_tree::ptree & | original, | ||
| const boost::property_tree::ptree & | preferences | ||
| ) |
Constructor.
| name | The name of the exploration. |
| original | The ptree of the base simulation of the exploration. |
| preferences | The (workspace) preferences of the exploration. |
Referenced by Clone().

| SimPT_Parex::ParameterExploration::ParameterExploration | ( | const boost::property_tree::ptree & | pt | ) |
Constructor.
Constructs a new exploration with the given pt. See ToPtree() for more information about the format of an exploration tree.
|
virtual |
Creates a task with the parameters on the given index.
This index is based on the Cartesian product of the exploration parameters.
Implements SimPT_Parex::Exploration.
Definition at line 125 of file ParameterExploration.cpp.
References GetNumberOfTasks(), GetValues(), and SimPT_Sim::Util::PTreeUtils::PutIndexedChild().

| string SimPT_Parex::ParameterExploration::GetOriginalValue | ( | const std::string & | parameter | ) | const |
Returns the original value of the parameter.
The user must first verify that the parameter is associated with this sweep type by calling GetSweepType.
| ptree_bad_path | When the parameter doesn't exist. |
Definition at line 153 of file ParameterExploration.cpp.
References SimPT_Sim::Util::PTreeUtils::GetIndexedChild().

| const ISweep * SimPT_Parex::ParameterExploration::GetSweep | ( | const std::string & | parameter | ) | const |
Returns the sweep associated with the given parameter.
Definition at line 158 of file ParameterExploration.cpp.
|
virtual |
Return the values of a certain task.
The index of a value associated with a parameter in the vector is the same as the index of this parameter.
| index | The task index. |
Implements SimPT_Parex::Exploration.
Definition at line 97 of file ParameterExploration.cpp.
References GetNumberOfTasks(), SimPT_Parex::ISweep::GetNumberOfValues(), and SimPT_Parex::ISweep::GetValue().
Referenced by CreateTask().


| void SimPT_Parex::ParameterExploration::SetSweep | ( | const std::string & | parameter, |
| ISweep * | sweep | ||
| ) |
Set a sweep for the given parameter.
The ownership of the sweep will be transferred to the exploration.
Definition at line 169 of file ParameterExploration.cpp.
References SimPT_Parex::ISweep::GetNumberOfValues(), and RemoveSweep().

|
virtual |
Convert the exploration to a ptree.
The format of an exploration ptree is as follows: <name>m_name</name> <preferences>m_preferences</preferences> (== the format of the workspace preferences) <original>m_original</original> (== the format of a normal tissue file) <sweeps> <sweep> (for each sweep in m_sweeps) <parameter>parameter</parameter> sweep [see Sweep.h for more information about the format] </sweep> [...] </sweeps>
Reimplemented from SimPT_Parex::Exploration.
Definition at line 188 of file ParameterExploration.cpp.
References SimPT_Parex::Exploration::ToPtree().
