示例#1
0
        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;
            }
        }
示例#2
0
 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);
 }
示例#3
0
 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);
 }