Class/Object

com.cra.figaro.algorithm.structured.strategy.refine

TopDownStrategy

Related Docs: object TopDownStrategy | package refine

Permalink

class TopDownStrategy extends FlatStrategy

Strategies that refine a fixed set of components, as well as all dependent components that are also in the collection.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TopDownStrategy
  2. FlatStrategy
  3. DepthFirstStrategy
  4. RefiningStrategy
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TopDownStrategy(collection: ComponentCollection, topLevel: ProblemComponent[_]*)

    Permalink

    collection

    Collection of components to refine.

    topLevel

    Components from which to initialize the top-down search for dependent components. Strictly speaking, it is not essential that these components be top-level (i.e. have no args), but most components that are not top-level cannot be refined without first refining their args. It is up to the caller of this constructor to ensure that (1) the components in this set and their arguments already belong to the collection, and (2) that such a call maintains consistency across component ranges.

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def checkArg[T](element: Element[T]): ProblemComponent[T]

    Permalink

    Get the problem component associated with an element.

    Get the problem component associated with an element. This may involve adding the element to the collection if a problem component has not yet been created.

    element

    Element for which to return a problem component.

    Definition Classes
    FlatStrategyDepthFirstStrategy
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val collection: ComponentCollection

    Permalink

    Collection of components to refine.

    Collection of components to refine.

    Definition Classes
    RefiningStrategy
  8. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. def execute(): Unit

    Permalink

    Refine in place using this strategy.

    Refine in place using this strategy. This will recursively mark as unsolved any problems whose solutions are no longer applicable as a result of refinement. This also marks problem components as fully enumerated or refined where applicable.

    Definition Classes
    DepthFirstStrategyRefiningStrategy
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def generateRange(comp: ProblemComponent[_]): Unit

    Permalink

    Process a component by generating its range, if it is not already fully enumerated.

    Process a component by generating its range, if it is not already fully enumerated. After calling this method, it may be necessary to check if the component is fully enumerated or refined.

    comp

    Component to process.

    Definition Classes
    RefiningStrategy
  13. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  15. val initialComponents: Set[ProblemComponent[_]]

    Permalink

    Components to refine.

    Components to refine. Often, this is a set of atomic components and their dependencies. Note that this strategy does not recursively add or update any components not in this set. Thus, it is up to the caller of this constructor to ensure that (1) the components in this set and their arguments already belong to the collection, and (2) that such a call maintains consistency across component ranges.

    Definition Classes
    FlatStrategyDepthFirstStrategy
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. def markProblemsUnsolved(problems: Set[Problem]): Unit

    Permalink

    Recursively marks as unsolved any problem whose solution could have changed as a result of refinement by this strategy or any of its recursively generated strategies.

    Recursively marks as unsolved any problem whose solution could have changed as a result of refinement by this strategy or any of its recursively generated strategies.

    Attributes
    protected
    Definition Classes
    RefiningStrategy
  18. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  21. def process[V](comp: ProblemComponent[V]): Unit

    Permalink

    Generate the range for the given component.

    Generate the range for the given component. Mark it as fully refined or enumerated if applicable.

    comp

    Component to process. This should not be called on a component we previously processed, including fully refined components.

    Definition Classes
    DepthFirstStrategy
  22. def processAtomic[V](atomicComp: AtomicComponent[V]): Unit

    Permalink

    Generate the range for the given atomic component.

    Generate the range for the given atomic component. Mark it as fully refined or enumerated if applicable.

    atomicComp

    Atomic component to process. This should not be called on a component we previously processed, including fully refined components.

    Definition Classes
    DepthFirstStrategy
  23. def processChain[P, V](chainComp: ChainComponent[P, V]): Unit

    Permalink

    Generate the range for the given Chain component.

    Generate the range for the given Chain component. Mark it as fully refined or enumerated if applicable.

    chainComp

    Chain component to process. This should not be called on a component we previously processed, including fully refined components.

    Definition Classes
    FlatStrategyDepthFirstStrategy
  24. def processMakeArray[V](maComp: MakeArrayComponent[V]): Unit

    Permalink

    Generate the range for the given MakeArray component.

    Generate the range for the given MakeArray component. Mark it as fully refined or enumerated if applicable.

    maComp

    MakeArray component to process. This should not be called on a component we previously processed, including fully refined components.

    Definition Classes
    FlatStrategyDepthFirstStrategy
  25. def refine(comp: ProblemComponent[_]): Unit

    Permalink

    Refine a single problem component by recursively refining components on which it depends, then generating the range for each component.

    Refine a single problem component by recursively refining components on which it depends, then generating the range for each component. This guarantees that when ranges are created, all components on which a component depends will have been processed.

    As a rule, this method never works in the other direction. If component B depends (directly or indirectly) on component A, then calling decompose on A will never recursively call decompose on component B. This is to avoid infinite loops, and to guarantee that the range of A does not unpredictably change in the middle of a call to decompose A.

    Once the range has been created, the component will be added to the set done, and (if applicable) the component is marked as fully enumerated or refined.

    comp

    Component to refine. This strategy never refines a component more than once, so if the component is fully refined or in the set done, this method does nothing.

    Definition Classes
    DepthFirstStrategy
  26. def shouldRefine(comp: ProblemComponent[_]): Boolean

    Permalink

    Decide if this strategy should refine the given problem component.

    Decide if this strategy should refine the given problem component. This is usually based on the refinement status of the component and the components on which it depends. This check should not depend on the set done; such a check is performed separately.

    comp

    Component to consider refining.

    returns

    True if and only if this strategy should refine the argument.

    Definition Classes
    FlatStrategyDepthFirstStrategy
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from FlatStrategy

Inherited from DepthFirstStrategy

Inherited from RefiningStrategy

Inherited from AnyRef

Inherited from Any

Ungrouped