tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
GENERIC_2D_ARRAY< T > Class Template Reference

#include <intsimdmatrix.h>

Inheritance diagram for GENERIC_2D_ARRAY< T >:
Collaboration diagram for GENERIC_2D_ARRAY< T >:

Public Member Functions

 GENERIC_2D_ARRAY (int dim1, int dim2, const T &empty, T *array)
 
 GENERIC_2D_ARRAY (int dim1, int dim2, const T &empty)
 
 GENERIC_2D_ARRAY ()
 
 GENERIC_2D_ARRAY (const GENERIC_2D_ARRAY< T > &src)
 
virtual ~GENERIC_2D_ARRAY ()
 
void operator= (const GENERIC_2D_ARRAY< T > &src)
 
void ResizeNoInit (int size1, int size2, int pad=0)
 
void Resize (int size1, int size2, const T &empty)
 
void ResizeWithCopy (int size1, int size2)
 
void Clear ()
 
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 DeSerializeClasses (bool swap, FILE *fp)
 
int dim1 () const
 
int dim2 () const
 
virtual int num_elements () const
 
virtual int index (int column, int row) const
 
void put (ICOORD pos, const T &thing)
 
void put (int column, int row, const T &thing)
 
get (ICOORD pos) const
 
get (int column, int row) const
 
const T & operator() (int column, int row) const
 
T & operator() (int column, int row)
 
T * operator[] (int column)
 
const T * operator[] (int column) const
 
void operator+= (const GENERIC_2D_ARRAY< T > &addend)
 
void operator-= (const GENERIC_2D_ARRAY< T > &minuend)
 
void operator+= (const T &addend)
 
void operator*= (const T &factor)
 
void Clip (const T &rangemin, const T &rangemax)
 
bool WithinBounds (const T &rangemin, const T &rangemax) const
 
double Normalize ()
 
Max () const
 
MaxAbs () const
 
void SumSquares (const GENERIC_2D_ARRAY< T > &src, const T &decay_factor)
 
void AdamUpdate (const GENERIC_2D_ARRAY< T > &sum, const GENERIC_2D_ARRAY< T > &sqsum, const T &epsilon)
 
void AssertFinite () const
 
void RotatingTranspose (const int *dims, int num_dims, int src_dim, int dest_dim, GENERIC_2D_ARRAY< T > *result) const
 
void delete_matrix_pointers ()
 

Protected Member Functions

bool SerializeSize (FILE *fp) const
 
bool SerializeSize (tesseract::TFile *fp) const
 
bool DeSerializeSize (bool swap, FILE *fp)
 
bool DeSerializeSize (tesseract::TFile *fp)
 

Protected Attributes

T * array_
 
empty_
 
int dim1_
 
int dim2_
 
int size_allocated_
 

Constructor & Destructor Documentation

◆ GENERIC_2D_ARRAY() [1/4]

template<class T>
GENERIC_2D_ARRAY< T >::GENERIC_2D_ARRAY ( int  dim1,
int  dim2,
const T &  empty,
T *  array 
)
inline

◆ GENERIC_2D_ARRAY() [2/4]

template<class T>
GENERIC_2D_ARRAY< T >::GENERIC_2D_ARRAY ( int  dim1,
int  dim2,
const T &  empty 
)
inline

◆ GENERIC_2D_ARRAY() [3/4]

template<class T>
GENERIC_2D_ARRAY< T >::GENERIC_2D_ARRAY ( )
inline

◆ GENERIC_2D_ARRAY() [4/4]

template<class T>
GENERIC_2D_ARRAY< T >::GENERIC_2D_ARRAY ( const GENERIC_2D_ARRAY< T > &  src)
inline

◆ ~GENERIC_2D_ARRAY()

template<class T>
virtual GENERIC_2D_ARRAY< T >::~GENERIC_2D_ARRAY ( )
inlinevirtual

Member Function Documentation

◆ AdamUpdate()

template<class T>
void GENERIC_2D_ARRAY< T >::AdamUpdate ( const GENERIC_2D_ARRAY< T > &  sum,
const GENERIC_2D_ARRAY< T > &  sqsum,
const T &  epsilon 
)
inline

◆ AssertFinite()

template<class T>
void GENERIC_2D_ARRAY< T >::AssertFinite ( ) const
inline

◆ Clear()

template<class T>
void GENERIC_2D_ARRAY< T >::Clear ( )
inline

◆ Clip()

template<class T>
void GENERIC_2D_ARRAY< T >::Clip ( const T &  rangemin,
const T &  rangemax 
)
inline

◆ delete_matrix_pointers()

template<class T>
void GENERIC_2D_ARRAY< T >::delete_matrix_pointers ( )
inline

◆ DeSerialize() [1/2]

template<class T>
bool GENERIC_2D_ARRAY< T >::DeSerialize ( bool  swap,
FILE *  fp 
)
inline

◆ DeSerialize() [2/2]

template<class T>
bool GENERIC_2D_ARRAY< T >::DeSerialize ( tesseract::TFile fp)
inline

◆ DeSerializeClasses()

template<class T>
bool GENERIC_2D_ARRAY< T >::DeSerializeClasses ( bool  swap,
FILE *  fp 
)
inline

◆ DeSerializeSize() [1/2]

template<class T>
bool GENERIC_2D_ARRAY< T >::DeSerializeSize ( bool  swap,
FILE *  fp 
)
inlineprotected

◆ DeSerializeSize() [2/2]

