Add standard typedefs for matrices and vectors
Created by: femtobit
Suggestion for discussion:
There are many places in the codebase where we use typedefs such as using Vector = Eigen::VectorXcd
or using Matrix = Eigen::MatrixXcd
which I think is somewhat redundant and can be a bit tedious.
I suggest adding a couple of standard typedefs to netket.hpp
or a custom header file, such as (current names are just for illustration)
using NkVector = Eigen::VectorXcd;
using NkMatrix = Eigen::MatrixXcd;
// if needed:
using NkRealMatrix = ...
using NkRealVector = ...
It could also be convenient to have a shorthand for std::complex<double>
.
Of course, there might be legitimate cases where something else should be used (e.g., fixed-size Eigen vectors for performance reasons), but I think we do not loose much by using the types above by default and declaring them globally and only adding template parameters or different typedefs if they are really needed. (Compare the YAGNI principle).
This could also help reduce the amount of template parameters we have which are only ever instantiated with one type.