/**
 * Distribution Algorithms for Asset Association Intelligence
 * Phase 3, Checkpoint C1 - Smart asset-to-entity distribution
 */
import { LoadedAsset } from '../features/generation/assets/asset-loader';
export interface DistributionTarget {
    id: string;
    name?: string;
    weight?: number;
    constraints?: {
        minItems?: number;
        maxItems?: number;
        requiredTags?: string[];
        excludedTags?: string[];
        requiredTypes?: string[];
        excludedTypes?: string[];
        customFilter?: (asset: LoadedAsset) => boolean;
    };
    metadata?: Record<string, any>;
}
export interface DistributionConfig {
    algorithm: 'weighted_random' | 'round_robin' | 'even_spread' | 'custom';
    seed?: string;
    ensureDeterministic?: boolean;
    respectConstraints?: boolean;
    allowPartialFulfillment?: boolean;
    maxRetries?: number;
    customAlgorithm?: (assets: LoadedAsset[], targets: DistributionTarget[]) => DistributionResult;
}
export interface DistributionAssignment {
    target: DistributionTarget;
    assets: LoadedAsset[];
    fulfilled: boolean;
    constraintViolations: string[];
    assignmentReason?: string;
}
export interface DistributionResult {
    assignments: DistributionAssignment[];
    unassigned: LoadedAsset[];
    algorithm: string;
    seed?: string;
    totalAssets: number;
    totalTargets: number;
    successRate: number;
    metadata: {
        executionTime: number;
        retries: number;
        constraintViolations: number;
        averageAssignmentsPerTarget: number;
        distributionEfficiency: number;
    };
}
export declare class DistributionEngine {
    private static readonly DEFAULT_SEED;
    /**
     * Distribute assets to targets using the specified algorithm
     */
    static distribute(assets: LoadedAsset[], targets: DistributionTarget[], config: DistributionConfig): DistributionResult;
    /**
     * Weighted random distribution - assigns assets based on target weights
     */
    private static weightedRandomDistribution;
    /**
     * Round robin distribution - assigns assets in sequential order to targets
     */
    private static roundRobinDistribution;
    /**
     * Even spread distribution - tries to assign equal number of assets to each target
     */
    private static evenSpreadDistribution;
    /**
     * Enforce constraints on distribution result
     */
    private static enforceConstraints;
    /**
     * Calculate success rate of distribution
     */
    private static calculateSuccessRate;
    /**
     * Create seeded random number generator
     */
    private static createSeededRandom;
    /**
     * Create empty result when no assets provided
     */
    private static createEmptyResult;
    /**
     * Create result with all assets unassigned when no targets provided
     */
    private static createResultWithUnassigned;
    /**
     * Analyze distribution result and provide insights
     */
    static analyzeDistribution(result: DistributionResult): {
        summary: string;
        insights: string[];
        recommendations: string[];
        statistics: {
            totalAssigned: number;
            totalUnassigned: number;
            avgAssetsPerTarget: number;
            fulfilmentRate: number;
            constraintViolationRate: number;
        };
    };
}
//# sourceMappingURL=distribution-algorithms.d.ts.map