1 #ifndef DENSE_GEN_REAL_SHIFT_SOLVE_H 
    2 #define DENSE_GEN_REAL_SHIFT_SOLVE_H 
   15 template <
typename Scalar>
 
   19     typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic> Matrix;
 
   20     typedef Eigen::Matrix<Scalar, Eigen::Dynamic, 1> Vector;
 
   21     typedef Eigen::Map<const Matrix> MapMat;
 
   22     typedef Eigen::Map< Eigen::Matrix<Scalar, Eigen::Dynamic, 1> > MapVec;
 
   24     typedef const Eigen::Ref<const Matrix> ConstGenericMatrix;
 
   28     Eigen::PartialPivLU<Matrix> solver;
 
   40         mat(mat_.data(), mat_.
rows(), mat_.
cols()),
 
   43         if(mat_.rows() != mat_.cols())
 
   44             throw std::invalid_argument(
"DenseGenRealShiftSolve: matrix must be square");
 
   50     int rows() { 
return dim_n; }
 
   54     int cols() { 
return dim_n; }
 
   61         solver.compute(mat - sigma * Matrix::Identity(dim_n, dim_n));
 
   73         MapVec x(x_in,  dim_n);
 
   74         MapVec y(y_out, dim_n);
 
   75         y.noalias() = solver.solve(x);
 
   80 #endif // DENSE_GEN_REAL_SHIFT_SOLVE_H 
DenseGenRealShiftSolve(ConstGenericMatrix &mat_)
 
void set_shift(Scalar sigma)
 
void perform_op(Scalar *x_in, Scalar *y_out)