Templatize to avoid hardcoded typedef

Prepare for changing the size of the blocks by templatize BVectors and
Evalution
This commit is contained in:
Tor Harald Sandve
2016-12-12 14:52:30 +01:00
parent 28c36ef949
commit 2bfa96fddf
8 changed files with 109 additions and 89 deletions

View File

@@ -36,7 +36,6 @@ namespace detail {
typedef AutoDiffBlock<double> ADB;
typedef DenseAd::Evaluation<double, /*size=*/6> EvalWell;
/**
@@ -49,6 +48,7 @@ inline double zeroIfNan(const double& value) {
/**
* Returns zero if input value is NaN
*/
template <class EvalWell>
inline double zeroIfNan(const EvalWell& value) {
return (std::isnan(value.value())) ? 0.0 : value.value();
}