Packages

trait SkipOctree[T <: Exec[T], P, H, A] extends Mutable[T]

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
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SkipOctree
  2. Mutable
  3. Disposable
  4. Writable
  5. Identified
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

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

    Adds an element to the tree.

    Adds an element to the tree. If there is already an element stored at the point represented by the new element, it will be replaced.

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

    Removes an element from the tree.

    Removes an element from the tree. If the element is not found, this operation does nothing.

  3. abstract def add(elem: A)(implicit tx: T): 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: T): Unit
  5. abstract def contains(elem: A)(implicit tx: T): Boolean

    Tests whether the tree contains an element.

  6. abstract def debugPrint()(implicit tx: T): String

    Returns a string debug representation of the octree.

  7. abstract def dispose()(implicit tx: T): Unit
    Definition Classes
    Disposable
  8. abstract def get(point: P)(implicit tx: T): Option[A]

    Queries the element at a given point.

    Queries the element at a given point.

    point

    the point to look up.

    returns

    Some element if found, None if the point was not present.

  9. abstract def hyperCube: H

    The base square of the tree.

    The base square of the tree. No point can lie outside this square (or hyper-cube).

  10. abstract def id: Ident[T]
    Definition Classes
    Identified
  11. abstract def isDefinedAt(point: P)(implicit tx: T): Boolean

    Queries whether an element is stored at a given point.

    Queries whether an element is stored at a given point.

    point

    the point to query

    returns

    true if an element is associated with the query point, false otherwise

  12. abstract def isEmpty(implicit tx: T): Boolean

    Tests whether the tree is empty (true) or whether it contains any elements (false).

  13. abstract def iterator(implicit tx: T): Iterator[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.

  14. abstract def nearestNeighbor[M](point: P, metric: DistanceMeasure[M, P, H])(implicit tx: T): 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 IntSquare(0x40000000, 0x40000000, 0x40000000), this happens for example for any point going more towards north-west than IntPoint2DLike(-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

  15. abstract def nearestNeighborOption[M](point: P, metric: DistanceMeasure[M, P, H])(implicit tx: T): Option[A]

    Same as nearestNeighbor but returning an Option, thus not throwing an exception if no neighbor is found.

  16. abstract def numLevels(implicit tx: T): Int

    Reports the number of decimation levels in the tree.

  17. 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().

  18. abstract def pointView: (A, T) => P

    A function which maps an element (possibly through transactional access) to a geometric point coordinate.

  19. abstract def rangeQuery[Area](qs: QueryShape[Area, P, H])(implicit tx: T): Iterator[A]
  20. abstract def remove(elem: A)(implicit tx: T): 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.

  21. abstract def removeAt(point: P)(implicit tx: T): 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.

  22. abstract def size(implicit tx: T): 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.

  23. abstract def space: Space[P, H]

    The space (i.e., resolution and dimensionality) underlying the tree.

  24. abstract def toIndexedSeq(implicit tx: T): 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.

  25. abstract def toList(implicit tx: T): 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.

  26. abstract def toSeq(implicit tx: T): 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.

  27. abstract def toSet(implicit tx: T): 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.

  28. abstract def transformAt(point: P)(fun: (Option[A]) => Option[A])(implicit tx: T): Option[A]

    Looks up a point and applies a transformation to the entry associated with it.

    Looks up a point and applies a transformation to the entry associated with it. This can be used to update an element in-place, or used for maintaining a spatial multi-map.

    point

    the location at which to perform the transformation

    fun

    a function to transform the element found, or generate a new element. The argument is the element previously stored with the point, or None if no element is found. The result is expected to be Some new element to be stored, or None if no element is to be stored (in this case, if an element was previously stored, it is removed)

    returns

    the previously stored element (if any)

  29. abstract def update(elem: A)(implicit tx: T): 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

  30. abstract def write(out: DataOutput): Unit
    Definition Classes
    Writable

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(that: Any): Boolean
    Definition Classes
    Identified → AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    Identified → AnyRef → Any
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Mutable[T]

Inherited from Disposable[T]

Inherited from Writable

Inherited from Identified[T]

Inherited from AnyRef

Inherited from Any

Ungrouped