pub struct CollectiveIntelligence {
pub groups: HashMap<String, OrganismGroup>,
pub active_decisions: Vec<CollectiveDecision>,
pub swarm_behaviors: Vec<SwarmBehavior>,
pub collective_memory: CollectiveMemory,
pub intelligence_metrics: IntelligenceMetrics,
}
Expand description
Collective intelligence coordinator
Fieldsยง
ยงgroups: HashMap<String, OrganismGroup>
Registered organism groups
active_decisions: Vec<CollectiveDecision>
Active collective decisions
swarm_behaviors: Vec<SwarmBehavior>
Swarm behaviors
collective_memory: CollectiveMemory
Collective memory
intelligence_metrics: IntelligenceMetrics
Intelligence metrics
Implementationsยง
Sourceยงimpl CollectiveIntelligence
impl CollectiveIntelligence
Sourcepub fn new() -> Result<Self, CollectiveError>
pub fn new() -> Result<Self, CollectiveError>
Create new collective intelligence system
Sourcepub fn create_group(
&mut self,
members: Vec<String>,
purpose: String,
) -> Result<String, CollectiveError>
pub fn create_group( &mut self, members: Vec<String>, purpose: String, ) -> Result<String, CollectiveError>
Create new organism group
Sourcepub fn initiate_decision(
&mut self,
question: String,
participants: Vec<String>,
options: Vec<String>,
algorithm: DecisionAlgorithm,
) -> Result<String, CollectiveError>
pub fn initiate_decision( &mut self, question: String, participants: Vec<String>, options: Vec<String>, algorithm: DecisionAlgorithm, ) -> Result<String, CollectiveError>
Initiate collective decision
Sourcepub fn cast_vote(
&mut self,
decision_id: &str,
organism_id: &str,
option_id: &str,
strength: f64,
confidence: f64,
) -> Result<(), CollectiveError>
pub fn cast_vote( &mut self, decision_id: &str, organism_id: &str, option_id: &str, strength: f64, confidence: f64, ) -> Result<(), CollectiveError>
Cast vote in collective decision
Sourcepub fn finalize_decision(
&mut self,
decision_id: &str,
) -> Result<String, CollectiveError>
pub fn finalize_decision( &mut self, decision_id: &str, ) -> Result<String, CollectiveError>
Finalize collective decision
Sourcepub fn get_metrics(&self) -> IntelligenceMetrics
pub fn get_metrics(&self) -> IntelligenceMetrics
Get collective intelligence metrics
Trait Implementationsยง
Sourceยงimpl Clone for CollectiveIntelligence
impl Clone for CollectiveIntelligence
Sourceยงfn clone(&self) -> CollectiveIntelligence
fn clone(&self) -> CollectiveIntelligence
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 moreAuto Trait Implementationsยง
impl Freeze for CollectiveIntelligence
impl RefUnwindSafe for CollectiveIntelligence
impl Send for CollectiveIntelligence
impl Sync for CollectiveIntelligence
impl Unpin for CollectiveIntelligence
impl UnwindSafe for CollectiveIntelligence
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