Skip to content

Define AbstractContractor here and import it in other packages #44

@lucaferranti

Description

@lucaferranti

At the moment both IntervalRootFinding and ICP define a type Contractor in incompatible ways (Contractor is an abstract type in IntervalRootFinding and a concrete type in ICP). This produces some unpleasant complications if both packages are imported.

julia> using IntervalRootFinding, IntervalConstraintProgramming, ModelingToolkit

julia> @variables x y
(x, y)

julia> C = Contractor(x+y)
WARNING: both IntervalConstraintProgramming and IntervalRootFinding export "Contractor"; uses of it in module Main must be qualified
ERROR: UndefVarError: Contractor not defined
Stacktrace:
 [1] top-level scope at REPL[23]:1

Maybe we could define AbstractContractor as an abstract type in this package and have

  • Newtonn, Krawczyk, Bisection <: AbstractContractor in IntervalRootFinding
  • Contractor, BasicContractor <: AbstractContractor in ICP

with AbstractContractor being imported from here in both packages.

I guess a more coherent name for the current Contractor in ICP would then be ForwardBackward, but maybe it is a little clumsy as a name?

Anyway, here just a couple of ideas to start brainstorming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions