/**
 * Smart Sampling Engine for Large Files
 * Implements multiple sampling strategies with intelligent selection
 */
import type { ParsedRow } from '../../parsers/types';
import type { CLIOptions } from '../../cli/types';
import { type LogContext } from '../../utils/logger';
export interface SamplingStrategy {
    name: 'random' | 'stratified' | 'systematic' | 'head';
    targetSize: number;
    seed?: number;
    stratifyColumn?: string;
}
export interface SamplingResult {
    samples: ParsedRow[];
    strategy: SamplingStrategy;
    originalRowCount: number;
    sampledRowCount: number;
    samplingRatio: number;
    qualityMetrics: {
        representativeScore: number;
        convergenceScore: number;
        stratificationBalance?: number;
    };
    warnings: string[];
}
/**
 * Smart sampler that selects optimal sampling strategy based on data characteristics
 */
export declare class SmartSampler {
    private options;
    private fileSize;
    private logContext;
    constructor(options: Required<Pick<CLIOptions, 'autoSample' | 'samplePercentage' | 'sampleRows' | 'sampleSizeBytes' | 'sampleMethod' | 'stratifyBy' | 'seed'>>, fileSize: number, logContext?: LogContext);
    /**
     * Determine if sampling should be enabled based on file size and options
     */
    static shouldEnableSampling(fileSize: number, options: CLIOptions): boolean;
    /**
     * Calculate optimal sampling strategy based on file characteristics
     */
    calculateSamplingStrategy(estimatedRowCount: number, headers: string[]): SamplingStrategy;
    /**
     * Perform sampling using the specified strategy
     */
    performSampling(rows: ParsedRow[], strategy: SamplingStrategy, headers: string[]): Promise<SamplingResult>;
    /**
     * Random sampling using reservoir algorithm
     */
    private performRandomSampling;
    /**
     * Stratified sampling to maintain proportional representation
     */
    private performStratifiedSampling;
    /**
     * Systematic sampling (every nth row)
     */
    private performSystematicSampling;
    /**
     * Head sampling (first n rows)
     */
    private performHeadSampling;
    /**
     * Calculate quality metrics for the sampling result
     */
    private calculateQualityMetrics;
    /**
     * Calculate how well stratified sampling preserved proportions
     */
    private calculateStratificationBalance;
    /**
     * Generate sampling notice for reports
     */
    generateSamplingNotice(result: SamplingResult): string;
    /**
     * Calculate rough margin of error for sampling
     */
    private calculateMarginOfError;
}
//# sourceMappingURL=smart-sampler.d.ts.map