예제 #1
0
 //[duplicated code from DoubleArrayExtension]
 public static IntArray GetCols(this IntArray x, IList <int> theseCols)
 {
     if (x.size0 == 1)
     {
         Slice[] s = new Slice[1];
         s[0] = new Slice(theseCols);
         IntArray newX = x.GetSliceDeep(s);
         return(newX);
     }
     else
     {
         Slice[] s = new Slice[2];
         s[0] = Slice.All;
         s[1] = new Slice(theseCols);
         IntArray newX = x.GetSliceDeep(s);
         return(newX);
     }
 }
예제 #2
0
 //[duplicated code from DoubleArrayExtension]
 public static IntArray GetColSlice(this IntArray x, int firstCol, int colStep, int maxCol)
 {
     return(x.GetSliceDeep(0, x.size0 - 1, 1, firstCol, maxCol, colStep));
 }
예제 #3
0
 //[duplicated code from DoubleArrayExtension]
 public static IntArray GetRowSlice(this IntArray x, int firstRow, int rowStep, int maxRow)
 {
     return(x.GetSliceDeep(firstRow, maxRow, rowStep, 0, x.size1 - 1, 1));
 }