GNU Octave
4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include <cfloat>
#include <cmath>
#include <vector>
#include <iostream>
#include "CSparse.h"
#include "lu.h"
#include "MatrixType.h"
#include "chol.h"
#include "dSparse.h"
#include "eigs-base.h"
#include "f77-fcn.h"
#include "lo-arpack-proto.h"
#include "lo-blas-proto.h"
#include "mx-ops.h"
#include "oct-locbuf.h"
#include "oct-rand.h"
#include "quit.h"
#include "sparse-chol.h"
#include "sparse-lu.h"
Go to the source code of this file.
octave_idx_type EigsComplexNonSymmetricFunc | ( | EigsComplexFunc | fun, |
octave_idx_type | n, | ||
const std::string & | _typ, | ||
Complex | sigma, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
ComplexMatrix & | eig_vec, | ||
ComplexColumnVector & | eig_val, | ||
ComplexColumnVector & | cresid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | , | ||
int | disp, | ||
int | maxit | ||
) |
Definition at line 2929 of file eigs-base.cc.
References abs(), current_liboctave_error_handler, d, octave_rand::distribution(), err, F77_DBLE_CMPLX_ARG, f77_exception_encountered, F77_FUNC(), Array< T >::fortran_vec(), Array< T >::is_empty(), octave::math::isnan(), k, mode, NaN(), OCTAVE_LOCAL_BUFFER, p, ComplexColumnVector::resize(), ComplexMatrix::resize(), s, string, octave_rand::vector(), x, and y.
Referenced by G__eigs__().
octave_idx_type EigsComplexNonSymmetricMatrix | ( | const M & | m, |
const std::string | typ, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
ComplexMatrix & | eig_vec, | ||
ComplexColumnVector & | eig_val, | ||
const M & | _b, | ||
ColumnVector & | permB, | ||
ComplexColumnVector & | cresid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
Definition at line 2343 of file eigs-base.cc.
References b, current_liboctave_error_handler, d, octave_rand::distribution(), F77_CONST_DBLE_CMPLX_ARG, F77_DBLE_CMPLX_ARG, f77_exception_encountered, F77_FUNC(), Array< T >::fortran_vec(), Array< T >::is_empty(), octave::math::isnan(), k, ltsolve(), M, make_cholb(), mode, NaN(), Array< T >::numel(), OCTAVE_LOCAL_BUFFER, p, ComplexColumnVector::resize(), ComplexMatrix::resize(), s, string, utsolve(), octave_rand::vector(), vector_product(), and octave::math::x_nint().
Referenced by G__eigs__().
template octave_idx_type EigsComplexNonSymmetricMatrix< ComplexMatrix > | ( | const ComplexMatrix & | m, |
const std::string | typ, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
ComplexMatrix & | eig_vec, | ||
ComplexColumnVector & | eig_val, | ||
const ComplexMatrix & | _b, | ||
ColumnVector & | permB, | ||
ComplexColumnVector & | cresid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
template octave_idx_type EigsComplexNonSymmetricMatrix< SparseComplexMatrix > | ( | const SparseComplexMatrix & | m, |
const std::string | typ, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
ComplexMatrix & | eig_vec, | ||
ComplexColumnVector & | eig_val, | ||
const SparseComplexMatrix & | _b, | ||
ColumnVector & | permB, | ||
ComplexColumnVector & | cresid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
octave_idx_type EigsComplexNonSymmetricMatrixShift | ( | const M & | m, |
Complex | sigma, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
ComplexMatrix & | eig_vec, | ||
ComplexColumnVector & | eig_val, | ||
const M & | _b, | ||
ColumnVector & | permB, | ||
ComplexColumnVector & | cresid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
Definition at line 2623 of file eigs-base.cc.
References b, current_liboctave_error_handler, d, octave_rand::distribution(), F77_CONST_DBLE_CMPLX_ARG, F77_DBLE_CMPLX_ARG, f77_exception_encountered, F77_FUNC(), Array< T >::fortran_vec(), Array< T >::is_empty(), octave::math::isnan(), k, LuAminusSigmaB(), lusolve(), M, mode, NaN(), Array< T >::numel(), OCTAVE_LOCAL_BUFFER, P, p, Q, ComplexColumnVector::resize(), ComplexMatrix::resize(), s, string, tmp, octave_rand::vector(), vector_product(), and octave::math::x_nint().
Referenced by G__eigs__().
template octave_idx_type EigsComplexNonSymmetricMatrixShift< ComplexMatrix > | ( | const ComplexMatrix & | m, |
Complex | sigma, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
ComplexMatrix & | eig_vec, | ||
ComplexColumnVector & | eig_val, | ||
const ComplexMatrix & | _b, | ||
ColumnVector & | permB, | ||
ComplexColumnVector & | cresid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
template octave_idx_type EigsComplexNonSymmetricMatrixShift< SparseComplexMatrix > | ( | const SparseComplexMatrix & | m, |
Complex | sigma, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
ComplexMatrix & | eig_vec, | ||
ComplexColumnVector & | eig_val, | ||
const SparseComplexMatrix & | _b, | ||
ColumnVector & | permB, | ||
ComplexColumnVector & | cresid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
octave_idx_type EigsRealNonSymmetricFunc | ( | EigsFunc | fun, |
octave_idx_type | n, | ||
const std::string & | _typ, | ||
double | sigmar, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
ComplexMatrix & | eig_vec, | ||
ComplexColumnVector & | eig_val, | ||
ColumnVector & | resid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | , | ||
int | disp, | ||
int | maxit | ||
) |
Definition at line 2058 of file eigs-base.cc.
References abs(), current_liboctave_error_handler, d, octave_rand::distribution(), err, f77_exception_encountered, F77_FUNC(), Array< T >::fortran_vec(), octave::math::imag(), Array< T >::is_empty(), octave::math::isnan(), k, mode, NaN(), OCTAVE_LOCAL_BUFFER, p, ComplexColumnVector::resize(), ComplexMatrix::resize(), s, string, octave_rand::vector(), x, and y.
Referenced by G__eigs__().
octave_idx_type EigsRealNonSymmetricMatrix | ( | const M & | m, |
const std::string | typ, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
ComplexMatrix & | eig_vec, | ||
ComplexColumnVector & | eig_val, | ||
const M & | _b, | ||
ColumnVector & | permB, | ||
ColumnVector & | resid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
Definition at line 1394 of file eigs-base.cc.
References b, current_liboctave_error_handler, d, octave_rand::distribution(), f77_exception_encountered, F77_FUNC(), Array< T >::fortran_vec(), octave::math::imag(), Array< T >::is_empty(), octave::math::isnan(), k, ltsolve(), M, make_cholb(), mode, NaN(), Array< T >::numel(), OCTAVE_LOCAL_BUFFER, p, ComplexColumnVector::resize(), ComplexMatrix::resize(), s, string, utsolve(), octave_rand::vector(), vector_product(), and octave::math::x_nint().
Referenced by G__eigs__().
template octave_idx_type EigsRealNonSymmetricMatrix< Matrix > | ( | const Matrix & | m, |
const std::string | typ, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
ComplexMatrix & | eig_vec, | ||
ComplexColumnVector & | eig_val, | ||
const Matrix & | _b, | ||
ColumnVector & | permB, | ||
ColumnVector & | resid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
template octave_idx_type EigsRealNonSymmetricMatrix< SparseMatrix > | ( | const SparseMatrix & | m, |
const std::string | typ, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
ComplexMatrix & | eig_vec, | ||
ComplexColumnVector & | eig_val, | ||
const SparseMatrix & | _b, | ||
ColumnVector & | permB, | ||
ColumnVector & | resid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
octave_idx_type EigsRealNonSymmetricMatrixShift | ( | const M & | m, |
double | sigmar, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
ComplexMatrix & | eig_vec, | ||
ComplexColumnVector & | eig_val, | ||
const M & | _b, | ||
ColumnVector & | permB, | ||
ColumnVector & | resid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
Definition at line 1714 of file eigs-base.cc.
References b, current_liboctave_error_handler, d, octave_rand::distribution(), f77_exception_encountered, F77_FUNC(), Array< T >::fortran_vec(), octave::math::imag(), Array< T >::is_empty(), octave::math::isnan(), k, LuAminusSigmaB(), lusolve(), M, mode, NaN(), Array< T >::numel(), OCTAVE_LOCAL_BUFFER, P, p, Q, ComplexColumnVector::resize(), ComplexMatrix::resize(), s, string, tmp, octave_rand::vector(), vector_product(), and octave::math::x_nint().
Referenced by G__eigs__().
template octave_idx_type EigsRealNonSymmetricMatrixShift< Matrix > | ( | const Matrix & | m, |
double | sigmar, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
ComplexMatrix & | eig_vec, | ||
ComplexColumnVector & | eig_val, | ||
const Matrix & | _b, | ||
ColumnVector & | permB, | ||
ColumnVector & | resid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
template octave_idx_type EigsRealNonSymmetricMatrixShift< SparseMatrix > | ( | const SparseMatrix & | m, |
double | sigmar, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
ComplexMatrix & | eig_vec, | ||
ComplexColumnVector & | eig_val, | ||
const SparseMatrix & | _b, | ||
ColumnVector & | permB, | ||
ColumnVector & | resid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
octave_idx_type EigsRealSymmetricFunc | ( | EigsFunc | fun, |
octave_idx_type | n, | ||
const std::string & | _typ, | ||
double | sigma, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
Matrix & | eig_vec, | ||
ColumnVector & | eig_val, | ||
ColumnVector & | resid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | , | ||
int | disp, | ||
int | maxit | ||
) |
Definition at line 1157 of file eigs-base.cc.
References abs(), current_liboctave_error_handler, d, octave_rand::distribution(), err, f77_exception_encountered, F77_FUNC(), Array< T >::fortran_vec(), Array< T >::is_empty(), octave::math::isnan(), k, mode, NaN(), OCTAVE_LOCAL_BUFFER, p, ColumnVector::resize(), Matrix::resize(), s, string, octave_rand::vector(), x, and y.
Referenced by G__eigs__().
octave_idx_type EigsRealSymmetricMatrix | ( | const M & | m, |
const std::string | typ, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
Matrix & | eig_vec, | ||
ColumnVector & | eig_val, | ||
const M & | _b, | ||
ColumnVector & | permB, | ||
ColumnVector & | resid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
Definition at line 596 of file eigs-base.cc.
References b, current_liboctave_error_handler, d, octave_rand::distribution(), f77_exception_encountered, F77_FUNC(), Array< T >::fortran_vec(), Array< T >::is_empty(), octave::math::isnan(), k, ltsolve(), M, make_cholb(), mode, NaN(), Array< T >::numel(), OCTAVE_LOCAL_BUFFER, p, ColumnVector::resize(), Matrix::resize(), s, string, utsolve(), octave_rand::vector(), vector_product(), and octave::math::x_nint().
Referenced by G__eigs__().
template octave_idx_type EigsRealSymmetricMatrix< Matrix > | ( | const Matrix & | m, |
const std::string | typ, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
Matrix & | eig_vec, | ||
ColumnVector & | eig_val, | ||
const Matrix & | _b, | ||
ColumnVector & | permB, | ||
ColumnVector & | resid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
template octave_idx_type EigsRealSymmetricMatrix< SparseMatrix > | ( | const SparseMatrix & | m, |
const std::string | typ, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
Matrix & | eig_vec, | ||
ColumnVector & | eig_val, | ||
const SparseMatrix & | _b, | ||
ColumnVector & | permB, | ||
ColumnVector & | resid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
octave_idx_type EigsRealSymmetricMatrixShift | ( | const M & | m, |
double | sigma, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
Matrix & | eig_vec, | ||
ColumnVector & | eig_val, | ||
const M & | _b, | ||
ColumnVector & | permB, | ||
ColumnVector & | resid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
Definition at line 868 of file eigs-base.cc.
References b, current_liboctave_error_handler, d, octave_rand::distribution(), f77_exception_encountered, F77_FUNC(), Array< T >::fortran_vec(), Array< T >::is_empty(), octave::math::isnan(), k, LuAminusSigmaB(), lusolve(), M, mode, NaN(), Array< T >::numel(), OCTAVE_LOCAL_BUFFER, P, p, Q, ColumnVector::resize(), Matrix::resize(), s, string, tmp, octave_rand::vector(), vector_product(), and octave::math::x_nint().
Referenced by G__eigs__().
template octave_idx_type EigsRealSymmetricMatrixShift< Matrix > | ( | const Matrix & | m, |
double | sigma, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
Matrix & | eig_vec, | ||
ColumnVector & | eig_val, | ||
const Matrix & | _b, | ||
ColumnVector & | permB, | ||
ColumnVector & | resid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
template octave_idx_type EigsRealSymmetricMatrixShift< SparseMatrix > | ( | const SparseMatrix & | m, |
double | sigma, | ||
octave_idx_type | k, | ||
octave_idx_type | p, | ||
octave_idx_type & | info, | ||
Matrix & | eig_vec, | ||
ColumnVector & | eig_val, | ||
const SparseMatrix & | _b, | ||
ColumnVector & | permB, | ||
ColumnVector & | resid, | ||
std::ostream & | os, | ||
double | tol, | ||
bool | rvec, | ||
bool | cholB, | ||
int | disp, | ||
int | maxit | ||
) |
|
static |
Definition at line 79 of file eigs-base.cc.
References b_nc, err, Array< T >::fortran_vec(), MatrixType::Lower, M, ComplexMatrix::rcond(), retval, and tmp.
Referenced by EigsComplexNonSymmetricMatrix(), EigsRealNonSymmetricMatrix(), and EigsRealSymmetricMatrix().
|
static |
Definition at line 267 of file eigs-base.cc.
References abs(), b, octave::math::sparse_lu< lu_type >::col_perm(), d, Sparse< T >::is_empty(), octave::math::isnan(), octave::math::sparse_lu< lu_type >::L(), NaN(), Array< T >::numel(), ComplexMatrix::rcond(), octave::math::sparse_lu< lu_type >::row_perm(), Sparse< T >::rows(), tmp, SparseMatrix::transpose(), octave::math::sparse_lu< lu_type >::U(), warn_convergence(), Sparse< T >::xcidx(), Sparse< T >::xdata(), and Sparse< T >::xridx().
Referenced by EigsComplexNonSymmetricMatrixShift(), EigsRealNonSymmetricMatrixShift(), and EigsRealSymmetricMatrixShift().
|
static |
Definition at line 359 of file eigs-base.cc.
References abs(), b, Array< T >::cols(), d, Array< T >::fortran_vec(), Array< T >::is_empty(), octave::math::isnan(), octave::math::lu< T >::L(), NaN(), Array< T >::numel(), octave::math::lu< T >::P(), p, ComplexMatrix::rcond(), Array< T >::rows(), tmp, PermMatrix::transpose(), Matrix::transpose(), octave::math::lu< T >::U(), warn_convergence(), and Array< T >::xelem().
|
static |
Definition at line 431 of file eigs-base.cc.
References abs(), b, octave::math::sparse_lu< lu_type >::col_perm(), d, SparseComplexMatrix::hermitian(), Sparse< T >::is_empty(), octave::math::isnan(), octave::math::sparse_lu< lu_type >::L(), NaN(), Array< T >::numel(), ComplexMatrix::rcond(), octave::math::sparse_lu< lu_type >::row_perm(), Sparse< T >::rows(), tmp, SparseMatrix::transpose(), octave::math::sparse_lu< lu_type >::U(), warn_convergence(), Sparse< T >::xcidx(), Sparse< T >::xdata(), and Sparse< T >::xridx().
|
static |
Definition at line 523 of file eigs-base.cc.
References abs(), b, Array< T >::cols(), d, Array< T >::fortran_vec(), ComplexMatrix::hermitian(), Array< T >::is_empty(), octave::math::isnan(), octave::math::lu< T >::L(), NaN(), Array< T >::numel(), octave::math::lu< T >::P(), p, ComplexMatrix::rcond(), Array< T >::rows(), tmp, PermMatrix::transpose(), octave::math::lu< T >::U(), warn_convergence(), and Array< T >::xelem().
|
static |
Definition at line 61 of file eigs-base.cc.
References err, ComplexMatrix::rcond(), and MatrixType::Upper.
Referenced by EigsComplexNonSymmetricMatrixShift(), EigsRealNonSymmetricMatrixShift(), and EigsRealSymmetricMatrixShift().
|
static |
Definition at line 192 of file eigs-base.cc.
References octave::math::chol< T >::chol_matrix(), Array< T >::cols(), and Matrix::transpose().
Referenced by EigsComplexNonSymmetricMatrix(), EigsRealNonSymmetricMatrix(), and EigsRealSymmetricMatrix().
|
static |
Definition at line 212 of file eigs-base.cc.
References octave::math::sparse_chol< chol_type >::L(), octave::math::sparse_chol< chol_type >::P(), octave::math::sparse_chol< chol_type >::perm(), and SparseMatrix::transpose().
|
static |
Definition at line 229 of file eigs-base.cc.
References octave::math::chol< T >::chol_matrix(), Array< T >::cols(), and ComplexMatrix::hermitian().
|
static |
Definition at line 249 of file eigs-base.cc.
References SparseComplexMatrix::hermitian(), octave::math::sparse_chol< chol_type >::L(), octave::math::sparse_chol< chol_type >::P(), and octave::math::sparse_chol< chol_type >::perm().
|
static |
Definition at line 106 of file eigs-base.cc.
References b_nc, err, Array< T >::fortran_vec(), M, ComplexMatrix::rcond(), retval, and MatrixType::Upper.
Referenced by EigsComplexNonSymmetricMatrix(), EigsRealNonSymmetricMatrix(), and EigsRealSymmetricMatrix().
|
static |
Definition at line 125 of file eigs-base.cc.
References Sparse< T >::cidx(), Sparse< T >::cols(), Sparse< T >::data(), and Sparse< T >::ridx().
Referenced by EigsComplexNonSymmetricMatrix(), EigsComplexNonSymmetricMatrixShift(), EigsRealNonSymmetricMatrix(), EigsRealNonSymmetricMatrixShift(), EigsRealSymmetricMatrix(), and EigsRealSymmetricMatrixShift().
Definition at line 140 of file eigs-base.cc.
References Array< T >::cols(), Array< T >::data(), f77_exception_encountered, F77_XFCN, Array< T >::rows(), x, and y.
|
static |
Definition at line 157 of file eigs-base.cc.
References Sparse< T >::cidx(), Sparse< T >::cols(), Sparse< T >::data(), and Sparse< T >::ridx().
|
static |
Definition at line 173 of file eigs-base.cc.
References Array< T >::cols(), Array< T >::data(), F77_CONST_DBLE_CMPLX_ARG, F77_DBLE_CMPLX_ARG, f77_exception_encountered, F77_XFCN, and Array< T >::rows().
|
static |
Definition at line 51 of file eigs-base.cc.
Referenced by LuAminusSigmaB().