# Transformer (ARX Developer Documentation)

org.deidentifier.arx.framework.check

## Class Transformer

- java.lang.Object
- - org.deidentifier.arx.framework.check.Transformer

-     public class Transformer
      extends java.lang.Object

  The class Transformer.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ARXConfiguration.ARXConfigurationInternal` | `config` The config.
    `protected IntArrayDictionary` | `dictionarySensFreq` The dictionary for the snapshot compression *.
    `protected IntArrayDictionary` | `dictionarySensValue` The dictionary for the snapshot compression *.
    `protected int` | `dimensions` The dimensions.
    `protected GeneralizationHierarchy[]` | `hierarchies` The hierarchies.
    `protected int[][]` | `inputAnalyzed` Other attribute values.
    `protected int[][]` | `inputGeneralized` The data.
    `protected AbstractTransformer[]` | `instances` The instances.
    `protected int[][]` | `outputGeneralized` The buffer.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Transformer(int[][] inputGeneralized, int[][] inputAnalyzed, GeneralizationHierarchy[] hierarchies, ARXConfiguration.ARXConfigurationInternal config, IntArrayDictionary dictionarySensValue, IntArrayDictionary dictionarySensFreq)` Instantiates a new transformer.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `HashGroupify` | `apply(long projection, int[] transformation, HashGroupify target)` Apply.
    `protected HashGroupify` | `applyInternal(long projection, int[] state, HashGroupify source, HashGroupify target, int[] snapshot, StateMachine.TransitionType transition)` Apply internal.
    `HashGroupify` | `applyRollup(long projection, int[] state, HashGroupify source, HashGroupify target)` Apply rollup.
    `HashGroupify` | `applySnapshot(long projection, int[] state, HashGroupify target, int[] snapshot)` Apply snapshot.
    `protected AbstractTransformer` | `getApplicator(long projection)` Gets the applicator.
    `int[][]` | `getBuffer()` Gets the buffer.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### config

          protected final ARXConfiguration.ARXConfigurationInternal config

      The config.

    - #### dictionarySensFreq

          protected IntArrayDictionary dictionarySensFreq

      The dictionary for the snapshot compression *.

    - #### dictionarySensValue

          protected IntArrayDictionary dictionarySensValue

      The dictionary for the snapshot compression *.

    - #### dimensions

          protected final int dimensions

      The dimensions.

    - #### hierarchies

          protected final GeneralizationHierarchy[] hierarchies

      The hierarchies.

    - #### inputAnalyzed

          protected int[][] inputAnalyzed

      Other attribute values.

    - #### inputGeneralized

          protected final int[][] inputGeneralized

      The data.

    - #### instances

          protected final AbstractTransformer[] instances

      The instances.

    - #### outputGeneralized

          protected int[][] outputGeneralized

      The buffer.

  - ### Constructor Detail

    - #### Transformer

          public Transformer(int[][] inputGeneralized,
                     int[][] inputAnalyzed,
                     GeneralizationHierarchy[] hierarchies,
                     ARXConfiguration.ARXConfigurationInternal config,
                     IntArrayDictionary dictionarySensValue,
                     IntArrayDictionary dictionarySensFreq)

      Instantiates a new transformer.
      Parameters:
        `inputGeneralized` -
        `inputAnalyzed` -
        `hierarchies` -
        `config` -
        `dictionarySensValue` -
        `dictionarySensFreq` -

  - ### Method Detail

    - #### apply

          public HashGroupify apply(long projection,
                           int[] transformation,
                           HashGroupify target)

      Apply.
      Parameters:
        `projection` - the projection
        `transformation` - the transformation
        `target` - the target
      Returns:
        the hash groupify

    - #### applyRollup

          public HashGroupify applyRollup(long projection,
                                 int[] state,
                                 HashGroupify source,
                                 HashGroupify target)

      Apply rollup.
      Parameters:
        `projection` - the projection
        `state` - the state
        `source` - the source
        `target` - the target
      Returns:
        the hash groupify

    - #### applySnapshot

          public HashGroupify applySnapshot(long projection,
                                   int[] state,
                                   HashGroupify target,
                                   int[] snapshot)

      Apply snapshot.
      Parameters:
        `projection` - the projection
        `state` - the state
        `target` - the target
        `snapshot` - the snapshot
      Returns:
        the hash groupify

    - #### getBuffer

          public int[][] getBuffer()

      Gets the buffer.
      Returns:
        the buffer

    - #### applyInternal

          protected HashGroupify applyInternal(long projection,
                                   int[] state,
                                   HashGroupify source,
                                   HashGroupify target,
                                   int[] snapshot,
                                   StateMachine.TransitionType transition)

      Apply internal.
      Parameters:
        `projection` - the projection
        `state` - the state
        `source` - the source
        `target` - the target
        `snapshot` - the snapshot
        `transition` - the transition
      Returns:
        the hash groupify

    - #### getApplicator

          protected AbstractTransformer getApplicator(long projection)

      Gets the applicator.
      Parameters:
        `projection` - the projection
      Returns:
        the applicator