|
NOX Development
|
LOCA's container for holding a set of parameters that are used by the LOCA continuation routines. More...
#include <LOCA_Parameter_Vector.H>
Public Member Functions | |
| ParameterVector () | |
| Constructor. | |
| ParameterVector (const ParameterVector &source) | |
| Copy constructor. | |
| ParameterVector * | clone () const |
| Clone. | |
| ~ParameterVector () | |
| Destructor. | |
| int | addParameter (std::string label, double value=0.0) |
| Adds a parameter to the list. Returns the index value assigned to the parameter. | |
| bool | init (double value) |
| Initialize the vector. Returns true if successful. | |
| bool | scale (double value) |
| Scales the entire vector by value. Returns true if successful. | |
| bool | scale (const ParameterVector &p) |
| Scales the vactor with another vector (element-wise multiply). Returns true if successful. | |
| bool | update (double alpha, const ParameterVector &alphaVector, double b) |
| Updates the parameter vector: this = alpha * alphaVector + b * this. Returns true if successful. | |
| ParameterVector & | operator= (const ParameterVector &y) |
| Set a parameter vector equal to another. This will erase any old parameters in the object. | |
| double & | operator[] (unsigned int i) |
| Return a reference to the i-th element. Will throw an error if index is out of range. | |
| const double & | operator[] (unsigned int i) const |
| Return a reference to the i-th element (no l-value type). Will throw an error if index is out of range. | |
| void | setValue (unsigned int i, double value) |
| Set the value of the parameter with index i. Will throw an error if index is out of range. | |
| void | setValue (std::string label, double value) |
| Set the value of the parameter with the corresponding label. Will throw an error if "label" is not valid. | |
| double | getValue (unsigned int i) const |
| Returns the value of the parameter with index i. Will throw an error if index is out of range. | |
| double | getValue (std::string label) const |
| Returns the value of the parameter with the corresponding label. Will throw an error if "label" is not valid. | |
| int | getIndex (std::string label) const |
| Returns the index of the parameter with the corresponding label. Returns a -1 if "label" is not found. | |
| double * | getDoubleArrayPointer () |
| Returns a pointer to a C-style array of the parameter values. | |
| bool | isParameter (std::string label) const |
| Returns true if the parameter std::string "label" corresponds to a parameter label in the object. | |
| std::string | getLabel (unsigned int i) const |
| Returns the label of the parameter with index i. | |
| int | length () const |
| Returns the length of parameter vector. | |
| void | print (std::ostream &stream) const |
| Prints the vector to cout. | |
| const std::vector< double > & | getValuesVector () const |
| Accessor to get the underlying stl vector with all parameter values. | |
| const std::vector< std::string > & | getNamesVector () const |
| Accessor to get the underlying stl vector with all parameter names. | |
Protected Attributes | |
| std::vector< double > | x |
| Parameter values. | |
| std::vector< std::string > | l |
| Parameter names. | |
LOCA's container for holding a set of parameters that are used by the LOCA continuation routines.
| LOCA::ParameterVector::ParameterVector | ( | const ParameterVector & | source | ) |
| int LOCA::ParameterVector::addParameter | ( | std::string | label, |
| double | value = 0.0 ) |
Adds a parameter to the list. Returns the index value assigned to the parameter.
Referenced by LOCA::Homotopy::DeflatedGroup::DeflatedGroup(), LOCA::Homotopy::Group::Group(), LOCA::Homotopy::Group::Group(), and LOCA::Epetra::ModelEvaluatorInterface::ModelEvaluatorInterface().
| double * LOCA::ParameterVector::getDoubleArrayPointer | ( | ) |
Returns a pointer to a C-style array of the parameter values.
References x.
| int LOCA::ParameterVector::getIndex | ( | std::string | label | ) | const |
Returns the index of the parameter with the corresponding label. Returns a -1 if "label" is not found.
Referenced by LOCA::AdaptiveStepper::buildConstrainedGroup(), LOCA::Epetra::AdaptiveStepper::buildConstrainedGroup(), LOCA::MultiStepper::buildConstrainedGroup(), LOCA::Stepper::buildConstrainedGroup(), LOCA::Homotopy::DeflatedGroup::DeflatedGroup(), LOCA::Hopf::MinimallyAugmented::ExtendedGroup::ExtendedGroup(), LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup::ExtendedGroup(), LOCA::Homotopy::Group::Group(), LOCA::Homotopy::Group::Group(), LOCA::Hopf::MinimallyAugmented::ExtendedGroup::setParam(), LOCA::Hopf::MooreSpence::ExtendedGroup::setParam(), LOCA::MultiContinuation::ConstrainedGroup::setParam(), LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup::setParam(), LOCA::Pitchfork::MooreSpence::ExtendedGroup::setParam(), and LOCA::TurningPoint::MooreSpence::ExtendedGroup::setParam().
| std::string LOCA::ParameterVector::getLabel | ( | unsigned int | i | ) | const |
Returns the label of the parameter with index i.
References l.
Referenced by LOCA::MultiContinuation::ExtendedGroup::getContinuationParameterName(), LOCA::MultiContinuation::ConstrainedGroup::printSolution(), and LOCAInterface::setParameters().
| const std::vector< std::string > & LOCA::ParameterVector::getNamesVector | ( | ) | const |
Accessor to get the underlying stl vector with all parameter names.
References l.
| double LOCA::ParameterVector::getValue | ( | std::string | label | ) | const |
| double LOCA::ParameterVector::getValue | ( | unsigned int | i | ) | const |
Returns the value of the parameter with index i. Will throw an error if index is out of range.
References x.
Referenced by LOCA::Epetra::Group::getParam(), LOCA::Homotopy::DeflatedGroup::getParam(), LOCA::LAPACK::Group::getParam(), LOCA::Thyra::Group::getParam(), LOCAInterface::setParameters(), and LOCA::Homotopy::Group::setParams().
| const std::vector< double > & LOCA::ParameterVector::getValuesVector | ( | ) | const |
Accessor to get the underlying stl vector with all parameter values.
References x.
| bool LOCA::ParameterVector::init | ( | double | value | ) |
Initialize the vector. Returns true if successful.
References x.
| bool LOCA::ParameterVector::isParameter | ( | std::string | label | ) | const |
| int LOCA::ParameterVector::length | ( | ) | const |
Returns the length of parameter vector.
References x.
Referenced by LOCA::Epetra::ModelEvaluatorInterface::setParameters(), LOCAInterface::setParameters(), LOCA::Hopf::MinimallyAugmented::ExtendedGroup::setParams(), LOCA::MultiContinuation::ConstrainedGroup::setParams(), and LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup::setParams().
| LOCA::ParameterVector & LOCA::ParameterVector::operator= | ( | const ParameterVector & | y | ) |
| double & LOCA::ParameterVector::operator[] | ( | unsigned int | i | ) |
Return a reference to the i-th element. Will throw an error if index is out of range.
References x.
| const double & LOCA::ParameterVector::operator[] | ( | unsigned int | i | ) | const |
Return a reference to the i-th element (no l-value type). Will throw an error if index is out of range.
References x.
| void LOCA::ParameterVector::print | ( | std::ostream & | stream | ) | const |
| bool LOCA::ParameterVector::scale | ( | const ParameterVector & | p | ) |
Scales the vactor with another vector (element-wise multiply). Returns true if successful.
References x.
| bool LOCA::ParameterVector::scale | ( | double | value | ) |
Scales the entire vector by value. Returns true if successful.
References x.
| void LOCA::ParameterVector::setValue | ( | std::string | label, |
| double | value ) |
| void LOCA::ParameterVector::setValue | ( | unsigned int | i, |
| double | value ) |
Set the value of the parameter with index i. Will throw an error if index is out of range.
References x.
| bool LOCA::ParameterVector::update | ( | double | alpha, |
| const ParameterVector & | alphaVector, | ||
| double | b ) |
Updates the parameter vector: this = alpha * alphaVector + b * this. Returns true if successful.
References x.
|
protected |
Parameter names.
Referenced by addParameter(), getIndex(), getLabel(), getNamesVector(), getValue(), isParameter(), operator=(), ParameterVector(), ParameterVector(), print(), and setValue().
|
protected |
Parameter values.
Referenced by addParameter(), getDoubleArrayPointer(), getIndex(), getValue(), getValue(), getValuesVector(), init(), isParameter(), length(), operator=(), operator[](), operator[](), ParameterVector(), ParameterVector(), print(), scale(), scale(), setValue(), setValue(), and update().