..
This commit is contained in:
parent
9703d3a13b
commit
d4cfe52e9b
13
matexp.h
13
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
|
//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
|
//and template paramter for it does not work due to optional arguments
|
||||||
|
//undecent solution: exptimesreal
|
||||||
//
|
//
|
||||||
template<class M, class V>
|
template<class M, class V>
|
||||||
const V exptimes(const M &mat, V rhs, bool transpose=false, const typename LA_traits<V>::elementtype scale=1., int maxpower= -1, int maxtaylor= -1, bool mat_is_0=false )
|
const V exptimes(const M &mat, V rhs, bool transpose=false, const typename LA_traits<V>::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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class M, class V>
|
||||||
|
const V exptimesreal(const M &mat, V rhs, bool transpose=false, const typename LA_traits<V>::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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user