Example #1
0
 public Matrix(int Size)
 {
     this.rows     = Size;
     this.cols     = Size;
     this.elements = new double[Size, Size];
     this.diagonal = new MatrixDiag(this);
 }
Example #2
0
 public Matrix(int m, int n)
 {
     this.fRows     = m;
     this.fCols     = n;
     this.fElements = new double[m, n];
     this.fDiagonal = new MatrixDiag(this);
 }
Example #3
0
 public Matrix(int Size)
 {
     this.fRows     = Size;
     this.fCols     = Size;
     this.fElements = new double[Size, Size];
     this.fDiagonal = new MatrixDiag(this);
 }
Example #4
0
 public Matrix(int m, int n)
 {
     this.rows     = m;
     this.cols     = n;
     this.elements = new double[m, n];
     this.diagonal = new MatrixDiag(this);
 }
Example #5
0
		public void Assign(MatrixDiag matrixDiag)
		{
			if (!Matrix.AreComparable(this.fMatrix, matrixDiag.fMatrix))
				return;
			for (int index = 0; index < this.NDiag; ++index)
				this[index] = matrixDiag[index];
		}
Example #6
0
 public void Assign(MatrixDiag matrixDiag)
 {
     if (Matrix.AreComparable(this.fMatrix, matrixDiag.fMatrix))
     {
         for (int i = 0; i < this.NDiag; i++)
         {
             this[i] = matrixDiag[i];
         }
     }
 }
Example #7
0
		public void Assign(MatrixDiag matrixDiag)
		{
			if (Matrix.AreComparable(this.fMatrix, matrixDiag.fMatrix))
			{
				for (int i = 0; i < this.NDiag; i++)
				{
					this[i] = matrixDiag[i];
				}
			}
		}
Example #8
0
 public Matrix(double[] values)
 {
     this.rows     = 1;
     this.cols     = values.Length;
     this.elements = new double[this.M, this.N];
     this.diagonal = new MatrixDiag(this);
     for (int index = 0; index < this.N; ++index)
     {
         this.elements[0, index] = values[index];
     }
 }
Example #9
0
 public void Assign(MatrixDiag matrixDiag)
 {
     if (!Matrix.AreComparable(this.fMatrix, matrixDiag.fMatrix))
     {
         return;
     }
     for (int index = 0; index < this.NDiag; ++index)
     {
         this[index] = matrixDiag[index];
     }
 }
Example #10
0
 public Matrix(double[] values)
 {
     this.fRows     = 1;
     this.fCols     = values.Length;
     this.fElements = new double[this.M, this.N];
     this.fDiagonal = new MatrixDiag(this);
     for (int i = 0; i < this.N; i++)
     {
         this.fElements[0, i] = values[i];
     }
 }
Example #11
0
 public Matrix(int m, int n, double val)
 {
     this.rows     = m;
     this.cols     = n;
     this.elements = new double[m, n];
     this.diagonal = new MatrixDiag(this);
     for (int index1 = 0; index1 < m; ++index1)
     {
         for (int index2 = 0; index2 < n; ++index2)
         {
             this.elements[index1, index2] = val;
         }
     }
 }
Example #12
0
 public Matrix(Matrix matrix)
 {
     this.elements = new double[matrix.M, matrix.N];
     this.diagonal = new MatrixDiag(this);
     this.rows     = matrix.rows;
     this.cols     = matrix.cols;
     for (int index1 = 0; index1 < this.M; ++index1)
     {
         for (int index2 = 0; index2 < this.N; ++index2)
         {
             this.elements[index1, index2] = matrix.elements[index1, index2];
         }
     }
 }
Example #13
0
 public Matrix(double[,] values)
 {
     this.fRows     = values.GetLength(0);
     this.fCols     = values.GetLength(1);
     this.fElements = new double[this.M, this.N];
     this.fDiagonal = new MatrixDiag(this);
     for (int i = 0; i < this.fRows; i++)
     {
         for (int j = 0; j < this.fCols; j++)
         {
             this.fElements[i, j] = values[i, j];
         }
     }
 }
Example #14
0
 public Matrix(int m, int n, double val)
 {
     this.fRows     = m;
     this.fCols     = n;
     this.fElements = new double[m, n];
     this.fDiagonal = new MatrixDiag(this);
     for (int i = 0; i < m; i++)
     {
         for (int j = 0; j < n; j++)
         {
             this.fElements[i, j] = val;
         }
     }
 }
Example #15
0
 public Matrix(double[,] values)
 {
     this.rows     = values.GetLength(0);
     this.cols     = values.GetLength(1);
     this.elements = new double[this.M, this.N];
     this.diagonal = new MatrixDiag(this);
     for (int index1 = 0; index1 < this.rows; ++index1)
     {
         for (int index2 = 0; index2 < this.cols; ++index2)
         {
             this.elements[index1, index2] = values[index1, index2];
         }
     }
 }
Example #16
0
 public Matrix(Matrix matrix)
 {
     this.fElements = new double[matrix.M, matrix.N];
     this.fDiagonal = new MatrixDiag(this);
     this.fRows     = matrix.fRows;
     this.fCols     = matrix.fCols;
     for (int i = 0; i < this.M; i++)
     {
         for (int j = 0; j < this.N; j++)
         {
             this.fElements[i, j] = matrix.fElements[i, j];
         }
     }
 }
Example #17
0
		public Matrix(double[] values)
		{
			this.rows = 1;
			this.cols = values.Length;
			this.elements = new double[this.M, this.N];
			this.diagonal = new MatrixDiag(this);
			for (int index = 0; index < this.N; ++index)
				this.elements[0, index] = values[index];
		}
Example #18
0
		public Matrix(double[,] values)
		{
			this.rows = values.GetLength(0);
			this.cols = values.GetLength(1);
			this.elements = new double[this.M, this.N];
			this.diagonal = new MatrixDiag(this);
			for (int index1 = 0; index1 < this.rows; ++index1)
			{
				for (int index2 = 0; index2 < this.cols; ++index2)
					this.elements[index1, index2] = values[index1, index2];
			}
		}
Example #19
0
		public Matrix(int Size)
		{
			this.rows = Size;
			this.cols = Size;
			this.elements = new double[Size, Size];
			this.diagonal = new MatrixDiag(this);
		}
Example #20
0
		public Matrix(int m, int n, double val)
		{
			this.rows = m;
			this.cols = n;
			this.elements = new double[m, n];
			this.diagonal = new MatrixDiag(this);
			for (int index1 = 0; index1 < m; ++index1)
			{
				for (int index2 = 0; index2 < n; ++index2)
					this.elements[index1, index2] = val;
			}
		}
Example #21
0
		public Matrix(Matrix matrix)
		{
			this.elements = new double[matrix.M, matrix.N];
			this.diagonal = new MatrixDiag(this);
			this.rows = matrix.rows;
			this.cols = matrix.cols;
			for (int index1 = 0; index1 < this.M; ++index1)
			{
				for (int index2 = 0; index2 < this.N; ++index2)
					this.elements[index1, index2] = matrix.elements[index1, index2];
			}
		}
Example #22
0
		public Matrix(int m, int n)
		{
			this.rows = m;
			this.cols = n;
			this.elements = new double[m, n];
			this.diagonal = new MatrixDiag(this);
		}
Example #23
0
		public Matrix(double[,] values)
		{
			this.fRows = values.GetLength(0);
			this.fCols = values.GetLength(1);
			this.fElements = new double[this.M, this.N];
			this.fDiagonal = new MatrixDiag(this);
			for (int i = 0; i < this.fRows; i++)
			{
				for (int j = 0; j < this.fCols; j++)
				{
					this.fElements[i, j] = values[i, j];
				}
			}
		}
Example #24
0
        public override bool Equals(object matrixDiag)
        {
            MatrixDiag matrixDiag2 = (MatrixDiag)matrixDiag;

            return(this.fMatrix.Equals(matrixDiag2.fMatrix));
        }
Example #25
0
		public Matrix(double[] values)
		{
			this.fRows = 1;
			this.fCols = values.Length;
			this.fElements = new double[this.M, this.N];
			this.fDiagonal = new MatrixDiag(this);
			for (int i = 0; i < this.N; i++)
			{
				this.fElements[0, i] = values[i];
			}
		}
Example #26
0
		public Matrix(int m, int n, double val)
		{
			this.fRows = m;
			this.fCols = n;
			this.fElements = new double[m, n];
			this.fDiagonal = new MatrixDiag(this);
			for (int i = 0; i < m; i++)
			{
				for (int j = 0; j < n; j++)
				{
					this.fElements[i, j] = val;
				}
			}
		}
Example #27
0
		public Matrix(int Size)
		{
			this.fRows = Size;
			this.fCols = Size;
			this.fElements = new double[Size, Size];
			this.fDiagonal = new MatrixDiag(this);
		}
Example #28
0
		public Matrix(int m, int n)
		{
			this.fRows = m;
			this.fCols = n;
			this.fElements = new double[m, n];
			this.fDiagonal = new MatrixDiag(this);
		}
Example #29
0
		public Matrix(Matrix matrix)
		{
			this.fElements = new double[matrix.M, matrix.N];
			this.fDiagonal = new MatrixDiag(this);
			this.fRows = matrix.fRows;
			this.fCols = matrix.fCols;
			for (int i = 0; i < this.M; i++)
			{
				for (int j = 0; j < this.N; j++)
				{
					this.fElements[i, j] = matrix.fElements[i, j];
				}
			}
		}