Skip to content

Type Alias: ArithmeticConstraintDto

@kortexya/reasoninglayer


@kortexya/reasoninglayer / Constraints / ArithmeticConstraintDto

Type Alias: ArithmeticConstraintDto

ArithmeticConstraintDto = { constraintType: "relation"; left: ArithmeticExprDto; op: RelOpDto; right: ArithmeticExprDto; } | { constraintType: "domain"; domain: number[]; variable: string; }

Defined in: src/types/constraints.ts:38

An arithmetic constraint for the constraint solver.

Type Declaration

{ constraintType: "relation"; left: ArithmeticExprDto; op: RelOpDto; right: ArithmeticExprDto; }

constraintType

constraintType: "relation"

left

left: ArithmeticExprDto

Left-hand side expression.

op

op: RelOpDto

Relational operator.

right: ArithmeticExprDto

Right-hand side expression.

{ constraintType: "domain"; domain: number[]; variable: string; }

constraintType

constraintType: "domain"

domain

domain: number[]

Domain values.

variable

variable: string

Variable name.

Remarks

Tagged union discriminated by constraint_type.