file
algHF.cppimplements the HF algebra from OzSzPingPong
Functions

template<typename Coeff>auto CobNonZero(const int& row, const int& col, const CobMor<Coeff>& value) > bool
 true if morphism is zero; this function is needed by the Eigen Template Library

template<typename Coeff>auto deco_is_zero(const Deco<Coeff>& deco) > bool
 true if the coefficient is 0; this function is used in CobMor::
simplify() .  auto new_order_new2old(const IndexLL& new_comps, const IndexL& comp_names) > IndexL
 compute new order for comp_names
 auto to_BNObj(const TE& strands, const TE& top, const size_t& index) > bool
 true if 2ended tangle or (4ended tangle and horizontal), false if (4ended tangle and vertical); raises error for any other cases.
Function documentation
template<typename Coeff>
bool deco_is_zero(const Deco<Coeff>& deco)
true if the coefficient is 0; this function is used in CobMor::
check if zero; used in CobMor::
IndexL new_order_new2old(const IndexLL& new_comps, const IndexL& comp_names)
compute new order for comp_names
the output 'new_order' can be used as a function
new_order[new_index] = old_index
to reference elements in comp_names by their new indices; primarily used for reordering components and deco.dots.
Assumptions:
in AddCapMixed: (if the number of components is the same)
comp_names should be a permutation of the first entries of each new_comp in new_comps.
In AddCap11:
Case 1: One component is split into two. Then the larger comp_name cannot be found in comp_names, so the number of old components is returned in that index.
Case 2: Two component are merged. Then at the index of the merged component, the smaller of the two old_indices is returned.