Mercurial > octave
view test/bug-53027/bug-53027.tst @ 31240:bf8f33249e86
delaunayn simplex check consistency and performance improvement (bug #60818)
* delaunayn.m: Apply consistent volume calculation across all trivial simplex
removal code paths. Vectorize 3D simplex removal code path and minimize
function calls within >3D loop for performance improvement. Update FIXME note
for future performance improvement. Add input type validation checks. Add BISTs
for dimensions other than 2D, simplex removal, and input validation.
* etc/News.8.md: Describe function improvements under General Improvements.
author | Nicholas R. Jankowski <jankowski.nicholas@gmail.com> |
---|---|
date | Wed, 28 Sep 2022 14:35:30 -0400 |
parents | 34617dd78f02 |
children | 332a6ccac881 |
line wrap: on
line source
%!function load53027 (fname) %! global X %! X = 2; %! load (fname); %! assert (X, 1); %!endfunction %!function save53027 (fname) %! global X %! X = 1; %! save (fname, "X"); %!endfunction %!test <*53027> %! global X %! X = 0; %! fname = tempname (); %! save53027 (fname); %! assert (X, 1); %! load53027 (fname); %! assert (X, 1); %! load53027 (fname); %! assert (X, 1); %! clear X %! assert (exist ("X"), 0); %! clear -global X; # cleanup after test %!test <*53027> %! [a, b] = ntest53027a (); %! assert ([a, b], [0, 0]) %! clear -global x; # cleanup after test %!test <*53027> %! [a, b] = ntest53027b (); %! assert ([a, b], [0, 0]) %! clear -global x; # cleanup after test %!test <*53027> %! [a, b] = ntest53027c (); %! assert ([a, b], [0, 0]) %! clear -global x; # cleanup after test ## Previous bugs have caused segfaults when executing script twice. %!test <*53027> %! gtest53027 %! assert (isempty (a) && isempty (c)) %! assert (isglobal ("a") && isglobal ("c")) %! assert (! exist ("b")) %! assert (isempty (xx) && ! isglobal ("xx")) %! gtest53027 %! assert (isempty (a) && isempty (c)) %! assert (isglobal ("a") && isglobal ("c")) %! assert (! exist ("b")) %! assert (isempty (xx) && ! isglobal ("xx")) %! clear -global a b c;