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 Acyclic[N, E[X] <: EdgeLikeIn[X]] extends Constraint[N, E]

Ensures that the underlying Graph is acyclic at any time.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Acyclic
  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 Acyclic(self: Graph[N, E])

Type Members

  1. class Result extends PreCheckResult

    This class makes it possible to carry over nodes that are passed to a pre-check and are already contained in the graph to postAdd.

    This class makes it possible to carry over nodes that are passed to a pre-check and are already contained in the graph to postAdd. Thus we can limit the number of start nodes for cycle detection in the post-check to these passed over docking nodes.

    Attributes
    protected

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]): ConstraintBinaryOp[N, E]

    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 Acyclic[N, E] to any2stringadd[Acyclic[N, E]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  5. def ->[B](y: B): (Acyclic[N, E], B)
    Implicit
    This member is added by an implicit conversion from Acyclic[N, E] to ArrowAssoc[Acyclic[N, E]] 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(innerNodes: Set[Graph.NodeT], innerEdges: Set[Graph.EdgeT]): Set[Graph.NodeT]

    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]

    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
    Definition Classes
    Any
  10. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def ensuring(cond: (Acyclic[N, E]) ⇒ Boolean, msg: ⇒ Any): Acyclic[N, E]
    Implicit
    This member is added by an implicit conversion from Acyclic[N, E] to Ensuring[Acyclic[N, E]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: (Acyclic[N, E]) ⇒ Boolean): Acyclic[N, E]
    Implicit
    This member is added by an implicit conversion from Acyclic[N, E] to Ensuring[Acyclic[N, E]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean, msg: ⇒ Any): Acyclic[N, E]
    Implicit
    This member is added by an implicit conversion from Acyclic[N, E] to Ensuring[Acyclic[N, E]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean): Acyclic[N, E]
    Implicit
    This member is added by an implicit conversion from Acyclic[N, E] to Ensuring[Acyclic[N, E]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Acyclic[N, E] to StringFormat[Acyclic[N, E]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  21. def isDefined: Boolean
    Implicit
    This member is added by an implicit conversion from Acyclic[N, E] to OuterNode[Acyclic[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    Param
  22. def isEdge: Boolean
    Implicit
    This member is added by an implicit conversion from Acyclic[N, E] to OuterNode[Acyclic[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    NodeParam
  23. def isIn: Boolean
    Implicit
    This member is added by an implicit conversion from Acyclic[N, E] to OuterNode[Acyclic[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    InParam → Param
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. def isNode: Boolean
    Implicit
    This member is added by an implicit conversion from Acyclic[N, E] to OuterNode[Acyclic[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    NodeParam
  26. def isOut: Boolean
    Implicit
    This member is added by an implicit conversion from Acyclic[N, E] to OuterNode[Acyclic[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    InParam → Param
  27. val n1: Acyclic[N, E]
    Implicit
    This member is added by an implicit conversion from Acyclic[N, E] to EdgeAssoc[Acyclic[N, E]] performed by method EdgeAssoc in scalax.collection.GraphPredef.
    Definition Classes
    EdgeAssoc
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. final def notify(): Unit
    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  31. 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
  32. 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
  33. def postAdd(newGraph: Graph[N, E], passedNodes: Traversable[N], passedEdges: Traversable[E[N]], preCheck: PreCheckResult): Boolean

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

    This post-check must return whether newGraph should be committed or the add operation 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-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
    AcyclicConstraintMethods
  34. def postSubtract(newGraph: Graph[N, E], passedNodes: Traversable[N], passedEdges: Traversable[E[N]], preCheck: PreCheckResult): Boolean

    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
  35. def preAdd(elems: InParam[N, E]*): PreCheckResult

    If elems is relatively small, preventively ensure that there is no cycle within the new elements.

    If elems is relatively small, preventively ensure that there is no cycle within the new elements.

    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
    AcyclicConstraintMethods
  36. def preAdd(edge: E[N]): PreCheckResult

    When inserting an edge with a source contained in the graph a cycle is produced if there exists a target node of this edge such that there is a path from the target node to the source node.

    When inserting an edge with a source contained in the graph a cycle is produced if there exists a target node of this edge such that there is a path from the target node to the source node.

    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
    AcyclicConstraintMethods
  37. def preAdd(node: N): PreCheckResult

    Adding a single node cannot produce a cycle.

    Adding a single node cannot produce a cycle.

    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
    AcyclicConstraintMethods
  38. def preCreate(nodes: Traversable[N], edges: Traversable[E[N]]): PreCheckResult

    This pre-check is called on constructing a graph through its companion object.

    This pre-check is called on constructing a graph through its companion object. It must return whether the graph is allowed to be populated with nodes and edges. The default implementation calls preAdd for each node and edge.

    Note that nodes and edges coming from node/edge input streams are not checked. So when utilizing streams the post check postAdd must be served.

    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
    AcyclicConstraintMethods
  39. def preSubtract(nodes: ⇒ Set[Graph.NodeT], edges: ⇒ Set[Graph.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 possible any intermediate computation results to be used during the post-check. To add computation results PreCheckResult must be extended.

    Definition Classes
    AcyclicConstraintMethods
  40. def preSubtract(edge: Graph.EdgeT, forced: 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.

    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
    AcyclicConstraintMethods
  41. def preSubtract(node: Graph.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 possible any intermediate computation results to be used during the post-check. To add computation results PreCheckResult must be extended.

    Definition Classes
    AcyclicConstraintMethods
  42. val self: Graph[N, E]
    Definition Classes
    AcyclicConstraintConstraintMethods
  43. def stringPrefix: String
    Implicit
    This member is added by an implicit conversion from Acyclic[N, E] to OuterNode[Acyclic[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    NodeParam
  44. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  45. def toParArray: ParArray[T]
    Implicit
    This member is added by an implicit conversion from Acyclic[N, E] to CollectionsHaveToParArray[Acyclic[N, E], T] performed by method CollectionsHaveToParArray in scala.collection.parallel. This conversion will take place only if an implicit value of type (Acyclic[N, E]) ⇒ GenTraversableOnce[T] is in scope.
    Definition Classes
    CollectionsHaveToParArray
  46. def toString(): String
    Definition Classes
    AnyRef → Any
  47. val value: Acyclic[N, E]
    Implicit
    This member is added by an implicit conversion from Acyclic[N, E] to OuterNode[Acyclic[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    OuterNode → NodeParam
  48. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. def ||(that: Constraint[N, E]): ConstraintBinaryOp[N, E]

    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 Acyclic[N, E] to EdgeAssoc[Acyclic[N, E]] 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 Acyclic[N, E] to EdgeAssoc[Acyclic[N, E]] performed by method EdgeAssoc in scalax.collection.GraphPredef.
    Definition Classes
    EdgeAssoc
    Annotations
    @inline()
  54. def [B](y: B): (Acyclic[N, E], B)
    Implicit
    This member is added by an implicit conversion from Acyclic[N, E] to ArrowAssoc[Acyclic[N, E]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
  55. object Result extends PreCheckResultCompanion
    Attributes
    protected

Shadowed Implicit Value Members

  1. def toString(): String
    Implicit
    This member is added by an implicit conversion from Acyclic[N, E] to OuterNode[Acyclic[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:
    (acyclic: OuterNode[Acyclic[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 Acyclic[N, E] to OuterNode[Acyclic[N, E]]

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

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

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

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

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

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

Ungrouped