pub struct CorrelationProfile {
pub groups: Vec<CorrelationGroup>,
}Expand description
A named correlation profile containing one or more correlation groups.
A profile groups correlated entities into disjoint CorrelationGroups.
Entities in different groups are treated as uncorrelated. Profiles are
stored in CorrelationModel::profiles keyed by profile name.
See Input Scenarios §5.
§Examples
use cobre_core::{EntityId, scenario::{CorrelationEntity, CorrelationGroup, CorrelationProfile}};
let profile = CorrelationProfile {
groups: vec![CorrelationGroup {
name: "All".to_string(),
entities: vec![
CorrelationEntity { entity_type: "inflow".to_string(), id: EntityId(1) },
CorrelationEntity { entity_type: "inflow".to_string(), id: EntityId(2) },
CorrelationEntity { entity_type: "inflow".to_string(), id: EntityId(3) },
],
matrix: vec![
vec![1.0, 0.0, 0.0],
vec![0.0, 1.0, 0.0],
vec![0.0, 0.0, 1.0],
],
}],
};
assert_eq!(profile.groups[0].matrix.len(), 3);Fields§
§groups: Vec<CorrelationGroup>Disjoint groups of correlated entities within this profile.
Trait Implementations§
Source§impl Clone for CorrelationProfile
impl Clone for CorrelationProfile
Source§fn clone(&self) -> CorrelationProfile
fn clone(&self) -> CorrelationProfile
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 moreSource§impl Debug for CorrelationProfile
impl Debug for CorrelationProfile
Source§impl PartialEq for CorrelationProfile
impl PartialEq for CorrelationProfile
impl StructuralPartialEq for CorrelationProfile
Auto Trait Implementations§
impl Freeze for CorrelationProfile
impl RefUnwindSafe for CorrelationProfile
impl Send for CorrelationProfile
impl Sync for CorrelationProfile
impl Unpin for CorrelationProfile
impl UnsafeUnpin for CorrelationProfile
impl UnwindSafe for CorrelationProfile
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