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 591 of file matrix.h.

Constructor & Destructor Documentation

◆ MATRIX_COORD() [1/2]

MATRIX_COORD::MATRIX_COORD ( )
inline

Definition at line 597 of file matrix.h.

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

◆ MATRIX_COORD() [2/2]

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

Definition at line 598 of file matrix.h.

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

◆ ~MATRIX_COORD()

MATRIX_COORD::~MATRIX_COORD ( )
inline

Definition at line 599 of file matrix.h.

599 {}

Member Function Documentation

◆ Delete()

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

Definition at line 592 of file matrix.h.

592  {
593  MATRIX_COORD *c = static_cast<MATRIX_COORD *>(arg);
594  delete c;
595  }

◆ MapForSplit()

void MATRIX_COORD::MapForSplit ( int  ind)
inline

Definition at line 612 of file matrix.h.

612  {
613  ASSERT_HOST(row >= col);
614  if (col > ind) ++col;
615  if (row >= ind) ++row;
616  ASSERT_HOST(row >= col);
617  }
#define ASSERT_HOST(x)
Definition: errcode.h:84

◆ Valid()

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

Definition at line 601 of file matrix.h.

601  {
602  return 0 <= col && col < m.dimension() &&
603  col <= row && row < col + m.bandwidth() && row < m.dimension();
604  }
int bandwidth() const
Definition: matrix.h:523
int dimension() const
Definition: matrix.h:521

Member Data Documentation

◆ col

int MATRIX_COORD::col

Definition at line 619 of file matrix.h.

◆ row

int MATRIX_COORD::row

Definition at line 620 of file matrix.h.


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