Rosetta
|
Classes | |
class | EllipseParameters |
Container class for ellipse parameters. More... | |
class | GeneralizedEigenSolver |
Solves generalized eigenvalue problems. More... | |
Typedefs | |
typedef utility::pointer::shared_ptr< EllipseParameters > | EllipseParametersOP |
typedef utility::pointer::shared_ptr< EllipseParameters const > | EllipseParametersCOP |
Functions | |
EllipseParametersOP | minimum_bounding_ellipse (utility::vector1< xyzVector< Real > > points, Real tolerance, Size max_iterations) |
Use the Khachiyan Algorithm to compute the minimum volume enclosing ellipsoid given a set of (x,y) data points. More... | |
Real | sum_of_square_differences (MathMatrix< Real > old_u, MathMatrix< Real > new_u) |
Calculate the sum-of-square differences between values stored in two vector1 objects. More... | |
MathMatrix< Real > | non_square_transpose (MathMatrix< Real > matrix_in) |
Calculate the transpose of a non-square MathMatrix and return the result as a new MathMatrix. More... | |
bool | point_in_ellipse (xyzVector< Real > p, Real const h, Real const k, Real const a, Real const b, MathMatrix< Real > rotation) |
Check whether a given test point lies within an ellipse. More... | |
double | epslon (double const &x) |
Estimate unit roundoff in quantities of size x. More... | |
void | qzhes (int const &nm, int const &n, arr_ref< double, 2 > a, arr_ref< double, 2 > b, bool const &matz, arr_ref< double, 2 > z) |
This subroutine is the first step of the QZ algorithm for solving generalized matrix eigenvalue problems. More... | |
void | qzit (int const &nm, int const &n, arr_ref< double, 2 > a, arr_ref< double, 2 > b, double const &eps1, bool const &matz, arr_ref< double, 2 > z, int &ierr) |
This subroutine is the second step of the QZ algorithm for solving generalized matrix eigenvalue problems. More... | |
void | qzval (int const &nm, int const &n, arr_ref< double, 2 > a, arr_ref< double, 2 > b, arr_ref< double > alfr, arr_ref< double > alfi, arr_ref< double > beta, bool const &matz, arr_ref< double, 2 > z) |
This subroutine is the third step of the QZ algorithm for solving generalized matrix eigenvalue problems,. More... | |
void | qzvec (int const &nm, int const &n, arr_cref< double, 2 > a, arr_ref< double, 2 > b, arr_cref< double > alfr, arr_cref< double > alfi, arr_cref< double > beta, arr_ref< double, 2 > z) |
This subroutine is the optional fourth step of the QZ algorithm for solving generalized matrix eigenvalue problems. More... | |
void | rgg (int const &nm, int const &n, arr_ref< double, 2 > a, arr_ref< double, 2 > b, arr_ref< double > alfr, arr_ref< double > alfi, arr_ref< double > beta, int const &matz, arr_ref< double, 2 > z, int &ierr) |
This subroutine calls the recommended sequence of subroutines from the eigensystem subroutine package (EISPACK) to find the eigenvalues and eigenvectors (if desired) for the real general generalized eigenproblem ![]() | |
void | qzhes (int const &nm, int const &n, fem::major_types::arr_ref< double, 2 > a, fem::major_types::arr_ref< double, 2 > b, bool const &matz, fem::major_types::arr_ref< double, 2 > z) |
void | qzit (int const &nm, int const &n, fem::major_types::arr_ref< double, 2 > a, fem::major_types::arr_ref< double, 2 > b, double const &eps1, bool const &matz, fem::major_types::arr_ref< double, 2 > z, int &ierr) |
void | qzval (int const &nm, int const &n, fem::major_types::arr_ref< double, 2 > a, fem::major_types::arr_ref< double, 2 > b, fem::major_types::arr_ref< double > alfr, fem::major_types::arr_ref< double > alfi, fem::major_types::arr_ref< double > beta, bool const &matz, fem::major_types::arr_ref< double, 2 > z) |
void | qzvec (int const &nm, int const &n, fem::major_types::arr_cref< double, 2 > a, fem::major_types::arr_ref< double, 2 > b, fem::major_types::arr_cref< double > alfr, fem::major_types::arr_cref< double > alfi, fem::major_types::arr_cref< double > beta, fem::major_types::arr_ref< double, 2 > z) |
void | rgg (int const &nm, int const &n, fem::major_types::arr_ref< double, 2 > a, fem::major_types::arr_ref< double, 2 > b, fem::major_types::arr_ref< double > alfr, fem::major_types::arr_ref< double > alfi, fem::major_types::arr_ref< double > beta, int const &matz, fem::major_types::arr_ref< double, 2 > z, int &ierr) |
Real | pythag (Real a, Real b) |
Real | sign (Real a, Real b) |
void | svdcmp (utility::vector1< utility::vector1< Real > > &a, Size const m, Size const n, utility::vector1< Real > &w, utility::vector1< utility::vector1< Real > > &v) |
typedef utility::pointer::shared_ptr< EllipseParameters const > numeric::linear_algebra::EllipseParametersCOP |
typedef utility::pointer::shared_ptr< EllipseParameters > numeric::linear_algebra::EllipseParametersOP |
Estimate unit roundoff in quantities of size x.
This program should function properly on all systems satisfying the following two assumptions:
The statement number 10 and the goto 10 are intended to force optimizing compilers to generate code satisfying assumption 2. Under these assumptions, it should be true that:
a
is not exactly equal to four-thirds.b
has a zero for its last bit or digit.c
is not exactly equal to one.eps
measures the separation of 1.0 from the next larger floating point number.The developers of EISPACK would appreciate being informed about any systems where these assumptions do not hold. This version dated 4/6/83. Fable was used to convert the original source to C++.
References a, compute_difference::b, kmeans_adaptive_kernel_density_bb_dependent_rotlib::c, eps, and x.
Referenced by qzit().
EllipseParametersOP numeric::linear_algebra::minimum_bounding_ellipse | ( | utility::vector1< xyzVector< Real > > | points, |
Real | tolerance, | ||
Size | max_iterations | ||
) |
Use the Khachiyan Algorithm to compute the minimum volume enclosing ellipsoid given a set of (x,y) data points.
References spectral_cluster_kmeans_adaptive_kernel_density_bb_dependent_rotlib::A, a, utility::arg_max(), compute_difference::b, kmeans_adaptive_kernel_density_bb_dependent_rotlib::c, count, closure_error::error, h, create_a3b_hbs::ii, numeric::inverse(), create_a3b_hbs::j, beta_nonlocal::jj, create_a3b_hbs::k, numeric::max(), N, non_square_transpose(), P, docking::Q, 3d_histogram::rotation, sum_of_square_differences(), svdcmp(), basic::options::OptionKeys::loops::ccd::tolerance, docking::U, and kmeans_adaptive_kernel_density_bb_dependent_rotlib::u.
MathMatrix< Real > numeric::linear_algebra::non_square_transpose | ( | MathMatrix< Real > | matrix_in | ) |
Calculate the transpose of a non-square MathMatrix and return the result as a new MathMatrix.
References numeric::MathMatrix< T >::get_number_cols(), numeric::MathMatrix< T >::get_number_rows(), create_a3b_hbs::ii, and beta_nonlocal::jj.
Referenced by minimum_bounding_ellipse().
bool numeric::linear_algebra::point_in_ellipse | ( | xyzVector< Real > | p, |
Real const | h, | ||
Real const | k, | ||
Real const | a, | ||
Real const | b, | ||
MathMatrix< Real > | rotation | ||
) |
Check whether a given test point lies within an ellipse.
References a, compute_difference::b, h, create_a3b_hbs::k, kmeans_adaptive_kernel_density_bb_dependent_rotlib::p, ObjexxFCL::pow(), and 3d_histogram::rotation.
References a, and compute_difference::b.
Referenced by basic::svd::SVD_Solver::pythag(), basic::svd::SVD_Solver::svdcmp(), and svdcmp().
void numeric::linear_algebra::qzhes | ( | int const & | nm, |
int const & | n, | ||
arr_ref< double, 2 > | a, | ||
arr_ref< double, 2 > | b, | ||
bool const & | matz, | ||
arr_ref< double, 2 > | z | ||
) |
This subroutine is the first step of the QZ algorithm for solving generalized matrix eigenvalue problems.
This subroutine accepts a pair of real general matrices and reduces one of them to upper Hessenberg form and the other to upper triangular form using orthogonal transformations. it is usually followed by qzit
, qzval
and, possibly, qzvec
.
[in] | nm | Must be set to the row dimension of two-dimensional array parameters as declared in the calling program dimension statement. |
[in] | n | The order of the matrices. |
[in] | a | Contains a real general matrix. |
[in] | b | Contains a real general matrix. |
[in] | matz | Should be set to true if the right hand transformations are to be accumulated for later use in computing eigenvectors, and to false otherwise. |
[out] | a | Reduced to upper Hessenberg form. The elements below the first subdiagonal have been set to zero. |
[out] | b | Reduced to upper triangular form. The elements below the main diagonal have been set to zero. |
[out] | z | Contains the product of the right hand transformations if matz has been set to true . Otherwise, z is not referenced. |
Reference: Siam J. Numer. Anal. 10, 241-256(1973) by Moler and Stewart.
Questions and comments should be directed to Burton S. Garbow, Mathematics and Computer Science Division, Argonne National Laboratory. This version dated August 1983. Fable was used to convert the original Fortran source into C++.
References a, compute_difference::b, create_a3b_hbs::i, create_a3b_hbs::j, create_a3b_hbs::k, extract_by_sidechain_sasa_score::l, test.G201_Module_Structure::l1, kmeans_adaptive_kernel_density_bb_dependent_rotlib::n, create_a3b_hbs::r, kmeans_adaptive_kernel_density_bb_dependent_rotlib::rho, docking::s, predPRE::t, oop_scan::v1, oop_scan::v2, and predPRE::z.
Referenced by rgg().
void numeric::linear_algebra::qzhes | ( | int const & | nm, |
int const & | n, | ||
fem::major_types::arr_ref< double, 2 > | a, | ||
fem::major_types::arr_ref< double, 2 > | b, | ||
bool const & | matz, | ||
fem::major_types::arr_ref< double, 2 > | z | ||
) |
void numeric::linear_algebra::qzit | ( | int const & | nm, |
int const & | n, | ||
arr_ref< double, 2 > | a, | ||
arr_ref< double, 2 > | b, | ||
double const & | eps1, | ||
bool const & | matz, | ||
arr_ref< double, 2 > | z, | ||
int & | ierr | ||
) |
This subroutine is the second step of the QZ algorithm for solving generalized matrix eigenvalue problems.
This subroutine accepts a pair of real matrices, one of them in upper Hessenberg form and the other in upper triangular form. it reduces the Hessenberg matrix to quasi-triangular form using orthogonal transformations while maintaining the triangular form of the other matrix. It is usually preceded by qzhes
and followed by qzval
and, possibly, qzvec
.
[in] | nm | Must be set to the row dimension of two-dimensional array parameters as declared in the calling program dimension statement. |
[in] | n | The order of the matrices. |
[in] | a | Contains a real upper Hessenberg matrix. |
[in] | b | Contains a real upper triangular matrix. |
[in] | eps1 | A tolerance used to determine negligible elements. Zero or negative values may be given, in which case an element will be neglected only if it is less than roundoff error times the norm of its matrix. If the input eps1 is positive, then an element will be considered negligible if it is less than eps1 times the norm of its matrix. A positive value of eps1 may result in faster execution, but less accurate results. |
[in] | matz | Should be set to true if the right hand transformations are to be accumulated for later use in computing eigenvectors, and to false otherwise. |
[in] | z | Contains, if matz has been set to true , the transformation matrix produced in the reduction by qzhes , if performed, or else the identity matrix. if matz has been set to false , z is not referenced. |
[out] | a | Reduced to quasi-triangular form. The elements below the first subdiagonal are still zero and no two consecutive subdiagonal elements are nonzero. |
[out] | b | Still in upper triangular form, although its elements have been altered. The location b(n,1) is used to store eps1 times the norm of b for later use by qzval and qzvec . |
[out] | z | Contains the product of the right hand transformations (for both steps) if matz has been set to true . |
[out] | ierr | Set to zero for normal return, j if the limit of 30*n iterations is exhausted while the j-th eigenvalue is being sought. |
Reference: Siam J. Numer. Anal. 10, 241-256(1973) by Moler and Stewart, as modified in technical note NASA tn D-7305(1973) by Ward.
Questions and comments should be directed to Burton S. Garbow, Mathematics and Computer Science Division, Argonne National Laboratory. This version dated August 1983. Fable was used to convert the original Fortran source into C++.
References a, docking::a1, docking::a2, docking::a3, compute_difference::b, epslon(), create_a3b_hbs::i, create_a3b_hbs::j, create_a3b_hbs::k, extract_by_sidechain_sasa_score::l, test.G201_Module_Structure::l1, kmeans_adaptive_kernel_density_bb_dependent_rotlib::n, create_a3b_hbs::r, docking::s, predPRE::t, oop_scan::v1, oop_scan::v2, and predPRE::z.
Referenced by rgg().
void numeric::linear_algebra::qzit | ( | int const & | nm, |
int const & | n, | ||
fem::major_types::arr_ref< double, 2 > | a, | ||
fem::major_types::arr_ref< double, 2 > | b, | ||
double const & | eps1, | ||
bool const & | matz, | ||
fem::major_types::arr_ref< double, 2 > | z, | ||
int & | ierr | ||
) |
void numeric::linear_algebra::qzval | ( | int const & | nm, |
int const & | n, | ||
arr_ref< double, 2 > | a, | ||
arr_ref< double, 2 > | b, | ||
arr_ref< double > | alfr, | ||
arr_ref< double > | alfi, | ||
arr_ref< double > | beta, | ||
bool const & | matz, | ||
arr_ref< double, 2 > | z | ||
) |
This subroutine is the third step of the QZ algorithm for solving generalized matrix eigenvalue problems,.
This subroutine accepts a pair of real matrices, one of them in quasi-triangular form and the other in upper triangular form. It reduces the quasi-triangular matrix further, so that any remaining 2-by-2 blocks correspond to pairs of complex eigenvalues, and returns quantities whose ratios give the generalized eigenvalues. It is usually preceded by qzhes
and qzit
and may be followed by qzvec
.
[in] | nm | Must be set to the row dimension of two-dimensional array parameters as declared in the calling program dimension statement. |
[in] | n | The order of the matrices. |
[in] | a | Contains a real upper quasi-triangular matrix. |
[in] | b | Contains a real upper triangular matrix. In addition, location b(n,1) contains the tolerance quantity epsb computed and saved in qzit . |
[in] | matz | Should be set to true if the right hand transformations are to be accumulated for later use in computing eigenvectors, and to false otherwise. |
[in] | z | Contains, if matz has been set to true , the transformation matrix produced in the reductions by qzhes and qzit , if performed, or else the identity matrix. If matz has been set to false , z is not referenced. |
[out] | a | Reduced further to a quasi-triangular matrix in which all nonzero subdiagonal elements correspond to pairs of complex eigenvalues. |
[out] | b | Still in upper triangular form, although its elements have been altered. b(n,1) is unaltered. |
[out] | alfr,alfi | Contain the real and imaginary parts of the diagonal elements of the triangular matrix that would be obtained if a were reduced completely to triangular form by unitary transformations. Non-zero values of alfi occur in pairs, the first member positive and the second negative. |
[out] | beta | Contains the diagonal elements of the corresponding b , normalized to be real and non-negative. The generalized eigenvalues are then the ratios ![]() |
[out] | z | Contains the product of the right hand transformations (for all three steps) if matz has been set to true . |
Reference: Siam J. Numer. Anal. 10, 241-256(1973) by Moler and Stewart.
Questions and comments should be directed to Burton S. Garbow, Mathematics and Computer Science Division, Argonne National Laboratory. This version dated August 1983. Fable was used to convert the original Fortran source into C++.
References a, docking::a1, docking::a2, docking::an, compute_difference::b, basic::options::OptionKeys::corrections::beta, docking::bn, kmeans_adaptive_kernel_density_bb_dependent_rotlib::c, test.T009_Exceptions::e, create_a3b_hbs::i, create_a3b_hbs::j, kmeans_adaptive_kernel_density_bb_dependent_rotlib::n, basic::options::OptionKeys::cm::nn, create_a3b_hbs::r, docking::s, sqr(), predPRE::t, ti, tr, oop_scan::v1, oop_scan::v2, and predPRE::z.
Referenced by rgg().
void numeric::linear_algebra::qzval | ( | int const & | nm, |
int const & | n, | ||
fem::major_types::arr_ref< double, 2 > | a, | ||
fem::major_types::arr_ref< double, 2 > | b, | ||
fem::major_types::arr_ref< double > | alfr, | ||
fem::major_types::arr_ref< double > | alfi, | ||
fem::major_types::arr_ref< double > | beta, | ||
bool const & | matz, | ||
fem::major_types::arr_ref< double, 2 > | z | ||
) |
void numeric::linear_algebra::qzvec | ( | int const & | nm, |
int const & | n, | ||
arr_cref< double, 2 > | a, | ||
arr_ref< double, 2 > | b, | ||
arr_cref< double > | alfr, | ||
arr_cref< double > | alfi, | ||
arr_cref< double > | beta, | ||
arr_ref< double, 2 > | z | ||
) |
This subroutine is the optional fourth step of the QZ algorithm for solving generalized matrix eigenvalue problems.
This subroutine accepts a pair of real matrices, one of them in quasi-triangular form (in which each 2-by-2 block corresponds to a pair of complex eigenvalues) and the other in upper triangular form. It computes the eigenvectors of the triangular problem and transforms the results back to the original coordinate system. It is usually preceded by qzhes
, qzit
, and qzval
.
[in] | nm | Must be set to the row dimension of two-dimensional array parameters as declared in the calling program dimension statement. |
[in] | n | The order of the matrices. |
[in] | a | Contains a real upper quasi-triangular matrix. Not altered by this subroutine. Its subdiagonal elements provide information about the storage of the complex eigenvectors. |
[in] | b | Contains a real upper triangular matrix. In addition, location b(n,1) contains the tolerance quantity epsb computed and saved in qzit . |
[in] | alfr,alfi,beta | Vectors with components whose ratios ![]() qzval . |
[in] | z | Contains the transformation matrix produced in the reductions by qzhes , qzit , and qzval , if performed. If the eigenvectors of the triangular problem are desired, z must contain the identity matrix. |
[out] | b | Destroyed. |
[out] | z | Contains the real and imaginary parts of the eigenvectors. Each eigenvector is normalized so that the modulus of its largest component is 1.0.
|
Reference: Siam J. Numer. Anal. 10, 241-256(1973) by Moler and Stewart.
Questions and comments should be directed to Burton S. Garbow, Mathematics and Computer Science Division, Argonne National Laboratory. This version dated August 1983. Fable was used to convert the original Fortran source into C++.
References a, compute_difference::b, basic::options::OptionKeys::corrections::beta, enumerate_junctions::default, create_a3b_hbs::i, create_a3b_hbs::ii, create_a3b_hbs::j, beta_nonlocal::jj, create_a3b_hbs::k, kmeans_adaptive_kernel_density_bb_dependent_rotlib::m, kmeans_adaptive_kernel_density_bb_dependent_rotlib::n, basic::options::OptionKeys::cm::nn, enumerate_junctions::q, create_a3b_hbs::r, docking::s, predPRE::t, ti, tr, w, x, predPRE::y, predPRE::z, basic::options::OptionKeys::motifs::z1, and test.T110_numeric::zz.
Referenced by rgg().
void numeric::linear_algebra::qzvec | ( | int const & | nm, |
int const & | n, | ||
fem::major_types::arr_cref< double, 2 > | a, | ||
fem::major_types::arr_ref< double, 2 > | b, | ||
fem::major_types::arr_cref< double > | alfr, | ||
fem::major_types::arr_cref< double > | alfi, | ||
fem::major_types::arr_cref< double > | beta, | ||
fem::major_types::arr_ref< double, 2 > | z | ||
) |
void numeric::linear_algebra::rgg | ( | int const & | nm, |
int const & | n, | ||
arr_ref< double, 2 > | a, | ||
arr_ref< double, 2 > | b, | ||
arr_ref< double > | alfr, | ||
arr_ref< double > | alfi, | ||
arr_ref< double > | beta, | ||
int const & | matz, | ||
arr_ref< double, 2 > | z, | ||
int & | ierr | ||
) |
This subroutine calls the recommended sequence of subroutines from the eigensystem subroutine package (EISPACK) to find the eigenvalues and eigenvectors (if desired) for the real general generalized eigenproblem .
[in] | nm | Must be set to the row dimension of the two-dimensional array parameters as declared in the calling program dimension statement. |
[in] | n | The order of the matrices ![]() ![]() |
[in] | a | A real general matrix. |
[in] | b | A real general matrix. |
[in] | matz | An integer variable set equal to zero if only eigenvalues are desired. otherwise it is set to any non-zero integer for both eigenvalues and eigenvectors. |
[out] | alfr | The real parts of the numerators of the eigenvalues. |
[out] | alfi | The imaginary parts of the numerators of the eigenvalues. |
[out] | beta | The denominators of the eigenvalues, which are thus given by the ratios ![]() |
[out] | z | The real and imaginary parts of the eigenvectors if matz is not zero. If the j-th eigenvalue is real, the j-th column of z contains its eigenvector. If the j-th eigenvalue is complex with positive imaginary part, the j-th and (j+1)-th columns of z contain the real and imaginary parts of its eigenvector. The conjugate of this vector is the eigenvector for the conjugate eigenvalue. |
[out] | ierr | An integer output variable set equal to an error completion code described in the documentation for qzit. The normal completion code is zero. |
Questions and comments should be directed to Burton S. Garbow, Mathematics and Computer Science Division, Argonne National Laboratory. This version dated August 1983. Fable was used to convert the original Fortran source into C++.
References a, compute_difference::b, basic::options::OptionKeys::corrections::beta, kmeans_adaptive_kernel_density_bb_dependent_rotlib::n, qzhes(), qzit(), qzval(), qzvec(), test.G200_Module_Region::tf, and predPRE::z.
Referenced by numeric::linear_algebra::GeneralizedEigenSolver< _MatrixType >::compute_in_place().
void numeric::linear_algebra::rgg | ( | int const & | nm, |
int const & | n, | ||
fem::major_types::arr_ref< double, 2 > | a, | ||
fem::major_types::arr_ref< double, 2 > | b, | ||
fem::major_types::arr_ref< double > | alfr, | ||
fem::major_types::arr_ref< double > | alfi, | ||
fem::major_types::arr_ref< double > | beta, | ||
int const & | matz, | ||
fem::major_types::arr_ref< double, 2 > | z, | ||
int & | ierr | ||
) |
References a, and compute_difference::b.
Referenced by svdcmp().
Real numeric::linear_algebra::sum_of_square_differences | ( | MathMatrix< Real > | old_u, |
MathMatrix< Real > | new_u | ||
) |
Calculate the sum-of-square differences between values stored in two vector1 objects.
References a, ObjexxFCL::abs(), erraser_analysis::diff, create_a3b_hbs::ii, and ObjexxFCL::pow().
Referenced by minimum_bounding_ellipse().
void numeric::linear_algebra::svdcmp | ( | utility::vector1< utility::vector1< Real > > & | a, |
Size const | m, | ||
Size const | n, | ||
utility::vector1< Real > & | w, | ||
utility::vector1< utility::vector1< Real > > & | v | ||
) |
References a, kmeans_adaptive_kernel_density_bb_dependent_rotlib::c, create_a3b_hbs::f, kmeans_adaptive_kernel_density_bb_dependent_rotlib::flag, g(), h, create_a3b_hbs::i, create_a3b_hbs::j, beta_nonlocal::jj, create_a3b_hbs::k, extract_by_sidechain_sasa_score::l, kmeans_adaptive_kernel_density_bb_dependent_rotlib::m, max(), min(), kmeans_adaptive_kernel_density_bb_dependent_rotlib::n, pythag(), docking::s, spectral_cluster_kmeans_adaptive_kernel_density_bb_dependent_rotlib::scale, sign(), kmeans_adaptive_kernel_density_bb_dependent_rotlib::v, w, x, predPRE::y, and predPRE::z.
Referenced by minimum_bounding_ellipse(), basic::svd::SVD_Solver::run_decomp_svd(), and numeric::geometry::vector_normal_to_ring_plane_of_best_fit().