diff --git a/matexp.h b/matexp.h index 8a8f1a8..d7d3c51 100644 --- a/matexp.h +++ b/matexp.h @@ -363,6 +363,7 @@ return; //actually scale should be elementtype of M, but we do not have it since M can be anything user-defined //and template paramter for it does not work due to optional arguments +//undecent solution: exptimesreal // template const V exptimes(const M &mat, V rhs, bool transpose=false, const typename LA_traits::elementtype scale=1., int maxpower= -1, int maxtaylor= -1, bool mat_is_0=false ) @@ -372,6 +373,18 @@ exptimesdestructive(mat,result,rhs,transpose,scale,maxpower,maxtaylor,mat_is_0); return result; } +template +const V exptimesreal(const M &mat, V rhs, bool transpose=false, const typename LA_traits::normtype scale=1., int maxpower= -1, int maxtaylor= -1, bool mat_is_0=false ) +{ +V result; +exptimesdestructive(mat,result,rhs,transpose,scale,maxpower,maxtaylor,mat_is_0); +return result; +} + + + + +