lrl R中的eigen函数虽然是用Lapack实现的,但是没有实现广义特征值分解。因为lapack中的zgegv函数可以进行广义特征值分解,想请问是否可以直接用R调用lapack的zgegv函数?要怎么调用? 谢谢!
lrl 回复 第2楼 的 肖楠: 今天又研究了一下,算是解决了,用的R call Fortran,调用的lapack里面的 dggev 函数,具体实现是参考这个帖子: http://www.mail-archive.com/r-help@r-project.org/msg167553.html 写了一个Rdggev函数。
micro@ 回复 第3楼 的 lrl: 感慨一下,开放就是好啊。 I'm not sure about .Fortran, but the very similar .C interface seems performing slower than the .Call interface. So I'd suggest to also try .Call() with F77_CALL macro, if this is to be called repeatedly in your program.
micro@ 回复 第7楼 的 lrl:Not necessarily. You can still use a C wrapper to call compiled Fortran code, if it is faster.