#include <baseapi.h>
Public Member Functions | |
GenericVector () | |
GenericVector (int size, T init_val) | |
GenericVector (const GenericVector &other) | |
GenericVector< T > & | operator+= (const GenericVector &other) |
GenericVector< T > & | operator= (const GenericVector &other) |
~GenericVector () | |
void | reserve (int size) |
void | double_the_size () |
void | init_to_size (int size, T t) |
void | resize_no_init (int size) |
int | size () const |
int | size_reserved () const |
int | length () const |
bool | empty () const |
T & | get (int index) const |
T & | back () const |
T & | operator[] (int index) const |
T | pop_back () |
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) |
void | remove (int index) |
void | truncate (int size) |
void | set_clear_callback (TessCallback1< T > *cb) |
void | set_compare_callback (TessResultCallback2< bool, T const &, T const & > *cb) |
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) |
bool | Serialize (FILE *fp) const |
bool | Serialize (tesseract::TFile *fp) const |
bool | DeSerialize (bool swap, FILE *fp) |
bool | DeSerialize (bool swap, tesseract::TFile *fp) |
bool | SerializeClasses (FILE *fp) const |
bool | SerializeClasses (tesseract::TFile *fp) const |
bool | DeSerializeClasses (bool swap, FILE *fp) |
bool | DeSerializeClasses (bool swap, tesseract::TFile *fp) |
void | reverse () |
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 |
int | choose_nth_item (int target_index) |
void | swap (int index1, int index2) |
bool | WithinBounds (const T &rangemin, const T &rangemax) const |
Static Public Member Functions | |
static T * | double_the_size_memcpy (int current_size, T *data) |
Protected Member Functions | |
int | choose_nth_item (int target_index, int start, int end, unsigned int *seed) |
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 |
|
inline |
Definition at line 40 of file genericvector.h.
|
inline |
Definition at line 43 of file genericvector.h.
|
inline |
Definition at line 49 of file genericvector.h.
GenericVector< T >::~GenericVector | ( | ) |
Definition at line 616 of file genericvector.h.
T & GenericVector< T >::back | ( | ) | const |
Definition at line 668 of file genericvector.h.
|
inline |
Definition at line 238 of file genericvector.h.
|
inline |
Definition at line 226 of file genericvector.h.
|
inline |
Definition at line 298 of file genericvector.h.
|
protected |
Definition at line 1016 of file genericvector.h.
void GenericVector< T >::clear | ( | ) |
Definition at line 806 of file genericvector.h.
|
inline |
Definition at line 271 of file genericvector.h.
|
inline |
Definition at line 254 of file genericvector.h.
bool GenericVector< T >::contains | ( | T | object | ) | const |
Definition at line 731 of file genericvector.h.
T GenericVector< T >::contains_index | ( | int | index | ) | const |
Definition at line 714 of file genericvector.h.
void GenericVector< T >::delete_data_pointers | ( | ) |
Definition at line 827 of file genericvector.h.
bool GenericVector< T >::DeSerialize | ( | bool | swap, |
FILE * | fp | ||
) |
Definition at line 902 of file genericvector.h.
bool GenericVector< T >::DeSerialize | ( | bool | swap, |
tesseract::TFile * | fp | ||
) |
Definition at line 916 of file genericvector.h.
bool GenericVector< T >::DeSerializeClasses | ( | bool | swap, |
FILE * | fp | ||
) |
Definition at line 956 of file genericvector.h.
bool GenericVector< T >::DeSerializeClasses | ( | bool | swap, |
tesseract::TFile * | fp | ||
) |
Definition at line 968 of file genericvector.h.
|
inline |
Definition at line 287 of file genericvector.h.
void GenericVector< T >::double_the_size | ( | ) |
Definition at line 635 of file genericvector.h.
|
inlinestatic |
Definition at line 195 of file genericvector.h.
|
inline |
Definition at line 84 of file genericvector.h.
T & GenericVector< T >::get | ( | int | index | ) | const |
Definition at line 656 of file genericvector.h.
int GenericVector< T >::get_index | ( | T | object | ) | const |
Definition at line 720 of file genericvector.h.
|
protected |
Definition at line 606 of file genericvector.h.
void GenericVector< T >::init_to_size | ( | int | size, |
T | t | ||
) |
Definition at line 646 of file genericvector.h.
void GenericVector< T >::insert | ( | T | t, |
int | index | ||
) |
Definition at line 690 of file genericvector.h.
|
inline |
Definition at line 79 of file genericvector.h.
void GenericVector< T >::move | ( | GenericVector< T > * | from | ) |
Definition at line 983 of file genericvector.h.
GenericVector< T > & GenericVector< T >::operator+= | ( | const GenericVector< T > & | other | ) |
Definition at line 772 of file genericvector.h.
void GenericVector< T >::operator+= | ( | T | t | ) |
Definition at line 767 of file genericvector.h.
GenericVector< T > & GenericVector< T >::operator= | ( | const GenericVector< T > & | other | ) |
Definition at line 781 of file genericvector.h.
T & GenericVector< T >::operator[] | ( | int | index | ) | const |
Definition at line 662 of file genericvector.h.
T GenericVector< T >::pop_back | ( | ) |
Definition at line 674 of file genericvector.h.
int GenericVector< T >::push_back | ( | T | object | ) |
Definition at line 737 of file genericvector.h.
int GenericVector< T >::push_back_new | ( | T | object | ) |
Definition at line 747 of file genericvector.h.
int GenericVector< T >::push_front | ( | T | object | ) |
Definition at line 756 of file genericvector.h.
bool GenericVector< T >::read | ( | FILE * | f, |
TessResultCallback3< bool, FILE *, T *, bool > * | cb, | ||
bool | swap | ||
) |
Definition at line 855 of file genericvector.h.
void GenericVector< T >::remove | ( | int | index | ) |
Definition at line 704 of file genericvector.h.
void GenericVector< T >::reserve | ( | int | size | ) |
Definition at line 623 of file genericvector.h.
|
inline |
Definition at line 66 of file genericvector.h.
|
inline |
Definition at line 203 of file genericvector.h.
bool GenericVector< T >::Serialize | ( | FILE * | fp | ) | const |
Definition at line 885 of file genericvector.h.
bool GenericVector< T >::Serialize | ( | tesseract::TFile * | fp | ) | const |
Definition at line 891 of file genericvector.h.
bool GenericVector< T >::SerializeClasses | ( | FILE * | fp | ) | const |
Definition at line 934 of file genericvector.h.
bool GenericVector< T >::SerializeClasses | ( | tesseract::TFile * | fp | ) | const |
Definition at line 942 of file genericvector.h.
void GenericVector< T >::set | ( | T | t, |
int | index | ||
) |
Definition at line 681 of file genericvector.h.
void GenericVector< T >::set_clear_callback | ( | TessCallback1< T > * | cb | ) |
Definition at line 792 of file genericvector.h.
void GenericVector< T >::set_compare_callback | ( | TessResultCallback2< bool, T const &, T const & > * | cb | ) |
Definition at line 799 of file genericvector.h.
|
inline |
Definition at line 72 of file genericvector.h.
|
inline |
Definition at line 75 of file genericvector.h.
void GenericVector< T >::sort | ( | ) |
Definition at line 998 of file genericvector.h.
|
inline |
Definition at line 219 of file genericvector.h.
|
inline |
Definition at line 309 of file genericvector.h.
|
inline |
Definition at line 130 of file genericvector.h.
|
inline |
Definition at line 318 of file genericvector.h.
bool GenericVector< T >::write | ( | FILE * | f, |
TessResultCallback2< bool, FILE *, T const & > * | cb | ||
) | const |
Definition at line 836 of file genericvector.h.
|
protected |
Definition at line 340 of file genericvector.h.
|
mutableprotected |
Definition at line 342 of file genericvector.h.
|
protected |
Definition at line 339 of file genericvector.h.
|
staticprotected |
Definition at line 336 of file genericvector.h.
|
protected |
Definition at line 338 of file genericvector.h.
|
protected |
Definition at line 337 of file genericvector.h.