import { Node } from "../model/Argument"; import { CertusContext, FZ } from "../model/Context"; export declare class NoChildrenMacroError extends Error { constructor(msg: string); } export declare abstract class Macro { name: string; constructor(name: string); /** * Evaluates a macro directly within the provided context. Does not expand the macro, * uses internal calculations over canonical sets from the context to evaluate. * * @param ctx Context object to evaluate the macro within, contains fuzzy sets */ abstract evaluate(ctx: CertusContext): FZ; /** * Expands the macro into a cases expression over the provided children nodes. * * @param ctx Context object to expand the macro within, contains fuzzy sets * @param target assignment target (e.g., C0 is ... ), if not passed then assignment is not expanded. * @return a string representing the expanded macro that can be evaluated by Certus. */ abstract expand(ctx: CertusContext, target?: string): string; protected getNodesFromContext(ctx: CertusContext): Node[]; /** * Checks for the identified node in the provided context. If it is not found * then an error is thrown, otherwise the method completes without errors. * * @param ctx Context to search for node within. * @param id Identifier for the node in the context. */ protected checkNodeInContext(ctx: CertusContext, id: string): void; protected checkMinimumNodes(nodes: Node[]): void; protected scoreNode(ctx: CertusContext, n: Node, sortedSets: FZ[]): number; protected scoreToSet(score: number, sortedSets: FZ[], invert?: boolean): FZ; protected setsToNumbers(sets: FZ[]): number[]; /** * Computes the iterative product of sets, up to N times */ protected combinations(sets: number[], N: number): number[][]; protected buildCase(nodes: string[], sets: FZ[], result: FZ, comb?: string, comparison?: string): string; protected roundScore(x: number): number; } //# sourceMappingURL=Macro.d.ts.map