Class

com.intel.analytics.bigdl.utils

DirectedGraph

Related Doc: package utils

Permalink

class DirectedGraph[T] extends Serializable

Provides useful graph operations for a directed graph.

The node connection in the graph has direction. This class stores a source node. Note that it doesn't maintain the topology. The topology of the graph is stored in the connection of the nodes.

T

Node element type

Annotations
@SerialVersionUID()
Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DirectedGraph
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DirectedGraph(source: Node[T], reverse: Boolean = false)

    Permalink

    source

    source node of the directed graph

    reverse

    use the original direction or the reversed direction

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def BFS: Iterator[Node[T]]

    Permalink

    Breadth first search on the graph.

    Breadth first search on the graph. Note that this is a directed BFS. Although eachs node contains both previous and next nodes, only one direction is used.

    returns

    An iterator to go through nodes in the graph in a BFS order

  5. def DFS: Iterator[Node[T]]

    Permalink

    Depth first search on the graph.

    Depth first search on the graph. Note that this is a directed DFS. Although eachs node contains both previous and next nodes, only one direction is used.

    returns

    An iterator to go through nodes in the graph in a DFS order

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def cloneGraph(reverseEdge: Boolean = false): DirectedGraph[T]

    Permalink

    Clone the graph structure, will not clone the node element

    Clone the graph structure, will not clone the node element

    reverseEdge

    if reverse the edge in the nodes

  9. def edges: Int

    Permalink

    How many edges in the graph

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. val reverse: Boolean

    Permalink

    use the original direction or the reversed direction

  20. def size: Int

    Permalink

    How many nodes in the graph

  21. val source: Node[T]

    Permalink

    source node of the directed graph

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

    Permalink
    Definition Classes
    AnyRef
  23. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  24. def topologySort: Array[Node[T]]

    Permalink

    Topology sort.

    Topology sort.

    returns

    A sequence of sorted graph nodes

  25. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped