Package com.singularsys.extensions.matrix.dictionary
package com.singularsys.extensions.matrix.dictionary
Provides a set of components for using
dictionaries compatible with the
As matrices have fixed sizes, methods that modify the size,
com.singularsys.extensions.matrix package.
See DictionaryComponents for the main documentation.
The MatrixDictKeys and MatrixDictValues functions return
results as a VectorI.
The MatrixDictEntries functions return
results as a MatrixI.
When set with the MatrixDictComponents.Type.MATRIX_NO_NULL option
dictionaries are represent as N by 2 MatrixI.
As matrices have fixed sizes, methods that modify the size,
clear(mat), remove(mat,'x') will throw exceptions,
as will put(mat,'unknown',5).
The functions in this package will also work with MatrixI and VectorI values created by the parser or other matrix operations.
mat = [['x',2], ['y',3], ['z',4]];
set = [['x'], ['y'], ['z']];
vec = ['x', 'y', 'z'];
get(mat,'y');
keys(set);
numEntries(vec);
clear(mat), remove(mat,'x') will throw exceptions,
as will put(mat,'unknown',5).
To set up use:
var mfact = new ObjectMatrixFactory();
var mfield = new SimpleMatrixField(mfact);
var mot = new MatrixOperatorTable(mfact, mfield);
var mft = new MatrixFunctionTable(mfact, mfield);
var mdc = new MatrixDictComponents(
MatrixDictComponents.Type.MAP_NULL_VALUES,
mfact, mfield);
jep = new Jep(new StandardConfigurableParser(), mot, mft, mdc);
- Since:
- Jep 4.1 extensions 2.2
- See Also:
-
ClassDescriptionProvides a set of components for using dictionaries compatible with the
com.singularsys.extensions.matrixpackage.Configuration type, one of MAP_NULL_VALUES, MAP_NO_NULL, MATRIX_NO_NULL.Implementation of ContainKey compatible with the matrix package.Implementation of Entries compatible with the matrix package.Matrix compatible versions of theEntriesIterablefunction.Implementation of Get compatible with the matrix package.Implementation of GetOr compatible with the matrix package.Implementation of Keys compatible with the matrix package.Matrix compatible versions of theKeysIterablefunction.Implementation of MakeMap compatible with the matrix package.Implementation of Put compatible with the matrix package.Removes entries with matching key from the map.Implementation of Size compatible with the matrix package.Implementation of Values compatible with the matrix package.Matrix compatible versions of theValuesIterablefunction.