Deterministic Gaussian Sampling
Loading...
Searching...
No Matches
SquaredEuclideanDistance_LL_matrix_optimized Class Reference

implements a optimized version for calculating squared euclidean distances store in a LxL matrix More...

#include <squared_euclidean_distance_utils.h>

Inheritance diagram for SquaredEuclideanDistance_LL_matrix_optimized:
SquaredEuclideanDistanceUtilsLL SquaredEuclideanDistanceUtils

Public Member Functions

 SquaredEuclideanDistance_LL_matrix_optimized (size_t L, size_t N)
 
double getDistance (size_t xi, size_t xj) const override
 
void calculateDistance (const gsl_matrix *x, const gsl_matrix *) override
 calculate all squared euclidean distance between vectors contained as columns in x and y
 
- Public Member Functions inherited from SquaredEuclideanDistanceUtilsLL
 SquaredEuclideanDistanceUtilsLL (size_t L, size_t N)
 
- Public Member Functions inherited from SquaredEuclideanDistanceUtils
 SquaredEuclideanDistanceUtils (size_t L, size_t M, size_t N)
 
size_t getL () const
 
size_t getM () const
 
size_t getN () const
 

Additional Inherited Members

- Static Protected Member Functions inherited from SquaredEuclideanDistanceUtils
static gsl_matrix convToMatrix (const gsl_vector *v, size_t N) noexcept
 convert an gsl_vector to a N column gsl_matrix
 
- Protected Attributes inherited from SquaredEuclideanDistanceUtils
size_t L
 
size_t M
 
size_t N
 

Detailed Description

implements a optimized version for calculating squared euclidean distances store in a LxL matrix

uses ||xi - xj||² = ||xi||² + ||xj||² - 2 * xiᵀ * xj

with cblas functions

Member Function Documentation

◆ calculateDistance()

void SquaredEuclideanDistance_LL_matrix_optimized::calculateDistance ( const gsl_matrix x,
const gsl_matrix y 
)
inlineoverridevirtual

calculate all squared euclidean distance between vectors contained as columns in x and y

Parameters
xLxN Matrix with L vectors of size N
yMxN Matrix with M vectors of size M

Implements SquaredEuclideanDistanceUtils.

◆ getDistance()

double SquaredEuclideanDistance_LL_matrix_optimized::getDistance ( size_t  xi,
size_t  xj 
) const
inlineoverridevirtual

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