Tesseract 3.02

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes
QUAD_COEFFS Class Reference

`#include <quadratc.h>`

List of all members.

## 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

## Detailed Description

Definition at line 25 of file quadratc.h.

## Constructor & Destructor Documentation

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.

{
a = xsq;
b = x;
c = constant;
}

## Member Function Documentation

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.

{ //at x
return (float) ((a * x + b) * x + c);
}

## Member Data Documentation

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.

The documentation for this class was generated from the following file:

- /mnt/data/src/tesseract-ocr/ccstruct/quadratc.h