Isis Developer Reference
SurfaceModel.h
Go to the documentation of this file.
1 #ifndef SurfaceModel_h
2 #define SurfaceModel_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include <vector>
11 #include "PolynomialBivariate.h"
12 #include "LeastSquares.h"
13 
14 namespace Isis {
34  class SurfaceModel {
35  public:
36  SurfaceModel();
37  ~SurfaceModel();
38 
39  void AddTriplet(const double x, const double y, const double z);
40  void AddTriplets(const double *x, const double *y, const double *z,
41  const int n);
42  void AddTriplets(const std::vector<double> &x,
43  const std::vector<double> &y,
44  const std::vector<double> &z);
45 
46  void Solve();
47  double Evaluate(const double x, const double y);
48 
49  int MinMax(double &x, double &y);
50 
51  private:
52  LeastSquares *p_lsq;
53  PolynomialBivariate *p_poly2d;
54  };
55 };
56 
57 #endif
Isis::LeastSquares::Solve
int Solve(Isis::LeastSquares::SolveMethod method=SVD)
After all the data has been registered through AddKnown, invoke this method to solve the system of eq...
Definition: LeastSquares.cpp:205
SurfaceModel.h
Isis::SurfaceModel::Solve
void Solve()
Fit a surface to the input triplets.
Definition: SurfaceModel.cpp:51
Isis::LeastSquares::Evaluate
double Evaluate(const std::vector< double > &input)
Invokes the BasisFunction Evaluate method.
Definition: LeastSquares.cpp:553
Isis::PolynomialBivariate
Nth degree Polynomial with two variables.
Definition: PolynomialBivariate.h:37
Isis::SurfaceModel::AddTriplets
void AddTriplets(const double *x, const double *y, const double *z, const int n)
Add an array of (x,y,z) triplet to the list of knowns After all knowns are added invoke the Solve met...
Definition: SurfaceModel.cpp:33
Isis::SurfaceModel::AddTriplet
void AddTriplet(const double x, const double y, const double z)
Add a single (x,y,z) triplet to the list of knowns. After all knowns are added invoke the Solve metho...
Definition: SurfaceModel.cpp:24
Isis::LeastSquares
Generic least square fitting class.
Definition: LeastSquares.h:99
Isis::SurfaceModel
Model a 3-D surface.
Definition: SurfaceModel.h:34
Isis::SurfaceModel::SurfaceModel
SurfaceModel()
Constructor.
Definition: SurfaceModel.cpp:11
LeastSquares.h
Isis::SurfaceModel::Evaluate
double Evaluate(const double x, const double y)
Evaluate at x,y to compute z. This is available after the Solve method is invoked.
Definition: SurfaceModel.cpp:57
Isis::SurfaceModel::~SurfaceModel
~SurfaceModel()
Destructor.
Definition: SurfaceModel.cpp:17
Isis::LeastSquares::AddKnown
void AddKnown(const std::vector< double > &input, double expected, double weight=1.0)
Invoke this method for each set of knowns.
Definition: LeastSquares.cpp:96
PolynomialBivariate.h
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::SurfaceModel::MinMax
int MinMax(double &x, double &y)
After invoking Solve, a coordinate (x,y) at a local minimum (or maximum) of the surface model can be ...
Definition: SurfaceModel.cpp:70
Isis::BasisFunction::Coefficient
double Coefficient(int i) const
Returns the ith coefficient.
Definition: BasisFunction.h:107