Changeset 4eba3ad in git for dyn_modules/syzextra/syzextra.h
 Timestamp:
 Apr 28, 2014, 8:49:00 PM (9 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'f875bbaccd0831e36aaed09ff6adeb3eb45aeb94')
 Children:
 c7d29b194535c9015230fc587b2ae178c075ef3e
 Parents:
 92992c08c2f387188f53d5f874a342fb60dccc06
 gitauthor:
 Oleksandr Motsak <motsak@mathematik.unikl.de>20140428 20:49:00+02:00
 gitcommitter:
 Oleksandr Motsak <motsak@mathematik.unikl.de>20140507 04:41:46+02:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

dyn_modules/syzextra/syzextra.h
r92992c r4eba3ad 30 30 typedef struct sip_sideal * ideal; 31 31 32 class idrec; 33 typedef idrec * idhdl; 32 34 33 35 BEGIN_NAMESPACE_SINGULARXX BEGIN_NAMESPACE(SYZEXTRA) … … 51 53 52 54 55 56 57 58 /// Computation attribute storage 59 struct SchreyerSyzygyComputationFlags 60 { 61 SchreyerSyzygyComputationFlags(idhdl rootRingHdl); 62 63 /// output all the intermediate states 64 const bool __DEBUG__; // DebugOutput; 65 66 /// ? 67 const bool __SYZCHECK__; // CheckSyzygyProperty; 68 69 /// ? 70 const bool __LEAD2SYZ__; // TwoLeadingSyzygyTerms; 71 72 /// Reduce syzygy tails wrt the leading syzygy terms 73 const bool __TAILREDSYZ__; // TailReducedSyzygies; 74 75 /// Use the usual NF's Spoly reduction while dropping lower order terms 76 const bool __HYBRIDNF__; // UseHybridNF 77 78 }; 79 80 81 53 82 /** @class SchreyerSyzygyComputation syzextra.h 54 83 * … … 65 94 public: 66 95 /// Construct a global object for given input data (separated into leads & tails) 67 SchreyerSyzygyComputation(const ideal idLeads, const ideal idTails, const ring rBaseRing): 68 m_idLeads(idLeads), m_idTails(idTails), m_rBaseRing(rBaseRing), 69 m_syzLeads(NULL), m_syzTails(NULL), m_LS(NULL) {} 96 SchreyerSyzygyComputation(const ideal idLeads, const ideal idTails, const ring rBaseRing, const SchreyerSyzygyComputationFlags attribues): 97 m_rBaseRing(rBaseRing), 98 m_idLeads(idLeads), m_idTails(idTails), 99 m_syzLeads(NULL), m_syzTails(NULL), m_LS(NULL), m_atttributes(attribues) {} 70 100 71 101 72 102 /// Construct a global object for given input data (separated into leads & tails) 73 SchreyerSyzygyComputation(const ideal idLeads, const ideal idTails, const ideal syzLeads, const ring rBaseRing): 74 m_idLeads(idLeads), m_idTails(idTails), m_rBaseRing(rBaseRing), 75 m_syzLeads(NULL), m_syzTails(NULL), m_LS(syzLeads) {} 103 SchreyerSyzygyComputation(const ideal idLeads, const ideal idTails, const ideal syzLeads, const ring rBaseRing, const SchreyerSyzygyComputationFlags attribues): 104 m_rBaseRing(rBaseRing), 105 m_idLeads(idLeads), m_idTails(idTails), 106 m_syzLeads(NULL), m_syzTails(NULL), m_LS(syzLeads), m_atttributes(attribues) {} 76 107 77 108 … … 96 127 97 128 // TODO: save shortcut (syz: .>) LM(LM(m) * "t") > syz? 98 poly FindReducer(poly product, poly syzterm) ;99 100 poly SchreyerSyzygyNF(poly syz_lead, poly syz_2) ;129 poly FindReducer(poly product, poly syzterm) const; 130 131 poly SchreyerSyzygyNF(poly syz_lead, poly syz_2) const; 101 132 102 133 // TODO: store m * @tail .^.^.> ? 103 poly TraverseTail(poly multiplier, poly tail) ;134 poly TraverseTail(poly multiplier, poly tail) const; 104 135 105 136 // TODO: save shortcut (syz: .>) LM(m) * "t" > ? 106 poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck); 107 108 137 poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck) const; 138 109 139 protected: 110 140 … … 129 159 130 160 /*mutable?*/ ideal m_LS; ///< leading syzygy terms used for reducing syzygy tails 161 162 const SchreyerSyzygyComputationFlags m_atttributes; 131 163 }; 132 164 … … 134 166 // The following wrappers are just for testing separate functions on highest level (within schreyer.lib) 135 167 136 static inline void ComputeSyzygy(const ideal L, const ideal T, ideal& LL, ideal& TT, const ring R )137 { 138 SchreyerSyzygyComputation syz(L, T, R );168 static inline void ComputeSyzygy(const ideal L, const ideal T, ideal& LL, ideal& TT, const ring R, const SchreyerSyzygyComputationFlags A) 169 { 170 SchreyerSyzygyComputation syz(L, T, R, A); 139 171 syz.ComputeSyzygy(); 140 172 syz.ReadOffResult(LL, TT); 141 173 } 142 174 143 static inline ideal ComputeLeadingSyzygyTerms(const ideal& L, const ring R )144 { 145 SchreyerSyzygyComputation syz(L, NULL, R );175 static inline ideal ComputeLeadingSyzygyTerms(const ideal& L, const ring R, const SchreyerSyzygyComputationFlags A) 176 { 177 SchreyerSyzygyComputation syz(L, NULL, R, A); 146 178 syz.ComputeLeadingSyzygyTerms(false); 147 179 ideal LL, TT; … … 150 182 } 151 183 152 static inline ideal Compute2LeadingSyzygyTerms(const ideal& L, const ring R )153 { 154 SchreyerSyzygyComputation syz(L, NULL, R );184 static inline ideal Compute2LeadingSyzygyTerms(const ideal& L, const ring R, const SchreyerSyzygyComputationFlags A) 185 { 186 SchreyerSyzygyComputation syz(L, NULL, R, A); 155 187 syz.ComputeLeadingSyzygyTerms(true); 156 188 ideal LL, TT; … … 160 192 161 193 static inline poly FindReducer(poly product, poly syzterm, 162 ideal L, ideal LS, const ring R )163 { 164 SchreyerSyzygyComputation syz(L, NULL, LS, R );194 ideal L, ideal LS, const ring R, const SchreyerSyzygyComputationFlags A) 195 { 196 SchreyerSyzygyComputation syz(L, NULL, LS, R, A); 165 197 return syz.FindReducer(product, syzterm); 166 198 } 167 199 168 200 static inline poly TraverseTail(poly multiplier, poly tail, 169 ideal L, ideal T, ideal LS, const ring R )170 { 171 SchreyerSyzygyComputation syz(L, T, LS, R );201 ideal L, ideal T, ideal LS, const ring R, const SchreyerSyzygyComputationFlags A) 202 { 203 SchreyerSyzygyComputation syz(L, T, LS, R, A); 172 204 return syz.TraverseTail(multiplier, tail); 173 205 } 174 206 175 207 static inline poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck, 176 ideal L, ideal T, ideal LS, const ring R )177 { 178 SchreyerSyzygyComputation syz(L, T, LS, R );208 ideal L, ideal T, ideal LS, const ring R, const SchreyerSyzygyComputationFlags A) 209 { 210 SchreyerSyzygyComputation syz(L, T, LS, R, A); 179 211 return syz.ReduceTerm(multiplier, term4reduction, syztermCheck); 180 212 } … … 182 214 183 215 static inline poly SchreyerSyzygyNF(poly syz_lead, poly syz_2, 184 ideal L, ideal T, ideal LS, const ring R )185 { 186 SchreyerSyzygyComputation syz(L, T, LS, R );216 ideal L, ideal T, ideal LS, const ring R, const SchreyerSyzygyComputationFlags A) 217 { 218 SchreyerSyzygyComputation syz(L, T, LS, R, A); 187 219 return syz.SchreyerSyzygyNF(syz_lead, syz_2); 188 220 } 189 190 191 221 192 222 END_NAMESPACE
Note: See TracChangeset
for help on using the changeset viewer.