org.apache.sysds.runtime.compress.colgroup.mapping

## Class MapToBit

- java.lang.Object
- - org.apache.sysds.runtime.compress.colgroup.mapping.AMapToData
  - - org.apache.sysds.runtime.compress.colgroup.mapping.MapToBit

All Implemented Interfaces:
  Serializable

    public class MapToBit
    extends AMapToData

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`MapToBit(int unique, int size)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `fill(int v)`
`long` `getExactSizeOnDisk()`
`int` `getIndex(int n)`
`long` `getInMemorySize()`
`static long` `getInMemorySize(int dataLength)`
`static MapToBit` `readFields(DataInput in)`
`void` `replace(int v, int r)` Replace v with r for all entries, note that it is assumed that you call this correctly, with two distinct values.
`void` `set(int n, int v)`
`int` `size()`
`void` `write(DataOutput out)`

### Methods inherited from class org.apache.sysds.runtime.compress.colgroup.mapping.AMapToData

`copy, getUnique, toString`

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

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### MapToBit

    public MapToBit(int unique,
                    int size)

### Method Detail

#### getIndex

    public int getIndex(int n)

Specified by:
  `getIndex` in class `AMapToData`

#### fill

    public void fill(int v)

Specified by:
  `fill` in class `AMapToData`

#### getInMemorySize

    public long getInMemorySize()

Specified by:
  `getInMemorySize` in class `AMapToData`

#### getInMemorySize

    public static long getInMemorySize(int dataLength)

#### getExactSizeOnDisk

    public long getExactSizeOnDisk()

Specified by:
  `getExactSizeOnDisk` in class `AMapToData`

#### set

    public void set(int n,
                    int v)

Specified by:
  `set` in class `AMapToData`

#### size

    public int size()

Specified by:
  `size` in class `AMapToData`

#### replace

    public void replace(int v,
                        int r)

Description copied from class: `AMapToData`
Replace v with r for all entries, note that it is assumed that you call this correctly, with two distinct values. That is representable inside the given AMapToData.

Specified by:
  `replace` in class `AMapToData`
Parameters:
  `v` - v the value to replace
  `r` - r the value to put instead

#### write

    public void write(DataOutput out)
               throws IOException

Specified by:
  `write` in class `AMapToData`
Throws:
  `IOException`

#### readFields

    public static MapToBit readFields(DataInput in)
                               throws IOException

Throws:
  `IOException`