SemiDiscreteOT 1.0
Semi-Discrete Optimal Transport Library
Loading...
Searching...
No Matches
Functions
dkm::details Namespace Reference

Functions

template<typename T , size_t N>
distance_squared (const std::array< T, N > &point_a, const std::array< T, N > &point_b)
 
template<typename T , size_t N>
distance (const std::array< T, N > &point_a, const std::array< T, N > &point_b)
 
template<typename T , size_t N>
std::vector< T > closest_distance (const std::vector< std::array< T, N > > &means, const std::vector< std::array< T, N > > &data)
 
template<typename T , size_t N>
std::vector< std::array< T, N > > random_plusplus (const std::vector< std::array< T, N > > &data, uint32_t k, uint64_t seed)
 
template<typename T , size_t N>
uint32_t closest_mean (const std::array< T, N > &point, const std::vector< std::array< T, N > > &means)
 
template<typename T , size_t N>
std::vector< uint32_t > calculate_clusters (const std::vector< std::array< T, N > > &data, const std::vector< std::array< T, N > > &means)
 
template<typename T , size_t N>
std::vector< std::array< T, N > > calculate_means (const std::vector< std::array< T, N > > &data, const std::vector< uint32_t > &clusters, const std::vector< std::array< T, N > > &old_means, uint32_t k)
 
template<typename T , size_t N>
std::vector< T > deltas (const std::vector< std::array< T, N > > &old_means, const std::vector< std::array< T, N > > &means)
 
template<typename T >
bool deltas_below_limit (const std::vector< T > &deltas, T min_delta)
 
template<typename T , size_t N>
std::vector< T > closest_distance_parallel (const std::vector< std::array< T, N > > &means, const std::vector< std::array< T, N > > &data)
 
template<typename T , size_t N>
std::vector< std::array< T, N > > random_plusplus_parallel (const std::vector< std::array< T, N > > &data, uint32_t k, uint64_t seed)
 
template<typename T , size_t N>
std::vector< uint32_t > calculate_clusters_parallel (const std::vector< std::array< T, N > > &data, const std::vector< std::array< T, N > > &means)
 
std::vector< std::string > split_commas (const std::string &line)
 

Function Documentation

◆ distance_squared()

template<typename T , size_t N>
T dkm::details::distance_squared ( const std::array< T, N > &  point_a,
const std::array< T, N > &  point_b 
)

Definition at line 32 of file dkm.hpp.

Here is the caller graph for this function:

◆ distance()

template<typename T , size_t N>
T dkm::details::distance ( const std::array< T, N > &  point_a,
const std::array< T, N > &  point_b 
)

Definition at line 42 of file dkm.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ closest_distance()

template<typename T , size_t N>
std::vector< T > dkm::details::closest_distance ( const std::vector< std::array< T, N > > &  means,
const std::vector< std::array< T, N > > &  data 
)

Definition at line 50 of file dkm.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ random_plusplus()

template<typename T , size_t N>
std::vector< std::array< T, N > > dkm::details::random_plusplus ( const std::vector< std::array< T, N > > &  data,
uint32_t  k,
uint64_t  seed 
)

Definition at line 71 of file dkm.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ closest_mean()

template<typename T , size_t N>
uint32_t dkm::details::closest_mean ( const std::array< T, N > &  point,
const std::vector< std::array< T, N > > &  means 
)

Definition at line 106 of file dkm.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculate_clusters()

template<typename T , size_t N>
std::vector< uint32_t > dkm::details::calculate_clusters ( const std::vector< std::array< T, N > > &  data,
const std::vector< std::array< T, N > > &  means 
)

Definition at line 125 of file dkm.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculate_means()

template<typename T , size_t N>
std::vector< std::array< T, N > > dkm::details::calculate_means ( const std::vector< std::array< T, N > > &  data,
const std::vector< uint32_t > &  clusters,
const std::vector< std::array< T, N > > &  old_means,
uint32_t  k 
)

Definition at line 138 of file dkm.hpp.

Here is the caller graph for this function:

◆ deltas()

template<typename T , size_t N>
std::vector< T > dkm::details::deltas ( const std::vector< std::array< T, N > > &  old_means,
const std::vector< std::array< T, N > > &  means 
)

Definition at line 164 of file dkm.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deltas_below_limit()

template<typename T >
bool dkm::details::deltas_below_limit ( const std::vector< T > &  deltas,
min_delta 
)

Definition at line 177 of file dkm.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ closest_distance_parallel()

template<typename T , size_t N>
std::vector< T > dkm::details::closest_distance_parallel ( const std::vector< std::array< T, N > > &  means,
const std::vector< std::array< T, N > > &  data 
)

Definition at line 34 of file dkm_parallel.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ random_plusplus_parallel()

template<typename T , size_t N>
std::vector< std::array< T, N > > dkm::details::random_plusplus_parallel ( const std::vector< std::array< T, N > > &  data,
uint32_t  k,
uint64_t  seed 
)

Definition at line 55 of file dkm_parallel.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculate_clusters_parallel()

template<typename T , size_t N>
std::vector< uint32_t > dkm::details::calculate_clusters_parallel ( const std::vector< std::array< T, N > > &  data,
const std::vector< std::array< T, N > > &  means 
)

Definition at line 90 of file dkm_parallel.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ split_commas()

std::vector< std::string > dkm::details::split_commas ( const std::string &  line)
inline

Definition at line 18 of file dkm_utils.hpp.

Here is the caller graph for this function: