24 #if defined (HAVE_CONFIG_H)
60 for (
int i = 0;
i < l;
i++)
69 rep[-1] = j > 2 ? j : 2;
75 std::ostringstream buf;
107 int n_dims =
ndims ();
109 for (
int i = 0;
i < n_dims;
i++)
115 throw std::bad_alloc ();
126 bool dims_changed = 1;
135 new_dims(k++) =
elem (
i);
189 int orig_nd =
ndims ();
190 int ndb = dvb.
ndims ();
191 int new_nd = dim < ndb ? ndb : dim + 1;
192 if (new_nd > orig_nd)
201 for (
int i = 0;
i < ndb;
i++)
203 if (
i != dim &&
rep[
i] != dvb(
i))
210 for (
int i = ndb;
i < new_nd;
i++)
212 if (
i != dim &&
rep[
i] != 1)
220 rep[dim] += (dim < ndb ? dvb(dim) : 1);
224 if (ndb == 2 && dvb(0) == 0 && dvb(1) == 0)
226 else if (orig_nd == 2 &&
rep[0] == 0 &&
rep[1] == 0)
256 bool e2dv =
rep[0] +
rep[1] == 1;
257 bool e2dvb = dvb(0) + dvb(1) == 1;
277 int n_dims =
ndims ();
285 for (
int i = 0;
i < n_dims;
i++)
288 for (
int i = n_dims;
i < n;
i++)
301 for (
int i = 0;
i < n-1;
i++)
305 for (
int i = n;
i < n_dims;
i++)
for(octave_idx_type n=0;n< hcv.numel();n++)
std::string str(char sep= 'x') const
void resize(int n, int fill_value=0)
octave_idx_type & elem(int i)
dim_vector squeeze(void) const
bool concat(const dim_vector &dvb, int dim)
This corresponds to cat().
octave_idx_type safe_numel(void) const
void chop_all_singletons(void)
static octave_idx_type * nil_rep(void)
static const octave_idx_type idx_max
dim_vector redim(int n) const
static dim_vector alloc(int n)
charNDArray max(char d, const charNDArray &m)
=val(i)}if ode{val(i)}occurs in table i
octave_idx_type ndims(void) const
Number of dimensions.
bool hvcat(const dim_vector &dvb, int dim)
This corresponds to [,] (horzcat, dim = 0) and [;] (vertcat, dim = 1).
static octave_idx_type dim_max(void)
Vector representing the dimensions (size) of an Array.
void chop_trailing_singletons(void)
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string