MCPcopy Create free account
hub / github.com/cosdata/cosdata / is_sensitive_pair

Function is_sensitive_pair

org/src/project_and_partition.rs:90–96  ·  view source on GitHub ↗
(x: f32, y: f32)

Source from the content-addressed store, hash-verified

88}
89
90fn is_sensitive_pair(x: f32, y: f32) -> bool {
91 if x == 0.0 {
92 y.abs() > 0.9
93 } else {
94 (y / x).abs() > 0.9
95 }
96}
97
98fn calculate_weight(iteration: u8) -> f32 {
99 (iteration as f32).powi(2) / 1.618034 // Golden ratio approximation

Callers 1

project_vector_to_xFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected