#include <algorithm>
#include <vector>
+#include "knot.h"
#include "polynomial.h"
namespace Msp {
static Type make(const T *v) { return *v; }
};
+template<typename T, unsigned N>
+struct SplineKnot
+{
+ typedef typename SplineValue<T, N>::Type Value;
+ T x;
+ Value y;
+
+ SplineKnot(): x(T()) { }
+ SplineKnot(T x_, const Value &y_): x(x_), y(y_) { }
+};
+
/**
Stores a spline of degree D. It is a piecewise polynomial function with value
continuity. Derivatives are not guaranteed to be continuous.
{
public:
typedef typename SplineValue<T, N>::Type Value;
-
- struct Knot
- {
- T x;
- Value y;
-
- Knot(): x(T()) { }
- Knot(T x_, const Value &y_): x(x_), y(y_) { }
- };
+ typedef SplineKnot<T, N> Knot;
struct Segment
{