memstead_base/graph/
mod.rs1pub mod chain;
4pub mod community;
5pub mod query;
6pub mod relations;
7pub mod topology;
8
9use serde::Serialize;
10use std::collections::HashMap;
11
12#[derive(Debug, Clone, Serialize)]
17pub struct LouvainOutput {
18 pub modularity: f64,
19 pub count: usize,
20 pub clusters: HashMap<String, ClusterInfo>,
21 pub entity_cluster_map: HashMap<String, String>,
22}
23
24#[derive(Debug, Clone, Serialize)]
26pub struct ClusterInfo {
27 pub entities: Vec<String>,
28}
29
30#[derive(Debug, Clone, Serialize)]
35pub struct CommunityBridge {
36 pub from_cluster: String,
37 pub to_cluster: String,
38 pub edge_count: usize,
39 pub edge_types: Vec<String>,
40 pub sample_edges: Vec<SampleEdge>,
41}
42
43#[derive(Debug, Clone, Serialize)]
45pub struct SampleEdge {
46 pub from: String,
47 pub to: String,
48 pub rel_type: String,
49}
50
51pub const BRIDGE_SAMPLE_CAP: usize = 3;