Class StreamMatrixDictComponents
java.lang.Object
com.singularsys.jep.misc.OneShotComponent
com.singularsys.jep.misc.dictionary.DictionaryComponents
com.singularsys.extensions.stream.dictionary.StreamMatrixDictComponents
- All Implemented Interfaces:
JepComponent,Serializable
Provides a set of components for using
dictionaries compatible with the
As matrices have fixed sizes, methods that modify the size,
com.singularsys.extensions.stream package
and converting to and from VectorI vectors and MatrixI matrices.
Most functions are as in DictionaryComponents apart from
keys(dict) and values(dict)
which return streams of Objects and
entries(dict) that returns a stream of VectorI.
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) . count();
numEntries(vec);
clear(mat), remove(mat,'x') will throw exceptions,
as will put(mat,'unknown',5).
The FieldI.eq(Object, Object) method is used to compare keys
in the get(dict,'x'), getOr(dict,'x'), put(dict,'x'),
remove(dict,'x'), and containsKey(dict,'x') functions.
The treeSet() is setup to use FieldComparator for ordering elements.
See DictionaryComponents for the main documentation.
Three components
EntriesIterable,
KeysIterable and
ValuesIterable, are not included
by default, as they are intended to be used by the
com.singularsys.extensions.stream package. These can be added manually or by editing the properties file.
- Since:
- Jep 4.1 extensions 2.2
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumConfiguration type, one of MAP_NULL_VALUES, MAP_NO_NULL, MATRIX_NO_NULL.Nested classes/interfaces inherited from class com.singularsys.jep.misc.dictionary.DictionaryComponents
DictionaryComponents.DictionaryKeys -
Field Summary
Fields inherited from class com.singularsys.jep.misc.dictionary.DictionaryComponents
nullValue -
Constructor Summary
ConstructorsConstructorDescriptionStreamMatrixDictComponents(StreamMatrixDictComponents.Type type, MatrixFactoryI mfact, MatrixFieldI mfield) StreamMatrixDictComponents(StreamMatrixDictComponents.Type type, Object nullValue, MatrixFactoryI mfact, MatrixFieldI mfield) -
Method Summary
Methods inherited from class com.singularsys.jep.misc.dictionary.DictionaryComponents
firstInit, getNullValue, getType, putIfSetMethods inherited from class com.singularsys.jep.misc.OneShotComponent
getLightWeightInstance, init
-
Constructor Details
-
StreamMatrixDictComponents
public StreamMatrixDictComponents(StreamMatrixDictComponents.Type type, Object nullValue, MatrixFactoryI mfact, MatrixFieldI mfield) -
StreamMatrixDictComponents
public StreamMatrixDictComponents(StreamMatrixDictComponents.Type type, MatrixFactoryI mfact, MatrixFieldI mfield)
-
-
Method Details
-
addFunctions
- Overrides:
addFunctionsin classDictionaryComponents
-