UNPKG

arela

Version:

AI-powered CTO with multi-agent orchestration, code summarization, visual testing (web + mobile) for blazing fast development.

35 lines 1.15 kB
/** * Modularity calculations for slice cohesion */ import type { Graph, Community } from "./types.js"; /** * Calculate cohesion score for a community (0-100) * Cohesion = internal edges / (internal edges + external edges) * 100 */ export declare function calculateCohesion(community: Community, graph: Graph): number; /** * Calculate overall modularity of the clustering */ export declare function calculateModularityScore(communities: Community[], graph: Graph): number; /** * Calculate coupling between two communities */ export declare function calculateCoupling(comm1: Community, comm2: Community, graph: Graph): number; /** * Calculate average cohesion across all communities */ export declare function calculateAverageCohesion(communities: Community[], graph: Graph): number; /** * Get statistics about communities */ export declare function getCommunitiesStats(communities: Community[], graph: Graph): { count: number; avgSize: number; minSize: number; maxSize: number; avgCohesion: number; minCohesion: number; maxCohesion: number; modularity: number; }; //# sourceMappingURL=modularity.d.ts.map