import { TreePtr } from 'glpk-wasm'; import { Const } from './enums'; import { Model } from './model'; declare const ReasonCodes: { row: Const.ReasonCode; improved: Const.ReasonCode; heuristic: Const.ReasonCode; cut: Const.ReasonCode; branch: Const.ReasonCode; select: Const.ReasonCode; preprocessing: Const.ReasonCode; }; export type ReasonCode = keyof typeof ReasonCodes; declare const RowOrigins: { regular: Const.RowOrigin; lazy: Const.RowOrigin; cut: Const.RowOrigin; }; export type RowOrigin = keyof typeof RowOrigins; declare const RowClasses: { gomory: Const.RowClass; mir: Const.RowClass; cover: Const.RowClass; clique: Const.RowClass; }; export type RowClass = keyof typeof RowClasses; declare const BranchSelections: { down: Const.BranchSelection; up: Const.BranchSelection; general: Const.BranchSelection; }; export type BranchSelection = keyof typeof BranchSelections; export interface Attribute { level: number; origin: RowOrigin; cls: RowClass; } export interface TreeSize { active: number; current: number; total: number; } export declare class Node { private readonly tree; private readonly idx; constructor(tree: Tree, idx: number); select(): void; get next(): Node | undefined; get previous(): Node | undefined; get parent(): Node | undefined; get level(): number; get bound(): number; } export declare class Tree { readonly ptr: TreePtr; static _data: Ptr; constructor(ptr: TreePtr); static _alloc(): void; get reason(): ReasonCode; get model(): Model; rowAttribute(idx: number): Attribute; get gap(): number; setHeuristicSolution(solution: number[] | Float64Array): void; canBranch(idx: number): number; branchUpon(idx: number, select: BranchSelection): void; terminate(): void; get size(): TreeSize; get currentNode(): Node | undefined; get bestNode(): Node | undefined; get firstNode(): Node | undefined; get lastNode(): Node | undefined; get cutPoolSize(): number; clearCutPool(): void; } export {};