tesseract v5.3.3.20231005
tesseract::MATRIX_COORD Struct Reference

#include <matrix.h>

Public Member Functions

 MATRIX_COORD ()
 
 MATRIX_COORD (int c, int r)
 
 ~MATRIX_COORD ()=default
 
bool Valid (const MATRIX &m) const
 
void MapForSplit (int ind)
 

Static Public Member Functions

static void Delete (void *arg)
 

Public Attributes

int col
 
int row
 

Detailed Description

Definition at line 687 of file matrix.h.

Constructor & Destructor Documentation

◆ MATRIX_COORD() [1/2]

tesseract::MATRIX_COORD::MATRIX_COORD ( )
inline

Definition at line 693 of file matrix.h.

693: col(0), row(0) {}

◆ MATRIX_COORD() [2/2]

tesseract::MATRIX_COORD::MATRIX_COORD ( int  c,
int  r 
)
inline

Definition at line 694 of file matrix.h.

694: col(c), row(r) {}

◆ ~MATRIX_COORD()

tesseract::MATRIX_COORD::~MATRIX_COORD ( )
default

Member Function Documentation

◆ Delete()

static void tesseract::MATRIX_COORD::Delete ( void *  arg)
inlinestatic

Definition at line 688 of file matrix.h.

688 {
689 auto *c = static_cast<MATRIX_COORD *>(arg);
690 delete c;
691 }

◆ MapForSplit()

void tesseract::MATRIX_COORD::MapForSplit ( int  ind)
inline

Definition at line 708 of file matrix.h.

708 {
709 ASSERT_HOST(row >= col);
710 if (col > ind) {
711 ++col;
712 }
713 if (row >= ind) {
714 ++row;
715 }
716 ASSERT_HOST(row >= col);
717 }
#define ASSERT_HOST(x)
Definition: errcode.h:54

◆ Valid()

bool tesseract::MATRIX_COORD::Valid ( const MATRIX m) const
inline

Definition at line 697 of file matrix.h.

697 {
698 return 0 <= col && col < m.dimension() && col <= row && row < col + m.bandwidth() &&
699 row < m.dimension();
700 }

Member Data Documentation

◆ col

int tesseract::MATRIX_COORD::col

Definition at line 719 of file matrix.h.

◆ row

int tesseract::MATRIX_COORD::row

Definition at line 720 of file matrix.h.


The documentation for this struct was generated from the following file: