//=============================================================================
/*! zrovector*zhsmatrix operator */
inline _zrovector operator*(const zrovector& vec, const zhsmatrix& mat)
{VERBOSE_REPORT;
#ifdef CPPL_DEBUG
if(vec.l!=mat.m){
std::cerr << "[ERROR] operator*(const zrovector&, const zhsmatrix&)" << std::endl
<< "These vector and matrix can not make a product." << std::endl
<< "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl;
exit(1);
}
#endif//CPPL_DEBUG
zrovector newvec(mat.n);
newvec.zero();
for(std::vector<zcomponent>::const_iterator it=mat.data.begin(); it!=mat.data.end(); it++){
newvec(it->j) +=vec(it->i)*it->v;
if(it->i!=it->j){
newvec(it->i) +=vec(it->j)*std::conj(it->v);
}
}
return _(newvec);
}