pub struct CalculatorConfig {
pub confidence_k: f64,
pub prior_base: f64,
pub prior_max: f64,
}Expand description
Configuration for the reputation calculator
Controls how reputation scores are calculated, including confidence growth rate and prior score parameters.
§Example
use reputation_core::CalculatorConfig;
let config = CalculatorConfig {
confidence_k: 20.0, // Slower confidence growth
prior_base: 60.0, // Higher starting score
prior_max: 90.0, // Higher maximum prior
};Fields§
§confidence_k: f64Confidence growth parameter (k in the formula) Higher values = slower confidence growth Default: 15.0
prior_base: f64Base prior score for all agents Default: 50.0
prior_max: f64Maximum possible prior score Default: 80.0
Implementations§
Trait Implementations§
Source§impl Clone for CalculatorConfig
impl Clone for CalculatorConfig
Source§fn clone(&self) -> CalculatorConfig
fn clone(&self) -> CalculatorConfig
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 CalculatorConfig
impl Debug for CalculatorConfig
Source§impl Default for CalculatorConfig
impl Default for CalculatorConfig
Source§impl<'de> Deserialize<'de> for CalculatorConfig
impl<'de> Deserialize<'de> for CalculatorConfig
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 CalculatorConfig
impl RefUnwindSafe for CalculatorConfig
impl Send for CalculatorConfig
impl Sync for CalculatorConfig
impl Unpin for CalculatorConfig
impl UnwindSafe for CalculatorConfig
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