pub struct SimilarityBreakdown {
pub lexical: f64,
pub structural: f64,
pub control_flow: Option<f64>,
pub type_similarity: Option<f64>,
pub api: Option<f64>,
pub composite: f64,
}Expand description
The per-dimension similarity scores and their composite.
Every dimension stays visible: the composite is a convenience, never a replacement for the breakdown.
Fields§
§lexical: f64Verbatim agreement of aligned statements’ leading tokens.
structural: f64Rename-invariant structural agreement.
control_flow: Option<f64>Control-flow-profile agreement (a syntactic approximation), or None
when neither side has control-flow operations to compare.
type_similarity: Option<f64>Type agreement, or None when types are unavailable (Structural mode).
api: Option<f64>Call-name multiset agreement, or None when neither unit calls
anything and there is therefore nothing to compare.
composite: f64Weighted mean of the available dimensions.
Trait Implementations§
Source§impl Clone for SimilarityBreakdown
impl Clone for SimilarityBreakdown
Source§fn clone(&self) -> SimilarityBreakdown
fn clone(&self) -> SimilarityBreakdown
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SimilarityBreakdown
Source§impl Debug for SimilarityBreakdown
impl Debug for SimilarityBreakdown
Source§impl PartialEq for SimilarityBreakdown
impl PartialEq for SimilarityBreakdown
impl StructuralPartialEq for SimilarityBreakdown
Auto Trait Implementations§
impl Freeze for SimilarityBreakdown
impl RefUnwindSafe for SimilarityBreakdown
impl Send for SimilarityBreakdown
impl Sync for SimilarityBreakdown
impl Unpin for SimilarityBreakdown
impl UnsafeUnpin for SimilarityBreakdown
impl UnwindSafe for SimilarityBreakdown
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