#include <mitkModelFitStaticParameterMap.h>
|
| StaticParameterMap () |
|
void | Add (const std::string &name, const ValueType &newList) |
| Adds the given value list under the given variable name if the name doesn't exist already. If it does exist, nothing is added. More...
|
|
const ValueType & | Get (const std::string &name) const |
| Returns the values of the given variable name. More...
|
|
MapType::size_type | Size () const |
|
const_iterator | begin () const |
|
const_iterator | end () const |
|
void | Sort (const std::string &name="") |
| Sorts the values of the given variable name in ascending order. The values of all other variables will also be switched in that specific order. If name is empty or the variable could not be found, the map is ordered by the first variable that contains more than one value (also in ascending order). More...
|
|
void | Clear () |
| Resets the map, so it's empty. More...
|
|
Data structure that is used to store information about the static parameters of a model fit
Definition at line 28 of file mitkModelFitStaticParameterMap.h.
◆ const_iterator
◆ StaticParameterType
◆ ValueType
◆ StaticParameterMap()
mitk::modelFit::StaticParameterMap::StaticParameterMap |
( |
| ) |
|
|
inline |
◆ Add()
void mitk::modelFit::StaticParameterMap::Add |
( |
const std::string & |
name, |
|
|
const ValueType & |
newList |
|
) |
| |
Adds the given value list under the given variable name if the name doesn't exist already. If it does exist, nothing is added.
- Precondition
- The given list must contain either 1 or n values, where n is the amount of values that lists contain which are already part of the map (and contain more than one value). That means if the map is empty or contains only lists that have only one value each, this rule doesn't apply. An exception is thrown otherwise.
- Parameters
-
name | The name of the variable to which the values should be added. |
newList | The value list that should be added. |
- Exceptions
-
ModelFitException | If the given list contains an amount of values that is greater than 1 and doesn't match the amount of values of the lists that are already part of the map (see pre-condition). |
◆ begin()
◆ Clear()
void mitk::modelFit::StaticParameterMap::Clear |
( |
| ) |
|
Resets the map, so it's empty.
◆ end()
◆ Get()
const ValueType& mitk::modelFit::StaticParameterMap::Get |
( |
const std::string & |
name | ) |
const |
◆ Size()
MapType::size_type mitk::modelFit::StaticParameterMap::Size |
( |
| ) |
const |
|
inline |
◆ Sort()
void mitk::modelFit::StaticParameterMap::Sort |
( |
const std::string & |
name = "" | ) |
|
Sorts the values of the given variable name in ascending order. The values of all other variables will also be switched in that specific order. If name is empty or the variable could not be found, the map is ordered by the first variable that contains more than one value (also in ascending order).
Example:
- Before sorting:
- "A": [3, 2, 5, 1, 4]
- "B": [0]
- "C": [3, 4, 1, 5, 2]
- Sort():
- "A": [1, 2, 3, 4, 5]
- "B": [0]
- "C": [5, 4, 3, 2, 1]
- Sort("B"):
- "A": [5, 4, 3, 2, 1]
- "B": [0]
- "C": [1, 2, 3, 4, 5]
- Sort("X"):
- "A": [1, 2, 3, 4, 5]
- "B": [0]
- "C": [5, 4, 3, 2, 1]
- Parameters
-
name | The name of the variable the map should be sorted by. |
The documentation for this class was generated from the following file: