pub struct HeuristicWeights {
pub doc: f64,
pub readme: f64,
pub import_deg: f64,
pub path: f64,
pub test_link: f64,
pub churn: f64,
pub centrality: f64,
pub entrypoint: f64,
pub examples: f64,
}Expand description
Configurable weights for different scoring components
Fields§
§doc: f64Documentation weight
readme: f64README file weight
import_deg: f64Import degree weight
path: f64Path depth weight
test_link: f64Test linkage weight
churn: f64Code churn weight
centrality: f64PageRank centrality weight
entrypoint: f64Entrypoint detection weight
examples: f64Examples/usage weight
Implementations§
Source§impl HeuristicWeights
impl HeuristicWeights
Sourcepub fn with_v2_features() -> HeuristicWeights
pub fn with_v2_features() -> HeuristicWeights
Create weights with V2 features enabled
Sourcepub fn normalize(self) -> HeuristicWeights
pub fn normalize(self) -> HeuristicWeights
Normalize weights to sum to 1.0
Sourcepub fn has_v2_features(&self) -> bool
pub fn has_v2_features(&self) -> bool
Check if V2 features are enabled
Trait Implementations§
Source§impl Clone for HeuristicWeights
impl Clone for HeuristicWeights
Source§fn clone(&self) -> HeuristicWeights
fn clone(&self) -> HeuristicWeights
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 HeuristicWeights
impl Debug for HeuristicWeights
Source§impl Default for HeuristicWeights
impl Default for HeuristicWeights
Source§fn default() -> HeuristicWeights
fn default() -> HeuristicWeights
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HeuristicWeights
impl<'de> Deserialize<'de> for HeuristicWeights
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<HeuristicWeights, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<HeuristicWeights, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for HeuristicWeights
impl Hash for HeuristicWeights
Source§impl PartialEq for HeuristicWeights
impl PartialEq for HeuristicWeights
Source§impl Serialize for HeuristicWeights
impl Serialize for HeuristicWeights
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for HeuristicWeights
Auto Trait Implementations§
impl Freeze for HeuristicWeights
impl RefUnwindSafe for HeuristicWeights
impl Send for HeuristicWeights
impl Sync for HeuristicWeights
impl Unpin for HeuristicWeights
impl UnwindSafe for HeuristicWeights
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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