Ignore:
Timestamp:
Aug 2, 2012, 8:11:43 PM (11 years ago)
Author:
Oleksandr Motsak <motsak@…>
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
Message:
made all classes inherit from SchreyerSyzygyComputationFlags

chg: moved the base ring into attributes (no need in extra ring argument)
chg: removed __SYZCHECK__ (only relevant for schreyer.lib)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • dyn_modules/syzextra/syzextra.h

    rdd24e5 r495328  
    6363{
    6464  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
    6673  /// output all the intermediate states
    6774  const bool __DEBUG__; // DebugOutput;
    6875
    69   /// ?
    70   const bool __SYZCHECK__; // CheckSyzygyProperty;
     76//  const bool __SYZCHECK__; // CheckSyzygyProperty: never tested here...
    7177
    7278  /// ?
     
    7985  const bool __HYBRIDNF__; // UseHybridNF
    8086
     87  /// global base ring
     88  const ring m_rBaseRing;
     89
    8190};
    8291
    8392class SchreyerSyzygyComputation;
    8493
    85 class CLCM: public std::vector<bool>
     94class CLCM: public SchreyerSyzygyComputationFlags, public std::vector<bool>
    8695{
    8796  public:
     
    97106
    98107
    99 class CReducerFinder
     108class CReducerFinder: public SchreyerSyzygyComputationFlags
    100109{
    101110  private:
     
    148157 * @sa Schreyer Syzygy Computation Paper & Talk & Python prototype
    149158 */
    150 class SchreyerSyzygyComputation
     159class SchreyerSyzygyComputation: public SchreyerSyzygyComputationFlags
    151160{
    152161  friend class CLCM;
     
    156165
    157166    /// 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),
    160169        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),
    162171        m_lcm(*this), m_div(*this)
    163172    {
     
    166175
    167176    /// 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),
    170179        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),
    172181        m_lcm(*this), m_div(*this)
    173182    {
     
    219228
    220229  private:
    221     /// global base ring
    222     const ring  m_rBaseRing;
    223 
    224230    /// input leading terms
    225231    const ideal m_idLeads;
     
    235241
    236242    /*mutable?*/ ideal m_LS; ///< leading syzygy terms used for reducing syzygy tails
    237 
    238     const SchreyerSyzygyComputationFlags m_atttributes;
    239243
    240244    /// Bitmask for variables occuring in leading terms
     
    248252// The following wrappers are just for testing separate functions on highest level (within schreyer.lib)
    249253
    250 static inline void ComputeSyzygy(const ideal L, const ideal T, ideal& LL, ideal& TT, const ring R, const SchreyerSyzygyComputationFlags A)
    251 {
    252   SchreyerSyzygyComputation syz(L, T, R, A);
     254static inline void ComputeSyzygy(const ideal L, const ideal T, ideal& LL, ideal& TT, const SchreyerSyzygyComputationFlags A)
     255{
     256  SchreyerSyzygyComputation syz(L, T, A);
    253257  syz.ComputeSyzygy();
    254258  syz.ReadOffResult(LL, TT);
    255259}
    256260
    257 static inline ideal ComputeLeadingSyzygyTerms(const ideal& L, const ring R, const SchreyerSyzygyComputationFlags A)
    258 {
    259   SchreyerSyzygyComputation syz(L, NULL, R, A);
     261static inline ideal ComputeLeadingSyzygyTerms(const ideal& L, const SchreyerSyzygyComputationFlags A)
     262{
     263  SchreyerSyzygyComputation syz(L, NULL, A);
    260264  syz.ComputeLeadingSyzygyTerms(false);
    261265  ideal LL, TT;
     
    264268}
    265269
    266 static inline ideal Compute2LeadingSyzygyTerms(const ideal& L, const ring R, const SchreyerSyzygyComputationFlags A)
    267 {
    268   SchreyerSyzygyComputation syz(L, NULL, R, A);
     270static inline ideal Compute2LeadingSyzygyTerms(const ideal& L, const SchreyerSyzygyComputationFlags A)
     271{
     272  SchreyerSyzygyComputation syz(L, NULL, A);
    269273  syz.ComputeLeadingSyzygyTerms(true);
    270274  ideal LL, TT;
     
    274278
    275279static inline poly FindReducer(poly product, poly syzterm,
    276                                ideal L, ideal LS, const ring R, const SchreyerSyzygyComputationFlags 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);
    279283  return syz._FindReducer(product, syzterm);
    280284}
    281285
    282286static inline poly TraverseTail(poly multiplier, poly tail,
    283                                 ideal L, ideal T, ideal LS, const ring R, const SchreyerSyzygyComputationFlags 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);
    286290  return syz.TraverseTail(multiplier, tail);
    287291}
    288292
    289293static inline poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck,
    290                               ideal L, ideal T, ideal LS, const ring R, const SchreyerSyzygyComputationFlags 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);
    293297  return syz.ReduceTerm(multiplier, term4reduction, syztermCheck);
    294298}
     
    296300
    297301static inline poly SchreyerSyzygyNF(poly syz_lead, poly syz_2,
    298                                     ideal L, ideal T, ideal LS, const ring R, const SchreyerSyzygyComputationFlags 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);
    301305  return syz.SchreyerSyzygyNF(syz_lead, syz_2);
    302306}
Note: See TracChangeset for help on using the changeset viewer.