com.intel.analytics.bigdl.utils

DirectedGraph

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( 6252604964316218479L )
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
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

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

    source

    source node of the directed graph

    reverse

    use the original direction or the reversed direction

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. def BFS: Iterator[Node[T]]

    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

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

    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

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

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

    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

    returns

  11. def edges: Int

    How many edges in the graph

    How many edges in the graph

    returns

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  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. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  21. val reverse: Boolean

    use the original direction or the reversed direction

  22. def size: Int

    How many nodes in the graph

    How many nodes in the graph

    returns

  23. val source: Node[T]

    source node of the directed graph

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

    Definition Classes
    AnyRef
  25. def toString(): String

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

    Topology sort.

    Topology sort.

    returns

    A sequence of sorted graph nodes

  27. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped