[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51329] Median fails due to nth_element in --t
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #51329] Median fails due to nth_element in --traditional |
Date: |
Wed, 28 Jun 2017 13:51:05 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 |
Follow-up Comment #3, bug #51329 (project octave):
Hi there, Carnë Draug,
I agree with you w/r/t --traditional, and since the patch is likely to take
some time we will be looking into our need for the use of --traditional.
However, I debugged the code and found out the type of the argument passed to
the nth_element function in Array.cc is different with --traditional and
without. The added line represents the type of the variable with
--traditional.
This might be fixing the symptom and not the actual problem. But this works
for our test case. I also note that this might cause other previously invalid
commands to work incorrectly.
diff -r 5a97aafb12a9 liboctave/array/Array.cc
--- a/liboctave/array/Array.cc Wed Jun 28 01:15:21 2017 -0400
+++ b/liboctave/array/Array.cc Wed Jun 28 13:43:04 2017 -0400
@@ -2337,6 +2337,7 @@ Array<T>::nth_element (const idx_vector&
mode = ASCENDING;
lo = n(0);
break;
+ case idx_vector::class_vector:
case idx_vector::class_range:
{
octave_idx_type inc = n.increment ();
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51329>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #51329] Median fails due to nth_element in --traditional, anonymous, 2017/06/27
- [Octave-bug-tracker] [bug #51329] Median fails due to nth_element in --traditional, Carnë Draug, 2017/06/28
- [Octave-bug-tracker] [bug #51329] Median fails due to nth_element in --traditional, Carnë Draug, 2017/06/28
- [Octave-bug-tracker] [bug #51329] Median fails due to nth_element in --traditional,
anonymous <=
- [Octave-bug-tracker] [bug #51329] Median fails due to nth_element in --traditional, Nicholas Jankowski, 2017/06/28
- [Octave-bug-tracker] [bug #51329] Median fails due to nth_element in --traditional, Avinoam Kalma, 2017/06/28
- [Octave-bug-tracker] [bug #51329] Median fails due to nth_element in --traditional, Nicholas Jankowski, 2017/06/28
- [Octave-bug-tracker] [bug #51329] Median fails due to nth_element in --traditional, Nicholas Jankowski, 2017/06/28
- [Octave-bug-tracker] [bug #51329] Median fails due to nth_element in --traditional, anonymous, 2017/06/28
- [Octave-bug-tracker] [bug #51329] Median fails due to nth_element in --traditional, Nicholas Jankowski, 2017/06/28
- [Octave-bug-tracker] [bug #51329] nth_element / median function fail with disable_range(true) (or with --traditional), Mike Miller, 2017/06/28
- [Octave-bug-tracker] [bug #51329] nth_element / median function fail with disable_range(true) (or with --traditional), anonymous, 2017/06/28
- [Octave-bug-tracker] [bug #51329] nth_element / median function fail with disable_range(true) (or with --traditional), anonymous, 2017/06/28
- [Octave-bug-tracker] [bug #51329] nth_element / median function fail with disable_range(true) (or with --traditional), Nicholas Jankowski, 2017/06/28