50 for (
int i = 0; i < l; i++)
59 ndims () = j > 2 ? j : 2;
65 std::ostringstream buf;
67 for (
int i = 0; i <
length (); i++)
71 if (i < length () - 1)
75 std::string retval = buf.str ();
85 for (
int i = 0; i <
length (); i++)
99 for (
int i = 0; i < n_dims; i++)
105 throw std::bad_alloc ();
116 bool dims_changed = 1;
120 for (
int i = 0; i <
length (); i++)
125 new_dims(k++) =
elem (i);
180 int new_nd = dim < ndb ? ndb : dim + 1;
181 if (new_nd > orig_nd)
190 for (
int i = 0; i < ndb; i++)
192 if (i != dim &&
rep[i] != dvb(i))
199 for (
int i = ndb; i < new_nd; i++)
201 if (i != dim &&
rep[i] != 1)
209 rep[dim] += (dim < ndb ? dvb(dim) : 1);
214 if (ndb == 2 && dvb(0) == 0 && dvb(1) == 0)
216 else if (orig_nd == 2 &&
rep[0] == 0 &&
rep[1] == 0)
246 bool e2dv =
rep[0] +
rep[1] == 1;
247 bool e2dvb = dvb(0) + dvb(1) == 1;
275 for (
int i = 0; i < n_dims; i++)
278 for (
int i = n_dims; i < n; i++)
291 for (
int i = 0; i < n-1; i++)
295 for (
int i = n; i < n_dims; i++)