Skip to content

Type Alias: LinearExpression

@kortexya/reasoninglayer


@kortexya/reasoninglayer / Optimize / LinearExpression

Type Alias: LinearExpression

LinearExpression = Record<string, number>

Defined in: src/types/optimize.ts:27

A linear expression as a map from variable names to coefficients.

Remarks

Variables not present in the map have an implicit coefficient of 0.

Example

// Represents: 3*chairs + 5*tables
const expr: LinearExpression = { chairs: 3, tables: 5 };