A finite set of solution descriptors with solver-specific metadata.

remarks
`SolutionSet`

inherits the finite-set storage semantics of ValuesSet: accepted descriptors are unique by symbolic equality, insertion order has no mathematical meaning, and values exposed through elements are copies rather than mutable references into the set. A descriptor normally represents one solution, but a descriptor containing the reserved

`_n`

index represents a parameterized family where

`_n`

ranges over the integers. The special

`all`

descriptor represents every value of the solved variable. Consequently, count reports the number of stored descriptors, not the cardinality of the mathematical solution set. solutionsType records solver provenance: whether accepted descriptors came from numerical strategies, symbolic/exact strategies, or both. It is not inferred from the printed shape of a descriptor, so a symbolic strategy may produce a value such as

`1`

. The orthogonal solutionForm property is derived from representation and distinguishes finite results,

`_n`

-indexed parametric families, and the

`all`

result. The class narrows membership to Expression values and keeps rejected singular candidates and numerical root metadata alongside the accepted solutions. Excluded values are an invariant, not merely advisory metadata. Once a value is excluded, adding the same value does not reintroduce it; excluding an already accepted value removes it from the solution set. copy preserves accepted values, exclusions, raw roots, partial-result state, solution type, and the unresolved expression when one is present.

Members

__get__(indices: number[]): ParserEntityMethod

Reads an element for parser indexing.

throws

A

`RangeError`

if the index is outside the current set size.

Parameters

NameTypeDescription
indicesnumber[]

Returns

ParserEntity

__set__(indices: number[], value: ParserEntity): voidMethod

Replaces a parser-indexed solution while preserving the Expression-only and uniqueness invariants.

Parameters

NameTypeDescription
indicesnumber[]
valueParserEntity

Returns

void

addMany(x: Iterable<Expression>): SolutionSetMethod

Adds accepted solutions while preserving uniqueness and exclusions. The iterable is validated before the set is changed, so invalid input cannot leave a partially updated result.

Parameters

NameTypeDescription
xIterable<Expression>

Returns

SolutionSet

addRawRoot(root: Root): SolutionSetMethod

Stores numerical root-refinement metadata independently of the caller's object.

Parameters

NameTypeDescription
rootRoot

Returns

SolutionSet

addSolution(solution: Expression, forFunction: Expression, variable: string): SolutionSetMethod

Verifies a candidate against the source expression before admitting it to the set. Parameterized candidates that cannot yet be closed numerically are preserved. Closed residuals must evaluate nearly to zero. Candidates that encounter exact division by zero are recorded as exclusions instead.

Parameters

NameTypeDescription
solutionExpression
forFunctionExpression
variablestring

Returns

SolutionSet

addSolutions(arr: Expression[] | SolutionSet, forFunction: Expression, variable: string): SolutionSetMethod

Verifies and adds every candidate in an array or another

`SolutionSet`

. When the source is a

`SolutionSet`

, its numerical/symbolic provenance is retained if at least one source descriptor survives verification. Context-specific metadata such as exclusions, raw roots, partial state, and unresolved expressions is not transferred; use append when the complete solver result should be merged without revalidation.

Parameters

NameTypeDescription
arrExpression[] | SolutionSet
forFunctionExpression
variablestring

Returns

SolutionSet

append(s: SolutionSet): SolutionSetMethod

Appends another solution result while preserving set and solver metadata.

remarks

Exclusions are merged before accepted values so an excluded candidate cannot be reintroduced. Raw numerical-root records are copied.

`partial`

is combined with logical OR and differing defined solution types become

`mixed`

. If this set has no

`unsolved`

expression, the appended set's unresolved expression is copied; when both sets already carry different unresolved expressions, the receiver's value is retained because the current data model can represent only one such expression.

Parameters

NameTypeDescription
sSolutionSet

Returns

SolutionSet

at(i: number): ParserEntity | undefinedMethod

