Skip to content

Commit

Permalink
moved E template parameter to struct level to avoid compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenberry committed Nov 18, 2019
1 parent b8a83bc commit 725b137
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/ascent/algorithms/Derivative.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,13 @@ namespace asc
}

// takes the derivative over three points of history
template <class E>
struct derivative_vector_3
{
std::vector<std::vector<double>> dimensional_history; // each vector is for a dimension, such as x, y, z, . . . (can have more dimensions than 3), saving three time steps of history

// E is intended to be an Eigen::Vector, such as Eigen::Vector3d, supports n dimensional Eigen vectors
template <typename E, typename T0, typename T1>
template <typename T0, typename T1>
inline E operator()(const T0 &t, const T1 &v)
{
const auto n = std::min(t.size(), v.size());
Expand Down

0 comments on commit 725b137

Please sign in to comment.