Ejemplo n.º 1
0
 /// <summary>
 /// Matlab index.
 /// </summary>
 /// <param name="vec"></param>
 /// <param name="indices"></param>
 public VectorScatterRef(VectorBase <TMathNetVec, TConcreteVec> vec, IEnumerable <double> indices)
 {
     // Check
     NumericTool.CheckIndices(indices);
     this.vec     = vec;
     this.indices = indices.Select(i => (int)i - 1).ToArray();
 }
Ejemplo n.º 2
0
 internal MatrixSliceRef(Matrix mat, IEnumerable <double> rowIndices, IEnumerable <double> colIndices)
 {
     // Check.
     NumericTool.CheckIndices(rowIndices);
     NumericTool.CheckIndices(colIndices);
     this.mat        = mat;
     this.rowIndices = rowIndices.Select(d => (int)d - 1).ToArray();
     this.colIndices = colIndices.Select(d => (int)d - 1).ToArray();
 }