Returns a copy of the element at the requested insertion-order index.

Parameters

NameTypeDescription
inumber

Returns

ParserEntity | undefined — A copy of the stored value, or `undefined` when the index is out of range.

clear(): thisMethod

Removes accepted solutions and all solver state so the instance can be reused.

Returns

this

copy(): SolutionSetMethod

Returns an independent copy including exclusions and raw-root metadata.

Returns

SolutionSet

count(): numberMethod

Returns the current number of set members.

Returns

number

dataType: "SOL"Property

No description is available yet.

delete(x: ParserEntity): booleanMethod

Removes the member semantically equal to

`x`

, if one is present.

Parameters

NameTypeDescription
xParserEntity

Returns

boolean

difference(other: ValuesSet): ValuesSetMethod

Returns a new set containing members of this set that are absent from

`other`

.

Parameters

NameTypeDescription
otherValuesSet

Returns

ValuesSet

dimensions(): number[]Method

Returns the one-dimensional storage size used by parser indexing.

Returns

number[]

dimensionsMatch(x: ParserEntity): xMethod

No description is available yet.

Parameters

NameTypeDescription
xParserEntity

Returns

x

div(_x: NerdamerInput): ValuesSetMethod

Rejects binary division because finite sets do not define elementwise quotients.

throws

UnsupportedOperationError Always.

Parameters

NameTypeDescription
_xNerdamerInput

Returns

ValuesSet

each(callback: (e: Expression, i?: string | number, j?: string | number): Expression): thisMethod

Maps accepted solutions in place while requiring every mapped value to remain an Expression and respecting the exclusion set.

Parameters

NameTypeDescription
callback(e: Expression, i?: string | number, j?: string | number): Expression

Returns

this

elements(): Expression[]API

Returns deep-copied accepted solution descriptors in deterministic insertion order.

Returns

Expression[]

eq(other: ParserEntity): booleanMethod

Tests set equality by membership, independent of insertion order.

Parameters

NameTypeDescription
otherParserEntity

Returns

boolean

evaluate(): SolutionSetMethod

Evaluates every member and returns a new set, collapsing equal results.

Returns

SolutionSet

expand(): SolutionSetMethod

Expands every member and returns a new set, collapsing equal results.

Returns

SolutionSet

factor(): thisMethod

No description is available yet.

Returns

this

getExcluded(): ValuesSetMethod

Returns an independent copy of the currently excluded values.

Returns

ValuesSet

getRawRoots(): Root[]Method

Returns independent copies of the stored numerical root-refinement records.

Returns

Root[]

gt(other: ParserEntity): booleanMethod

Returns the proper-superset relation for compatibility with parser comparison syntax. Prefer isProperSupersetOf in direct set-oriented code.

Parameters

NameTypeDescription
otherParserEntity

Returns

boolean

gte(other: ParserEntity): booleanMethod

Returns the superset relation for compatibility with parser comparison syntax. Prefer isSupersetOf in direct set-oriented code.

Parameters

NameTypeDescription
otherParserEntity

Returns

boolean

has(x: ParserEntity): booleanMethod

Tests whether a semantically equal member is present.

Parameters

NameTypeDescription
xParserEntity

Returns

boolean

isDisjointFrom(other: ValuesSet): booleanMethod

Returns

`true`

when this set has no member in common with

`other`

.

Parameters

NameTypeDescription
otherValuesSet

Returns

boolean

isEnumerable: booleanProperty

No description is available yet.

isProperSubsetOf(other: ValuesSet): booleanMethod

Returns

`true`

when this set is a strict subset of

`other`

.

Parameters

NameTypeDescription
otherValuesSet

Returns

boolean

isProperSupersetOf(other: ValuesSet): booleanMethod

Returns

`true`

when this set is a strict superset of

`other`

.

Parameters

NameTypeDescription
otherValuesSet

Returns

boolean

isSolutionSet(obj: unknown): objMethod

