Class AlgorithmFaceAnonymizerBET.BitSetUtility

  • Enclosing class:
    AlgorithmFaceAnonymizerBET

    private class AlgorithmFaceAnonymizerBET.BitSetUtility
    extends java.lang.Object
    Private utility class for operations on BitSets
    Author:
    senseneyj
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static int DOWN_EXP  
      (package private) static int IN_EXP  
      (package private) static int LEFT_EXP  
      (package private) static int OUT_EXP  
      (package private) static int RIGHT_EXP  
      (package private) static int UP_EXP  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private BitSetUtility()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) java.util.BitSet connectNearNeighbors​(int loc, java.util.BitSet connectingRegion, int maxNeighborDistance)
      Set elements of the returned BitSet meet at least one of the following criteria: Element is set in connectingRegion. Walking up, down, right, and/or left from loc to this element requires less than or equal to maxNeighborDistance steps.
      (package private) java.util.BitSet connectNearNeighbors​(int loc, java.util.BitSet connectingRegion, java.util.BitSet connectingRegionCopy, int maxNeighborDistance)
      A helper method for connectNearNeighbors(int, BitSet, int) that allows faster copies
      private boolean connectNearNeighborsUtil​(int loc, java.util.BitSet connectingRegion, java.util.BitSet connectingRegionCopy, int level, int dir, int levelCut)  
      private java.util.Vector<Point3D> convertSetToPoints​(java.util.BitSet set)  
      (package private) int getBoundaryCode​(java.util.BitSet set, int value)  
      (package private) java.util.BitSet getEdgePoints​(java.util.BitSet set)
      Finds the points of the given BitSet which has at least one neighbor (not including diagonals) not in the BitSet.
      (package private) float getMinDistance​(int value, java.util.BitSet set)
      Calculates the distance between the closest point in this BitSet and the given value.
      (package private) float getMinDistance​(int value, java.util.Vector<Point3D> setPoints)
      Calculates the distance between the closest point in this Vector and the given value.
      (package private) boolean isBoundaryPoint​(java.util.BitSet set, int value)  
      (package private) boolean isInScan​(int value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BitSetUtility

        private BitSetUtility()
    • Method Detail

      • getMinDistance

        float getMinDistance​(int value,
                             java.util.BitSet set)
        Calculates the distance between the closest point in this BitSet and the given value.
      • getMinDistance

        float getMinDistance​(int value,
                             java.util.Vector<Point3D> setPoints)
        Calculates the distance between the closest point in this Vector and the given value.
      • getEdgePoints

        java.util.BitSet getEdgePoints​(java.util.BitSet set)
        Finds the points of the given BitSet which has at least one neighbor (not including diagonals) not in the BitSet.
      • isBoundaryPoint

        boolean isBoundaryPoint​(java.util.BitSet set,
                                int value)
      • getBoundaryCode

        int getBoundaryCode​(java.util.BitSet set,
                            int value)
      • isInScan

        boolean isInScan​(int value)
      • connectNearNeighbors

        java.util.BitSet connectNearNeighbors​(int loc,
                                              java.util.BitSet connectingRegion,
                                              int maxNeighborDistance)
        Set elements of the returned BitSet meet at least one of the following criteria:
        1. Element is set in connectingRegion.
        2. Walking up, down, right, and/or left from loc to this element requires less than or equal to maxNeighborDistance steps.
      • connectNearNeighbors

        java.util.BitSet connectNearNeighbors​(int loc,
                                              java.util.BitSet connectingRegion,
                                              java.util.BitSet connectingRegionCopy,
                                              int maxNeighborDistance)
        A helper method for connectNearNeighbors(int, BitSet, int) that allows faster copies
      • connectNearNeighborsUtil

        private boolean connectNearNeighborsUtil​(int loc,
                                                 java.util.BitSet connectingRegion,
                                                 java.util.BitSet connectingRegionCopy,
                                                 int level,
                                                 int dir,
                                                 int levelCut)
      • convertSetToPoints

        private java.util.Vector<Point3D> convertSetToPoints​(java.util.BitSet set)