case object DiGraph extends Product with Serializable
Factory for directed graphs.
- Alphabetic
- By Inheritance
- DiGraph
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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
- def apply[T, X](vertices: Set[T], edges: Set[DiEdge[Node[T]]])(implicit arg0: ClassTag[X]): DiGraph[T]
Creates a directed graph from a set of base values and a set of edges.
Creates a directed graph from a set of base values and a set of edges.
Will map base values to the Node wrapper and then construct the directed graph.
- T
The type of the directed graph vertices.
- X
A scala.reflect.ClassTag to prevent type erasure of the edges.
- vertices
The set of base values representing the vertices.
- edges
The set of edges.
- returns
A directed graph.
- def apply[T, X](edges: Set[DiEdge[Node[T]]])(implicit arg0: ClassTag[X]): DiGraph[T]
Creates a directed graph from a set of edges.
Creates a directed graph from a set of edges.
Will automatically add the vertices from the edges, without explicitly passing them to the constructor.
- T
The type of the directed graph vertices.
- X
A scala.reflect.ClassTag to prevent type erasure of the edges.
- edges
The set of edges.
- returns
A directed graph of type T.
- def apply[T](vertices: Set[Node[T]]): DiGraph[T]
Creates a directed graph without edges from a set of vertices.
Creates a directed graph without edges from a set of vertices.
- T
The type of the directed graph vertices.
- vertices
A set of vertices.
- returns
A directed graph of type T with only the vertices.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def empty[T]: DiGraph[T]
Creates an empty directed graph of type T.
Creates an empty directed graph of type T.
- T
The type of the directed graph vertices.
- returns
An empty directed graph of type T.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- 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() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def productElementName(n: Int): String
- Definition Classes
- Product
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def productIterator: Iterator[Any]
- Definition Classes
- Product
- def random(n: Int, p: Double): DiGraph[String]
Helper factory to generate a random directed graph of type java.lang.String for n vertices.
Helper factory to generate a random directed graph of type java.lang.String for n vertices.
Uses the Erdős–Rényi–Gilbert model.
- n
The number of vertices.
- p
The probability of an edge existing.
- returns
A random graph.
- def random[T](objects: Set[T], p: Double): DiGraph[T]
Generate a random directed graph.
Generate a random directed graph.
Graphs are generated according to the Erdős–Rényi–Gilbert model, which states that between each pair of objects there is a p probability of an edge existing.
- T
The type of the graph and objects.
- objects
The set of objects representing the vertices.
- p
The probability of an edge existing.
- returns
A random graph.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def uniform(n: Int, numberEdges: Int): DiGraph[String]
Helper factory to generate a random directed graph of type java.lang.String for n vertices.
Helper factory to generate a random directed graph of type java.lang.String for n vertices.
Uses the uniform model.
- n
The number of vertices.
- numberEdges
The number of edges.
- returns
A random graph.
- def uniform[T](objects: Set[T], numberEdges: Int): DiGraph[T]
Generate a random directed graph.
Generate a random directed graph.
Graphs are generated according to the uniform model, which states that given a number of fixed edges will uniformly distribute those edges between all pairs of objects. The probability of an edge existing in the final graph is the same as in the Erdős–Rényi–Gilbert model.
- T
The type of the graph and objects.
- objects
The set of objects representing the vertices.
- numberEdges
The number of edges.
- returns
A random graph.
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])