|
tesseract 3.04.01
|
Public Member Functions | |
| SimpleClusterer (int max_cluster_width) | |
| void | Add (int value) |
| int | size () const |
| void | GetClusters (GenericVector< Cluster > *clusters) |
Definition at line 654 of file paragraphs.cpp.
| tesseract::SimpleClusterer::SimpleClusterer | ( | int | max_cluster_width | ) | [inline, explicit] |
Definition at line 656 of file paragraphs.cpp.
{ return values_.size(); }
void GetClusters(GenericVector<Cluster> *clusters);
| void tesseract::SimpleClusterer::Add | ( | int | value | ) | [inline] |
Definition at line 658 of file paragraphs.cpp.
:
int max_cluster_width_;
| void tesseract::SimpleClusterer::GetClusters | ( | GenericVector< Cluster > * | clusters | ) |
Definition at line 678 of file paragraphs.cpp.
{
int orig_i = i;
int lo = values_[i];
int hi = lo;
while (++i < values_.size() && values_[i] <= lo + max_cluster_width_) {
hi = values_[i];
}
clusters->push_back(Cluster((hi + lo) / 2, i - orig_i));
}
}
// Calculate left- and right-indent tab stop values seen in
// rows[row_start, row_end) given a tolerance of tolerance.
| int tesseract::SimpleClusterer::size | ( | ) | const [inline] |
Definition at line 659 of file paragraphs.cpp.
:
int max_cluster_width_;