public void setdims(idxd <int> s) { ndim = s.order(); // copy existing dimensions for (int i = 0; i < s.order(); ++i) { dims[i] = s.dim(i); } // set remaining to -1 int ord = Math.Max(0, s.order()); for (int i = ord; i < Global.MAXDIMS; i++) { dims[i] = -1; } if (!(s.offsets == null)) { for (int i = 0; i < s.order(); ++i) { offsets[i] = s.offsets[i]; } } else { offsets = null; } }
public idxdim(idxd <int> s) { dims = new int[Global.MAXDIMS] { -1, -1, -1, -1, -1, -1, -1, -1 }; offsets = new int[Global.MAXDIMS]; setdims(s); }
public fidxdim(idxd <dynamic> s) { dims = new float[Global.MAXDIMS] { -1, -1, -1, -1, -1, -1, -1, -1 }; offsets = new float[Global.MAXDIMS]; setdims(s); }