30 #ifndef SACADO_SCALARPARAMETERFAMILY_HPP
31 #define SACADO_SCALARPARAMETERFAMILY_HPP
38 using namespace mpl::placeholders;
41 template <
typename EvalTypeTraits = DefaultEvalTypeTraits>
44 ScalarParameterEntry<_,EvalTypeTraits> >
56 bool supports_analytic_) :
57 BaseT(name_, supports_ad_, supports_analytic_) {}
66 it != this->family.end(); ++it)
67 (*it).second->setRealValue(value);
71 template <
class EvalType>
75 this->
template getEntry<EvalType>()->setRealValue(value);
79 template <
class EvalType>
81 setValue(
const typename EvalTypeTraits::template apply<EvalType>::type& value)
83 this->
template getEntry<EvalType>()->setValue(value);
87 template <
class EvalType>
91 return this->
template getEntry<EvalType>()->getRealValue();
95 template <
class EvalType>
96 const typename EvalTypeTraits::template apply<EvalType>::type&
99 return this->
template getEntry<EvalType>()->getValue();
122 template <
typename EvalType,
typename EvalTypeTraits>
126 return spf.template getValue<EvalType>();
void setRealValueForAllTypes(double value)
Set paramter value using a real number.
EvalTypeTraits::template apply< EvalType >::type ScalarT
Sacado::ScalarParameterEntry< EvalType >::ScalarT getValue(const ScalarParameterFamily< EvalTypeTraits > &spf)
Get the value.
const EvalTypeTraits::template apply< EvalType >::type & getValue() const
Get parameter value.
double getRealValue() const
Get real parameter value.
Sacado::ParameterFamilyBase< AbstractScalarParameterEntry, ScalarParameterEntry< _, EvalTypeTraits > > BaseT
Typename synonym of base class.
virtual ~ScalarParameterFamily()
Destructor.
EvalMap::iterator iterator
Iterator for EvalMap.
ScalarParameterFamily(const std::string &name_, bool supports_ad_, bool supports_analytic_)
Constructor.
A base class for scalar parameter values.
Abstract interface for all entries in Sacado::ScalarParameterFamily.
Specialization of Sacado::ParameterFamilyBase for scalar parameters.
void setValue(const typename EvalTypeTraits::template apply< EvalType >::type &value)
Set parameter to value value treating parameter as a constant.
void setRealValue(double value)
Set real parameter value.