file
Cob.cppimplements the universal cobordism category from [1]
Classes
- struct CobMultHelper
- helper structure for the multiplication of cobordisms; this is in preparation for precomputing the algebra
Functions
- auto CobMultHelperFun(const IndexLL& new_comps, const std::vector<TE>& arcs, const IndexLL& comps0, const IndexLL& comps1) -> std::pair<std::vector<CobMultHelper>, IndexL>
- helper function for the multiplication of cobordisms; this is in preparation for precomputing the algebra
-
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(). - void expand_gens_if_needed(const int& n)
- computes more entries for PCA::
gens if PCA::max_strands < n - void expand_vec_if_needed(const int& n)
- computes more entries for PCA::
vec if PCA::max < n - auto new_order_new2old(const IndexLL& new_comps, const IndexL& comp_names) -> IndexL
- compute new order for comp_names
- auto partitionGenerator(const IndexLL& new_comps, const std::vector<TE>& arcs) -> IndexLL
- preparation for CobMor<Coeff>::operator*( const CobMor<Coeff> &cob1 )
- auto to_BNObj(const TE& strands, const TE& top, const size_t& index) -> bool
- true if 2-ended tangle or (4-ended tangle and horizontal), false if (4-ended 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.