sc_neurocore_engine/bindings/
scpn_metrics.rs1use pyo3::prelude::*;
12
13use crate::scpn;
14
15pub(crate) fn register(module: &Bound<'_, PyModule>) -> PyResult<()> {
17 module.add_class::<PySCPNMetrics>()?;
18 Ok(())
19}
20
21#[pyclass(
22 name = "SCPNMetrics",
23 module = "sc_neurocore_engine.sc_neurocore_engine"
24)]
25pub struct PySCPNMetrics;
26
27#[pymethods]
28impl PySCPNMetrics {
29 #[new]
30 fn new() -> Self {
31 Self
32 }
33
34 #[staticmethod]
35 fn global_coherence(weights: [f64; 7], metrics: [f64; 7]) -> f64 {
36 scpn::SCPNMetrics::global_coherence(&weights, &metrics)
37 }
38
39 #[staticmethod]
40 fn consciousness_index(phases_l4: Vec<f64>, glyph_l7: [f64; 6]) -> f64 {
41 scpn::SCPNMetrics::consciousness_index(&phases_l4, &glyph_l7)
42 }
43}