Tesseract
3.02
|
#include <genericvector.h>
Public Member Functions | |
GenericVector () | |
GenericVector (int size) | |
GenericVector (const GenericVector &other) | |
GenericVector< T > & | operator+= (const GenericVector &other) |
GenericVector< T > & | operator= (const GenericVector &other) |
virtual | ~GenericVector () |
void | reserve (int size) |
void | double_the_size () |
void | init_to_size (int size, T t) |
int | size () const |
int | length () const |
bool | empty () const |
T & | get (int index) const |
T & | back () const |
T & | operator[] (int index) const |
int | get_index (T object) const |
bool | contains (T object) const |
T | contains_index (int index) const |
int | push_back (T object) |
void | operator+= (T t) |
int | push_back_new (T object) |
int | push_front (T object) |
void | set (T t, int index) |
void | insert (T t, int index) |
virtual void | remove (int index) |
virtual void | truncate (int size) |
void | set_clear_callback (TessCallback1< T > *cb) |
void | set_compare_callback (TessResultCallback2< bool, T const &, T const & > *cb) |
virtual void | clear () |
void | delete_data_pointers () |
void | move (GenericVector< T > *from) |
bool | write (FILE *f, TessResultCallback2< bool, FILE *, T const & > *cb) const |
bool | read (FILE *f, TessResultCallback3< bool, FILE *, T *, bool > *cb, bool swap) |
virtual bool | Serialize (FILE *fp) const |
virtual bool | DeSerialize (bool swap, FILE *fp) |
bool | SerializeClasses (FILE *fp) const |
bool | DeSerializeClasses (bool swap, FILE *fp) |
void | sort () |
void | sort (int(*comparator)(const void *, const void *)) |
bool | bool_binary_search (const T &target) const |
int | binary_search (const T &target) const |
void | compact_sorted () |
void | compact (TessResultCallback1< bool, int > *delete_cb) |
T | dot_product (const GenericVector< T > &other) const |
Static Public Member Functions | |
static T * | double_the_size_memcpy (int current_size, T *data) |
Protected Member Functions | |
void | init (int size) |
Protected Attributes | |
inT32 | size_used_ |
inT32 | size_reserved_ |
T * | data_ |
TessCallback1< T > * | clear_cb_ |
TessResultCallback2< bool, T const &, T const & > * | compare_cb_ |
Static Protected Attributes | |
static const int | kDefaultVectorSize = 4 |
Definition at line 35 of file genericvector.h.
|
inline |
Definition at line 37 of file genericvector.h.
|
inlineexplicit |
Definition at line 38 of file genericvector.h.
|
inline |
Definition at line 41 of file genericvector.h.
|
virtual |
Definition at line 471 of file genericvector.h.
T & GenericVector< T >::back | ( | ) | const |
Definition at line 522 of file genericvector.h.
|
inline |
Definition at line 209 of file genericvector.h.
|
inline |
Definition at line 197 of file genericvector.h.
|
virtual |
Reimplemented in tesseract::PointerVector< T >, tesseract::PointerVector< TrainingSample >, tesseract::PointerVector< Shape >, and tesseract::DawgInfoVector.
Definition at line 651 of file genericvector.h.
|
inline |
Definition at line 242 of file genericvector.h.
|
inline |
Definition at line 225 of file genericvector.h.
bool GenericVector< T >::contains | ( | T | object | ) | const |
Definition at line 579 of file genericvector.h.
T GenericVector< T >::contains_index | ( | int | index | ) | const |
Definition at line 562 of file genericvector.h.
void GenericVector< T >::delete_data_pointers | ( | ) |
Definition at line 672 of file genericvector.h.
|
virtual |
Reimplemented in tesseract::PointerVector< T >, tesseract::PointerVector< TrainingSample >, and tesseract::PointerVector< Shape >.
Definition at line 741 of file genericvector.h.
bool GenericVector< T >::DeSerializeClasses | ( | bool | swap, |
FILE * | fp | ||
) |
Definition at line 773 of file genericvector.h.
|
inline |
Definition at line 258 of file genericvector.h.
void GenericVector< T >::double_the_size | ( | ) |
Definition at line 490 of file genericvector.h.
|
inlinestatic |
Definition at line 172 of file genericvector.h.
|
inline |
Definition at line 68 of file genericvector.h.
T & GenericVector< T >::get | ( | int | index | ) | const |
Definition at line 511 of file genericvector.h.
int GenericVector< T >::get_index | ( | T | object | ) | const |
Definition at line 568 of file genericvector.h.
|
protected |
Definition at line 461 of file genericvector.h.
void GenericVector< T >::init_to_size | ( | int | size, |
T | t | ||
) |
Definition at line 501 of file genericvector.h.
void GenericVector< T >::insert | ( | T | t, |
int | index | ||
) |
Definition at line 538 of file genericvector.h.
|
inline |
Definition at line 63 of file genericvector.h.
void GenericVector< T >::move | ( | GenericVector< T > * | from | ) |
Definition at line 788 of file genericvector.h.
GenericVector< T > & GenericVector< T >::operator+= | ( | const GenericVector< T > & | other | ) |
Definition at line 620 of file genericvector.h.
void GenericVector< T >::operator+= | ( | T | t | ) |
Definition at line 615 of file genericvector.h.
GenericVector< T > & GenericVector< T >::operator= | ( | const GenericVector< T > & | other | ) |
Definition at line 629 of file genericvector.h.
T & GenericVector< T >::operator[] | ( | int | index | ) | const |
Definition at line 517 of file genericvector.h.
int GenericVector< T >::push_back | ( | T | object | ) |
Definition at line 585 of file genericvector.h.
int GenericVector< T >::push_back_new | ( | T | object | ) |
Definition at line 595 of file genericvector.h.
int GenericVector< T >::push_front | ( | T | object | ) |
Definition at line 604 of file genericvector.h.
bool GenericVector< T >::read | ( | FILE * | f, |
TessResultCallback3< bool, FILE *, T *, bool > * | cb, | ||
bool | swap | ||
) |
|
virtual |
Reimplemented in tesseract::PointerVector< T >, tesseract::PointerVector< TrainingSample >, and tesseract::PointerVector< Shape >.
Definition at line 552 of file genericvector.h.
void GenericVector< T >::reserve | ( | int | size | ) |
Definition at line 478 of file genericvector.h.
|
virtual |
Reimplemented in tesseract::PointerVector< T >, tesseract::PointerVector< TrainingSample >, and tesseract::PointerVector< Shape >.
Definition at line 730 of file genericvector.h.
bool GenericVector< T >::SerializeClasses | ( | FILE * | fp | ) | const |
Definition at line 759 of file genericvector.h.
void GenericVector< T >::set | ( | T | t, |
int | index | ||
) |
Definition at line 529 of file genericvector.h.
void GenericVector< T >::set_clear_callback | ( | TessCallback1< T > * | cb | ) |
Definition at line 638 of file genericvector.h.
void GenericVector< T >::set_compare_callback | ( | TessResultCallback2< bool, T const &, T const & > * | cb | ) |
Definition at line 645 of file genericvector.h.
|
inline |
Definition at line 59 of file genericvector.h.
void GenericVector< T >::sort | ( | ) |
Reimplemented in tesseract::PointerVector< T >, tesseract::PointerVector< TrainingSample >, and tesseract::PointerVector< Shape >.
Definition at line 803 of file genericvector.h.
|
inline |
Definition at line 190 of file genericvector.h.
|
inlinevirtual |
Reimplemented in tesseract::PointerVector< T >, tesseract::PointerVector< TrainingSample >, and tesseract::PointerVector< Shape >.
Definition at line 112 of file genericvector.h.
bool GenericVector< T >::write | ( | FILE * | f, |
TessResultCallback2< bool, FILE *, T const & > * | cb | ||
) | const |
Definition at line 681 of file genericvector.h.
|
protected |
Definition at line 277 of file genericvector.h.
|
mutableprotected |
Definition at line 279 of file genericvector.h.
|
protected |
Definition at line 276 of file genericvector.h.
|
staticprotected |
Definition at line 273 of file genericvector.h.
|
protected |
Definition at line 275 of file genericvector.h.
|
protected |
Definition at line 274 of file genericvector.h.