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

## Class PlaceHolderDict

- java.lang.Object
- - org.apache.sysds.runtime.compress.colgroup.dictionary.ADictionary
  - - org.apache.sysds.runtime.compress.colgroup.dictionary.PlaceHolderDict

All Implemented Interfaces:
  `Serializable`, `IDictionary`

    public class PlaceHolderDict
    extends ADictionary

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.sysds.runtime.compress.colgroup.dictionary.IDictionary

`IDictionary.DictType`

### Field Summary

### Fields inherited from interface org.apache.sysds.runtime.compress.colgroup.dictionary.IDictionary

`LOG`

### Constructor Summary

Constructors
`PlaceHolderDict​(int nVal)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`IDictionary` `clone()` Returns a deep clone of the dictionary.
`boolean` `equals​(IDictionary o)` Indicate if the other dictionary is equal to this.
`IDictionary.DictType` `getDictType()` Get the dictionary type this dictionary is.
`long` `getExactSizeOnDisk()` Calculate the space consumption if the dictionary is stored on disk.
`long` `getInMemorySize()` Returns the memory usage of the dictionary.
`MatrixBlockDictionary` `getMBDict()`
`long` `getNumberNonZeros​(int[] counts, int nCol)` Calculate the number of non zeros in the dictionary.
`int` `getNumberOfColumns​(int nrow)` Get the number of columns in this dictionary, provided you know the number of values, or rows.
`int` `getNumberOfValues​(int nCol)` Get the number of distinct tuples given that the column group has n columns
`String` `getString​(int colIndexes)` Get a string representation of the dictionary, that considers the layout of the data.
`static PlaceHolderDict` `read​(DataInput in)`
`void` `write​(DataOutput out)` Write the dictionary to a DataOutput.

### Methods inherited from class org.apache.sysds.runtime.compress.colgroup.dictionary.ADictionary

`addToEntry, addToEntry, addToEntryVectorized, aggregate, aggregateCols, aggregateColsWithReference, aggregateRows, aggregateRowsWithDefault, aggregateRowsWithReference, aggregateWithReference, append, applyScalarOp, applyScalarOpAndAppend, applyScalarOpWithReference, applyUnaryOp, applyUnaryOpAndAppend, applyUnaryOpWithReference, binOpLeft, binOpLeftAndAppend, binOpLeftWithReference, binOpRight, binOpRight, binOpRightAndAppend, binOpRightWithReference, cbind, centralMoment, centralMoment, centralMomentWithDefault, centralMomentWithDefault, centralMomentWithReference, centralMomentWithReference, colProduct, colProductWithReference, colSum, colSumSq, colSumSqWithReference, containsValue, containsValueWithReference, correctNan, countNNZZeroColumns, equals, equals, getMBDict, getNumberNonZerosWithReference, getRow, getSparsity, getValue, getValue, getValues, MMDict, MMDictDense, MMDictScaling, MMDictScalingDense, MMDictScalingSparse, MMDictSparse, multiplyScalar, preaggValuesFromDense, product, productAllRowsToDouble, productAllRowsToDoubleWithDefault, productAllRowsToDoubleWithReference, productWithDefault, productWithReference, putDense, putSparse, reorder, replace, replaceWithReference, rexpandCols, rexpandColsWithReference, rightMMPreAggSparse, scaleTuples, sliceOutColumnRange, subtractTuple, sum, sumAllRowsToDouble, sumAllRowsToDoubleSq, sumAllRowsToDoubleSqWithDefault, sumAllRowsToDoubleSqWithReference, sumAllRowsToDoubleWithDefault, sumAllRowsToDoubleWithReference, sumSq, sumSqWithReference, TSMMToUpperTriangle, TSMMToUpperTriangleDense, TSMMToUpperTriangleDenseScaling, TSMMToUpperTriangleScaling, TSMMToUpperTriangleSparse, TSMMToUpperTriangleSparseScaling, TSMMWithScaling`

### Methods inherited from class java.lang.Object

`getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PlaceHolderDict

    public PlaceHolderDict​(int nVal)

### Method Detail

#### getExactSizeOnDisk

    public long getExactSizeOnDisk()

Description copied from interface: `IDictionary`
Calculate the space consumption if the dictionary is stored on disk.

Returns:
  the long count of bytes to store the dictionary.

#### getInMemorySize

    public long getInMemorySize()

Description copied from interface: `IDictionary`
Returns the memory usage of the dictionary.

Returns:
  a long value in number of bytes for the dictionary.

#### getNumberOfValues

    public int getNumberOfValues​(int nCol)

Description copied from interface: `IDictionary`
Get the number of distinct tuples given that the column group has n columns

Parameters:
  `nCol` - The number of Columns in the ColumnGroup.
Returns:
  the number of value tuples contained in the dictionary.

#### getNumberOfColumns

    public int getNumberOfColumns​(int nrow)

Description copied from interface: `IDictionary`
Get the number of columns in this dictionary, provided you know the number of values, or rows.

Parameters:
  `nrow` - The number of rows/values known inside this dictionary
Returns:
  The number of columns

#### getMBDict

    public MatrixBlockDictionary getMBDict()

Overrides:
  `getMBDict` in class `ADictionary`

#### write

    public void write​(DataOutput out)
               throws IOException

Description copied from interface: `IDictionary`
Write the dictionary to a DataOutput.

Parameters:
  `out` - the output sink to write the dictionary to.
Throws:
  `IOException` - if the sink fails.

#### read

    public static PlaceHolderDict read​(DataInput in)
                                throws IOException

Throws:
  `IOException`

#### getString

    public String getString​(int colIndexes)

Description copied from interface: `IDictionary`
Get a string representation of the dictionary, that considers the layout of the data.

Parameters:
  `colIndexes` - The number of columns in the dictionary.
Returns:
  A string that is nicer to print.

#### getNumberNonZeros

    public long getNumberNonZeros​(int[] counts,
                                  int nCol)

Description copied from interface: `IDictionary`
Calculate the number of non zeros in the dictionary. The number of non zeros should be scaled with the counts given. This gives the exact number of non zero values in the parent column group.

Parameters:
  `counts` - The counts of each dictionary entry
  `nCol` - The number of columns in this dictionary
Returns:
  The nonZero count

#### equals

    public boolean equals​(IDictionary o)

Description copied from interface: `IDictionary`
Indicate if the other dictionary is equal to this.

Parameters:
  `o` - The other object
Returns:
  If it is equal

#### clone

    public IDictionary clone()

Description copied from interface: `IDictionary`
Returns a deep clone of the dictionary.

Specified by:
  `clone` in interface `IDictionary`
Specified by:
  `clone` in class `ADictionary`
Returns:
  A deep clone

#### getDictType

    public IDictionary.DictType getDictType()

Description copied from interface: `IDictionary`
Get the dictionary type this dictionary is.

Returns:
  The Dictionary type this is.