Class/Object

scalax.collection.constrained.constraints

Connected

Related Docs: object Connected | package constraints

Permalink

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

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

Linear Supertypes
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Connected
  2. Constraint
  3. ConstraintHandlerMethods
  4. ConstraintMethods
  5. AnyRef
  6. Any
Implicitly
  1. by anyToNode
  2. by CollectionsHaveToParArray
  3. by EdgeAssoc
  4. by any2stringadd
  5. by StringFormat
  6. by Ensuring
  7. by ArrowAssoc
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Connected(self: Graph[N, E])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def &&(that: Constraint[N, E]): ConstraintBinaryOp[N, E]

    Permalink

    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

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to any2stringadd[Connected[N, E]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  5. def ->[B](y: B): (Connected[N, E], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to ArrowAssoc[Connected[N, E]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  7. def allNodes(innerNodes: Set[Graph.NodeT], innerEdges: Set[Graph.EdgeT]): Set[Graph.NodeT]

    Permalink

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

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

    Attributes
    protected
    Definition Classes
    ConstraintMethods
  8. def allNodes(passedNodes: Traversable[N], passedEdges: Traversable[E[N]]): Set[N]

    Permalink

    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
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def ensuring(cond: (Connected[N, E]) ⇒ Boolean, msg: ⇒ Any): Connected[N, E]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to Ensuring[Connected[N, E]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: (Connected[N, E]) ⇒ Boolean): Connected[N, E]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to Ensuring[Connected[N, E]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean, msg: ⇒ Any): Connected[N, E]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to Ensuring[Connected[N, E]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean): Connected[N, E]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to Ensuring[Connected[N, E]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to StringFormat[Connected[N, E]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. def isConnected(include: Set[Graph.NodeT], excludeNodes: Set[Graph.NodeT], excludeEdges: Set[Graph.EdgeT]): Boolean

    Permalink

    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
  22. def isDefined: Boolean

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to OuterNode[Connected[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    Param
  23. def isEdge: Boolean

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to OuterNode[Connected[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    NodeParam
  24. def isIn: Boolean

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to OuterNode[Connected[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    InParam → Param
  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. def isNode: Boolean

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to OuterNode[Connected[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    NodeParam
  27. def isOut: Boolean

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to OuterNode[Connected[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    InParam → Param
  28. val n1: Connected[N, E]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to EdgeAssoc[Connected[N, E]] performed by method EdgeAssoc in scalax.collection.GraphPredef.
    Definition Classes
    EdgeAssoc
  29. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  30. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. def onAdditionRefused(refusedNodes: Traversable[N], refusedEdges: Traversable[E[N]], graph: Graph[N, E]): Boolean

    Permalink

    This handler is called whenever an addition violates the constraints.

    This handler is called whenever an addition violates the constraints. The provided default implementation is empty.

    refusedNodes

    the nodes passed to preAdd.

    refusedEdges

    the edges passed to preAdd.

    returns

    must be true if the handler has been overridden but it doesn't throw an exception.

    Definition Classes
    ConstraintHandlerMethods
  33. def onSubtractionRefused(refusedNodes: Traversable[Graph.NodeT], refusedEdges: Traversable[Graph.EdgeT], graph: Graph[N, E]): Boolean

    Permalink

    This handler is called whenever a subtraction violates the constraints.

    This handler is called whenever a subtraction violates the constraints. The provided default implementation is empty.

    refusedNodes

    the nodes passed to preSubtract.

    refusedEdges

    the edges passed to preSubtract.

    returns

    must be true if the handler has been overridden but it doesn't throw an exception.

    Definition Classes
    ConstraintHandlerMethods
  34. def postAdd(newGraph: Graph[N, E], passedNodes: Traversable[N], passedEdges: Traversable[E[N]], preCheck: PreCheckResult): Boolean

    Permalink

    Check the whole newGraph.

    Check the whole newGraph.

    newGraph

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

    passedNodes

    nodes passed to the running add operation except those coming from node/edge input streams.

    passedEdges

    edges passed to the running add operation except those coming from edge input streams.

    Definition Classes
    ConnectedConstraintMethods
  35. def postSubtract(newGraph: Graph[N, E], passedNodes: Traversable[N], passedEdges: Traversable[E[N]], preCheck: PreCheckResult): Boolean

    Permalink

    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.

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

    Permalink

    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 possible any intermediate computation results to be used during the post-check. To add computation results PreCheckResult must be extended.

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

    Permalink

    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 possible any intermediate computation results to be used during the post-check. To add computation results PreCheckResult must be extended.

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

    Permalink

    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 possible any intermediate computation results to be used during the post-check. To add computation results PreCheckResult must be extended.

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

    Permalink

    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 possible any intermediate computation results to be used during the post-check. To add computation results PreCheckResult must be extended.

    Definition Classes
    ConnectedConstraintMethods
  40. def preSubtract(nodes: ⇒ Set[Graph.NodeT], edges: ⇒ Set[Graph.EdgeT], simple: Boolean): PreCheckResult

    Permalink

    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 possible any intermediate computation results to be used during the post-check. To add computation results PreCheckResult must be extended.

    Definition Classes
    ConnectedConstraintMethods
  41. def preSubtract(edge: Graph.EdgeT, simple: Boolean): PreCheckResult

    Permalink

    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 possible any intermediate computation results to be used during the post-check. To add computation results PreCheckResult must be extended.

    Definition Classes
    ConnectedConstraintMethods
  42. def preSubtract(node: Graph.NodeT, forced: Boolean): PreCheckResult

    Permalink

    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 possible any intermediate computation results to be used during the post-check. To add computation results PreCheckResult must be extended.

    Definition Classes
    ConnectedConstraintMethods
  43. val self: Graph[N, E]

    Permalink

    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
  44. def stringPrefix: String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to OuterNode[Connected[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    NodeParam
  45. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  46. def toParArray: ParArray[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to CollectionsHaveToParArray[Connected[N, E], T] performed by method CollectionsHaveToParArray in scala.collection.parallel. This conversion will take place only if an implicit value of type (Connected[N, E]) ⇒ GenTraversableOnce[T] is in scope.
    Definition Classes
    CollectionsHaveToParArray
  47. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  48. val value: Connected[N, E]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to OuterNode[Connected[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    OuterNode → NodeParam
  49. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. def ||(that: Constraint[N, E]): ConstraintBinaryOp[N, E]

    Permalink

    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
  53. def ~[N >: N1](n2: N): UnDiEdge[N]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to EdgeAssoc[Connected[N, E]] performed by method EdgeAssoc in scalax.collection.GraphPredef.
    Definition Classes
    EdgeAssoc
    Annotations
    @inline()
  54. def ~>[N >: N1](n2: N): DiEdge[N]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to EdgeAssoc[Connected[N, E]] performed by method EdgeAssoc in scalax.collection.GraphPredef.
    Definition Classes
    EdgeAssoc
    Annotations
    @inline()
  55. def [B](y: B): (Connected[N, E], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to ArrowAssoc[Connected[N, E]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. def toString(): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Connected[N, E] to OuterNode[Connected[N, E]] 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]]).toString()
    Definition Classes
    NodeParam → AnyRef → Any

Inherited from Constraint[N, E]

Inherited from ConstraintHandlerMethods[N, E]

Inherited from ConstraintMethods[N, E]

Inherited from AnyRef

Inherited from Any

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

Inherited by implicit conversion CollectionsHaveToParArray from Connected[N, E] to CollectionsHaveToParArray[Connected[N, E], T]

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

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

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

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

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

Ungrouped