20 #ifndef TESSERACT_CCSTRUCT_LINLSQ_H_
21 #define TESSERACT_CCSTRUCT_LINLSQ_H_
34 void add(
double x,
double y);
36 void add(
double x,
double y,
double weight);
40 void remove(
double x,
double y);
42 return static_cast<int>(total_weight + 0.5);
46 double c(
double m)
const;
47 double rms(
double m,
double c)
const;
61 if (total_weight > 0.0)
62 return (sigxy - sigx * sigy / total_weight) / total_weight;
67 if (total_weight > 0.0)
68 return (sigxx - sigx * sigx / total_weight) / total_weight;
73 if (total_weight > 0.0)
74 return (sigyy - sigy * sigy / total_weight) / total_weight;
88 #endif // TESSERACT_CCSTRUCT_LINLSQ_H_
double y_variance() const
double rms(double m, double c) const
FCOORD mean_point() const
double covariance() const
FCOORD vector_fit() const
double x_variance() const
void add(double x, double y)