20 #ifndef TESSERACT_CCSTRUCT_DPPOINT_H_ 21 #define TESSERACT_CCSTRUCT_DPPOINT_H_ 52 : local_cost_(0), total_cost_(INT32_MAX), total_steps_(1), best_prev_(nullptr),
53 n_(0), sig_x_(0), sig_xsq_(0) {
61 static DPPoint*
Solve(
int min_step,
int max_step,
bool debug,
78 local_cost_ += new_cost;
85 void UpdateIfBetter(int64_t cost, int32_t steps,
const DPPoint* prev,
86 int32_t n, int32_t sig_x, int64_t sig_xsq);
101 #endif // TESSERACT_CCSTRUCT_DPPOINT_H_ int64_t CostWithVariance(const DPPoint *prev)
static DPPoint * Solve(int min_step, int max_step, bool debug, CostFunc cost_func, int size, DPPoint *points)
void AddLocalCost(int new_cost)
const DPPoint * best_prev() const
int64_t(DPPoint::* CostFunc)(const DPPoint *prev)