pub struct ConnectivePreferences {
pub allowed: HashMap<RstRelation, Vec<String>, RandomState>,
pub preferred: HashMap<RstRelation, Vec<(String, f32)>, RandomState>,
}Expand description
Per-RST-relation connective preferences.
allowed restricts which connectives the engine may pick for a given
RST relation. A missing key means the engine’s default pool for that
relation is used unmodified. An explicit empty Vec for a key is
rejected at validation time — empty pools are a footgun that would
silently force fallback every time.
preferred is a tie-breaker layer applied within whatever candidate
set survives allowed-filtering: connectives that match the
preferred list for a relation get their weights summed into the
scorer; connectives without an entry score 0 (uniform). Weights are
additive and do not normalize.
Family-budget enforcement (the existing trailing-window cap on emissions per connector family) runs unchanged. The profile narrows the candidate set; the budget governs rotation within whatever set survives.
Fields§
§allowed: HashMap<RstRelation, Vec<String>, RandomState>§preferred: HashMap<RstRelation, Vec<(String, f32)>, RandomState>Implementations§
Source§impl ConnectivePreferences
impl ConnectivePreferences
Sourcepub fn neutral() -> Self
pub fn neutral() -> Self
An empty preferences struct — every relation falls through to the engine’s default pool and uniform weights.
Sourcepub fn is_neutral(&self) -> bool
pub fn is_neutral(&self) -> bool
true when no relation has an explicit entry in either map.
Trait Implementations§
Source§impl Clone for ConnectivePreferences
impl Clone for ConnectivePreferences
Source§fn clone(&self) -> ConnectivePreferences
fn clone(&self) -> ConnectivePreferences
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConnectivePreferences
impl Debug for ConnectivePreferences
Source§impl Default for ConnectivePreferences
impl Default for ConnectivePreferences
Source§fn default() -> ConnectivePreferences
fn default() -> ConnectivePreferences
Source§impl PartialEq for ConnectivePreferences
impl PartialEq for ConnectivePreferences
Source§fn eq(&self, other: &ConnectivePreferences) -> bool
fn eq(&self, other: &ConnectivePreferences) -> bool
self and other values to be equal, and is used by ==.