Package org.apache.sysds.runtime.compress.colgroup.dictionary

## Interface DictionaryFactory

    public interface DictionaryFactory

### Nested Class Summary

Nested Classes
`static class` `DictionaryFactory.Type`

### Field Summary

Fields
`static org.apache.commons.logging.Log` `LOG`

### Method Summary

Static Methods
`static IDictionary` `cBindDictionaries​(int nCol, List<IDictionary> dicts)`
`static IDictionary` `cBindDictionaries​(IDictionary left, IDictionary right, int nColLeft, int nColRight)`
`static IDictionary` `combineDictionaries​(AColGroupCompressed a, AColGroupCompressed b)`
`static IDictionary` `combineDictionaries​(AColGroupCompressed a, AColGroupCompressed b, HashMapLongInt 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` `combineDictionariesSparse​(AColGroupCompressed a, AColGroupCompressed b, HashMapLongInt filter)` 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, HashMapLongInt filter)` Combine the dictionaries as if the dictionaries only contain the values in the specified filter.
`static IDictionary` `combineFullDictionaries​(IDictionary a, IColIndex ai, int nca, IDictionary b, IColIndex bi, int ncb, HashMapLongInt filter)`
`static IDictionary` `combineFullDictionaries​(IDictionary a, IColIndex ai, IDictionary b, IColIndex bi, HashMapLongInt filter)`
`static IDictionary` `combineSDCFilter​(IDictionary a, double[] tua, IDictionary b, double[] tub, HashMapLongInt filter)`
`static IDictionary` `combineSDCFilter​(IDictionary a, double[] tua, IColIndex ai, IDictionary b, double[] tub, IColIndex bi, HashMapLongInt filter)`
`static IDictionary` `combineSDCNoFilter​(IDictionary a, double[] tua, IDictionary b, double[] tub)`
`static IDictionary` `combineSDCNoFilter​(IDictionary a, double[] tua, IColIndex ai, IDictionary b, double[] tub, IColIndex bi)`
`static IDictionary` `combineSDCRight​(IDictionary a, int nca, IDictionary b, double[] tub, HashMapLongInt filter)`
`static IDictionary` `combineSDCRight​(IDictionary a, IColIndex ai, int nca, IDictionary b, double[] tub, IColIndex bi, HashMapLongInt filter)`
`static IDictionary` `combineSDCRight​(IDictionary a, IColIndex ai, IDictionary b, double[] tub, IColIndex bi, HashMapLongInt filter)`
`static IDictionary` `combineSDCRightNoFilter​(IDictionary a, int nca, IDictionary b, double[] tub)`
`static IDictionary` `combineSDCRightNoFilter​(IDictionary a, IColIndex ai, int nca, IDictionary b, double[] tub, IColIndex bi)`
`static IDictionary` `create​(ABitmap ubm)`
`static IDictionary` `create​(ABitmap ubm, double sparsity)`
`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 long` `getInMemorySize​(int nrValues, int nrColumns, double tupleSparsity, boolean lossy)`
`static IDictionary` `read​(DataInput in)`

### Field Detail

#### LOG

    static final org.apache.commons.logging.Log LOG

### 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)

#### create

    static IDictionary create​(ABitmap ubm,
                              int defaultIndex,
                              double[] defaultTuple,
                              double sparsity,
                              boolean addZero)

#### create

    static IDictionary create​(DoubleCountHashMap map)

#### combineDictionaries

    static IDictionary combineDictionaries​(AColGroupCompressed a,
                                           AColGroupCompressed b)

#### combineDictionaries

    static IDictionary combineDictionaries​(AColGroupCompressed a,
                                           AColGroupCompressed b,
                                           HashMapLongInt 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 const
  `b` - A Dictionary can be Const or SDC.
Returns:
  The combined dictionary

#### combineDictionariesSparse

    static IDictionary combineDictionariesSparse​(AColGroupCompressed a,
                                                 AColGroupCompressed b,
                                                 HashMapLongInt filter)

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 const
  `b` - A Dictionary can be Const or SDC
  `filter` - A filter to remove elements in the combined dictionary
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 dictionary
  `nca` - Number of columns left dictionary
  `b` - Right side dictionary
  `ncb` - Number of columns right dictionary
Returns:
  A combined dictionary

#### combineFullDictionaries

    static IDictionary combineFullDictionaries​(IDictionary a,
                                               IColIndex ai,
                                               IDictionary b,
                                               IColIndex bi,
                                               HashMapLongInt filter)

#### combineFullDictionaries

    static IDictionary combineFullDictionaries​(IDictionary a,
                                               int nca,
                                               IDictionary b,
                                               int ncb,
                                               HashMapLongInt filter)

Combine the dictionaries as if the dictionaries only contain the values in the specified filter.

Parameters:
  `a` - Left side dictionary
  `nca` - Number of columns left dictionary
  `b` - Right side dictionary
  `ncb` - Number of columns right dictionary
  `filter` - 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

#### combineFullDictionaries

    static IDictionary combineFullDictionaries​(IDictionary a,
                                               IColIndex ai,
                                               int nca,
                                               IDictionary b,
                                               IColIndex bi,
                                               int ncb,
                                               HashMapLongInt filter)

#### combineSDCRightNoFilter

    static IDictionary combineSDCRightNoFilter​(IDictionary a,
                                               int nca,
                                               IDictionary b,
                                               double[] tub)

#### combineSDCRightNoFilter

    static IDictionary combineSDCRightNoFilter​(IDictionary a,
                                               IColIndex ai,
                                               int nca,
                                               IDictionary b,
                                               double[] tub,
                                               IColIndex bi)

#### combineSDCRight

    static IDictionary combineSDCRight​(IDictionary a,
                                       IColIndex ai,
                                       IDictionary b,
                                       double[] tub,
                                       IColIndex bi,
                                       HashMapLongInt filter)

#### combineSDCRight

    static IDictionary combineSDCRight​(IDictionary a,
                                       int nca,
                                       IDictionary b,
                                       double[] tub,
                                       HashMapLongInt filter)

#### combineSDCRight

    static IDictionary combineSDCRight​(IDictionary a,
                                       IColIndex ai,
                                       int nca,
                                       IDictionary b,
                                       double[] tub,
                                       IColIndex bi,
                                       HashMapLongInt filter)

#### combineSDCNoFilter

    static IDictionary combineSDCNoFilter​(IDictionary a,
                                          double[] tua,
                                          IDictionary b,
                                          double[] tub)

#### combineSDCNoFilter

    static IDictionary combineSDCNoFilter​(IDictionary a,
                                          double[] tua,
                                          IColIndex ai,
                                          IDictionary b,
                                          double[] tub,
                                          IColIndex bi)

#### combineSDCFilter

    static IDictionary combineSDCFilter​(IDictionary a,
                                        double[] tua,
                                        IDictionary b,
                                        double[] tub,
                                        HashMapLongInt filter)

#### combineSDCFilter

    static IDictionary combineSDCFilter​(IDictionary a,
                                        double[] tua,
                                        IColIndex ai,
                                        IDictionary b,
                                        double[] tub,
                                        IColIndex bi,
                                        HashMapLongInt filter)

#### cBindDictionaries

    static IDictionary cBindDictionaries​(int nCol,
                                         List<IDictionary> dicts)

#### cBindDictionaries

    static IDictionary cBindDictionaries​(IDictionary left,
                                         IDictionary right,
                                         int nColLeft,
                                         int nColRight)