import { IGameFlow, IGameFlowCircuitResults, IGameFlowCircuitTick, IGameFlowElectricResults, IGameFlowItemResults, IGameFlowItemTick, IGameFlowPollutionResults, IGameFlowPollutionTick, IGameFlowResults, IGameFlowSystemResults, IGameFlowSystemTick, IPlotData } from "./Dataset";
import { Dictionary } from "lodash";
export interface IDatasetQueryOptions {
    startTick?: number;
    endTick?: number;
    labelFilter?: string;
    valueField?: 'cons' | 'prod' | 'count' | string;
    smoothing?: number;
    excludeEmpty?: boolean;
}
export interface IDatasetStats {
    valueField: string;
    sum: number;
    min: number;
    max: number;
    avg: number;
    count: number;
    stddev: number;
    description?: string;
}
export declare class DatasetQuery<TickType extends IGameFlow> implements IDatasetQueryOptions {
    dataset: TickType[];
    startTick: number;
    endTick: number;
    labelFilter: string;
    valueField: 'cons' | 'prod' | 'count' | string;
    smoothing: number;
    excludeEmpty: boolean;
    tickInterval: number;
    constructor(dataRecords: TickType[], options: IDatasetQueryOptions);
    calculateTickInterval(): number;
    uniqueLabels(dataset?: TickType[]): string[];
    groupByLabel(dataset?: TickType[]): Dictionary<TickType[]>;
    groupByTickChunk(dataset: TickType[], tickChunkSize: number): Dictionary<TickType[]>;
    summaryByLabel(dataset?: TickType[]): Dictionary<IDatasetStats>;
    summaryByTickChunk(dataset?: TickType[], tickChunkSize?: number, convertToSeconds?: boolean): Dictionary<IDatasetStats>;
    protected trimToFilter(dataset?: TickType[]): TickType[];
    protected applyFilter(dataset: TickType[]): TickType[];
    protected findStartTick(dataset: TickType[]): number;
    protected findEndTick(dataset: TickType[]): number;
}
export declare class DatasetAnalysis {
    static calculateStdDev(array: number[]): number;
    static createPlotDataFromDataset(dataset: IGameFlowItemTick[] | IGameFlowCircuitTick[] | IGameFlowPollutionTick[] | IGameFlowSystemTick[], startTick: number, endTick: number, labelField: string, valueField: 'cons' | 'prod' | 'count' | string, smoothing?: number, excludeEmpty?: boolean): IPlotData[];
    static smoothData(data: IPlotData[], smooth: number): IPlotData[];
    static createSubsetOfDataset(dataset: IGameFlow[], startTick: number, endTick: number, labelField?: string, excludeEmpty?: boolean): any[];
    static createSummaryOfGenericDataset(result: IGameFlowResults, startTick?: number, endTick?: number): IGameFlowResults;
    static createSummaryOfItemDataset(result: IGameFlowItemResults, startTick?: number, endTick?: number): IGameFlowItemResults;
    static createSummaryOfElectricDataset(result: IGameFlowElectricResults, startTick?: number, endTick?: number): IGameFlowElectricResults;
    static createSummaryOfCircuitDataset(result: IGameFlowCircuitResults, startTick?: number, endTick?: number): IGameFlowCircuitResults;
    static createSummaryOfPollutionDataset(result: IGameFlowPollutionResults, startTick?: number, endTick?: number): IGameFlowPollutionResults;
    static createSummaryOfSystemDataset(result: IGameFlowSystemResults, startTick?: number, endTick?: number): IGameFlowSystemResults;
}
