Giter VIP home page Giter VIP logo

Comments (9)

YingboMa avatar YingboMa commented on August 22, 2024

Do you have an MWE?

from integrals.jl.

YingboMa avatar YingboMa commented on August 22, 2024

Since transformation_if_inf is kind of a f->g function. It's either going to be type unstable, or we need to introduce the extra overhead for every function call. We should add an argument like do_inf_transformation=Val{true}().

from integrals.jl.

agerlach avatar agerlach commented on August 22, 2024

I don't recall what exactly I meant by "updating". Here is a MWE I just put together, I'm not sure if it captures the same problem I had in the OP.

using Quadrature , Distributions , Test

μ = [0.00 , 0.00]
Σ = [0.4 0.0 ; 0.00 0.4]
d = MvNormal(μ , Σ)
m(x , p) = pdf(d, x)
prob = QuadratureProblem{false}(m, [-Inf , -Inf] , [Inf , Inf])
sol = solve(prob,HCubatureJL(),reltol=1e-3,abstol=1e-3)

from integrals.jl.

ChrisRackauckas avatar ChrisRackauckas commented on August 22, 2024

It's either going to be type unstable, or we need to introduce the extra overhead for every function call. We should add an argument like do_inf_transformation=Val{true}().

Could it not use a function barrier or something?

from integrals.jl.

YingboMa avatar YingboMa commented on August 22, 2024

Not really, because it's a higher order function.

from integrals.jl.

ChrisRackauckas avatar ChrisRackauckas commented on August 22, 2024

There must be something, we can chat about this at the summit.

from integrals.jl.

YingboMa avatar YingboMa commented on August 22, 2024

I mean transformation_if_inf is kind of like a function barrier, and it's type unstable. The actual integration is type stable.

from integrals.jl.

sharanry avatar sharanry commented on August 22, 2024

from integrals.jl.

lxvm avatar lxvm commented on August 22, 2024

I've addressed this issue in #241 by making sure with tests that all solves in the package are type-stable. I also deprecated do_inf_transformation and opted to transform all problems at solve time instead of init time. Note this does not guarantee type-groundedness, e.g. HCubatureJL is only type grounded when the limits of integration are vectors with static length.

from integrals.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.