pub mod community;
pub mod query;
pub mod relations;
pub mod topology;
use serde::Serialize;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize)]
pub struct LouvainOutput {
pub modularity: f64,
pub count: usize,
pub clusters: HashMap<String, ClusterInfo>,
pub entity_cluster_map: HashMap<String, String>,
}
#[derive(Debug, Clone, Serialize)]
pub struct ClusterInfo {
pub entities: Vec<String>,
}
#[derive(Debug, Clone, Serialize)]
pub struct CommunityBridge {
pub from_cluster: String,
pub to_cluster: String,
pub edge_count: usize,
pub edge_types: Vec<String>,
pub sample_edges: Vec<SampleEdge>,
}
#[derive(Debug, Clone, Serialize)]
pub struct SampleEdge {
pub from: String,
pub to: String,
pub rel_type: String,
}
pub const BRIDGE_SAMPLE_CAP: usize = 3;