Beispiel #1
0
 public Matrix(int Size)
 {
     this.rows     = Size;
     this.cols     = Size;
     this.elements = new double[Size, Size];
     this.diagonal = new MatrixDiag(this);
 }
Beispiel #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);
 }
Beispiel #3
0
 public Matrix(int Size)
 {
     this.fRows     = Size;
     this.fCols     = Size;
     this.fElements = new double[Size, Size];
     this.fDiagonal = new MatrixDiag(this);
 }
Beispiel #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);
 }
Beispiel #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];
		}
 public void Assign(MatrixDiag matrixDiag)
 {
     if (Matrix.AreComparable(this.fMatrix, matrixDiag.fMatrix))
     {
         for (int i = 0; i < this.NDiag; i++)
         {
             this[i] = matrixDiag[i];
         }
     }
 }
Beispiel #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];
				}
			}
		}
Beispiel #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];
     }
 }
Beispiel #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];
     }
 }
Beispiel #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];
     }
 }
Beispiel #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;
         }
     }
 }
Beispiel #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];
         }
     }
 }
Beispiel #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];
         }
     }
 }
Beispiel #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;
         }
     }
 }
Beispiel #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];
         }
     }
 }
Beispiel #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];
         }
     }
 }
Beispiel #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];
		}
Beispiel #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];
			}
		}
Beispiel #19
0
		public Matrix(int Size)
		{
			this.rows = Size;
			this.cols = Size;
			this.elements = new double[Size, Size];
			this.diagonal = new MatrixDiag(this);
		}
Beispiel #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;
			}
		}
Beispiel #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];
			}
		}
Beispiel #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);
		}
Beispiel #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];
				}
			}
		}
Beispiel #24
0
        public override bool Equals(object matrixDiag)
        {
            MatrixDiag matrixDiag2 = (MatrixDiag)matrixDiag;

            return(this.fMatrix.Equals(matrixDiag2.fMatrix));
        }
Beispiel #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];
			}
		}
Beispiel #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;
				}
			}
		}
Beispiel #27
0
		public Matrix(int Size)
		{
			this.fRows = Size;
			this.fCols = Size;
			this.fElements = new double[Size, Size];
			this.fDiagonal = new MatrixDiag(this);
		}
Beispiel #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);
		}
Beispiel #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];
				}
			}
		}