pub enum AnySelection {
Fifo(Fifo),
Ucb1(Ucb1),
Greedy(Greedy),
Thompson(Thompson),
}Expand description
動的に Selection を切り替えられるラッパー
trait object (Box
Variants§
Implementations§
Source§impl AnySelection
impl AnySelection
Sourcepub fn from_kind(kind: SelectionKind, ucb1_c: f64) -> Self
pub fn from_kind(kind: SelectionKind, ucb1_c: f64) -> Self
Sourcepub fn kind(&self) -> SelectionKind
pub fn kind(&self) -> SelectionKind
SelectionKind を取得
Sourcepub fn selection_name(&self) -> &str
pub fn selection_name(&self) -> &str
Selection 名を取得(非 trait メソッド、型推論不要)
Sourcepub fn compute_score(
&self,
action: &str,
target: Option<&str>,
stats: &SwarmStats,
provider: &dyn LearnedProvider,
) -> f64
pub fn compute_score( &self, action: &str, target: Option<&str>, stats: &SwarmStats, provider: &dyn LearnedProvider, ) -> f64
スコアを計算(非 trait メソッド、型推論不要)
Trait Implementations§
Source§impl Clone for AnySelection
impl Clone for AnySelection
Source§fn clone(&self) -> AnySelection
fn clone(&self) -> AnySelection
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 AnySelection
impl Debug for AnySelection
Source§impl Default for AnySelection
impl Default for AnySelection
Source§impl<N, E, S> SelectionLogic<N, E, S> for AnySelection
impl<N, E, S> SelectionLogic<N, E, S> for AnySelection
Source§fn next(
&self,
map: &GraphMap<N, E, S>,
stats: &SwarmStats,
provider: &dyn LearnedProvider,
) -> Option<MapNodeId>
fn next( &self, map: &GraphMap<N, E, S>, stats: &SwarmStats, provider: &dyn LearnedProvider, ) -> Option<MapNodeId>
次のノードを1つ選択
Source§fn select(
&self,
map: &GraphMap<N, E, S>,
count: usize,
stats: &SwarmStats,
provider: &dyn LearnedProvider,
) -> Vec<MapNodeId>
fn select( &self, map: &GraphMap<N, E, S>, count: usize, stats: &SwarmStats, provider: &dyn LearnedProvider, ) -> Vec<MapNodeId>
次のノードを複数選択
Source§fn score(
&self,
action: &str,
target: Option<&str>,
stats: &SwarmStats,
provider: &dyn LearnedProvider,
) -> f64
fn score( &self, action: &str, target: Option<&str>, stats: &SwarmStats, provider: &dyn LearnedProvider, ) -> f64
ノードのスコアを計算
Auto Trait Implementations§
impl Freeze for AnySelection
impl RefUnwindSafe for AnySelection
impl Send for AnySelection
impl Sync for AnySelection
impl Unpin for AnySelection
impl UnwindSafe for AnySelection
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