/** * @nahisaho/yata-scale - Graph Partition Strategy * * Graph-based partitioning using connected components */ import type { PartitionStrategy, PartitionStrategyType, EntityMetadata, Entity, Relationship } from '../types.js'; /** * Graph partition strategy based on connected components */ export declare class GraphPartitionStrategy implements PartitionStrategy { readonly type: PartitionStrategyType; private componentMap; private shardIds; private defaultShardId; constructor(shardIds: string[]); /** * Initialize the partition map from entities and relationships */ initialize(entities: Entity[], relationships: Relationship[]): Promise; /** * Find connected components using Union-Find */ private findConnectedComponents; /** * Assign components to shards using best-fit decreasing */ private assignComponentsToShards; /** * Get shard ID for an entity */ getShardId(entityId: string, _metadata?: Partial): string; /** * Get shard IDs for multiple entities */ getShardIds(entityIds: string[]): Map; /** * Calculate remapping (graph partitioning requires recomputation) */ remap(_oldShardCount: number, _newShardCount: number): Map; /** * Add entity to a specific shard */ assignEntity(entityId: string, shardId: string): void; /** * Add entity near related entity (locality) */ assignEntityNear(entityId: string, relatedEntityId: string): void; /** * Get shard distribution statistics */ getDistribution(): Map; /** * Get all shard IDs */ getShardIdsList(): string[]; /** * Get shard count */ get shardCount(): number; /** * Get entity count */ get entityCount(): number; } //# sourceMappingURL=GraphPartitionStrategy.d.ts.map