crate::ix!();
#[derive(Clone, Debug, Serialize, Deserialize, Builder, Getters)]
#[builder(pattern = "owned")]
#[getset(get = "pub")]
pub struct TransformLatentDimensionRatings {
scope_scale: f64,
intangibility: f64,
engineered_source: f64,
spirituality: f64,
authority_orientation:f64,
adaptivity: f64,
temporal_dynamics: f64,
disruptiveness: f64,
complexity_focus: f64,
agency_orientation: f64,
}
macro_rules! intrinsic_ratings {
(
$scope:expr, $intang:expr, $engineered:expr, $spirit:expr,
$auth:expr, $adapt:expr, $tempo:expr, $disrupt:expr,
$complex:expr,$agency:expr
) => {
TransformLatentDimensionRatingsBuilder::default()
.scope_scale(expand_spread($scope))
.intangibility(expand_spread($intang))
.engineered_source(expand_spread($engineered))
.spirituality(expand_spread($spirit))
.authority_orientation(expand_spread($auth))
.adaptivity(expand_spread($adapt))
.temporal_dynamics(expand_spread($tempo))
.disruptiveness(expand_spread($disrupt))
.complexity_focus(expand_spread($complex))
.agency_orientation(expand_spread($agency))
.build()
.unwrap()
};
}
fn expand_spread(value: f64) -> f64 {
if value == 0.0 {
return 0.0;
}
const OLD_MIN: f64 = 0.5;
const OLD_MAX: f64 = 1.0;
const NEW_MIN: f64 = 0.3;
const NEW_MAX: f64 = 1.0;
NEW_MIN + (value - OLD_MIN) * (NEW_MAX - NEW_MIN) / (OLD_MAX - OLD_MIN)
}
impl CoreTransformDomain {
pub fn intrinsic_ratings(&self) -> TransformLatentDimensionRatings {
use CoreTransformDomain::*;
match self {
PersonalGrowth => intrinsic_ratings!(0.10, 0.70, 0.20, 0.60, 0.20, 0.80, 0.30, 0.60, 0.40, 0.20),
SocietalChange => intrinsic_ratings!(0.90, 0.70, 0.40, 0.40, 0.60, 0.60, 0.50, 0.80, 0.80, 0.70),
ScientificProgress => intrinsic_ratings!(0.80, 0.40, 0.90, 0.10, 0.50, 0.60, 0.70, 0.80, 0.80, 0.70),
SpiritualAwakening => intrinsic_ratings!(0.40, 1.00, 0.30, 1.00, 0.30, 0.70, 0.50, 0.60, 0.60, 0.60),
LeadershipGovernance => intrinsic_ratings!(0.80, 0.60, 0.50, 0.20, 1.00, 0.40, 0.60, 0.70, 0.80, 0.90),
ArtisticCultural => intrinsic_ratings!(0.60, 0.80, 0.40, 0.50, 0.40, 0.70, 0.60, 0.60, 0.60, 0.60),
EcologicalRenewal => intrinsic_ratings!(0.70, 0.30, 0.60, 0.50, 0.40, 0.80, 0.40, 0.50, 0.90, 0.70),
StrategicMastery => intrinsic_ratings!(0.70, 0.50, 0.60, 0.20, 0.90, 0.80, 0.70, 0.80, 0.70, 0.80),
AdaptationResilience => intrinsic_ratings!(0.60, 0.50, 0.50, 0.40, 0.50, 1.00, 0.60, 0.70, 0.70, 0.60),
Empowerment => intrinsic_ratings!(0.60, 0.70, 0.40, 0.50, 0.70, 0.80, 0.50, 0.70, 0.60, 1.00),
None => TransformLatentDimensionRatingsBuilder::default()
.scope_scale(0.0)
.intangibility(0.0)
.engineered_source(0.0)
.spirituality(0.0)
.authority_orientation(0.0)
.adaptivity(0.0)
.temporal_dynamics(0.0)
.disruptiveness(0.0)
.complexity_focus(0.0)
.agency_orientation(0.0)
.build()
.unwrap(),
}
}
}
impl NuancedTransformAttribute {
pub fn intrinsic_ratings(&self) -> TransformLatentDimensionRatings {
use NuancedTransformAttribute::*;
match self {
Adaptation => intrinsic_ratings!(0.50, 0.50, 0.40, 0.50, 0.50, 1.00, 0.60, 0.60, 0.70, 0.60),
Agency => intrinsic_ratings!(0.60, 0.70, 0.40, 0.40, 0.70, 0.80, 0.60, 0.60, 0.60, 1.00),
Alchemy => intrinsic_ratings!(0.50, 0.60, 0.60, 0.70, 0.50, 0.60, 0.50, 0.70, 0.70, 0.60),
Awakening => intrinsic_ratings!(0.60, 0.90, 0.30, 1.00, 0.40, 0.80, 0.60, 0.70, 0.60, 0.70),
Challenge => intrinsic_ratings!(0.70, 0.50, 0.50, 0.40, 0.70, 0.70, 0.70, 0.80, 0.70, 0.70),
Complexity => intrinsic_ratings!(0.70, 0.60, 0.60, 0.50, 0.60, 0.70, 0.50, 0.70, 1.00, 0.60),
Conquest => intrinsic_ratings!(0.90, 0.50, 0.50, 0.40, 1.00, 0.70, 0.80, 0.90, 0.80, 0.80),
Creativity => intrinsic_ratings!(0.60, 0.80, 0.40, 0.60, 0.50, 0.70, 0.60, 0.60, 0.70, 0.60),
Destiny => intrinsic_ratings!(0.80, 0.80, 0.30, 0.90, 0.60, 0.50, 0.50, 0.70, 0.80, 0.70),
Discovery => intrinsic_ratings!(0.70, 0.60, 0.70, 0.40, 0.50, 0.80, 0.70, 0.70, 0.80, 0.70),
Diversity => intrinsic_ratings!(0.80, 0.70, 0.40, 0.50, 0.40, 0.90, 0.50, 0.60, 0.80, 0.90),
Empathy => intrinsic_ratings!(0.70, 0.90, 0.20, 0.80, 0.50, 0.80, 0.50, 0.50, 0.70, 0.90),
Enlightenment => intrinsic_ratings!(0.60, 1.00, 0.20, 1.00, 0.40, 0.80, 0.60, 0.60, 0.80, 0.80),
Evolution => intrinsic_ratings!(0.80, 0.50, 0.60, 0.50, 0.60, 1.00, 0.70, 0.80, 0.90, 0.80),
Healing => intrinsic_ratings!(0.60, 0.60, 0.40, 0.80, 0.40, 0.80, 0.50, 0.40, 0.60, 0.90),
Heritage => intrinsic_ratings!(0.70, 0.70, 0.40, 0.60, 0.60, 0.60, 0.50, 0.60, 0.80, 0.70),
Innovation => intrinsic_ratings!(0.80, 0.60, 1.00, 0.20, 0.60, 0.80, 0.80, 0.80, 0.80, 0.70),
Insight => intrinsic_ratings!(0.70, 0.90, 0.30, 0.80, 0.50, 0.70, 0.40, 0.50, 0.70, 0.80),
Integration => intrinsic_ratings!(0.80, 0.70, 0.50, 0.50, 0.60, 0.80, 0.50, 0.60, 0.90, 0.80),
Leadership => intrinsic_ratings!(0.80, 0.60, 0.60, 0.30, 1.00, 0.60, 0.60, 0.70, 0.80, 0.90),
Mobility => intrinsic_ratings!(0.70, 0.40, 0.60, 0.30, 0.60, 0.90, 0.80, 0.70, 0.70, 0.70),
Renewal => intrinsic_ratings!(0.70, 0.60, 0.40, 0.70, 0.50, 0.80, 0.50, 0.50, 0.80, 0.80),
Resilience => intrinsic_ratings!(0.60, 0.50, 0.40, 0.50, 0.60, 1.00, 0.50, 0.60, 0.80, 0.80),
Strategy => intrinsic_ratings!(0.80, 0.60, 0.60, 0.30, 0.90, 0.80, 0.70, 0.80, 0.80, 0.80),
Unity => intrinsic_ratings!(0.90, 0.80, 0.40, 0.60, 0.70, 0.80, 0.60, 0.60, 0.80, 1.00),
Vision => intrinsic_ratings!(0.80, 0.90, 0.30, 0.80, 0.60, 0.70, 0.50, 0.60, 0.80, 0.90),
}
}
}