38using Sample = std::pair<double, double>;
54 using Parameters =
typename Basis::Parameters;
57 Parameters parameters_;
65 for (
const Sample sample : sequence) {
77 values.
insert<Parameters>(0, Parameters::Zero(N));
92 parameters_ = solution.
at(0);
Compute an interpolating basis.
Factor definitions for various Basis functors.
Linear Factor Graph where all factors are Gaussians.
Factor Graph consisting of non-linear factors.
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
std::map< double, double > Sequence
Our sequence representation is a map of {x: y} values where y = f(x)
Definition: FitBasis.h:36
std::pair< double, double > Sample
A sample is a key-value pair from a sequence.
Definition: FitBasis.h:38
noiseModel::Base::shared_ptr SharedNoiseModel
Note, deliberately not in noiseModel namespace.
Definition: NoiseModel.h:736
Factor for enforcing the scalar value of the polynomial BASIS representation at x is the same as the ...
Definition: BasisFactors.h:34
Class that does regression via least squares Example usage: size_t N = 3; auto fit = FitBasis<Chebysh...
Definition: FitBasis.h:52
static NonlinearFactorGraph NonlinearGraph(const Sequence &sequence, const SharedNoiseModel &model, size_t N)
Create nonlinear FG from Sequence.
Definition: FitBasis.h:61
Parameters parameters() const
Return Fourier coefficients.
Definition: FitBasis.h:96
FitBasis(const Sequence &sequence, const SharedNoiseModel &model, size_t N)
Construct a new FitBasis object.
Definition: FitBasis.h:89
static GaussianFactorGraph::shared_ptr LinearGraph(const Sequence &sequence, const SharedNoiseModel &model, size_t N)
Create linear FG from Sequence.
Definition: FitBasis.h:73
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
Definition: GaussianFactorGraph.h:75
This class represents a collection of vector-valued variables associated each with a unique integer i...
Definition: VectorValues.h:74
Vector & at(Key j)
Read/write access to the vector value with key j, throws std::out_of_range if j does not exist,...
Definition: VectorValues.h:137
A non-linear factor graph is a graph of non-Gaussian, i.e.
Definition: NonlinearFactorGraph.h:78
A non-templated config holding any types of Manifold-group elements.
Definition: Values.h:63
void insert(Key j, const Value &val)
Add a variable with the given j, throws KeyAlreadyExists<J> if j is already present.
Definition: Values.cpp:132