class Graph[N] extends AnyRef
Represents an immutable directed graph where nodes are elements of N: (source node) -> (id of source node, set of neighbors)
- Alphabetic
- By Inheritance
- Graph
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Graph(nodeIdNeighbors: Map[N, (Int, Set[N])])(implicit arg0: ClassTag[N])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Graph[N], B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addEdges(edges: Map[N, Set[N]]): Graph[N]
Returns a graph with edges added.
Returns a graph with edges added. All not existing nodes are also added.
-
def
addEdges(nodeSrc: N, nodesDest: Set[N]): Graph[N]
Returns a graph with a set of edges added from the same node.
Returns a graph with a set of edges added from the same node. All not existing nodes are also added.
-
def
addNode(node: N): Graph[N]
Returns a graph with node added.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
- def ensuring(cond: (Graph[N]) ⇒ Boolean, msg: ⇒ Any): Graph[N]
- def ensuring(cond: (Graph[N]) ⇒ Boolean): Graph[N]
- def ensuring(cond: Boolean, msg: ⇒ Any): Graph[N]
- def ensuring(cond: Boolean): Graph[N]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
info: GraphInfo
Calculates and returns information about the graph.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
neighbors(node: N): Set[N]
Returns the set of all neighbors of existing node.
-
def
neighborsId(node: N): Set[Int]
Returns a set of all neighbors id of existing node.
-
def
nodeById(id: Int): Option[N]
Returns the node corresponding to id.
-
def
nodeId(node: N): Int
Returns the id of existing node.
- val nodeIdNeighbors: Map[N, (Int, Set[N])]
-
def
nodesArray: Array[N]
Returns an array of all nodes.
Returns an array of all nodes. The index of each corresponding to their ids.
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
size: Int
Returns the number of nodes.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def →[B](y: B): (Graph[N], B)