Changeset dd24e5 in git for dyn_modules/syzextra/syzextra.h
- Timestamp:
- Aug 1, 2012, 5:25:00 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '1d362c315e551a5b527ab0759f8839cf0e94f3a5')
- Children:
- 495328d14a955b215ad10b598e995ab522243881
- Parents:
- 026171e1f09fe373a5c6ea5ed0b8db1abeb952f3
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-08-01 17:25:00+02:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-05-07 04:41:46+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dyn_modules/syzextra/syzextra.h
r026171 rdd24e5 18 18 19 19 #include <vector> 20 #include <map> 20 21 21 22 // include basic definitions … … 96 97 97 98 99 class CReducerFinder 100 { 101 private: 102 class CLeadingTerm 103 { 104 public: 105 CLeadingTerm(unsigned int id, const poly p, const ring); 106 107 private: 108 CLeadingTerm(); 109 110 public: 111 112 const unsigned long m_sev; ///< not short exp. vector 113 // NOTE/TODO: either of the following should be enough: 114 const unsigned int m_label; ///< index in the main L[] + 1 115 const poly m_lt; ///< the leading term itself L[label-1] 116 }; 117 118 typedef long TComponentKey; 119 typedef std::vector<const CLeadingTerm*> TReducers; 120 typedef std::map< TComponentKey, TReducers> CReducersHash; 121 122 public: 123 124 /// goes over all leading terms 125 CReducerFinder(const SchreyerSyzygyComputation& data); 126 127 ~CReducerFinder(); 128 129 // TODO: save shortcut (syz: |-.->) LM(LM(m) * "t") -> syz? 130 poly FindReducer(const poly product, const poly syzterm) const; 131 132 private: 133 const SchreyerSyzygyComputation& m_data; 134 135 CReducersHash m_hash; // can also be replaced with a vector indexed by components 136 }; 137 138 139 98 140 /** @class SchreyerSyzygyComputation syzextra.h 99 141 * … … 109 151 { 110 152 friend class CLCM; 153 friend class CReducerFinder; 111 154 112 155 public: … … 117 160 m_idLeads(idLeads), m_idTails(idTails), 118 161 m_syzLeads(NULL), m_syzTails(NULL), m_LS(NULL), m_atttributes(attribues), 119 m_lcm(*this) 162 m_lcm(*this), m_div(*this) 120 163 { 121 164 } … … 127 170 m_idLeads(idLeads), m_idTails(idTails), 128 171 m_syzLeads(NULL), m_syzTails(NULL), m_LS(syzLeads), m_atttributes(attribues), 129 m_lcm(*this) 172 m_lcm(*this), m_div(*this) 130 173 { 131 174 } … … 151 194 void ComputeLeadingSyzygyTerms(bool bComputeSecondTerms = true); 152 195 153 // TODO: save shortcut (syz: |-.->) LM(LM(m) * "t") -> syz?154 poly FindReducer(poly product, poly syzterm) const;155 156 196 poly SchreyerSyzygyNF(poly syz_lead, poly syz_2) const; 157 197 … … 162 202 poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck) const; 163 203 204 public: 205 /// just for testing via the wrapper below 206 inline poly _FindReducer(const poly product, const poly syzterm) const 207 { return m_div.FindReducer(product, syzterm); } 208 164 209 protected: 165 210 … … 195 240 /// Bitmask for variables occuring in leading terms 196 241 const CLCM m_lcm; 242 243 /// Divisor finder 244 const CReducerFinder m_div; 197 245 }; 198 246 … … 229 277 { 230 278 SchreyerSyzygyComputation syz(L, NULL, LS, R, A); 231 return syz. FindReducer(product, syzterm);279 return syz._FindReducer(product, syzterm); 232 280 } 233 281
Note: See TracChangeset
for help on using the changeset viewer.