Dictionary
A key-value container where keys are strings (variable names) and values are any ParserEntity. Supports element-wise arithmetic operations.
The optional constructor Map is retained rather than copied. set and merge also retain value references, while copy copies every stored parser entity. Arrays returned by keys, values, and entries are new arrays, but their values still refer to the stored entities. Iteration and text output preserve Map insertion order. Replacing an existing key does not move it. each mutates values in place; evaluation and expansion return deep copies. Dictionaries support structural equality by key and value but intentionally define no greater-than or less-than ordering. Syntax: {x => 1, y => 2, z => x+3} Access: d[x] → 1, d[y] → 2 Assign: d[y]: 10
Members
__get__(indices: string | number[]): ParserEntityMethodReturns the element for the given string key. Used by the parser for bracket indexing: d[x] → d.getter('x')
Parameters
| Name | Type | Description |
|---|---|---|
indices | string | number[] | — |
Returns
__set__(indices: string | number[], value: ParserEntity): voidMethodSets the element for the given string key. Used by the parser for bracket assignment: d[x]: 5
Parameters
| Name | Type | Description |
|---|---|---|
indices | string | number[] | — |
value | ParserEntity | — |
Returns
void
abs(): DictionaryMethodNo description is available yet.
Returns
Dictionary(entries?: Map<string, ParserEntity>): DictionaryConstructorCreates a Dictionary, retaining the supplied Map when present.
Parameters
| Name | Type | Description |
|---|---|---|
entries | Map<string, ParserEntity> | — |
Returns
copy(): DictionaryMethodCopies the Dictionary, including every stored value.
Returns
count(): numberMethodNumber of entries.
Returns
number
dataType: "DIC"PropertyNo description is available yet.
delete(key: string): booleanMethodRemoves a key-value pair.
Parameters
| Name | Type | Description |
|---|---|---|
key | string | — |
Returns
boolean
diff(variable?: ExpressionInput, n?: number | Expression): DictionaryMethodNo description is available yet.
Parameters
| Name | Type | Description |
|---|---|---|
variable | ExpressionInput | — |
n | number | Expression | — |
Returns
dimensions(): number[]MethodNo description is available yet.
Returns
number[]
dimensionsMatch(x: ParserEntity): xMethodNo description is available yet.
Parameters
| Name | Type | Description |
|---|---|---|
x | ParserEntity | — |
Returns
x
div(x: NerdamerInput): DictionaryMethodNo description is available yet.
Parameters
| Name | Type | Description |
|---|---|---|
x | NerdamerInput | — |
Returns
each(callback: (e: ParserEntity, i?: string | number, j?: string | number): ParserEntity): DictionaryMethodIterates over all entries. The callback receives the value and the string key. Mutates values in place.
Parameters
| Name | Type | Description |
|---|---|---|
callback | (e: ParserEntity, i?: string | number, j?: string | number): ParserEntity | — |
Returns
elements(): ParserEntity[]APISatisfies the StructuredEntity abstract property. Returns the values as an array for compatibility with element-wise operations.
Parameters
| Name | Type | Description |
|---|---|---|
values | ParserEntity[] | — |
Returns
entries(): [string, ParserEntity][]MethodReturns all entries in insertion order as a new pair array. Stored value objects are not copied.
Returns
[string, ParserEntity][]
eq(other: ParserEntity): booleanMethodNo description is available yet.
Parameters
| Name | Type | Description |
|---|---|---|
other | ParserEntity | — |
Returns
boolean
evaluate(): DictionaryMethodEvaluates a copied Dictionary, leaving this one unchanged.
Returns
expand(): DictionaryMethodNo description is available yet.
Returns
factor(): DictionaryMethodNo description is available yet.
Returns
get(key: string): ParserEntity | undefinedMethodGets the stored value reference by key, or
`undefined`when absent.
Parameters
| Name | Type | Description |
|---|---|---|
key | string | — |
Returns
ParserEntity | undefined
gt(_other: ParserEntity): booleanMethodNo description is available yet.
Parameters
| Name | Type | Description |
|---|---|---|
_other | ParserEntity | — |
Returns
boolean
gte(other: ParserEntity): booleanMethodNo description is available yet.
Parameters
| Name | Type | Description |
|---|---|---|
other | ParserEntity | — |
Returns
boolean
has(key: string): booleanMethodChecks if a key exists.
Parameters
| Name | Type | Description |
|---|---|---|
key | string | — |
Returns
boolean
integrate(variable?: ExpressionInput): DictionaryMethodNo description is available yet.
Parameters
| Name | Type | Description |
|---|---|---|
variable | ExpressionInput | — |
Returns
isDictionary(obj: unknown): objMethodNo description is available yet.
Parameters
| Name | Type | Description |
|---|---|---|
obj | unknown | — |
Returns
obj
isEnumerable: booleanPropertyNo description is available yet.
keys(): string[]MethodReturns all keys.
Returns
string[]
lt(_other: ParserEntity): booleanMethodNo description is available yet.
Parameters
| Name | Type | Description |
|---|---|---|
_other | ParserEntity | — |
Returns
boolean
lte(other: ParserEntity): booleanMethodNo description is available yet.
Parameters
| Name | Type | Description |
|---|---|---|
other | ParserEntity | — |
Returns
boolean
merge(other: Dictionary): DictionaryMethodMerges another Dictionary into this one. Existing keys are overwritten and incoming value references are retained.
Parameters
| Name | Type | Description |
|---|---|---|
other | Dictionary | — |
Returns
minus(x: NerdamerInput): DictionaryMethodNo description is available yet.
Parameters
| Name | Type | Description |
|---|---|---|
x | NerdamerInput | — |
Returns
plus(x: NerdamerInput): DictionaryMethodNo description is available yet.
Parameters
| Name | Type | Description |
|---|---|---|
x | NerdamerInput | — |
Returns
pow(x: NerdamerInput): DictionaryMethodNo description is available yet.
Parameters
| Name | Type | Description |
|---|---|---|
x | NerdamerInput | — |
Returns
precision: numberPropertyNo description is available yet.
set(key: string, value: ParserEntity): DictionaryMethodSets a key-value pair by reference and returns this Dictionary.
Parameters
| Name | Type | Description |
|---|---|---|
key | string | — |
value | ParserEntity | — |
Returns
simplify(): DictionaryMethodNo description is available yet.
Returns
subst(value: ExpressionInput, withValue: ExpressionInput): DictionaryMethodNo description is available yet.
Parameters
| Name | Type | Description |
|---|---|---|
value | ExpressionInput | — |
withValue | ExpressionInput | — |
Returns
symbolicAccessor: Expression[]PropertyPublic index expressions retained when bracket access cannot yet be resolved. This state belongs to a copied structured entity, never the stored source value.
symbolicTarget: ExpressionPropertyOriginal symbolic target used to render and later re-evaluate bracket access.
text(): stringMethodNo description is available yet.
Returns
string
times(x: NerdamerInput): DictionaryMethodNo description is available yet.
Parameters
| Name | Type | Description |
|---|---|---|
x | NerdamerInput | — |
Returns
toString(): stringMethodNo description is available yet.
Returns
string
values(): ParserEntity[]MethodReturns stored value references in insertion order in a new array.
Returns
withSymbolicAccessor(target: Expression, indices: Expression[]): DictionaryMethodReturns a copied structured entity carrying an unresolved bracket access. Existing accessor state is retained so chained symbolic access can be extended.
Parameters
| Name | Type | Description |
|---|---|---|
target | Expression | — |
indices | Expression[] | — |
