10 #ifndef SACADO_SCALARPARAMETERFAMILY_HPP
11 #define SACADO_SCALARPARAMETERFAMILY_HPP
18 using namespace mpl::placeholders;
21 template <
typename EvalTypeTraits = DefaultEvalTypeTraits>
24 ScalarParameterEntry<_,EvalTypeTraits> >
36 bool supports_analytic_) :
37 BaseT(name_, supports_ad_, supports_analytic_) {}
46 it != this->family.end(); ++it)
47 (*it).second->setRealValue(value);
51 template <
class EvalType>
55 this->
template getEntry<EvalType>()->setRealValue(value);
59 template <
class EvalType>
61 setValue(
const typename EvalTypeTraits::template apply<EvalType>::type&
value)
63 this->
template getEntry<EvalType>()->setValue(value);
67 template <
class EvalType>
71 return this->
template getEntry<EvalType>()->getRealValue();
75 template <
class EvalType>
76 const typename EvalTypeTraits::template apply<EvalType>::type&
79 return this->
template getEntry<EvalType>()->getValue();
102 template <
typename EvalType,
typename EvalTypeTraits>
106 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.