From: <ha...@us...> - 2008-03-21 14:06:36
|
Revision: 4771 http://octave.svn.sourceforge.net/octave/?rev=4771&view=rev Author: hauberg Date: 2008-03-21 07:06:22 -0700 (Fri, 21 Mar 2008) Log Message: ----------- Minor changes between int and octave_idx_type Modified Paths: -------------- trunk/octave-forge/main/image/src/__cordfltn__.cc Modified: trunk/octave-forge/main/image/src/__cordfltn__.cc =================================================================== --- trunk/octave-forge/main/image/src/__cordfltn__.cc 2008-03-21 14:01:36 UTC (rev 4770) +++ trunk/octave-forge/main/image/src/__cordfltn__.cc 2008-03-21 14:06:22 UTC (rev 4771) @@ -103,7 +103,7 @@ template <class MT, class ET> octave_value_list do_filtering(MT A, int nth, const boolNDArray dom, MT S) { - const octave_idx_type ndims = dom.ndims(); + const int ndims = dom.ndims(); const octave_idx_type dom_numel = dom.numel(); const dim_vector dom_size = dom.dims(); const dim_vector A_size = A.dims(); @@ -121,12 +121,12 @@ } dim_vector dim_offset(dom_size); - for (octave_idx_type i = 0; i < ndims; i++) { dim_offset(i) = (dom_size(i)+1)/2 -1; } + for (int i = 0; i < ndims; i++) dim_offset(i) = (dom_size(i)+1)/2 -1; // Allocate output octave_value_list retval; dim_vector out_size(dom_size); - for (octave_idx_type i = 0; i < ndims; i++) { out_size(i) = A_size(i) - dom_size(i) + 1; } + for (int i = 0; i < ndims; i++) out_size(i) = A_size(i) - dom_size(i) + 1; MT out = MT(out_size); const octave_idx_type out_numel = out.numel(); @@ -140,7 +140,7 @@ ET values[len]; int l = 0; for (int n = 0; n < ndims; n++) dom_idx(n) = 0; - for (int j = 0; j < dom_numel; j++) { + for (octave_idx_type j = 0; j < dom_numel; j++) { for (int n = 0; n < ndims; n++) A_idx(n) = out_idx(n) + dom_idx(n); if (dom(dom_idx)) values[l++] = A(A_idx) + S(dom_idx); dom.increment_index(dom_idx, dom_size); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |