예제 #1
0
파일: EigsGen.cpp 프로젝트: cran/rARPACK
SEXP returnRealIfPossible(Eigen::MatrixBase<Derived> &matvec)
{
    SEXP result;
    if(matvec.imag().isZero())
        result = wrap(matvec.real());
    else
        result = wrap(matvec);
    
    return result;
}