kaori
A C++ library for barcode extraction and matching
Loading...
Searching...
No Matches
kaori::SimpleBarcodeSearch::State Struct Reference

State of the search. More...

#include <BarcodeSearch.hpp>

Public Attributes

BarcodeIndex index = 0
 
int mismatches = 0
 

Detailed Description

State of the search.

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

Member Data Documentation

◆ index

BarcodeIndex kaori::SimpleBarcodeSearch::State::index = 0

Index of the known barcode that matches best to the input sequence in search() (i.e., fewest total mismatches). If all barcodes have more mismatches than allowed_mismatches, STATUS_UNMATCHED is returned. If multiple barcodes share the same lowest number of mismatches (not greater than allowed_mismatches), STATUS_AMBIGUOUS is returned.

◆ mismatches

int kaori::SimpleBarcodeSearch::State::mismatches = 0

Number of mismatches with the matching known sequence. This should be ignored if index == STATUS_UNMATCHED, as the search will terminate early without computing the exact number of mismatches if allowed_mismatches is exceeded.


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