mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-09 23:45:36 +00:00
Allow expression as argument to norm2
This commit is contained in:
parent
4cbe471a83
commit
100e29e35e
@ -203,6 +203,27 @@ template<class vobj> inline RealD norm2(const Lattice<vobj> &arg){
|
|||||||
return real(nrm);
|
return real(nrm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Op,class T1>
|
||||||
|
inline auto norm2(const LatticeUnaryExpression<Op,T1> & expr) ->RealD
|
||||||
|
{
|
||||||
|
return norm2(closure(expr));
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class Op,class T1,class T2>
|
||||||
|
inline auto norm2(const LatticeBinaryExpression<Op,T1,T2> & expr) ->RealD
|
||||||
|
{
|
||||||
|
return norm2(closure(expr));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Op,class T1,class T2,class T3>
|
||||||
|
inline auto norm2(const LatticeTrinaryExpression<Op,T1,T2,T3> & expr) ->RealD
|
||||||
|
{
|
||||||
|
return norm2(closure(expr));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//The global maximum of the site norm2
|
//The global maximum of the site norm2
|
||||||
template<class vobj> inline RealD maxLocalNorm2(const Lattice<vobj> &arg)
|
template<class vobj> inline RealD maxLocalNorm2(const Lattice<vobj> &arg)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user