MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / hasValue

Function hasValue

src/compute-engine/assume.ts:1181–1189  ·  view source on GitHub ↗
(ce: ComputeEngine, s: string)

Source from the content-addressed store, hash-verified

1179 if (subject !== undefined) return undefined; // more than one part term
1180 subject = s;
1181 } else if (!isNumber(term)) {
1182 return undefined; // non-numeric extra term
1183 }
1184 }
1185 return subject;
1186}
1187
1188/** True if `expr` contains a part term (`Real/Imaginary/Abs/Argument` of a
1189 * bare symbol) anywhere. */
1190function containsPartTerm(expr: Expression): boolean {
1191 if (!isFunction(expr)) return false;
1192 const s = subjectOf(expr);

Callers 2

storeNotElementFunction · 0.85
assumeEqualityFunction · 0.85

Calls 3

isValueDefFunction · 0.90
lookupDefinitionMethod · 0.65
_getSymbolValueMethod · 0.65

Tested by

no test coverage detected