import { BackendConfig } from '../backend/backend'; import { KMeans } from './kmeans'; import { SpectralClustering } from './spectral'; import { AgglomerativeClustering } from './agglomerative'; import { HDBSCAN } from './hdbscan'; import { SOM } from './som'; import type { Platform, PlatformFeatures } from '../backend/platform_types'; export declare const Clustering: { platform: Platform; features: PlatformFeatures; /** * **Idempotent**: concurrent calls with the same (or equivalent) config * return the exact same `Promise` object. A second call after initialization * completes with the same config is a no-op that resolves immediately. * * Calling with a *different* config while initialization is in progress or * after it has completed throws a synchronous error. Call * {@link Clustering.reset | reset()} first to re-initialize with a new * configuration. * * @throws {Error} If called with a different config than a previous call * * @example * ```typescript * // Auto-detect best backend * await Clustering.init(); * * // Use specific backend * await Clustering.init({ backend: 'webgl' }); * * // Safe to call concurrently — both await the same initialization * await Promise.all([Clustering.init(), Clustering.init()]); * * // Different config after init throws — reset first * await Clustering.init({ backend: 'cpu' }); * Clustering.reset(); * await Clustering.init({ backend: 'wasm' }); * ``` */ init(config?: BackendConfig): Promise; /** * After calling this, {@link Clustering.init | init()} must be called again * before using clustering algorithms. */ reset(): void; KMeans: typeof KMeans; SpectralClustering: typeof SpectralClustering; AgglomerativeClustering: typeof AgglomerativeClustering; HDBSCAN: typeof HDBSCAN; SOM: typeof SOM; }; //# sourceMappingURL=init.d.ts.map