vash
Fast genetic similarity estimation with hash tables
|
Similarity matrix. More...
#include <vector>
#include <array>
#include <string>
#include <cstdint>
#include <cstddef>
Go to the source code of this file.
Classes | |
struct | BayesicSpace::RowColIdx |
Row and column index pair. More... | |
struct | BayesicSpace::FullIdxValue |
Full vectorized index and similarity value. More... | |
struct | BayesicSpace::JaccardPair |
Pair of integers to calculate Jaccard similarity. More... | |
class | BayesicSpace::SimilarityMatrix |
Similarity matrix. More... | |
Functions | |
void | BayesicSpace::chunkedAppend (std::vector< uint64_t > &source, std::vector< uint64_t > &target) |
Append one vector to another by chunks. | |
RowColIdx | BayesicSpace::recoverRCindexes (const uint64_t &vecIdx) noexcept |
Recover row and column indexes. | |
Similarity matrix.
Definitions and interface documentation for a compact representation of a (possibly sparse) similarity matrix.
void BayesicSpace::chunkedAppend | ( | std::vector< uint64_t > & | source, |
std::vector< uint64_t > & | target ) |
Append one vector to another by chunks.
Moves the contents of the source vector to the end of the target vector. Uses \( \sqrt{N} \), where \( N \) is the size of the source vector, extra memory. The source vector is cleared.
[in] | source | the source vector, is cleared as a result |
[in,out] | target | the vector accepting the data from source |
|
noexcept |
Recover row and column indexes.
Recovers the row and column indexes from the matrix element.
[in] | vecIdx | index into the vectorized matrix |