(expr: Expression)
| 260 | * after construction, so it never has to be revisited. |
| 261 | */ |
| 262 | const VOLATILE_DIGEST = new WeakSet<object>(); |
| 263 | |
| 264 | export function markVolatileDigest(expr: object): void { |
| 265 | VOLATILE_DIGEST.add(expr); |
| 266 | } |
| 267 | |
| 268 | export function hasVolatileDigest(expr: object): boolean { |
| 269 | return VOLATILE_DIGEST.has(expr); |
| 270 | } |
| 271 | |
| 272 | /** |
| 273 | * The default unknown/variable for an operator whose variable argument was |
| 274 | * omitted (`Solve(eq)`, `D(expr)`, `PolynomialDegree(poly)`, …): the single |
| 275 | * free variable of the expression(s), or `x` when there are several free |
| 276 | * variables and one of them is `x`. `undefined` when no default can be |
| 277 | * inferred (no free variable, or several free variables without `x`). |
| 278 | * |
no test coverage detected