cuSBF
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
cusbf::NormalizedRecordBatch Class Reference

Host-resident Normalized record batch ready for bulk sequence insert/query. More...

#include <normalized_record_batch.hpp>

Public Member Functions

const std::string & sequence () const noexcept
 Dense normalized sequence (includes inter-record separators).
 
std::span< const NormalizedRecordrecords () const noexcept
 Per-record metadata in source order.
 
uint64_t total_valid_kmers () const noexcept
 Sum of NormalizedRecord::valid_kmers across all records.
 

Friends

template<typename Config >
Result< NormalizedRecordBatchnormalize_record_batch (RecordBatchView batch)
 Builds a normalized record batch from a dense RecordBatchView.
 

Detailed Description

Host-resident Normalized record batch ready for bulk sequence insert/query.

The dense sequence includes alphabet separators between records. Per-record metadata maps input record ranges to normalized record slices and valid-k-mer counts.

Definition at line 37 of file normalized_record_batch.hpp.

Member Function Documentation

◆ records()

std::span< const NormalizedRecord > cusbf::NormalizedRecordBatch::records ( ) const
inlinenoexcept

Per-record metadata in source order.

Definition at line 45 of file normalized_record_batch.hpp.

45 {
46 return std::span<const NormalizedRecord>{records_.data(), records_.size()};
47 }

◆ sequence()

const std::string & cusbf::NormalizedRecordBatch::sequence ( ) const
inlinenoexcept

Dense normalized sequence (includes inter-record separators).

Definition at line 40 of file normalized_record_batch.hpp.

40 {
41 return sequence_;
42 }

◆ total_valid_kmers()

uint64_t cusbf::NormalizedRecordBatch::total_valid_kmers ( ) const
inlinenoexcept

Sum of NormalizedRecord::valid_kmers across all records.

Definition at line 50 of file normalized_record_batch.hpp.

50 {
51 uint64_t total = 0;
52 for (const NormalizedRecord& record : records_) {
53 total += record.valid_kmers;
54 }
55 return total;
56 }

Friends And Related Symbol Documentation

◆ normalize_record_batch

template<typename Config >
Result< NormalizedRecordBatch > normalize_record_batch ( RecordBatchView  batch)
friend

Builds a normalized record batch from a dense RecordBatchView.

Template Parameters
ConfigFilter configuration (alphabet and k-mer sizing).
Parameters
batchDense input batch without embedded separators.
Returns
Owning normalized batch ready for filter::insert_record_batch or query APIs.

Definition at line 314 of file normalized_record_batch.hpp.

314 {
315 return NormalizedRecordBatch::from_batch<Config>(batch);
316}

The documentation for this class was generated from the following file: