Packages

trait GraphBase[N, E[+X] <: EdgeLikeIn[X]] extends Serializable

Base template trait for graphs.

This trait provides the common structure and base operations for immutable graphs independently of their representation. Base operations also cover one-step traversals. For unlimited traversals see trait GraphTraversal.

Users of Graph usually don't interact directly with this trait but with trait Graph instead which inherits the functionality provided by this trait.

If E inherits DirectedEdgeLike the graph is directed, otherwise it is undirected or mixed.

N

the user type of the nodes (vertices) in this graph.

E

the kind of the edges (links) in this graph.

Self Type
GraphBase[N, E]
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GraphBase
  2. Serializable
  3. AnyRef
  4. Any
Implicitly
  1. by ChainingOps
  2. by any2stringadd
  3. by StringFormat
  4. by Ensuring
  5. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. trait Edge extends Serializable
  2. type EdgeFilter = (EdgeT) => Boolean
  3. sealed trait EdgeOrdering extends Ordering[EdgeT] with ElemOrdering
  4. trait EdgeSet extends AnySet[EdgeT] with ExtSetMethods[EdgeT] with Serializable
  5. abstract type EdgeSetT <: EdgeSet
  6. abstract type EdgeT <: InnerEdgeParam[N, E, NodeT, E] with InnerEdge with Serializable
  7. sealed trait ElemOrdering extends AnyRef

    Base trait for graph Orderings.

    Base trait for graph Orderings.

    Attributes
    protected
  8. trait InnerEdge extends Iterable[NodeT] with InnerEdgeParam[N, E, NodeT, E] with Edge with InnerElem
  9. sealed trait InnerElem extends AnyRef
  10. trait InnerNode extends InnerNodeParam[N] with Node with InnerElem
  11. trait Node extends Serializable
  12. type NodeFilter = (NodeT) => Boolean
  13. sealed trait NodeOrdering extends Ordering[NodeT] with ElemOrdering

    Ordering for the path dependent type NodeT.

  14. trait NodeSet extends AnySet[NodeT] with ExtSetMethods[NodeT]
  15. abstract type NodeSetT <: NodeSet
  16. abstract type NodeT <: InnerNode

