pub struct SoftLabels {
pub output_similarity: f32,
pub runtime_ratio: f32,
pub structural_similarity: f32,
pub semantic_confidence: f32,
pub type_safety: f32,
}Expand description
Soft labels for gradual correctness
Fields§
§output_similarity: f32Output similarity (0.0 = completely different, 1.0 = identical)
runtime_ratio: f32Runtime ratio (target_time / source_time, 1.0 = same speed)
structural_similarity: f32Structural similarity of AST
semantic_confidence: f32Semantic correctness confidence
type_safety: f32Type safety score
Implementations§
Source§impl SoftLabels
impl SoftLabels
Sourcepub fn from_array(arr: [f32; 5]) -> Self
pub fn from_array(arr: [f32; 5]) -> Self
Create from array
Sourcepub fn overall_score(&self) -> f32
pub fn overall_score(&self) -> f32
Overall correctness score (weighted average)
Trait Implementations§
Source§impl Clone for SoftLabels
impl Clone for SoftLabels
Source§fn clone(&self) -> SoftLabels
fn clone(&self) -> SoftLabels
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 SoftLabels
impl Debug for SoftLabels
Source§impl Default for SoftLabels
impl Default for SoftLabels
Source§fn default() -> SoftLabels
fn default() -> SoftLabels
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SoftLabels
impl<'de> Deserialize<'de> for SoftLabels
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
Source§impl PartialEq for SoftLabels
impl PartialEq for SoftLabels
Source§impl Serialize for SoftLabels
impl Serialize for SoftLabels
impl StructuralPartialEq for SoftLabels
Auto Trait Implementations§
impl Freeze for SoftLabels
impl RefUnwindSafe for SoftLabels
impl Send for SoftLabels
impl Sync for SoftLabels
impl Unpin for SoftLabels
impl UnsafeUnpin for SoftLabels
impl UnwindSafe for SoftLabels
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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