kglite 0.15.7

Pure-Rust embedded Cypher knowledge graph engine with in-memory, mmap, and disk storage, and agent-facing schema introspection
Documentation
1
2
3
4
5
6
7
8
9
10
11
use kglite::api::algorithms::{leiden_communities, CommunityOptions};
use kglite::api::storage::{new_dir_graph_in_mode, StorageMode};

#[test]
fn leiden_is_callable_through_the_sealed_api_facade() {
    let graph = new_dir_graph_in_mode(StorageMode::Memory, None).expect("create graph");
    let result = leiden_communities(&graph, &CommunityOptions::default()).expect("run Leiden");

    assert_eq!(result.num_communities, 0);
    assert!(result.assignments.is_empty());
}