46 #ifndef _NUMTNS_IMPL_HPP_
47 #define _NUMTNS_IMPL_HPP_
59 for(Int i=0; i < T.m() * T.n() * T.p(); i++) *(ptr++) = val;
71 for(Int i=0; i < T.m() * T.n() * T.p(); i++)
72 sum += abs(ptr[i]) * abs(ptr[i]);
79 #endif // _NUMTNS_IMPL_HPP_
Real Energy(const NumMat< F > &M)
Energy computes the L2 norm of a matrix (treated as a vector).
Definition: nummat_impl.hpp:70
void SetValue(NumMat< F > &M, F val)
SetValue sets a numerical matrix to a constant val.
Definition: nummat_impl.hpp:61
Numerical tensor.
Definition: numtns_decl.hpp:64
F * data_
The pointer for the actual data.
Definition: numtns_decl.hpp:80