pub struct Panel {
pub fuse: Fuse,
pub diversify: Diversify,
pub decay: Decay,
}Expand description
Host sequence. Clients do not choose this.
Derived from each slot’s own default rather than written out. A second copy
of the defaults is a second place to change them, and the two disagreeing
means Panel::default() and an unset environment name different panels
while both call themselves the default.
Fields§
§fuse: Fuse§diversify: Diversify§decay: DecayImplementations§
Source§impl Panel
impl Panel
Sourcepub fn parse(fuse: &str, diversify: &str) -> Result<Self, UnknownVoter>
pub fn parse(fuse: &str, diversify: &str) -> Result<Self, UnknownVoter>
A fuse and a diversifier with the shipped decay slot.
pub fn named( fuse: &str, diversify: &str, decay: &str, ) -> Result<Self, UnknownVoter>
Sourcepub fn from_env() -> Result<Self, UnknownVoter>
pub fn from_env() -> Result<Self, UnknownVoter>
Read PACKSET_FUSE, PACKSET_DIVERSIFY, PACKSET_DECAY.
Unset keys take the default. Empty values fail closed.
pub fn from_env_vars( fuse: Option<&str>, diversify: Option<&str>, decay: Option<&str>, ) -> Result<Self, UnknownVoter>
Sourcepub fn decay_weight(
&self,
source: &str,
age_days: f64,
stability_days: f64,
) -> f64
pub fn decay_weight( &self, source: &str, age_days: f64, stability_days: f64, ) -> f64
The factor a fused score is scaled by. age_days is the time since
the last review (or the write); stability_days is the review model’s,
read only by Fsrs. Evergreen sources stay at one.
pub fn fuse_merge<T>(&self, ballots: &[Ballot<T>], k: usize) -> Vec<T>
Sourcepub fn fuse_scored<T>(&self, ballots: &[ScoredBallot<T>], k: usize) -> Vec<T>
pub fn fuse_scored<T>(&self, ballots: &[ScoredBallot<T>], k: usize) -> Vec<T>
Fuse scored lists. CombSUM / CombMNZ use the raw scores; rank voters keep list order and ignore the numbers.
pub fn rerank(&self, items: &[Ranked], lambda: f64) -> Vec<String>
Trait Implementations§
impl Copy for Panel
impl Eq for Panel
impl StructuralPartialEq for Panel
Auto Trait Implementations§
impl Freeze for Panel
impl RefUnwindSafe for Panel
impl Send for Panel
impl Sync for Panel
impl Unpin for Panel
impl UnsafeUnpin for Panel
impl UnwindSafe for Panel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.