|
Tesseract
3.02
|
#include <quadratc.h>
Public Member Functions | |
| QUAD_COEFFS () | |
| QUAD_COEFFS (double xsq, float x, float constant) | |
| float | y (float x) const |
| void | move (ICOORD vec) |
Public Attributes | |
| double | a |
| float | b |
| float | c |
Definition at line 25 of file quadratc.h.
| QUAD_COEFFS::QUAD_COEFFS | ( | ) | [inline] |
Definition at line 28 of file quadratc.h.
{
} //empty constructor
| QUAD_COEFFS::QUAD_COEFFS | ( | double | xsq, |
| float | x, | ||
| float | constant | ||
| ) | [inline] |
Definition at line 30 of file quadratc.h.
| void QUAD_COEFFS::move | ( | ICOORD | vec | ) | [inline] |
Definition at line 44 of file quadratc.h.
{ // by vector
/************************************************************
y - q = a (x - p)^2 + b (x - p) + c
y - q = ax^2 - 2apx + ap^2 + bx - bp + c
y = ax^2 + (b - 2ap)x + (c - bp + ap^2 + q)
************************************************************/
inT16 p = vec.x ();
inT16 q = vec.y ();
c = (float) (c - b * p + a * p * p + q);
b = (float) (b - 2 * a * p);
}
| float QUAD_COEFFS::y | ( | float | x | ) | const [inline] |
Definition at line 39 of file quadratc.h.
| double QUAD_COEFFS::a |
Definition at line 58 of file quadratc.h.
| float QUAD_COEFFS::b |
Definition at line 59 of file quadratc.h.
| float QUAD_COEFFS::c |
Definition at line 60 of file quadratc.h.