Tests whether a value is specifically a solver

`SolutionSet`

.

Parameters

NameTypeDescription
objunknown

Returns

obj

isSubsetOf(other: ValuesSet): booleanMethod

Returns

`true`

when every member of this set is present in

`other`

.

Parameters

NameTypeDescription
otherValuesSet

Returns

boolean

isSupersetOf(other: ValuesSet): booleanMethod

Returns

`true`

when every member of

`other`

is present in this set.

Parameters

NameTypeDescription
otherValuesSet

Returns

boolean

isValuesSet(obj: unknown): objMethod

Tests whether a value is a

`ValuesSet`

or a specialized

`ValuesSet`

subtype such as

`SolutionSet`

.

Parameters

NameTypeDescription
objunknown

Returns

obj

lt(other: ParserEntity): booleanMethod

Returns the proper-subset relation for compatibility with parser comparison syntax. Prefer isProperSubsetOf in direct set-oriented code.

Parameters

NameTypeDescription
otherParserEntity

Returns

boolean

lte(other: ParserEntity): booleanMethod

Returns the subset relation for compatibility with parser comparison syntax. Prefer isSubsetOf in direct set-oriented code.

Parameters

NameTypeDescription
otherParserEntity

Returns

boolean

minus(_x: NerdamerInput): ValuesSetMethod

Rejects binary subtraction because finite sets do not define elementwise subtraction.

throws

UnsupportedOperationError Always.

Parameters

NameTypeDescription
_xNerdamerInput

Returns

ValuesSet

partial: booleanProperty

No description is available yet.

pow(_x: NerdamerInput): ValuesSetMethod

Rejects binary exponentiation because finite sets do not define elementwise powers.

throws

UnsupportedOperationError Always.

Parameters

NameTypeDescription
_xNerdamerInput

Returns

ValuesSet

precision: numberProperty

No description is available yet.

simplify(): thisMethod

No description is available yet.

Returns

this

solutionForm(): SolutionFormAPI

Classifies the mathematical result represented by the stored descriptors. Arbitrary symbolic parameters do not make a result parametric in this sense. The

`parametric`

form is reserved for solver-generated families that contain

`_n`

, whose solver contract is an integer index. The special

`all`

descriptor takes precedence if present.

Returns

SolutionForm

solutionsType: SolutionsTypeProperty

Solver provenance for the currently accepted descriptors.

sort(compareFn?: (a: ParserEntity, b: ParserEntity): number): thisMethod

Sorts the deterministic iteration order without changing mathematical membership. A custom comparator receives copies so it cannot mutate stored members as a side effect.

Parameters

NameTypeDescription
compareFn(a: ParserEntity, b: ParserEntity): number

Returns

this

symbolicAccessor: Expression[]Property

Public index expressions retained when bracket access cannot yet be resolved. This state belongs to a copied structured entity, never the stored source value.

symbolicTarget: ExpressionProperty

Original symbolic target used to render and later re-evaluate bracket access.

symmetricDifference(other: ValuesSet): ValuesSetMethod

Returns a new set containing members present in exactly one of the two sets.

Parameters

NameTypeDescription
otherValuesSet

Returns

ValuesSet

text(): stringMethod

No description is available yet.

Returns

string

times(_x: NerdamerInput): ValuesSetMethod

Rejects binary multiplication because finite sets do not define elementwise products.

throws

UnsupportedOperationError Always.

Parameters

NameTypeDescription
_xNerdamerInput

Returns

ValuesSet

toString(): stringMethod

No description is available yet.

Returns

string

unsolved: ExpressionProperty

No description is available yet.

withSymbolicAccessor(target: Expression, indices: Expression[]): ValuesSetMethod

Returns a copied structured entity carrying an unresolved bracket access. Existing accessor state is retained so chained symbolic access can be extended.

Parameters

NameTypeDescription
targetExpression
indicesExpression[]

Returns

ValuesSet