Graph

org.encalmo.data.Graph
See theGraph companion object
trait Graph[N]

Base abstraction of the graph.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait GenericGraph[N]
class GenericGraphImpl[N]
class WeightedGraphImpl[N, V]
class MapGraph[N]
class IntMapGraph
class MutableMapGraph[N]
Show all

Members list

Value members

Abstract methods

def adjacent: N => Traversable[N]
def contains(node: N): Boolean
def edges: Traversable[(N, N)]
def hasAdjacent(node: N): Boolean
def nodes: Traversable[N]
def reverse: Graph[N]

Concrete methods

def bfs(visitor: N => Unit): Unit
Extension method from Graph

Breath-first search of the whole graph

Breath-first search of the whole graph

Attributes

def bfs(node: N, visitor: N => Unit, explored: HashSet[N]): Unit
Extension method from Graph

Breath-first search of the graph starting at given node

Breath-first search of the graph starting at given node

Attributes

inline def dfs(visitor: DfsVisitor[N]): Unit
Extension method from Graph

Depth-first search of the whole graph

Depth-first search of the whole graph

Attributes

def dfs(visitor: DfsVisitor[N], nodes: Traversable[N]): Unit
Extension method from Graph

Depth-first search of the whole graph in the given node's order

Depth-first search of the whole graph in the given node's order

Attributes

def dfs(node: N, visitor: DfsVisitor[N], explored: HashSet[N]): Unit
Extension method from Graph

Depth-first search (recursive) of the graph starting at given node

Depth-first search (recursive) of the graph starting at given node

Attributes

def dfsi(source: N, visitor: DfsVisitor[N], explored: HashSet[N]): Unit
Extension method from Graph

Depth-first search (iterative) of the graph starting at given node

Depth-first search (iterative) of the graph starting at given node

Attributes

def findCycles: Vector[N]
Extension method from Graph
def findCycles(node: N, marks: Map[N, Char]): Vector[N]
Extension method from Graph
Extension method from Graph
Extension method from Graph
def merge(graph2: Graph[N]): Graph[N]
Extension method from Graph

Merges two graphs without duplicating existing nodes

Merges two graphs without duplicating existing nodes

Attributes

def mergeNodes(mergedNode: N, removedNode: N): MutableMapGraph[N]
Extension method from Graph
Extension method from Graph

Returns a new graph containing only all the transitive predecessors and successors of the given node.

Returns a new graph containing only all the transitive predecessors and successors of the given node.

Attributes

def predecessorsAndSuccessorsOf(nodes: N*): Graph[N]
Extension method from Graph

Returns a new graph containing only all the transitive predecessors and successors of the given nodes.

Returns a new graph containing only all the transitive predecessors and successors of the given nodes.

Attributes

def predecessorsOf(node: N): Graph[N]
Extension method from Graph

Returns a new graph containing only all the transitive predecessors of the given node.

Returns a new graph containing only all the transitive predecessors of the given node.

Attributes

def predecessorsOf(nodes: N*): Graph[N]
Extension method from Graph

Returns a new graph containing only all the transitive predecessors of the given nodes.

Returns a new graph containing only all the transitive predecessors of the given nodes.

Attributes

Extension method from Graph
Extension method from Graph
Extension method from Graph
def successorsOf(node: N): Graph[N]
Extension method from Graph

Returns a new graph containing only all the transitive successors of the given node.

Returns a new graph containing only all the transitive successors of the given node.

Attributes

def successorsOf(nodes: N*): Graph[N]
Extension method from Graph

Returns a new graph containing only all the transitive successors of the given nodes.

Returns a new graph containing only all the transitive successors of the given nodes.

Attributes