class map_rules { public: map_rules () { } map_rules (const map_rules &) = delete; virtual ~map_rules () { } map_rules &operator = (const map_rules &) = delete; virtual void map (basedvector, 1> &out, resolution_diagram_builder &rdb) const = 0; }; template class cube /* of resolutions */ { public: typedef ::linear_combination linear_combination; typedef ::linear_combination_const_iter linear_combination_const_iter; public: bool markedp_only; knot_diagram &kd; unsigned n_crossings; unsigned n_resolutions; unsigned n_generators; vector resolution_circles; vector resolution_generator1; ptr > khC; mod_map compute_map (unsigned dh, unsigned max_n, bool mirror, bool reverse_orientation, unsigned to_reverse, const map_rules &rules) const; mod_map compute_d (unsigned dh, unsigned max_n, bool mirror, bool reverse_orientation, unsigned to_reverse) const; mod_map compute_twin_arrows_P (bool mirror, bool reverse_orientation, unsigned to_reverse) const; mod_map H_i (unsigned c); mod_map compute_nu () const; mod_map compute_X (unsigned p) const; void check_reverse_crossings (); void check_reverse_orientation (); public: cube (knot_diagram &d_, bool markedp_only_ = 0); ~cube () { } grading compute_generator_grading (unsigned g) const; grading compute_state_monomial_grading (unsigned state, unsigned monomial) const; unsigned generator (unsigned i, unsigned j) const; pair generator_state_monomial (unsigned g) const; ptr > compute_kh () const; void show_state (unsigned state) const; void show_state_monomial (unsigned state, unsigned monomial) const; void show_self () const { printf ("cube"); } void display_self () const; }; class twisted_map_rules { public: twisted_map_rules () { } twisted_map_rules (const twisted_map_rules &) = delete; virtual ~twisted_map_rules () { } map_rules &operator = (const twisted_map_rules &) = delete; virtual void map (basedvector >, 1> &out, resolution_diagram_builder &rdb) const = 0; }; template class twisted_cube { public: typedef fraction_field > R; public: const cube &c; public: twisted_cube (const cube &c_) : c(c_) { } twisted_cube (const twisted_cube &) = delete; ~twisted_cube () { } twisted_cube &operator = (const twisted_cube &) = delete; mod_map compute_twisted_map (basedvector edge_weight, unsigned dh, unsigned to_reverse, const twisted_map_rules &rules) const; mod_map compute_twisted_barE (basedvector edge_weight, unsigned dh, unsigned to_reverse) const; mod_map twisted_d0 (basedvector edge_weight) const; }; extern sseq compute_szabo_sseq (const cube &c); #include