Packages

  • package root
    Definition Classes
    root
  • package scalax
    Definition Classes
    root
  • package collection
    Definition Classes
    scalax
  • package constrained

    Traits enabling to implement constraints and use constrained graphs.

    Traits enabling to implement constraints and use constrained graphs.

    Graphs may be constrained dynamically or statically.

    Dynamically constrained means that a constraint is bound to a constrained Graph instance at initialization time. The constrained Graph will then delegate all calls to the methods of ConstraintMethods and ConstraintHandlerMethods to the corresponding methods of the constraint bound to it. The immutable and mutable factories Graph in this package yield dynamically constrained graphs.

    To make use of dynamically constrained graphs you may make use of the predefined constraints or provide an own implementation of Constraint along with its companion object. To initialize a graph with one or several combined constraints just call the graph factory methods of the constraint package passing.

    Statically constrained means that the graph class directly implements the methods declared in ConstraintMethods.

    Definition Classes
    collection
  • package constraints

    Predefined constraints that may be passed to constrained Graphs.

    Predefined constraints that may be passed to constrained Graphs.

    Definition Classes
    constrained
  • Acyclic
  • Connected
  • NoneConstraint

class Connected[N, E[+X] <: EdgeLikeIn[X], G <: Graph[N, E]] extends Constraint[N, E, G]

Ensures that the underlying Graph is connected if it is undirected or weakly connected if it is directed.

Linear Supertypes
Constraint[N, E, G], ConstraintMethods[N, E, G], AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Connected
  2. Constraint
  3. ConstraintMethods
  4. AnyRef
  5. Any
Implicitly
  1. by ChainingOps
  2. by EdgeAssoc
  3. by anyToNode
  4. by any2stringadd
  5. by StringFormat
  6. by Ensuring
  7. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Connected(self: G)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def &&(that: Constraint[N, E, G]): ConstraintBinaryOp[N, E, G]

    Creates a new constraint of the type ConstraintBinaryOp with pre- and post-check methods each of which returning true if both this' and that's corresponding pre- and post-checks return true.

    Creates a new constraint of the type ConstraintBinaryOp with pre- and post-check methods each of which returning true if both this' and that's corresponding pre- and post-checks return true.

    Definition Classes
    Constraint
  4. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toany2stringadd[Connected[N, E, G]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  5. def ->[B](y: B): (Connected[N, E, G], B)
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toArrowAssoc[Connected[N, E, G]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  7. def allNodes(passedNodes: Iterable[N], passedEdges: Iterable[E[N]]): Set[N]

    Consolidates all outer nodes of the arguments by adding the edge ends of passedEdges to passedNodes.

    Consolidates all outer nodes of the arguments by adding the edge ends of passedEdges to passedNodes.

    Attributes
    protected
    Definition Classes
    ConstraintMethods
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  10. def ensuring(cond: (Connected[N, E, G]) => Boolean, msg: => Any): Connected[N, E, G]
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toEnsuring[Connected[N, E, G]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: (Connected[N, E, G]) => Boolean): Connected[N, E, G]
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toEnsuring[Connected[N, E, G]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean, msg: => Any): Connected[N, E, G]
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toEnsuring[Connected[N, E, G]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean): Connected[N, E, G]
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toEnsuring[Connected[N, E, G]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toStringFormat[Connected[N, E, G]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  17. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. def isConnected(include: Set[G.NodeT], excludeNodes: Set[G.NodeT], excludeEdges: Set[G.EdgeT]): Boolean

    Checks within any preSubtract whether the neighborhood of the elements to be subtracted remains connected after the subtraction thus preventing a full traversal of the graph.

    Checks within any preSubtract whether the neighborhood of the elements to be subtracted remains connected after the subtraction thus preventing a full traversal of the graph.

    include

    nodes in the neighborhood of the nodes/edges to be subtracted.

    excludeNodes

    nodes to be subtracted.

    excludeEdges

    edges to be subtracted.

    returns

    trueif all nodes in include are connected.

    Attributes
    protected
  20. def isDefined: Boolean
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toOuterNode[Connected[N, E, G]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    Param
  21. final def isEdge: Boolean
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toOuterNode[Connected[N, E, G]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    Param
  22. def isIn: Boolean
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toOuterNode[Connected[N, E, G]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    InParam → Param
  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. def isNode: Boolean
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toOuterNode[Connected[N, E, G]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    NodeParam
  25. final def isOut: Boolean
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toOuterNode[Connected[N, E, G]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    Param
  26. val n1: Connected[N, E, G]
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toEdgeAssoc[Connected[N, E, G]] performed by method EdgeAssoc in scalax.collection.GraphPredef.
    Definition Classes
    EdgeAssoc
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. def nodesToAdd(passedNodes: Iterable[N], passedEdges: Iterable[E[N]]): Set[N]
    Attributes
    protected
    Definition Classes
    ConstraintMethods
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  31. def pipe[B](f: (Connected[N, E, G]) => B): B
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toChainingOps[Connected[N, E, G]] performed by method ChainingOps in scalax.collection.
    Definition Classes
    ChainingOps
  32. def postAdd(newGraph: G, passedNodes: Iterable[N], passedEdges: Iterable[E[N]], preCheck: PreCheckResult): Either[PostCheckFailure, G]

    Check the whole newGraph.

    Check the whole newGraph.

    newGraph

    the after-addition would-be graph waiting for commit.

    passedNodes

    the normalized nodes passed to the add operation.

    passedEdges

    the normalized edges passed to the add operation.

    preCheck

    the result of preAdd.

    returns

    None to accept newGraph or Some reason for constraint violation resp. rejection

    Definition Classes
    ConnectedConstraintMethods
  33. def postSubtract(newGraph: G, passedNodes: Iterable[N], passedEdges: Iterable[E[N]], preCheck: PreCheckResult): Either[PostCheckFailure, G]

    This post-check must return whether newGraph should be committed or the subtraction is to be rolled back.

    This post-check must return whether newGraph should be committed or the subtraction is to be rolled back. Use self to access the associated graph. For immutable graphs, self maintains the state before the addition but for mutable graphs, it is already mutated to the required state.

    newGraph

    the after-subtraction would-be graph waiting for commit.

    passedNodes

    the normalized nodes passed to the subtraction operation.

    passedEdges

    the normalized edges passed to the subtraction operation.

    preCheck

    the result of preSubtract.

    returns

    None to accept newGraph or Some reason for constraint violation resp. rejection

    Definition Classes
    ConstraintMethods
  34. def preAdd(elems: InParam[N, E]*): PreCheckResult

    Complete if elems build a connected graph and at least one node of elems is already contained; otherwise Abort.

    Complete if elems build a connected graph and at least one node of elems is already contained; otherwise Abort.

    elems

    nodes and/or edges to be added possibly containing duplicates.

    returns

    The results of the pre-check containing the follow-up activity and possibly any intermediate computation result to be used during the post-check. To add computation results PreCheckResult must be extended.

    Definition Classes
    ConnectedConstraintMethods
  35. def preAdd(edge: E[N]): PreCheckResult

    Complete if edge itself or at least one end of edge is already contained; otherwise Abort.

    Complete if edge itself or at least one end of edge is already contained; otherwise Abort.

    edge

    to be added.

    returns

    The results of the pre-check containing the follow-up activity and possibly any intermediate computation result to be used during the post-check. To add computation results PreCheckResult must be extended.

    Definition Classes
    ConnectedConstraintMethods
  36. def preAdd(node: N): PreCheckResult

    Complete if node is contained even though no addition will be performed; otherwise Abort because node would become isolated.

    Complete if node is contained even though no addition will be performed; otherwise Abort because node would become isolated.

    node

    to be added

    returns

    The results of the pre-check containing the follow-up activity and possibly any intermediate computation result to be used during the post-check. To add computation results PreCheckResult must be extended.

    Definition Classes
    ConnectedConstraintMethods
  37. def preCreate(nodes: Iterable[N], edges: Iterable[E[N]]): PreCheckResult

    Skips this pre-check to rely on the post-check postAdd except for trivial cases.

    Skips this pre-check to rely on the post-check postAdd except for trivial cases.

    nodes

    the outer nodes the graph is to be populated with; nodes being edge ends may but need not be contained in nodes.

    edges

    the outer edges the graph is to be populated with.

    returns

    The results of the pre-check containing the follow-up activity and possibly any intermediate computation result to be used during the post-check. To add computation results PreCheckResult must be extended.

    Definition Classes
    ConnectedConstraintMethods
  38. def preSubtract(nodes: => Set[G.NodeT], edges: => Set[G.EdgeT], simple: Boolean): PreCheckResult

    This pre-check must return Abort if the subtraction of nodes and/or edges is to be canceled, PostCheck if postSubtract is to be called to decide or Complete if nodes and/or edges are allowed to be subtracted.

    This pre-check must return Abort if the subtraction of nodes and/or edges is to be canceled, PostCheck if postSubtract is to be called to decide or Complete if nodes and/or edges are allowed to be subtracted. It is typically triggered by the -- operation. The default implementation element-wise calls preSubtract(node, simple) or preSubtract(edge, simple), respectively. As for most cases this won't be satisfactory a domain-specific implementation should be provided. Use self to access the associated graph.

    nodes

    the inner nodes to be subtracted not necessarily including the ends of edges to be subtracted. Call allNodes to get the complete set of nodes to be subtracted.

    edges

    the inner edges to be subtracted.

    simple

    true for standard (edge-only by -), false for ripple (by -!) removal.

    returns

    The results of the pre-check containing the follow-up activity and possibly any intermediate computation result to be used during the post-check. To add computation results PreCheckResult must be extended.

    Definition Classes
    ConnectedConstraintMethods
  39. def preSubtract(edge: G.EdgeT, simple: Boolean): PreCheckResult

    This pre-check must return Abort if the subtraction of edge is to be canceled, PostCheck if postSubtract is to be called to decide or Complete if the the edge is allowed to be subtracted.

    This pre-check must return Abort if the subtraction of edge is to be canceled, PostCheck if postSubtract is to be called to decide or Complete if the the edge is allowed to be subtracted. This pre-check may be omitted by letting it always return postCheck and overriding the corresponding post-check commit* method. Use self to access the associated graph.

    edge

    the inner edge to be subtracted.

    simple

    true for standard (edge-only by -), false for ripple (by -!) removal.

    returns

    The results of the pre-check containing the follow-up activity and possibly any intermediate computation result to be used during the post-check. To add computation results PreCheckResult must be extended.

    Definition Classes
    ConnectedConstraintMethods
  40. def preSubtract(node: G.NodeT, forced: Boolean): PreCheckResult

    This pre-check must return Abort if the subtraction of node is to be canceled, PostCheck if postSubtract is to be called to decide or Complete if the the node is allowed to be subtracted.

    This pre-check must return Abort if the subtraction of node is to be canceled, PostCheck if postSubtract is to be called to decide or Complete if the the node is allowed to be subtracted. This pre-check may be omitted by letting it always return postCheck and overriding the corresponding post-check commit* method. Use self to access the associated graph.

    node

    the inner to be subtracted.

    forced

    true for standard (ripple by -), false for gentle (by -?) removal.

    returns

    The results of the pre-check containing the follow-up activity and possibly any intermediate computation result to be used during the post-check. To add computation results PreCheckResult must be extended.

    Definition Classes
    ConnectedConstraintMethods
  41. def productElementNames: Iterator[String]
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toOuterNode[Connected[N, E, G]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    Product
  42. val self: G

    When extending Constraint, self will denote the attached constrained graph.

    When extending Constraint, self will denote the attached constrained graph. The factory methods of the companion object scalax.collection.constrained.Graph initialize self to the correct graph instance. When extending Constrained, self will denote this graph.

    Definition Classes
    ConnectedConstraintConstraintMethods
  43. def stringPrefix: String
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toOuterNode[Connected[N, E, G]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    NodeParam
  44. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  45. def tap[U](f: (Connected[N, E, G]) => U): Connected[N, E, G]
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toChainingOps[Connected[N, E, G]] performed by method ChainingOps in scalax.collection.
    Definition Classes
    ChainingOps
  46. def toString(): String
    Definition Classes
    AnyRef → Any
  47. val value: Connected[N, E, G]
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toOuterNode[Connected[N, E, G]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    OuterNode → NodeParam
  48. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  49. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  50. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  51. def ||(that: Constraint[N, E, G]): ConstraintBinaryOp[N, E, G]

    Creates a new constraint of the type ConstraintBinaryOp with pre- and post-check methods each of which returning true if either this' or other's corresponding pre- and post-checks returns true.

    Creates a new constraint of the type ConstraintBinaryOp with pre- and post-check methods each of which returning true if either this' or other's corresponding pre- and post-checks returns true.

    Definition Classes
    Constraint
  52. def ~[N >: N1](n2: N): UnDiEdge[N]
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toEdgeAssoc[Connected[N, E, G]] performed by method EdgeAssoc in scalax.collection.GraphPredef.
    Definition Classes
    EdgeAssoc
    Annotations
    @inline()
  53. def ~>[N >: N1](n2: N): DiEdge[N]
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toEdgeAssoc[Connected[N, E, G]] performed by method EdgeAssoc in scalax.collection.GraphPredef.
    Definition Classes
    EdgeAssoc
    Annotations
    @inline()

Shadowed Implicit Value Members

  1. val self: Connected[N, E, G]
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toChainingOps[Connected[N, E, G]] performed by method ChainingOps in scalax.collection.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (connected: ChainingOps[Connected[N, E, G]]).self
    Definition Classes
    ChainingOps
  2. def toString(): String
    Implicit
    This member is added by an implicit conversion from Connected[N, E, G] toOuterNode[Connected[N, E, G]] performed by method anyToNode in scalax.collection.GraphPredef.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (connected: OuterNode[Connected[N, E, G]]).toString()
    Definition Classes
    NodeParam → AnyRef → Any

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

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

Inherited from ConstraintMethods[N, E, G]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion ChainingOps fromConnected[N, E, G] to ChainingOps[Connected[N, E, G]]

Inherited by implicit conversion EdgeAssoc fromConnected[N, E, G] to EdgeAssoc[Connected[N, E, G]]

Inherited by implicit conversion anyToNode fromConnected[N, E, G] to OuterNode[Connected[N, E, G]]

Inherited by implicit conversion any2stringadd fromConnected[N, E, G] to any2stringadd[Connected[N, E, G]]

Inherited by implicit conversion StringFormat fromConnected[N, E, G] to StringFormat[Connected[N, E, G]]

Inherited by implicit conversion Ensuring fromConnected[N, E, G] to Ensuring[Connected[N, E, G]]

Inherited by implicit conversion ArrowAssoc fromConnected[N, E, G] to ArrowAssoc[Connected[N, E, G]]

Ungrouped