de.sciss.collection.txn

SkipOctree

trait SkipOctree[S <: Sys[S], D <: Space[D], A] extends Writer with Disposable[Tx]

A SkipOctree is a multi-dimensional data structure that maps coordinates to values. It extends the interface of scala's mutable Map and adds further operations such as range requires and nearest neighbour search.

Linear Supertypes
Disposable[Tx], Writer, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. SkipOctree
  2. Disposable
  3. Writer
  4. AnyRef
  5. Any
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def +=(elem: A)(implicit tx: Tx): SkipOctree.this.type

  2. abstract def -=(elem: A)(implicit tx: Tx): SkipOctree.this.type

  3. abstract def add(elem: A)(implicit tx: Tx): Boolean

    Adds an element to the tree (or replaces a given element with the same point location).

    Adds an element to the tree (or replaces a given element with the same point location).

    elem

    the element to add

    returns

    true if the element is new in the tree. If a previous entry with the same point view is overwritten, this is true if the elements were not equal, false if they were equal

  4. abstract def clear()(implicit tx: Tx): Unit

  5. abstract def contains(elem: A)(implicit tx: Tx): Boolean

  6. abstract def dispose()(implicit tx: Tx): Unit

    Definition Classes
    Disposable
  7. abstract def get(point: PointLike)(implicit tx: Tx): Option[A]

  8. abstract def hyperCube: HyperCube

  9. abstract def id: ID

  10. abstract def isDefinedAt(point: PointLike)(implicit tx: Tx): Boolean

  11. abstract def isEmpty(implicit tx: Tx): Boolean

  12. abstract def iterator(implicit tx: Tx): Iterator[Tx, A]

    An Iterator which iterates over the points stored in the octree, using an in-order traversal directed by the orthant indices of the nodes of the tree.

    An Iterator which iterates over the points stored in the octree, using an in-order traversal directed by the orthant indices of the nodes of the tree.

    Great care has to be taken as the iterator might be corrupted if the tree is successively changed before the iterator is exhausted.

  13. abstract def nearestNeighbor[M](point: PointLike, metric: DistanceMeasure[M, D])(implicit tx: Tx): A

    Reports the nearest neighbor entry with respect to a given point.

    Reports the nearest neighbor entry with respect to a given point.

    Note: There is a potential numeric overflow if the squared distance of the query point towards the furthest corner of the tree's root hyper-cube exceeds 63 bits. For a root Square( 0x40000000, 0x40000000, 0x40000000 ), this happens for example for any point going more towards north-west than Point2DLike( -1572067139, -1572067139 ).

    point

    the point of which the nearest neighbor is to be found

    metric

    (description missing)

    Exceptions thrown
    NoSuchElementException

    if the tree is empty

  14. abstract def nearestNeighborOption[M](point: PointLike, metric: DistanceMeasure[M, D])(implicit tx: Tx): Option[A]

  15. abstract def numLevels(implicit tx: Tx): Int

  16. abstract def numOrthants: Int

    The number of orthants in each hyperCube.

    The number of orthants in each hyperCube. This is equal to 1 << numDimensions and gives the upper bound of the index to QNode.child().

  17. abstract def pointView: (A, Tx) ⇒ PointLike

  18. abstract def rangeQuery[Area](qs: QueryShape[Area, D])(implicit tx: Tx): Iterator[Tx, A]

  19. abstract def remove(elem: A)(implicit tx: Tx): Boolean

    Removes an element from the tree

    Removes an element from the tree

    elem

    the element to remove

    returns

    true if the element had been found in the tree and thus been removed.

  20. abstract def removeAt(point: PointLike)(implicit tx: Tx): Option[A]

    Removes the element stored under a given point view.

    Removes the element stored under a given point view.

    point

    the location of the element to remove

    returns

    the element removed, wrapped as Some, or None if no element was found for the given point.

  21. abstract def size(implicit tx: Tx): Int

    Queries the number of leaves in the tree.

    Queries the number of leaves in the tree. This may be a very costly action, so it is recommended to only use it for debugging purposes.

  22. abstract def space: D

  23. abstract def toIndexedSeq(implicit tx: Tx): IndexedSeq[A]

    Converts the tree into a linearized indexed sequence.

    Converts the tree into a linearized indexed sequence. This is not necessarily a very efficient method, and should usually just be used for debugging.

  24. abstract def toList(implicit tx: Tx): List[A]

    Converts the tree into a linearized list.

    Converts the tree into a linearized list. This is not necessarily a very efficient method, and should usually just be used for debugging.

  25. abstract def toSeq(implicit tx: Tx): Seq[A]

    Converts the tree into a linearized sequence.

    Converts the tree into a linearized sequence. This is not necessarily a very efficient method, and should usually just be used for debugging. To avoid surprises, this does not call iterator.toSeq because that would produce a Stream and thus subject to further changes to the tree while traversing. The returned seq instead is 'forced' and thus stable.

  26. abstract def toSet(implicit tx: Tx): Set[A]

    Converts the tree into a non-transactional set.

    Converts the tree into a non-transactional set. This is not necessarily a very efficient method, and should usually just be used for debugging.

  27. abstract def update(elem: A)(implicit tx: Tx): Option[A]

    Adds an element to the tree (or replaces a given element with the same point location).

    Adds an element to the tree (or replaces a given element with the same point location).

    elem

    the element to add to the tree

    returns

    the old element stored for the same point view, if it existed

  28. abstract def write(out: DataOutput): Unit

    Definition Classes
    Writer

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  18. def toString(): String

    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  20. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  21. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Disposable[Tx]

Inherited from Writer

Inherited from AnyRef

Inherited from Any