tesseract
4.0.0-1-g2a2b
|
#include <baseapi.h>
Public Member Functions | |
GenericVector () | |
GenericVector (int size, const 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, const T &t) |
void | resize_no_init (int size) |
int | size () const |
size_t | unsigned_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 (const T &object) const |
bool | contains (const T &object) const |
T | contains_index (int index) const |
int | push_back (T object) |
void | operator+= (const T &t) |
int | push_back_new (const T &object) |
int | push_front (const T &object) |
void | set (const T &t, int index) |
void | insert (const 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 (tesseract::TFile *f, TessResultCallback2< bool, tesseract::TFile *, T *> *cb) |
bool | Serialize (FILE *fp) const |
bool | Serialize (tesseract::TFile *fp) const |
bool | DeSerialize (bool swap, FILE *fp) |
bool | DeSerialize (tesseract::TFile *fp) |
bool | SerializeClasses (FILE *fp) const |
bool | SerializeClasses (tesseract::TFile *fp) const |
bool | DeSerializeClasses (bool swap, FILE *fp) |
bool | DeSerializeClasses (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 bool | SkipDeSerialize (tesseract::TFile *fp) |
static bool | SkipDeSerializeClasses (tesseract::TFile *fp) |
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_t | size_used_ |
int32_t | 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 39 of file genericvector.h.
|
inline |
Definition at line 42 of file genericvector.h.
|
inline |
Definition at line 48 of file genericvector.h.
GenericVector< T >::~GenericVector | ( | ) |
Definition at line 677 of file genericvector.h.
T & GenericVector< T >::back | ( | ) | const |
Definition at line 730 of file genericvector.h.
|
inline |
Definition at line 250 of file genericvector.h.
|
inline |
Definition at line 238 of file genericvector.h.
|
inline |
Definition at line 309 of file genericvector.h.
|
protected |
Definition at line 1083 of file genericvector.h.
void GenericVector< T >::clear | ( | ) |
Definition at line 868 of file genericvector.h.
|
inline |
Definition at line 282 of file genericvector.h.
|
inline |
Definition at line 265 of file genericvector.h.
bool GenericVector< T >::contains | ( | const T & | object | ) | const |
Definition at line 793 of file genericvector.h.
T GenericVector< T >::contains_index | ( | int | index | ) | const |
Definition at line 776 of file genericvector.h.
void GenericVector< T >::delete_data_pointers | ( | ) |
Definition at line 884 of file genericvector.h.
bool GenericVector< T >::DeSerialize | ( | bool | swap, |
FILE * | fp | ||
) |
Definition at line 954 of file genericvector.h.
bool GenericVector< T >::DeSerialize | ( | tesseract::TFile * | fp | ) |
Definition at line 971 of file genericvector.h.
bool GenericVector< T >::DeSerializeClasses | ( | bool | swap, |
FILE * | fp | ||
) |
Definition at line 1015 of file genericvector.h.
bool GenericVector< T >::DeSerializeClasses | ( | tesseract::TFile * | fp | ) |
Definition at line 1027 of file genericvector.h.
|
inline |
Definition at line 298 of file genericvector.h.
void GenericVector< T >::double_the_size | ( | ) |
Definition at line 697 of file genericvector.h.
|
inlinestatic |
Definition at line 207 of file genericvector.h.
|
inline |
Definition at line 90 of file genericvector.h.
T & GenericVector< T >::get | ( | int | index | ) | const |
Definition at line 718 of file genericvector.h.
int GenericVector< T >::get_index | ( | const T & | object | ) | const |
Definition at line 782 of file genericvector.h.
|
protected |
Definition at line 662 of file genericvector.h.
void GenericVector< T >::init_to_size | ( | int | size, |
const T & | t | ||
) |
Definition at line 708 of file genericvector.h.
void GenericVector< T >::insert | ( | const T & | t, |
int | index | ||
) |
Definition at line 752 of file genericvector.h.
|
inline |
Definition at line 85 of file genericvector.h.
void GenericVector< T >::move | ( | GenericVector< T > * | from | ) |
Definition at line 1050 of file genericvector.h.
GenericVector< T > & GenericVector< T >::operator+= | ( | const GenericVector< T > & | other | ) |
Definition at line 834 of file genericvector.h.
void GenericVector< T >::operator+= | ( | const T & | t | ) |
Definition at line 829 of file genericvector.h.
GenericVector< T > & GenericVector< T >::operator= | ( | const GenericVector< T > & | other | ) |
Definition at line 843 of file genericvector.h.
T & GenericVector< T >::operator[] | ( | int | index | ) | const |
Definition at line 724 of file genericvector.h.
T GenericVector< T >::pop_back | ( | ) |
Definition at line 736 of file genericvector.h.
int GenericVector< T >::push_back | ( | T | object | ) |
Definition at line 799 of file genericvector.h.
int GenericVector< T >::push_back_new | ( | const T & | object | ) |
Definition at line 809 of file genericvector.h.
int GenericVector< T >::push_front | ( | const T & | object | ) |
Definition at line 818 of file genericvector.h.
bool GenericVector< T >::read | ( | tesseract::TFile * | f, |
TessResultCallback2< bool, tesseract::TFile *, T *> * | cb | ||
) |
Definition at line 912 of file genericvector.h.
void GenericVector< T >::remove | ( | int | index | ) |
Definition at line 766 of file genericvector.h.
void GenericVector< T >::reserve | ( | int | size | ) |
Definition at line 684 of file genericvector.h.
|
inline |
Definition at line 65 of file genericvector.h.
|
inline |
Definition at line 215 of file genericvector.h.
bool GenericVector< T >::Serialize | ( | FILE * | fp | ) | const |
Definition at line 936 of file genericvector.h.
bool GenericVector< T >::Serialize | ( | tesseract::TFile * | fp | ) | const |
Definition at line 943 of file genericvector.h.
bool GenericVector< T >::SerializeClasses | ( | FILE * | fp | ) | const |
Definition at line 993 of file genericvector.h.
bool GenericVector< T >::SerializeClasses | ( | tesseract::TFile * | fp | ) | const |
Definition at line 1001 of file genericvector.h.
void GenericVector< T >::set | ( | const T & | t, |
int | index | ||
) |
Definition at line 743 of file genericvector.h.
void GenericVector< T >::set_clear_callback | ( | TessCallback1< T > * | cb | ) |
Definition at line 854 of file genericvector.h.
void GenericVector< T >::set_compare_callback | ( | TessResultCallback2< bool, T const &, T const &> * | cb | ) |
Definition at line 861 of file genericvector.h.
|
inline |
Definition at line 71 of file genericvector.h.
|
inline |
Definition at line 81 of file genericvector.h.
|
static |
Definition at line 983 of file genericvector.h.
|
static |
Definition at line 1038 of file genericvector.h.
void GenericVector< T >::sort | ( | ) |
Definition at line 1065 of file genericvector.h.
|
inline |
Definition at line 231 of file genericvector.h.
|
inline |
Definition at line 320 of file genericvector.h.
|
inline |
Definition at line 136 of file genericvector.h.
|
inline |
Definition at line 75 of file genericvector.h.
|
inline |
Definition at line 329 of file genericvector.h.
bool GenericVector< T >::write | ( | FILE * | f, |
TessResultCallback2< bool, FILE *, T const &> * | cb | ||
) | const |
Definition at line 892 of file genericvector.h.
|
protected |
Definition at line 351 of file genericvector.h.
|
mutableprotected |
Definition at line 353 of file genericvector.h.
|
protected |
Definition at line 350 of file genericvector.h.
|
staticprotected |
Definition at line 347 of file genericvector.h.
|
protected |
Definition at line 349 of file genericvector.h.
|
protected |
Definition at line 348 of file genericvector.h.