/usr/share/octave/packages/3.2/nurbs-1.3.3/private/onebasisfun__.m is in octave-nurbs 1.3.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | function N = onebasisfun__ (u, p, U)
% __ONEBASISFUN__: Undocumented internal function
%
% Copyright (C) 2009 Carlo de Falco
% This software comes with ABSOLUTELY NO WARRANTY; see the file
% COPYING for details. This is free software, and you are welcome
% to distribute it under the conditions laid out in COPYING.
N = 0;
if (~ any (U <= u)) || (~ any (U > u))
return;
elseif (p == 0)
N = 1;
return;
end
ln = u - U(1);
ld = U(end-1) - U(1);
if (ld ~= 0)
N = N + ln * onebasisfun__ (u, p-1, U(1:end-1))/ ld;
end
dn = U(end) - u;
dd = U(end) - U(2);
if (dd ~= 0)
N = N + dn * onebasisfun__ (u, p-1, U(2:end))/ dd;
end
end
|