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

implements a vectorized version of calculating squared euclidean distances store in a vector More...

#include <squared_euclidean_distance_utils.h>

Inheritance diagram for SquaredEuclideanDistance_LL_vectorized:
SquaredEuclideanDistanceUtilsLL SquaredEuclideanDistanceUtils

Public Member Functions

 SquaredEuclideanDistance_LL_vectorized (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 *y) 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 vectorized version of calculating squared euclidean distances store in a vector

uses symmetrie: ||xi - xj||² = ||xj - xi||²

only needs to calculate (L² - L) / 2 elements

Member Function Documentation

◆ calculateDistance()

void SquaredEuclideanDistance_LL_vectorized::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_vectorized::getDistance ( size_t  xi,
size_t  xj 
) const
inlineoverridevirtual

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