DefaultGraphImpl

scalax.collection.mutable.DefaultGraphImpl$
See theDefaultGraphImpl companion class
object DefaultGraphImpl extends MutableFactory[[N, E <: Edge[N]] =>> DefaultGraphImpl[N, E]]

Attributes

Companion
class
Graph
Supertypes
trait MutableFactory[[N, E <: Edge[N]] =>> DefaultGraphImpl[N, E]]
trait GenericGraphCoreFactory[[N, E <: Edge[N]] =>> DefaultGraphImpl[N, E]]
trait GenericGraphFactory[[N, E <: Edge[N]] =>> DefaultGraphImpl[N, E]]
trait Factory[[N, E <: Edge[N]] =>> DefaultGraphImpl[N, E]]
class Object
trait Matchable
class Any
Show all
Self type

Members list

Value members

Concrete methods

def empty[N, E <: Edge[N]](implicit config: GraphConfig): DefaultGraphImpl[N, E]

Creates an empty Graph instance.

Creates an empty Graph instance.

Attributes

override def from[N, E <: Edge[N]](nodes: Iterable[N], edges: Iterable[E])(implicit config: GraphConfig): DefaultGraphImpl[N, E]

Produces a graph with a node set containing all nodes and edge ends in edges and with an edge set containing all edges but duplicates. Duplicate exclusion takes place on the basis of values returned by hashCode of the supplied nodes and edges. The hash-code value of an edge is determined by its ends and optionally by other edge components such as weight or label. To include non-node edge components in the hash-code of an edge make use of any of the predefined key-weighted/key-labeled edges or mix ExtendedKey into your custom edge class.

Produces a graph with a node set containing all nodes and edge ends in edges and with an edge set containing all edges but duplicates. Duplicate exclusion takes place on the basis of values returned by hashCode of the supplied nodes and edges. The hash-code value of an edge is determined by its ends and optionally by other edge components such as weight or label. To include non-node edge components in the hash-code of an edge make use of any of the predefined key-weighted/key-labeled edges or mix ExtendedKey into your custom edge class.

Value parameters

edges

all edges to be included in the edge set of the graph to be created. Edge ends will be added to the node set automatically.

nodes

the isolated and optionally any other non-isolated nodes to be included in the node set of the graph to be created.

Attributes

Returns

A new graph instance containing nodes and all edge ends and edges.

Definition Classes
override def from[N, E <: (Edge)](edges: Iterable[E[N]]): DefaultGraphImpl[N, E[N]]

Attributes

Definition Classes

Inherited methods

def apply[N, E <: (Edge)](elems: OuterElem[N, E[N]]*)(implicit config: GraphConfig): CC[N, E[N]]

Creates a Graph with a node set built from all nodes in elems including edge ends and with an edge set containing all edges in elems. Duplicate exclusion takes place on the basis of values returned by hashCode of the supplied nodes and edges. The hash-code value of an edge is determined by its ends and optionally by other edge components such as weight or label. To include non-node edge components in the hash-code of an edge make use of any of the predefined key-weighted/key-labeled edges or mix ExtendedKey into your custom edge class.

Creates a Graph with a node set built from all nodes in elems including edge ends and with an edge set containing all edges in elems. Duplicate exclusion takes place on the basis of values returned by hashCode of the supplied nodes and edges. The hash-code value of an edge is determined by its ends and optionally by other edge components such as weight or label. To include non-node edge components in the hash-code of an edge make use of any of the predefined key-weighted/key-labeled edges or mix ExtendedKey into your custom edge class.

Value parameters

elems

sequence of nodes and/or edges in an arbitrary order

Attributes

Returns

A new graph instance containing the nodes and edges derived from elems.

Inherited from:
GenericGraphFactory

Attributes

Inherited from:
Factory

Attributes

Inherited from:
DefaultConfig (hidden)
def fill[N, E <: Edge[N]](nr: Int)(elem: => OuterElem[N, E])(implicit config: GraphConfig): CC[N, E]

Produces a graph containing the results of some element computation a number of times. Duplicate exclusion takes place on the basis of values returned by hashCode of the supplied nodes and edges. The hash-code value of an edge is determined by its ends and optionally by other edge components such as weight or label. To include non-node edge components in the hash-code of an edge make use of any of the predefined key-weighted/key-labeled edges or mix ExtendedKey into your custom edge class.

Produces a graph containing the results of some element computation a number of times. Duplicate exclusion takes place on the basis of values returned by hashCode of the supplied nodes and edges. The hash-code value of an edge is determined by its ends and optionally by other edge components such as weight or label. To include non-node edge components in the hash-code of an edge make use of any of the predefined key-weighted/key-labeled edges or mix ExtendedKey into your custom edge class.

Value parameters

elem

the element computation returning nodes or edges nr times.

nr

the number of elements to be contained in the graph.

Attributes

Returns

A graph that contains the results of nr evaluations of elem.

Inherited from:
GenericGraphFactory
override def newBuilder[N, E <: Edge[N]](implicit config: GraphConfig): Builder[N, E, CC]

Attributes

Definition Classes
Inherited from:
MutableFactory