Changeset 4f0f42 in git for libpolys/polys/monomials


Ignore:
Timestamp:
Mar 30, 2011, 6:10:59 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
cf5c053a2033583db0824a2b0459625b00d37a26
Parents:
21c6b368221deec3e5484f0c925b9ea662ef2f90
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-03-30 18:10:59+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:04:16+01:00
Message:
FIX: non-commutative interface in nc/*, main header: nc.h
Location:
libpolys/polys/monomials
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/monomials/p_polys.h

    r21c6b3 r4f0f42  
    1010 *  Version: $Id$
    1111 *******************************************************************/
     12/***************************************************************
     13 *  Purpose: implementation of poly procs which iter over ExpVector
     14 *  Author:  obachman (Olaf Bachmann)
     15 *  Created: 8/00
     16 *  Version: $Id$
     17 *******************************************************************/
    1218#ifndef P_POLYS_H
    1319#define P_POLYS_H
     20
     21#include <omalloc/omalloc.h>
     22#include <misc/mylimits.h>
     23#include <coeffs/coeffs.h>
    1424
    1525#include <polys/monomials/ring.h>
    1626#include <polys/monomials/monomials.h>
    1727#include <polys/monomials/polys-impl.h>
     28
     29#include <polys/templates/p_MemCmp.h>
     30#include <polys/templates/p_MemAdd.h>
     31#include <polys/templates/p_MemCopy.h>
    1832#include <polys/templates/p_Procs.h>
    19 #include <polys/templates/p_Procs.h>
     33
     34// #include <polys/monomials/p_polys.h>
     35
    2036#include <polys/sbuckets.h>
     37
     38#ifdef HAVE_PLURAL
     39#include <polys/nc/nc.h>
     40#endif
     41
    2142
    2243/***************************************************************
     
    11521173}
    11531174
    1154 /***************************************************************
    1155  *  Purpose: implementation of poly procs which iter over ExpVector
    1156  *  Author:  obachman (Olaf Bachmann)
    1157  *  Created: 8/00
    1158  *  Version: $Id$
    1159  *******************************************************************/
    1160 #include <misc/mylimits.h>
    1161 #include <polys/templates/p_MemCmp.h>
    1162 // #include <polys/structs.h>
    1163 #include <polys/monomials/ring.h>
    1164 #include <coeffs/coeffs.h>
    11651175
    11661176#if PDEBUG > 0
     
    11861196#define pDivAssume(x)   ((void)0)
    11871197
    1188 #include <omalloc/omalloc.h>
    1189 #include <coeffs/coeffs.h>
    1190 #include <polys/monomials/p_polys.h>
    1191 #include <polys/templates/p_MemAdd.h>
    1192 #include <polys/templates/p_MemCopy.h>
     1198
    11931199
    11941200/***************************************************************
  • libpolys/polys/monomials/ring.cc

    r21c6b3 r4f0f42  
    788788typedef char *             char_ptr;
    789789omBin char_ptr_bin = omGetSpecBin(sizeof(char_ptr)); // deallocation?
    790 
    791 
    792 #ifdef HAVE_PLURAL
    793 // NC pProcs:
    794 typedef poly (*mm_Mult_p_Proc_Ptr)(const poly m, poly p, const ring r);
    795 typedef poly (*mm_Mult_pp_Proc_Ptr)(const poly m, const poly p, const ring r);
    796 
    797 typedef ideal (*GB_Proc_Ptr)(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat);
    798 
    799 typedef poly (*SPoly_Proc_Ptr)(const poly p1, const poly p2, const ring r);
    800 typedef poly (*SPolyReduce_Proc_Ptr)(const poly p1, poly p2, const ring r);
    801 
    802 typedef void (*bucket_Proc_Ptr)(kBucket_pt b, poly p, number *c);
    803 
    804 struct nc_pProcs
    805 {
    806 public:
    807   mm_Mult_p_Proc_Ptr                    mm_Mult_p;
    808   mm_Mult_pp_Proc_Ptr                   mm_Mult_pp;
    809 
    810   bucket_Proc_Ptr                       BucketPolyRed;
    811   bucket_Proc_Ptr                       BucketPolyRed_Z;
    812 
    813   SPoly_Proc_Ptr                        SPoly;
    814   SPolyReduce_Proc_Ptr                  ReduceSPoly;
    815 
    816   GB_Proc_Ptr                           GB;
    817 //                                         GlobalGB, // BBA
    818 //                                         LocalGB;  // MORA
    819 };
    820 
    821 
    822 struct nc_struct
    823 {
    824   nc_type type;
    825   //ring basering; // the ring C,D,.. live in (commutative ring with this NC structure!)
    826 
    827   // initial data: square matrices rVar() x rVar()
    828   // logically: upper triangular!!!
    829   // TODO: eliminate this waste of memory!!!!
    830   matrix C;
    831   matrix D;
    832 
    833   // computed data:
    834   matrix *MT; // size 0.. (rVar()*rVar()-1)/2
    835   matrix COM;
    836   int *MTsize; // size 0.. (rVar()*rVar()-1)/2
    837 
    838   // IsSkewConstant indicates whethere coeffs C_ij are all equal,
    839   // effective together with nc_type=nc_skew
    840   int IsSkewConstant;
    841 
    842   private:
    843     // internal data for different implementations
    844     // if dynamic => must be deallocated in destructor (nc_rKill!)
    845     union
    846     {
    847       struct
    848       {
    849         // treat variables from iAltVarsStart till iAltVarsEnd as alternating vars.
    850         // these variables should have odd degree, though that will not be checked
    851         // iAltVarsStart, iAltVarsEnd are only used together with nc_type=nc_exterior
    852         // 1 <= iAltVarsStart <= iAltVarsEnd <= r->N
    853         unsigned int iFirstAltVar, iLastAltVar; // = 0 by default
    854 
    855         // for factors of super-commutative algebras we need
    856         // the part of general quotient ideal modulo squares!   
    857         ideal idSCAQuotient; // = NULL by default. // must be deleted in Kill!
    858       } sca;
    859     } data;
    860 
    861     CGlobalMultiplier* m_Multiplier;
    862     CFormulaPowerMultiplier* m_PowerMultiplier;
    863 
    864   public:
    865    
    866     inline nc_type& ncRingType() { return (type); };
    867     inline nc_type ncRingType() const { return (type); };
    868 
    869     inline unsigned int& FirstAltVar()
    870         { assume(ncRingType() == nc_exterior); return (data.sca.iFirstAltVar); };
    871     inline unsigned int& LastAltVar ()
    872         { assume(ncRingType() == nc_exterior); return (data.sca.iLastAltVar ); };
    873 
    874     inline unsigned int FirstAltVar() const
    875         { assume(ncRingType() == nc_exterior); return (data.sca.iFirstAltVar); };
    876     inline unsigned int LastAltVar () const
    877         { assume(ncRingType() == nc_exterior); return (data.sca.iLastAltVar ); };
    878 
    879     inline ideal& SCAQuotient()
    880         { assume(ncRingType() == nc_exterior); return (data.sca.idSCAQuotient); };
    881 
    882     inline CGlobalMultiplier* GetGlobalMultiplier() const
    883         { assume(ncRingType() != nc_exterior); return (m_Multiplier); };
    884 
    885     inline CGlobalMultiplier*& GetGlobalMultiplier()
    886         { assume(ncRingType() != nc_exterior); return (m_Multiplier); };
    887 
    888 
    889     inline CFormulaPowerMultiplier* GetFormulaPowerMultiplier() const
    890         { assume(ncRingType() != nc_exterior); return (m_PowerMultiplier); };
    891 
    892     inline CFormulaPowerMultiplier*& GetFormulaPowerMultiplier()
    893         { assume(ncRingType() != nc_exterior); return (m_PowerMultiplier); };
    894    
    895   public:
    896     nc_pProcs p_Procs; // NC procedures.
    897 
    898 };
    899 #endif
    900790
    901791
Note: See TracChangeset for help on using the changeset viewer.