[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-va
From: |
Michael Leitner |
Subject: |
[Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration |
Date: |
Fri, 20 May 2022 04:21:57 -0400 (EDT) |
Follow-up Comment #22, bug #62468 (project octave):
I completely agree with your comments. In the non-arrayvalued code paths, both
octave and matlab require the integrands to be vectorized, meaning you can
pass in arrays x of any size, they return a with size(a)==size(x), and for all
i in [1..numel(x)] it is fulfilled f(x(i))==f(x)(i). This is to allow
vectorized evaluations, which in these interpreted language are much more
efficient than element-wise.
And yes, in my octave-implementation of the arrayvalued codepath in quadgk, as
well as in octave's existing quadv, the price you pay for being able to
integrate array-valued functions is that you can only evaluate them
point-wise. And as it was to be expected, your test how matlab behaves implies
that it does it also like that. But matlab has JIT, meaning that it probably
doesn't hurt so much on their side.
The only difference is that my implementation of quadgk tries to decide on its
own whether the integrand is array-valued or not. I think there should be no
problems with that, but it is to be decided whether we want this behaviour, or
whether we do it like matlab and require the user to explicitly specify
array-valued integration if it should be done.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62468>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration, (continued)
- [Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration, Michael Leitner, 2022/05/19
- [Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration, Nicholas Jankowski, 2022/05/19
- [Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration, Michael Leitner, 2022/05/19
- [Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration, Nicholas Jankowski, 2022/05/19
- [Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration, Nicholas Jankowski, 2022/05/19
- [Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration, Michael Leitner, 2022/05/19
- [Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration, Nicholas Jankowski, 2022/05/19
- [Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration, Nicholas Jankowski, 2022/05/19
- [Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration, Michael Leitner, 2022/05/19
- [Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration, Nicholas Jankowski, 2022/05/19
- [Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration,
Michael Leitner <=
- [Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration, Nicholas Jankowski, 2022/05/20
- [Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration, Rik, 2022/05/25
- [Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration, Rik, 2022/05/26