MultiIndex
Functions
data_util.cpp File Reference
#include "data_util.h"
Include dependency graph for data_util.cpp:

Functions

Distance Eucldistance (const Point &x, const Point &y)
Distance Eucldistance (const Point &x, const Point &y, const Dimensions start, const Dimensions finish)
void GetSubpoints (const Points &points, const Dimensions start_dim, const Dimensions final_dim, Points *subpoints)
ClusterId GetNearestClusterId (const Point &point, const Centroids &centroids, const Dimensions start_dim, const Dimensions final_dim)
void GetResidual (const Point &point, const CoarseQuantization &coarse_quantizations, const vector< Centroids > &centroids, Point *residual)
void GetResidual (const Point &point, const CoarseQuantization &coarse_quantizations, const vector< Centroids > &centroids, Coord *residual)
void GetNearestClusterIdsForPointSubset (const Points &points, const Centroids &centroids, const PointId start_pid, const PointId final_pid, vector< ClusterId > *nearest)
void GetNearestClusterIdsForSubpoints (const Points &points, const Centroids &centroids, const Dimensions start_dim, const Dimensions final_dim, int threads_count, vector< ClusterId > *nearest)
void GetPointsCoarseQuaintizations (const Points &points, const vector< Centroids > &centroids, const int threads_count, vector< CoarseQuantization > *coarse_quantizations)

Function Documentation

Distance Eucldistance ( const Point x,
const Point y 
)

Function calculates squared euclidian distance between two points (points must have the same dimensionality)

Parameters:
xfirst point
ysecond point
Distance Eucldistance ( const Point x,
const Point y,
Dimensions  start,
Dimensions  finish 
)

Function calculates squared euclidian distance point with small dimensionality and subpoint of point with bigger dimensionality.

Parameters:
xfirst point
ysecond point
startfirst dimension of subpoint
finishdimension after the last dimension of subpoint
ClusterId GetNearestClusterId ( const Point point,
const Centroids centroids,
const Dimensions  start_dim,
const Dimensions  final_dim 
)

This function returns identifier of clusters which centroid is the nearest to subpoint limited by start_dim and final_dim

Parameters:
pointfull point
Centroidsall centroids (function finds the nearest one)
start_dimfirst dimension of subpoint
final_dimdimension after the last dimension of subpoint
void GetNearestClusterIdsForPointSubset ( const Points points,
const Centroids centroids,
const PointId  start_pid,
const PointId  final_pid,
vector< ClusterId > *  nearest 
)

This function finds nearest cluster identifiers for points from start_pid to final_pid. We need this function for multi-threading

Parameters:
pointsall points
centroidscentroids of clusters
start_pidfirst point function finds nearest cluster
final_pidpoint after the last point function finds nearest cluster
void GetNearestClusterIdsForSubpoints ( const Points points,
const Centroids centroids,
const Dimensions  start_dim,
const Dimensions  final_dim,
int  threads_count,
vector< ClusterId > *  nearest 
)

This function finds cluster identifiers nearest to subpoints for a number of points. Subpoints are limited by start_dim and finish_dim

Parameters:
pointsall points
centroidscentroids of clusters
start_dimfirst dimesion of subpoint
final_dimdimesion after the last dimension of subpoint
threads_countnumber of threads
nearestresult
void GetPointsCoarseQuaintizations ( const Points points,
const vector< Centroids > &  centroids,
const int  threads_count,
vector< CoarseQuantization > *  coarse_quantizations 
)

This function calculates points coarse product quantizations

Parameters:
pointsall points
centroidscentroids of clusters
threads_countnumber of threads
coarse_quantizationsresult quantizations
void GetResidual ( const Point point,
const CoarseQuantization coarse_quantizations,
const vector< Centroids > &  centroids,
Point residual 
)

This function calculates quantization residual.

Parameters:
pointinitial point
coarse_quantizationspoint coarse quantization
centroidslists of centroids
residualresult residual
void GetResidual ( const Point point,
const CoarseQuantization coarse_quantizations,
const vector< Centroids > &  centroids,
Coord residual 
)

This function calculates quantization residual.

Parameters:
pointinitial point
coarse_quantizationspoint coarse quantization
centroidslists of centroids
residualpointer to start of residual
void GetSubpoints ( const Points points,
const Dimensions  start_dim,
const Dimensions  final_dim,
Points subpoints 
)

This function returns subpoints limited by start_dim and final_dim for every point in points

Parameters:
pointsall points
start_dimfirst dimension of subpoint
final_dimdimension after the last dimension of subpoint
subpointsresult subpoints
 All Classes Files Functions Variables Typedefs Enumerations Enumerator