Changeset 495328 in git for dyn_modules/syzextra/syzextra.h
- Timestamp:
- Aug 2, 2012, 8:11:43 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
- Children:
- 5cecde90d96d1acc0cbd216cf0037bd2db293c31
- Parents:
- dd24e5dded66979eda13e955b93fc284cbb341e7
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-08-02 20:11:43+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
rdd24e5 r495328 63 63 { 64 64 SchreyerSyzygyComputationFlags(idhdl rootRingHdl); 65 65 SchreyerSyzygyComputationFlags(const SchreyerSyzygyComputationFlags& attr): 66 __DEBUG__(attr.__DEBUG__), 67 // __SYZCHECK__(attr.__SYZCHECK__), 68 __LEAD2SYZ__(attr.__LEAD2SYZ__), __TAILREDSYZ__(attr.__TAILREDSYZ__), 69 __HYBRIDNF__(attr.__HYBRIDNF__), m_rBaseRing(attr.m_rBaseRing) 70 {} 71 72 66 73 /// output all the intermediate states 67 74 const bool __DEBUG__; // DebugOutput; 68 75 69 /// ? 70 const bool __SYZCHECK__; // CheckSyzygyProperty; 76 // const bool __SYZCHECK__; // CheckSyzygyProperty: never tested here... 71 77 72 78 /// ? … … 79 85 const bool __HYBRIDNF__; // UseHybridNF 80 86 87 /// global base ring 88 const ring m_rBaseRing; 89 81 90 }; 82 91 83 92 class SchreyerSyzygyComputation; 84 93 85 class CLCM: public std::vector<bool>94 class CLCM: public SchreyerSyzygyComputationFlags, public std::vector<bool> 86 95 { 87 96 public: … … 97 106 98 107 99 class CReducerFinder 108 class CReducerFinder: public SchreyerSyzygyComputationFlags 100 109 { 101 110 private: … … 148 157 * @sa Schreyer Syzygy Computation Paper & Talk & Python prototype 149 158 */ 150 class SchreyerSyzygyComputation 159 class SchreyerSyzygyComputation: public SchreyerSyzygyComputationFlags 151 160 { 152 161 friend class CLCM; … … 156 165 157 166 /// Construct a global object for given input data (separated into leads & tails) 158 SchreyerSyzygyComputation(const ideal idLeads, const ideal idTails, const ring rBaseRing, const SchreyerSyzygyComputationFlags attribues):159 m_rBaseRing(rBaseRing),167 SchreyerSyzygyComputation(const ideal idLeads, const ideal idTails, const SchreyerSyzygyComputationFlags setting): 168 SchreyerSyzygyComputationFlags(setting), 160 169 m_idLeads(idLeads), m_idTails(idTails), 161 m_syzLeads(NULL), m_syzTails(NULL), m_LS(NULL), m_atttributes(attribues),170 m_syzLeads(NULL), m_syzTails(NULL), m_LS(NULL), 162 171 m_lcm(*this), m_div(*this) 163 172 { … … 166 175 167 176 /// Construct a global object for given input data (separated into leads & tails) 168 SchreyerSyzygyComputation(const ideal idLeads, const ideal idTails, const ideal syzLeads, const ring rBaseRing, const SchreyerSyzygyComputationFlags attribues):169 m_rBaseRing(rBaseRing),177 SchreyerSyzygyComputation(const ideal idLeads, const ideal idTails, const ideal syzLeads, const SchreyerSyzygyComputationFlags setting): 178 SchreyerSyzygyComputationFlags(setting), 170 179 m_idLeads(idLeads), m_idTails(idTails), 171 m_syzLeads(NULL), m_syzTails(NULL), m_LS(syzLeads), m_atttributes(attribues),180 m_syzLeads(NULL), m_syzTails(NULL), m_LS(syzLeads), 172 181 m_lcm(*this), m_div(*this) 173 182 { … … 219 228 220 229 private: 221 /// global base ring222 const ring m_rBaseRing;223 224 230 /// input leading terms 225 231 const ideal m_idLeads; … … 235 241 236 242 /*mutable?*/ ideal m_LS; ///< leading syzygy terms used for reducing syzygy tails 237 238 const SchreyerSyzygyComputationFlags m_atttributes;239 243 240 244 /// Bitmask for variables occuring in leading terms … … 248 252 // The following wrappers are just for testing separate functions on highest level (within schreyer.lib) 249 253 250 static inline void ComputeSyzygy(const ideal L, const ideal T, ideal& LL, ideal& TT, const ring R, constSchreyerSyzygyComputationFlags A)251 { 252 SchreyerSyzygyComputation syz(L, T, R,A);254 static inline void ComputeSyzygy(const ideal L, const ideal T, ideal& LL, ideal& TT, const SchreyerSyzygyComputationFlags A) 255 { 256 SchreyerSyzygyComputation syz(L, T, A); 253 257 syz.ComputeSyzygy(); 254 258 syz.ReadOffResult(LL, TT); 255 259 } 256 260 257 static inline ideal ComputeLeadingSyzygyTerms(const ideal& L, const ring R, constSchreyerSyzygyComputationFlags A)258 { 259 SchreyerSyzygyComputation syz(L, NULL, R,A);261 static inline ideal ComputeLeadingSyzygyTerms(const ideal& L, const SchreyerSyzygyComputationFlags A) 262 { 263 SchreyerSyzygyComputation syz(L, NULL, A); 260 264 syz.ComputeLeadingSyzygyTerms(false); 261 265 ideal LL, TT; … … 264 268 } 265 269 266 static inline ideal Compute2LeadingSyzygyTerms(const ideal& L, const ring R, constSchreyerSyzygyComputationFlags A)267 { 268 SchreyerSyzygyComputation syz(L, NULL, R,A);270 static inline ideal Compute2LeadingSyzygyTerms(const ideal& L, const SchreyerSyzygyComputationFlags A) 271 { 272 SchreyerSyzygyComputation syz(L, NULL, A); 269 273 syz.ComputeLeadingSyzygyTerms(true); 270 274 ideal LL, TT; … … 274 278 275 279 static inline poly FindReducer(poly product, poly syzterm, 276 ideal L, ideal LS, const ring R, constSchreyerSyzygyComputationFlags A)277 { 278 SchreyerSyzygyComputation syz(L, NULL, LS, R,A);280 ideal L, ideal LS, const SchreyerSyzygyComputationFlags A) 281 { 282 SchreyerSyzygyComputation syz(L, NULL, LS, A); 279 283 return syz._FindReducer(product, syzterm); 280 284 } 281 285 282 286 static inline poly TraverseTail(poly multiplier, poly tail, 283 ideal L, ideal T, ideal LS, const ring R, constSchreyerSyzygyComputationFlags A)284 { 285 SchreyerSyzygyComputation syz(L, T, LS, R,A);287 ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A) 288 { 289 SchreyerSyzygyComputation syz(L, T, LS, A); 286 290 return syz.TraverseTail(multiplier, tail); 287 291 } 288 292 289 293 static inline poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck, 290 ideal L, ideal T, ideal LS, const ring R, constSchreyerSyzygyComputationFlags A)291 { 292 SchreyerSyzygyComputation syz(L, T, LS, R,A);294 ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A) 295 { 296 SchreyerSyzygyComputation syz(L, T, LS, A); 293 297 return syz.ReduceTerm(multiplier, term4reduction, syztermCheck); 294 298 } … … 296 300 297 301 static inline poly SchreyerSyzygyNF(poly syz_lead, poly syz_2, 298 ideal L, ideal T, ideal LS, const ring R, constSchreyerSyzygyComputationFlags A)299 { 300 SchreyerSyzygyComputation syz(L, T, LS, R,A);302 ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A) 303 { 304 SchreyerSyzygyComputation syz(L, T, LS, A); 301 305 return syz.SchreyerSyzygyNF(syz_lead, syz_2); 302 306 }
Note: See TracChangeset
for help on using the changeset viewer.