@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
30 lines (29 loc) • 946 B
TypeScript
import type { MetaStatistics } from '../meta-statistics';
import { type FeatureKey, type FeatureStatistics } from '../features/feature';
interface MinMaxAvgMedian {
sum: number;
min: number;
max: number;
avg: number;
median: number;
}
/**
* Calculates the min, max, average and median of the given data set.
*/
export declare function minMaxAvgAndMedian(data: number[]): MinMaxAvgMedian;
/**
* Formats the given statistics as a string.
*/
export declare function statsString(data: MinMaxAvgMedian, suffix?: string): string;
/**
* Prints the given feature statistics to the console.
*/
export declare function printFeatureStatistics(statistics: {
features: FeatureStatistics;
meta: MetaStatistics;
}, features?: 'all' | Set<FeatureKey>): void;
/**
* Prints a single feature statistics entry to the console.
*/
export declare function printFeatureStatisticsEntry(info: Record<string, unknown>): void;
export {};