[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55751] scatter3 performance regression bug in
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #55751] scatter3 performance regression bug in Octave 5.0.91 |
Date: |
Sat, 23 Feb 2019 13:27:17 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0 |
Follow-up Comment #14, bug #55751 (project octave):
Attached is a first shot at a coplanarity check using the volume of
tetrahedrons.
It is fairly efficient for random data:
>> N=1e7; x = rand (N, 1); y = rand(N, 1); z = rand(N, 1);
>> tic, is_coplanar (x, y, z), toc
ans = 0
Elapsed time is 1.28589 seconds.
And for coplanar (but not colinear) data:
>> N=1e7; x = y = z = 1:N; y = y.*(-1).^y; z = z.^3;
>> tic, is_coplanar (x, y, z), toc
ans = 1
Elapsed time is 1.25889 seconds.
But not so efficient if all data is colinear:
>> N=1e5; x = y = z = 1:N;
>> tic, is_coplanar (x, y, z), toc
ans = 1
Elapsed time is 6.73134 seconds.
Is there an efficient way to check whether many 3d vectors are colinear?
Also what criteria could we use to define that two vectors are "sufficiently
non-colinear" for the cross-product?
The results with the matGeom function as a point of comparison:
>> N=1e3; x = rand (N, 1); y = rand(N, 1); z = rand(N, 1);
>> tic, isCoplanar (x, y, z), toc
error: out of memory or dimension too large for Octave's index type
error: called from
nchoosek at line 134 column 9
isCoplanar at line 66 column 5
>> N=1e2; x = rand (N, 1); y = rand(N, 1); z = rand(N, 1);
>> tic, isCoplanar (x, y, z), toc
ans = 0
Elapsed time is 0.337654 seconds.
(file #46341)
_______________________________________________________
Additional Item Attachment:
File name: is_coplanar.m Size:1 KB
<https://savannah.gnu.org/file/is_coplanar.m?file_id=46341>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55751>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #55751] scatter3 performance regression bug in Octave 5.0.91, (continued)
- [Octave-bug-tracker] [bug #55751] scatter3 performance regression bug in Octave 5.0.91, Markus Mützel, 2019/02/21
- [Octave-bug-tracker] [bug #55751] scatter3 performance regression bug in Octave 5.0.91, Pantxo Diribarne, 2019/02/21
- [Octave-bug-tracker] [bug #55751] scatter3 performance regression bug in Octave 5.0.91, Markus Mützel, 2019/02/21
- [Octave-bug-tracker] [bug #55751] scatter3 performance regression bug in Octave 5.0.91, Pantxo Diribarne, 2019/02/21
- [Octave-bug-tracker] [bug #55751] scatter3 performance regression bug in Octave 5.0.91, Rik, 2019/02/21
- [Octave-bug-tracker] [bug #55751] scatter3 performance regression bug in Octave 5.0.91, Juan Pablo Carbajal, 2019/02/22
- [Octave-bug-tracker] [bug #55751] scatter3 performance regression bug in Octave 5.0.91, Markus Mützel, 2019/02/22
- [Octave-bug-tracker] [bug #55751] scatter3 performance regression bug in Octave 5.0.91, Markus Mützel, 2019/02/22
- [Octave-bug-tracker] [bug #55751] scatter3 performance regression bug in Octave 5.0.91, Markus Mützel, 2019/02/22
- [Octave-bug-tracker] [bug #55751] scatter3 performance regression bug in Octave 5.0.91, Juan Pablo Carbajal, 2019/02/22
- [Octave-bug-tracker] [bug #55751] scatter3 performance regression bug in Octave 5.0.91,
Markus Mützel <=
- [Octave-bug-tracker] [bug #55751] scatter3 performance regression bug in Octave 5.0.91, Eddy, 2019/02/24