Ignore:
Timestamp:
Feb 22, 2012, 9:51:21 PM (12 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
f23ccea9a38ee5dfa1e6454e84dd4bd11cd5ce90
Parents:
64f0ca8d7049bea31d0e107cf5c613e0b6ffa5d3
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-22 21:51:21+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-23 20:35:08+01:00
Message:
switchable NC-extensions

add/chg: two more non-commutative (special multiplication) extensions and general Plural caching can be switched on&off now
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/nc/old.gring.cc

    r64f0ca r232bbd5  
    7272poly nc_p_Bracket_qq(poly p, const poly q, const ring r);
    7373
    74 int  iNCExtensions = 0; // SCAMASK; // only SCA can be used by default
    75 
     74// only SCA can be used by default, formulas are off by default
     75int  iNCExtensions = SCAMASK | NOFORMULAMASK;
    7676
    7777int& getNCExtensions()
     
    8787}
    8888
    89 
    9089bool ncExtensions(int iMask) //  = 0x0FFFF
    9190{
    9291  return ((getNCExtensions() & iMask) == iMask);
    9392}
    94 
    95 
    96 
    97 
    98 static const bool bNoPluralMultiplication = false;  // use only formula shortcuts in my OOP Multiplier
    99 
    100 // the following make sense only if bNoPluralMultiplication is false:
    101 static const bool bNoFormula = true;  // don't use any formula shortcuts
    102 static const bool bNoCache   = false; // only formula whenever possible, only make sanse if bNoFormula is false!
    103 
    104 
    105 // false, true, false == old "good" Plural
    106 // false, false ==>> Plural + Cache + Direct Formula - not much
    107 // false, false, true ==>> Plural Mult + Direct Formula (no ~cache)
    108 // true, *, *  == new OOP multiplication!
    109 
    11093
    11194/* global nc_macros : */
     
    10711054static inline poly gnc_uu_Mult_ww_formula (int i, int a, int j, int b, const ring r)
    10721055{
    1073   if(bNoFormula)
     1056  if(ncExtensions(NOFORMULAMASK))
    10741057    return gnc_uu_Mult_ww_vert(i, a, j, b, r);
    10751058
     
    11401123
    11411124
    1142   if(bNoCache && !bNoFormula) // don't use cache whenever possible!
     1125  if(ncExtensions(NOCACHEMASK) && !ncExtensions(NOFORMULAMASK)) // don't use cache whenever possible!
    11431126  { // without cache!?
    11441127    CFormulaPowerMultiplier* FormulaMultiplier = GetFormulaPowerMultiplier(r);
     
    32713254  }
    32723255
    3273   if( bNoPluralMultiplication )
     3256  if( ncExtensions(NOPLURALMASK) )
    32743257    ncInitSpecialPairMultiplication(rGR);
    32753258
    3276   if(!rIsSCA(rGR) && !bNoFormula)
     3259  if(!rIsSCA(rGR) && !ncExtensions(NOFORMULAMASK))
    32773260    ncInitSpecialPowersMultiplication(rGR);
    32783261
Note: See TracChangeset for help on using the changeset viewer.