예제 #1
0
 public Matrix EigenVectors(Vector eigenValues)
 {
     if (this.IsSymmetric)
     {
         Matrix matrix = new Matrix(this.Rows, this.Cols);
         for (int i = 0; i < this.Rows; i++)
         {
             for (int j = 0; j < this.Cols; j++)
             {
                 matrix[i, j] = this[i, j];
             }
         }
         eigenValues.ResizeTo(this.Rows);
         Vector e = new Vector(this.Rows);
         this.MakeTridiagonal(matrix, eigenValues, e);
         this.MakeEigenVectors(eigenValues, e, matrix);
         this.EigenSort(matrix, eigenValues);
         return(matrix);
     }
     throw new ApplicationException("Not yet implemented for non-symmetric matrix");
 }
예제 #2
0
        public Matrix EigenVectors(Vector eigenValues)
        {
            if (!this.IsSymmetric)
            {
                throw new ApplicationException("Not yet implemented for non-symmetric matrix");
            }
            Matrix matrix = new Matrix(this.Rows, this.Cols);

            for (int index1 = 0; index1 < this.Rows; ++index1)
            {
                for (int index2 = 0; index2 < this.Cols; ++index2)
                {
                    matrix[index1, index2] = this[index1, index2];
                }
            }
            eigenValues.ResizeTo(this.Rows);
            Vector e = new Vector(this.Rows);

            this.MakeTridiagonal(matrix, eigenValues, e);
            this.MakeEigenVectors(eigenValues, e, matrix);
            this.EigenSort(matrix, eigenValues);
            return(matrix);
        }
예제 #3
0
파일: Matrix.cs 프로젝트: heber/FreeOQ
		public Matrix EigenVectors(Vector eigenValues)
		{
			if (!this.IsSymmetric)
				throw new ApplicationException("Not yet implemented for non-symmetric matrix");
			Matrix matrix = new Matrix(this.Rows, this.Cols);
			for (int index1 = 0; index1 < this.Rows; ++index1)
			{
				for (int index2 = 0; index2 < this.Cols; ++index2)
					matrix[index1, index2] = this[index1, index2];
			}
			eigenValues.ResizeTo(this.Rows);
			Vector e = new Vector(this.Rows);
			this.MakeTridiagonal(matrix, eigenValues, e);
			this.MakeEigenVectors(eigenValues, e, matrix);
			this.EigenSort(matrix, eigenValues);
			return matrix;
		}
예제 #4
0
		public Matrix EigenVectors(Vector eigenValues)
		{
			if (this.IsSymmetric)
			{
				Matrix matrix = new Matrix(this.Rows, this.Cols);
				for (int i = 0; i < this.Rows; i++)
				{
					for (int j = 0; j < this.Cols; j++)
					{
						matrix[i, j] = this[i, j];
					}
				}
				eigenValues.ResizeTo(this.Rows);
				Vector e = new Vector(this.Rows);
				this.MakeTridiagonal(matrix, eigenValues, e);
				this.MakeEigenVectors(eigenValues, e, matrix);
				this.EigenSort(matrix, eigenValues);
				return matrix;
			}
			throw new ApplicationException("Not yet implemented for non-symmetric matrix");
		}