pub struct WeightedBipolarFramework<A: Clone + Eq + Hash> { /* private fields */ }Expand description
A weighted bipolar argumentation framework.
Stores arguments and two lists of weighted directed edges — attacks and supports — with non-negative finite weights.
Implementations§
Source§impl<A: Clone + Eq + Hash> WeightedBipolarFramework<A>
impl<A: Clone + Eq + Hash> WeightedBipolarFramework<A>
Sourcepub fn add_argument(&mut self, a: A)
pub fn add_argument(&mut self, a: A)
Add an argument. Adding an existing argument is a no-op.
Sourcepub fn add_weighted_attack(
&mut self,
attacker: A,
target: A,
weight: f64,
) -> Result<(), Error>
pub fn add_weighted_attack( &mut self, attacker: A, target: A, weight: f64, ) -> Result<(), Error>
Add a weighted attack. Both endpoints are implicitly added.
Sourcepub fn add_weighted_support(
&mut self,
supporter: A,
supported: A,
weight: f64,
) -> Result<(), Error>
pub fn add_weighted_support( &mut self, supporter: A, supported: A, weight: f64, ) -> Result<(), Error>
Add a weighted support. Both endpoints are implicitly added.
Returns Error::IllegalSelfSupport if supporter == supported.
Sourcepub fn attacks(&self) -> impl Iterator<Item = &WeightedAttack<A>>
pub fn attacks(&self) -> impl Iterator<Item = &WeightedAttack<A>>
Iterate weighted attacks.
Sourcepub fn supports(&self) -> impl Iterator<Item = &WeightedSupport<A>>
pub fn supports(&self) -> impl Iterator<Item = &WeightedSupport<A>>
Iterate weighted supports.
Sourcepub fn edge_count(&self) -> usize
pub fn edge_count(&self) -> usize
Total edge count (attacks + supports).
Sourcepub fn argument_count(&self) -> usize
pub fn argument_count(&self) -> usize
Argument count.
Trait Implementations§
Source§impl<A: Clone + Clone + Eq + Hash> Clone for WeightedBipolarFramework<A>
impl<A: Clone + Clone + Eq + Hash> Clone for WeightedBipolarFramework<A>
Source§fn clone(&self) -> WeightedBipolarFramework<A>
fn clone(&self) -> WeightedBipolarFramework<A>
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<A> Freeze for WeightedBipolarFramework<A>
impl<A> RefUnwindSafe for WeightedBipolarFramework<A>where
A: RefUnwindSafe,
impl<A> Send for WeightedBipolarFramework<A>where
A: Send,
impl<A> Sync for WeightedBipolarFramework<A>where
A: Sync,
impl<A> Unpin for WeightedBipolarFramework<A>where
A: Unpin,
impl<A> UnsafeUnpin for WeightedBipolarFramework<A>
impl<A> UnwindSafe for WeightedBipolarFramework<A>where
A: UnwindSafe,
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