Mercurial > hg > octave-image
changeset 135:e39e17d1d4ff
Fix tests for functions which return boolean matrices
author | pkienzle |
---|---|
date | Mon, 15 Nov 2004 16:04:20 +0000 |
parents | 3ebc00c62fef |
children | 78b9878c50f0 |
files | blkproc.m nlfilter.m |
diffstat | 2 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/blkproc.m +++ b/blkproc.m @@ -155,7 +155,7 @@ %!assert(blkproc(eye(6),[2,2],"sum"),blkproc(eye(6),[2,2],@sum)); %!assert(blkproc(eye(6),[2,2],"sum"),blkproc(eye(6),[2,2],inline("sum(x)","x"))); %!assert(blkproc(eye(6),[1,2],@sum),kron(eye(3),[1;1])); -%!assert(blkproc(eye(6),[2,2],inline("any(x(:))","x")),eye(3)); +%!assert(blkproc(eye(6),[2,2],inline("any(x(:))","x")),eye(3)!=0); %!assert(blkproc(eye(6),[1,2],[1,1],inline("sum(x(:))","x")),[2,1,0;3,2,0;2,3,1;1,3,2;0,2,3;0,1,2]); %!assert(blkproc(eye(6),'indexed',[1,2],[1,1],inline("sum(x(:))","x")),[8,5,6;6,2,3;5,3,4;4,3,5;3,2,6;6,5,8]); %!assert(blkproc(eye(6),[2,3],[4,3],inline("sum(x(:))","x")),ones(3,2)*6); @@ -172,6 +172,9 @@ % % $Log$ +% Revision 1.4 2004/11/15 16:04:20 pkienzle +% Fix tests for functions which return boolean matrices +% % Revision 1.3 2004/09/03 17:49:37 jmones % Improved uint8 and uint16 padding expections % @@ -181,4 +184,4 @@ % Revision 1.1 2004/08/15 19:27:46 jmones % blkproc: block process an image using user-supplied function % -% \ No newline at end of file +%
--- a/nlfilter.m +++ b/nlfilter.m @@ -136,7 +136,7 @@ %!assert(nlfilter(eye(4),[2,3],inline("sum(x(:))","x")),[2,2,1,0;1,2,2,1;0,1,2,2;0,0,1,1]); %!assert(nlfilter(eye(4),'indexed',[2,3],inline("sum(x(:))","x")),[4,2,1,2;3,2,2,3;2,1,2,4;4,3,4,5]); -%!assert(nlfilter(eye(4),'indexed',[2,3],inline("sum(x(:))==y","x","y"),2),[0,1,0,1;0,1,1,0;1,0,1,0;0,0,0,0]); +%!assert(nlfilter(eye(4),'indexed',[2,3],inline("sum(x(:))==y","x","y"),2),[0,1,0,1;0,1,1,0;1,0,1,0;0,0,0,0]!=0); % Check uint8 and uint16 padding %!assert(nlfilter(uint8(eye(4)),'indexed',[2,3],inline("sum(x(:))","x")),[2,2,1,0;1,2,2,1;0,1,2,2;0,0,1,1]); @@ -149,6 +149,9 @@ % % $Log$ +% Revision 1.4 2004/11/15 16:04:20 pkienzle +% Fix tests for functions which return boolean matrices +% % Revision 1.3 2004/09/03 13:28:32 jmones % Corrected behaviour for int* and uint* types % @@ -158,4 +161,4 @@ % Revision 1.1 2004/08/15 19:42:14 jmones % nlfilter: Processes image in siliding blocks using user-supplied function % -% \ No newline at end of file +%