Changeset 488738 in git
- Timestamp:
- Sep 7, 2000, 9:38:22 AM (24 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 69139f6fac8f4e3fb3c358dfad72ef35f3d72d46
- Parents:
- 005a724a3fa1475cc2b7b1eedde7e946be3fbf5e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/sparsmat.cc
r005a72 r488738 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: sparsmat.cc,v 1.3 1 2000-08-14 12:56:51 obachmanExp $ */4 /* $Id: sparsmat.cc,v 1.32 2000-09-07 07:38:22 Singular Exp $ */ 5 5 6 6 /* … … 1903 1903 } 1904 1904 1905 // orginal text: 1906 // static BOOLEAN smIsNegQuot(poly a, const poly b, const poly c) 1907 // { 1908 // int i; 1909 // 1910 // i=pVariables; 1911 // while (i&&(pGetExp(b,i)<pGetExp(c,i))) i--; 1912 // if(i) 1913 // { 1914 // for (i=pVariables; i; i--) 1915 // { 1916 // if(pGetExp(b,i)<pGetExp(c,i)) 1917 // pSetExp(a,i,pGetExp(c,i)-pGetExp(b,i)); 1918 // else 1919 // pSetExp(a,i,0); 1920 // } 1921 // return TRUE; 1922 // } 1923 // else 1924 // { 1925 // for (i=pVariables; i; i--) 1926 // { 1927 // pSetExp(a,i,pGetExp(b,i)-pGetExp(c,i)); 1928 // } 1929 // return FALSE; 1930 // } 1931 // } 1905 1932 static BOOLEAN smIsNegQuot(poly a, const poly b, const poly c) 1906 1933 { 1907 int i; 1908 1909 i=pVariables; 1910 while (i&&(pGetExp(b,i)<pGetExp(c,i))) i--; 1911 if(i) 1912 { 1913 for (i=pVariables; i; i--) 1914 { 1915 if(pGetExp(b,i)<pGetExp(c,i)) 1934 int i=pVariables; 1935 1936 while ((i>0) && (pGetExp(c,i) >= pGetExp(b,i))) i--; 1937 if(i!=0) 1938 { 1939 for (i=pVariables; i>0; i--) 1940 { 1941 if(pGetExp(c,i) > pGetExp(b,i)) 1916 1942 pSetExp(a,i,pGetExp(c,i)-pGetExp(b,i)); 1917 1943 else … … 1922 1948 else 1923 1949 { 1924 for (i=pVariables; i; i--) 1925 { 1926 pSetExp(a,i,pGetExp(b,i)-pGetExp(c,i)); 1950 for (i=pVariables; i>0; i--) 1951 { 1952 int j=pGetExp(b,i)-pGetExp(c,i); 1953 if (j<0) { Print("!"); j=0;} 1954 pSetExp(a,i,j); 1927 1955 } 1928 1956 return FALSE;
Note: See TracChangeset
for help on using the changeset viewer.