pub struct CodeGraph { /* private fields */ }Expand description
CodeGraph - Minden CodeBlock-ot osszefog
A kod MAGA a graf. Nincs kulso DB.
Implementations§
Source§impl CodeGraph
impl CodeGraph
Sourcepub fn add(&self, block: CodeBlock) -> HopeResult<String>
pub fn add(&self, block: CodeBlock) -> HopeResult<String>
Block hozzaadasa
Sourcepub fn get_by_name(&self, name: &str) -> Option<CodeBlock>
pub fn get_by_name(&self, name: &str) -> Option<CodeBlock>
Block lekerese nev alapjan
Sourcepub fn connect(
&self,
from_id: &str,
to_id: &str,
conn_type: ConnectionType,
strength: f64,
) -> bool
pub fn connect( &self, from_id: &str, to_id: &str, conn_type: ConnectionType, strength: f64, ) -> bool
Ket block osszekotese (ketiranyú)
Sourcepub fn connect_one_way(
&self,
from_id: &str,
to_id: &str,
conn_type: ConnectionType,
strength: f64,
) -> bool
pub fn connect_one_way( &self, from_id: &str, to_id: &str, conn_type: ConnectionType, strength: f64, ) -> bool
Egyiranyu kapcsolat
Sourcepub fn get_connected(
&self,
id: &str,
conn_type: Option<ConnectionType>,
) -> Vec<CodeBlock>
pub fn get_connected( &self, id: &str, conn_type: Option<ConnectionType>, ) -> Vec<CodeBlock>
Kapcsolt block-ok lekerese
Sourcepub fn find_by_type(&self, block_type: BlockType) -> Vec<CodeBlock>
pub fn find_by_type(&self, block_type: BlockType) -> Vec<CodeBlock>
Kereses tipus alapjan
Sourcepub fn find_by_tag(&self, tag: &str) -> Vec<CodeBlock>
pub fn find_by_tag(&self, tag: &str) -> Vec<CodeBlock>
Kereses tag alapjan
Sourcepub fn top_important(&self, limit: usize) -> Vec<CodeBlock>
pub fn top_important(&self, limit: usize) -> Vec<CodeBlock>
Legfontosabb block-ok
Sourcepub fn most_accessed(&self, limit: usize) -> Vec<CodeBlock>
pub fn most_accessed(&self, limit: usize) -> Vec<CodeBlock>
Legtobbet hasznalt block-ok
Sourcepub fn traverse_bfs(
&self,
start_id: &str,
max_depth: usize,
) -> Vec<(CodeBlock, usize)>
pub fn traverse_bfs( &self, start_id: &str, max_depth: usize, ) -> Vec<(CodeBlock, usize)>
BFS bejaras
Sourcepub fn find_path(&self, from_id: &str, to_id: &str) -> Option<Vec<String>>
pub fn find_path(&self, from_id: &str, to_id: &str) -> Option<Vec<String>>
Ut kereses ket block kozott
Sourcepub fn stats(&self) -> GraphStats
pub fn stats(&self) -> GraphStats
Graf statisztikak
Sourcepub fn all_blocks(&self) -> Vec<CodeBlock>
pub fn all_blocks(&self) -> Vec<CodeBlock>
Osszes block
Source§impl CodeGraph
impl CodeGraph
Sourcepub fn remember(&self, content: &str, importance: f64) -> HopeResult<String>
pub fn remember(&self, content: &str, importance: f64) -> HopeResult<String>
Emlyek hozzaadasa (Memory block)
Sourcepub fn feel(
&self,
emotion: &str,
intensity: f64,
trigger: Option<&str>,
) -> HopeResult<String>
pub fn feel( &self, emotion: &str, intensity: f64, trigger: Option<&str>, ) -> HopeResult<String>
Erzelem hozzaadasa (Emotion block)
Sourcepub fn know_person(
&self,
name: &str,
relationship: &str,
trust: f64,
) -> HopeResult<String>
pub fn know_person( &self, name: &str, relationship: &str, trust: f64, ) -> HopeResult<String>
Szemely hozzaadasa (Person block)
Sourcepub fn think(&self, thought: &str, importance: f64) -> HopeResult<String>
pub fn think(&self, thought: &str, importance: f64) -> HopeResult<String>
Gondolat hozzaadasa (Thought block)
Sourcepub fn learn_concept(
&self,
name: &str,
description: &str,
importance: f64,
) -> HopeResult<String>
pub fn learn_concept( &self, name: &str, description: &str, importance: f64, ) -> HopeResult<String>
Koncepció hozzaadasa (Concept block)
Trait Implementations§
Source§impl Aware for CodeGraph
impl Aware for CodeGraph
Source§fn identity(&self) -> &CodeIdentity
fn identity(&self) -> &CodeIdentity
Ki vagyok? - Identitás lekérdezése
Source§fn identity_mut(&mut self) -> &mut CodeIdentity
fn identity_mut(&mut self) -> &mut CodeIdentity
Ki vagyok? - Mutable identitás
Source§fn reflect(&self) -> Reflection
fn reflect(&self) -> Reflection
Önreflexió - Mit gondolok magamról?
Source§fn init<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = HopeResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn init<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = HopeResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Modul inicializálása
Source§fn state(&self) -> ModuleState
fn state(&self) -> ModuleState
Aktuális állapot
Source§fn shutdown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = HopeResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = HopeResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Modul leállítása
Source§fn deactivate(&mut self)
fn deactivate(&mut self)
Modul deaktiválása (idle)
Auto Trait Implementations§
impl Freeze for CodeGraph
impl RefUnwindSafe for CodeGraph
impl Send for CodeGraph
impl Sync for CodeGraph
impl Unpin for CodeGraph
impl UnwindSafe for CodeGraph
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request