/usr/share/octave/packages/image-2.2.2/uintlut.m is in octave-image 2.2.2-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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | ## Copyright (C) 2004 Josep Mones i Teixidor <jmones@puntbarra.com>
##
## This program is free software; you can redistribute it and/or modify it under
## the terms of the GNU General Public License as published by the Free Software
## Foundation; either version 3 of the License, or (at your option) any later
## version.
##
## This program is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
## details.
##
## You should have received a copy of the GNU General Public License along with
## this program; if not, see <http://www.gnu.org/licenses/>.
## -*- texinfo -*-
## @deftypefn {Function File} {@var{B} =} uintlut (@var{A}, @var{LUT})
## Computes matrix B by using A as an index to lookup table LUT.
##
## This function has been deprecated. Use @code{intlut} instead.
##
## B = uintlut(A, LUT) calculates a matrix B by using @var{LUT} as a
## lookup table indexed by values in @var{A}.
##
## B class is the same as @var{LUT}.
## @end deftypefn
function B = uintlut (A, LUT)
if (nargin != 2)
print_usage;
endif
persistent warned = false;
if (! warned)
warned = true;
warning ("Octave:deprecated-function",
["`uintlut' has been deprecated in favor of `intlut'. This " ...
"function will be removed from future versions of the `image'" ...
" package"]);
endif
B = LUT(A);
endfunction
%!demo
%! uintlut(uint8([1,2,3,4]),uint8([255:-1:0]));
%! % Returns a uint8 array [255,254,253,252]
%!assert(uintlut(uint8([1,2,3,4]),uint8([255:-1:0])), uint8([255:-1:252]));
%!assert(uintlut(uint16([1,2,3,4]),uint16([255:-1:0])), uint16([255:-1:252]));
%!assert(uintlut(uint32([1,2,3,4]),uint32([255:-1:0])), uint32([255:-1:252]));
%!assert(uintlut(uint64([1,2,3,4]),uint64([255:-1:0])), uint64([255:-1:252]));
|