class GraphDFS[TLabel] extends AnyRef
The GraphDFS
performs Depth First Search (DFS) or Breadth First Search (BFS)
on a Directed Graph. The class currently supports three predicates:
(1) to find a matching label, and
(2) to see if a destination vertex is reachable.
- Alphabetic
- By Inheritance
- GraphDFS
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
find(_lab: TLabel): Int
Find the label 'lab' in 'this' graph, returning the first vertex id with a matching label, or -1 if vertex is not found.
Find the label 'lab' in 'this' graph, returning the first vertex id with a matching label, or -1 if vertex is not found.
- _lab
the label to search for
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def pred1(j: Int): Boolean
- def pred2(j: Int): Boolean
-
def
reach(src: Int, _dest: Int): Boolean
Determine whether vertex '_dest' is reachable from 'src', i.e., there is a directed path from vertex 'src' to '_dest'.
Determine whether vertex '_dest' is reachable from 'src', i.e., there is a directed path from vertex 'src' to '_dest'.
- src
the source/starting vertex
- _dest
the destination/ending vertex
-
def
strongComps: Int
Count the number of strongly connected components in the graph.
Count the number of strongly connected components in the graph. In a strongly connected component, 'reach (u, v)' is always true.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
visit(): Unit
Visit vertices in DFS/BFS order accessing children and parents (as if it is an undirected graph).
-
def
visit(pred: (Int) ⇒ Boolean): Int
Visit vertices in DFS/BFS order, returning the id of the first vertex satisfying the predicate 'pred', or -1 if vertex is not found.
Visit vertices in DFS/BFS order, returning the id of the first vertex satisfying the predicate 'pred', or -1 if vertex is not found.
- pred
the predicate to satisfy
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
weakComps: Int
Count the number of weakly connected components in the graph.
Count the number of weakly connected components in the graph. In a weakly connected component, the vertices in the underlying undirected graph are connected.