Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Types | Protected Attributes | Private Member Functions | List of all members
Sacado::ParameterLibraryBase< FamilyType, EntryType > Class Template Reference

Class to provide a centralized library for setting/retrieving numerical parameter values. More...

#include <Sacado_ParameterLibraryBase.hpp>

Inheritance diagram for Sacado::ParameterLibraryBase< FamilyType, EntryType >:
Inheritance graph
[legend]

Public Types

typedef FamilyMap::iterator iterator
 Iterator typename. More...
 
typedef FamilyMap::const_iterator const_iterator
 Const iterator typename. More...
 

Public Member Functions

 ParameterLibraryBase ()
 Default constructor. More...
 
virtual ~ParameterLibraryBase ()
 Destructor. More...
 
bool isParameter (const std::string &name) const
 Determine if parameter of name name is in the library. More...
 
template<typename EvalType >
bool isParameterForType (const std::string &name) const
 Determine if parameter of name name has type type. More...
 
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. More...
 
template<typename EvalType >
Teuchos::RCP< const typename
Sacado::mpl::apply< EntryType,
EvalType >::type > 
getEntry (const std::string &name) const
 Return parameter entry. More...
 
unsigned int size () const
 Return number of parameters in library. More...
 
iterator begin ()
 Iterator pointing at beginning of library. More...
 
const_iterator begin () const
 Iterator pointing at beginning of library. More...
 
iterator end ()
 Iterator pointing at end of library. More...
 
const_iterator end () const
 Iterator pointing at end of library. More...
 
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. More...
 
void print (std::ostream &os, bool print_values=false) const
 Print parameter library. More...
 
void clear ()
 Clear the library. More...
 

Protected Types

typedef std::map< string,
Teuchos::RCP< FamilyType > > 
FamilyMap
 Map of all parameter families. More...
 

Protected Attributes

FamilyMap library
 Scalar parameter library. More...
 

Private Member Functions

 ParameterLibraryBase (const ParameterLibraryBase &)
 Private to prohibit copying. More...
 
ParameterLibraryBaseoperator= (const ParameterLibraryBase &)
 Private to prohibit copying. More...
 

Detailed Description

template<typename FamilyType, typename EntryType>
class Sacado::ParameterLibraryBase< FamilyType, EntryType >

Class to provide a centralized library for setting/retrieving numerical parameter values.

Definition at line 50 of file Sacado_ParameterLibraryBase.hpp.

Member Typedef Documentation

template<typename FamilyType, typename EntryType>
typedef std::map<string, Teuchos::RCP<FamilyType> > Sacado::ParameterLibraryBase< FamilyType, EntryType >::FamilyMap
protected

Map of all parameter families.

Definition at line 55 of file Sacado_ParameterLibraryBase.hpp.

template<typename FamilyType, typename EntryType>
typedef FamilyMap::iterator Sacado::ParameterLibraryBase< FamilyType, EntryType >::iterator

Iterator typename.

Definition at line 60 of file Sacado_ParameterLibraryBase.hpp.

template<typename FamilyType, typename EntryType>
typedef FamilyMap::const_iterator Sacado::ParameterLibraryBase< FamilyType, EntryType >::const_iterator

Const iterator typename.

Definition at line 63 of file Sacado_ParameterLibraryBase.hpp.

Constructor & Destructor Documentation

template<typename FamilyType , typename EntryType >
Sacado::ParameterLibraryBase< FamilyType, EntryType >::ParameterLibraryBase ( )

Default constructor.

Definition at line 34 of file Sacado_ParameterLibraryBaseImp.hpp.

template<typename FamilyType , typename EntryType >
Sacado::ParameterLibraryBase< FamilyType, EntryType >::~ParameterLibraryBase ( )
virtual

Destructor.

Definition at line 40 of file Sacado_ParameterLibraryBaseImp.hpp.

template<typename FamilyType, typename EntryType>
Sacado::ParameterLibraryBase< FamilyType, EntryType >::ParameterLibraryBase ( const ParameterLibraryBase< FamilyType, EntryType > &  )
private

Private to prohibit copying.

Member Function Documentation

