Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sparse bitmask #44

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open

Sparse bitmask #44

wants to merge 27 commits into from

Commits on Jan 8, 2019

  1. A bitmask stored as a quadtree (or n-dimensional equivalent).

    The tree is truncated such that it does not contain boolean value-nodes
    all the way to the leafs. Instead, leafs store bitmasks of a specified
    size.
    
    Also contains algorithms to efficiently compute the number and bounding box
    of set pixels in such bitmasks.
    tpietzsch committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    21b2933 View commit details
    Browse the repository at this point in the history
  2. Add SparseBitmask:

    A RandomAccessible<NativeBoolType> that grows on demand.
    SparseBitmask.tree() provides the underlying SparseBitmaskNTree.
    SparseBitmask.region() provides a view as IterableRegion, with efficient
    computation of bounding box and iteration of set pixels.
    tpietzsch committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    933b6be View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3d53a1f View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2019

  1. Make Bitmask a outer class

    The functionality of Bitmask is very much independent of the class Tree.
    It should be an independent class.
    maarzt authored and tpietzsch committed Jan 9, 2019
    Configuration menu
    Copy the full SHA
    64cfdcc View commit details
    Browse the repository at this point in the history
  2. WIP: add tiny tests + THERE'S A BUG

    Only on bit of SparseBitmask is true.
    But SparseBitmask.region().cursor() seems to have two elements?
    maarzt authored and tpietzsch committed Jan 9, 2019
    Configuration menu
    Copy the full SHA
    5eb9114 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e9e97ca View commit details
    Browse the repository at this point in the history
  4. bugfix

    tpietzsch committed Jan 9, 2019
    Configuration menu
    Copy the full SHA
    525a222 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2019

  1. Renamings:

    * numSet -> numberOfOnes (numSet is too ambiguous. Is it a set of numbers?)
    * leafDims -> dims
    * bytes -> data (The javadoc comment suggests this renaming.)
    
    Add method byteMask similar to byteIndex to reduce code duplication.
    maarzt committed Jan 10, 2019
    Configuration menu
    Copy the full SHA
    ad4ad4e View commit details
    Browse the repository at this point in the history
  2. Rename bbox to boundingBox

    maarzt committed Jan 10, 2019
    Configuration menu
    Copy the full SHA
    388e956 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    64ae2ae View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    20f4377 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fee32f6 View commit details
    Browse the repository at this point in the history
  6. Rename BitMask to LeafBitmask

    The design of this class is specific to it's use in Tree this
    should be reflected by the name
    maarzt committed Jan 10, 2019
    Configuration menu
    Copy the full SHA
    f8f8d98 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    643ac4a View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2019

  1. Configuration menu
    Copy the full SHA
    76ed17a View commit details
    Browse the repository at this point in the history
  2. Add Benchmark against Labkit's sparse bitmaps.

    The sparse bitmaps in Labkit use list's of coordinates to store only the
    white pixels.
    maarzt committed Jan 11, 2019
    Configuration menu
    Copy the full SHA
    d956e54 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5f1381f View commit details
    Browse the repository at this point in the history
  4. Make NodeData an outer class

    maarzt committed Jan 11, 2019
    Configuration menu
    Copy the full SHA
    0778e5d View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2019

  1. Configuration menu
    Copy the full SHA
    802463c View commit details
    Browse the repository at this point in the history
  2. Add final

    maarzt committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    49c2187 View commit details
    Browse the repository at this point in the history
  3. Improve thread-safety of Tree.get and Tree.getNode

    If a set operation sets NodeData.children or NodeData.bitmask to zero,
    get will return NodeData.value.
    maarzt committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    d58b8c4 View commit details
    Browse the repository at this point in the history
  4. Make tree a tree with fixed height

    That way GrowableTree and Tree can be better distinguished.
    Also reading Tree becomes thread-safe. The tree can always be red in any
    thread, only the write operations need to be synchronized.
    maarzt committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    87244a5 View commit details
    Browse the repository at this point in the history
  5. WIP

    maarzt committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    34994a6 View commit details
    Browse the repository at this point in the history
  6. GrowableTree: some renamings

    maarzt committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    bc2b8f2 View commit details
    Browse the repository at this point in the history
  7. Make GrowableTree thread safe

    maarzt committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    d4e2def View commit details
    Browse the repository at this point in the history
  8. Add read benchmark

    maarzt committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    820ea7a View commit details
    Browse the repository at this point in the history
  9. Remove ReentrantReadWriteLock

    This has a huge performance improvement for cuncurrent reading.
    maarzt committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    6dfc807 View commit details
    Browse the repository at this point in the history