pub struct StyleProfile {
pub signal_scores: HashMap<StyleSignal, f64>,
pub dominant_signal: Option<StyleSignal>,
}Expand description
StyleProfile is the intermediate representation between signal scores and personality inference. It holds the normalized signal vector and derives the dominant personality type from it.
Fields§
§signal_scores: HashMap<StyleSignal, f64>§dominant_signal: Option<StyleSignal>Implementations§
Source§impl StyleProfile
impl StyleProfile
Sourcepub fn from_signal_scores(signal_scores: HashMap<StyleSignal, f64>) -> Self
pub fn from_signal_scores(signal_scores: HashMap<StyleSignal, f64>) -> Self
Build a StyleProfile from a signal-scores map.
Sourcepub fn from_signal_counts(counts: HashMap<StyleSignal, u32>) -> Self
pub fn from_signal_counts(counts: HashMap<StyleSignal, u32>) -> Self
Build a StyleProfile from raw signal counts (e.g. from classify_rule). Scores are set directly from counts so dominant_signal reflects the most frequent signal, matching the behavior of personality/profiles.rs.
pub fn score(&self, signal: StyleSignal) -> f64
Sourcepub fn infer_personality_type(&self) -> &'static str
pub fn infer_personality_type(&self) -> &'static str
Infer personality type from the signal vector.
Mapping (scores range 0-25):
- ≥ 12 → high (dominant)
- ≥ 6 → medium (present)
- < 6 → low
Trait Implementations§
Source§impl Clone for StyleProfile
impl Clone for StyleProfile
Source§fn clone(&self) -> StyleProfile
fn clone(&self) -> StyleProfile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StyleProfile
impl RefUnwindSafe for StyleProfile
impl Send for StyleProfile
impl Sync for StyleProfile
impl Unpin for StyleProfile
impl UnsafeUnpin for StyleProfile
impl UnwindSafe for StyleProfile
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