1#ifndef QDTSNE_UTILS_HPP
2#define QDTSNE_UTILS_HPP
14#include "aarand/aarand.hpp"
17#ifndef QDTSNE_CUSTOM_PARALLEL
34template<
typename Index_,
typename Float_>
45 return std::ceil(perplexity * 3);
61template<
int num_dim_,
typename Float_ =
double>
72 for (
size_t i = 0;
i <
total;
i += 2) {
73 auto paired = aarand::standard_normal<Float_>(
rng);
80 auto paired = aarand::standard_normal<Float_>(
rng);
98template<
int num_dim_,
typename Float_ =
double>
117template<
typename Task_,
class Run_>
119#ifndef QDTSNE_CUSTOM_PARALLEL
Status of the t-SNE iterations.
Definition Status.hpp:64
std::vector< std::vector< std::pair< Index_, Float_ > > > NeighborList
int perplexity_to_k(double perplexity)
Definition utils.hpp:44
knncolle::NeighborList< Index_, Float_ > NeighborList
Lists of neighbors for each observation.
Definition utils.hpp:35
void initialize_random(Float_ *Y, size_t num_points, int seed=42)
Definition utils.hpp:62
void parallelize(int num_workers, Task_ num_tasks, Run_ run_task_range)
Definition utils.hpp:118