GraphOps

scalax.collection.mutable.GraphOps
trait GraphOps[N, E <: Edge[N], +CC <: ([X, Y <: Edge[X]] =>> GraphLike[X, Y, CC] & Graph[X, Y])] extends Growable[N, E], Shrinkable[N, E], AbstractBuilder[N, E], Cloneable[CC[N, E]]

Attributes

Graph
Supertypes
trait Cloneable[CC[N, E]]
trait Cloneable
trait AbstractBuilder[N, E]
trait Shrinkable[N, E]
trait OuterElems[N, E]
trait Growable[N, E]
class Object
trait Matchable
class Any
Show all
Known subtypes
trait GraphLike[N, E, CC]
trait AdjacencyListGraph[N, E, CC]
class DefaultGraphImpl[N, E]
trait Graph[N, E]
Self type
GraphOps[N, E, CC]

Members list

Type members

Inherited classlikes

sealed case class OuterEdge(edge: E) extends OuterElem

To be mixed in by edge classes to allow passing them to Graph(...).

To be mixed in by edge classes to allow passing them to Graph(...).

Attributes

Inherited from:
OuterElems
Supertypes
trait Serializable
trait Product
trait Equals
trait OuterElem
class Object
trait Matchable
class Any
Show all
trait OuterElem

Attributes

Inherited from:
OuterElems
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class OuterEdge
class OuterNode
sealed case class OuterNode(node: N) extends OuterElem

Wraps any type to be accepted when calling Graph(...).

Wraps any type to be accepted when calling Graph(...).

Attributes

Inherited from:
OuterElems
Supertypes
trait Serializable
trait Product
trait Equals
trait OuterElem
class Object
trait Matchable
class Any
Show all

Value members

Abstract methods

def add(node: N): Boolean

Adds a single node to this graph.

Adds a single node to this graph.

Attributes

Returns

true if this graph has not contained node before.

def add(edge: E): Boolean

Adds a single edge to this graph.

Adds a single edge to this graph.

Attributes

Returns

true if this graph has not contained edge before.

def filterInPlace(fNode: <none>, fEdge: <none>): GraphOps.this.type

Computes a new graph with nodes satisfying fNode and edges satisfying fEdge. If both fNode and fEdge have default values the original graph is retained.

Computes a new graph with nodes satisfying fNode and edges satisfying fEdge. If both fNode and fEdge have default values the original graph is retained.

Attributes

Concrete methods

final def &=(that: AnyGraph[N, E]): GraphOps.this.type

Alias for intersectInPlace.

Alias for intersectInPlace.

Attributes

final def intersectInPlace(that: AnyGraph[N, E]): GraphOps.this.type

Shrinks this graph to its intersection with that graph.

Shrinks this graph to its intersection with that graph.

Attributes

final def unionInPlace(that: AnyGraph[N, E]): GraphOps.this.type

Adds all elements in other to this Growable.

Adds all elements in other to this Growable.

Attributes

final def |=(that: AnyGraph[N, E]): GraphOps.this.type

Alias for unionInPlace.

Alias for unionInPlace.

Attributes

Inherited methods

def ++=(nodes: Iterable[N], edges: Iterable[E]): Growable.this.type

Adds all passed nodes and edges to this graph. For a mutable Graph see also unionInPlace.

Adds all passed nodes and edges to this graph. For a mutable Graph see also unionInPlace.

Attributes

Inherited from:
Growable
def ++=(xs: Iterable[OuterElem[N, E]]): Growable.this.type

Alias for addAll(xs).

Alias for addAll(xs).

Attributes

Inherited from:
Growable
final def +=(edge: E): Growable.this.type

Alias for addOne(edge).

Alias for addOne(edge).

Attributes

Inherited from:
Growable
final def +=(node: N): Growable.this.type

Alias for addOne(node).

Alias for addOne(node).

Attributes

Inherited from:
Growable
final def --=(that: AnyGraph[N, E]): Shrinkable.this.type

Alias for diffInPlace.

Alias for diffInPlace.

Attributes

Inherited from:
Shrinkable
final def --=(edges: IterableOnce[E]): Shrinkable.this.type

Alias for removeAll(edges).

Alias for removeAll(edges).

Attributes

Inherited from:
Shrinkable
final def --=(nodes: IterableOnce[N], edges: IterableOnce[E]): Shrinkable.this.type

Alias for removeAll(nodes, edges).

Alias for removeAll(nodes, edges).

Attributes

Inherited from:
Shrinkable
final def -=(edge: E): Shrinkable.this.type

Alias for subtractOne(node).

Alias for subtractOne(node).

Attributes

Inherited from:
Shrinkable
final def -=(node: N): Shrinkable.this.type

Alias for subtractOne(node).

Alias for subtractOne(node).

Attributes

Inherited from:
Shrinkable
def addAll(xs: Iterable[OuterElem[N, E]]): Growable.this.type

Adds all elements produced by outer to this graph. For a graph see also unionInPlace.

Adds all elements produced by outer to this graph. For a graph see also unionInPlace.

Attributes

Inherited from:
Growable
def addOne(edge: E): Growable.this.type

Adds a single node to this graph.

Adds a single node to this graph.

Attributes

Inherited from:
Growable
def addOne(node: N): Growable.this.type

Adds a single node to this graph.

Adds a single node to this graph.

Attributes

Inherited from:
Growable
def clear(): Unit

Attributes

Inherited from:
AbstractBuilder
override def clone(): C

Create a copy of the receiver object.

Create a copy of the receiver object.

The default implementation of the clone method is platform dependent.

Attributes

Returns

a copy of the receiver object.

Note

not specified by SLS as a member of AnyRef

Definition Classes
Cloneable -> Object
Inherited from:
Cloneable
final def diffInPlace(that: AnyGraph[N, E]): Shrinkable.this.type

Removes all nodes and edges contained in that graph from this graph.

Removes all nodes and edges contained in that graph from this graph.

Attributes

Inherited from:
Shrinkable
def remove(edge: E): Boolean

Removes a single edge from this graph.

Removes a single edge from this graph.

Attributes

Returns

whether the edge existed before

Inherited from:
Shrinkable
def remove(node: N): Boolean

Removes a single node from this graph.

Removes a single node from this graph.

Attributes

Returns

whether the node existed before.

Inherited from:
Shrinkable
final def removeAll(edges: IterableOnce[E]): Shrinkable.this.type

Removes all edges from this graph.

Removes all edges from this graph.

Attributes

Inherited from:
Shrinkable
final def removeAll(nodes: IterableOnce[N], edges: IterableOnce[E]): Shrinkable.this.type

Removes all nodes and edges from this graph.

Removes all nodes and edges from this graph.

Attributes

Inherited from:
Shrinkable

Attributes

Inherited from:
Cloneable
def subtractOne(edge: E): Shrinkable.this.type

Removes a single edge from this graph.

Removes a single edge from this graph.

Attributes

Inherited from:
Shrinkable
def subtractOne(node: N): Shrinkable.this.type

Removes a single node from this graph.

Removes a single node from this graph.

Attributes

Inherited from:
Shrinkable
def upsert(edge: E): Boolean

If an inner edge equaling to edge is present in this graph, it is replaced by edge, otherwise edge will be inserted. This is useful if non-key parts of an immutable edge are to be modified.

If an inner edge equaling to edge is present in this graph, it is replaced by edge, otherwise edge will be inserted. This is useful if non-key parts of an immutable edge are to be modified.

Attributes

Returns

true if edge has been inserted, false if it has been replaced.

Inherited from:
AbstractBuilder