template<class T>
bool GENERIC_2D_ARRAY< T >::DeSerializeSize ( tesseract::TFile fp)
inlineprotected

◆ dim1()

template<class T>
int GENERIC_2D_ARRAY< T >::dim1 ( ) const
inline

◆ dim2()

template<class T>
int GENERIC_2D_ARRAY< T >::dim2 ( ) const
inline

◆ get() [1/2]

template<class T>
T GENERIC_2D_ARRAY< T >::get ( ICOORD  pos) const
inline

◆ get() [2/2]

template<class T>
T GENERIC_2D_ARRAY< T >::get ( int  column,
int  row 
) const
inline

◆ index()

template<class T>
virtual int GENERIC_2D_ARRAY< T >::index ( int  column,
int  row 
) const
inlinevirtual

◆ Max()

template<class T>
T GENERIC_2D_ARRAY< T >::Max ( ) const
inline

◆ MaxAbs()

template<class T>
T GENERIC_2D_ARRAY< T >::MaxAbs ( ) const
inline

◆ Normalize()

template<class T>
double GENERIC_2D_ARRAY< T >::Normalize ( )
inline

◆ num_elements()

template<class T>
virtual int GENERIC_2D_ARRAY< T >::num_elements ( ) const
inlinevirtual

◆ operator()() [1/2]

template<class T>
const T& GENERIC_2D_ARRAY< T >::operator() ( int  column,
int  row 
) const
inline

◆ operator()() [2/2]

template<class T>
T& GENERIC_2D_ARRAY< T >::operator() ( int  column,
int  row 
)
inline

◆ operator*=()

template<class T>
void GENERIC_2D_ARRAY< T >::operator*= ( const T &  factor)
inline

◆ operator+=() [1/2]

template<class T>
void GENERIC_2D_ARRAY< T >::operator+= ( const GENERIC_2D_ARRAY< T > &  addend)
inline

◆ operator+=() [2/2]

template<class T>
void GENERIC_2D_ARRAY< T >::operator+= ( const T &  addend)
inline

◆ operator-=()

template<class T>
void GENERIC_2D_ARRAY< T >::operator-= ( const GENERIC_2D_ARRAY< T > &  minuend)
inline

◆ operator=()

template<class T>
void GENERIC_2D_ARRAY< T >::operator= ( const GENERIC_2D_ARRAY< T > &  src)
inline

◆ operator[]() [1/2]

template<class T>
T* GENERIC_2D_ARRAY< T >::operator[] ( int  column)
inline

◆ operator[]() [2/2]

template<class T>
const T* GENERIC_2D_ARRAY< T >::operator[] ( int  column) const
inline

◆ put() [1/2]

template<class T>
void GENERIC_2D_ARRAY< T >::put ( ICOORD  pos,
const T &  thing 
)
inline

◆ put() [2/2]

template<class T>
void GENERIC_2D_ARRAY< T >::put ( int  column,
int  row,
const T &  thing 
)
inline

◆ Resize()

template<class T>
void GENERIC_2D_ARRAY< T >::Resize ( int  size1,
int  size2,
const T &  empty 
)
inline

◆ ResizeNoInit()

template<class T>
void GENERIC_2D_ARRAY< T >::ResizeNoInit ( int  size1,
int  size2,
int  pad = 0 
)
inline

◆ ResizeWithCopy()

template<class T>
void GENERIC_2D_ARRAY< T >::ResizeWithCopy ( int  size1,
int  size2 
)
inline

◆ RotatingTranspose()

template<class T>
void GENERIC_2D_ARRAY< T >::RotatingTranspose ( const int *  dims,
int  num_dims,
int  src_dim,
int  dest_dim,
GENERIC_2D_ARRAY< T > *  result 
) const
inline

◆ Serialize() [1/2]

template<class T>
bool GENERIC_2D_ARRAY< T >::Serialize ( FILE *  fp) const
inline

◆ Serialize() [2/2]

template<class T>
bool GENERIC_2D_ARRAY< T >::Serialize ( tesseract::TFile fp) const
inline

◆ SerializeClasses()

template<class T>
bool GENERIC_2D_ARRAY< T >::SerializeClasses ( FILE *  fp) const
inline

◆ SerializeSize() [1/2]

template<class T>
bool GENERIC_2D_ARRAY< T >::SerializeSize ( FILE *  fp) const
inlineprotected

◆ SerializeSize() [2/2]

template<class T>
bool GENERIC_2D_ARRAY< T >::SerializeSize ( tesseract::TFile fp) const
inlineprotected

◆ SumSquares()

template<class T>
void GENERIC_2D_ARRAY< T >::SumSquares ( const GENERIC_2D_ARRAY< T > &  src,
const T &  decay_factor 
)
inline

◆ WithinBounds()

template<class T>
bool GENERIC_2D_ARRAY< T >::WithinBounds ( const T &  rangemin,
const T &  rangemax 
) const
inline

Member Data Documentation

◆ array_

template<class T>
T* GENERIC_2D_ARRAY< T >::array_
protected

◆ dim1_

template<class T>
int GENERIC_2D_ARRAY< T >::dim1_
protected

◆ dim2_

template<class T>
int GENERIC_2D_ARRAY< T >::dim2_
protected

◆ empty_

template<class T>
T GENERIC_2D_ARRAY< T >::empty_
protected

◆ size_allocated_

template<class T>
int GENERIC_2D_ARRAY< T >::size_allocated_
protected

The documentation for this class was generated from the following files: