kaori
A C++ library for barcode extraction and matching
Loading...
Searching...
No Matches
Public Attributes | List of all members
kaori::SegmentedBarcodeSearch< num_segments >::State Struct Reference

State of the search. More...

#include <BarcodeSearch.hpp>

Public Attributes

int index = 0
 
int mismatches = 0
 
std::array< int, num_segments > per_segment
 

Detailed Description

template<size_t num_segments>
struct kaori::SegmentedBarcodeSearch< num_segments >::State

State of the search.

This contains both the results of the search for any given input sequence, as well as cached mismatches to optimize searches for future inputs.

Member Data Documentation

◆ index

template<size_t num_segments>
int kaori::SegmentedBarcodeSearch< num_segments >::State::index = 0

Index of the known sequence that matches best to the input sequence in search() (i.e., fewest total mismatches). If no match was found or if the best match is ambiguous, this will be set to -1.

◆ mismatches

template<size_t num_segments>
int kaori::SegmentedBarcodeSearch< num_segments >::State::mismatches = 0

Total number of mismatches with the matching known sequence, summed across all segments. This should only be used if index != -1.

◆ per_segment

template<size_t num_segments>
std::array<int, num_segments> kaori::SegmentedBarcodeSearch< num_segments >::State::per_segment

Number of mismatches in each segment. This should only be used if index != -1.


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