|
| | BlockedIndicesFactory (const Index_ num_cells, const Block_ *block) |
| |
| const std::vector< Index_ > & | sizes () const |
| |
| template<typename Input_ > |
| Buffers< Input_ > | create_buffers () const |
| |
| template<typename Input_ , typename Distance_ , class Matrix_ = knncolle::Matrix<Index_, Input_>> |
| void | build (const std::size_t num_dim, const Input_ *const data, const knncolle::Builder< Index_, Input_, Distance_, Matrix_ > &builder, std::vector< std::shared_ptr< const knncolle::Prebuilt< Index_, Input_, Distance_ > > > &output, Buffers< Input_ > &work) const |
| |
| template<typename Input_ , typename Distance_ , class Matrix_ = knncolle::Matrix<Index_, Input_>> |
| std::vector< std::shared_ptr< const knncolle::Prebuilt< Index_, Input_, Distance_ > > > | build (const std::size_t num_dim, const Input_ *const data, const knncolle::Builder< Index_, Input_, Distance_, Matrix_ > &builder) const |
| |
template<typename Index_, typename Block_>
class mumosa::BlockedIndicesFactory< Index_, Block_ >
Factory for creating nearest-neighbor search indices for each block.
Unlike build_blocked_indices(), this class handles the scenario where cells from the same block do not occupy contiguous columns, i.e., cells from different blocks are intermingled.
- Template Parameters
-
| Index_ | Integer type of the number of cells. |
| Block_ | Integer type of the block assignments. |
template<typename Index_ , typename Block_ >
template<typename Input_ , typename Distance_ , class Matrix_ = knncolle::Matrix<Index_, Input_>>
Overload of build() that handles some of the memory allocation.
- Template Parameters
-
| Input_ | Numeric type of the input data. |
| Distance_ | Floating-point type of the distances. |
| Matrix_ | Class of the input data matrix for the neighbor search. This should satisfy the knncolle::Matrix interface. |
- Parameters
-
| num_dim | Number of dimensions. |
| [in] | data | Pointer to an array of length equal to the product of num_dim and num_obs. This contains the embedding matrix for a modality, stored in column-major layout where each row is a dimension and each column is a cell. |
| builder | Algorithm to use for the neighbor search. |
- Returns
- Vector in which to store the nearest-neighbor search indices constructed by
builder. This has length equal to the number of blocks, where a new search index is constructed for each non-empty block. Empty blocks are represented by null pointers.