From 2c99357806b10ff15294f19c5e54888415c1f52d Mon Sep 17 00:00:00 2001 From: jiri Date: Tue, 15 Aug 2006 20:23:32 +0000 Subject: [PATCH] *** empty log message *** --- nonclass.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/nonclass.h b/nonclass.h index 5a11e0c..24f5503 100644 --- a/nonclass.h +++ b/nonclass.h @@ -8,6 +8,28 @@ //MISC +export template +const NRSMat twoside_transform(const NRSMat &S, const NRMat &C) //calculate C^dagger S C +{ +NRMat tmp = S * C; +NRMat result(C.ncols(),C.ncols()); +result.gemm((T)0,C,'t',tmp,'n',(T)1); +return NRSMat(result); +} + + +export template +const NRSMat twoside_transform_t(const NRSMat &S, const NRMat &C) //calculate C S C^dagger +{ +NRMat tmp = C * S; +NRMat result(C.rows(),C.nrows()); +result.gemm((T)0,tmp,'n',C,'t',(T)1); +return NRSMat(result); +} + + + + export template const NRMat diagonalmatrix(const NRVec &x) {