(
part: 're' | 'im' | 'abs' | 'arg',
v: string,
raw: MathJSON,
openOp: 'gt' | 'lt',
closedOp: 'ge' | 'le'
)
| 302 | part: 're' | 'im' | 'abs' | 'arg', |
| 303 | v: string, |
| 304 | raw: MathJSON, |
| 305 | openOp: 'gt' | 'lt', |
| 306 | closedOp: 'ge' | 'le' |
| 307 | ): void => { |
| 308 | let bound = raw; |
| 309 | let open = false; |
| 310 | if (Array.isArray(bound) && bound[0] === 'Open') { |
| 311 | open = true; |
| 312 | bound = bound[1]; |
| 313 | } |
| 314 | if (isInfiniteBound(bound)) return; // skip infinite bounds |
| 315 | guards.push({ |
| 316 | k: 'part-cmp', |
| 317 | wc: wc(v), |
| 318 | part, |
| 319 | op: open ? openOp : closedOp, |
| 320 | bound: W(bound), |
| 321 | }); |
| 322 | }; |
| 323 | |
| 324 | // Element(v, domain) for a bare entry variable v |
| 325 | const element = (v: string, dom: MathJSON): string | null => { |
| 326 | if (typeof dom === 'string') { |
| 327 | switch (dom) { |
| 328 | case 'Integers': |
no test coverage detected