Пример #1
0
 public RowArrayPtr <SparseRowValue> getRowPtr(int row)
 {
     //Console.WriteLine("Creating row ptr {0} {1} ", row, val[row].Length-1);
     if (val.ContainsKey(row))
     {
         return(new RowArrayPtr <SparseRowValue> (val[row], 0, val[row].Length - 1));
     }
     return(RowArrayPtr <SparseRowValue> .Empty());
 }
Пример #2
0
 public RowArrayPtr <SparseRowValue> getRowPtr(int row)
 {
     if (rowLength(row) > 0)
     {
         return(new RowArrayPtr <SparseRowValue>(val, rowPtr[row], rowPtr[row + 1] - 1));
     }
     else
     {
         return(RowArrayPtr <SparseRowValue> .Empty());
     }
 }
Пример #3
0
 public RowArrayPtr <SparseRowValue> getRowPtr(int row)
 {
     if (val[row] != null)
     {
         return(new RowArrayPtr <SparseRowValue>(val[row], 0, val[row].Length - 1));
     }
     else
     {
         return(RowArrayPtr <SparseRowValue> .Empty());
     }
 }
Пример #4
0
        public RowArrayPtr <SparseRowValue> getRowPtr(int row)
        {
            ContractAssertions.Requires <ArgumentOutOfRangeException> (row >= 0 && row <= rowCount, "Array Index out of bounds");
            if (rowLength(row) > 0)
            {
                var v = getRow(row);

                return(new RowArrayPtr <SparseRowValue> (v.ToArray(), 0, rowLength(row) - 1));
            }
            else
            {
                return(RowArrayPtr <SparseRowValue> .Empty());
            }
        }