38 using Sample = std::pair<double, double>;
51 template <
class Basis>
65 for (
const Sample sample : sequence) {
92 parameters_ = solution.
at(0);
static NonlinearFactorGraph NonlinearGraph(const Sequence &sequence, const SharedNoiseModel &model, size_t N)
Create nonlinear FG from Sequence.
static GaussianFactorGraph::shared_ptr LinearGraph(const Sequence &sequence, const SharedNoiseModel &model, size_t N)
Create linear FG from Sequence.
IsDerived< DERIVEDFACTOR > emplace_shared(Args &&... args)
Emplace a shared pointer to factor of given type.
Factor Graph consisting of non-linear factors.
noiseModel::Diagonal::shared_ptr model
Factor definitions for various Basis functors.
typename Basis::Parameters Parameters
NonlinearFactorGraph graph
std::shared_ptr< GaussianFactorGraph > linearize(const Values &linearizationPoint) const
Linearize a nonlinear factor graph.
std::map< double, double > Sequence
Our sequence representation is a map of {x: y} values where y = f(x)
Factor for enforcing the scalar value of the polynomial BASIS representation at x is the same as the ...
Compute an interpolating basis.
Linear Factor Graph where all factors are Gaussians.
std::shared_ptr< This > shared_ptr
shared_ptr to this class
FitBasis(const Sequence &sequence, const SharedNoiseModel &model, size_t N)
Construct a new FitBasis object.
void insert(Key j, const Value &val)
Parameters parameters() const
Return Fourier coefficients.
std::pair< double, double > Sample
A sample is a key-value pair from a sequence.
noiseModel::Base::shared_ptr SharedNoiseModel