GenericGraphFactory

scalax.collection.generic.GenericGraphFactory
trait GenericGraphFactory[+CC <: ([N, E <: Edge[N]] =>> AnyGraph[N, E] & GraphLike[N, E, CC])] extends Factory[CC]

Attributes

Graph
Supertypes
trait Factory[CC]
class Object
trait Matchable
class Any
Known subtypes
trait ImmutableFactory[CC]
object DefaultGraphImpl.type
object Graph.type
trait MutableFactory[CC]
object DefaultGraphImpl.type
object Graph.type
Show all

Members list

Value members

Abstract methods

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

Creates an empty Graph instance.

Creates an empty Graph instance.

Attributes

def from[N, E <: (Edge)](edges: Iterable[E[N]]): CC[N, E[N]]
def from[N, E <: Edge[N]](nodes: Iterable[N], edges: Iterable[E])(implicit config: GraphConfig): CC[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.

Concrete 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.

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 methods

Attributes

Inherited from:
Factory

The default configuration to be used in absence of a user-supplied configuration.

The default configuration to be used in absence of a user-supplied configuration.

Attributes

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

Attributes

Inherited from:
Factory