Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make multiplication with a scalar fall back to scale #2609

Closed
schillic opened this issue Mar 3, 2021 · 3 comments
Closed

Make multiplication with a scalar fall back to scale #2609

schillic opened this issue Mar 3, 2021 · 3 comments
Labels
wontfix 🔕 This will not be worked on

Comments

@schillic
Copy link
Member

schillic commented Mar 3, 2021

julia> X = rand(Interval)
Interval{Float64,IntervalArithmetic.Interval{Float64}}([0.419371, 1.82231])

julia> 2 * X
LinearMap{Float64,Interval{Float64,IntervalArithmetic.Interval{Float64}},Int64,SparseArrays.SparseMatrixCSC{Int64,Int64}}(
  [1, 1]  =  2, Interval{Float64,IntervalArithmetic.Interval{Float64}}([0.419371, 1.82231]))

I would have expected that I get a scaled interval here.

I propose to redefine *(α::Number, X::LazySet) = scale(α, X).

@schillic schillic added discussion 🗣️ Requires human input breaking ❌ This change may break things labels Mar 3, 2021
@mforets
Copy link
Member

mforets commented Mar 3, 2021

👍 why not. it is a special case. not sure about the general definition over LazySet though, because that needs to implement scale on every lazy set. on the other hand, the LinearMap only needs to have defined the support function so i think we should keep that behavior

@schillic
Copy link
Member Author

schillic commented Mar 3, 2021

Okay, maybe we can automatically define the methods for those sets that have scale defined.

@schillic schillic removed the discussion 🗣️ Requires human input label Mar 3, 2021
@schillic schillic added wontfix 🔕 This will not be worked on and removed breaking ❌ This change may break things labels Aug 16, 2022
@schillic
Copy link
Member Author

I decided against that. This would make the library inconsistent.

@schillic schillic closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix 🔕 This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants