// $Id: CovMatrixInternal.h,v 1.3 2002/09/19 16:45:18 sachs Exp $ // David Sachs - Fermilab - April 2002 // // Common information for CovMatrix and Bivector implementation #include "CovMatrices/CovMatrix.h" #include #include namespace CovMatrices { // Define precision and width for displaying dp numbers enum { W = 18, P = 10 }; // should have W = P + 8 // Routine to display a vector // Should be called only from CovMatrices package routines inline void CovMatrixPutVector(std::ostream& o, const std::vector& v) { int n = v.size(); int oldp = o.precision(P); std::ios::fmtflags oldf = o.setf( std::ios::scientific | std::ios::showpos ); int i; // Print leading brace o << "{"; // Print each element of the vector for ( i = 0; i < n; i++ ) { o << std::setw(W) << v[i]; } // Print trailing brace o << " }"; // Restore the file to its previous state o.flags(oldf); o.precision(oldp); } }