📄 nystrom.hh
字号:
#ifndef __nystrom_h__#define __nystrom_h__//given A and B, computes normalized A and B.//return shoud be preallocatedvoid approxNormalize(const double* A, const double* B, const int nsamples, const int nothers, double* NA, double* NB);//given NA and NB, approximate embedding vectors //return shoud be preallocated//// use TwoStep techniquevoid approxEigenvectors(const double* NA, const double* NB, const int nsamples, const int nothers, double* evec, double* eval);//// linear algebra support//pseudo-inverse LAPACK wrapper// Ainv shoud be preallocatedvoid pinv(const double* A, int n, int m, double* Ainv); //svd LAPACK wrapper// [U,S,V] shoud be preallocatedvoid svd(const double* A, int n, int m, double* U, double* S, double* V);//matrix zerovoid mz(double* A, const int An, const int Am);//matrix copy void mc(const double* A, const int An, const int Am, double* B, const int Bn, const int Bm);//matrix transposevoid mt(const double* A, const int An, const int Am, double* B, const int Bn, const int Bm);//matrix matrix addition, C should be preallocatedvoid mma(const double* A, const int An, const int Am, const double* B, const int Bn, const int Bm, double* C, const int Cn, const int Cm);//matrix matrix multiply BLAS wrapper, C should be preallocatedvoid mmm(const double* A, const int An, const int Am, const double* B, const int Bn, const int Bm, double* C, const int Cn, const int Cm);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -