Sacado
Development
|
Class to provide a centralized library for setting/retrieving numerical parameter values. More...
#include <Sacado_ParameterLibraryBase.hpp>
Public Types | |
typedef FamilyMap::iterator | iterator |
Iterator typename. | |
typedef FamilyMap::const_iterator | const_iterator |
Const iterator typename. | |
Public Member Functions | |
ParameterLibraryBase () | |
Default constructor. | |
virtual | ~ParameterLibraryBase () |
Destructor. | |
bool | isParameter (const std::string &name) const |
Determine if parameter of name name is in the library. | |
template<typename EvalType > | |
bool | isParameterForType (const std::string &name) const |
Determine if parameter of name name has type type. | |
bool | addParameterFamily (const std::string &name, bool supports_ad, bool supports_analytic) |
Create a new parameter family. More... | |
template<typename EvalType > | |
bool | addEntry (const std::string &name, const Teuchos::RCP< typename Sacado::mpl::apply< EntryType, EvalType >::type > &entry, const bool allow_overwrite=false) |
Add a new parameter using custom entry. More... | |
template<typename EvalType > | |
Teuchos::RCP< typename Sacado::mpl::apply< EntryType, EvalType >::type > | getEntry (const std::string &name) |
Return parameter entry. | |
template<typename EvalType > | |
Teuchos::RCP< const typename Sacado::mpl::apply< EntryType, EvalType >::type > | getEntry (const std::string &name) const |
Return parameter entry. | |
unsigned int | size () const |
Return number of parameters in library. | |
iterator | begin () |
Iterator pointing at beginning of library. | |
const_iterator | begin () const |
Iterator pointing at beginning of library. | |
iterator | end () |
Iterator pointing at end of library. | |
const_iterator | end () const |
Iterator pointing at end of library. | |
template<typename BaseValueType > | |
void | fillVector (const Teuchos::Array< std::string > &names, const Teuchos::Array< BaseValueType > &values, ParameterVectorBase< FamilyType, BaseValueType > &pv) |
Fill a vector with the supplied parameter names and values. | |
void | print (std::ostream &os, bool print_values=false) const |
Print parameter library. More... | |
void | clear () |
Clear the library. | |
Protected Types | |
typedef std::map< string, Teuchos::RCP< FamilyType > > | FamilyMap |
Map of all parameter families. | |
Protected Attributes | |
FamilyMap | library |
Scalar parameter library. | |
Class to provide a centralized library for setting/retrieving numerical parameter values.
bool Sacado::ParameterLibraryBase< FamilyType, EntryType >::addEntry | ( | const std::string & | name, |
const Teuchos::RCP< typename Sacado::mpl::apply< EntryType, EvalType >::type > & | entry, | ||
const bool | allow_overwrite = false |
||
) |
Add a new parameter using custom entry.
Returns true if successful in adding entry to library, false otherwise. If allow_overwrite
is true, any existing entry will be overwritten by the supplied entry.
bool Sacado::ParameterLibraryBase< FamilyType, EntryType >::addParameterFamily | ( | const std::string & | name, |
bool | supports_ad, | ||
bool | supports_analytic | ||
) |
Create a new parameter family.
Returns true if successful in adding family to library, false otherwise.
Referenced by Sacado::ParameterRegistration< EvalType, EvalTypeTraits >::ParameterRegistration().
void Sacado::ParameterLibraryBase< FamilyType, EntryType >::print | ( | std::ostream & | os, |
bool | print_values = false |
||
) | const |
Print parameter library.
Set print_values = true to print each parameter value for each evaluation type.