Changeset 59f768a in git
- Timestamp:
- Feb 21, 2011, 6:36:05 PM (13 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 8e45403dd5d584f695e8de3d811c76579d3a7a55
- Parents:
- b388bead3e22d56f05ae7c8f4df4114f8b65fb1d
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-02-21 18:36:05+01:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:59:32+01:00
- Location:
- libpolys/polys/monomials
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/monomials/ring.cc
rb388be r59f768a 789 789 omBin char_ptr_bin = omGetSpecBin(sizeof(char_ptr)); // deallocation? 790 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 900 901 791 902 // creates a commutative nc extension; "converts" comm.ring to a Plural ring 903 #ifdef HAVE_PLURAL 792 904 ring nc_rCreateNCcomm_rCopy(ring r) 793 905 { … … 808 920 return r; 809 921 } 922 #endif 923 810 924 811 925 /*2 -
libpolys/polys/monomials/ring.h
rb388be r59f768a 180 180 } data; 181 181 }; 182 183 #ifdef HAVE_PLURAL 184 struct nc_struct; 185 typedef struct nc_struct nc_struct; 186 #endif 187 182 188 struct ip_sring 183 189 {
Note: See TracChangeset
for help on using the changeset viewer.