comparison liboctave/Array-util.cc @ 7924:4976f66d469b

miscellaneous cleanup
author John W. Eaton <jwe@octave.org>
date Fri, 11 Jul 2008 17:59:28 -0400
parents 935be827eaf8
children 7cbe01c21986
comparison
equal deleted inserted replaced
7923:c3d21b9b94b6 7924:4976f66d469b
137 bool 137 bool
138 is_vector (const dim_vector& dim) 138 is_vector (const dim_vector& dim)
139 { 139 {
140 int m = 0; 140 int m = 0;
141 int n = dim.length (); 141 int n = dim.length ();
142 bool retval = true;
143 142
144 if (n == 0) 143 if (n == 0)
145 m = 2; 144 m = 2;
146 else 145 else
147 { 146 {
149 if (dim (i) > 1) 148 if (dim (i) > 1)
150 m++; 149 m++;
151 else if (dim(i) < 1) 150 else if (dim(i) < 1)
152 m += 2; 151 m += 2;
153 } 152 }
153
154 return (m < 2); 154 return (m < 2);
155 } 155 }
156 156
157 bool 157 bool
158 any_ones (const Array<octave_idx_type>& arr) 158 any_ones (const Array<octave_idx_type>& arr)