pub struct LearnedActionOrder {
pub discover: Vec<String>,
pub not_discover: Vec<String>,
pub action_set_hash: u64,
pub source: ActionOrderSource,
}Expand description
学習済みアクション順序
DependencyGraph を LLM なしで即座に構築するためのキャッシュ。 同じアクション集合であれば、LLM を呼ばずにグラフを生成できる。
Fields§
§discover: Vec<String>Discover(NodeExpand)アクションの順序
not_discover: Vec<String>NotDiscover(NodeStateChange)アクションの順序
action_set_hash: u64アクション集合のハッシュ(キャッシュヒット判定用)
ハッシュが一致すれば同じアクション集合とみなす。
source: ActionOrderSource生成元の情報(デバッグ用)
Implementations§
Source§impl LearnedActionOrder
impl LearnedActionOrder
Sourcepub fn new(
discover: Vec<String>,
not_discover: Vec<String>,
actions: &[String],
) -> Self
pub fn new( discover: Vec<String>, not_discover: Vec<String>, actions: &[String], ) -> Self
新しい LearnedActionOrder を作成
Sourcepub fn compute_hash(actions: &[String]) -> u64
pub fn compute_hash(actions: &[String]) -> u64
アクション集合のハッシュを計算
アクション名をソートしてハッシュすることで、順序に依存しないハッシュを生成。
Sourcepub fn matches_actions(&self, actions: &[String]) -> bool
pub fn matches_actions(&self, actions: &[String]) -> bool
アクション集合が一致するか判定
Trait Implementations§
Source§impl Clone for LearnedActionOrder
impl Clone for LearnedActionOrder
Source§fn clone(&self) -> LearnedActionOrder
fn clone(&self) -> LearnedActionOrder
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 LearnedActionOrder
impl Debug for LearnedActionOrder
Source§impl<'de> Deserialize<'de> for LearnedActionOrder
impl<'de> Deserialize<'de> for LearnedActionOrder
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 LearnedActionOrder
impl RefUnwindSafe for LearnedActionOrder
impl Send for LearnedActionOrder
impl Sync for LearnedActionOrder
impl Unpin for LearnedActionOrder
impl UnwindSafe for LearnedActionOrder
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