co.teapot.tempest.graph

MemMappedDynamicUnidirectionalGraph

Related Docs: object MemMappedDynamicUnidirectionalGraph | package graph

class MemMappedDynamicUnidirectionalGraph extends AnyRef

A graph which stores the neighbors of each node in only one direction. As a result of a call to addEdge(u, v), neighbors(u) will contain v, but neighbors(v) won't contain u.

Parameter dataPointerPointer is a pointer to a Long value in allocator.data which this class uses to store the pointer to its data. If initializeNewGraph is true, it ignores the current value at dataPointerPointer and sets it to a new allocation; else it reads the data at dataPointerPointer to open an existing graph.

Currently does not keep track of which nodes exist, but assumes all nodes between 0 and maxNodeId exist.

Supports up to 2**32 nodes by using Integer.toUnsignedLong to interpret negative node ids as positive integers.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MemMappedDynamicUnidirectionalGraph
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MemMappedDynamicUnidirectionalGraph(allocator: MemoryMappedAllocator, dataPointerPointer: Long, initializeNewGraph: Boolean, msDelayFreeingAllocations: Long = 1000 * 60)

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. def addEdge(id1: Int, id2: Int): Unit

    Appends id2 to the neighbors of id1.

  5. def addEdges(id1s: Seq[Int], id2s: Seq[Int]): Unit

  6. var allocationsToFree: LongArrayList

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def dataPointer: Long

  10. def degree(id: Int): Int

  11. def ensureValidId(id: Long): Unit

    Increases maxNodeId to be at least id, and extends the node data array if needed to ensure the given id is a valid id.

  12. final def eq(arg0: AnyRef): Boolean

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

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

    Definition Classes
    MemMappedDynamicUnidirectionalGraph → AnyRef
  15. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  18. val log: Logger

  19. def maxNodeId: Int

  20. def maxNodeIdLong: Long

  21. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. def neighbors(id: Int): IndexedSeq[Int]

  23. final def notify(): Unit

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

    Definition Classes
    AnyRef
  25. var previousAllocationsToFree: LongArrayList

  26. def setCapacity(id: Int, newCapacity: Int): Unit

    Ensures the given id has space for newCapacity neighbors by allocating a new neighbor area.

    Ensures the given id has space for newCapacity neighbors by allocating a new neighbor area. This method doesn't need to be called by clients, but it can be called to improve performance if the client is going to add many new neighbors to the given node id.

  27. def setupAllocationFreeingThread(): Unit

  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  29. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped