Interface DictionaryFactory
-
public interface DictionaryFactory
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
DictionaryFactory.Type
-
Field Summary
Fields Modifier and Type Field Description static org.apache.commons.logging.Log
LOG
-
Method Summary
Static Methods Modifier and Type Method Description static IDictionary
combineConstSparseSparseRet(double[] tua, IDictionary b, int ncb)
static IDictionary
combineDictionaries(AColGroupCompressed a, AColGroupCompressed b)
static IDictionary
combineDictionaries(AColGroupCompressed a, AColGroupCompressed b, Map<Integer,Integer> filter)
static IDictionary
combineDictionariesSparse(AColGroupCompressed a, AColGroupCompressed b)
Combine the dictionaries assuming a sparse combination where each dictionary can be a SDC containing a default element that have to be introduced into the combined dictionary.static IDictionary
combineFullDictionaries(IDictionary a, int nca, IDictionary b, int ncb)
Combine the dictionaries as if the dictionaries contain the full spectrum of the combined data.static IDictionary
combineFullDictionaries(IDictionary a, int nca, IDictionary b, int ncb, Map<Integer,Integer> filter)
Combine the dictionaries as if the dictionaries only contain the values in the specified filter.static IDictionary
combineSDC(IDictionary a, double[] tua, IDictionary b, double[] tub)
static IDictionary
combineSDC(IDictionary a, double[] tua, IDictionary b, double[] tub, Map<Integer,Integer> filter)
static IDictionary
combineSDCRight(IDictionary a, int nca, IDictionary b, double[] tub)
static IDictionary
combineSDCRight(IDictionary a, int nca, IDictionary b, double[] tub, Map<Integer,Integer> filter)
static IDictionary
combineSparseConstSparseRet(IDictionary a, int nca, double[] tub)
static IDictionary
create(ABitmap ubm)
static IDictionary
create(ABitmap ubm, double sparsity)
static IDictionary
create(ABitmap ubm, double sparsity, boolean withZeroTuple)
static IDictionary
create(ABitmap ubm, int defaultIndex, double[] defaultTuple, double sparsity, boolean addZero)
static IDictionary
create(DblArrayCountHashMap map, int nCols, boolean addZeroTuple, double sparsity)
static IDictionary
create(DoubleCountHashMap map)
static IDictionary
createWithAppendedZeroTuple(ABitmap ubm, double sparsity)
static long
getInMemorySize(int nrValues, int nrColumns, double tupleSparsity, boolean lossy)
static IDictionary
read(DataInput in)
-
-
-
Method Detail
-
read
static IDictionary read(DataInput in) throws IOException
- Throws:
IOException
-
getInMemorySize
static long getInMemorySize(int nrValues, int nrColumns, double tupleSparsity, boolean lossy)
-
create
static IDictionary create(DblArrayCountHashMap map, int nCols, boolean addZeroTuple, double sparsity)
-
create
static IDictionary create(ABitmap ubm)
-
create
static IDictionary create(ABitmap ubm, double sparsity, boolean withZeroTuple)
-
create
static IDictionary create(ABitmap ubm, double sparsity)
-
create
static IDictionary create(ABitmap ubm, int defaultIndex, double[] defaultTuple, double sparsity, boolean addZero)
-
createWithAppendedZeroTuple
static IDictionary createWithAppendedZeroTuple(ABitmap ubm, double sparsity)
-
create
static IDictionary create(DoubleCountHashMap map)
-
combineDictionaries
static IDictionary combineDictionaries(AColGroupCompressed a, AColGroupCompressed b)
-
combineDictionaries
static IDictionary combineDictionaries(AColGroupCompressed a, AColGroupCompressed b, Map<Integer,Integer> filter)
-
combineDictionariesSparse
static IDictionary combineDictionariesSparse(AColGroupCompressed a, AColGroupCompressed b)
Combine the dictionaries assuming a sparse combination where each dictionary can be a SDC containing a default element that have to be introduced into the combined dictionary.- Parameters:
a
- A Dictionary can be SDC or constb
- A Dictionary can be Const or SDC.- Returns:
- The combined dictionary
-
combineFullDictionaries
static IDictionary combineFullDictionaries(IDictionary a, int nca, IDictionary b, int ncb)
Combine the dictionaries as if the dictionaries contain the full spectrum of the combined data.- Parameters:
a
- Left side dictionarynca
- Number of columns left dictionaryb
- Right side dictionaryncb
- Number of columns right dictionary- Returns:
- A combined dictionary
-
combineFullDictionaries
static IDictionary combineFullDictionaries(IDictionary a, int nca, IDictionary b, int ncb, Map<Integer,Integer> filter)
Combine the dictionaries as if the dictionaries only contain the values in the specified filter.- Parameters:
a
- Left side dictionarynca
- Number of columns left dictionaryb
- Right side dictionaryncb
- Number of columns right dictionaryfilter
- The mapping filter to not include all possible combinations in the output, this filter is allowed to be null, that means the output is defaulting back to a full combine- Returns:
- A combined dictionary
-
combineSDCRight
static IDictionary combineSDCRight(IDictionary a, int nca, IDictionary b, double[] tub)
-
combineSDCRight
static IDictionary combineSDCRight(IDictionary a, int nca, IDictionary b, double[] tub, Map<Integer,Integer> filter)
-
combineSDC
static IDictionary combineSDC(IDictionary a, double[] tua, IDictionary b, double[] tub)
-
combineSDC
static IDictionary combineSDC(IDictionary a, double[] tua, IDictionary b, double[] tub, Map<Integer,Integer> filter)
-
combineSparseConstSparseRet
static IDictionary combineSparseConstSparseRet(IDictionary a, int nca, double[] tub)
-
combineConstSparseSparseRet
static IDictionary combineConstSparseSparseRet(double[] tua, IDictionary b, int ncb)
-
-