pub struct IndictmentMap<Sc: Score> {
pub indictments: HashMap<EntityRef, Indictment<Sc>>,
}Expand description
Map of entity indictments for analyzing which entities cause violations.
Fields§
§indictments: HashMap<EntityRef, Indictment<Sc>>Indictments keyed by entity reference.
Implementations§
Source§impl<Sc: Score> IndictmentMap<Sc>
impl<Sc: Score> IndictmentMap<Sc>
Sourcepub fn from_matches(matches: Vec<DetailedConstraintMatch<Sc>>) -> Self
pub fn from_matches(matches: Vec<DetailedConstraintMatch<Sc>>) -> Self
Builds an indictment map from a collection of detailed matches.
Sourcepub fn get(&self, entity: &EntityRef) -> Option<&Indictment<Sc>>
pub fn get(&self, entity: &EntityRef) -> Option<&Indictment<Sc>>
Gets the indictment for a specific entity.
Sourcepub fn worst_entities(&self) -> Vec<&EntityRef>
pub fn worst_entities(&self) -> Vec<&EntityRef>
Returns entities sorted by worst score impact (most negative first).
Trait Implementations§
Source§impl<Sc: Clone + Score> Clone for IndictmentMap<Sc>
impl<Sc: Clone + Score> Clone for IndictmentMap<Sc>
Source§fn clone(&self) -> IndictmentMap<Sc>
fn clone(&self) -> IndictmentMap<Sc>
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<Sc> Freeze for IndictmentMap<Sc>
impl<Sc> !RefUnwindSafe for IndictmentMap<Sc>
impl<Sc> Send for IndictmentMap<Sc>
impl<Sc> Sync for IndictmentMap<Sc>
impl<Sc> Unpin for IndictmentMap<Sc>where
Sc: Unpin,
impl<Sc> !UnwindSafe for IndictmentMap<Sc>
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