Deterministic Gaussian Sampling
Loading...
Searching...
No Matches
SquaredEuclideanDistanceUtils Class Referenceabstract

helper class to calculate squared euclidean distance between all linear combinations of two vector sets More...

#include <squared_euclidean_distance_utils.h>

Inheritance diagram for SquaredEuclideanDistanceUtils:
SquaredEuclideanDistanceUtilsLL SquaredEuclideanDistanceUtilsLM SquaredEuclideanDistance_LL_matrix SquaredEuclideanDistance_LL_matrix_optimized SquaredEuclideanDistance_LL_vectorized SquaredEuclideanDistance_LL_vectorized_optimized SquaredEuclideanDistance_LM_matrix SquaredEuclideanDistance_LM_matrix_optimized

Public Member Functions

 SquaredEuclideanDistanceUtils (size_t L, size_t M, size_t N)
 
virtual double getDistance (size_t xi, size_t yi) const =0
 
size_t getL () const
 
size_t getM () const
 
size_t getN () const
 
virtual void calculateDistance (const gsl_matrix *x, const gsl_matrix *y)=0
 calculate all squared euclidean distance between vectors contained as columns in x and y
 

Static Protected Member Functions

static gsl_matrix convToMatrix (const gsl_vector *v, size_t N) noexcept
 convert an gsl_vector to a N column gsl_matrix
 

Protected Attributes

size_t L
 
size_t M
 
size_t N
 

Detailed Description

helper class to calculate squared euclidean distance between all linear combinations of two vector sets

Member Function Documentation

◆ calculateDistance()

virtual void SquaredEuclideanDistanceUtils::calculateDistance ( const gsl_matrix x,
const gsl_matrix y 
)
pure virtual

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

Implemented in SquaredEuclideanDistance_LL_matrix_optimized, SquaredEuclideanDistance_LL_matrix, SquaredEuclideanDistance_LL_vectorized, SquaredEuclideanDistance_LL_vectorized_optimized, SquaredEuclideanDistance_LM_matrix, and SquaredEuclideanDistance_LM_matrix_optimized.

◆ convToMatrix()

static gsl_matrix SquaredEuclideanDistanceUtils::convToMatrix ( const gsl_vector v,
size_t  N 
)
inlinestaticprotectednoexcept

convert an gsl_vector to a N column gsl_matrix

Parameters
vvector to be converted
Nnumber of columns
Returns
the matrix view using same memory as the vector

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