Exemplo n.º 1
0
 /// <summary>
 /// Creates a vector object of size N
 /// </summary>
 /// <param name="N">Number of elements in the vector</param>
 public Vector(int N)
 {
     numEntries = N;
     values     = new T[N];
     setOperators();
     for (int i = 0; i < N; i++)
     {
         values[i] = operators.GetZeroValue();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a matrix object of size M by N
 /// </summary>
 /// <param name="M">Number of rows</param>
 /// <param name="N">Number of columns</param>
 public Matrix(int M, int N)
 {
     setOperators();
     numRows    = M;
     numColumns = N;
     values     = new U[numRows][];
     for (int i = 0; i < numRows; i++)
     {
         this.values[i] = new U[numColumns];
         for (int j = 0; j < numColumns; j++)
         {
             this.values[i][j] = operators.GetZeroValue();
         }
     }
 }