pub struct ScoringWeights {
pub contig_match: f64,
pub coverage: f64,
pub order: f64,
pub conflict_penalty: f64,
}Expand description
Configurable weights for the scoring algorithm
The scoring algorithm uses three main components:
contig_match: Per-contig match quality (exact, name+length, conflicts)- coverage: What fraction of the reference is covered by good matches
- order: Whether contigs appear in the same order
Additionally, conflict_penalty controls how much credit MD5 conflicts receive
(name+length matches but MD5 differs, indicating different sequences).
Fields§
§contig_match: f64Weight for per-contig match score (default 0.70 = 70%)
coverage: f64Weight for reference coverage (default 0.20 = 20%)
order: f64Weight for contig ordering (default 0.10 = 10%)
conflict_penalty: f64Credit given to MD5 conflicts (default 0.1 = 10% credit) Set to 0.0 for zero credit on conflicts, 1.0 to treat conflicts as matches
Implementations§
Source§impl ScoringWeights
impl ScoringWeights
Sourcepub fn normalized(&self) -> Self
pub fn normalized(&self) -> Self
Normalize the main weights (contig_match, coverage, order) to sum to 1.0
The conflict_penalty is kept as-is since it’s a multiplier, not a weight.
Trait Implementations§
Source§impl Clone for ScoringWeights
impl Clone for ScoringWeights
Source§fn clone(&self) -> ScoringWeights
fn clone(&self) -> ScoringWeights
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScoringWeights
impl Debug for ScoringWeights
Source§impl Default for ScoringWeights
impl Default for ScoringWeights
Source§impl<'de> Deserialize<'de> for ScoringWeights
impl<'de> Deserialize<'de> for ScoringWeights
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ScoringWeights
impl RefUnwindSafe for ScoringWeights
impl Send for ScoringWeights
impl Sync for ScoringWeights
impl Unpin for ScoringWeights
impl UnwindSafe for ScoringWeights
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
Mutably borrows from an owned value. Read more