Sha256: 426b054f8a9ca34e521866a92a1f1655530b358ef931e1656d5c04379119e674

Contents?: true

Size: 1.12 KB

Versions: 3

Compression:

Stored size: 1.12 KB

Contents

#ifndef UMAPPP_NEIGHBOR_LIST_HPP
#define UMAPPP_NEIGHBOR_LIST_HPP

#include <utility>
#include <vector>

/**
 * @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.2.0 vendor/umappp/NeighborList.hpp
umappp-0.1.6 vendor/umappp/NeighborList.hpp
umappp-0.1.5 vendor/umappp/NeighborList.hpp