LOCA::ParameterVector Class Reference

LOCA's container for holding a set of parameters that are used by the LOCA continuation routines. More...

#include <LOCA_Parameter_Vector.H>

Collaboration diagram for LOCA::ParameterVector:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ParameterVector ()
 Constructor.
 ParameterVector (const ParameterVector &source)
 Copy constructor.
ParameterVectorclone () const
 Clone.
 ~ParameterVector ()
 Destructor.
int addParameter (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.
ParameterVectoroperator= (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 (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 (string label) const
 Returns the value of the parameter with the corresponding label. Will throw an error if "label" is not valid.
int getIndex (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 (string label) const
 Returns true if the parameter string "label" corresponds to a parameter label in the object.
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 (ostream &stream) const
 Prints the vector to cout.
const vector< double > & getValuesVector () const
 Accessor to get the underlying stl vector with all parameter values.
const vector< string > & getNamesVector () const
 Accessor to get the underlying stl vector with all parameter names.

Protected Attributes

vector< double > x
 Parameter values.
vector< string > l
 Parameter names.


Detailed Description

LOCA's container for holding a set of parameters that are used by the LOCA continuation routines.

Author:
Roger Pawlowski (SNL 9233)

Definition at line 61 of file LOCA_Parameter_Vector.H.


Constructor & Destructor Documentation

LOCA::ParameterVector::ParameterVector (  ) 

Constructor.

Definition at line 46 of file LOCA_Parameter_Vector.C.

Referenced by clone().

LOCA::ParameterVector::ParameterVector ( const ParameterVector source  ) 

Copy constructor.

Definition at line 52 of file LOCA_Parameter_Vector.C.

LOCA::ParameterVector::~ParameterVector (  ) 

Destructor.

Definition at line 65 of file LOCA_Parameter_Vector.C.


Member Function Documentation

LOCA::ParameterVector * LOCA::ParameterVector::clone (  )  const

Clone.

Definition at line 59 of file LOCA_Parameter_Vector.C.

References ParameterVector().

int LOCA::ParameterVector::addParameter ( string  label,
double  value = 0.0 
)

Adds a parameter to the list. Returns the index value assigned to the parameter.

Definition at line 70 of file LOCA_Parameter_Vector.C.

References l, and x.

Referenced by LOCA::Homotopy::DeflatedGroup::DeflatedGroup(), LOCA::Homotopy::Group::Group(), and LOCA::Epetra::ModelEvaluatorInterface::ModelEvaluatorInterface().

bool LOCA::ParameterVector::init ( double  value  ) 

Initialize the vector. Returns true if successful.

Definition at line 79 of file LOCA_Parameter_Vector.C.

References x.

bool LOCA::ParameterVector::scale ( double  value  ) 

Scales the entire vector by value. Returns true if successful.

Definition at line 87 of file LOCA_Parameter_Vector.C.

References x.

bool LOCA::ParameterVector::scale ( const ParameterVector p  ) 

Scales the vactor with another vector (element-wise multiply). Returns true if successful.

Definition at line 95 of file LOCA_Parameter_Vector.C.

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.

Definition at line 107 of file LOCA_Parameter_Vector.C.

References x.

LOCA::ParameterVector & LOCA::ParameterVector::operator= ( const ParameterVector y  ) 

Set a parameter vector equal to another. This will erase any old parameters in the object.

Definition at line 122 of file LOCA_Parameter_Vector.C.

References l, and x.

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.

Definition at line 130 of file LOCA_Parameter_Vector.C.

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.

Definition at line 140 of file LOCA_Parameter_Vector.C.

References x.

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.

Definition at line 150 of file LOCA_Parameter_Vector.C.

References x.

Referenced by LOCA::Thyra::Group::setParam(), LOCA::LAPACK::Group::setParam(), and LOCA::Epetra::Group::setParam().

void LOCA::ParameterVector::setValue ( string  label,
double  value 
)

Set the value of the parameter with the corresponding label. Will throw an error if "label" is not valid.

Definition at line 162 of file LOCA_Parameter_Vector.C.

References l, and x.

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.

Definition at line 178 of file LOCA_Parameter_Vector.C.

References x.

Referenced by LOCA::Thyra::Group::getParam(), LOCA::LAPACK::Group::getParam(), LOCA::Homotopy::DeflatedGroup::getParam(), LOCA::Epetra::Group::getParam(), and LOCA::Homotopy::Group::setParams().

double LOCA::ParameterVector::getValue ( string  label  )  const

Returns the value of the parameter with the corresponding label. Will throw an error if "label" is not valid.

Definition at line 188 of file LOCA_Parameter_Vector.C.

References l, and x.

int LOCA::ParameterVector::getIndex ( string  label  )  const

double * LOCA::ParameterVector::getDoubleArrayPointer (  ) 

Returns a pointer to a C-style array of the parameter values.

Definition at line 218 of file LOCA_Parameter_Vector.C.

References x.

Referenced by LOCA::Thyra::Group::Group().

bool LOCA::ParameterVector::isParameter ( string  label  )  const

Returns true if the parameter string "label" corresponds to a parameter label in the object.

Definition at line 224 of file LOCA_Parameter_Vector.C.

References l, and x.

string LOCA::ParameterVector::getLabel ( unsigned int  i  )  const

Returns the label of the parameter with index i.

Definition at line 234 of file LOCA_Parameter_Vector.C.

References l.

Referenced by LOCA::MultiContinuation::ExtendedGroup::getContinuationParameterName(), and LOCA::MultiContinuation::ConstrainedGroup::printSolution().

int LOCA::ParameterVector::length (  )  const

void LOCA::ParameterVector::print ( ostream &  stream  )  const

Prints the vector to cout.

Definition at line 246 of file LOCA_Parameter_Vector.C.

References l, and x.

const vector< double > & LOCA::ParameterVector::getValuesVector (  )  const

Accessor to get the underlying stl vector with all parameter values.

Definition at line 263 of file LOCA_Parameter_Vector.C.

References x.

const vector< string > & LOCA::ParameterVector::getNamesVector (  )  const

Accessor to get the underlying stl vector with all parameter names.

Definition at line 269 of file LOCA_Parameter_Vector.C.

References l.


Member Data Documentation

vector<double> LOCA::ParameterVector::x [protected]

vector<string> LOCA::ParameterVector::l [protected]


The documentation for this class was generated from the following files:

Generated on Thu Dec 17 11:02:44 2009 for Nonlinear Solver Project by  doxygen 1.5.9