Remove CurveMatrix, replace it with Eigen3.