Changeset cfaf16 in git for Singular/svd_si.h
- Timestamp:
- Nov 3, 2017, 4:16:00 PM (6 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- c6e446fa33d72d4eb037ca712dfdec6a28c5914d
- Parents:
- dbb26818e03a9b85b6dd00922db4fdd7c008f44b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/svd_si.h
rdbb268 rcfaf16 108 108 109 109 const complex operator/(const complex& lhs, const complex& rhs); 110 constbool operator==(const complex& lhs, const complex& rhs);111 constbool operator!=(const complex& lhs, const complex& rhs);110 bool operator==(const complex& lhs, const complex& rhs); 111 bool operator!=(const complex& lhs, const complex& rhs); 112 112 const complex operator+(const complex& lhs); 113 113 const complex operator-(const complex& lhs); … … 124 124 const complex operator/(const double& lhs, const complex& rhs); 125 125 const complex operator/(const complex& lhs, const double& rhs); 126 constdouble abscomplex(const complex &z);126 double abscomplex(const complex &z); 127 127 const complex conj(const complex &z); 128 128 const complex csqr(const complex &z); … … 1617 1617 // 1618 1618 template<unsigned int Precision> 1619 constbool operator==(const ampf<Precision>& op1, const ampf<Precision>& op2)1619 bool operator==(const ampf<Precision>& op1, const ampf<Precision>& op2) 1620 1620 { 1621 1621 return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())==0; … … 1623 1623 1624 1624 template<unsigned int Precision> 1625 constbool operator!=(const ampf<Precision>& op1, const ampf<Precision>& op2)1625 bool operator!=(const ampf<Precision>& op1, const ampf<Precision>& op2) 1626 1626 { 1627 1627 return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())!=0; … … 1629 1629 1630 1630 template<unsigned int Precision> 1631 constbool operator<(const ampf<Precision>& op1, const ampf<Precision>& op2)1631 bool operator<(const ampf<Precision>& op1, const ampf<Precision>& op2) 1632 1632 { 1633 1633 return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())<0; … … 1635 1635 1636 1636 template<unsigned int Precision> 1637 constbool operator>(const ampf<Precision>& op1, const ampf<Precision>& op2)1637 bool operator>(const ampf<Precision>& op1, const ampf<Precision>& op2) 1638 1638 { 1639 1639 return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())>0; … … 1641 1641 1642 1642 template<unsigned int Precision> 1643 constbool operator<=(const ampf<Precision>& op1, const ampf<Precision>& op2)1643 bool operator<=(const ampf<Precision>& op1, const ampf<Precision>& op2) 1644 1644 { 1645 1645 return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())<=0; … … 1647 1647 1648 1648 template<unsigned int Precision> 1649 constbool operator>=(const ampf<Precision>& op1, const ampf<Precision>& op2)1649 bool operator>=(const ampf<Precision>& op1, const ampf<Precision>& op2) 1650 1650 { 1651 1651 return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())>=0; … … 1715 1715 1716 1716 template<unsigned int Precision> 1717 constint sign(const ampf<Precision> &x)1717 int sign(const ampf<Precision> &x) 1718 1718 { 1719 1719 int s = mpfr_sgn(x.getReadPtr()); … … 1762 1762 1763 1763 template<unsigned int Precision> 1764 constsigned long trunc(const ampf<Precision> &x)1764 signed long trunc(const ampf<Precision> &x) 1765 1765 { 1766 1766 ampf<Precision> tmp; … … 1788 1788 1789 1789 template<unsigned int Precision> 1790 constsigned long floor(const ampf<Precision> &x)1790 signed long floor(const ampf<Precision> &x) 1791 1791 { 1792 1792 ampf<Precision> tmp; … … 1805 1805 1806 1806 template<unsigned int Precision> 1807 constsigned long ceil(const ampf<Precision> &x)1807 signed long ceil(const ampf<Precision> &x) 1808 1808 { 1809 1809 ampf<Precision> tmp; … … 1822 1822 1823 1823 template<unsigned int Precision> 1824 constsigned long round(const ampf<Precision> &x)1824 signed long round(const ampf<Precision> &x) 1825 1825 { 1826 1826 ampf<Precision> tmp; … … 1887 1887 template<unsigned int Precision> const ampf<Precision> operator/(const ampf<Precision>& op1, const signed type& op2) { return op1/ampf<Precision>(op2); } \ 1888 1888 template<unsigned int Precision> const ampf<Precision> operator/(const ampf<Precision>& op1, const unsigned type& op2) { return op1/ampf<Precision>(op2); } \ 1889 template<unsigned int Precision> constbool operator==(const signed type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)==op2; } \1890 template<unsigned int Precision> constbool operator==(const unsigned type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)==op2; } \1891 template<unsigned int Precision> constbool operator==(const ampf<Precision>& op1, const signed type& op2) { return op1==ampf<Precision>(op2); } \1892 template<unsigned int Precision> constbool operator==(const ampf<Precision>& op1, const unsigned type& op2) { return op1==ampf<Precision>(op2); } \1893 template<unsigned int Precision> constbool operator!=(const signed type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)!=op2; } \1894 template<unsigned int Precision> constbool operator!=(const unsigned type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)!=op2; } \1895 template<unsigned int Precision> constbool operator!=(const ampf<Precision>& op1, const signed type& op2) { return op1!=ampf<Precision>(op2); } \1896 template<unsigned int Precision> constbool operator!=(const ampf<Precision>& op1, const unsigned type& op2) { return op1!=ampf<Precision>(op2); } \1897 template<unsigned int Precision> constbool operator<=(const signed type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)<=op2; } \1898 template<unsigned int Precision> constbool operator<=(const unsigned type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)<=op2; } \1899 template<unsigned int Precision> constbool operator<=(const ampf<Precision>& op1, const signed type& op2) { return op1<=ampf<Precision>(op2); } \1900 template<unsigned int Precision> constbool operator<=(const ampf<Precision>& op1, const unsigned type& op2) { return op1<=ampf<Precision>(op2); } \1901 template<unsigned int Precision> constbool operator>=(const signed type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)>=op2; } \1902 template<unsigned int Precision> constbool operator>=(const unsigned type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)>=op2; } \1903 template<unsigned int Precision> constbool operator>=(const ampf<Precision>& op1, const signed type& op2) { return op1>=ampf<Precision>(op2); } \1904 template<unsigned int Precision> constbool operator>=(const ampf<Precision>& op1, const unsigned type& op2) { return op1>=ampf<Precision>(op2); } \1905 template<unsigned int Precision> constbool operator<(const signed type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)<op2; } \1906 template<unsigned int Precision> constbool operator<(const unsigned type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)<op2; } \1907 template<unsigned int Precision> constbool operator<(const ampf<Precision>& op1, const signed type& op2) { return op1<ampf<Precision>(op2); } \1908 template<unsigned int Precision> constbool operator<(const ampf<Precision>& op1, const unsigned type& op2) { return op1<ampf<Precision>(op2); } \1909 template<unsigned int Precision> constbool operator>(const signed type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)>op2; } \1910 template<unsigned int Precision> constbool operator>(const unsigned type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)>op2; } \1911 template<unsigned int Precision> constbool operator>(const ampf<Precision>& op1, const signed type& op2) { return op1>ampf<Precision>(op2); } \1912 template<unsigned int Precision> constbool operator>(const ampf<Precision>& op1, const unsigned type& op2) { return op1>ampf<Precision>(op2); }1889 template<unsigned int Precision> bool operator==(const signed type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)==op2; } \ 1890 template<unsigned int Precision> bool operator==(const unsigned type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)==op2; } \ 1891 template<unsigned int Precision> bool operator==(const ampf<Precision>& op1, const signed type& op2) { return op1==ampf<Precision>(op2); } \ 1892 template<unsigned int Precision> bool operator==(const ampf<Precision>& op1, const unsigned type& op2) { return op1==ampf<Precision>(op2); } \ 1893 template<unsigned int Precision> bool operator!=(const signed type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)!=op2; } \ 1894 template<unsigned int Precision> bool operator!=(const unsigned type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)!=op2; } \ 1895 template<unsigned int Precision> bool operator!=(const ampf<Precision>& op1, const signed type& op2) { return op1!=ampf<Precision>(op2); } \ 1896 template<unsigned int Precision> bool operator!=(const ampf<Precision>& op1, const unsigned type& op2) { return op1!=ampf<Precision>(op2); } \ 1897 template<unsigned int Precision> bool operator<=(const signed type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)<=op2; } \ 1898 template<unsigned int Precision> bool operator<=(const unsigned type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)<=op2; } \ 1899 template<unsigned int Precision> bool operator<=(const ampf<Precision>& op1, const signed type& op2) { return op1<=ampf<Precision>(op2); } \ 1900 template<unsigned int Precision> bool operator<=(const ampf<Precision>& op1, const unsigned type& op2) { return op1<=ampf<Precision>(op2); } \ 1901 template<unsigned int Precision> bool operator>=(const signed type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)>=op2; } \ 1902 template<unsigned int Precision> bool operator>=(const unsigned type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)>=op2; } \ 1903 template<unsigned int Precision> bool operator>=(const ampf<Precision>& op1, const signed type& op2) { return op1>=ampf<Precision>(op2); } \ 1904 template<unsigned int Precision> bool operator>=(const ampf<Precision>& op1, const unsigned type& op2) { return op1>=ampf<Precision>(op2); } \ 1905 template<unsigned int Precision> bool operator<(const signed type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)<op2; } \ 1906 template<unsigned int Precision> bool operator<(const unsigned type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)<op2; } \ 1907 template<unsigned int Precision> bool operator<(const ampf<Precision>& op1, const signed type& op2) { return op1<ampf<Precision>(op2); } \ 1908 template<unsigned int Precision> bool operator<(const ampf<Precision>& op1, const unsigned type& op2) { return op1<ampf<Precision>(op2); } \ 1909 template<unsigned int Precision> bool operator>(const signed type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)>op2; } \ 1910 template<unsigned int Precision> bool operator>(const unsigned type& op1, const ampf<Precision>& op2) { return ampf<Precision>(op1)>op2; } \ 1911 template<unsigned int Precision> bool operator>(const ampf<Precision>& op1, const signed type& op2) { return op1>ampf<Precision>(op2); } \ 1912 template<unsigned int Precision> bool operator>(const ampf<Precision>& op1, const unsigned type& op2) { return op1>ampf<Precision>(op2); } 1913 1913 __AMP_BINARY_OPI(char) 1914 1914 __AMP_BINARY_OPI(short) … … 2154 2154 // 2155 2155 template<unsigned int Precision> 2156 constbool operator==(const campf<Precision>& lhs, const campf<Precision>& rhs)2156 bool operator==(const campf<Precision>& lhs, const campf<Precision>& rhs) 2157 2157 { return lhs.x==rhs.x && lhs.y==rhs.y; } 2158 2158 2159 2159 template<unsigned int Precision> 2160 constbool operator!=(const campf<Precision>& lhs, const campf<Precision>& rhs)2160 bool operator!=(const campf<Precision>& lhs, const campf<Precision>& rhs) 2161 2161 { return lhs.x!=rhs.x || lhs.y!=rhs.y; } 2162 2162 … … 2692 2692 amp::ampf<Precision> t; 2693 2693 int i; 2694 int vm;2695 2696 2694 2697 2695 if( tau==0 || n1>n2 || m1>m2 ) … … 2703 2701 // w := C' * v 2704 2702 // 2705 vm = m2-m1+1;2706 2703 for(i=n1; i<=n2; i++) 2707 2704 { … … 6601 6598 ap::template_1d_array< amp::ampf<Precision> > ctemp; 6602 6599 ap::template_1d_array< amp::ampf<Precision> > etemp; 6603 bool rightside;6604 6600 bool fwddir; 6605 6601 amp::ampf<Precision> tmp; … … 6644 6640 ctemp.setbounds(cstart, cend); 6645 6641 maxitr = 12; 6646 rightside = true;6647 6642 fwddir = true; 6648 6643
Note: See TracChangeset
for help on using the changeset viewer.