/** Linear expression for constraint equations */ export declare class UIExpression { /** Constant term */ constant: number; /** Variable coefficients */ private readonly terms; /** * @param constant Constant term * @param terms Variable-coefficient pairs */ constructor(constant?: number, terms?: [number, number][]); /** * Creates expression representing a + b. * @param a First expression * @param b Second expression * @returns Sum of expressions */ static plus(a: UIExpression, b: UIExpression): UIExpression; /** * Creates expression representing a - b. * @param a First expression * @param b Second expression * @returns Difference of expressions */ static minus(a: UIExpression, b: UIExpression): UIExpression; /** * Adds variable term to expression. * @param variableIndex Variable descriptor * @param coefficient Coefficient to add * @returns This instance for chaining */ plus(variableIndex: number, coefficient: number): this; /** * Subtracts variable term from expression. * @param variableIndex Variable descriptor * @param coefficient Coefficient to subtract * @returns This instance for chaining */ minus(variableIndex: number, coefficient: number): this; /** * Multiplies all terms by scalar. * @param value Scalar multiplier * @returns This instance for chaining */ multiply(value: number): this; /** * Divides all terms by scalar. * @param value Scalar divisor * @returns This instance for chaining */ divide(value: number): this; /** * Checks if expression contains variable term. * @param variableIndex Variable descriptor * @returns True if variable has term */ hasTerm(variableIndex: number): boolean; /** * Copies from another expression. * @param expression Source expression * @returns This instance for chaining */ copy(expression: UIExpression): this; /** * Creates independent copy. * @returns New expression with same content */ clone(): UIExpression; }