tesseract  4.00.00dev
MATRIX_COORD Struct Reference

#include <matrix.h>

Public Member Functions

 MATRIX_COORD ()
 
 MATRIX_COORD (int c, int r)
 
 ~MATRIX_COORD ()
 
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 598 of file matrix.h.

Constructor & Destructor Documentation

◆ MATRIX_COORD() [1/2]

MATRIX_COORD::MATRIX_COORD ( )
inline

Definition at line 604 of file matrix.h.

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

◆ MATRIX_COORD() [2/2]

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

Definition at line 605 of file matrix.h.

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

◆ ~MATRIX_COORD()

MATRIX_COORD::~MATRIX_COORD ( )
inline

Definition at line 606 of file matrix.h.

606 {}

Member Function Documentation

◆ Delete()

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

Definition at line 599 of file matrix.h.

599  {
600  MATRIX_COORD *c = static_cast<MATRIX_COORD *>(arg);
601  delete c;
602  }

◆ MapForSplit()

void MATRIX_COORD::MapForSplit ( int  ind)
inline

Definition at line 619 of file matrix.h.

619  {
620  ASSERT_HOST(row >= col);
621  if (col > ind) ++col;
622  if (row >= ind) ++row;
623  ASSERT_HOST(row >= col);
624  }
#define ASSERT_HOST(x)
Definition: errcode.h:84

◆ Valid()

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

Definition at line 608 of file matrix.h.

608  {
609  return 0 <= col && col < m.dimension() &&
610  col <= row && row < col + m.bandwidth() && row < m.dimension();
611  }
int dimension() const
Definition: matrix.h:528
int bandwidth() const
Definition: matrix.h:530

Member Data Documentation

◆ col

int MATRIX_COORD::col

Definition at line 626 of file matrix.h.

◆ row

int MATRIX_COORD::row

Definition at line 627 of file matrix.h.


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