19 std::vector<double> vec;
28 const double *z,
const int n) {
29 for(
int i = 0; i < n; i++) {
37 const std::vector<double> &y,
38 const std::vector<double> &z) {
39 for(
int i = 0; i < (int)x.size(); i++) {
52 std::vector<double> vec;
85 double det = 4.0 * d * f - e * e;
86 if(det == 0.0)
return 1;
89 x = (c * e - 2.0 * b * f) / det;
90 y = (b * e - 2.0 * c * d) / det;
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 ...
Nth degree Polynomial with two variables.
void Solve()
Fit a surface to the input triplets.
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...
double Evaluate(const std::vector< double > &input)
Invokes the BasisFunction Evaluate method.
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...
Generic least square fitting class.
void AddKnown(const std::vector< double > &input, double expected, double weight=1.0)
Invoke this method for each set of knowns.
double Coefficient(int i) const
Returns the ith coefficient.
double Evaluate(const double x, const double y)
Evaluate at x,y to compute z. This is available after the Solve method is invoked.
SurfaceModel()
Constructor.
Namespace for ISIS/Bullet specific routines.
~SurfaceModel()
Destructor.
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...