SOLIDstate
A C++ library for solid state physics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Symmatgen.hpp
Go to the documentation of this file.
1 #ifndef MISC_SYMMATGEN_HPP
2 #define MISC_SYMMATGEN_HPP
3 
4 #include <armadillo>
5 
6 namespace solid
7 {
8 
18 template <typename T>
19 void Symmatgen(arma::SpMat<T> &mat)
20 {
21  mat += mat.t();
22 }
23 } // namespace solid
24 
25 #endif
void Symmatgen(arma::SpMat< T > &mat)
Symmetrize the matrix by adding transpose to it .
Definition: Symmatgen.hpp:19