sources/modules/Complex.cpp file

implements the category of complexes over a category, such as the Bar-Natan algebra $\mathcal{B}$ from [4] or the universal cobordism category from [1]


template<typename Mor>
auto NonZero(const Eigen::Index& row, const Eigen::Index& col, const Mor& value) -> bool
true if the component of the Eigen matrix is non-zero; needed by the Eigen Template Library
template<typename Obj, template<typename> typename Mor, typename Coeff>
auto to_coeff(const Complex<Obj, Mor, Z_mod<integer_simulant>>& cx) -> Complex<Obj, Mor, Coeff>
converts a complex over the integers $\mathbb{Z}$ to a complex over the new ring of coefficients specified by 'New_Coeff'