WeightedGraphImpl

org.encalmo.data.Graph.WeightedGraphImpl
final class WeightedGraphImpl[N, V](val nodes: Traversable[N], val adjacent: N => Traversable[N], val weight: (N, N) => V)(using evidence$1: Numeric[V]) extends GenericGraph[N], Weighted[N, V]

Weighted graph implementation created from a nodes collection, an adjacent nodes function, and a weight function.

Attributes

Graph
Supertypes
trait Weighted[N, V]
trait GenericGraph[N]
trait Graph[N]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def hasAdjacent(node: N): Boolean

Whether the node has any adjacent nodes.

Whether the node has any adjacent nodes.

Attributes

Definition Classes

Inherited methods

override def contains(node: N): Boolean

Whether the graph contains the node.

Whether the graph contains the node.

Attributes

Definition Classes
Inherited from:
GenericGraph
override def edges: Traversable[(N, N)]

The edges in the graph.

The edges in the graph.

Attributes

Definition Classes
Inherited from:
GenericGraph
override def edgesCount: Long

The number of edges in the graph.

The number of edges in the graph.

Attributes

Definition Classes
Inherited from:
GenericGraph
override def nodesCount: Int

The number of nodes in the graph.

The number of nodes in the graph.

Attributes

Definition Classes
Inherited from:
GenericGraph
override def reverse: Graph[N]

The reverse of the graph.

The reverse of the graph.

Attributes

Definition Classes
Inherited from:
GenericGraph

Concrete fields

val adjacent: N => Traversable[N]

The adjacent nodes for each node.

The adjacent nodes for each node.

Attributes

val nodes: Traversable[N]

The nodes in the graph.

The nodes in the graph.

Attributes

val weight: (N, N) => V

The weight of the edge between two nodes.

The weight of the edge between two nodes.

Attributes