Skip to main content

LearnedComponent

Trait LearnedComponent 

Source
pub trait LearnedComponent:
    Send
    + Sync
    + Serialize
    + DeserializeOwned
    + Clone {
    // Required methods
    fn component_id() -> &'static str
       where Self: Sized;
    fn confidence(&self) -> f64;
    fn session_count(&self) -> usize;
    fn updated_at(&self) -> u64;

    // Provided methods
    fn merge(&mut self, other: &Self)
       where Self: Sized { ... }
    fn version() -> u32
       where Self: Sized { ... }
}
Expand description

学習結果コンポーネントの共通 trait

各学習対象(DepGraph, Strategy, Exploration 等)の学習結果が実装する。 Typed で管理することで、型安全性と IDE サポートを確保。

Required Methods§

Source

fn component_id() -> &'static str
where Self: Sized,

コンポーネント識別子(ファイル名等に使用)

Source

fn confidence(&self) -> f64

信頼度スコア (0.0 - 1.0)

学習データ量や品質に基づく信頼度。 低い場合は Bootstrap 追加実行を検討。

Source

fn session_count(&self) -> usize

学習に使用したセッション数

Source

fn updated_at(&self) -> u64

最終更新タイムスタンプ (Unix epoch seconds)

Provided Methods§

Source

fn merge(&mut self, other: &Self)
where Self: Sized,

他のコンポーネントとマージ(増分学習用)

デフォルト実装: 信頼度の高い方を優先

Source

fn version() -> u32
where Self: Sized,

バージョン番号(互換性チェック用)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§