Abstract Value Members

  1. abstract def edges: EdgeSetT

    The edge set of this Graph commonly referred to as E(G).

    The edge set of this Graph commonly referred to as E(G).

    returns

    Set of all contained edges.

  2. abstract def isDirected: Boolean

    Whether all edges of this graph are directed.

  3. abstract def isHyper: Boolean

    Whether this graph contains at least one hyperedges.

  4. abstract def isMixed: Boolean

    Whether this graph contains at least one directed and one undirected edge.

  5. abstract def isMulti: Boolean

    Whether this graph contains at least one multi-edge.

    Whether this graph contains at least one multi-edge. We defnie multi-edges by

    1. two or more directed edges having the same source and target
    2. two or more undirected edges connecting the same nodes
    3. two or more (directed) hyperedges that, after being decomposed into (directed) edges, yield any multy-edge as stipulated above.
  6. abstract def newEdge(innerEdge: E[NodeT]): EdgeT
    Attributes
    protected
  7. abstract def newNode(n: N): NodeT
    Attributes
    protected
  8. abstract def nodes: NodeSetT

    The node (vertex) set of this Graph commonly referred to as V(G).

    The node (vertex) set of this Graph commonly referred to as V(G).

    returns

    Set of all contained nodes.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from GraphBase[N, E] toany2stringadd[GraphBase[N, E]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (GraphBase[N, E], B)
    Implicit
    This member is added by an implicit conversion from GraphBase[N, E] toArrowAssoc[GraphBase[N, E]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final val anyEdge: EdgeFilter

    Default edge filter letting path all edges (non-filter).

  7. final val anyNode: NodeFilter

    Default node filter letting traverse all nodes (non-filter).

  8. final lazy val anyOrdering: AnyOrdering[N]
    Attributes
    protected
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  11. final lazy val defaultEdgeOrdering: EdgeOrdering
  12. final lazy val defaultNodeOrdering: NodeOrdering
  13. implicit final def edgeToEdgeCont(e: E[N]): E[NodeT]
    Attributes
    protected
  14. def ensuring(cond: (GraphBase[N, E]) => Boolean, msg: => Any): GraphBase[N, E]
    Implicit
    This member is added by an implicit conversion from GraphBase[N, E] toEnsuring[GraphBase[N, E]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: (GraphBase[N, E]) => Boolean): GraphBase[N, E]
    Implicit
    This member is added by an implicit conversion from GraphBase[N, E] toEnsuring[GraphBase[N, E]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: Boolean, msg: => Any): GraphBase[N, E]
    Implicit
    This member is added by an implicit conversion from GraphBase[N, E] toEnsuring[GraphBase[N, E]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def ensuring(cond: Boolean): GraphBase[N, E]
    Implicit
    This member is added by an implicit conversion from GraphBase[N, E] toEnsuring[GraphBase[N, E]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  20. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. def graphSize: Int

    The size - commonly referred to as ||G|| - of this graph equaling to the number of edges.

    The size - commonly referred to as ||G|| - of this graph equaling to the number of edges.

    Method size is reserved for the number of nodes and edges because Graph is also SetLike with set elements being nodes or edges.

  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. def initialize(nodes: Iterable[N], edges: Iterable[E[N]]): Unit

    Populates this graph with nodes and edges.

    Populates this graph with nodes and edges.

    The implementing class will typically have a constructor with the same parameters which is invoked by from of the companion object.

    nodes

    The isolated (and optionally any other) outer nodes that the node set of this graph is to be populated with.

    edges

    The outer edges that the edge set of this graph is to be populated with. Nodes being the end of any of these edges will be added to the node set.

    Attributes
    protected
  24. final def isCustomEdgeFilter(f: EdgeFilter): Boolean

    true if f is not equivalent to anyEdge.

    true if f is not equivalent to anyEdge.

    Annotations
    @inline()
  25. final def isCustomNodeFilter(f: NodeFilter): Boolean

    true if f is not equivalent to anyNode.

    true if f is not equivalent to anyNode.

    Annotations
    @inline()
  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. final def isTrivial: Boolean

    true if this graph has at most 1 node.

    true if this graph has at most 1 node.

    Annotations
    @inline()
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. final val noNode: NodeFilter

    Node predicate always returning false.

  30. final def nonTrivial: Boolean

    true if this graph has at least 2 nodes.

    true if this graph has at least 2 nodes.

    Annotations
    @inline()
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  33. def order: Int

    The order - commonly referred to as |G| - of this graph equaling to the number of nodes.

  34. def pipe[B](f: (GraphBase[N, E]) => B): B
    Implicit
    This member is added by an implicit conversion from GraphBase[N, E] toChainingOps[GraphBase[N, E]] performed by method ChainingOps in scalax.collection.
    Definition Classes
    ChainingOps
  35. val self: GraphBase[N, E]
    Implicit
    This member is added by an implicit conversion from GraphBase[N, E] toChainingOps[GraphBase[N, E]] performed by method ChainingOps in scalax.collection.
    Definition Classes
    ChainingOps
  36. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  37. def tap[U](f: (GraphBase[N, E]) => U): GraphBase[N, E]
    Implicit
    This member is added by an implicit conversion from GraphBase[N, E] toChainingOps[GraphBase[N, E]] performed by method ChainingOps in scalax.collection.
    Definition Classes
    ChainingOps
  38. def toString(): String
    Definition Classes
    AnyRef → Any
  39. def totalWeight: Double
  40. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  41. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  43. object Edge extends Serializable
    Annotations
    @transient()
  44. object EdgeOrdering extends Serializable

    Ordering for the path dependent type EdgeT.

  45. object EdgeT
    Annotations
    @transient()
  46. object InnerEdge extends Serializable
    Annotations
    @transient()
  47. object InnerNode extends Serializable
  48. object NoOrdering extends ElemOrdering with Serializable

    The empty ElemOrdering.

  49. object Node extends Serializable
    Annotations
    @transient()
  50. object NodeOrdering extends Serializable

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  2. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from GraphBase[N, E] toStringFormat[GraphBase[N, E]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  3. def [B](y: B): (GraphBase[N, E], B)
    Implicit
    This member is added by an implicit conversion from GraphBase[N, E] toArrowAssoc[GraphBase[N, E]] 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.

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion ChainingOps fromGraphBase[N, E] to ChainingOps[GraphBase[N, E]]

Inherited by implicit conversion any2stringadd fromGraphBase[N, E] to any2stringadd[GraphBase[N, E]]

Inherited by implicit conversion StringFormat fromGraphBase[N, E] to StringFormat[GraphBase[N, E]]

Inherited by implicit conversion Ensuring fromGraphBase[N, E] to Ensuring[GraphBase[N, E]]

Inherited by implicit conversion ArrowAssoc fromGraphBase[N, E] to ArrowAssoc[GraphBase[N, E]]

Ungrouped