ResizeTo() public method

public ResizeTo ( int newNRows ) : void
newNRows int
return void
Ejemplo n.º 1
0
        public Matrix EigenVectors(Vector eigenValues)
        {
            if (!this.IsSymmetric)
            {
                throw new NotImplementedException("Not yet implemented for non-symmetric matrix");
            }
            var 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);
            var e = new Vector(this.Rows);

            MakeTridiagonal(matrix, eigenValues, e);
            MakeEigenVectors(eigenValues, e, matrix);
            EigenSort(matrix, eigenValues);
            return(matrix);
        }
Ejemplo n.º 2
0
 public Matrix EigenVectors(Vector eigenValues)
 {
     if (!this.IsSymmetric)
         throw new NotImplementedException("Not yet implemented for non-symmetric matrix");
     var 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);
     var e = new Vector(this.Rows);
     MakeTridiagonal(matrix, eigenValues, e);
     MakeEigenVectors(eigenValues, e, matrix);
     EigenSort(matrix, eigenValues);
     return matrix;
 }