Kotoba Graph
Graph data structures and operations for the Kotoba graph processing system. Provides efficient implementations of vertices, edges, and graph operations optimized for graph rewriting and query processing.
🏗️ Features
Core Components
- Graph: Main graph data structure with vertex and edge management
- Vertex: Node representation with labels, properties, and IDs
- Edge: Relationship representation with source, target, labels, and properties
- GraphRef: Thread-safe graph reference for concurrent operations
Operations
- Vertex Management: Add, remove, find vertices by ID or properties
- Edge Management: Add, remove, find edges by ID or endpoints
- Graph Traversal: Efficient neighbor access and graph statistics
- Property Access: Fast property lookup and modification
🔧 Usage
use ;
// Create a new graph
let mut graph = empty;
// Add vertices
let vertex1 = graph.add_vertex;
let vertex2 = graph.add_vertex;
// Add edges
graph.add_edge;
// Create thread-safe reference
let graph_ref = new;
📊 Performance Characteristics
- Memory Efficient: Compact vertex and edge representations
- Fast Lookups: O(1) vertex/edge access by ID
- Concurrent Access: GraphRef for thread-safe operations
- Optimized Storage: Minimal memory overhead for graph operations
🤝 Integration
Kotoba Graph is designed to work seamlessly with:
kotoba-core: Base types and error handlingkotoba-execution: Query execution on graphskotoba-rewrite: Graph transformation ruleskotoba-server: Graph serving over HTTP
📄 License
MIT OR Apache-2.0