trf++/include/trfbase
diff -N TrfVector_nvec.h
--- TrfVector_nvec.h 7 Jul 2010 16:10:38 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,60 +0,0 @@
-// TrfVector_nvec.h
-
-#ifndef TrfVector_nvec_H
-#define TrfVector_nvec_H
-
-// Header for using nvector, matrix and smatrix classes.
-
-// Contains headers for underlying TrfVector, TrfMatrix and TrfSMatrix
-// classes and corresponding typedefs.
-
-#include "trfutil/nvector.h"
-#include "trfutil/smatrix.h"
-#include "trfutil/matrix.h"
-
-namespace trf {
-
-//**********************************************************************
-
-typedef nvector<double> TrfVector;
-
-//**********************************************************************
-
-typedef matrix<double> TrfMatrix;
-
-//**********************************************************************
-
-class TrfSMatrix : public smatrix<double> {
-
-public: // methods
-
- // Constructor.
- explicit TrfSMatrix(int dim) : smatrix<double>(dim) { }
-
- // Constructor from base.
- TrfSMatrix(const smatrix<double>& rhs)
- : smatrix<double>(rhs) { }
-
- // Xform M * S * MT
- TrfSMatrix xform(const TrfMatrix& mtx) const {
- assert( nrow() == mtx.ncol() );
- const smatrix<double>& rsma = *this;
- const matrix<double>& rmtx = mtx;
- return rmtx % rsma;
- }
-
-};
-
-} // end namespace trf
-
-//**********************************************************************
-
-// Chi-square difference.
-inline
-double chisq_diff(const TrfVector& vecdiff, const TrfSMatrix& inverr) {
- return inverr % vecdiff;
-}
-
-//**********************************************************************
-
-#endif