Exemplo n.º 1
0
 public Matrix(int Size)
 {
     this.m        = Size;
     this.n        = Size;
     this.elements = new double[Size, Size];
     this.diagonal = new MatrixDiag(this);
 }
Exemplo n.º 2
0
		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];
		}
Exemplo n.º 3
0
 public Matrix(int m, int n)
 {
     this.m        = m;
     this.n        = n;
     this.elements = new double[m, n];
     this.diagonal = new MatrixDiag(this);
 }
Exemplo n.º 4
0
 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];
     }
 }
Exemplo n.º 5
0
 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];
     }
 }
Exemplo n.º 6
0
 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];
         }
     }
 }
Exemplo n.º 7
0
 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;
         }
     }
 }
Exemplo n.º 8
0
 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];
         }
     }
 }
Exemplo n.º 9
0
		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];
			}
		}
Exemplo n.º 10
0
		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];
		}
Exemplo n.º 11
0
		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;
			}
		}
Exemplo n.º 12
0
		public Matrix(int Size)
		{
			this.m = Size;
			this.n = Size;
			this.elements = new double[Size, Size];
			this.diagonal = new MatrixDiag(this);
		}
Exemplo n.º 13
0
		public Matrix(int m, int n)
		{

			this.m = m;
			this.n = n;
			this.elements = new double[m, n];
			this.diagonal = new MatrixDiag(this);
		}
Exemplo n.º 14
0
		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];
			}
		}