template<typename FamilyType , typename EntryType >
bool Sacado::ParameterLibraryBase< FamilyType, EntryType >::isParameter ( const std::string &  name) const

Determine if parameter of name name is in the library.

Definition at line 47 of file Sacado_ParameterLibraryBaseImp.hpp.

template<typename FamilyType , typename EntryType >
template<class EvalType >
bool Sacado::ParameterLibraryBase< FamilyType, EntryType >::isParameterForType ( const std::string &  name) const

Determine if parameter of name name has type type.

Definition at line 59 of file Sacado_ParameterLibraryBaseImp.hpp.

template<typename FamilyType , typename EntryType >
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.

Definition at line 75 of file Sacado_ParameterLibraryBaseImp.hpp.

template<typename FamilyType , typename EntryType>
template<class EvalType >
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.

Definition at line 95 of file Sacado_ParameterLibraryBaseImp.hpp.

template<typename FamilyType , typename EntryType >
template<class EvalType >
Teuchos::RCP< typename Sacado::mpl::apply< EntryType, EvalType >::type > Sacado::ParameterLibraryBase< FamilyType, EntryType >::getEntry ( const std::string &  name)

Return parameter entry.

Definition at line 117 of file Sacado_ParameterLibraryBaseImp.hpp.

template<typename FamilyType , typename EntryType >
template<class EvalType >
Teuchos::RCP< const typename Sacado::mpl::apply< EntryType, EvalType >::type > Sacado::ParameterLibraryBase< FamilyType, EntryType >::getEntry ( const std::string &  name) const

Return parameter entry.

Definition at line 137 of file Sacado_ParameterLibraryBaseImp.hpp.

template<typename FamilyType, typename EntryType>
unsigned int Sacado::ParameterLibraryBase< FamilyType, EntryType >::size ( ) const
inline

Return number of parameters in library.

Definition at line 109 of file Sacado_ParameterLibraryBase.hpp.

template<typename FamilyType, typename EntryType>
iterator Sacado::ParameterLibraryBase< FamilyType, EntryType >::begin ( )
inline

Iterator pointing at beginning of library.

Definition at line 112 of file Sacado_ParameterLibraryBase.hpp.

template<typename FamilyType, typename EntryType>
const_iterator Sacado::ParameterLibraryBase< FamilyType, EntryType >::begin ( ) const
inline

Iterator pointing at beginning of library.

Definition at line 115 of file Sacado_ParameterLibraryBase.hpp.

template<typename FamilyType, typename EntryType>
iterator Sacado::ParameterLibraryBase< FamilyType, EntryType >::end ( )
inline

Iterator pointing at end of library.

Definition at line 118 of file Sacado_ParameterLibraryBase.hpp.

template<typename FamilyType, typename EntryType>
const_iterator Sacado::ParameterLibraryBase< FamilyType, EntryType >::end ( ) const
inline

Iterator pointing at end of library.

Definition at line 121 of file Sacado_ParameterLibraryBase.hpp.

template<typename FamilyType, typename EntryType >
template<typename BaseValueType >
void Sacado::ParameterLibraryBase< FamilyType, EntryType >::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.

Definition at line 157 of file Sacado_ParameterLibraryBaseImp.hpp.

template<typename FamilyType , typename EntryType >
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.

Definition at line 178 of file Sacado_ParameterLibraryBaseImp.hpp.

template<typename FamilyType, typename EntryType>
void Sacado::ParameterLibraryBase< FamilyType, EntryType >::clear ( )
inline

Clear the library.

Definition at line 138 of file Sacado_ParameterLibraryBase.hpp.

template<typename FamilyType, typename EntryType>
ParameterLibraryBase& Sacado::ParameterLibraryBase< FamilyType, EntryType >::operator= ( const ParameterLibraryBase< FamilyType, EntryType > &  )
private

Private to prohibit copying.

Member Data Documentation

template<typename FamilyType, typename EntryType>
FamilyMap Sacado::ParameterLibraryBase< FamilyType, EntryType >::library
protected

Scalar parameter library.

Definition at line 151 of file Sacado_ParameterLibraryBase.hpp.


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