Skip to content
Snippets Groups Projects
Commit 9b671346 authored by Leonardo Christino's avatar Leonardo Christino Committed by Scott
Browse files

feat(queryLogic): enables query logic

Includes logic in query building, parsing and execution
Logic pills can be created from handle drop and from side panel
parent 9fb5b84c
No related branches found
No related tags found
No related merge requests found
/**
* This program has been developed by students from the bachelor Computer Science at
* Utrecht University within the Software Project course.
* © Copyright Utrecht University (Department of Information and Computing Sciences)
*/
import { Position } from 'reactflow';
import { GeneralDescription, MathAggregationTypes } from './general';
export const MathAggregations: Record<MathAggregationTypes, GeneralDescription<MathAggregationTypes>> = {
[MathAggregationTypes.AVG]: {
key: 'mathFunctionAvg',
name: 'Average',
type: MathAggregationTypes.AVG,
description: 'Average of all values',
numInputs: 1,
inputs: [{ name: '1', type: 'float', default: 0 }],
output: { name: 'avg', type: 'float' },
logic: ['Avg', '@1'],
},
[MathAggregationTypes.COUNT]: {
key: 'mathFunctionCount',
name: 'Count',
type: MathAggregationTypes.COUNT,
description: 'Count the number of values',
numInputs: 1,
inputs: [{ name: '1', type: 'float', default: 0 }],
output: { name: 'count', type: 'float' },
logic: ['Count', '@1'],
},
[MathAggregationTypes.MAX]: {
key: 'mathFunctionMax',
name: 'Maximum',
type: MathAggregationTypes.MAX,
description: 'Maximum of all values',
numInputs: 1,
inputs: [{ name: '1', type: 'float', default: 0 }],
output: { name: 'max', type: 'float' },
logic: ['Max', '@1'],
},
[MathAggregationTypes.MIN]: {
key: 'mathFunctionMin',
name: 'Minimum',
type: MathAggregationTypes.MIN,
description: 'Minimum of all values',
numInputs: 1,
inputs: [{ name: '1', type: 'float', default: 0 }],
output: { name: 'min', type: 'float' },
logic: ['Min', '@1'],
},
[MathAggregationTypes.SUM]: {
key: 'mathFunctionSum',
name: 'Sum',
type: MathAggregationTypes.SUM,
description: 'Sum of all values',
numInputs: 1,
inputs: [{ name: '1', type: 'float', default: 0 }],
output: { name: 'sum', type: 'float' },
logic: ['Sum', '@1'],
},
// [MathAggregationTypes.STD]: {
// key: 'mathFunctionStd',
// name: 'Standard Deviation',
// type: MathAggregationTypes.STD,
// description: 'Standard deviation of all values',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'std', type: 'float' },
// logic: ['Std', '@1'],
// },
// [MathAggregationTypes.ADD]: {
// key: 'mathFunctionAdd',
// name: 'Add',
// type: MathAggregationTypes.ADD,
// description: 'Add two values',
// numInputs: 2,
// inputs: [
// { name: '1', type: 'float', default: 0 },
// { name: '2', type: 'float', default: 0 },
// ],
// output: { name: '+', type: 'float' },
// logic: ['+', '@1', '@2'],
// },
// [MathAggregationTypes.SUBTRACT]: {
// key: 'mathFunctionSubtract',
// name: 'Subtract',
// type: MathAggregationTypes.SUBTRACT,
// description: 'Subtract two values',
// numInputs: 2,
// inputs: [
// { name: '1', type: 'float' },
// { name: '2', type: 'float' },
// ],
// output: { name: '-', type: 'float' },
// logic: ['-', '@1', '@2'],
// },
// [MathAggregationTypes.MULTIPLY]: {
// key: 'mathFunctionMultiply',
// name: 'Multiply',
// type: MathAggregationTypes.MULTIPLY,
// description: 'Multiply two values',
// numInputs: 2,
// inputs: [
// { name: '1', type: 'float' },
// { name: '2', type: 'float' },
// ],
// output: { name: '*', type: 'float' },
// logic: ['*', '@1', '@2'],
// },
// [MathAggregationTypes.DIVIDE]: {
// key: 'mathFunctionDivide',
// name: 'Divide',
// type: MathAggregationTypes.DIVIDE,
// description: 'Divide two values',
// numInputs: 2,
// inputs: [
// { name: '1', type: 'float' },
// { name: '2', type: 'float' },
// ],
// output: { name: '/', type: 'float' },
// logic: ['/', '@1', '@2'],
// },
// [MathAggregationTypes.POWER]: {
// key: 'mathFunctionPower',
// name: 'Power',
// type: MathAggregationTypes.POWER,
// description: 'Raise a value to the power of another value',
// numInputs: 2,
// inputs: [
// { name: '1', type: 'float' },
// { name: '2', type: 'float' },
// ],
// output: { name: '^', type: 'float' },
// logic: ['^', '@1', '@2'],
// },
// [MathAggregationTypes.SQRT]: {
// key: 'mathFunctionSqrt',
// name: 'Square Root',
// type: MathAggregationTypes.SQRT,
// description: 'Square root of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'sqrt', type: 'float' },
// logic: ['Sqrt', '@1'],
// },
// [MathAggregationTypes.LOG]: {
// key: 'mathFunctionLog',
// name: 'Logarithm',
// type: MathAggregationTypes.LOG,
// description: 'Logarithm of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'log', type: 'float' },
// logic: ['Log', '@1'],
// },
// [MathAggregationTypes.EXP]: {
// key: 'mathFunctionExp',
// name: 'Exponential',
// type: MathAggregationTypes.EXP,
// description: 'Exponential of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'exp', type: 'float' },
// logic: ['Exp', '@1'],
// },
// [MathAggregationTypes.ABS]: {
// key: 'mathFunctionAbs',
// name: 'Absolute Value',
// type: MathAggregationTypes.ABS,
// description: 'Absolute value of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'abs', type: 'float' },
// logic: ['Abs', '@1'],
// },
// [MathAggregationTypes.CEIL]: {
// key: 'mathFunctionCeil',
// name: 'Ceiling',
// type: MathAggregationTypes.CEIL,
// description: 'Ceiling of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'ceil', type: 'float' },
// logic: ['Ceil', '@1'],
// },
// [MathAggregationTypes.FLOOR]: {
// key: 'mathFunctionFloor',
// name: 'Floor',
// type: MathAggregationTypes.FLOOR,
// description: 'Floor of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'floor', type: 'float' },
// logic: ['Floor', '@1'],
// },
// [MathAggregationTypes.ROUND]: {
// key: 'mathFunctionRound',
// name: 'Round',
// type: MathAggregationTypes.ROUND,
// description: 'Round a value to the nearest integer',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'round', type: 'float' },
// logic: ['Round', '@1'],
// },
// [MathAggregationTypes.TRUNC]: {
// key: 'mathFunctionTrunc',
// name: 'Truncate',
// type: MathAggregationTypes.TRUNC,
// description: 'Truncate a value to the nearest integer towards zero',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'trunc', type: 'float' },
// logic: ['Trunc', '@1'],
// },
// [MathAggregationTypes.RANDOM]: {
// key: 'mathFunctionRandom',
// name: 'Random',
// type: MathAggregationTypes.RANDOM,
// description: 'Random value between 0 and 1',
// numInputs: 0,
// inputs: [],
// output: { name: 'random', type: 'float' },
// logic: ['Random'],
// },
// [MathAggregationTypes.RANDOMINT]: {
// key: 'mathFunctionRandomInt',
// name: 'Random Integer',
// type: MathAggregationTypes.RANDOMINT,
// description: 'Random integer between two values',
// numInputs: 2,
// inputs: [
// { name: 'min', type: 'float' },
// { name: 'max', type: 'float' },
// ],
// output: { name: 'randomInt', type: 'float' },
// logic: ['RandomInt', '@1', '@2'],
// },
// [MathAggregationTypes.SIN]: {
// key: 'mathFunctionSin',
// name: 'Sine',
// type: MathAggregationTypes.SIN,
// description: 'Sine of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'sin', type: 'float' },
// logic: ['Sin', '@1'],
// },
// [MathAggregationTypes.COS]: {
// key: 'mathFunctionCos',
// name: 'Cosine',
// type: MathAggregationTypes.COS,
// description: 'Cosine of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'cos', type: 'float' },
// logic: ['Cos', '@1'],
// },
// [MathAggregationTypes.TAN]: {
// key: 'mathFunctionTan',
// name: 'Tangent',
// type: MathAggregationTypes.TAN,
// description: 'Tangent of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'tan', type: 'float' },
// logic: ['Tan', '@1'],
// },
// [MathAggregationTypes.ASIN]: {
// key: 'mathFunctionAsin',
// name: 'Arcsine',
// type: MathAggregationTypes.ASIN,
// description: 'Arcsine of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'asin', type: 'float' },
// logic: ['Asin', '@1'],
// },
// [MathAggregationTypes.ACOS]: {
// key: 'mathFunctionAcos',
// name: 'Arccosine',
// type: MathAggregationTypes.ACOS,
// description: 'Arccosine of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'acos', type: 'float' },
// logic: ['Acos', '@1'],
// },
// [MathAggregationTypes.ATAN]: {
// key: 'mathFunctionAtan',
// name: 'Arctangent',
// type: MathAggregationTypes.ATAN,
// description: 'Arctangent of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'atan', type: 'float' },
// logic: ['Atan', '@1'],
// },
// [MathAggregationTypes.SINH]: {
// key: 'mathFunctionSinh',
// name: 'Hyperbolic Sine',
// type: MathAggregationTypes.SINH,
// description: 'Hyperbolic sine of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'sinh', type: 'float' },
// logic: ['Sinh', '@1'],
// },
// [MathAggregationTypes.COSH]: {
// key: 'mathFunctionCosh',
// name: 'Hyperbolic Cosine',
// type: MathAggregationTypes.COSH,
// description: 'Hyperbolic cosine of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'cosh', type: 'float' },
// logic: ['Cosh', '@1'],
// },
// [MathAggregationTypes.TANH]: {
// key: 'mathFunctionTanh',
// name: 'Hyperbolic Tangent',
// type: MathAggregationTypes.TANH,
// description: 'Hyperbolic tangent of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'tanh', type: 'float' },
// logic: ['Tanh', '@1'],
// },
// [MathAggregationTypes.ASINH]: {
// key: 'mathFunctionAsinh',
// name: 'Hyperbolic Arcsine',
// type: MathAggregationTypes.ASINH,
// description: 'Hyperbolic arcsine of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'asinh', type: 'float' },
// logic: ['Asinh', '@1'],
// },
// [MathAggregationTypes.ACOSH]: {
// key: 'mathFunctionAcosh',
// name: 'Hyperbolic Arccosine',
// type: MathAggregationTypes.ACOSH,
// description: 'Hyperbolic arccosine of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'acosh', type: 'float' },
// logic: ['Acosh', '@1'],
// },
// [MathAggregationTypes.ATANH]: {
// key: 'mathFunctionAtanh',
// name: 'Hyperbolic Arctangent',
// type: MathAggregationTypes.ATANH,
// description: 'Hyperbolic arctangent of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'atanh', type: 'float' },
// logic: ['Atanh', '@1'],
// },
// [MathAggregationTypes.DEGREES]: {
// key: 'mathFunctionDegrees',
// name: 'Degrees',
// type: MathAggregationTypes.DEGREES,
// description: 'Convert a value from radians to degrees',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'degrees', type: 'float' },
// logic: ['Degrees', '@1'],
// },
// [MathAggregationTypes.RADIANS]: {
// key: 'mathFunctionRadians',
// name: 'Radians',
// type: MathAggregationTypes.RADIANS,
// description: 'Convert a value from degrees to radians',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'radians', type: 'float' },
// logic: ['Radians', '@1'],
// },
// [MathAggregationTypes.SIGN]: {
// key: 'mathFunctionSign',
// name: 'Sign',
// type: MathAggregationTypes.SIGN,
// description: 'Sign of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'sign', type: 'float' },
// logic: ['Sign', '@1'],
// },
// [MathAggregationTypes.RANDOMNORMAL]: {
// key: 'mathFunctionRandomNormal',
// name: 'Random Normal',
// type: MathAggregationTypes.RANDOMNORMAL,
// description: 'Random value from a normal distribution',
// numInputs: 2,
// inputs: [
// { name: 'mean', type: 'float' },
// { name: 'std', type: 'float' },
// ],
// output: { name: 'randomNormal', type: 'float' },
// logic: ['RandomNormal', '@1', '@2'],
// },
// [MathAggregationTypes.RANDOMLOGNORMAL]: {
// key: 'mathFunctionRandomLogNormal',
// name: 'Random Log Normal',
// type: MathAggregationTypes.RANDOMLOGNORMAL,
// description: 'Random value from a log normal distribution',
// numInputs: 2,
// inputs: [
// { name: 'mean', type: 'float' },
// { name: 'std', type: 'float' },
// ],
// output: { name: 'randomLogNormal', type: 'float' },
// logic: ['RandomLogNormal', '@1', '@2'],
// },
// [MathAggregationTypes.RANDOMEXPONENTIAL]: {
// key: 'mathFunctionRandomExponential',
// name: 'Random Exponential',
// type: MathAggregationTypes.RANDOMEXPONENTIAL,
// description: 'Random value from an exponential distribution',
// numInputs: 1,
// inputs: [{ name: 'lambda', type: 'float' }],
// output: { name: 'randomExponential', type: 'float' },
// logic: ['RandomExponential', '@1'],
// },
// [MathAggregationTypes.RANDOMGAMMA]: {
// key: 'mathFunctionRandomGamma',
// name: 'Random Gamma',
// type: MathAggregationTypes.RANDOMGAMMA,
// description: 'Random value from a gamma distribution',
// numInputs: 2,
// inputs: [
// { name: 'alpha', type: 'float' },
// { name: 'beta', type: 'float' },
// ],
// output: { name: 'randomGamma', type: 'float' },
// logic: ['RandomGamma', '@1', '@2'],
// },
// [MathAggregationTypes.RANDOMBETA]: {
// key: 'mathFunctionRandomBeta',
// name: 'Random Beta',
// type: MathAggregationTypes.RANDOMBETA,
// description: 'Random value from a beta distribution',
// numInputs: 2,
// inputs: [
// { name: 'alpha', type: 'float' },
// { name: 'beta', type: 'float' },
// ],
// output: { name: 'randomBeta', type: 'float' },
// logic: ['RandomBeta', '@1', '@2'],
// },
// [MathAggregationTypes.RANDOMCHISQUARE]: {
// key: 'mathFunctionRandomChiSquare',
// name: 'Random Chi Square',
// type: MathAggregationTypes.RANDOMCHISQUARE,
// description: 'Random value from a chi square distribution',
// numInputs: 1,
// inputs: [{ name: 'k', type: 'float' }],
// output: { name: 'randomChiSquare', type: 'float' },
// logic: ['RandomChiSquare', '@1'],
// },
// [MathAggregationTypes.RANDOMWEIBULL]: {
// key: 'mathFunctionRandomWeibull',
// name: 'Random Weibull',
// type: MathAggregationTypes.RANDOMWEIBULL,
// description: 'Random value from a Weibull distribution',
// numInputs: 2,
// inputs: [
// { name: 'k', type: 'float' },
// { name: 'lambda', type: 'float' },
// ],
// output: { name: 'randomWeibull', type: 'float' },
// logic: ['RandomWeibull', '@1', '@2'],
// },
// [MathAggregationTypes.RANDOMCAUCHY]: {
// key: 'mathFunctionRandomCauchy',
// name: 'Random Cauchy',
// type: MathAggregationTypes.RANDOMCAUCHY,
// description: 'Random value from a Cauchy distribution',
// numInputs: 2,
// inputs: [
// { name: 'x0', type: 'float' },
// { name: 'gamma', type: 'float' },
// ],
// output: { name: 'randomCauchy', type: 'float' },
// logic: ['RandomCauchy', '@1', '@2'],
// },
// [MathAggregationTypes.RANDOMPOISSON]: {
// key: 'mathFunctionRandomPoisson',
// name: 'Random Poisson',
// type: MathAggregationTypes.RANDOMPOISSON,
// description: 'Random value from a Poisson distribution',
// numInputs: 1,
// inputs: [{ name: 'lambda', type: 'float' }],
// output: { name: 'randomPoisson', type: 'float' },
// logic: ['RandomPoisson', '@1'],
// },
// [MathAggregationTypes.RANDOMIRWINHALL]: {
// key: 'mathFunctionRandomIrwinHall',
// name: 'Random Irwin Hall',
// type: MathAggregationTypes.RANDOMIRWINHALL,
// description: 'Random value from an Irwin Hall distribution',
// numInputs: 2,
// inputs: [
// { name: 'n', type: 'float' },
// { name: 'scale', type: 'float' },
// ],
// output: { name: 'randomIrwinHall', type: 'float' },
// logic: ['RandomIrwinHall', '@1', '@2'],
// },
// [MathAggregationTypes.CHIQUARETEST]: {
// key: 'mathFunctionChiSquareTest',
// name: 'Chi Square Test',
// type: MathAggregationTypes.CHIQUARETEST,
// description: 'Chi square test',
// numInputs: 2,
// inputs: [
// { name: 'observed', type: 'float' },
// { name: 'expected', type: 'float' },
// ],
// output: { name: 'chiSquareTest', type: 'float' },
// logic: ['ChiSquareTest', '@1', '@2'],
// },
// [MathAggregationTypes.CORRELATION]: {
// key: 'mathFunctionCorrelation',
// name: 'Correlation',
// type: MathAggregationTypes.CORRELATION,
// description: 'Correlation between two values',
// numInputs: 2,
// inputs: [
// { name: '1', type: 'float' },
// { name: '2', type: 'float' },
// ],
// output: { name: 'correlation', type: 'float' },
// logic: ['Correlation', '@1', '@2'],
// },
// [MathAggregationTypes.COVARIANCE]: {
// key: 'mathFunctionCovariance',
// name: 'Covariance',
// type: MathAggregationTypes.COVARIANCE,
// description: 'Covariance between two values',
// numInputs: 2,
// inputs: [
// { name: '1', type: 'float' },
// { name: '2', type: 'float' },
// ],
// output: { name: 'covariance', type: 'float' },
// logic: ['Covariance', '@1', '@2'],
// },
// [MathAggregationTypes.FREQUENCY]: {
// key: 'mathFunctionFrequency',
// name: 'Frequency',
// type: MathAggregationTypes.FREQUENCY,
// description: 'Frequency of a value in a dataset',
// numInputs: 2,
// inputs: [
// { name: 'value', type: 'float' },
// { name: 'dataset', type: 'float' },
// ],
// output: { name: 'frequency', type: 'float' },
// logic: ['Frequency', '@1', '@2'],
// },
// [MathAggregationTypes.MEAN]: {
// key: 'mathFunctionMean',
// name: 'Mean',
// type: MathAggregationTypes.MEAN,
// description: 'Mean of a dataset',
// numInputs: 1,
// inputs: [{ name: 'dataset', type: 'float' }],
// output: { name: 'mean', type: 'float' },
// logic: ['Mean', '@1'],
// },
// [MathAggregationTypes.MEDIAN]: {
// key: 'mathFunctionMedian',
// name: 'Median',
// type: MathAggregationTypes.MEDIAN,
// description: 'Median of a dataset',
// numInputs: 1,
// inputs: [{ name: 'dataset', type: 'float' }],
// output: { name: 'median', type: 'float' },
// logic: ['Median', '@1'],
// },
// [MathAggregationTypes.MODE]: {
// key: 'mathFunctionMode',
// name: 'Mode',
// type: MathAggregationTypes.MODE,
// description: 'Mode of a dataset',
// numInputs: 1,
// inputs: [{ name: 'dataset', type: 'float' }],
// output: { name: 'mode', type: 'float' },
// logic: ['Mode', '@1'],
// },
// [MathAggregationTypes.RANK]: {
// key: 'mathFunctionRank',
// name: 'Rank',
// type: MathAggregationTypes.RANK,
// description: 'Rank of a value in a dataset',
// numInputs: 2,
// inputs: [
// { name: 'value', type: 'float' },
// { name: 'dataset', type: 'float' },
// ],
// output: { name: 'rank', type: 'float' },
// logic: ['Rank', '@1', '@2'],
// },
// [MathAggregationTypes.STDEV]: {
// key: 'mathFunctionStdev',
// name: 'Standard Deviation',
// type: MathAggregationTypes.STDEV,
// description: 'Standard deviation of a dataset',
// numInputs: 1,
// inputs: [{ name: 'dataset', type: 'float' }],
// output: { name: 'stdev', type: 'float' },
// logic: ['Stdev', '@1'],
// },
// [MathAggregationTypes.VARIANCE]: {
// key: 'mathFunctionVariance',
// name: 'Variance',
// type: MathAggregationTypes.VARIANCE,
// description: 'Variance of a dataset',
// numInputs: 1,
// inputs: [{ name: 'dataset', type: 'float' }],
// output: { name: 'variance', type: 'float' },
// logic: ['Variance', '@1'],
// },
// [MathAggregationTypes.ZSCORE]: {
// key: 'mathFunctionZscore',
// name: 'Z-Score',
// type: MathAggregationTypes.ZSCORE,
// description: 'Z-score of a value in a dataset',
// numInputs: 2,
// inputs: [
// { name: 'value', type: 'float' },
// { name: 'dataset', type: 'float' },
// ],
// output: { name: 'zscore', type: 'float' },
// logic: ['Zscore', '@1', '@2'],
// },
// [MathAggregationTypes.AND]: {
// key: 'mathFunctionAnd',
// name: 'And',
// type: MathAggregationTypes.AND,
// description: 'Logical AND of two values',
// numInputs: 2,
// inputs: [
// { name: '1', type: 'boolean' },
// { name: '2', type: 'boolean' },
// ],
// output: { name: 'and', type: 'boolean' },
// logic: ['And', '@1', '@2'],
// },
// [MathAggregationTypes.OR]: {
// key: 'mathFunctionOr',
// name: 'Or',
// type: MathAggregationTypes.OR,
// description: 'Logical OR of two values',
// numInputs: 2,
// inputs: [
// { name: '1', type: 'boolean' },
// { name: '2', type: 'boolean' },
// ],
// output: { name: 'or', type: 'boolean' },
// logic: ['Or', '@1', '@2'],
// },
// [MathAggregationTypes.NOT]: {
// key: 'mathFunctionNot',
// name: 'Not',
// type: MathAggregationTypes.NOT,
// description: 'Logical NOT of a value',
// numInputs: 1,
// inputs: [{ name: '1', type: 'boolean' }],
// output: { name: 'not', type: 'boolean' },
// logic: ['Not', '@1'],
// },
// {
// key: 'mathFunctionCount',
// name: 'Count',
// type: MathAggregationTypes.COUNT,
// description: 'Count the number of values',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'count', type: 'float' },
// logic: ['Count', '@1'],
// },
// {
// key: 'mathFunctionMax',
// name: 'Maximum',
// type: MathAggregationTypes.MAX,
// description: 'Maximum of all values',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'max', type: 'float' },
// logic: ['Max', '@1'],
// },
// {
// key: 'mathFunctionMin',
// name: 'Minimum',
// type: MathAggregationTypes.MIN,
// description: 'Minimum of all values',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'min', type: 'float' },
// logic: ['Min', '@1'],
// },
// {
// key: 'mathFunctionSum',
// name: 'Sum',
// type: MathAggregationTypes.SUM,
// description: 'Sum of all values',
// numInputs: 1,
// inputs: [{ name: '1', type: 'float' }],
// output: { name: 'sum', type: 'float' },
// logic: ['Sum', '@1'],
// },
// // {
// // key: 'mathFunctionStd',
// // name: 'Standard Deviation',
// // type: MathAggregationTypes.STD,
// // description: 'Standard deviation of all values',
// // numInputs: 1,
// // inputs: [{ name: '1', type: 'float' }],
// // output: { name: 'std', type: 'float' },
// // logic: ['Std', '@1'],
// // },
// {
// key: 'mathFunctionAdd',
// name: 'Add',
// type: MathAggregationTypes.ADD,
// description: 'Add two values',
// numInputs: 2,
// inputs: [
// { name: '1', type: 'float' },
// { name: '2', type: 'float' },
// ],
// output: { name: '+', type: 'float' },
// logic: ['+', '@1', '@2'],
// },
};
/** All available functions in the function bar. */
export const MathAggregationArray: Array<GeneralDescription<MathAggregationTypes>> = Object.values(MathAggregations);
import { describe, it, expect } from 'vitest';
// import { Query2BackendQuery } from './query-utils';
import { QueryMultiGraphology } from '../model/graphology/utils';
describe('QueryUtils', () => {
it('should create an instance', () => {
expect(true).toBeTruthy();
});
// it('should run query translation', () => {
// const graph = new QueryMultiGraphology(); // FIXME: not working for some reason
// let ret = Query2BackendQuery('database', graph.export());
// console.log(ret);
// });
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment