Esempio n. 1
0
 public Matrix(int Size)
 {
     this.rows     = Size;
     this.cols     = Size;
     this.elements = new double[Size, Size];
     this.diagonal = new MatrixDiag(this);
 }
Esempio n. 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);
 }
Esempio n. 3
0
 public Matrix(int Size)
 {
     this.fRows     = Size;
     this.fCols     = Size;
     this.fElements = new double[Size, Size];
     this.fDiagonal = new MatrixDiag(this);
 }
Esempio n. 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);
 }
Esempio n. 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];
		}
Esempio n. 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];
         }
     }
 }
Esempio n. 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];
				}
			}
		}
Esempio n. 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];
     }
 }
Esempio n. 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];
     }
 }
Esempio n. 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];
     }
 }
Esempio n. 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;
         }
     }
 }
Esempio n. 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];
         }
     }
 }
Esempio n. 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];
         }
     }
 }
Esempio n. 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;
         }
     }
 }
Esempio n. 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];
         }
     }
 }
Esempio n. 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];
         }
     }
 }
Esempio n. 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];
		}
Esempio n. 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];
			}
		}
Esempio n. 19
0
		public Matrix(int Size)
		{
			this.rows = Size;
			this.cols = Size;
			this.elements = new double[Size, Size];
			this.diagonal = new MatrixDiag(this);
		}
Esempio n. 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;
			}
		}
Esempio n. 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];
			}
		}
Esempio n. 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);
		}
Esempio n. 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];
				}
			}
		}
Esempio n. 24
0
        public override bool Equals(object matrixDiag)
        {
            MatrixDiag matrixDiag2 = (MatrixDiag)matrixDiag;

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