Changeset dbee17c in git for Singular/Minor.cc


Ignore:
Timestamp:
Nov 6, 2009, 12:14:01 PM (14 years ago)
Author:
Frank Seelisch <seelisch@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
83f349c17bc61f05628b00a81b245ebb3b00eac6
Parents:
3580b7115f22b137b32322afb07cb8febdf9e80c
Message:

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

Legend:

Unmodified
Added
Removed
  • Singular/Minor.cc

    r3580b7 rdbee17c  
    1818
    1919MinorKey::MinorKey (const MinorKey& mk) {
     20//printf("\n%s", "MinorKey::MinorKey copy");
    2021    _numberOfRowBlocks = mk.getNumberOfRowBlocks();
    2122    _numberOfColumnBlocks = mk.getNumberOfColumnBlocks();;
     
    7879MinorKey::MinorKey(const int lengthOfRowArray, const unsigned int* const rowKey,
    7980                   const int lengthOfColumnArray, const unsigned int* const columnKey) {
     81//printf("\n%s", "MinorKey::MinorKey (args)");
    8082    _numberOfRowBlocks = lengthOfRowArray;
    8183    _numberOfColumnBlocks = lengthOfColumnArray;
     
    9496
    9597MinorKey::~MinorKey() {
     98//printf("\n%s", "MinorKey::~MinorKey");
    9699    // free memory of _rowKey and _columnKey
    97100    delete [] _rowKey;
     
    870873                                const int accumulatedMultiplications, const int accumulatedAdditions,
    871874                                const int retrievals, const int potentialRetrievals) {
     875//printf("\n%s(%s)", "PolyMinorValue::PolyMinorValue (args)", pString(result));
    872876    _result = pCopy(result);
    873877    // std::cout << std::endl << "PolyMinorValue creator, " << pString(_result);
     
    881885
    882886PolyMinorValue::PolyMinorValue () {
    883     _result = pISet(0);
     887//printf("\n%s", "PolyMinorValue::PolyMinorValue ()");
     888    _result = NULL;
    884889    // std::cout << std::endl << "PolyMinorValue creator, " << pString(_result) << " STANDARD!";
    885890    _multiplications = -1;
     
    893898PolyMinorValue::~PolyMinorValue()
    894899{
    895   p_Delete(&_result, currRing);
     900//printf("\n%s", "PolyMinorValue::~PolyMinorValue");
     901    p_Delete(&_result, currRing);
    896902}
    897903
     
    902908int PolyMinorValue::getWeight () const {
    903909    // put measure for size of PolyMinorValue here, e.g. the number of monomials
    904     // the cached polynomial
     910    // in the cached polynomial
    905911    return pLength(_result); // the number of monomials in the polynomial
    906912}
    907913
    908914string PolyMinorValue::toString () const {
    909     char h[10];
     915    char h[20];
    910916
    911917    // Let's see whether a cache has been used to compute this MinorValue:
     
    936942
    937943PolyMinorValue::PolyMinorValue (const PolyMinorValue& mv) {
     944//printf("\n%s", "PolyMinorValue::PolyMinorValue copy");
    938945    _result = pCopy(mv.getResult());
    939946    _retrievals = mv.getRetrievals();
     
    945952}
    946953
    947 void PolyMinorValue::operator= (const PolyMinorValue& mv) {
    948     pDelete(&_result);
     954void PolyMinorValue::operator= (const PolyMinorValue& mv)
     955{
     956//printf("\nPolyMinorValue::operator=; mv = %s", mv.toString().c_str());
     957    if (_result != mv.getResult()) pDelete(&_result);
    949958    _result = pCopy(mv.getResult());
     959//printf("\nPolyMinorValue::operator=; _result = %s", pString(_result));
    950960    _retrievals = mv.getRetrievals();
    951961    _potentialRetrievals = mv.getPotentialRetrievals();
Note: See TracChangeset for help on using the changeset viewer.