Package microsim.data
Class MultiKeyCoefficientMap
java.lang.Object
org.apache.commons.collections4.map.AbstractIterableMap<K,V>
org.apache.commons.collections4.map.AbstractMapDecorator<org.apache.commons.collections4.keyvalue.MultiKey<? extends K>,V>
org.apache.commons.collections4.map.MultiKeyMap
microsim.data.MultiKeyCoefficientMap
- All Implemented Interfaces:
Serializable,Cloneable,Map,org.apache.commons.collections4.Get,org.apache.commons.collections4.IterableGet,org.apache.commons.collections4.IterableMap,org.apache.commons.collections4.Put
public class MultiKeyCoefficientMap
extends org.apache.commons.collections4.map.MultiKeyMap
Multi key coefficient map.
- Author:
- Ross Richardson
- See Also:
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMultiKeyCoefficientMap(String[] keys, String[] values) Creates an empty new MultiKeyCoefficientMap with the names of the keys and values categories specified by String[] keys and String[] values arguments.MultiKeyCoefficientMap(org.apache.commons.collections4.map.AbstractHashedMap map, String[] keys, String[] values) Creates a new MultiKeyCoefficientMap with values stored in map, and with the names of the keys and values categories specified by String[] keys and String[] values arguments. -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a deep clone copy of the MultiKeyCoefficientMap objectString[]This method allows the instance of the MultiKeyCoefficientMap to provide a clone of the names of the keys.getRowColumnValue(Object row, String col) OBTAIN VALUE BY ROW AND COLUMN REFERENCE; ASSUMES 2D TABLEString[]This method allows the instance of the MultiKeyCoefficientMap to provide a clone of the names of the values.voidvoidreplaceValue(Object... keyValues) static StringtoStringKey(Object value) Methods inherited from class org.apache.commons.collections4.map.MultiKeyMap
checkKey, containsKey, containsKey, containsKey, containsKey, decorated, get, get, get, get, hash, hash, hash, hash, isEqualKey, isEqualKey, isEqualKey, isEqualKey, mapIterator, multiKeyMap, put, put, put, put, put, putAll, removeAll, removeAll, removeAll, removeAll, removeMultiKey, removeMultiKey, removeMultiKey, removeMultiKeyMethods inherited from class org.apache.commons.collections4.map.AbstractMapDecorator
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, remove, size, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
keys
-
valuesMap
-
-
Constructor Details
-
MultiKeyCoefficientMap
Creates an empty new MultiKeyCoefficientMap with the names of the keys and values categories specified by String[] keys and String[] values arguments.- Parameters:
keys- - a String array listing the names of the categories of keysvalues- - a String array listing the names of the categories of values
-
MultiKeyCoefficientMap
public MultiKeyCoefficientMap(org.apache.commons.collections4.map.AbstractHashedMap map, String[] keys, String[] values) Creates a new MultiKeyCoefficientMap with values stored in map, and with the names of the keys and values categories specified by String[] keys and String[] values arguments.- Parameters:
map- - contains the values of the MultiKeyCoefficientMap.keys- - a String array listing the names of the categories of keysvalues- - a String array listing the names of the categories of values
-
-
Method Details
-
toStringKey
-
getValue
-
getRowColumnValue
OBTAIN VALUE BY ROW AND COLUMN REFERENCE; ASSUMES 2D TABLE- Parameters:
row-col-- Returns:
-
putValue
-
replaceValue
-
getKeysNames
This method allows the instance of the MultiKeyCoefficientMap to provide a clone of the names of the keys. This is especially useful for getting the name of the variables used as keys in the Regression classes (in package microsim.statistics.regression)- Returns:
- a String array clone of the names of the MultiKeyCoefficientMap's keys
-
getValuesNames
This method allows the instance of the MultiKeyCoefficientMap to provide a clone of the names of the values. This is especially useful for cases where the size of valueColumns > 1, for instance to extract the names of the Type array (T[] events) for RegressionUtils.event(T[] events, double[] prob) method (in package microsim.statistics.regression)- Returns:
- a String array clone of the names of the MultiKeyCoefficientMap's values
-
clone
Returns a deep clone copy of the MultiKeyCoefficientMap object- Overrides:
clonein classorg.apache.commons.collections4.map.MultiKeyMap
-