[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #39370] contourc adds duplicates to the start
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #39370] contourc adds duplicates to the start and end of the 1st level |
Date: |
Mon, 25 Jul 2022 21:39:43 -0400 (EDT) |
Follow-up Comment #11, bug #39370 (project octave):
Just for fun, I put tic() and toc() around the uniquifying code and then did
[xx,yy,zz] = sombrero ();
c = contourc (xx,yy,zz, 10);
Running this a few times the extra code adds 10-13 milliseconds to the run
time which isn't much. I then increased the number of levels to 50 to stress
the code, but it still took only 25 milliseconds.
I don't think performance is the issue, but I do think finite precision is.
For example,
[xx,yy,zz] = sombrero ();
c = contourc (xx,yy,zz, [0.95, 0.98, 0.99])
c =
Columns 1 through 7:
0.9500 -0.3618 0 0.3618 0.4000 0.5226 0.4000
13.0000 -0.4000 -0.5226 -0.4000 -0.3618 0 0.3618
Columns 8 through 14:
0.3618 0 -0.3618 -0.4000 -0.5226 -0.4000 -0.3618
0.4000 0.5226 0.4000 0.3618 0 -0.3618 -0.4000
Columns 15 through 21:
0.9800 -0.3024 0 0.3024 0 -0.3024 0.9900
5.0000 0 -0.3024 0 0.3024 0 5.0000
Columns 22 through 26:
-0.1512 0 0.1512 0 -0.1512
0 -0.1512 0 0.1512 0
For the contour at 0.95, the first and last entries are within an eps of each
other.
c(:,2) - c(:,14)
ans =
-5.5511e-17
0
Perhaps this speaks to working on this in the C++ code.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?39370>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #39370] contourc adds duplicates to the start and end of the 1st level, Nicholas Jankowski, 2022/07/22
- [Octave-bug-tracker] [bug #39370] contourc adds duplicates to the start and end of the 1st level, Nicholas Jankowski, 2022/07/25
- [Octave-bug-tracker] [bug #39370] contourc adds duplicates to the start and end of the 1st level, Nicholas Jankowski, 2022/07/25
- [Octave-bug-tracker] [bug #39370] contourc adds duplicates to the start and end of the 1st level, Rik, 2022/07/25
- [Octave-bug-tracker] [bug #39370] contourc adds duplicates to the start and end of the 1st level,
Rik <=
- [Octave-bug-tracker] [bug #39370] contourc adds duplicates to the start and end of the 1st level, Nicholas Jankowski, 2022/07/26
- [Octave-bug-tracker] [bug #39370] contourc adds duplicates to the start and end of the 1st level, Nicholas Jankowski, 2022/07/26
- [Octave-bug-tracker] [bug #39370] contourc adds duplicates to the start and end of the 1st level, Rik, 2022/07/26
- [Octave-bug-tracker] [bug #39370] contourc adds duplicates to the start and end of the 1st level, Nicholas Jankowski, 2022/07/26