# SolutionSpace (ARX Developer Documentation)

org.deidentifier.arx.framework.lattice

## Class SolutionSpace

- java.lang.Object
- - org.deidentifier.arx.framework.lattice.SolutionSpace

-     public class SolutionSpace
      extends java.lang.Object

  A class representing the solution space

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SolutionSpace(ARXLattice lattice, ARXConfiguration config)` For de-serialization
    `SolutionSpace(int[] minLevels, int[] maxLevels)` Creates a new solution space

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `fromJHPL(int level)` Internal method that adds the offset
    `protected int[]` | `fromJHPL(int[] transformation)` Internal method that adds the offsets
    `Transformation` | `getBottom()` Returns the bottom transformation
    `protected java.lang.Object` | `getData(long id)` Returns data
    `protected InformationLoss<?>` | `getInformationLoss(long identifier)` Returns the information loss
    `int` | `getLevel(int[] transformation)` Returns the level of the given transformation
    `protected InformationLoss<?>` | `getLowerBound(long identifier)` Returns the lower bound
    `de.linearbits.jhpl.JHPLIterator.LongIterator` | `getMaterializedTransformations()` Returns all materialized transformations
    `long[]` | `getMultipliersForHighDimensionalData()` Returns the multipliers
    `int[]` | `getMultipliersForLowDimensionalData()` Returns the multipliers
    `de.linearbits.jhpl.PredictiveProperty` | `getPropertyAnonymous()` Returns a property
    `de.linearbits.jhpl.PredictiveProperty` | `getPropertyChecked()` Returns a property
    `de.linearbits.jhpl.PredictiveProperty` | `getPropertyExpanded()` Property for expanded transformation
    `de.linearbits.jhpl.PredictiveProperty` | `getPropertyForceSnapshot()` Returns a property
    `de.linearbits.jhpl.PredictiveProperty` | `getPropertyInsufficientUtility()` Returns a property
    `de.linearbits.jhpl.PredictiveProperty` | `getPropertyKAnonymous()` Returns a property
    `de.linearbits.jhpl.PredictiveProperty` | `getPropertyNotAnonymous()` Returns a property
    `de.linearbits.jhpl.PredictiveProperty` | `getPropertyNotKAnonymous()` Returns a property
    `de.linearbits.jhpl.PredictiveProperty` | `getPropertySuccessorsPruned()` Returns a property
    `de.linearbits.jhpl.PredictiveProperty` | `getPropertyVisited()` Returns a property
    `long` | `getSize()` Returns the overall number of transformations in the solution space
    `Transformation` | `getTop()` Returns the top-transformation
    `Transformation` | `getTransformation(int[] transformation)` Returns a wrapper object with access to all properties about the transformation
    `Transformation` | `getTransformation(long identifier)` Returns the transformation with the given identifier
    `InformationLoss<?>` | `getUtility(long identifier)` Returns the utility of the transformation with the given identifier
    `boolean` | `hasProperty(int[] transformation, de.linearbits.jhpl.PredictiveProperty property)` Returns whether a node has a given property
    `boolean` | `isDirectParentChild(int[] parent, int[] child)` Determines whether a direct parent-child relationship exists.
    `boolean` | `isParentChildOrEqual(int[] parent, int[] child)` Determines whether a parent-child relationship exists, or both are equal
    `void` | `setAnonymityPropertyPredictable(boolean predictable)` Makes the anonymity property predictable
    `protected void` | `setData(long id, java.lang.Object object)` Sets data
    `protected void` | `setInformationLoss(long identifier, InformationLoss<?> loss)` Sets the information loss
    `protected void` | `setLowerBound(long identifier, InformationLoss<?> loss)` Sets the lower bound
    `protected int` | `toJHPL(int level)` Internal method that subtracts the offset
    `protected int[]` | `toJHPL(int[] transformation)` Internal method that subtracts the offsets
    `de.linearbits.jhpl.JHPLIterator.LongIterator` | `unsafeGetAllTransformations()` Returns all transformations in the solution space
    `de.linearbits.jhpl.JHPLIterator.LongIterator` | `unsafeGetLevel(int level)` Returns *all* nodes on the given level.

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

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

- - ### Constructor Detail

    - #### SolutionSpace

          public SolutionSpace(ARXLattice lattice,
                       ARXConfiguration config)

      For de-serialization
      Parameters:
        `lattice` -
        `config` -

    - #### SolutionSpace

          public SolutionSpace(int[] minLevels,
                       int[] maxLevels)

      Creates a new solution space
      Parameters:
        `minLevels` -
        `maxLevels` -

  - ### Method Detail

    - #### getBottom

          public Transformation getBottom()

      Returns the bottom transformation
      Returns:

    - #### getLevel

          public int getLevel(int[] transformation)

      Returns the level of the given transformation
      Parameters:
        `transformation` -
      Returns:

    - #### getMaterializedTransformations

          public de.linearbits.jhpl.JHPLIterator.LongIterator getMaterializedTransformations()

      Returns all materialized transformations
      Returns:

    - #### getMultipliersForHighDimensionalData

          public long[] getMultipliersForHighDimensionalData()

      Returns the multipliers
      Returns:

    - #### getMultipliersForLowDimensionalData

          public int[] getMultipliersForLowDimensionalData()

      Returns the multipliers
      Returns:

    - #### getPropertyAnonymous

          public de.linearbits.jhpl.PredictiveProperty getPropertyAnonymous()

      Returns a property
      Returns:

    - #### getPropertyChecked

          public de.linearbits.jhpl.PredictiveProperty getPropertyChecked()

      Returns a property
      Returns:

    - #### getPropertyExpanded

          public de.linearbits.jhpl.PredictiveProperty getPropertyExpanded()

      Property for expanded transformation
      Returns:

    - #### getPropertyForceSnapshot

          public de.linearbits.jhpl.PredictiveProperty getPropertyForceSnapshot()

      Returns a property
      Returns:

    - #### getPropertyInsufficientUtility

          public de.linearbits.jhpl.PredictiveProperty getPropertyInsufficientUtility()

      Returns a property
      Returns:

    - #### getPropertyKAnonymous

          public de.linearbits.jhpl.PredictiveProperty getPropertyKAnonymous()

      Returns a property
      Returns:

    - #### getPropertyNotAnonymous

          public de.linearbits.jhpl.PredictiveProperty getPropertyNotAnonymous()

      Returns a property
      Returns:

    - #### getPropertyNotKAnonymous

          public de.linearbits.jhpl.PredictiveProperty getPropertyNotKAnonymous()

      Returns a property
      Returns:

    - #### getPropertySuccessorsPruned

          public de.linearbits.jhpl.PredictiveProperty getPropertySuccessorsPruned()

      Returns a property
      Returns:

    - #### getPropertyVisited

          public de.linearbits.jhpl.PredictiveProperty getPropertyVisited()

      Returns a property
      Returns:

    - #### getSize

          public long getSize()

      Returns the overall number of transformations in the solution space
      Returns:

    - #### getTop

          public Transformation getTop()

      Returns the top-transformation
      Returns:

    - #### getTransformation

          public Transformation getTransformation(int[] transformation)

      Returns a wrapper object with access to all properties about the transformation
      Parameters:
        `transformation` -
      Returns:

    - #### getTransformation

          public Transformation getTransformation(long identifier)

      Returns the transformation with the given identifier
      Parameters:
        `identifier` -
      Returns:

    - #### getUtility

          public InformationLoss<?> getUtility(long identifier)

      Returns the utility of the transformation with the given identifier
      Parameters:
        `identifier` -
      Returns:

    - #### hasProperty

          public boolean hasProperty(int[] transformation,
                            de.linearbits.jhpl.PredictiveProperty property)

      Returns whether a node has a given property
      Parameters:
        `transformation` -
        `property` -
      Returns:

    - #### isDirectParentChild

          public boolean isDirectParentChild(int[] parent,
                                    int[] child)

      Determines whether a direct parent-child relationship exists.
      Parameters:
        `parent` -
        `child` -
      Returns:

    - #### isParentChildOrEqual

          public boolean isParentChildOrEqual(int[] parent,
                                     int[] child)

      Determines whether a parent-child relationship exists, or both are equal
      Parameters:
        `parent` -
        `child` -
      Returns:

    - #### setAnonymityPropertyPredictable

          public void setAnonymityPropertyPredictable(boolean predictable)

      Makes the anonymity property predictable
      Parameters:
        `predictable` -

    - #### unsafeGetAllTransformations

          public de.linearbits.jhpl.JHPLIterator.LongIterator unsafeGetAllTransformations()

      Returns all transformations in the solution space
      Returns:

    - #### unsafeGetLevel

          public de.linearbits.jhpl.JHPLIterator.LongIterator unsafeGetLevel(int level)

      Returns *all* nodes on the given level. This is an unsafe operation that only performs well for "small" spaces.
      Parameters:
        `level` -
      Returns:

    - #### fromJHPL

          protected int fromJHPL(int level)

      Internal method that adds the offset
      Parameters:
        `level` -
      Returns:

    - #### fromJHPL

          protected int[] fromJHPL(int[] transformation)

      Internal method that adds the offsets
      Parameters:
        `transformation` -
      Returns:

    - #### getData

          protected java.lang.Object getData(long id)

      Returns data
      Parameters:
        `id` -
      Returns:

    - #### getInformationLoss

          protected InformationLoss<?> getInformationLoss(long identifier)

      Returns the information loss
      Parameters:
        `identifier` -
      Returns:

    - #### getLowerBound

          protected InformationLoss<?> getLowerBound(long identifier)

      Returns the lower bound
      Parameters:
        `identifier` -
      Returns:

    - #### setData

          protected void setData(long id,
                     java.lang.Object object)

      Sets data
      Parameters:
        `id` -
        `object` -

    - #### setInformationLoss

          protected void setInformationLoss(long identifier,
                                InformationLoss<?> loss)

      Sets the information loss
      Parameters:
        `identifier` -
        `loss` -

    - #### setLowerBound

          protected void setLowerBound(long identifier,
                           InformationLoss<?> loss)

      Sets the lower bound
      Parameters:
        `identifier` -
        `loss` -

    - #### toJHPL

          protected int toJHPL(int level)

      Internal method that subtracts the offset
      Parameters:
        `level` -
      Returns:

    - #### toJHPL

          protected int[] toJHPL(int[] transformation)

      Internal method that subtracts the offsets
      Parameters:
        `transformation` -
      Returns: