Changeset dbee17c in git
- Timestamp:
- Nov 6, 2009, 12:14:01 PM (14 years ago)
- Branches:
- (u'spielwiese', '5d369c3cbad1a1bf2d5c856a48fb8a30b51cec3b')
- Children:
- 83f349c17bc61f05628b00a81b245ebb3b00eac6
- Parents:
- 3580b7115f22b137b32322afb07cb8febdf9e80c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/Minor.cc
r3580b7 rdbee17c 18 18 19 19 MinorKey::MinorKey (const MinorKey& mk) { 20 //printf("\n%s", "MinorKey::MinorKey copy"); 20 21 _numberOfRowBlocks = mk.getNumberOfRowBlocks(); 21 22 _numberOfColumnBlocks = mk.getNumberOfColumnBlocks();; … … 78 79 MinorKey::MinorKey(const int lengthOfRowArray, const unsigned int* const rowKey, 79 80 const int lengthOfColumnArray, const unsigned int* const columnKey) { 81 //printf("\n%s", "MinorKey::MinorKey (args)"); 80 82 _numberOfRowBlocks = lengthOfRowArray; 81 83 _numberOfColumnBlocks = lengthOfColumnArray; … … 94 96 95 97 MinorKey::~MinorKey() { 98 //printf("\n%s", "MinorKey::~MinorKey"); 96 99 // free memory of _rowKey and _columnKey 97 100 delete [] _rowKey; … … 870 873 const int accumulatedMultiplications, const int accumulatedAdditions, 871 874 const int retrievals, const int potentialRetrievals) { 875 //printf("\n%s(%s)", "PolyMinorValue::PolyMinorValue (args)", pString(result)); 872 876 _result = pCopy(result); 873 877 // std::cout << std::endl << "PolyMinorValue creator, " << pString(_result); … … 881 885 882 886 PolyMinorValue::PolyMinorValue () { 883 _result = pISet(0); 887 //printf("\n%s", "PolyMinorValue::PolyMinorValue ()"); 888 _result = NULL; 884 889 // std::cout << std::endl << "PolyMinorValue creator, " << pString(_result) << " STANDARD!"; 885 890 _multiplications = -1; … … 893 898 PolyMinorValue::~PolyMinorValue() 894 899 { 895 p_Delete(&_result, currRing); 900 //printf("\n%s", "PolyMinorValue::~PolyMinorValue"); 901 p_Delete(&_result, currRing); 896 902 } 897 903 … … 902 908 int PolyMinorValue::getWeight () const { 903 909 // put measure for size of PolyMinorValue here, e.g. the number of monomials 904 // the cached polynomial910 // in the cached polynomial 905 911 return pLength(_result); // the number of monomials in the polynomial 906 912 } 907 913 908 914 string PolyMinorValue::toString () const { 909 char h[ 10];915 char h[20]; 910 916 911 917 // Let's see whether a cache has been used to compute this MinorValue: … … 936 942 937 943 PolyMinorValue::PolyMinorValue (const PolyMinorValue& mv) { 944 //printf("\n%s", "PolyMinorValue::PolyMinorValue copy"); 938 945 _result = pCopy(mv.getResult()); 939 946 _retrievals = mv.getRetrievals(); … … 945 952 } 946 953 947 void PolyMinorValue::operator= (const PolyMinorValue& mv) { 948 pDelete(&_result); 954 void PolyMinorValue::operator= (const PolyMinorValue& mv) 955 { 956 //printf("\nPolyMinorValue::operator=; mv = %s", mv.toString().c_str()); 957 if (_result != mv.getResult()) pDelete(&_result); 949 958 _result = pCopy(mv.getResult()); 959 //printf("\nPolyMinorValue::operator=; _result = %s", pString(_result)); 950 960 _retrievals = mv.getRetrievals(); 951 961 _potentialRetrievals = mv.getPotentialRetrievals();
Note: See TracChangeset
for help on using the changeset viewer.