pub struct ValueArgumentationFramework {
pub af: ArgumentationFramework,
pub value_of: HashMap<u64, u64>,
pub value_rank: HashMap<u64, u32>,
}Expand description
A Dung framework augmented with a value per argument and an audience preference over values.
Fields§
§af: ArgumentationFramework§value_of: HashMap<u64, u64>argument id → its value (e.g. a human-rights principle hash).
value_rank: HashMap<u64, u32>value → audience preference rank (higher = more important / more preferred).
Implementations§
Source§impl ValueArgumentationFramework
impl ValueArgumentationFramework
Sourcepub fn new(af: ArgumentationFramework) -> Self
pub fn new(af: ArgumentationFramework) -> Self
Creates ValueArgumentationFramework with the given state.
Sourcepub fn set_rank(&mut self, value: u64, rank: u32)
pub fn set_rank(&mut self, value: u64, rank: u32)
Set the audience preference rank for value (higher = more preferred).
Sourcepub fn defeats(&self, attacker: u64, target: u64) -> bool
pub fn defeats(&self, attacker: u64, target: u64) -> bool
An attack attacker → target defeats target iff
rank(value(attacker)) >= rank(value(target)) — an attack from a less-preferred value
cannot defeat a more-preferred (e.g. non-derogable rights) argument.
Sourcepub fn defeat_framework(&self) -> ArgumentationFramework
pub fn defeat_framework(&self) -> ArgumentationFramework
Project to the Dung framework of successful defeats (attacks that pass the value test).
Sourcepub fn grounded_extension(&self) -> HashSet<u64>
pub fn grounded_extension(&self) -> HashSet<u64>
Grounded extension under the audience’s value preference.
Sourcepub fn preferred_extensions(&self) -> Vec<HashSet<u64>>
pub fn preferred_extensions(&self) -> Vec<HashSet<u64>>
Preferred extensions under the audience’s value preference.
Trait Implementations§
Source§impl Clone for ValueArgumentationFramework
impl Clone for ValueArgumentationFramework
Auto Trait Implementations§
impl Freeze for ValueArgumentationFramework
impl RefUnwindSafe for ValueArgumentationFramework
impl Send for ValueArgumentationFramework
impl Sync for ValueArgumentationFramework
impl Unpin for ValueArgumentationFramework
impl UnsafeUnpin for ValueArgumentationFramework
impl UnwindSafe for ValueArgumentationFramework
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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