geos::algorithm::distance::DiscreteFrechetDistance::MatrixStorage Class Referenceabstract

`#include <DiscreteFrechetDistance.h>`

Inheritance diagram for geos::algorithm::distance::DiscreteFrechetDistance::MatrixStorage:

## Public Member Functions

| MatrixStorage (std::size_t numRows, std::size_t numCols, double defaultValue)
virtual double | get (std::size_t i, std::size_t j) const =0
virtual void | set (std::size_t i, std::size_t j, double value)=0
virtual bool | isValueSet (std::size_t i, std::size_t j) const =0

## Public Attributes

std::size_t | m_numRows
std::size_t | m_numCols
double | m_defaultValue

## Detailed Description

Abstract base class for storing 2d matrix data

## Constructor & Destructor Documentation

## MatrixStorage()

geos::algorithm::distance::DiscreteFrechetDistance::MatrixStorage::MatrixStorage | ( | std::size_t | numRows,
|  | std::size_t | numCols,
|  | double | defaultValue )

inline

Creates an instance of this class

Parameters

  numRows | the number of rows
  numCols | the number of columns
  defaultValue | A default value

Referenced by geos::algorithm::distance::DiscreteFrechetDistance::HashMapMatrix::HashMapMatrix(), and geos::algorithm::distance::DiscreteFrechetDistance::RectMatrix::RectMatrix().

## Member Function Documentation

## get()

virtual double geos::algorithm::distance::DiscreteFrechetDistance::MatrixStorage::get | ( | std::size_t | i,
|  | std::size_t | j ) const

pure virtual

Gets the matrix value at i, j

Parameters

  i | the row index
  j | the column index

Returns
  The matrix value at i, j

Implemented in geos::algorithm::distance::DiscreteFrechetDistance::CsrMatrix, geos::algorithm::distance::DiscreteFrechetDistance::HashMapMatrix, and geos::algorithm::distance::DiscreteFrechetDistance::RectMatrix.

## isValueSet()

virtual bool geos::algorithm::distance::DiscreteFrechetDistance::MatrixStorage::isValueSet | ( | std::size_t | i,
|  | std::size_t | j ) const

pure virtual

Gets a flag indicating if the matrix has a set value, e.g. one that is different than MatrixStorage defaultValue.

Parameters

  i | the row index
  j | the column index

Returns
  a flag indicating if the matrix has a set value

Implemented in geos::algorithm::distance::DiscreteFrechetDistance::CsrMatrix, geos::algorithm::distance::DiscreteFrechetDistance::HashMapMatrix, and geos::algorithm::distance::DiscreteFrechetDistance::RectMatrix.

## set()

virtual void geos::algorithm::distance::DiscreteFrechetDistance::MatrixStorage::set | ( | std::size_t | i,
|  | std::size_t | j,
|  | double | value )

pure virtual

Sets the matrix value at i, j

Parameters

  i | the row index
  j | the column index
  value | The matrix value to set at i, j

Implemented in geos::algorithm::distance::DiscreteFrechetDistance::CsrMatrix, geos::algorithm::distance::DiscreteFrechetDistance::HashMapMatrix, and geos::algorithm::distance::DiscreteFrechetDistance::RectMatrix.

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

- DiscreteFrechetDistance.h