scalax.collection

constrained

package constrained

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.

Linear Supertypes
AnyRef, Any
Content Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. constrained
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait BinaryOp extends Op

  2. abstract class CompanionAlias[E[X] <: EdgeLikeIn[X]] extends GraphConstrainedCompanionAlias[Graph, E]

    Enables to quickly assemble immutable constrained graph companion modules.

  3. type Config = ConstrainedConfig

    Aims defining a constraint valid for Graph instances in the scope:

    Aims defining a constraint valid for Graph instances in the scope:

    implicit val config: Config = Acyclic
    val g = Graph(0 ~> 3) // g is constrained to Acyclic
  4. trait Constrained[N, E[X] <: EdgeLikeIn[X]] extends ConstraintMethods[N, E] with ConstraintHandlerMethods[N, E]

    Template to be mixed in by any constrained graph class.

  5. abstract class Constraint[N, E[X] <: EdgeLikeIn[X]] extends ConstraintMethods[N, E] with ConstraintHandlerMethods[N, E]

    Template to be implemented and passed to a dynamically constrained graph class by the user.

  6. class ConstraintBinaryOp[N, E[X] <: EdgeLikeIn[X]] extends ConstraintOp[N, E]

  7. trait ConstraintCompanion[+CC[N, E[X] <: EdgeLikeIn[X]] <: Constraint[N, E[X]]] extends AnyRef

    Base trait for ordinary Constraint companion objects.

  8. class ConstraintCompanionBinaryOp extends ConstraintCompanionOp

    Facilitates binary operations on ConstraintCompanions.

  9. abstract class ConstraintCompanionOp extends ConstraintCompanion[Constraint]

    Base class for any operation on ConstraintCompanions.

  10. trait ConstraintHandlerMethods[N, E[X] <: EdgeLikeIn[X]] extends AnyRef

    This template contains handler methods that are called by constrained graphs whenever a constraint has been violated.

  11. trait ConstraintMethods[N, E[X] <: EdgeLikeIn[X]] extends AnyRef

    This template contains all methods that constrained graphs call to decide whether operations altering a mutable graph or operations yielding a new graph from an immutable or mutable graph are valid.

  12. abstract class ConstraintOp[N, E[X] <: EdgeLikeIn[X]] extends Constraint[N, E]

  13. type DAG[N] = Graph[N, DiEdge]

    Default (immutable) directed acyclic Graph.

  14. type Forest[N] = Graph[N, UnDiEdge]

    Default (immutable) undirected acyclic Graph.

  15. trait Graph[N, E[X] <: EdgeLikeIn[X]] extends Set[GraphParam[N, E]] with collection.Graph[N, E] with GraphLike[N, E, Graph]

    A trait for dynamically constrained graphs.

  16. trait GraphLike[N, E[X] <: EdgeLikeIn[X], +This[X, Y[X] <: EdgeLikeIn[X]] <: GraphLike[X, Y[X], This] with Set[GraphParam[X, Y[X]]] with Graph[X, Y[X]]] extends collection.GraphLike[N, E, This] with Constrained[N, E]

    A template trait for graphs.

  17. sealed trait Op extends AnyRef

  18. class PreCheckResult extends AnyRef

    The return type of any pre-check.

  19. trait PreCheckResultCompanion extends AnyRef

  20. type Tree[N] = Graph[N, UnDiEdge]

    Default (immutable) undirected connected acyclic Graph.

  21. trait UserConstrainedGraph[N, E[X] <: EdgeLikeIn[X]] extends Graph[N, E]

Value Members

  1. object And extends BinaryOp with Product with Serializable

  2. def Config: ConstrainedConfig.type

    Companion object to configure Graph instances in the scope including ArraySet.Hints:

    Companion object to configure Graph instances in the scope including ArraySet.Hints:

    implicit val config = Config(Acyclic)(ArraySet.Hints(64, 0, 64, 75))
    val g = Graph(0 ~> 3) // g is constrained to Acyclic using the above optimization hints
  3. object DAG extends CompanionAlias[DiEdge] with Serializable

    Companion module for default (immutable) directed acyclic Graph.

  4. object Forest extends CompanionAlias[UnDiEdge] with Serializable

    Companion module for default (immutable) undirected acyclic Graph.

  5. object Graph extends GraphConstrainedCompanion[Graph] with Serializable

    Default factory for constrained graphs.

  6. object Or extends BinaryOp with Product with Serializable

  7. object PreCheckFollowUp extends Enumeration

    Enumerates the possible return statuses (also: follow-up activity) of a pre-check: Abort instructs the caller to cancel the operation because the pre-check failed; PostCheck means that the post-check (commit) still must be called; Complete means that the operation can safely be completed without invoking the post-check.

  8. object PreCheckResult extends PreCheckResultCompanion

  9. object Tree extends CompanionAlias[UnDiEdge] with Serializable

    Companion module for default (immutable) undirected connected acyclic Graph.

  10. package config

  11. implicit def constraintToConfig(constraint: ConstraintCompanion[Constraint])(implicit adjacencyListHints: Hints = ArraySet.Hints()): ConstrainedConfig

    Converts constraint to an instance of config.ConstrainedConfig.

  12. package constraints

    Predefined constraints that may be passed to constrained Graphs.

  13. def dagConstraint: constrained.constraints.Acyclic.PrefixedConstraintCompanion

    Constraint representing a DAG.

  14. def forestConstraint: constrained.constraints.Acyclic.PrefixedConstraintCompanion

    Constraint representing a forest.

  15. package generic

  16. package immutable

  17. package mutable

    Mutable constrained graph templates.

  18. def treeConstraint: constrained.ConstraintCompanionBinaryOp.PrefixedConstraintCompanion

    Constraint representing an undirected tree.

Inherited from AnyRef

Inherited from Any

Ungrouped