changeset 10:c6528c38b23c

a few minor fixes
author Wen X <xue.wen@elec.qmul.ac.uk>
date Thu, 28 Jul 2011 10:36:57 +0100
parents 91301b3d02c5
children 977f541d6683
files hs.cpp main.cpp matrix.cpp opt.cpp xcomplex.h
diffstat 5 files changed, 5 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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;
--- 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
 
 //---------------------------------------------------------------------------
 /**
--- 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
--- 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<T>& operator=(const T& c){x=c; y=0; return *this;}
-  template<class X> cmplx<T>& operator+=(const X& c){x+=c; y=0; return *this;}
-  template<class X> cmplx<T>& operator-=(const X& c){x-=c; y=0; return *this;}
+  template<class X> cmplx<T>& operator+=(const X& c){x+=c; return *this;}
+  template<class X> cmplx<T>& operator-=(const X& c){x-=c; return *this;}
   template<class X> cmplx<T>& operator*=(const X& c){x*=c; y*=c; return *this;}
   template<class X> cmplx<T>& operator/=(const X& c){x/=c; y/=c; return *this;}
   template<class X> cmplx<T>& operator=(const cmplx<X>& c){x=c.x; y=c.y; return* this;}