tesseract  5.0.0-alpha-619-ge9db
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 604 of file matrix.h.

Constructor & Destructor Documentation

◆ MATRIX_COORD() [1/2]

MATRIX_COORD::MATRIX_COORD ( )
inline

Definition at line 610 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 611 of file matrix.h.

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

◆ ~MATRIX_COORD()

MATRIX_COORD::~MATRIX_COORD ( )
inline

Definition at line 612 of file matrix.h.

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

Member Function Documentation

◆ Delete()

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

Definition at line 605 of file matrix.h.

605  {
606  static void Delete(void *arg) {
607  auto *c = static_cast<MATRIX_COORD *>(arg);
608  delete c;

◆ MapForSplit()

void MATRIX_COORD::MapForSplit ( int  ind)
inline

Definition at line 625 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);

◆ Valid()

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

Definition at line 614 of file matrix.h.

615  {
616  return 0 <= col && col < m.dimension() &&
617  col <= row && row < col + m.bandwidth() && row < m.dimension();

Member Data Documentation

◆ col

int MATRIX_COORD::col

Definition at line 632 of file matrix.h.

◆ row

int MATRIX_COORD::row

Definition at line 633 of file matrix.h.


The documentation for this struct was generated from the following file:
ASSERT_HOST
#define ASSERT_HOST(x)
Definition: errcode.h:87
MATRIX_COORD::Delete
static void Delete(void *arg)
Definition: matrix.h:605
BandTriMatrix::bandwidth
int bandwidth() const
Definition: matrix.h:534
MATRIX_COORD::col
int col
Definition: matrix.h:632
MATRIX_COORD::row
int row
Definition: matrix.h:633
BandTriMatrix::dimension
int dimension() const
Definition: matrix.h:532