Edge

case class Edge[V](from: V, to: V, weight: Double)

A simple generic edge class. Can represent either a directed or an undirected edge, and so has both from / to vertex parameters, as well as u and v value members for easy disambiguation.

Value parameters:
from

the source vertex

to

the destination vertex

u

alias for from

v

alias for to

weight

the cost of traveling along this edge, defaults to 1 if not provided

trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def @@(w: Double): Edge[V]
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Returns:

a string representation of the object.

Definition Classes
Any

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product

Concrete fields

lazy val reverse: Edge[V]
val u: V
val v: V