/** * Graph Utility Service * Contains helper methods and utility functions for knowledge graph operations */ import { KnowledgeNode, KnowledgeTriad, NodeType, RelationType } from '../types'; export interface IGraphUtilityService { generateNodeId(type: NodeType, name: string, namespace?: string): string; generateTriadId(subject: string, predicate: RelationType, object: string): string; hasConnection(nodeId1: string, nodeId2: string, triads: Map): boolean; calculateClusterCoherence(nodes: string[], triads: Map): number; calculateClusteringCoefficient(nodes: Map, triads: Map): number; groupDuplicates(duplicateTriads: KnowledgeTriad[]): string[][]; dfsComponent(startNode: string, nodes: Map, triads: Map, visited: Set): Promise; } export declare class GraphUtilityService implements IGraphUtilityService { private logger; generateNodeId(type: NodeType, name: string, namespace?: string): string; generateTriadId(subject: string, predicate: RelationType, object: string): string; hasConnection(nodeId1: string, nodeId2: string, triads: Map): boolean; calculateClusterCoherence(nodes: string[], triads: Map): number; groupDuplicates(duplicateTriads: KnowledgeTriad[]): string[][]; dfsComponent(startNode: string, nodes: Map, triads: Map, visited: Set): Promise; /** * Calculate clustering coefficient for the graph */ calculateClusteringCoefficient(nodes: Map, triads: Map): number; /** * Check if a node is semantically similar to another */ isSemanticallySimilar(nodeId1: string, nodeId2: string, triads: Map, threshold?: number): boolean; /** * Find all nodes that are semantically related to a given node */ findSemanticNeighbors(nodeId: string, triads: Map, semanticRelations?: RelationType[]): string[]; /** * Calculate semantic density of a subgraph */ calculateSemanticDensity(nodeIds: string[], triads: Map): number; private simpleHash; } //# sourceMappingURL=graph-utility-service.d.ts.map