pub struct MatchResult {
pub is_match: bool,
pub score: f32,
pub votes: u32,
pub prominence: f32,
pub offset: TimeOffset,
pub time_scale: f32,
}Expand description
Outcome of matching a query fingerprint against one reference.
MatchResult is always produced — even degenerate inputs yield
MatchResult::NONE rather than an error. The is_match field tells
whether the score cleared the matcher’s decision threshold.
Fields§
§is_match: booltrue iff the score cleared the configured decision threshold.
score: f32Normalised confidence in [0.0, 1.0], algorithm-agnostic
(higher = more likely the same recording).
votes: u32Raw aligned-evidence count (landmark votes, aligned Haitsma frames, or RANSAC inlier count).
prominence: f32Peak prominence: peak evidence divided by background floor.
High (≫ 1) → sharp spike, a true alignment. ~1 → flat histogram, random collisions. This is the primary false-positive guard.
§Semantics differ by matcher
- Wang / Panako:
peak_consolidated / (mean_rest + 1)on the offset or(scale, offset)histogram. - Haitsma: BER-derived proxy, not comparable to Wang/Panako
prominence. The matcher reports
median_BER / (BER + ε); the index path reports0.5 / BER. - Neural: relative cosine excess over other lag positions
(SlidingMax) or
1.0(Centroid / DTW).
Do not threshold prominence with a single constant across matcher types.
offset: TimeOffsetEstimated alignment of the query within the reference.
time_scale: f32Estimated time-scale: query_duration / reference_duration.
1.0 for algorithms with no tempo model (Wang, Haitsma, neural).
Panako reports the reciprocal of the internal Hough/RANSAC scale
s = ref_span / query_span (i.e. 1/s), clamped to [0.5, 2.0].
Note that PanakoMatchConfig::scale_min /
PanakoMatchConfig::scale_max bound the internal search grid
for s, not this public reciprocal.
Implementations§
Source§impl MatchResult
impl MatchResult
Sourcepub const NONE: MatchResult
pub const NONE: MatchResult
Constant to return when no meaningful alignment exists.
Trait Implementations§
Source§impl Clone for MatchResult
impl Clone for MatchResult
Source§fn clone(&self) -> MatchResult
fn clone(&self) -> MatchResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MatchResult
Source§impl Debug for MatchResult
impl Debug for MatchResult
Source§impl PartialEq for MatchResult
impl PartialEq for MatchResult
impl StructuralPartialEq for MatchResult
Auto Trait Implementations§
impl Freeze for MatchResult
impl RefUnwindSafe for MatchResult
impl Send for MatchResult
impl Sync for MatchResult
impl Unpin for MatchResult
impl UnsafeUnpin for MatchResult
impl UnwindSafe for MatchResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more