|
BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Container with parameters for IParametricComponent object. More...
Inheritance diagram for ParameterPool:Public Member Functions | |
| ParameterPool () | |
| Constructs an empty parameter pool. | |
| RealParameter & | addParameter (RealParameter *newPar) |
| Adds parameter to the pool, and returns reference to the input pointer. More... | |
| void | clear () |
| Clears the parameter map. | |
| ParameterPool * | clone () const |
| Returns a literal clone. | |
| void | copyToExternalPool (const std::string &prefix, ParameterPool *other_pool) const |
| Copies parameters of given pool to other pool, prepeding prefix to the parameter names. | |
| bool | empty () const |
| std::vector< RealParameter * > | getMatchedParameters (const std::string &pattern) const |
| Returns nonempty vector of parameters that match the pattern ('*' allowed), or throws. | |
| RealParameter * | getUniqueMatch (const std::string &pattern) const |
| Returns the one parameter that matches the pattern (wildcards '*' allowed), or throws. | |
| RealParameter * | operator[] (size_t index) |
| const RealParameter * | operator[] (size_t index) const |
| RealParameter * | parameter (const std::string &name) |
| Returns parameter with given name. | |
| const RealParameter * | parameter (const std::string &name) const |
| Returns parameter with given name. | |
| std::vector< std::string > | parameterNames () const |
| const std::vector< RealParameter * > | parameters () const |
| Returns full vector of parameters. | |
| void | removeParameter (const std::string &name) |
| Removes parameter with given name from the pool. | |
| int | setMatchedParametersValue (const std::string &wildcards, double value) |
| Sets value of the nonzero parameters that match pattern ('*' allowed), or throws. | |
| void | setParameterValue (const std::string &name, double value) |
| Sets parameter value. | |
| void | setUniqueMatchValue (const std::string &pattern, double value) |
| Sets value of the one parameter that matches pattern ('*' allowed), or throws. | |
| size_t | size () const |
| Returns number of parameters in the pool. | |
Friends | |
| std::ostream & | operator<< (std::ostream &ostr, const ParameterPool &obj) |
Container with parameters for IParametricComponent object.
| RealParameter & ParameterPool::addParameter | ( | RealParameter * | newPar | ) |
Adds parameter to the pool, and returns reference to the input pointer.
Returning the input pointer allows us to concatenate function calls like pool->addParameter( new RealParameter(...) ).setLimits(-1,+1).setFixed().setUnit("nm")