89 template <
typename DERIVED>
99 for (
int i = 0;
i < X.size();
i++)
100 W.row(
i) = DERIVED::CalculateWeights(N,
X(
i));
115 for (
int i = 0;
i < X.size();
i++)
116 W.row(
i) = DERIVED::CalculateWeights(N,
X(
i), a, b);
137 : weights_(DERIVED::CalculateWeights(N, x)) {}
141 : weights_(DERIVED::CalculateWeights(N, x, a, b)) {}
144 double apply(
const typename DERIVED::Parameters&
p,
147 return (weights_ * p)(0);
156 void print(
const std::string&
s =
"")
const {
157 std::cout <<
s << (
s !=
"" ?
" " :
"") << weights_ << std::endl;
208 return P.matrix() * this->weights_.transpose();
255 calculateJacobian(N);
262 calculateJacobian(N);
306 :
Base(
M, N, x, a, b) {}
315 T result = T::ChartAtOrigin::Retract(xi,
H ? &D_result_xi : 0);
320 if (
H) *
H = D_result_xi * (*H);
343 : weights_(DERIVED::DerivativeWeights(N, x)) {}
346 : weights_(DERIVED::DerivativeWeights(N, x, a, b)) {}
348 void print(
const std::string& s =
"")
const {
349 std::cout << s << (s !=
"" ?
" " :
"") << weights_ << std::endl;
370 double apply(
const typename DERIVED::Parameters& p,
373 return (this->weights_ * p)(0);
430 return P.matrix() * this->weights_.transpose();
465 for (
int j = 0;
j < this->weights_.size();
j++)
466 H_(0, rowIndex_ +
j * M_) = this->
weights_(
j);
476 calculateJacobian(N);
483 calculateJacobian(N);
489 return P.row(rowIndex_) * this->weights_.transpose();
void print(const std::string &s="") const
Matrix< RealScalar, Dynamic, Dynamic > M
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
Matrix kroneckerProductIdentity(size_t M, const Weights &w)
Function for computing the kronecker product of the 1*N Weight vector w with the MxM identity matrix ...
EvaluationFunctor(size_t N, double x)
Constructor with interval [a,b].
DerivativeFunctor()
For serialization.
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW
ComponentDerivativeFunctor(size_t M, size_t N, size_t i, double x, double a, double b)
Construct with row index and interval.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW VectorEvaluationFunctor()
For serialization.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate set rrange [*:*] noreverse nowriteback set trange [*:*] noreverse nowriteback set urange [*:*] noreverse nowriteback set vrange [*:*] noreverse nowriteback set xlabel matrix size set x2label set timefmt d m y n H
VectorComponentFunctor(size_t M, size_t N, size_t i, double x)
Construct with row index.
void calculateJacobian(size_t N)
T apply(const Matrix &P, OptionalJacobian< -1, -1 > H={}) const
Manifold evaluation.
DerivativeFunctor(size_t N, double x)
double apply(const Matrix &P, OptionalJacobian< -1, -1 > H={}) const
Calculate derivative of component rowIndex_ of F.
DerivativeFunctorBase()
For serialization.
VectorEvaluationFunctor(size_t M, size_t N, double x, double a, double b)
Constructor, with interval [a,b].
ManifoldEvaluationFunctor(size_t N, double x)
Default Constructor.
VectorComponentFunctor(size_t M, size_t N, size_t i, double x, double a, double b)
Construct with row index and interval.
EvaluationFunctor(size_t N, double x, double a, double b)
Constructor with interval [a,b].
DerivativeFunctorBase(size_t N, double x, double a, double b)
double operator()(const Matrix &P, OptionalJacobian< -1, -1 > H={}) const
c++ sugar
ManifoldEvaluationFunctor(size_t N, double x, double a, double b)
Constructor, with interval [a,b].
void print(const std::string &s="") const
static Matrix WeightMatrix(size_t N, const Vector &X, double a, double b)
Calculate weights for all x in vector X, with interval [a,b].
double apply(const Matrix &P, OptionalJacobian< -1, -1 > H={}) const
Calculate component of component rowIndex_ of P.
DerivativeFunctorBase(size_t N, double x)
VectorEvaluationFunctor(size_t M, size_t N, double x)
Default Constructor.
Vector apply(const Matrix &P, OptionalJacobian< -1, -1 > H={}) const
DerivativeFunctor(size_t N, double x, double a, double b)
ManifoldEvaluationFunctor()
For serialization.
EvaluationFunctor()
For serialization.
ComponentDerivativeFunctor(size_t M, size_t N, size_t i, double x)
Construct with row index.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW VectorDerivativeFunctor()
For serialization.
static Matrix WeightMatrix(size_t N, const Vector &X)
VectorDerivativeFunctor(size_t M, size_t N, double x, double a, double b)
Constructor, with optional interval [a,b].
double operator()(const typename DERIVED::Parameters &p, OptionalJacobian< -1, -1 > H={}) const
c++ sugar
double apply(const typename DERIVED::Parameters &p, OptionalJacobian<-1, -1 > H={}) const
Regular 1D evaluation.
VectorDerivativeFunctor(size_t M, size_t N, double x)
Default Constructor.
ComponentDerivativeFunctor()
For serialization.
Vector operator()(const Matrix &P, OptionalJacobian< -1, -1 > H={}) const
c++ sugar
VectorComponentFunctor()
For serialization.
Vector apply(const Matrix &P, OptionalJacobian< -1, -1 > H={}) const
M-dimensional evaluation.
double apply(const typename DERIVED::Parameters &p, OptionalJacobian< -1, -1 > H={}) const
Vector operator()(const Matrix &P, OptionalJacobian< -1, -1 > H={}) const
c++ sugar
Special class for optional Jacobian arguments.
double operator()(const Matrix &P, OptionalJacobian< -1, -1 > H={}) const
c++ sugar
The matrix class, also used for vectors and row-vectors.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
internal::enable_if< internal::valid_indexed_view_overload< RowIndices, ColIndices >::value &&internal::traits< typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::ReturnAsIndexedView, typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::type operator()(const RowIndices &rowIndices, const ColIndices &colIndices) EIGEN_INDEXED_VIEW_METHOD_CONST
double operator()(const typename DERIVED::Parameters &p, OptionalJacobian<-1, -1 > H={}) const
c++ sugar
Base class for functors below that calculate derivative weights.
T operator()(const Matrix &P, OptionalJacobian< -1, -1 > H={}) const
c++ sugar
void calculateJacobian(size_t N)