trait GraphOps[N, E <: Edge[N], +CC[X, Y <: Edge[X]] <: GraphLike[X, Y, CC] with Graph[X, Y]] extends Growable[N, E] with Shrinkable[N, E] with AbstractBuilder[N, E] with Cloneable[CC[N, E]]
- Self Type
- GraphOps[N, E, CC] with collection.GraphOps[N, E, CC]
- Alphabetic
- By Inheritance
- GraphOps
- Cloneable
- Cloneable
- AbstractBuilder
- Shrinkable
- OuterElems
- Growable
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed case class OuterEdge(edge: E) extends OuterElem with Product with Serializable
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(...)
.- Definition Classes
- OuterElems
- trait OuterElem extends AnyRef
- Definition Classes
- OuterElems
- sealed case class OuterNode(node: N) extends OuterElem with Product with Serializable
Wraps any type to be accepted when calling
Graph(...)
.Wraps any type to be accepted when calling
Graph(...)
.- Definition Classes
- OuterElems
Abstract Value Members
- abstract def add(edge: E): Boolean
Adds a single edge to this graph.
- abstract def add(node: N): Boolean
Adds a single node to this graph.
- abstract def clear(): Unit
- Definition Classes
- AbstractBuilder
- abstract def filterInPlace(fNode: (GraphOps.this)#NodePredicate = anyNode, fEdge: (GraphOps.this)#EdgePredicate = anyEdge): GraphOps.this
Computes a new graph with nodes satisfying
fNode
and edges satisfyingfEdge
.Computes a new graph with nodes satisfying
fNode
and edges satisfyingfEdge
. If bothfNode
andfEdge
have default values the original graph is retained. - abstract def remove(edge: E): Boolean
Removes a single edge from this graph.
Removes a single edge from this graph.
- returns
whether the edge existed before
- Definition Classes
- Shrinkable
- abstract def remove(node: N): Boolean
Removes a single node from this graph.
Removes a single node from this graph.
- returns
whether the node existed before.
- Definition Classes
- Shrinkable
- abstract def subtractOne(edge: E): GraphOps.this
Removes a single edge from this graph.
Removes a single edge from this graph.
- Definition Classes
- Shrinkable
- abstract def subtractOne(node: N): GraphOps.this
Removes a single node from this graph.
Removes a single node from this graph.
- Definition Classes
- Shrinkable
- abstract def upsert(edge: E): Boolean
If an inner edge equaling to
edge
is present in this graph, it is replaced byedge
, otherwiseedge
will be inserted.If an inner edge equaling to
edge
is present in this graph, it is replaced byedge
, otherwiseedge
will be inserted. This is useful if non-key parts of an immutable edge are to be modified.- returns
true
ifedge
has been inserted,false
if it has been replaced.
- Definition Classes
- AbstractBuilder
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def &=(that: AnyGraph[N, E]): GraphOps.this
Alias for
intersectInPlace
.Alias for
intersectInPlace
.- Annotations
- @inline()
- def +(other: String): String
- def ++=(nodes: Iterable[N] = Nil, edges: Iterable[E] = Nil): GraphOps.this
Adds all passed nodes and edges to this graph.
Adds all passed nodes and edges to this graph. For a mutable Graph see also
unionInPlace
.- Definition Classes
- Growable
- def ++=(xs: Iterable[collection.OuterElem[N, E]]): GraphOps.this
Alias for
addAll(xs)
.Alias for
addAll(xs)
.- Definition Classes
- Growable
- final def +=(edge: E): GraphOps.this
Alias for
addOne(edge)
.Alias for
addOne(edge)
.- Definition Classes
- Growable
- Annotations
- @inline()
- final def +=(node: N): GraphOps.this
Alias for
addOne(node)
.Alias for
addOne(node)
.- Definition Classes
- Growable
- Annotations
- @inline()
- final def --=(that: AnyGraph[N, E]): GraphOps.this
Alias for
diffInPlace
.Alias for
diffInPlace
.- Definition Classes
- Shrinkable
- Annotations
- @inline()
- final def --=(edges: IterableOnce[E]): GraphOps.this
Alias for
removeAll(edges)
.Alias for
removeAll(edges)
.- Definition Classes
- Shrinkable
- Annotations
- @inline()
- final def --=(nodes: IterableOnce[N], edges: IterableOnce[E]): GraphOps.this
Alias for
removeAll(nodes, edges)
.Alias for
removeAll(nodes, edges)
.- Definition Classes
- Shrinkable
- Annotations
- @inline()
- final def -=(edge: E): GraphOps.this
Alias for
subtractOne(node)
.Alias for
subtractOne(node)
.- Definition Classes
- Shrinkable
- Annotations
- @inline()
- final def -=(node: N): GraphOps.this
Alias for
subtractOne(node)
.Alias for
subtractOne(node)
.- Definition Classes
- Shrinkable
- Annotations
- @inline()
- def ->[B](y: B): (GraphOps[N, E, CC], B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addAll(xs: Iterable[collection.OuterElem[N, E]]): GraphOps.this
Adds all elements produced by
outer
to this graph.Adds all elements produced by
outer
to this graph. For a graph see alsounionInPlace
.- Definition Classes
- Growable
- def addOne(edge: E): GraphOps.this
Adds a single node to this graph.
Adds a single node to this graph.
- Definition Classes
- Growable
- def addOne(node: N): GraphOps.this
Adds a single node to this graph.
Adds a single node to this graph.
- Definition Classes
- Growable
- final def addOuter(elem: collection.OuterElem[N, E]): GraphOps.this
Adds a single outer element to this graph.
Adds a single outer element to this graph.
- Attributes
- protected[collection]
- Definition Classes
- Growable
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): CC[N, E]
- Definition Classes
- Cloneable → AnyRef
- final def diffInPlace(that: AnyGraph[N, E]): GraphOps.this
Removes all nodes and edges contained in
that
graph from this graph.Removes all nodes and edges contained in
that
graph from this graph.- Definition Classes
- Shrinkable
- def ensuring(cond: (GraphOps[N, E, CC]) => Boolean, msg: => Any): GraphOps[N, E, CC]
- def ensuring(cond: (GraphOps[N, E, CC]) => Boolean): GraphOps[N, E, CC]
- def ensuring(cond: Boolean, msg: => Any): GraphOps[N, E, CC]
- def ensuring(cond: Boolean): GraphOps[N, E, CC]
- 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() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def intersectInPlace(that: AnyGraph[N, E]): GraphOps.this
Shrinks this graph to its intersection with
that
graph. - 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() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def removeAll(edges: IterableOnce[E]): GraphOps.this
Removes all
edges
from this graph.Removes all
edges
from this graph.- Definition Classes
- Shrinkable
- final def removeAll(nodes: IterableOnce[N], edges: IterableOnce[E]): GraphOps.this
Removes all
nodes
andedges
from this graph.Removes all
nodes
andedges
from this graph.- Definition Classes
- Shrinkable
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def unionInPlace(that: AnyGraph[N, E]): GraphOps.this
Adds all elements in
other
to thisGrowable
. - 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]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def |=(that: AnyGraph[N, E]): GraphOps.this
Alias for
unionInPlace
.Alias for
unionInPlace
.- Annotations
- @inline()
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from GraphOps[N, E, CC] toStringFormat[GraphOps[N, E, CC]] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (GraphOps[N, E, CC], B)
- Implicit
- This member is added by an implicit conversion from GraphOps[N, E, CC] toArrowAssoc[GraphOps[N, E, CC]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.
Welcome to the Graph for Scala API reference. Some suggested entry points:
AnyGraph
immutable.Graph
and its inner nodesmutable.Graph
and its inner nodes.edges
package and its subpackageshyperedges
package and its subpackages.labeled edges
packagemultilabeled edges
packagelabeled hyperedges
packagemultilabeled hyperedges
packageordered labeled hyperedges
packageordered multilabeled hyperedges
objectgeneric
package.GraphTraversal
andTraverserInnerNode
.RandomGraph
.GraphGen
.