# HG changeset patch # User Wen X # Date 1311845817 -3600 # Node ID c6528c38b23cbf86c6aad11b640ec7756d0aea5c # Parent 91301b3d02c5b7831266fdbff3275e5179ce1d51 a few minor fixes diff -r 91301b3d02c5 -r c6528c38b23c hs.cpp --- a/hs.cpp Fri Oct 15 14:54:51 2010 +0100 +++ b/hs.cpp Thu Jul 28 10:36:57 2011 +0100 @@ -4636,7 +4636,7 @@ }//SynthesisHS /** - function SynthesisHS: synthesizes a perfectly harmonic sinusoid without aligning the phases. + function SynthesisHS2: synthesizes a perfectly harmonic sinusoid without aligning the phases. Frequencies of partials above the fundamental are not used in this synthesis process. In: partials[M][Fr]: HS partials diff -r 91301b3d02c5 -r c6528c38b23c main.cpp --- a/main.cpp Fri Oct 15 14:54:51 2010 +0100 +++ b/main.cpp Thu Jul 28 10:36:57 2011 +0100 @@ -235,7 +235,7 @@ if (m<=maxT) { int mm=ceil(m*0.6667), mp=floor(m*1.3333), cont=0; - for (int im=mm; im<=mp; im++) if (m!=im && autocor[im]>=autocor[m]) {cont=1; break;} + //for (int im=mm; im<=mp; im++) if (m!=im && autocor[im]>=autocor[m]) {cont=1; break;} if (cont==0) { if (prd==0 || autocor[m]>autocor[prd]*1.05) prd=m; diff -r 91301b3d02c5 -r c6528c38b23c matrix.cpp --- a/matrix.cpp Fri Oct 15 14:54:51 2010 +0100 +++ b/matrix.cpp Thu Jul 28 10:36:57 2011 +0100 @@ -705,19 +705,6 @@ return result; }//GICP -/** - function GICP: wrapper function that does not overwrite the input matrix: inv(A)->X. - - In: matrix A[N][N] - Out: matrix X[N][N] - - Returns the determinant of the inverse matrix, 0 on failure. -*/ -double GICP(int N, double** X, double** A) -{ - Copy(N, X, A); - return GICP(N, X); -}//GICP //--------------------------------------------------------------------------- /** diff -r 91301b3d02c5 -r c6528c38b23c opt.cpp --- a/opt.cpp Fri Oct 15 14:54:51 2010 +0100 +++ b/opt.cpp Thu Jul 28 10:36:57 2011 +0100 @@ -592,7 +592,7 @@ }//Newton_1d_max /** - function Newton_1d_max: Newton method for maximizing y(x). On calling y(x0)<=y(xa), y(x0)<=y(xb), + function Newton_1d_min: Newton method for minimizing y(x). On calling y(x0)<=y(xa), y(x0)<=y(xb), y'(xa)<0, y'(xb)>0 In: function ddy(x) that computes y, y' and y" at x diff -r 91301b3d02c5 -r c6528c38b23c xcomplex.h --- a/xcomplex.h Fri Oct 15 14:54:51 2010 +0100 +++ b/xcomplex.h Thu Jul 28 10:36:57 2011 +0100 @@ -26,8 +26,8 @@ T imag(){return y;} cmplx& operator=(const T& c){x=c; y=0; return *this;} - template cmplx& operator+=(const X& c){x+=c; y=0; return *this;} - template cmplx& operator-=(const X& c){x-=c; y=0; return *this;} + template cmplx& operator+=(const X& c){x+=c; return *this;} + template cmplx& operator-=(const X& c){x-=c; return *this;} template cmplx& operator*=(const X& c){x*=c; y*=c; return *this;} template cmplx& operator/=(const X& c){x/=c; y/=c; return *this;} template cmplx& operator=(const cmplx& c){x=c.x; y=c.y; return* this;}