#include <DiscreteFrechetDistance.h>
|
| CsrMatrix (std::size_t numRows, std::size_t numCols, double defaultValue, std::size_t expectedValues) |
|
| CsrMatrix (std::size_t numRows, std::size_t numCols, double defaultValue) |
|
std::pair< bool, std::size_t > | cppBinarySearch (const std::vector< std::size_t > &vec, std::size_t fromIndex, std::size_t toIndex, std::size_t key) const |
|
std::pair< bool, std::size_t > | indexOf (std::size_t i, std::size_t j) const |
|
double | get (std::size_t i, std::size_t j) const override |
|
void | set (std::size_t i, std::size_t j, double value) override |
|
bool | isValueSet (std::size_t i, std::size_t j) const override |
|
void | ensureCapacity (std::size_t required) |
|
| MatrixStorage (std::size_t numRows, std::size_t numCols, double defaultValue) |
|
|
std::size_t | m_numRows |
|
std::size_t | m_numCols |
|
double | m_defaultValue |
|
A matrix implementation that adheres to the Compressed sparse row format. Note: Unfortunately not as fast as hoped.
◆ cppBinarySearch()
std::pair< bool, std::size_t > geos::algorithm::distance::DiscreteFrechetDistance::CsrMatrix::cppBinarySearch |
( |
const std::vector< std::size_t > & |
vec, |
|
|
std::size_t |
fromIndex, |
|
|
std::size_t |
toIndex, |
|
|
std::size_t |
key |
|
) |
| const |
|
inline |
A work-alike for Java Arrays.binarySearch(), used for searching ordered arrays. This variant searches for the key value within a bounded subset of the array.
- Parameters
-
vec | the vector to search |
fromIndex | the lower bound index for the search |
toIndex | the upper bound index for the search |
key | the value to hunt for |
- Returns
- a pair with the first item being true if the key was found and false otherwise, and the second being the index of the key found, or the insertion point of the key if not found
◆ ensureCapacity()
void geos::algorithm::distance::DiscreteFrechetDistance::CsrMatrix::ensureCapacity |
( |
std::size_t |
required | ) |
|
|
inline |
Ensures that the column index vector (m_ci) and value vector (m_v) are sufficiently large.
- Parameters
-
required | the number of items to store in the matrix |
◆ expectedValuesHeuristic()
static std::size_t geos::algorithm::distance::DiscreteFrechetDistance::CsrMatrix::expectedValuesHeuristic |
( |
std::size_t |
numRows, |
|
|
std::size_t |
numCols |
|
) |
| |
|
inlinestatic |
Computes an initial value for the number of expected values
- Parameters
-
numRows | the number of rows |
numCols | the number of columns |
- Returns
- the expected number of values in the sparse matrix
◆ get()
double geos::algorithm::distance::DiscreteFrechetDistance::CsrMatrix::get |
( |
std::size_t |
i, |
|
|
std::size_t |
j |
|
) |
| const |
|
inlineoverridevirtual |
◆ isValueSet()
bool geos::algorithm::distance::DiscreteFrechetDistance::CsrMatrix::isValueSet |
( |
std::size_t |
i, |
|
|
std::size_t |
j |
|
) |
| const |
|
inlineoverridevirtual |
◆ set()
void geos::algorithm::distance::DiscreteFrechetDistance::CsrMatrix::set |
( |
std::size_t |
i, |
|
|
std::size_t |
j, |
|
|
double |
value |
|
) |
| |
|
inlineoverridevirtual |
The documentation for this class was generated from the following file: