tesseract  4.0.0-1-g2a2b
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 605 of file matrix.h.

Constructor & Destructor Documentation

◆ MATRIX_COORD() [1/2]

MATRIX_COORD::MATRIX_COORD ( )
inline

Definition at line 611 of file matrix.h.

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

◆ MATRIX_COORD() [2/2]

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

Definition at line 612 of file matrix.h.

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

◆ ~MATRIX_COORD()

MATRIX_COORD::~MATRIX_COORD ( )
inline

Definition at line 613 of file matrix.h.

613 {}

Member Function Documentation

◆ Delete()

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

Definition at line 606 of file matrix.h.

606  {
607  MATRIX_COORD *c = static_cast<MATRIX_COORD *>(arg);
608  delete c;
609  }

◆ MapForSplit()

void MATRIX_COORD::MapForSplit ( int  ind)
inline

Definition at line 626 of file matrix.h.

626  {
627  ASSERT_HOST(row >= col);
628  if (col > ind) ++col;
629  if (row >= ind) ++row;
630  ASSERT_HOST(row >= col);
631  }
#define ASSERT_HOST(x)
Definition: errcode.h:84

◆ Valid()

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

Definition at line 615 of file matrix.h.

615  {
616  return 0 <= col && col < m.dimension() &&
617  col <= row && row < col + m.bandwidth() && row < m.dimension();
618  }
int bandwidth() const
Definition: matrix.h:535
int dimension() const
Definition: matrix.h:533

Member Data Documentation

◆ col

int MATRIX_COORD::col

Definition at line 633 of file matrix.h.

◆ row

int MATRIX_COORD::row

Definition at line 634 of file matrix.h.


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