[SCM] an open source computer algebra system branch, cleanedupstream, updated. 6125e540ca6d66c307958938a9d53b245507c323

Bernhard R. Link brlink at debian.org
Tue Apr 24 15:54:19 UTC 2012


The following commit has been merged in the cleanedupstream branch:
commit 0f922f7592acaf38f407ae414fe8871d429b0056
Author: Janko Boehm <janko at lubuntu>
Date:   Mon Mar 12 13:16:28 2012 +0100

    new: print routine for divisors and overload for +

diff --git a/Singular/LIB/divisors.lib b/Singular/LIB/divisors.lib
index caad1f9..ba0eb8a 100755
--- a/Singular/LIB/divisors.lib
+++ b/Singular/LIB/divisors.lib
@@ -79,9 +79,21 @@ proc mod_init()
 newstruct("divisor","ideal den,ideal num");
 newstruct("formaldivisor","list summands");
 newstruct("pdivisor","list summands, cone tail");
+
+system("install","divisor","print",divisor_print,1);
+
+system("install","divisor","+",divisorplus,2);
+}
+
+
+
+proc divisor_print(divisor D)
+{
+"Divisor = ("+string(D.den)+") - ("+string(D.num)+")";
 }
 
 
+
 ////////////////////////////////////////////////////////////////////////////////
 // divisors as numerator and denomiator ideals
 
@@ -97,6 +109,7 @@ proc divisorplus(divisor A, divisor B){
 return(makeDivisor(interred(A.num*B.num),interred(A.den*B.den)));
 }
 
+
 proc multdivisor(int n, divisor A){
 if (n<0) {return(multdivisor(-n,negativedivisor(A)));}
 return(makeDivisor(interred((A.num)^n),interred((A.den)^n)));
@@ -351,12 +364,15 @@ if (!(containsInSupport(dC,vv))) {ERROR("the linear form given should be in the
 for (i=1; i<=size(L);i++){
         vL[i]=list(); 
         vL[i][2]=L[i][2];
-	      vL[i][1]=Polymake::minimalValue(L[i][1],vv);
+	vL[i][1]=Polymake::minimalValue(L[i][1],vv);
 }
 vD.summands = vL;
 return(vD);}
 
 
+
+
+
 proc pdivisorplus(pdivisor A, pdivisor B){
 pdivisor C;
 int i,p;

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list