Skip to content

Commit

Permalink
Renamed conflicting matrix name in compute_few_eigenvectors
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Jul 22, 2012
1 parent 8e101b7 commit 0c3cb28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/shogun/lib/SGMatrix.cpp
Expand Up @@ -593,13 +593,13 @@ double* SGMatrix<T>::compute_eigenvectors(double* matrix, int n, int m)
}

template <class T>
void SGMatrix<T>::compute_few_eigenvectors(double* matrix, double*& eigenvalues, double*& eigenvectors,
void SGMatrix<T>::compute_few_eigenvectors(double* matrix_, double*& eigenvalues, double*& eigenvectors,
int n, int il, int iu)
{
eigenvalues = SG_MALLOC(double, n);
eigenvectors = SG_MALLOC(double, (iu-il+1)*n);
int status = 0;
wrap_dsyevr('V','U',n,matrix,n,il,iu,eigenvalues,eigenvectors,&status);
wrap_dsyevr('V','U',n,matrix_,n,il,iu,eigenvalues,eigenvectors,&status);
ASSERT(status==0);
}

Expand Down
4 changes: 2 additions & 2 deletions src/shogun/lib/SGMatrix.h
Expand Up @@ -187,14 +187,14 @@ template<class T> class SGMatrix : public SGReferencedData
/** compute few eigenpairs of a symmetric matrix using LAPACK DSYEVR method
* (Relatively Robust Representations).
* Has at least O(n^3/3) complexity
* @param matrix symmetric matrix
* @param matrix_ symmetric matrix
* @param eigenvalues contains iu-il+1 eigenvalues in ascending order (to be free'd)
* @param eigenvectors contains iu-il+1 orthonormal eigenvectors of given matrix column-wise (to be free'd)
* @param n dimension of matrix
* @param il low index of requested eigenpairs (1<=il<=n)
* @param iu high index of requested eigenpairs (1<=il<=iu<=n)
*/
void compute_few_eigenvectors(double* matrix, double*& eigenvalues, double*& eigenvectors,
void compute_few_eigenvectors(double* matrix_, double*& eigenvalues, double*& eigenvectors,
int n, int il, int iu);

/* Computes scale* A*B, where A and B may be transposed.
Expand Down

0 comments on commit 0c3cb28

Please sign in to comment.