pub struct Weights {
pub lexical: f64,
pub structural: f64,
pub control_flow: f64,
pub type_similarity: f64,
pub api: f64,
}Expand description
Relative weights of the similarity dimensions in the composite score.
A dimension that is unavailable for a pair (a None type similarity in
Structural mode) drops out and the remaining weights renormalise, so the
composite is always a weighted mean over the dimensions that were actually
measured.
Fields§
§lexical: f64Weight of the lexical dimension.
structural: f64Weight of the structural dimension.
control_flow: f64Weight of the control-flow dimension.
type_similarity: f64Weight of the type dimension, applied only when it is available.
api: f64Weight of the api dimension.
Trait Implementations§
impl StructuralPartialEq for Weights
Auto Trait Implementations§
impl Freeze for Weights
impl RefUnwindSafe for Weights
impl Send for Weights
impl Sync for Weights
impl Unpin for Weights
impl UnsafeUnpin for Weights
impl UnwindSafe for Weights
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