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.
- Alphabetic
- By Inheritance
- Connected
- Constraint
- ConstraintHandlerMethods
- ConstraintMethods
- AnyRef
- Any
- by anyToNode
- by CollectionsHaveToParArray
- by EdgeAssoc
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
&&(that: Constraint[N, E]): ConstraintBinaryOp[N, E]
Creates a new constraint of the type
ConstraintBinaryOpwith pre- and post-check methods each of which returningtrueif boththis' andthat's corresponding pre- and post-checks returntrue.Creates a new constraint of the type
ConstraintBinaryOpwith pre- and post-check methods each of which returningtrueif boththis' andthat's corresponding pre- and post-checks returntrue.- Definition Classes
- Constraint
- def +(other: String): String
- def ->[B](y: B): (Connected[N, E], B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
allNodes(passedNodes: Traversable[N], passedEdges: Traversable[E[N]]): Set[N]
Consolidates all outer nodes of the arguments by adding the edge ends of
passedEdgestopassedNodes.Consolidates all outer nodes of the arguments by adding the edge ends of
passedEdgestopassedNodes.- Attributes
- protected
- Definition Classes
- ConstraintMethods
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def ensuring(cond: (Connected[N, E]) ⇒ Boolean, msg: ⇒ Any): Connected[N, E]
- def ensuring(cond: (Connected[N, E]) ⇒ Boolean): Connected[N, E]
- def ensuring(cond: Boolean, msg: ⇒ Any): Connected[N, E]
- def ensuring(cond: Boolean): Connected[N, E]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
isConnected(include: Set[Graph.NodeT], excludeNodes: Set[Graph.NodeT], excludeEdges: Set[Graph.EdgeT]): Boolean
Checks within any
preSubtractwhether the neighborhood of the elements to be subtracted remains connected after the subtraction thus preventing a full traversal of the graph.Checks within any
preSubtractwhether 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 inincludeare connected.
- Attributes
- protected
- def isDefined: Boolean
- final def isEdge: Boolean
- def isIn: Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isNode: Boolean
- final def isOut: Boolean
- val n1: Connected[N, E]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nodesToAdd(passedNodes: Traversable[N], passedEdges: Traversable[E[N]]): Set[N]
- Attributes
- protected
- Definition Classes
- ConstraintMethods
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
onAdditionRefused(refusedNodes: Traversable[N], refusedEdges: Traversable[E[N]], graph: Graph[N, E]): Boolean
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
-
def
onSubtractionRefused(refusedNodes: Traversable[Graph.NodeT], refusedEdges: Traversable[Graph.EdgeT], graph: Graph[N, E]): Boolean
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
-
def
postAdd(newGraph: Graph[N, E], passedNodes: Traversable[N], passedEdges: Traversable[E[N]], preCheck: PreCheckResult): Boolean
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
- passedEdges
edges passed to the running add operation
- preCheck
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
PreCheckResultmust be extended.
- Definition Classes
- Connected → ConstraintMethods
-
def
postSubtract(newGraph: Graph[N, E], passedNodes: Traversable[N], passedEdges: Traversable[E[N]], preCheck: PreCheckResult): Boolean
This post-check must return whether
newGraphshould be committed or the subtraction is to be rolled back.This post-check must return whether
newGraphshould be committed or the subtraction is to be rolled back. Useselfto access the associated graph. For immutable graphs,selfmaintains 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.
- preCheck
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
PreCheckResultmust be extended.
- Definition Classes
- ConstraintMethods
-
def
preAdd(elems: InParam[N, E]*): PreCheckResult
Completeifelemsbuild a connected graph and at least one node ofelemsis already contained; otherwiseAbort.Completeifelemsbuild a connected graph and at least one node ofelemsis already contained; otherwiseAbort.- 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
PreCheckResultmust be extended.
- Definition Classes
- Connected → ConstraintMethods
-
def
preAdd(edge: E[N]): PreCheckResult
Completeifedgeitself or at least one end ofedgeis already contained; otherwiseAbort.Completeifedgeitself or at least one end ofedgeis already contained; otherwiseAbort.- 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
PreCheckResultmust be extended.
- Definition Classes
- Connected → ConstraintMethods
-
def
preAdd(node: N): PreCheckResult
Completeifnodeis contained even though no addition will be performed; otherwiseAbortbecausenodewould become isolated.Completeifnodeis contained even though no addition will be performed; otherwiseAbortbecausenodewould 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
PreCheckResultmust be extended.
- Definition Classes
- Connected → ConstraintMethods
-
def
preCreate(nodes: Traversable[N], edges: Traversable[E[N]]): PreCheckResult
Skips this pre-check to rely on the post-check
postAddexcept for trivial cases.Skips this pre-check to rely on the post-check
postAddexcept 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
PreCheckResultmust be extended.
- Definition Classes
- Connected → ConstraintMethods
-
def
preSubtract(nodes: ⇒ Set[Graph.NodeT], edges: ⇒ Set[Graph.EdgeT], simple: Boolean): PreCheckResult
This pre-check must return
Abortif the subtraction ofnodesand/oredgesis to be canceled,PostCheckifpostSubtractis to be called to decide orCompleteifnodesand/oredgesare allowed to be subtracted.This pre-check must return
Abortif the subtraction ofnodesand/oredgesis to be canceled,PostCheckifpostSubtractis to be called to decide orCompleteifnodesand/oredgesare allowed to be subtracted. It is typically triggered by the--operation. The default implementation element-wise callspreSubtract(node, simple)orpreSubtract(edge, simple), respectively. As for most cases this won't be satisfactory a domain-specific implementation should be provided. Useselfto 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
truefor standard (edge-only by-),falsefor 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
PreCheckResultmust be extended.
- Definition Classes
- Connected → ConstraintMethods
-
def
preSubtract(edge: Graph.EdgeT, simple: Boolean): PreCheckResult
This pre-check must return
Abortif the subtraction ofedgeis to be canceled,PostCheckifpostSubtractis to be called to decide orCompleteif the theedgeis allowed to be subtracted.This pre-check must return
Abortif the subtraction ofedgeis to be canceled,PostCheckifpostSubtractis to be called to decide orCompleteif the theedgeis allowed to be subtracted. This pre-check may be omitted by letting it always returnpostCheckand overriding the corresponding post-checkcommit*method. Useselfto access the associated graph.- edge
the inner edge to be subtracted.
- simple
truefor standard (edge-only by-),falsefor 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
PreCheckResultmust be extended.
- Definition Classes
- Connected → ConstraintMethods
-
def
preSubtract(node: Graph.NodeT, forced: Boolean): PreCheckResult
This pre-check must return
Abortif the subtraction ofnodeis to be canceled,PostCheckifpostSubtractis to be called to decide orCompleteif the thenodeis allowed to be subtracted.This pre-check must return
Abortif the subtraction ofnodeis to be canceled,PostCheckifpostSubtractis to be called to decide orCompleteif the thenodeis allowed to be subtracted. This pre-check may be omitted by letting it always returnpostCheckand overriding the corresponding post-checkcommit*method. Useselfto access the associated graph.- node
the inner to be subtracted.
- forced
truefor standard (ripple by-),falsefor 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
PreCheckResultmust be extended.
- Definition Classes
- Connected → ConstraintMethods
-
val
self: Graph[N, E]
When extending
Constraint,selfwill denote the attached constrained graph.When extending
Constraint,selfwill denote the attached constrained graph. The factory methods of the companion objectscalax.collection.constrained.Graphinitializeselfto the correct graph instance. When extendingConstrained,selfwill denotethisgraph.- Definition Classes
- Connected → Constraint → ConstraintMethods
- def stringPrefix: String
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toParArray: ParArray[T]
- Implicit
- 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
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- val value: Connected[N, E]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
||(that: Constraint[N, E]): ConstraintBinaryOp[N, E]
Creates a new constraint of the type
ConstraintBinaryOpwith pre- and post-check methods each of which returningtrueif eitherthis' orother's corresponding pre- and post-checks returnstrue.Creates a new constraint of the type
ConstraintBinaryOpwith pre- and post-check methods each of which returningtrueif eitherthis' orother's corresponding pre- and post-checks returnstrue.- Definition Classes
- Constraint
- def ~[N >: N1](n2: N): UnDiEdge[N]
- def ~>[N >: N1](n2: N): DiEdge[N]
- def →[B](y: B): (Connected[N, E], B)
Shadowed Implicit Value Members
-
def
toString(): String
- Implicit
- 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