Sha256: f7d0d85b0a7dde12cf3807e99cbc550e2be6d8ed5089a24eb208f5de817a09af

Contents?: true

Size: 1.08 KB

Versions: 3

Compression:

Stored size: 1.08 KB

Contents

#ifndef UMAPPP_NEIGHBOR_LIST_HPP
#define UMAPPP_NEIGHBOR_LIST_HPP

/**
 * @file NeighborList.hpp
 *
 * @brief Defines the `NeighborList` typedef.
 */

namespace umappp {

/**
 * @brief Neighbor specification based on index and distance.
 *
 * @tparam Float Floating-point type.
 *
 * The index refers to the position of the neighboring observation in the dataset.
 * The statistic can store some statistic related to the neighbor, e.g., distance or probabilities.
 */ 
template<typename Float = double>
using Neighbor =  std::pair<int, Float>;

/**
 * @brief Lists of neighbors for each observation.
 *
 * @tparam Float Floating-point type.
 *
 * Each inner vector corresponds to an observation and contains the list of nearest neighbors for that observation.
 * Neighbors for each observation should be unique - there should be no more than one occurrence of each index in each inner vector.
 * Also, the inner vector for observation `i` should not contain any `Neighbor` with index `i`.
 */
template<typename Float = double>
using NeighborList = std::vector<std::vector<Neighbor<Float> > >;

}

#endif

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
umappp-0.1.4 vendor/umappp/NeighborList.hpp
umappp-0.1.3 vendor/umappp/NeighborList.hpp
umappp-0.1.2 vendor/umappp/NeighborList.hpp