public Matrix(int Size) { this.m = Size; this.n = Size; this.elements = new double[Size, Size]; this.diagonal = new MatrixDiag(this); }
public void Assign(MatrixDiag matrixDiag) { if (!Matrix.AreComparable(this.matrix, matrixDiag.matrix)) return; for (int index = 0; index < this.NDiag; ++index) this[index] = matrixDiag[index]; }
public Matrix(int m, int n) { this.m = m; this.n = n; this.elements = new double[m, n]; this.diagonal = new MatrixDiag(this); }
public void Assign(MatrixDiag matrixDiag) { if (!Matrix.AreComparable(this.matrix, matrixDiag.matrix)) { return; } for (int index = 0; index < this.NDiag; ++index) { this[index] = matrixDiag[index]; } }
public Matrix(double[] values) { this.m = 1; this.n = values.Length; this.elements = new double[this.M, this.N]; this.diagonal = new MatrixDiag(this); for (int i = 0; i < this.N; ++i) { this.elements[0, i] = values[i]; } }
public Matrix(double[,] values) { this.m = values.GetLength(0); this.n = values.GetLength(1); this.elements = new double[this.M, this.N]; this.diagonal = new MatrixDiag(this); for (int i = 0; i < this.m; ++i) { for (int j = 0; j < this.n; ++j) { this.elements[i, j] = values[i, j]; } } }
public Matrix(int m, int n, double val) { this.m = m; this.n = n; this.elements = new double[m, n]; this.diagonal = new MatrixDiag(this); for (int i = 0; i < m; ++i) { for (int j = 0; j < n; ++j) { this.elements[i, j] = val; } } }
public Matrix(Matrix matrix) { this.elements = new double[matrix.M, matrix.N]; this.diagonal = new MatrixDiag(this); this.m = matrix.m; this.n = matrix.n; for (int i = 0; i < this.M; ++i) { for (int j = 0; j < this.N; ++j) { this.elements[i, j] = matrix.elements[i, j]; } } }
public Matrix(double[,] values) { this.m = values.GetLength(0); this.n = values.GetLength(1); this.elements = new double[this.M, this.N]; this.diagonal = new MatrixDiag(this); for (int i = 0; i < this.m; ++i) { for (int j = 0; j < this.n; ++j) this.elements[i, j] = values[i, j]; } }
public Matrix(double[] values) { this.m = 1; this.n = values.Length; this.elements = new double[this.M, this.N]; this.diagonal = new MatrixDiag(this); for (int i = 0; i < this.N; ++i) this.elements[0, i] = values[i]; }
public Matrix(int m, int n, double val) { this.m = m; this.n = n; this.elements = new double[m, n]; this.diagonal = new MatrixDiag(this); for (int i = 0; i < m; ++i) { for (int j = 0; j < n; ++j) this.elements[i, j] = val; } }
public Matrix(Matrix matrix) { this.elements = new double[matrix.M, matrix.N]; this.diagonal = new MatrixDiag(this); this.m = matrix.m; this.n = matrix.n; for (int i = 0; i < this.M; ++i) { for (int j = 0; j < this.N; ++j) this.elements[i, j] = matrix.elements[i, j]; } }