Changeset 2b78bd in git for Singular/Minor.h


Ignore:
Timestamp:
Oct 2, 2009, 3:51:19 PM (15 years ago)
Author:
Frank Seelisch <seelisch@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
f2dcd1b022b58cf3a4a8c2c40138fcd7a41c8fe7
Parents:
a8df349fc8f6ff6a87ea2b79a5d652597ad42e14
Message:
test code for Minors and C++Wrappers (with defines HAVE_MINOR and HAVE_WRAPPERS)


git-svn-id: file:///usr/local/Singular/svn/trunk@12151 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/Minor.h

    ra8df349 r2b78bd  
    1 #ifndef MinorIncluded
    2 #define MinorIncluded
     1#ifndef Minor_H
     2#define Minor_H
     3
     4#ifdef HAVE_MINOR
    35
    46#include <assert.h>
     
    342344
    343345             /**
    344              * a store for the actual number of summations to compute the current minor
    345              */
    346              long _summations;
     346             * a store for the actual number of additions to compute the current minor
     347             */
     348             long _additions;
    347349
    348350             /**
     
    354356
    355357             /**
    356              * a store for the accumulated number of summations to compute the current minor;
    357              * This also includes all summations nested in sub-minors which may be retrieved
     358             * a store for the accumulated number of additions to compute the current minor;
     359             * This also includes all additions nested in sub-minors which may be retrieved
    358360             * from a cache. (Thus, these nested operations do not need to be performed again.)
    359361             */
     
    457459             * @see Cache::getWeight () const
    458460             */
    459              virtual int getWeight () const;
     461             virtual long getWeight () const;
    460462
    461463             /**
     
    502504
    503505             /**
    504              * A method for accessing the summations performed while computing this minor.
    505              * Summations that were needed to compute cached sub-minors will not be counted,
     506             * A method for accessing the additions performed while computing this minor.
     507             * Additions that were needed to compute cached sub-minors will not be counted,
    506508             * as the value of those sub-minors can be directly retrieved from the cache.
    507              * @return the number of summations performed
    508              * @see MinorValue::getAccumulatedSummations () const
    509              */
    510              long getSummations () const;
    511 
    512              /**
    513              * A method for accessing the summations performed while computing this minor, including
    514              * all nested summations.
    515              * Contrary to MinorValue::getSummations () const, this method will also count summations
     509             * @return the number of additions performed
     510             * @see MinorValue::getAccumulatedAdditions () const
     511             */
     512             long getAdditions () const;
     513
     514             /**
     515             * A method for accessing the additions performed while computing this minor, including
     516             * all nested additions.
     517             * Contrary to MinorValue::getAdditions () const, this method will also count additions
    516518             * needed to compute all cached sub-minors (, although they need not be performed again in order to
    517519             * compute the given instance of MinorValue).
    518              * @return the number of summations performed, including nested summations
    519              * @see MinorValue::getSummations () const
    520              */
    521              long getAccumulatedSummations () const;
     520             * @return the number of additions performed, including nested additions
     521             * @see MinorValue::getAdditions () const
     522             */
     523             long getAccumulatedAdditions () const;
    522524
    523525             /**
     
    586588    of any minor is a long again.<br>
    587589    Besides capturing the actual value of a minor, LongMinorValue also has built-in facilities to
    588     count the number of summations and multiplications performed when computing a minor. These two
     590    count the number of additions and multiplications performed when computing a minor. These two
    589591    counters, especially the latter, are important measures when we want to investigate the complexity
    590592    of computing minors.<br>
     
    605607             * @param result the actual value of the represented minor
    606608             * @param multiplications number of multiplications to compute \a this minor
    607              * @param summations number of summations to compute \a this minor
     609             * @param additions number of additions to compute \a this minor
    608610             * @param accumulatedMultiplications number of multiplications to compute \a this minor, including nested operations
    609              * @param accumulatedSummations number of summations to compute \a this minor, including nested operations
     611             * @param accumulatedAdditions number of additions to compute \a this minor, including nested operations
    610612             * @param retrievals number of times this minor has been retrieved from cache
    611613             * @param potentialRetrievals maximum number of times this minor may be retrieved from cache
    612614             */
    613              LongMinorValue (const long result, const int multiplications, const int summations,
    614                              const int accumulatedMultiplications, const int accumulatedSummations,
     615             LongMinorValue (const long result, const int multiplications, const int additions,
     616                             const int accumulatedMultiplications, const int accumulatedAdditions,
    615617                             const int retrievals, const int potentialRetrievals);
    616618
     
    624626             long getResult() const;
    625627
    626              int getWeight () const;
     628             long getWeight () const;
    627629
    628630             /**
     
    644646             * @param result the actual value of the represented minor
    645647             * @param multiplications number of multiplications to compute \a this minor
    646              * @param summations number of summations to compute \a this minor
     648             * @param additions number of additions to compute \a this minor
    647649             * @param accumulatedMultiplications number of multiplications to compute \a this minor, including nested operations
    648              * @param accumulatedSummations number of summations to compute \a this minor, including nested operations
     650             * @param accumulatedAdditions number of additions to compute \a this minor, including nested operations
    649651             * @param retrievals number of times this minor has been retrieved from cache
    650652             * @param potentialRetrievals maximum number of times this minor may be retrieved from cache
    651653             */
    652              PolyMinorValue (const poly result, const int multiplications, const int summations,
    653                              const int accumulatedMultiplications, const int accumulatedSummations,
     654             PolyMinorValue (const poly result, const int multiplications, const int additions,
     655                             const int accumulatedMultiplications, const int accumulatedAdditions,
    654656                             const int retrievals, const int potentialRetrievals);
    655657
     
    663665             poly getResult() const;
    664666
    665              int getWeight () const;
     667             long getWeight () const;
    666668
    667669             /**
     
    672674};
    673675
     676#endif // HAVE_MINOR
     677
    674678#endif
     679/* Minor_H */
Note: See TracChangeset for help on using the changeset viewer.