Commit 5ffc65b176bf47d78493c7d626fd4f1076a2f8e2
1 parent
683a07a5
do not use namespaces any longer
Showing
70 changed files
with
289 additions
and
459 deletions
include/GData.hpp
| ... | ... | @@ -21,8 +21,6 @@ |
| 21 | 21 | |
| 22 | 22 | /* __ Includes ___________________________________________________________ */ |
| 23 | 23 | |
| 24 | -/* __ Namespaces _________________________________________________________ */ | |
| 25 | - | |
| 26 | 24 | |
| 27 | 25 | /***********************************************************************//** |
| 28 | 26 | * @class GData | ... | ... |
include/GException.hpp
| ... | ... | @@ -19,21 +19,18 @@ |
| 19 | 19 | #include <sstream> // ostringstream |
| 20 | 20 | #include <stdexcept> // exception |
| 21 | 21 | |
| 22 | -/* __ Namespaces _________________________________________________________ */ | |
| 23 | -using namespace std; | |
| 24 | - | |
| 25 | 22 | |
| 26 | 23 | /*************************************************************************** |
| 27 | 24 | * Exception handler base class definition * |
| 28 | 25 | ***************************************************************************/ |
| 29 | -class GExceptionHandler : public exception { | |
| 26 | +class GExceptionHandler : public std::exception { | |
| 30 | 27 | public: |
| 31 | 28 | GExceptionHandler() { } |
| 32 | 29 | virtual ~GExceptionHandler() throw() { } |
| 33 | 30 | virtual const char* what() const throw(); |
| 34 | 31 | protected: |
| 35 | - string m_origin; | |
| 36 | - string m_message; | |
| 32 | + std::string m_origin; | |
| 33 | + std::string m_message; | |
| 37 | 34 | }; |
| 38 | 35 | |
| 39 | 36 | |
| ... | ... | @@ -46,215 +43,215 @@ public: |
| 46 | 43 | // Memory allocation exception class |
| 47 | 44 | class mem_alloc : public GExceptionHandler { |
| 48 | 45 | public: |
| 49 | - mem_alloc(string origin, unsigned num); | |
| 46 | + mem_alloc(std::string origin, unsigned num); | |
| 50 | 47 | }; |
| 51 | 48 | |
| 52 | 49 | // Empty object exception class |
| 53 | 50 | class empty : public GExceptionHandler { |
| 54 | 51 | public: |
| 55 | - empty(string origin); | |
| 52 | + empty(std::string origin); | |
| 56 | 53 | }; |
| 57 | 54 | |
| 58 | 55 | // Out of range |
| 59 | 56 | class out_of_range : public GExceptionHandler { |
| 60 | 57 | public: |
| 61 | - out_of_range(string origin, int inx, int min, int max); | |
| 62 | - out_of_range(string origin, int inx, int elements); | |
| 63 | - out_of_range(string origin, int row, int col, int rows, int cols); | |
| 58 | + out_of_range(std::string origin, int inx, int min, int max); | |
| 59 | + out_of_range(std::string origin, int inx, int elements); | |
| 60 | + out_of_range(std::string origin, int row, int col, int rows, int cols); | |
| 64 | 61 | }; |
| 65 | 62 | |
| 66 | 63 | // Vector - Vector mismatch |
| 67 | 64 | class vector_mismatch : public GExceptionHandler { |
| 68 | 65 | public: |
| 69 | - vector_mismatch(string origin, int size1, int size2); | |
| 66 | + vector_mismatch(std::string origin, int size1, int size2); | |
| 70 | 67 | }; |
| 71 | 68 | |
| 72 | 69 | // Cross product only defined for 3-element vectors |
| 73 | 70 | class vector_bad_cross_dim : public GExceptionHandler { |
| 74 | 71 | public: |
| 75 | - vector_bad_cross_dim(string origin, int elements); | |
| 72 | + vector_bad_cross_dim(std::string origin, int elements); | |
| 76 | 73 | }; |
| 77 | 74 | |
| 78 | 75 | // Vector - Matrix mismatch |
| 79 | 76 | class matrix_vector_mismatch : public GExceptionHandler { |
| 80 | 77 | public: |
| 81 | - matrix_vector_mismatch(string origin, int num, int rows, int cols); | |
| 78 | + matrix_vector_mismatch(std::string origin, int num, int rows, int cols); | |
| 82 | 79 | }; |
| 83 | 80 | |
| 84 | 81 | // Matrix dimensions mismatch |
| 85 | 82 | class matrix_mismatch : public GExceptionHandler { |
| 86 | 83 | public: |
| 87 | - matrix_mismatch(string origin, int rows1, int cols1, int rows2, | |
| 84 | + matrix_mismatch(std::string origin, int rows1, int cols1, int rows2, | |
| 88 | 85 | int cols2); |
| 89 | 86 | }; |
| 90 | 87 | |
| 91 | 88 | // Matrix not rectangular |
| 92 | 89 | class matrix_not_rectangular : public GExceptionHandler { |
| 93 | 90 | public: |
| 94 | - matrix_not_rectangular(string origin, int rows, int cols); | |
| 91 | + matrix_not_rectangular(std::string origin, int rows, int cols); | |
| 95 | 92 | }; |
| 96 | 93 | |
| 97 | 94 | // Matrix not positive definite |
| 98 | 95 | class matrix_not_pos_definite : public GExceptionHandler { |
| 99 | 96 | public: |
| 100 | - matrix_not_pos_definite(string origin, int row, double sum); | |
| 97 | + matrix_not_pos_definite(std::string origin, int row, double sum); | |
| 101 | 98 | }; |
| 102 | 99 | |
| 103 | 100 | // Matrix not symmetric |
| 104 | 101 | class matrix_not_symmetric : public GExceptionHandler { |
| 105 | 102 | public: |
| 106 | - matrix_not_symmetric(string origin, int cols, int rows); | |
| 103 | + matrix_not_symmetric(std::string origin, int cols, int rows); | |
| 107 | 104 | }; |
| 108 | 105 | |
| 109 | 106 | // Matrix not factorised |
| 110 | 107 | class matrix_not_factorised : public GExceptionHandler { |
| 111 | 108 | public: |
| 112 | - matrix_not_factorised(string origin, string type); | |
| 109 | + matrix_not_factorised(std::string origin, std::string type); | |
| 113 | 110 | }; |
| 114 | 111 | |
| 115 | 112 | // All matrix elements are zero |
| 116 | 113 | class matrix_zero : public GExceptionHandler { |
| 117 | 114 | public: |
| 118 | - matrix_zero(string origin); | |
| 115 | + matrix_zero(std::string origin); | |
| 119 | 116 | }; |
| 120 | 117 | |
| 121 | 118 | // Invalid ordering scheme |
| 122 | 119 | class invalid_order : public GExceptionHandler { |
| 123 | 120 | public: |
| 124 | - invalid_order(string origin, int order, int min_order, int max_order); | |
| 121 | + invalid_order(std::string origin, int order, int min_order, int max_order); | |
| 125 | 122 | }; |
| 126 | 123 | |
| 127 | 124 | // General FITS error |
| 128 | 125 | class fits_error : public GExceptionHandler { |
| 129 | 126 | public: |
| 130 | - fits_error(string origin, int status); | |
| 127 | + fits_error(std::string origin, int status); | |
| 131 | 128 | }; |
| 132 | 129 | |
| 133 | 130 | // FITS file open error |
| 134 | 131 | class fits_open_error : public GExceptionHandler { |
| 135 | 132 | public: |
| 136 | - fits_open_error(string origin, string filename, int status); | |
| 133 | + fits_open_error(std::string origin, std::string filename, int status); | |
| 137 | 134 | }; |
| 138 | 135 | |
| 139 | 136 | // FITS file exists already |
| 140 | 137 | class fits_file_exist : public GExceptionHandler { |
| 141 | 138 | public: |
| 142 | - fits_file_exist(string origin, string filename, int status); | |
| 139 | + fits_file_exist(std::string origin, std::string filename, int status); | |
| 143 | 140 | }; |
| 144 | 141 | |
| 145 | 142 | // FITS file has already been opened |
| 146 | 143 | class fits_already_opened : public GExceptionHandler { |
| 147 | 144 | public: |
| 148 | - fits_already_opened(string origin, string filename); | |
| 145 | + fits_already_opened(std::string origin, std::string filename); | |
| 149 | 146 | }; |
| 150 | 147 | |
| 151 | 148 | // FITS keyword not found error |
| 152 | 149 | class fits_key_not_found : public GExceptionHandler { |
| 153 | 150 | public: |
| 154 | - fits_key_not_found(string origin, string keyname, int status = 0); | |
| 151 | + fits_key_not_found(std::string origin, std::string keyname, int status = 0); | |
| 155 | 152 | }; |
| 156 | 153 | |
| 157 | 154 | // FITS column not found error |
| 158 | 155 | class fits_column_not_found : public GExceptionHandler { |
| 159 | 156 | public: |
| 160 | - fits_column_not_found(string origin, string colname, int status = 0); | |
| 157 | + fits_column_not_found(std::string origin, std::string colname, int status = 0); | |
| 161 | 158 | }; |
| 162 | 159 | |
| 163 | 160 | // FITS has no header |
| 164 | 161 | class fits_no_header : public GExceptionHandler { |
| 165 | 162 | public: |
| 166 | - fits_no_header(string origin, string message, int status = 0); | |
| 163 | + fits_no_header(std::string origin, std::string message, int status = 0); | |
| 167 | 164 | }; |
| 168 | 165 | |
| 169 | 166 | // FITS has no data |
| 170 | 167 | class fits_no_data : public GExceptionHandler { |
| 171 | 168 | public: |
| 172 | - fits_no_data(string origin, string message, int status = 0); | |
| 169 | + fits_no_data(std::string origin, std::string message, int status = 0); | |
| 173 | 170 | }; |
| 174 | 171 | |
| 175 | 172 | // FITS HDU not found error |
| 176 | 173 | class fits_hdu_not_found : public GExceptionHandler { |
| 177 | 174 | public: |
| 178 | - fits_hdu_not_found(string origin, string extname, int status = 0); | |
| 179 | - fits_hdu_not_found(string origin, int extno, int status = 0); | |
| 175 | + fits_hdu_not_found(std::string origin, std::string extname, int status = 0); | |
| 176 | + fits_hdu_not_found(std::string origin, int extno, int status = 0); | |
| 180 | 177 | }; |
| 181 | 178 | |
| 182 | 179 | // FITS unknown HDU type |
| 183 | 180 | class fits_unknown_HDU_type : public GExceptionHandler { |
| 184 | 181 | public: |
| 185 | - fits_unknown_HDU_type(string origin, int type); | |
| 182 | + fits_unknown_HDU_type(std::string origin, int type); | |
| 186 | 183 | }; |
| 187 | 184 | |
| 188 | 185 | // FITS HDU is not a table |
| 189 | 186 | class fits_HDU_not_a_table : public GExceptionHandler { |
| 190 | 187 | public: |
| 191 | - fits_HDU_not_a_table(string origin, int type); | |
| 188 | + fits_HDU_not_a_table(std::string origin, int type); | |
| 192 | 189 | }; |
| 193 | 190 | |
| 194 | 191 | // FITS invalid type |
| 195 | 192 | class fits_invalid_type : public GExceptionHandler { |
| 196 | 193 | public: |
| 197 | - fits_invalid_type(string origin, string message); | |
| 194 | + fits_invalid_type(std::string origin, std::string message); | |
| 198 | 195 | }; |
| 199 | 196 | |
| 200 | 197 | // FITS unknown table type |
| 201 | 198 | class fits_unknown_tabtype : public GExceptionHandler { |
| 202 | 199 | public: |
| 203 | - fits_unknown_tabtype(string origin, int type); | |
| 200 | + fits_unknown_tabtype(std::string origin, int type); | |
| 204 | 201 | }; |
| 205 | 202 | |
| 206 | 203 | // FITS unknown column type |
| 207 | 204 | class fits_unknown_coltype : public GExceptionHandler { |
| 208 | 205 | public: |
| 209 | - fits_unknown_coltype(string origin, int type); | |
| 206 | + fits_unknown_coltype(std::string origin, int type); | |
| 210 | 207 | }; |
| 211 | 208 | |
| 212 | 209 | // FITS bad column length |
| 213 | 210 | class fits_bad_col_length : public GExceptionHandler { |
| 214 | 211 | public: |
| 215 | - fits_bad_col_length(string origin, int length, int rows); | |
| 212 | + fits_bad_col_length(std::string origin, int length, int rows); | |
| 216 | 213 | }; |
| 217 | 214 | |
| 218 | 215 | // FITS bad bitpix value |
| 219 | 216 | class fits_bad_bitpix : public GExceptionHandler { |
| 220 | 217 | public: |
| 221 | - fits_bad_bitpix(string origin, int bitpix); | |
| 218 | + fits_bad_bitpix(std::string origin, int bitpix); | |
| 222 | 219 | }; |
| 223 | 220 | |
| 224 | 221 | // FITS bad image operator |
| 225 | 222 | class fits_wrong_image_operator : public GExceptionHandler { |
| 226 | 223 | public: |
| 227 | - fits_wrong_image_operator(string origin, int naxis, int nargs); | |
| 224 | + fits_wrong_image_operator(std::string origin, int naxis, int nargs); | |
| 228 | 225 | }; |
| 229 | 226 | |
| 230 | 227 | // Response invalid response type |
| 231 | 228 | class rsp_invalid_type : public GExceptionHandler { |
| 232 | 229 | public: |
| 233 | - rsp_invalid_type(string origin, string type); | |
| 230 | + rsp_invalid_type(std::string origin, std::string type); | |
| 234 | 231 | }; |
| 235 | 232 | |
| 236 | 233 | // General Healpix error |
| 237 | 234 | class healpix : public GExceptionHandler { |
| 238 | 235 | public: |
| 239 | - healpix(string origin, string message); | |
| 236 | + healpix(std::string origin, std::string message); | |
| 240 | 237 | }; |
| 241 | 238 | |
| 242 | 239 | // Healpix resolution invalid |
| 243 | 240 | class healpix_bad_nside : public GExceptionHandler { |
| 244 | 241 | public: |
| 245 | - healpix_bad_nside(string origin, int nside); | |
| 242 | + healpix_bad_nside(std::string origin, int nside); | |
| 246 | 243 | }; |
| 247 | 244 | |
| 248 | 245 | // Healpix scheme invalid |
| 249 | 246 | class healpix_bad_scheme : public GExceptionHandler { |
| 250 | 247 | public: |
| 251 | - healpix_bad_scheme(string origin, string scheme); | |
| 248 | + healpix_bad_scheme(std::string origin, std::string scheme); | |
| 252 | 249 | }; |
| 253 | 250 | |
| 254 | 251 | // Healpix coordinate system invalid |
| 255 | 252 | class healpix_bad_coords : public GExceptionHandler { |
| 256 | 253 | public: |
| 257 | - healpix_bad_coords(string origin, string coordsys); | |
| 254 | + healpix_bad_coords(std::string origin, std::string coordsys); | |
| 258 | 255 | }; |
| 259 | 256 | |
| 260 | 257 | }; | ... | ... |
include/GFitPar.hpp
| ... | ... | @@ -18,9 +18,6 @@ |
| 18 | 18 | #include "GException.hpp" |
| 19 | 19 | #include <iostream> // std::ostream |
| 20 | 20 | |
| 21 | -/* __ Namespaces _________________________________________________________ */ | |
| 22 | -using namespace std; | |
| 23 | - | |
| 24 | 21 | |
| 25 | 22 | /*************************************************************************** |
| 26 | 23 | * GFitPar class definition * |
| ... | ... | @@ -31,7 +28,7 @@ class GFitPar { |
| 31 | 28 | // Operator friends |
| 32 | 29 | |
| 33 | 30 | // I/O friends |
| 34 | - friend ostream& operator<< (ostream& os, const GFitPar& p); | |
| 31 | + friend std::ostream& operator<< (std::ostream& os, const GFitPar& p); | |
| 35 | 32 | |
| 36 | 33 | // Friend functions |
| 37 | 34 | ... | ... |
include/GFits.hpp
| ... | ... | @@ -23,8 +23,6 @@ |
| 23 | 23 | #include "GFitsCfitsio.hpp" |
| 24 | 24 | #include "GFitsHDU.hpp" |
| 25 | 25 | |
| 26 | -/* __ Namespaces _________________________________________________________ */ | |
| 27 | - | |
| 28 | 26 | |
| 29 | 27 | /***********************************************************************//** |
| 30 | 28 | * @class GFits |
| ... | ... | @@ -38,7 +36,7 @@ |
| 38 | 36 | class GFits { |
| 39 | 37 | |
| 40 | 38 | // I/O friends |
| 41 | - friend ostream& operator<< (ostream& os, const GFits& fits); | |
| 39 | + friend std::ostream& operator<< (std::ostream& os, const GFits& fits); | |
| 42 | 40 | |
| 43 | 41 | public: |
| 44 | 42 | // Constructors and destructors | ... | ... |
include/GFitsAsciiTable.hpp
| ... | ... | @@ -24,8 +24,6 @@ |
| 24 | 24 | #include "GFitsData.hpp" |
| 25 | 25 | #include "GFitsTable.hpp" |
| 26 | 26 | |
| 27 | -/* __ Namespaces _________________________________________________________ */ | |
| 28 | - | |
| 29 | 27 | |
| 30 | 28 | /***********************************************************************//** |
| 31 | 29 | * @class GFitsAsciiTable | ... | ... |
include/GFitsBinTable.hpp
| ... | ... | @@ -24,8 +24,6 @@ |
| 24 | 24 | #include "GFitsData.hpp" |
| 25 | 25 | #include "GFitsTable.hpp" |
| 26 | 26 | |
| 27 | -/* __ Namespaces _________________________________________________________ */ | |
| 28 | - | |
| 29 | 27 | |
| 30 | 28 | /***********************************************************************//** |
| 31 | 29 | * @class GFitsBinTable | ... | ... |
include/GFitsData.hpp
| ... | ... | @@ -17,8 +17,6 @@ |
| 17 | 17 | /* __ Includes ___________________________________________________________ */ |
| 18 | 18 | #include "GFitsCfitsio.hpp" |
| 19 | 19 | |
| 20 | -/* __ Namespaces _________________________________________________________ */ | |
| 21 | - | |
| 22 | 20 | |
| 23 | 21 | /*************************************************************************** |
| 24 | 22 | * GFitsData class definition * | ... | ... |
include/GFitsHDU.hpp
| ... | ... | @@ -27,8 +27,6 @@ |
| 27 | 27 | #include "GFitsAsciiTable.hpp" |
| 28 | 28 | #include "GFitsBinTable.hpp" |
| 29 | 29 | |
| 30 | -/* __ Namespaces _________________________________________________________ */ | |
| 31 | - | |
| 32 | 30 | |
| 33 | 31 | /***********************************************************************//** |
| 34 | 32 | * @class GFitsHDU |
| ... | ... | @@ -46,7 +44,7 @@ class GFitsHDU { |
| 46 | 44 | friend class GFits; |
| 47 | 45 | |
| 48 | 46 | // I/O friends |
| 49 | - friend ostream& operator<< (ostream& os, const GFitsHDU& hdu); | |
| 47 | + friend std::ostream& operator<< (std::ostream& os, const GFitsHDU& hdu); | |
| 50 | 48 | |
| 51 | 49 | public: |
| 52 | 50 | // Constructors and destructors | ... | ... |
include/GFitsHeader.hpp
| ... | ... | @@ -23,8 +23,6 @@ |
| 23 | 23 | #include "GFitsCfitsio.hpp" |
| 24 | 24 | #include "GFitsHeaderCard.hpp" |
| 25 | 25 | |
| 26 | -/* __ Namespaces _________________________________________________________ */ | |
| 27 | - | |
| 28 | 26 | |
| 29 | 27 | /***********************************************************************//** |
| 30 | 28 | * @class GFitsHeader |
| ... | ... | @@ -43,7 +41,7 @@ class GFitsHeader { |
| 43 | 41 | friend class GFitsHDU; |
| 44 | 42 | |
| 45 | 43 | // I/O friends |
| 46 | - friend ostream& operator<< (ostream& os, const GFitsHeader& header); | |
| 44 | + friend std::ostream& operator<< (std::ostream& os, const GFitsHeader& header); | |
| 47 | 45 | |
| 48 | 46 | public: |
| 49 | 47 | // Constructors and destructors | ... | ... |
include/GFitsHeaderCard.hpp
| ... | ... | @@ -22,8 +22,6 @@ |
| 22 | 22 | /* __ Includes ___________________________________________________________ */ |
| 23 | 23 | #include "GFitsCfitsio.hpp" |
| 24 | 24 | |
| 25 | -/* __ Namespaces _________________________________________________________ */ | |
| 26 | - | |
| 27 | 25 | |
| 28 | 26 | /***********************************************************************//** |
| 29 | 27 | * @class GFitsHeaderCard |
| ... | ... | @@ -40,7 +38,7 @@ class GFitsHeaderCard { |
| 40 | 38 | friend class GFitsHeader; |
| 41 | 39 | |
| 42 | 40 | // I/O friends |
| 43 | - friend ostream& operator<< (ostream& os, const GFitsHeaderCard& card); | |
| 41 | + friend std::ostream& operator<< (std::ostream& os, const GFitsHeaderCard& card); | |
| 44 | 42 | |
| 45 | 43 | public: |
| 46 | 44 | // Constructors & Destructors | ... | ... |
include/GFitsImage.hpp
| ... | ... | @@ -23,8 +23,6 @@ |
| 23 | 23 | #include "GFitsCfitsio.hpp" |
| 24 | 24 | #include "GFitsData.hpp" |
| 25 | 25 | |
| 26 | -/* __ Namespaces _________________________________________________________ */ | |
| 27 | - | |
| 28 | 26 | |
| 29 | 27 | /***********************************************************************//** |
| 30 | 28 | * @class GFitsImage |
| ... | ... | @@ -39,7 +37,7 @@ class GFitsImage : public GFitsData { |
| 39 | 37 | friend class GFitsHDU; |
| 40 | 38 | |
| 41 | 39 | // I/O friends |
| 42 | - friend ostream& operator<< (ostream& os, const GFitsImage& image); | |
| 40 | + friend std::ostream& operator<< (std::ostream& os, const GFitsImage& image); | |
| 43 | 41 | |
| 44 | 42 | public: |
| 45 | 43 | // Constructors and destructors | ... | ... |
include/GFitsTable.hpp
| ... | ... | @@ -24,8 +24,6 @@ |
| 24 | 24 | #include "GFitsData.hpp" |
| 25 | 25 | #include "GFitsTableCol.hpp" |
| 26 | 26 | |
| 27 | -/* __ Namespaces _________________________________________________________ */ | |
| 28 | - | |
| 29 | 27 | |
| 30 | 28 | /* __ Structures _________________________________________________________ */ |
| 31 | 29 | |
| ... | ... | @@ -44,7 +42,7 @@ class GFitsTable : public GFitsData { |
| 44 | 42 | friend class GFitsHDU; |
| 45 | 43 | |
| 46 | 44 | // I/O friends |
| 47 | - friend ostream& operator<< (ostream& os, const GFitsTable& table); | |
| 45 | + friend std::ostream& operator<< (std::ostream& os, const GFitsTable& table); | |
| 48 | 46 | |
| 49 | 47 | public: |
| 50 | 48 | // Constructors and destructors | ... | ... |
include/GFitsTableCol.hpp
| ... | ... | @@ -22,8 +22,6 @@ |
| 22 | 22 | /* __ Includes ___________________________________________________________ */ |
| 23 | 23 | #include "GFitsCfitsio.hpp" |
| 24 | 24 | |
| 25 | -/* __ Namespaces _________________________________________________________ */ | |
| 26 | - | |
| 27 | 25 | |
| 28 | 26 | /***********************************************************************//** |
| 29 | 27 | * @class GFitsTableCol |
| ... | ... | @@ -96,7 +94,7 @@ protected: |
| 96 | 94 | // Protected methods |
| 97 | 95 | void load_column(void); |
| 98 | 96 | void save_column(void); |
| 99 | - void dump_column(ostream& os, void* data) const; | |
| 97 | + void dump_column(std::ostream& os, void* data) const; | |
| 100 | 98 | |
| 101 | 99 | private: |
| 102 | 100 | // Private methods | ... | ... |
include/GFitsTableDblCol.hpp
| ... | ... | @@ -23,11 +23,6 @@ |
| 23 | 23 | #include "GFitsCfitsio.hpp" |
| 24 | 24 | #include "GFitsTableCol.hpp" |
| 25 | 25 | |
| 26 | -/* __ Namespaces _________________________________________________________ */ | |
| 27 | - | |
| 28 | - | |
| 29 | -/* __ Structures _________________________________________________________ */ | |
| 30 | - | |
| 31 | 26 | |
| 32 | 27 | /***********************************************************************//** |
| 33 | 28 | * @class GFitsTableDblCol |
| ... | ... | @@ -39,7 +34,7 @@ |
| 39 | 34 | class GFitsTableDblCol : public GFitsTableCol { |
| 40 | 35 | |
| 41 | 36 | // I/O friends |
| 42 | - friend ostream& operator<< (ostream& os, const GFitsTableDblCol& column); | |
| 37 | + friend std::ostream& operator<< (std::ostream& os, const GFitsTableDblCol& column); | |
| 43 | 38 | |
| 44 | 39 | public: |
| 45 | 40 | // Constructors and destructors | ... | ... |
include/GFitsTableFltCol.hpp
| ... | ... | @@ -23,11 +23,6 @@ |
| 23 | 23 | #include "GFitsCfitsio.hpp" |
| 24 | 24 | #include "GFitsTableCol.hpp" |
| 25 | 25 | |
| 26 | -/* __ Namespaces _________________________________________________________ */ | |
| 27 | - | |
| 28 | - | |
| 29 | -/* __ Structures _________________________________________________________ */ | |
| 30 | - | |
| 31 | 26 | |
| 32 | 27 | /***********************************************************************//** |
| 33 | 28 | * @class GFitsTableFltCol |
| ... | ... | @@ -39,7 +34,7 @@ |
| 39 | 34 | class GFitsTableFltCol : public GFitsTableCol { |
| 40 | 35 | |
| 41 | 36 | // I/O friends |
| 42 | - friend ostream& operator<< (ostream& os, const GFitsTableFltCol& column); | |
| 37 | + friend std::ostream& operator<< (std::ostream& os, const GFitsTableFltCol& column); | |
| 43 | 38 | |
| 44 | 39 | public: |
| 45 | 40 | // Constructors and destructors | ... | ... |
include/GFitsTableLngCol.hpp
| ... | ... | @@ -23,11 +23,6 @@ |
| 23 | 23 | #include "GFitsCfitsio.hpp" |
| 24 | 24 | #include "GFitsTableCol.hpp" |
| 25 | 25 | |
| 26 | -/* __ Namespaces _________________________________________________________ */ | |
| 27 | - | |
| 28 | - | |
| 29 | -/* __ Structures _________________________________________________________ */ | |
| 30 | - | |
| 31 | 26 | |
| 32 | 27 | /***********************************************************************//** |
| 33 | 28 | * @class GFitsTableLngCol |
| ... | ... | @@ -39,7 +34,7 @@ |
| 39 | 34 | class GFitsTableLngCol : public GFitsTableCol { |
| 40 | 35 | |
| 41 | 36 | // I/O friends |
| 42 | - friend ostream& operator<< (ostream& os, const GFitsTableLngCol& column); | |
| 37 | + friend std::ostream& operator<< (std::ostream& os, const GFitsTableLngCol& column); | |
| 43 | 38 | |
| 44 | 39 | public: |
| 45 | 40 | // Constructors and destructors | ... | ... |
include/GFitsTableLogCol.hpp
| ... | ... | @@ -23,11 +23,6 @@ |
| 23 | 23 | #include "GFitsCfitsio.hpp" |
| 24 | 24 | #include "GFitsTableCol.hpp" |
| 25 | 25 | |
| 26 | -/* __ Namespaces _________________________________________________________ */ | |
| 27 | - | |
| 28 | - | |
| 29 | -/* __ Structures _________________________________________________________ */ | |
| 30 | - | |
| 31 | 26 | |
| 32 | 27 | /***********************************************************************//** |
| 33 | 28 | * @class GFitsTableLogCol |
| ... | ... | @@ -39,7 +34,7 @@ |
| 39 | 34 | class GFitsTableLogCol : public GFitsTableCol { |
| 40 | 35 | |
| 41 | 36 | // I/O friends |
| 42 | - friend ostream& operator<< (ostream& os, const GFitsTableLogCol& column); | |
| 37 | + friend std::ostream& operator<< (std::ostream& os, const GFitsTableLogCol& column); | |
| 43 | 38 | |
| 44 | 39 | public: |
| 45 | 40 | // Constructors and destructors | ... | ... |
include/GFitsTableShtCol.hpp
| ... | ... | @@ -23,11 +23,6 @@ |
| 23 | 23 | #include "GFitsCfitsio.hpp" |
| 24 | 24 | #include "GFitsTableCol.hpp" |
| 25 | 25 | |
| 26 | -/* __ Namespaces _________________________________________________________ */ | |
| 27 | - | |
| 28 | - | |
| 29 | -/* __ Structures _________________________________________________________ */ | |
| 30 | - | |
| 31 | 26 | |
| 32 | 27 | /***********************************************************************//** |
| 33 | 28 | * @class GFitsTableShtCol |
| ... | ... | @@ -39,7 +34,7 @@ |
| 39 | 34 | class GFitsTableShtCol : public GFitsTableCol { |
| 40 | 35 | |
| 41 | 36 | // I/O friends |
| 42 | - friend ostream& operator<< (ostream& os, const GFitsTableShtCol& column); | |
| 37 | + friend std::ostream& operator<< (std::ostream& os, const GFitsTableShtCol& column); | |
| 43 | 38 | |
| 44 | 39 | public: |
| 45 | 40 | // Constructors and destructors | ... | ... |
include/GFitsTableStrCol.hpp
| ... | ... | @@ -23,11 +23,6 @@ |
| 23 | 23 | #include "GFitsCfitsio.hpp" |
| 24 | 24 | #include "GFitsTableCol.hpp" |
| 25 | 25 | |
| 26 | -/* __ Namespaces _________________________________________________________ */ | |
| 27 | - | |
| 28 | - | |
| 29 | -/* __ Structures _________________________________________________________ */ | |
| 30 | - | |
| 31 | 26 | |
| 32 | 27 | /***********************************************************************//** |
| 33 | 28 | * @class GFitsTableStrCol |
| ... | ... | @@ -39,7 +34,7 @@ |
| 39 | 34 | class GFitsTableStrCol : public GFitsTableCol { |
| 40 | 35 | |
| 41 | 36 | // I/O friends |
| 42 | - friend ostream& operator<< (ostream& os, const GFitsTableStrCol& column); | |
| 37 | + friend std::ostream& operator<< (std::ostream& os, const GFitsTableStrCol& column); | |
| 43 | 38 | |
| 44 | 39 | public: |
| 45 | 40 | // Constructors and destructors | ... | ... |
include/GGti.hpp
| ... | ... | @@ -21,8 +21,6 @@ |
| 21 | 21 | |
| 22 | 22 | /* __ Includes ___________________________________________________________ */ |
| 23 | 23 | |
| 24 | -/* __ Namespaces _________________________________________________________ */ | |
| 25 | - | |
| 26 | 24 | |
| 27 | 25 | /***********************************************************************//** |
| 28 | 26 | * @class GGti | ... | ... |
include/GHealpix.hpp
| ... | ... | @@ -26,8 +26,6 @@ |
| 26 | 26 | #include "GFitsTableDblCol.hpp" |
| 27 | 27 | #include "GSkyDir.hpp" |
| 28 | 28 | |
| 29 | -/* __ Namespaces _________________________________________________________ */ | |
| 30 | - | |
| 31 | 29 | |
| 32 | 30 | /***********************************************************************//** |
| 33 | 31 | * @class GHealpix |
| ... | ... | @@ -37,7 +35,7 @@ |
| 37 | 35 | class GHealpix { |
| 38 | 36 | |
| 39 | 37 | // I/O friends |
| 40 | - friend ostream& operator<< (ostream& os, const GHealpix& pixels); | |
| 38 | + friend std::ostream& operator<< (std::ostream& os, const GHealpix& pixels); | |
| 41 | 39 | |
| 42 | 40 | public: |
| 43 | 41 | // Constructors and destructors | ... | ... |
include/GImage.hpp
| ... | ... | @@ -21,8 +21,6 @@ |
| 21 | 21 | |
| 22 | 22 | /* __ Includes ___________________________________________________________ */ |
| 23 | 23 | |
| 24 | -/* __ Namespaces _________________________________________________________ */ | |
| 25 | - | |
| 26 | 24 | |
| 27 | 25 | /***********************************************************************//** |
| 28 | 26 | * @class GImage | ... | ... |
include/GLATObservation.hpp
| ... | ... | @@ -23,8 +23,6 @@ |
| 23 | 23 | #include "GObservation.hpp" |
| 24 | 24 | #include "GFits.hpp" |
| 25 | 25 | |
| 26 | -/* __ Namespaces _________________________________________________________ */ | |
| 27 | - | |
| 28 | 26 | |
| 29 | 27 | /***********************************************************************//** |
| 30 | 28 | * @class GLATObservation | ... | ... |
include/GLATResponse.hpp
| ... | ... | @@ -28,8 +28,6 @@ |
| 28 | 28 | #include "GFits.hpp" |
| 29 | 29 | #include "GFitsHDU.hpp" |
| 30 | 30 | |
| 31 | -/* __ Namespaces _________________________________________________________ */ | |
| 32 | - | |
| 33 | 31 | |
| 34 | 32 | /***********************************************************************//** |
| 35 | 33 | * @class GLATResponse | ... | ... |
include/GLATResponseTable.hpp
| ... | ... | @@ -23,10 +23,6 @@ |
| 23 | 23 | #include "GNodeArray.hpp" |
| 24 | 24 | #include "GFitsHDU.hpp" |
| 25 | 25 | |
| 26 | -/* __ Namespaces _________________________________________________________ */ | |
| 27 | - | |
| 28 | -/* __ Structures _________________________________________________________ */ | |
| 29 | - | |
| 30 | 26 | |
| 31 | 27 | /***********************************************************************//** |
| 32 | 28 | * @class GLATResponseTable | ... | ... |
include/GMatrix.hpp
| ... | ... | @@ -17,9 +17,6 @@ |
| 17 | 17 | /* __ Includes ___________________________________________________________ */ |
| 18 | 18 | #include "GMatrixBase.hpp" |
| 19 | 19 | |
| 20 | -/* __ Namespaces _________________________________________________________ */ | |
| 21 | -using namespace std; | |
| 22 | - | |
| 23 | 20 | |
| 24 | 21 | /*************************************************************************** |
| 25 | 22 | * GMatrix class definition * |
| ... | ... | @@ -34,7 +31,7 @@ class GMatrix : public GMatrixBase { |
| 34 | 31 | friend GMatrix operator/ (const GMatrix& a, const double& b); |
| 35 | 32 | |
| 36 | 33 | // I/O friends |
| 37 | - friend ostream& operator<< (ostream& os, const GMatrix& m); | |
| 34 | + friend std::ostream& operator<< (std::ostream& os, const GMatrix& m); | |
| 38 | 35 | |
| 39 | 36 | // Friend functions |
| 40 | 37 | friend GMatrix transpose(const GMatrix& m); | ... | ... |
include/GMatrixBase.hpp
| ... | ... | @@ -17,9 +17,6 @@ |
| 17 | 17 | /* __ Includes ___________________________________________________________ */ |
| 18 | 18 | #include "GVector.hpp" |
| 19 | 19 | |
| 20 | -/* __ Namespaces _________________________________________________________ */ | |
| 21 | -using namespace std; | |
| 22 | - | |
| 23 | 20 | |
| 24 | 21 | /*************************************************************************** |
| 25 | 22 | * GMatrixBase class definition * |
| ... | ... | @@ -87,9 +84,9 @@ protected: |
| 87 | 84 | double get_min_element() const; |
| 88 | 85 | double get_max_element() const; |
| 89 | 86 | double get_element_sum() const; |
| 90 | - void dump_elements(ostream& os) const; | |
| 91 | - void dump_row_comp(ostream& os) const; | |
| 92 | - void dump_col_comp(ostream& os) const; | |
| 87 | + void dump_elements(std::ostream& os) const; | |
| 88 | + void dump_row_comp(std::ostream& os) const; | |
| 89 | + void dump_col_comp(std::ostream& os) const; | |
| 93 | 90 | |
| 94 | 91 | // Protected data area |
| 95 | 92 | int m_rows; // Number of rows | ... | ... |
include/GNodeArray.hpp
| ... | ... | @@ -22,10 +22,6 @@ |
| 22 | 22 | /* __ Includes ___________________________________________________________ */ |
| 23 | 23 | #include "GVector.hpp" |
| 24 | 24 | |
| 25 | -/* __ Namespaces _________________________________________________________ */ | |
| 26 | - | |
| 27 | -/* __ Structures _________________________________________________________ */ | |
| 28 | - | |
| 29 | 25 | |
| 30 | 26 | /***********************************************************************//** |
| 31 | 27 | * @class GNodeArray | ... | ... |
include/GObservation.hpp
include/GResponse.hpp
| ... | ... | @@ -22,8 +22,6 @@ |
| 22 | 22 | /* __ Includes ___________________________________________________________ */ |
| 23 | 23 | #include "GSkyDir.hpp" |
| 24 | 24 | |
| 25 | -/* __ Namespaces _________________________________________________________ */ | |
| 26 | - | |
| 27 | 25 | |
| 28 | 26 | /***********************************************************************//** |
| 29 | 27 | * @class GResponse | ... | ... |
include/GSkyDir.hpp
| ... | ... | @@ -21,8 +21,6 @@ |
| 21 | 21 | |
| 22 | 22 | /* __ Includes ___________________________________________________________ */ |
| 23 | 23 | |
| 24 | -/* __ Namespaces _________________________________________________________ */ | |
| 25 | - | |
| 26 | 24 | |
| 27 | 25 | /***********************************************************************//** |
| 28 | 26 | * @class GSkyDir |
| ... | ... | @@ -32,7 +30,7 @@ |
| 32 | 30 | class GSkyDir { |
| 33 | 31 | |
| 34 | 32 | // I/O friends |
| 35 | - friend ostream& operator<< (ostream& os, const GSkyDir& dir); | |
| 33 | + friend std::ostream& operator<< (std::ostream& os, const GSkyDir& dir); | |
| 36 | 34 | |
| 37 | 35 | public: |
| 38 | 36 | // Constructors and destructors | ... | ... |
include/GSparseMatrix.hpp
| ... | ... | @@ -17,9 +17,6 @@ |
| 17 | 17 | /* __ Includes ___________________________________________________________ */ |
| 18 | 18 | #include "GMatrixBase.hpp" |
| 19 | 19 | |
| 20 | -/* __ Namespaces _________________________________________________________ */ | |
| 21 | -using namespace std; | |
| 22 | - | |
| 23 | 20 | /* __ Definitions ________________________________________________________ */ |
| 24 | 21 | #define G_SPARSE_MATRIX_DEFAULT_MEM_BLOCK 512 // Default Memory block size |
| 25 | 22 | #define G_SPARSE_MATRIX_DEFAULT_STACK_ENTRIES 1000 // Max # of stack entries |
| ... | ... | @@ -43,7 +40,7 @@ class GSparseMatrix : public GMatrixBase { |
| 43 | 40 | friend GSparseMatrix operator/ (const GSparseMatrix& a, const double& b); |
| 44 | 41 | |
| 45 | 42 | // I/O friends |
| 46 | - friend ostream& operator<< (ostream& os, const GSparseMatrix& m); | |
| 43 | + friend std::ostream& operator<< (std::ostream& os, const GSparseMatrix& m); | |
| 47 | 44 | |
| 48 | 45 | // Friend functions |
| 49 | 46 | friend GSparseMatrix transpose(const GSparseMatrix& m); | ... | ... |
include/GSymMatrix.hpp
| ... | ... | @@ -17,9 +17,6 @@ |
| 17 | 17 | /* __ Includes ___________________________________________________________ */ |
| 18 | 18 | #include "GMatrixBase.hpp" |
| 19 | 19 | |
| 20 | -/* __ Namespaces _________________________________________________________ */ | |
| 21 | -using namespace std; | |
| 22 | - | |
| 23 | 20 | |
| 24 | 21 | /*************************************************************************** |
| 25 | 22 | * GSymMatrix class definition * |
| ... | ... | @@ -34,7 +31,7 @@ class GSymMatrix : public GMatrixBase { |
| 34 | 31 | friend GSymMatrix operator/ (const GSymMatrix& a, const double& b); |
| 35 | 32 | |
| 36 | 33 | // I/O friends |
| 37 | - friend ostream& operator<< (ostream& os, const GSymMatrix& m); | |
| 34 | + friend std::ostream& operator<< (std::ostream& os, const GSymMatrix& m); | |
| 38 | 35 | |
| 39 | 36 | // Friend functions |
| 40 | 37 | friend GSymMatrix transpose(const GSymMatrix& m); | ... | ... |
include/GVector.hpp
| ... | ... | @@ -20,9 +20,6 @@ |
| 20 | 20 | #include <stddef.h> // NULL |
| 21 | 21 | #include <iostream> // std::ostream |
| 22 | 22 | |
| 23 | -/* __ Namespaces _________________________________________________________ */ | |
| 24 | -using namespace std; | |
| 25 | - | |
| 26 | 23 | |
| 27 | 24 | /*************************************************************************** |
| 28 | 25 | * GVector class definition * |
| ... | ... | @@ -48,7 +45,7 @@ class GVector { |
| 48 | 45 | friend int operator!= (const GVector &a, const GVector &b); |
| 49 | 46 | |
| 50 | 47 | // I/O friends |
| 51 | - friend ostream& operator<< (ostream& os, const GVector& v); | |
| 48 | + friend std::ostream& operator<< (std::ostream& os, const GVector& v); | |
| 52 | 49 | |
| 53 | 50 | // Friend functions |
| 54 | 51 | friend GVector cross(const GVector &a, const GVector &b); | ... | ... |
src/GException.cpp
| ... | ... | @@ -15,23 +15,20 @@ |
| 15 | 15 | #include "GException.hpp" |
| 16 | 16 | #include "GFitsCfitsio.hpp" |
| 17 | 17 | |
| 18 | -/* __ Namespaces _________________________________________________________ */ | |
| 19 | -using namespace std; | |
| 20 | - | |
| 21 | 18 | |
| 22 | 19 | /*************************************************************************** |
| 23 | 20 | * Private conversion functions * |
| 24 | 21 | ***************************************************************************/ |
| 25 | 22 | std::string str(int value) |
| 26 | 23 | { |
| 27 | - ostringstream s_value; | |
| 24 | + std::ostringstream s_value; | |
| 28 | 25 | s_value << value; |
| 29 | 26 | return s_value.str(); |
| 30 | 27 | } |
| 31 | 28 | std::string str(double value) |
| 32 | 29 | { |
| 33 | - ostringstream s_value; | |
| 34 | - s_value << scientific << value; | |
| 30 | + std::ostringstream s_value; | |
| 31 | + s_value << std::scientific << value; | |
| 35 | 32 | return s_value.str(); |
| 36 | 33 | } |
| 37 | 34 | |
| ... | ... | @@ -41,7 +38,7 @@ std::string str(double value) |
| 41 | 38 | ***************************************************************************/ |
| 42 | 39 | const char* GExceptionHandler::what() const throw() |
| 43 | 40 | { |
| 44 | - string message = "*** ERROR in " + m_origin + ": " + m_message; | |
| 41 | + std::string message = "*** ERROR in " + m_origin + ": " + m_message; | |
| 45 | 42 | return message.c_str(); |
| 46 | 43 | } |
| 47 | 44 | |
| ... | ... | @@ -49,7 +46,7 @@ const char* GExceptionHandler::what() const throw() |
| 49 | 46 | /*************************************************************************** |
| 50 | 47 | * Memory allocation exception * |
| 51 | 48 | ***************************************************************************/ |
| 52 | -GException::mem_alloc::mem_alloc(string origin, unsigned num) | |
| 49 | +GException::mem_alloc::mem_alloc(std::string origin, unsigned num) | |
| 53 | 50 | { |
| 54 | 51 | m_origin = origin; |
| 55 | 52 | m_message = "Memory allocation error (" + str((int)num) + " elements)"; |
| ... | ... | @@ -59,7 +56,7 @@ GException::mem_alloc::mem_alloc(string origin, unsigned num) |
| 59 | 56 | /*************************************************************************** |
| 60 | 57 | * Empty object exception * |
| 61 | 58 | ***************************************************************************/ |
| 62 | -GException::empty::empty(string origin) | |
| 59 | +GException::empty::empty(std::string origin) | |
| 63 | 60 | { |
| 64 | 61 | m_origin = origin; |
| 65 | 62 | m_message = "Zero-size allocation"; |
| ... | ... | @@ -69,7 +66,7 @@ GException::empty::empty(string origin) |
| 69 | 66 | /*************************************************************************** |
| 70 | 67 | * Index out of range * |
| 71 | 68 | ***************************************************************************/ |
| 72 | -GException::out_of_range::out_of_range(string origin, int inx, int min, int max) | |
| 69 | +GException::out_of_range::out_of_range(std::string origin, int inx, int min, int max) | |
| 73 | 70 | { |
| 74 | 71 | m_origin = origin; |
| 75 | 72 | m_message = "Index (" + str(inx) + ") out of range [" + str(min) + |
| ... | ... | @@ -80,7 +77,7 @@ GException::out_of_range::out_of_range(string origin, int inx, int min, int max) |
| 80 | 77 | /*************************************************************************** |
| 81 | 78 | * Vector index out of range * |
| 82 | 79 | ***************************************************************************/ |
| 83 | -GException::out_of_range::out_of_range(string origin, int inx, int elements) | |
| 80 | +GException::out_of_range::out_of_range(std::string origin, int inx, int elements) | |
| 84 | 81 | { |
| 85 | 82 | m_origin = origin; |
| 86 | 83 | if (elements > 0) { |
| ... | ... | @@ -96,7 +93,7 @@ GException::out_of_range::out_of_range(string origin, int inx, int elements) |
| 96 | 93 | /*************************************************************************** |
| 97 | 94 | * Matrix row or column out of range * |
| 98 | 95 | ***************************************************************************/ |
| 99 | -GException::out_of_range::out_of_range(string origin, int row, int col, int rows, int cols) | |
| 96 | +GException::out_of_range::out_of_range(std::string origin, int row, int col, int rows, int cols) | |
| 100 | 97 | { |
| 101 | 98 | m_origin = origin; |
| 102 | 99 | m_message = "Matrix element (" + str(row) + "," + str(col) + |
| ... | ... | @@ -108,7 +105,7 @@ GException::out_of_range::out_of_range(string origin, int row, int col, int rows |
| 108 | 105 | /*************************************************************************** |
| 109 | 106 | * Vector dimensions differ * |
| 110 | 107 | ***************************************************************************/ |
| 111 | -GException::vector_mismatch::vector_mismatch(string origin, int size1, int size2) | |
| 108 | +GException::vector_mismatch::vector_mismatch(std::string origin, int size1, int size2) | |
| 112 | 109 | { |
| 113 | 110 | m_origin = origin; |
| 114 | 111 | m_message = "Vector dimensions differ (" + str(size1) + " <-> " + |
| ... | ... | @@ -119,7 +116,7 @@ GException::vector_mismatch::vector_mismatch(string origin, int size1, int size2 |
| 119 | 116 | /*************************************************************************** |
| 120 | 117 | * Invalid vector dimension for cross product * |
| 121 | 118 | ***************************************************************************/ |
| 122 | -GException::vector_bad_cross_dim::vector_bad_cross_dim(string origin, int elements) | |
| 119 | +GException::vector_bad_cross_dim::vector_bad_cross_dim(std::string origin, int elements) | |
| 123 | 120 | { |
| 124 | 121 | m_origin = origin; |
| 125 | 122 | m_message = "Vector cross product only defined for 3 dimensions but vector size is " + |
| ... | ... | @@ -130,7 +127,10 @@ GException::vector_bad_cross_dim::vector_bad_cross_dim(string origin, int elemen |
| 130 | 127 | /*************************************************************************** |
| 131 | 128 | * Mismatch between matrix and vector * |
| 132 | 129 | ***************************************************************************/ |
| 133 | -GException::matrix_vector_mismatch::matrix_vector_mismatch(string origin, int num, int rows, int cols) | |
| 130 | +GException::matrix_vector_mismatch::matrix_vector_mismatch(std::string origin, | |
| 131 | + int num, | |
| 132 | + int rows, | |
| 133 | + int cols) | |
| 134 | 134 | { |
| 135 | 135 | m_origin = origin; |
| 136 | 136 | m_message = "Vector dimension [" + str(num) + |
| ... | ... | @@ -142,7 +142,7 @@ GException::matrix_vector_mismatch::matrix_vector_mismatch(string origin, int nu |
| 142 | 142 | /*************************************************************************** |
| 143 | 143 | * Matrix mismatch in operation * |
| 144 | 144 | ***************************************************************************/ |
| 145 | -GException::matrix_mismatch::matrix_mismatch(string origin, int rows1, int cols1, int rows2, int cols2) | |
| 145 | +GException::matrix_mismatch::matrix_mismatch(std::string origin, int rows1, int cols1, int rows2, int cols2) | |
| 146 | 146 | { |
| 147 | 147 | m_origin = origin; |
| 148 | 148 | m_message = "Matrix mismatch: M1(" + str(rows1) + "," + str(cols1) + |
| ... | ... | @@ -153,7 +153,7 @@ GException::matrix_mismatch::matrix_mismatch(string origin, int rows1, int cols1 |
| 153 | 153 | /*************************************************************************** |
| 154 | 154 | * Matrix not rectangular * |
| 155 | 155 | ***************************************************************************/ |
| 156 | -GException::matrix_not_rectangular::matrix_not_rectangular(string origin, int rows, int cols) | |
| 156 | +GException::matrix_not_rectangular::matrix_not_rectangular(std::string origin, int rows, int cols) | |
| 157 | 157 | { |
| 158 | 158 | m_origin = origin; |
| 159 | 159 | m_message = "Matrix is not rectangular [" + str(rows) + "," + str(cols) + "]"; |
| ... | ... | @@ -163,7 +163,7 @@ GException::matrix_not_rectangular::matrix_not_rectangular(string origin, int ro |
| 163 | 163 | /*************************************************************************** |
| 164 | 164 | * Matrix is not positive definite * |
| 165 | 165 | ***************************************************************************/ |
| 166 | -GException::matrix_not_pos_definite::matrix_not_pos_definite(string origin, int row, double sum) | |
| 166 | +GException::matrix_not_pos_definite::matrix_not_pos_definite(std::string origin, int row, double sum) | |
| 167 | 167 | { |
| 168 | 168 | m_origin = origin; |
| 169 | 169 | m_message = "Matrix is not positive definite (sum " + str(sum) + |
| ... | ... | @@ -174,7 +174,9 @@ GException::matrix_not_pos_definite::matrix_not_pos_definite(string origin, int |
| 174 | 174 | /*************************************************************************** |
| 175 | 175 | * Matrix is not symmetric * |
| 176 | 176 | ***************************************************************************/ |
| 177 | -GException::matrix_not_symmetric::matrix_not_symmetric(string origin, int cols, int rows) | |
| 177 | +GException::matrix_not_symmetric::matrix_not_symmetric(std::string origin, | |
| 178 | + int cols, | |
| 179 | + int rows) | |
| 178 | 180 | { |
| 179 | 181 | m_origin = origin; |
| 180 | 182 | m_message = "Matrix is not symmetric [" + str(rows) + "," + str(cols) + "]"; |
| ... | ... | @@ -184,7 +186,8 @@ GException::matrix_not_symmetric::matrix_not_symmetric(string origin, int cols, |
| 184 | 186 | /*************************************************************************** |
| 185 | 187 | * Matrix has not been factorised * |
| 186 | 188 | ***************************************************************************/ |
| 187 | -GException::matrix_not_factorised::matrix_not_factorised(string origin, string type) | |
| 189 | +GException::matrix_not_factorised::matrix_not_factorised(std::string origin, | |
| 190 | + std::string type) | |
| 188 | 191 | { |
| 189 | 192 | m_origin = origin; |
| 190 | 193 | m_message = "Matrix has not been factorised using " + type; |
| ... | ... | @@ -194,7 +197,7 @@ GException::matrix_not_factorised::matrix_not_factorised(string origin, string t |
| 194 | 197 | /*************************************************************************** |
| 195 | 198 | * All matrix elements are zero * |
| 196 | 199 | ***************************************************************************/ |
| 197 | -GException::matrix_zero::matrix_zero(string origin) | |
| 200 | +GException::matrix_zero::matrix_zero(std::string origin) | |
| 198 | 201 | { |
| 199 | 202 | m_origin = origin; |
| 200 | 203 | m_message = "All matrix elements are zero"; |
| ... | ... | @@ -204,7 +207,7 @@ GException::matrix_zero::matrix_zero(string origin) |
| 204 | 207 | /*************************************************************************** |
| 205 | 208 | * Invalid ordering scheme requested * |
| 206 | 209 | ***************************************************************************/ |
| 207 | -GException::invalid_order::invalid_order(string origin, int order, int min_order, int max_order) | |
| 210 | +GException::invalid_order::invalid_order(std::string origin, int order, int min_order, int max_order) | |
| 208 | 211 | { |
| 209 | 212 | m_origin = origin; |
| 210 | 213 | m_message = "Invalid ordering type " + str(order) + |
| ... | ... | @@ -219,10 +222,10 @@ GException::invalid_order::invalid_order(string origin, int order, int min_order |
| 219 | 222 | * @param[in] origin Method that throws the error. |
| 220 | 223 | * @param[in] status cfitsio status. |
| 221 | 224 | ***************************************************************************/ |
| 222 | -GException::fits_error::fits_error(string origin, int status) | |
| 225 | +GException::fits_error::fits_error(std::string origin, int status) | |
| 223 | 226 | { |
| 224 | 227 | m_origin = origin; |
| 225 | - ostringstream s_error; | |
| 228 | + std::ostringstream s_error; | |
| 226 | 229 | char err_text[31]; |
| 227 | 230 | __ffgerr(status, err_text); |
| 228 | 231 | s_error << err_text << " (status=" << status << ")"; |
| ... | ... | @@ -237,9 +240,9 @@ GException::fits_error::fits_error(string origin, int status) |
| 237 | 240 | * @param[in] filename Name of the file for which opening was attempted. |
| 238 | 241 | * @param[in] status cfitsio status. |
| 239 | 242 | ***************************************************************************/ |
| 240 | -GException::fits_open_error::fits_open_error(string origin, | |
| 241 | - string filename, | |
| 242 | - int status) | |
| 243 | +GException::fits_open_error::fits_open_error(std::string origin, | |
| 244 | + std::string filename, | |
| 245 | + int status) | |
| 243 | 246 | { |
| 244 | 247 | m_origin = origin; |
| 245 | 248 | m_message = "Unable to open FITS file '" + filename + "'"; |
| ... | ... | @@ -255,9 +258,9 @@ GException::fits_open_error::fits_open_error(string origin, |
| 255 | 258 | * @param[in] filename Name of the file for which overwrite attempt was made. |
| 256 | 259 | * @param[in] status cfitsio status. |
| 257 | 260 | ***************************************************************************/ |
| 258 | -GException::fits_file_exist::fits_file_exist(string origin, | |
| 259 | - string filename, | |
| 260 | - int status) | |
| 261 | +GException::fits_file_exist::fits_file_exist(std::string origin, | |
| 262 | + std::string filename, | |
| 263 | + int status) | |
| 261 | 264 | { |
| 262 | 265 | m_origin = origin; |
| 263 | 266 | m_message = "Attempted to overwrite FITS file '" + filename + "'"; |
| ... | ... | @@ -272,8 +275,8 @@ GException::fits_file_exist::fits_file_exist(string origin, |
| 272 | 275 | * @param[in] origin Method that throws the error. |
| 273 | 276 | * @param[in] filename Name of file that is already open. |
| 274 | 277 | ***************************************************************************/ |
| 275 | -GException::fits_already_opened::fits_already_opened(string origin, | |
| 276 | - string filename) | |
| 278 | +GException::fits_already_opened::fits_already_opened(std::string origin, | |
| 279 | + std::string filename) | |
| 277 | 280 | { |
| 278 | 281 | m_origin = origin; |
| 279 | 282 | m_message = "FITS file '" + filename + "' is already open"; |
| ... | ... | @@ -287,9 +290,9 @@ GException::fits_already_opened::fits_already_opened(string origin, |
| 287 | 290 | * @param[in] keyname Name of keyword that was not found. |
| 288 | 291 | * @param[in] status cfitsio status. |
| 289 | 292 | ***************************************************************************/ |
| 290 | -GException::fits_key_not_found::fits_key_not_found(string origin, | |
| 291 | - string keyname, | |
| 292 | - int status) | |
| 293 | +GException::fits_key_not_found::fits_key_not_found(std::string origin, | |
| 294 | + std::string keyname, | |
| 295 | + int status) | |
| 293 | 296 | { |
| 294 | 297 | m_origin = origin; |
| 295 | 298 | m_message = "Keyword '" + keyname + "' not found in header"; |
| ... | ... | @@ -305,9 +308,9 @@ GException::fits_key_not_found::fits_key_not_found(string origin, |
| 305 | 308 | * @param[in] colname Name of the table column that was not found. |
| 306 | 309 | * @param[in] status cfitsio status. |
| 307 | 310 | ***************************************************************************/ |
| 308 | -GException::fits_column_not_found::fits_column_not_found(string origin, | |
| 309 | - string colname, | |
| 310 | - int status) | |
| 311 | +GException::fits_column_not_found::fits_column_not_found(std::string origin, | |
| 312 | + std::string colname, | |
| 313 | + int status) | |
| 311 | 314 | { |
| 312 | 315 | m_origin = origin; |
| 313 | 316 | m_message = "Column '" + colname + "' not found in table"; |
| ... | ... | @@ -323,9 +326,9 @@ GException::fits_column_not_found::fits_column_not_found(string origin, |
| 323 | 326 | * @param[in] message Error message. |
| 324 | 327 | * @param[in] status cfitsio status. |
| 325 | 328 | ***************************************************************************/ |
| 326 | -GException::fits_no_header::fits_no_header(string origin, | |
| 327 | - string message, | |
| 328 | - int status) | |
| 329 | +GException::fits_no_header::fits_no_header(std::string origin, | |
| 330 | + std::string message, | |
| 331 | + int status) | |
| 329 | 332 | { |
| 330 | 333 | m_origin = origin; |
| 331 | 334 | m_message = message; |
| ... | ... | @@ -341,9 +344,9 @@ GException::fits_no_header::fits_no_header(string origin, |
| 341 | 344 | * @param[in] message Error message. |
| 342 | 345 | * @param[in] status cfitsio status. |
| 343 | 346 | ***************************************************************************/ |
| 344 | -GException::fits_no_data::fits_no_data(string origin, | |
| 345 | - string message, | |
| 346 | - int status) | |
| 347 | +GException::fits_no_data::fits_no_data(std::string origin, | |
| 348 | + std::string message, | |
| 349 | + int status) | |
| 347 | 350 | { |
| 348 | 351 | m_origin = origin; |
| 349 | 352 | m_message = message; |
| ... | ... | @@ -359,9 +362,9 @@ GException::fits_no_data::fits_no_data(string origin, |
| 359 | 362 | * @param[in] extname Name of the extension that was not found. |
| 360 | 363 | * @param[in] status cfitsio status. |
| 361 | 364 | ***************************************************************************/ |
| 362 | -GException::fits_hdu_not_found::fits_hdu_not_found(string origin, | |
| 363 | - string extname, | |
| 364 | - int status) | |
| 365 | +GException::fits_hdu_not_found::fits_hdu_not_found(std::string origin, | |
| 366 | + std::string extname, | |
| 367 | + int status) | |
| 365 | 368 | { |
| 366 | 369 | m_origin = origin; |
| 367 | 370 | m_message = "HDU '" + extname + "' not found in FITS file"; |
| ... | ... | @@ -377,9 +380,9 @@ GException::fits_hdu_not_found::fits_hdu_not_found(string origin, |
| 377 | 380 | * @param[in] extno Number of the extension that was not found. |
| 378 | 381 | * @param[in] status cfitsio status. |
| 379 | 382 | ***************************************************************************/ |
| 380 | -GException::fits_hdu_not_found::fits_hdu_not_found(string origin, | |
| 381 | - int extno, | |
| 382 | - int status) | |
| 383 | +GException::fits_hdu_not_found::fits_hdu_not_found(std::string origin, | |
| 384 | + int extno, | |
| 385 | + int status) | |
| 383 | 386 | { |
| 384 | 387 | m_origin = origin; |
| 385 | 388 | m_message = "HDU number '" + str(extno) + "' not found in FITS file"; |
| ... | ... | @@ -394,8 +397,8 @@ GException::fits_hdu_not_found::fits_hdu_not_found(string origin, |
| 394 | 397 | * @param[in] origin Method that throws the error. |
| 395 | 398 | * @param[in] type Specified HDU type. |
| 396 | 399 | ***************************************************************************/ |
| 397 | -GException::fits_unknown_HDU_type::fits_unknown_HDU_type(string origin, | |
| 398 | - int type) | |
| 400 | +GException::fits_unknown_HDU_type::fits_unknown_HDU_type(std::string origin, | |
| 401 | + int type) | |
| 399 | 402 | { |
| 400 | 403 | m_origin = origin; |
| 401 | 404 | m_message = "HDU type '" + str(type) + "' is not known"; |
| ... | ... | @@ -408,8 +411,8 @@ GException::fits_unknown_HDU_type::fits_unknown_HDU_type(string origin, |
| 408 | 411 | * @param[in] origin Method that throws the error. |
| 409 | 412 | * @param[in] type Specified HDU type. |
| 410 | 413 | ***************************************************************************/ |
| 411 | -GException::fits_HDU_not_a_table::fits_HDU_not_a_table(string origin, | |
| 412 | - int type) | |
| 414 | +GException::fits_HDU_not_a_table::fits_HDU_not_a_table(std::string origin, | |
| 415 | + int type) | |
| 413 | 416 | { |
| 414 | 417 | m_origin = origin; |
| 415 | 418 | m_message = "HDU is not of type 'table' (type=" + str(type) + ")"; |
| ... | ... | @@ -422,8 +425,8 @@ GException::fits_HDU_not_a_table::fits_HDU_not_a_table(string origin, |
| 422 | 425 | * @param[in] origin Method that throws the error. |
| 423 | 426 | * @param[in] message Error message. |
| 424 | 427 | ***************************************************************************/ |
| 425 | -GException::fits_invalid_type::fits_invalid_type(string origin, | |
| 426 | - string message) | |
| 428 | +GException::fits_invalid_type::fits_invalid_type(std::string origin, | |
| 429 | + std::string message) | |
| 427 | 430 | { |
| 428 | 431 | m_origin = origin; |
| 429 | 432 | m_message = message; |
| ... | ... | @@ -436,8 +439,8 @@ GException::fits_invalid_type::fits_invalid_type(string origin, |
| 436 | 439 | * @param[in] origin Method that throws the error. |
| 437 | 440 | * @param[in] type Specified table type. |
| 438 | 441 | ***************************************************************************/ |
| 439 | -GException::fits_unknown_tabtype::fits_unknown_tabtype(string origin, | |
| 440 | - int type) | |
| 442 | +GException::fits_unknown_tabtype::fits_unknown_tabtype(std::string origin, | |
| 443 | + int type) | |
| 441 | 444 | { |
| 442 | 445 | m_origin = origin; |
| 443 | 446 | m_message = "Table type '" + str(type) + "' is unknown"; |
| ... | ... | @@ -450,8 +453,8 @@ GException::fits_unknown_tabtype::fits_unknown_tabtype(string origin, |
| 450 | 453 | * @param[in] origin Method that throws the error. |
| 451 | 454 | * @param[in] type Specified column type. |
| 452 | 455 | ***************************************************************************/ |
| 453 | -GException::fits_unknown_coltype::fits_unknown_coltype(string origin, | |
| 454 | - int type) | |
| 456 | +GException::fits_unknown_coltype::fits_unknown_coltype(std::string origin, | |
| 457 | + int type) | |
| 455 | 458 | { |
| 456 | 459 | m_origin = origin; |
| 457 | 460 | m_message = "Column type '" + str(type) + "' is unknown"; |
| ... | ... | @@ -465,9 +468,9 @@ GException::fits_unknown_coltype::fits_unknown_coltype(string origin, |
| 465 | 468 | * @param[in] length Length of the column. |
| 466 | 469 | * @param[in] rows Number of rows in table. |
| 467 | 470 | ***************************************************************************/ |
| 468 | -GException::fits_bad_col_length::fits_bad_col_length(string origin, | |
| 469 | - int length, | |
| 470 | - int rows) | |
| 471 | +GException::fits_bad_col_length::fits_bad_col_length(std::string origin, | |
| 472 | + int length, | |
| 473 | + int rows) | |
| 471 | 474 | { |
| 472 | 475 | m_origin = origin; |
| 473 | 476 | m_message = "Column length '" + str(length) + "' is not compatible" |
| ... | ... | @@ -482,8 +485,8 @@ GException::fits_bad_col_length::fits_bad_col_length(string origin, |
| 482 | 485 | * @param[in] origin Method that throws the error. |
| 483 | 486 | * @param[in] bitpix Bitpix value that was not 8,16,32,64,-32, or -64. |
| 484 | 487 | ***************************************************************************/ |
| 485 | -GException::fits_bad_bitpix::fits_bad_bitpix(string origin, | |
| 486 | - int bitpix) | |
| 488 | +GException::fits_bad_bitpix::fits_bad_bitpix(std::string origin, | |
| 489 | + int bitpix) | |
| 487 | 490 | { |
| 488 | 491 | m_origin = origin; |
| 489 | 492 | m_message = "Invalid number of bits per pixel (bitpix="+str(bitpix)+")"; |
| ... | ... | @@ -497,9 +500,9 @@ GException::fits_bad_bitpix::fits_bad_bitpix(string origin, |
| 497 | 500 | * @param[in] naxis Dimension of image. |
| 498 | 501 | * @param[in] nargs Number of arguments of the image operator. |
| 499 | 502 | ***************************************************************************/ |
| 500 | -GException::fits_wrong_image_operator::fits_wrong_image_operator(string origin, | |
| 501 | - int naxis, | |
| 502 | - int nargs) | |
| 503 | +GException::fits_wrong_image_operator::fits_wrong_image_operator(std::string origin, | |
| 504 | + int naxis, | |
| 505 | + int nargs) | |
| 503 | 506 | { |
| 504 | 507 | m_origin = origin; |
| 505 | 508 | m_message = "Wrong image pixel access operator has been used (dimension=" + |
| ... | ... | @@ -513,8 +516,8 @@ GException::fits_wrong_image_operator::fits_wrong_image_operator(string origin, |
| 513 | 516 | * @param[in] origin Method that throws the error. |
| 514 | 517 | * @param[in] type Specified response type. |
| 515 | 518 | ***************************************************************************/ |
| 516 | -GException::rsp_invalid_type::rsp_invalid_type(string origin, | |
| 517 | - string type) | |
| 519 | +GException::rsp_invalid_type::rsp_invalid_type(std::string origin, | |
| 520 | + std::string type) | |
| 518 | 521 | { |
| 519 | 522 | m_origin = origin; |
| 520 | 523 | m_message = "Invalid response type '"+type+"' specified"; |
| ... | ... | @@ -527,7 +530,8 @@ GException::rsp_invalid_type::rsp_invalid_type(string origin, |
| 527 | 530 | * @param[in] origin Method that throws the error. |
| 528 | 531 | * @param[in] message Error message. |
| 529 | 532 | ***************************************************************************/ |
| 530 | -GException::healpix::healpix(string origin, string message) | |
| 533 | +GException::healpix::healpix(std::string origin, | |
| 534 | + std::string message) | |
| 531 | 535 | { |
| 532 | 536 | m_origin = origin; |
| 533 | 537 | m_message = message; |
| ... | ... | @@ -540,7 +544,8 @@ GException::healpix::healpix(string origin, string message) |
| 540 | 544 | * @param[in] origin Method that throws the error. |
| 541 | 545 | * @param[in] nside Specified nside parameter. |
| 542 | 546 | ***************************************************************************/ |
| 543 | -GException::healpix_bad_nside::healpix_bad_nside(string origin, int nside) | |
| 547 | +GException::healpix_bad_nside::healpix_bad_nside(std::string origin, | |
| 548 | + int nside) | |
| 544 | 549 | { |
| 545 | 550 | m_origin = origin; |
| 546 | 551 | m_message = "Invalid nside "+str(nside)+" parameter (should be one of " |
| ... | ... | @@ -554,7 +559,8 @@ GException::healpix_bad_nside::healpix_bad_nside(string origin, int nside) |
| 554 | 559 | * @param[in] origin Method that throws the error. |
| 555 | 560 | * @param[in] scheme Specified scheme. |
| 556 | 561 | ***************************************************************************/ |
| 557 | -GException::healpix_bad_scheme::healpix_bad_scheme(string origin, string scheme) | |
| 562 | +GException::healpix_bad_scheme::healpix_bad_scheme(std::string origin, | |
| 563 | + std::string scheme) | |
| 558 | 564 | { |
| 559 | 565 | m_origin = origin; |
| 560 | 566 | m_message = "Invalid scheme '"+scheme+"' (should be either 'RING' or 'NESTED')."; |
| ... | ... | @@ -567,7 +573,8 @@ GException::healpix_bad_scheme::healpix_bad_scheme(string origin, string scheme) |
| 567 | 573 | * @param[in] origin Method that throws the error. |
| 568 | 574 | * @param[in] coordsys Specified coordinate system. |
| 569 | 575 | ***************************************************************************/ |
| 570 | -GException::healpix_bad_coords::healpix_bad_coords(string origin, string coordsys) | |
| 576 | +GException::healpix_bad_coords::healpix_bad_coords(std::string origin, | |
| 577 | + std::string coordsys) | |
| 571 | 578 | { |
| 572 | 579 | m_origin = origin; |
| 573 | 580 | m_message = "Invalid coordinate system '"+coordsys + | ... | ... |
src/GHealpix.cpp
| ... | ... | @@ -24,8 +24,6 @@ |
| 24 | 24 | #include "GTools.hpp" |
| 25 | 25 | #include "GHealpix.hpp" |
| 26 | 26 | |
| 27 | -/* __ Namespaces _________________________________________________________ */ | |
| 28 | - | |
| 29 | 27 | /* __ Method name definitions ____________________________________________ */ |
| 30 | 28 | #define G_CONSTRUCT "GHealpix::GHealpix(int,int,int,int)" |
| 31 | 29 | #define G_OP_ACCESS "GHealpix::operator(int,int)" |
| ... | ... | @@ -995,33 +993,33 @@ int GHealpix::ang2pix_z_phi_nest(double z, double phi) const |
| 995 | 993 | * @param[in] os Output stream |
| 996 | 994 | * @param[in] column Healpix array to put in output stream |
| 997 | 995 | ***************************************************************************/ |
| 998 | -ostream& operator<< (ostream& os, const GHealpix& pixels) | |
| 996 | +std::ostream& operator<< (std::ostream& os, const GHealpix& pixels) | |
| 999 | 997 | { |
| 1000 | 998 | // Put header in stream |
| 1001 | - os << "=== GHealpix ===" << endl; | |
| 1002 | - os << " Nside (number of divisions): " << pixels.m_nside << endl; | |
| 1003 | - os << " Npface (pixels per face) ..: " << pixels.m_npface << endl; | |
| 1004 | - os << " Ncap (number of cap pixels): " << pixels.m_ncap << endl; | |
| 1005 | - os << " Npix (number of pixels) ...: " << pixels.m_num_pixels << endl; | |
| 1006 | - os << " Order .....................: " << pixels.m_order << endl; | |
| 1007 | - os << " Pixel vector size .........: " << pixels.m_size_pixels << endl; | |
| 1008 | - os << " Solid angle ...............: " << scientific << pixels.m_omega | |
| 1009 | - << fixed << " sr" << endl; | |
| 999 | + os << "=== GHealpix ===" << std::endl; | |
| 1000 | + os << " Nside (number of divisions): " << pixels.m_nside << std::endl; | |
| 1001 | + os << " Npface (pixels per face) ..: " << pixels.m_npface << std::endl; | |
| 1002 | + os << " Ncap (number of cap pixels): " << pixels.m_ncap << std::endl; | |
| 1003 | + os << " Npix (number of pixels) ...: " << pixels.m_num_pixels << std::endl; | |
| 1004 | + os << " Order .....................: " << pixels.m_order << std::endl; | |
| 1005 | + os << " Pixel vector size .........: " << pixels.m_size_pixels << std::endl; | |
| 1006 | + os << " Solid angle ...............: " << std::scientific << pixels.m_omega | |
| 1007 | + << std::fixed << " sr" << std::endl; | |
| 1010 | 1008 | |
| 1011 | 1009 | // Put ordering in stream |
| 1012 | 1010 | os << " Ordering ..................: "; |
| 1013 | 1011 | switch (pixels.m_scheme) { |
| 1014 | 1012 | case 0: |
| 1015 | - os << "Ring" << endl; | |
| 1013 | + os << "Ring" << std::endl; | |
| 1016 | 1014 | break; |
| 1017 | 1015 | case 1: |
| 1018 | - os << "Nested" << endl; | |
| 1016 | + os << "Nested" << std::endl; | |
| 1019 | 1017 | break; |
| 1020 | 1018 | case -1: |
| 1021 | - os << "*** Unknown ***" << endl; | |
| 1019 | + os << "*** Unknown ***" << std::endl; | |
| 1022 | 1020 | break; |
| 1023 | 1021 | default: |
| 1024 | - os << "*** Invalid ***" << endl; | |
| 1022 | + os << "*** Invalid ***" << std::endl; | |
| 1025 | 1023 | break; |
| 1026 | 1024 | } |
| 1027 | 1025 | ... | ... |
src/GImage.cpp
| ... | ... | @@ -21,8 +21,6 @@ |
| 21 | 21 | #include "GException.hpp" |
| 22 | 22 | #include "GImage.hpp" |
| 23 | 23 | |
| 24 | -/* __ Namespaces _________________________________________________________ */ | |
| 25 | - | |
| 26 | 24 | /* __ Method name definitions ____________________________________________ */ |
| 27 | 25 | |
| 28 | 26 | /* __ Macros _____________________________________________________________ */ | ... | ... |
src/GNodeArray.cpp
| ... | ... | @@ -23,8 +23,6 @@ |
| 23 | 23 | #include "GException.hpp" |
| 24 | 24 | #include "GNodeArray.hpp" |
| 25 | 25 | |
| 26 | -/* __ Namespaces _________________________________________________________ */ | |
| 27 | - | |
| 28 | 26 | /* __ Method name definitions ____________________________________________ */ |
| 29 | 27 | |
| 30 | 28 | /* __ Macros _____________________________________________________________ */ | ... | ... |
src/GSkyDir.cpp
| ... | ... | @@ -18,8 +18,6 @@ |
| 18 | 18 | #include "GTools.hpp" |
| 19 | 19 | #include "GSkyDir.hpp" |
| 20 | 20 | |
| 21 | -/* __ Namespaces _________________________________________________________ */ | |
| 22 | - | |
| 23 | 21 | /* __ Method name definitions ____________________________________________ */ |
| 24 | 22 | |
| 25 | 23 | /* __ Macros _____________________________________________________________ */ |
| ... | ... | @@ -410,7 +408,7 @@ void GSkyDir::gal2equ(void) |
| 410 | 408 | * @param[in] os Output stream |
| 411 | 409 | * @param[in] column Sky direction to put in output stream |
| 412 | 410 | ***************************************************************************/ |
| 413 | -ostream& operator<< (ostream& os, const GSkyDir& dir) | |
| 411 | +std::ostream& operator<< (std::ostream& os, const GSkyDir& dir) | |
| 414 | 412 | { |
| 415 | 413 | // Create coordinate system dependent output |
| 416 | 414 | if (dir.m_has_lb) | ... | ... |
src/GTools.cpp
| ... | ... | @@ -15,8 +15,6 @@ |
| 15 | 15 | #include <sstream> |
| 16 | 16 | #include "GTools.hpp" |
| 17 | 17 | |
| 18 | -/* __ Namespaces _________________________________________________________ */ | |
| 19 | - | |
| 20 | 18 | |
| 21 | 19 | /***********************************************************************//** |
| 22 | 20 | * @brief Strip leading and trailing whitespace from string | ... | ... |
src/fit/GFitPar.cpp
| ... | ... | @@ -16,9 +16,6 @@ |
| 16 | 16 | #include "GException.hpp" |
| 17 | 17 | #include "GFitPar.hpp" |
| 18 | 18 | |
| 19 | -/* __ Namespaces _________________________________________________________ */ | |
| 20 | -using namespace std; | |
| 21 | - | |
| 22 | 19 | /* __ Method name definitions ____________________________________________ */ |
| 23 | 20 | //#define G_OP_MUL_VEC "GSparseMatrix::operator* (const GVector&) const" |
| 24 | 21 | |
| ... | ... | @@ -285,21 +282,21 @@ void GFitPar::free_members(void) |
| 285 | 282 | * Output operator * |
| 286 | 283 | * ----------------------------------------------------------------------- * |
| 287 | 284 | ***************************************************************************/ |
| 288 | -ostream& operator<< (ostream& os, const GFitPar& p) | |
| 285 | +std::ostream& operator<< (std::ostream& os, const GFitPar& p) | |
| 289 | 286 | { |
| 290 | 287 | // Put header in stream |
| 291 | - os << "=== GFitPar ===" << endl; | |
| 288 | + os << "=== GFitPar ===" << std::endl; | |
| 292 | 289 | os << " Value .....................: " << p.m_value; |
| 293 | 290 | if (p.m_free == 0) |
| 294 | - os << " (fixed)" << endl; | |
| 291 | + os << " (fixed)" << std::endl; | |
| 295 | 292 | else |
| 296 | - os << " (free)" << endl; | |
| 293 | + os << " (free)" << std::endl; | |
| 297 | 294 | if (p.m_has_error) |
| 298 | - os << " Error .....................: " << p.m_error << endl; | |
| 295 | + os << " Error .....................: " << p.m_error << std::endl; | |
| 299 | 296 | if (p.m_has_min) |
| 300 | - os << " Minimum boundary ..........: " << p.m_value_min << endl; | |
| 297 | + os << " Minimum boundary ..........: " << p.m_value_min << std::endl; | |
| 301 | 298 | if (p.m_has_max) |
| 302 | - os << " Maximum boundary ..........: " << p.m_value_max << endl; | |
| 299 | + os << " Maximum boundary ..........: " << p.m_value_max << std::endl; | |
| 303 | 300 | |
| 304 | 301 | // Return output stream |
| 305 | 302 | return os; | ... | ... |
src/fits/GFits.cpp
| ... | ... | @@ -18,8 +18,6 @@ |
| 18 | 18 | #include "GTools.hpp" |
| 19 | 19 | #include <iostream> |
| 20 | 20 | |
| 21 | -/* __ Namespaces _________________________________________________________ */ | |
| 22 | - | |
| 23 | 21 | /* __ Method name definitions ____________________________________________ */ |
| 24 | 22 | #define G_OPEN "GFits::open(std::string)" |
| 25 | 23 | #define G_SAVETO "GFits::saveto(const std::string, int)" |
| ... | ... | @@ -428,7 +426,7 @@ GFitsHDU* GFits::hdu(int extno) const |
| 428 | 426 | |
| 429 | 427 | // Throw an error if HDU has not been found |
| 430 | 428 | if (ptr == NULL) { |
| 431 | - ostringstream s_extname; | |
| 429 | + std::ostringstream s_extname; | |
| 432 | 430 | s_extname << extno; |
| 433 | 431 | std::string extname = "extno=" + s_extname.str(); |
| 434 | 432 | throw GException::fits_hdu_not_found(G_HDU2, extname); |
| ... | ... | @@ -558,17 +556,17 @@ void GFits::free_members(void) |
| 558 | 556 | * @param os Output stream into which the FITS file will be dumped |
| 559 | 557 | * @param fits FITS file to dump |
| 560 | 558 | ***************************************************************************/ |
| 561 | -ostream& operator<< (ostream& os, const GFits& fits) | |
| 559 | +std::ostream& operator<< (std::ostream& os, const GFits& fits) | |
| 562 | 560 | { |
| 563 | 561 | // Put header in stream |
| 564 | - os << "=== GFits ===" << endl; | |
| 565 | - os << " Filename ..................: " << fits.m_filename << endl; | |
| 562 | + os << "=== GFits ===" << std::endl; | |
| 563 | + os << " Filename ..................: " << fits.m_filename << std::endl; | |
| 566 | 564 | os << " Mode ......................: "; |
| 567 | 565 | if (fits.m_readwrite) |
| 568 | - os << "read/write" << endl; | |
| 566 | + os << "read/write" << std::endl; | |
| 569 | 567 | else |
| 570 | - os << "read only" << endl; | |
| 571 | - os << " Number of HDUs ............: " << fits.m_num_hdu << endl; | |
| 568 | + os << "read only" << std::endl; | |
| 569 | + os << " Number of HDUs ............: " << fits.m_num_hdu << std::endl; | |
| 572 | 570 | for (int i = 0; i < fits.m_num_hdu; ++i) |
| 573 | 571 | os << fits.m_hdu[i]; |
| 574 | 572 | ... | ... |
src/fits/GFitsAsciiTable.cpp
| ... | ... | @@ -17,8 +17,6 @@ |
| 17 | 17 | #include "GException.hpp" |
| 18 | 18 | #include "GFitsAsciiTable.hpp" |
| 19 | 19 | |
| 20 | -/* __ Namespaces _________________________________________________________ */ | |
| 21 | - | |
| 22 | 20 | /* __ Method name definitions ____________________________________________ */ |
| 23 | 21 | |
| 24 | 22 | /* __ Macros _____________________________________________________________ */ | ... | ... |
src/fits/GFitsBinTable.cpp
| ... | ... | @@ -17,8 +17,6 @@ |
| 17 | 17 | #include "GException.hpp" |
| 18 | 18 | #include "GFitsBinTable.hpp" |
| 19 | 19 | |
| 20 | -/* __ Namespaces _________________________________________________________ */ | |
| 21 | - | |
| 22 | 20 | /* __ Method name definitions ____________________________________________ */ |
| 23 | 21 | |
| 24 | 22 | /* __ Macros _____________________________________________________________ */ | ... | ... |
src/fits/GFitsData.cpp
| ... | ... | @@ -17,8 +17,6 @@ |
| 17 | 17 | #include "GException.hpp" |
| 18 | 18 | #include "GFitsData.hpp" |
| 19 | 19 | |
| 20 | -/* __ Namespaces _________________________________________________________ */ | |
| 21 | - | |
| 22 | 20 | /* __ Method name definitions ____________________________________________ */ |
| 23 | 21 | |
| 24 | 22 | /* __ Macros _____________________________________________________________ */ | ... | ... |
src/fits/GFitsHDU.cpp
| ... | ... | @@ -24,8 +24,6 @@ |
| 24 | 24 | #include "GFitsHDU.hpp" |
| 25 | 25 | #include "GFitsDblImage.hpp" |
| 26 | 26 | |
| 27 | -/* __ Namespaces _________________________________________________________ */ | |
| 28 | - | |
| 29 | 27 | /* __ Method name definitions ____________________________________________ */ |
| 30 | 28 | #define G_OPEN "GFitsHDU::open(int)" |
| 31 | 29 | #define G_SAVE "GFitsHDU::save()" |
| ... | ... | @@ -94,8 +92,8 @@ GFitsHDU::GFitsHDU(const GFitsImage& image) |
| 94 | 92 | m_header->update(GFitsHeaderCard("NAXIS", image.naxis(), |
| 95 | 93 | "number of data axes")); |
| 96 | 94 | for (int i = 0; i < image.naxis(); ++i) { |
| 97 | - ostringstream s_key; | |
| 98 | - ostringstream s_comment; | |
| 95 | + std::ostringstream s_key; | |
| 96 | + std::ostringstream s_comment; | |
| 99 | 97 | s_key << "NAXIS" << (i+1); |
| 100 | 98 | s_comment << "length of data axis " << (i+1); |
| 101 | 99 | m_header->update(GFitsHeaderCard(s_key.str(), image.naxes(i), |
| ... | ... | @@ -744,25 +742,25 @@ void GFitsHDU::save(void) |
| 744 | 742 | * @param[in] os Output stream into which the HDU will be dumped |
| 745 | 743 | * @param[in] hdu HDU to be dumped |
| 746 | 744 | ***************************************************************************/ |
| 747 | -ostream& operator<< (ostream& os, const GFitsHDU& hdu) | |
| 745 | +std::ostream& operator<< (std::ostream& os, const GFitsHDU& hdu) | |
| 748 | 746 | { |
| 749 | 747 | // Put header in stream |
| 750 | - os << "=== GFitsHDU ===" << endl; | |
| 751 | - os << " HDU number ................: " << hdu.m_hdunum << endl; | |
| 752 | - os << " HDU name ..................: " << hdu.m_name << endl; | |
| 748 | + os << "=== GFitsHDU ===" << std::endl; | |
| 749 | + os << " HDU number ................: " << hdu.m_hdunum << std::endl; | |
| 750 | + os << " HDU name ..................: " << hdu.m_name << std::endl; | |
| 753 | 751 | os << " HDU type ..................: "; |
| 754 | 752 | switch (hdu.m_type) { |
| 755 | 753 | case 0: // Image HDU |
| 756 | - os << "Image" << endl; | |
| 754 | + os << "Image" << std::endl; | |
| 757 | 755 | break; |
| 758 | 756 | case 1: // ASCII Table HDU |
| 759 | - os << "ASCII table" << endl; | |
| 757 | + os << "ASCII table" << std::endl; | |
| 760 | 758 | break; |
| 761 | 759 | case 2: // Binary Table HDU |
| 762 | - os << "Binary table" << endl; | |
| 760 | + os << "Binary table" << std::endl; | |
| 763 | 761 | break; |
| 764 | 762 | default: |
| 765 | - os << "Unknown" << endl; | |
| 763 | + os << "Unknown" << std::endl; | |
| 766 | 764 | break; |
| 767 | 765 | } |
| 768 | 766 | ... | ... |
src/fits/GFitsHeader.cpp
| ... | ... | @@ -17,8 +17,6 @@ |
| 17 | 17 | #include "GException.hpp" |
| 18 | 18 | #include "GFitsHeader.hpp" |
| 19 | 19 | |
| 20 | -/* __ Namespaces _________________________________________________________ */ | |
| 21 | - | |
| 22 | 20 | /* __ Method name definitions ____________________________________________ */ |
| 23 | 21 | #define G_CARD "GFitsHeader::card(const int&)" |
| 24 | 22 | #define G_CARD_PTR "GFitsHeader::card_ptr(const std::string&)" |
| ... | ... | @@ -552,10 +550,10 @@ void GFitsHeader::close(void) |
| 552 | 550 | * @param[in] os Output stream |
| 553 | 551 | * @param[in] header Header to put in output stream |
| 554 | 552 | ***************************************************************************/ |
| 555 | -ostream& operator<< (ostream& os, const GFitsHeader& header) | |
| 553 | +std::ostream& operator<< (std::ostream& os, const GFitsHeader& header) | |
| 556 | 554 | { |
| 557 | 555 | // Put header in stream |
| 558 | - os << "=== GFitsHeader (" << header.m_num_cards << " cards) ===" << endl; | |
| 556 | + os << "=== GFitsHeader (" << header.m_num_cards << " cards) ===" << std::endl; | |
| 559 | 557 | for (int i = 0; i < header.m_num_cards; ++i) |
| 560 | 558 | os << " " << header.m_card[i]; |
| 561 | 559 | ... | ... |
src/fits/GFitsHeaderCard.cpp
| ... | ... | @@ -18,8 +18,6 @@ |
| 18 | 18 | #include "GTools.hpp" |
| 19 | 19 | #include "GFitsHeaderCard.hpp" |
| 20 | 20 | |
| 21 | -/* __ Namespaces _________________________________________________________ */ | |
| 22 | - | |
| 23 | 21 | /* __ Method name definitions ____________________________________________ */ |
| 24 | 22 | #define G_READ_NUM "GFitsHeaderCard::read(fitsfile*, int)" |
| 25 | 23 | #define G_READ_STR "GFitsHeaderCard::read(fitsfile*, std::string)" |
| ... | ... | @@ -258,8 +256,8 @@ void GFitsHeaderCard::value(const std::string& value) |
| 258 | 256 | void GFitsHeaderCard::value(const double& value) |
| 259 | 257 | { |
| 260 | 258 | // Convert value to string |
| 261 | - ostringstream s_value; | |
| 262 | - s_value << scientific << value; | |
| 259 | + std::ostringstream s_value; | |
| 260 | + s_value << std::scientific << value; | |
| 263 | 261 | |
| 264 | 262 | // Assign value |
| 265 | 263 | m_value = s_value.str(); |
| ... | ... | @@ -280,7 +278,7 @@ void GFitsHeaderCard::value(const double& value) |
| 280 | 278 | void GFitsHeaderCard::value(const int& value) |
| 281 | 279 | { |
| 282 | 280 | // Convert value to string |
| 283 | - ostringstream s_value; | |
| 281 | + std::ostringstream s_value; | |
| 284 | 282 | s_value << value; |
| 285 | 283 | |
| 286 | 284 | // Assign value |
| ... | ... | @@ -756,7 +754,7 @@ void GFitsHeaderCard::write(__fitsfile* fptr) |
| 756 | 754 | * @param[in] os Output stream |
| 757 | 755 | * @param[in] card Card that should be put in output stream |
| 758 | 756 | ***************************************************************************/ |
| 759 | -ostream& operator<< (ostream& os, const GFitsHeaderCard& card) | |
| 757 | +std::ostream& operator<< (std::ostream& os, const GFitsHeaderCard& card) | |
| 760 | 758 | { |
| 761 | 759 | // Set buffer |
| 762 | 760 | char buffer[100]; |
| ... | ... | @@ -794,31 +792,31 @@ ostream& operator<< (ostream& os, const GFitsHeaderCard& card) |
| 794 | 792 | // Attach card type |
| 795 | 793 | switch (card.m_value_type) { |
| 796 | 794 | case CT_UNKNOWN: |
| 797 | - os << " <type unknown>" << endl; | |
| 795 | + os << " <type unknown>" << std::endl; | |
| 798 | 796 | break; |
| 799 | 797 | case CT_INVALID: |
| 800 | - os << " <invalid type>" << endl; | |
| 798 | + os << " <invalid type>" << std::endl; | |
| 801 | 799 | break; |
| 802 | 800 | case CT_STRING: |
| 803 | - os << " <string>" << endl; | |
| 801 | + os << " <string>" << std::endl; | |
| 804 | 802 | break; |
| 805 | 803 | case CT_INT: |
| 806 | - os << " <int>" << endl; | |
| 804 | + os << " <int>" << std::endl; | |
| 807 | 805 | break; |
| 808 | 806 | case CT_FLOAT: |
| 809 | - os << " <float>" << endl; | |
| 807 | + os << " <float>" << std::endl; | |
| 810 | 808 | break; |
| 811 | 809 | case CT_BOOL: |
| 812 | - os << " <boolean>" << endl; | |
| 810 | + os << " <boolean>" << std::endl; | |
| 813 | 811 | break; |
| 814 | 812 | case CT_COMMENT: |
| 815 | - os << " <comment>" << endl; | |
| 813 | + os << " <comment>" << std::endl; | |
| 816 | 814 | break; |
| 817 | 815 | case CT_HISTORY: |
| 818 | - os << " <history>" << endl; | |
| 816 | + os << " <history>" << std::endl; | |
| 819 | 817 | break; |
| 820 | 818 | default: |
| 821 | - os << endl; | |
| 819 | + os << std::endl; | |
| 822 | 820 | break; |
| 823 | 821 | } |
| 824 | 822 | ... | ... |
src/fits/GFitsImage.cpp
| ... | ... | @@ -17,8 +17,6 @@ |
| 17 | 17 | #include "GException.hpp" |
| 18 | 18 | #include "GFitsImage.hpp" |
| 19 | 19 | |
| 20 | -/* __ Namespaces _________________________________________________________ */ | |
| 21 | - | |
| 22 | 20 | /* __ Method name definitions ____________________________________________ */ |
| 23 | 21 | #define G_NAXES "GFitsImage::naxes(int)" |
| 24 | 22 | #define G_OPEN_IMAGE "GFitsImage::open(fitsfile*)" |
| ... | ... | @@ -436,14 +434,14 @@ void GFitsImage::save_image(int datatype, const void* pixels) |
| 436 | 434 | * @param os Output stream into which the result will be writted |
| 437 | 435 | * @param image FITS image which should be put in the output stream |
| 438 | 436 | ***************************************************************************/ |
| 439 | -ostream& operator<< (ostream& os, const GFitsImage& image) | |
| 437 | +std::ostream& operator<< (std::ostream& os, const GFitsImage& image) | |
| 440 | 438 | { |
| 441 | 439 | // Put header in stream |
| 442 | - os << "=== GFitsImage ===" << endl; | |
| 443 | - os << " Number of dimensions ......: " << image.m_naxis << endl; | |
| 444 | - os << " Number of image pixels ....: " << image.m_num_pixels << endl; | |
| 440 | + os << "=== GFitsImage ===" << std::endl; | |
| 441 | + os << " Number of dimensions ......: " << image.m_naxis << std::endl; | |
| 442 | + os << " Number of image pixels ....: " << image.m_num_pixels << std::endl; | |
| 445 | 443 | for (int i = 0; i < image.m_naxis; ++i) |
| 446 | - os << " Number of bins in " << i << " .......: " << image.m_naxes[i] << endl; | |
| 444 | + os << " Number of bins in " << i << " .......: " << image.m_naxes[i] << std::endl; | |
| 447 | 445 | |
| 448 | 446 | // Return output stream |
| 449 | 447 | return os; | ... | ... |
src/fits/GFitsTable.cpp
| ... | ... | @@ -24,8 +24,6 @@ |
| 24 | 24 | #include "GFitsTableFltCol.hpp" |
| 25 | 25 | #include "GFitsTableDblCol.hpp" |
| 26 | 26 | |
| 27 | -/* __ Namespaces _________________________________________________________ */ | |
| 28 | - | |
| 29 | 27 | /* __ Method name definitions ____________________________________________ */ |
| 30 | 28 | #define G_OPEN "GFitsTable::open(fitsfile*)" |
| 31 | 29 | #define G_SAVE "GFitsTable::save()" |
| ... | ... | @@ -902,62 +900,62 @@ char* GFitsTable::get_tunit(const int& colnum) const |
| 902 | 900 | * @param[in] os Output stream |
| 903 | 901 | * @param[in] table Table to put in output stream |
| 904 | 902 | ***************************************************************************/ |
| 905 | -ostream& operator<< (ostream& os, const GFitsTable& table) | |
| 903 | +std::ostream& operator<< (std::ostream& os, const GFitsTable& table) | |
| 906 | 904 | { |
| 907 | 905 | // Put header in stream |
| 908 | - os << "=== GFitsTable ===" << endl; | |
| 906 | + os << "=== GFitsTable ===" << std::endl; | |
| 909 | 907 | os << " Table type ................: "; |
| 910 | 908 | switch (table.m_type) { |
| 911 | 909 | case 1: |
| 912 | - os << "ASCII table" << endl; | |
| 910 | + os << "ASCII table" << std::endl; | |
| 913 | 911 | break; |
| 914 | 912 | case 2: |
| 915 | - os << "Binary table" << endl; | |
| 913 | + os << "Binary table" << std::endl; | |
| 916 | 914 | break; |
| 917 | 915 | default: |
| 918 | - os << "Unknown" << endl; | |
| 916 | + os << "Unknown" << std::endl; | |
| 919 | 917 | break; |
| 920 | 918 | } |
| 921 | - os << " Number of rows ............: " << table.m_rows << endl; | |
| 922 | - os << " Number of columns .........: " << table.m_cols << endl; | |
| 919 | + os << " Number of rows ............: " << table.m_rows << std::endl; | |
| 920 | + os << " Number of columns .........: " << table.m_cols << std::endl; | |
| 923 | 921 | if (table.m_columns != NULL) { |
| 924 | 922 | for (int i = 0; i < table.m_cols; ++i) { |
| 925 | 923 | if (table.m_columns[i] != NULL) { |
| 926 | 924 | switch (table.m_columns[i]->type()) { |
| 927 | 925 | case __TLOGICAL: |
| 928 | 926 | os << " " << *((GFitsTableLogCol*)table.m_columns[i]) |
| 929 | - << endl; | |
| 927 | + << std::endl; | |
| 930 | 928 | break; |
| 931 | 929 | case __TSTRING: |
| 932 | 930 | os << " " << *((GFitsTableStrCol*)table.m_columns[i]) |
| 933 | - << endl; | |
| 931 | + << std::endl; | |
| 934 | 932 | break; |
| 935 | 933 | case __TSHORT: |
| 936 | 934 | os << " " << *((GFitsTableShtCol*)table.m_columns[i]) |
| 937 | - << endl; | |
| 935 | + << std::endl; | |
| 938 | 936 | break; |
| 939 | 937 | case __TLONG: |
| 940 | 938 | os << " " << *((GFitsTableLngCol*)table.m_columns[i]) |
| 941 | - << endl; | |
| 939 | + << std::endl; | |
| 942 | 940 | break; |
| 943 | 941 | case __TFLOAT: |
| 944 | 942 | os << " " << *((GFitsTableFltCol*)table.m_columns[i]) |
| 945 | - << endl; | |
| 943 | + << std::endl; | |
| 946 | 944 | break; |
| 947 | 945 | case __TDOUBLE: |
| 948 | 946 | os << " " << *((GFitsTableDblCol*)table.m_columns[i]) |
| 949 | - << endl; | |
| 947 | + << std::endl; | |
| 950 | 948 | break; |
| 951 | 949 | default: |
| 952 | 950 | break; |
| 953 | 951 | } |
| 954 | 952 | } |
| 955 | 953 | else |
| 956 | - os << " column " << i << " undefined" << endl; | |
| 954 | + os << " column " << i << " undefined" << std::endl; | |
| 957 | 955 | } |
| 958 | 956 | } |
| 959 | 957 | else |
| 960 | - os << " table columns undefined" << endl; | |
| 958 | + os << " table columns undefined" << std::endl; | |
| 961 | 959 | |
| 962 | 960 | // Return output stream |
| 963 | 961 | return os; | ... | ... |
src/fits/GFitsTableCol.cpp
| ... | ... | @@ -17,8 +17,6 @@ |
| 17 | 17 | #include "GException.hpp" |
| 18 | 18 | #include "GFitsTableCol.hpp" |
| 19 | 19 | |
| 20 | -/* __ Namespaces _________________________________________________________ */ | |
| 21 | - | |
| 22 | 20 | /* __ Method name definitions ____________________________________________ */ |
| 23 | 21 | #define G_LOAD_COLUMN "GFitsTableCol::load_column(void*, void*)" |
| 24 | 22 | #define G_SAVE_COLUMN "GFitsTableCol::save_column(void*, void*)" |
| ... | ... | @@ -447,7 +445,7 @@ void GFitsTableCol::save_column(void) |
| 447 | 445 | * @param[in] os Output stream |
| 448 | 446 | * @param[in] column Column to put in output stream |
| 449 | 447 | ***************************************************************************/ |
| 450 | -void GFitsTableCol::dump_column(ostream& os, void* data) const | |
| 448 | +void GFitsTableCol::dump_column(std::ostream& os, void* data) const | |
| 451 | 449 | { |
| 452 | 450 | // Put column name in stream |
| 453 | 451 | os << "'" << m_name << "'"; | ... | ... |
src/fits/GFitsTableDblCol.cpp
| ... | ... | @@ -18,8 +18,6 @@ |
| 18 | 18 | #include "GTools.hpp" |
| 19 | 19 | #include "GFitsTableDblCol.hpp" |
| 20 | 20 | |
| 21 | -/* __ Namespaces _________________________________________________________ */ | |
| 22 | - | |
| 23 | 21 | /* __ Method name definitions ____________________________________________ */ |
| 24 | 22 | #define G_STRING "GFitsTableDblCol::string(const int&, const int&)" |
| 25 | 23 | #define G_REAL "GFitsTableDblCol::real(const int&, const int&)" |
| ... | ... | @@ -225,8 +223,8 @@ std::string GFitsTableDblCol::string(const int& row, const int& inx) |
| 225 | 223 | int offset = row * m_number + inx; |
| 226 | 224 | |
| 227 | 225 | // Convert double into string |
| 228 | - ostringstream s_value; | |
| 229 | - s_value << scientific << m_data[offset]; | |
| 226 | + std::ostringstream s_value; | |
| 227 | + s_value << std::scientific << m_data[offset]; | |
| 230 | 228 | |
| 231 | 229 | // Return value |
| 232 | 230 | return s_value.str(); |
| ... | ... | @@ -544,7 +542,7 @@ void GFitsTableDblCol::fetch_data(void) |
| 544 | 542 | * @param[in] os Output stream |
| 545 | 543 | * @param[in] column Column to put in output stream |
| 546 | 544 | ***************************************************************************/ |
| 547 | -ostream& operator<< (ostream& os, const GFitsTableDblCol& column) | |
| 545 | +std::ostream& operator<< (std::ostream& os, const GFitsTableDblCol& column) | |
| 548 | 546 | { |
| 549 | 547 | // Dump column in output stream |
| 550 | 548 | column.dump_column(os, column.m_data); | ... | ... |
src/fits/GFitsTableFltCol.cpp
| ... | ... | @@ -18,8 +18,6 @@ |
| 18 | 18 | #include "GTools.hpp" |
| 19 | 19 | #include "GFitsTableFltCol.hpp" |
| 20 | 20 | |
| 21 | -/* __ Namespaces _________________________________________________________ */ | |
| 22 | - | |
| 23 | 21 | /* __ Method name definitions ____________________________________________ */ |
| 24 | 22 | #define G_STRING "GFitsTableFltCol::string(const int&, const int&)" |
| 25 | 23 | #define G_REAL "GFitsTableFltCol::real(const int&, const int&)" |
| ... | ... | @@ -225,8 +223,8 @@ std::string GFitsTableFltCol::string(const int& row, const int& inx) |
| 225 | 223 | int offset = row * m_number + inx; |
| 226 | 224 | |
| 227 | 225 | // Convert double into string |
| 228 | - ostringstream s_value; | |
| 229 | - s_value << scientific << m_data[offset]; | |
| 226 | + std::ostringstream s_value; | |
| 227 | + s_value << std::scientific << m_data[offset]; | |
| 230 | 228 | |
| 231 | 229 | // Return value |
| 232 | 230 | return s_value.str(); |
| ... | ... | @@ -548,7 +546,7 @@ void GFitsTableFltCol::fetch_data(void) |
| 548 | 546 | * @param[in] os Output stream |
| 549 | 547 | * @param[in] column Column to put in output stream |
| 550 | 548 | ***************************************************************************/ |
| 551 | -ostream& operator<< (ostream& os, const GFitsTableFltCol& column) | |
| 549 | +std::ostream& operator<< (std::ostream& os, const GFitsTableFltCol& column) | |
| 552 | 550 | { |
| 553 | 551 | // Dump column in output stream |
| 554 | 552 | column.dump_column(os, column.m_data); | ... | ... |
src/fits/GFitsTableLngCol.cpp
| ... | ... | @@ -18,8 +18,6 @@ |
| 18 | 18 | #include "GTools.hpp" |
| 19 | 19 | #include "GFitsTableLngCol.hpp" |
| 20 | 20 | |
| 21 | -/* __ Namespaces _________________________________________________________ */ | |
| 22 | - | |
| 23 | 21 | /* __ Method name definitions ____________________________________________ */ |
| 24 | 22 | #define G_STRING "GFitsTableLngCol::string(const int&, const int&)" |
| 25 | 23 | #define G_REAL "GFitsTableLngCol::real(const int&, const int&)" |
| ... | ... | @@ -225,7 +223,7 @@ std::string GFitsTableLngCol::string(const int& row, const int& inx) |
| 225 | 223 | int offset = row * m_number + inx; |
| 226 | 224 | |
| 227 | 225 | // Convert long into string |
| 228 | - ostringstream s_value; | |
| 226 | + std::ostringstream s_value; | |
| 229 | 227 | s_value << m_data[offset]; |
| 230 | 228 | |
| 231 | 229 | // Return value |
| ... | ... | @@ -548,7 +546,7 @@ void GFitsTableLngCol::fetch_data(void) |
| 548 | 546 | * @param[in] os Output stream |
| 549 | 547 | * @param[in] column Column to put in output stream |
| 550 | 548 | ***************************************************************************/ |
| 551 | -ostream& operator<< (ostream& os, const GFitsTableLngCol& column) | |
| 549 | +std::ostream& operator<< (std::ostream& os, const GFitsTableLngCol& column) | |
| 552 | 550 | { |
| 553 | 551 | // Dump column in output stream |
| 554 | 552 | column.dump_column(os, column.m_data); | ... | ... |
src/fits/GFitsTableLogCol.cpp
| ... | ... | @@ -18,8 +18,6 @@ |
| 18 | 18 | #include "GTools.hpp" |
| 19 | 19 | #include "GFitsTableLogCol.hpp" |
| 20 | 20 | |
| 21 | -/* __ Namespaces _________________________________________________________ */ | |
| 22 | - | |
| 23 | 21 | /* __ Method name definitions ____________________________________________ */ |
| 24 | 22 | #define G_STRING "GFitsTableLogCol::string(const int&, const int&)" |
| 25 | 23 | #define G_REAL "GFitsTableLogCol::real(const int&, const int&)" |
| ... | ... | @@ -546,7 +544,7 @@ void GFitsTableLogCol::fetch_data(void) |
| 546 | 544 | * @param[in] os Output stream |
| 547 | 545 | * @param[in] column Column to put in output stream |
| 548 | 546 | ***************************************************************************/ |
| 549 | -ostream& operator<< (ostream& os, const GFitsTableLogCol& column) | |
| 547 | +std::ostream& operator<< (std::ostream& os, const GFitsTableLogCol& column) | |
| 550 | 548 | { |
| 551 | 549 | // Dump column in output stream |
| 552 | 550 | column.dump_column(os, column.m_data); | ... | ... |
src/fits/GFitsTableShtCol.cpp
| ... | ... | @@ -18,8 +18,6 @@ |
| 18 | 18 | #include "GTools.hpp" |
| 19 | 19 | #include "GFitsTableShtCol.hpp" |
| 20 | 20 | |
| 21 | -/* __ Namespaces _________________________________________________________ */ | |
| 22 | - | |
| 23 | 21 | /* __ Method name definitions ____________________________________________ */ |
| 24 | 22 | #define G_STRING "GFitsTableShtCol::string(const int&, const int&)" |
| 25 | 23 | #define G_REAL "GFitsTableShtCol::real(const int&, const int&)" |
| ... | ... | @@ -224,7 +222,7 @@ std::string GFitsTableShtCol::string(const int& row, const int& inx) |
| 224 | 222 | int offset = row * m_number + inx; |
| 225 | 223 | |
| 226 | 224 | // Convert double into string |
| 227 | - ostringstream s_value; | |
| 225 | + std::ostringstream s_value; | |
| 228 | 226 | s_value << m_data[offset]; |
| 229 | 227 | |
| 230 | 228 | // Return value |
| ... | ... | @@ -546,7 +544,7 @@ void GFitsTableShtCol::fetch_data(void) |
| 546 | 544 | * @param[in] os Output stream |
| 547 | 545 | * @param[in] column Column to put in output stream |
| 548 | 546 | ***************************************************************************/ |
| 549 | -ostream& operator<< (ostream& os, const GFitsTableShtCol& column) | |
| 547 | +std::ostream& operator<< (std::ostream& os, const GFitsTableShtCol& column) | |
| 550 | 548 | { |
| 551 | 549 | // Dump column in output stream |
| 552 | 550 | column.dump_column(os, column.m_data); | ... | ... |
src/fits/GFitsTableStrCol.cpp
| ... | ... | @@ -18,8 +18,6 @@ |
| 18 | 18 | #include "GTools.hpp" |
| 19 | 19 | #include "GFitsTableStrCol.hpp" |
| 20 | 20 | |
| 21 | -/* __ Namespaces _________________________________________________________ */ | |
| 22 | - | |
| 23 | 21 | /* __ Method name definitions ____________________________________________ */ |
| 24 | 22 | #define G_STRING "GFitsTableStrCol::string(const int&, const int&)" |
| 25 | 23 | #define G_REAL "GFitsTableStrCol::real(const int&, const int&)" |
| ... | ... | @@ -627,7 +625,7 @@ void GFitsTableStrCol::free_buffer(void) |
| 627 | 625 | * @param[in] os Output stream |
| 628 | 626 | * @param[in] column Column to put in output stream |
| 629 | 627 | ***************************************************************************/ |
| 630 | -ostream& operator<< (ostream& os, const GFitsTableStrCol& column) | |
| 628 | +std::ostream& operator<< (std::ostream& os, const GFitsTableStrCol& column) | |
| 631 | 629 | { |
| 632 | 630 | // Dump column in output stream |
| 633 | 631 | column.dump_column(os, column.m_data); | ... | ... |
src/linalg/GMatrix.cpp
| ... | ... | @@ -18,9 +18,6 @@ |
| 18 | 18 | #include "GSymMatrix.hpp" |
| 19 | 19 | #include "GSparseMatrix.hpp" |
| 20 | 20 | |
| 21 | -/* __ Namespaces _________________________________________________________ */ | |
| 22 | -using namespace std; | |
| 23 | - | |
| 24 | 21 | /* __ Method name definitions ____________________________________________ */ |
| 25 | 22 | #define G_OP_MUL_VEC "GMatrix::operator* (const GVector&) const" |
| 26 | 23 | #define G_OP_ADD "GMatrix::operator+= (const GMatrix&)" |
| ... | ... | @@ -586,22 +583,22 @@ void GMatrix::constructor(int rows, int cols) |
| 586 | 583 | * Output operator * |
| 587 | 584 | * ----------------------------------------------------------------------- * |
| 588 | 585 | ***************************************************************************/ |
| 589 | -ostream& operator<< (ostream& os, const GMatrix& m) | |
| 586 | +std::ostream& operator<< (std::ostream& os, const GMatrix& m) | |
| 590 | 587 | { |
| 591 | 588 | // Put header in stream |
| 592 | - os << "=== GMatrix ===" << endl; | |
| 589 | + os << "=== GMatrix ===" << std::endl; | |
| 593 | 590 | if (m.m_rowsel != NULL) |
| 594 | 591 | os << " Number of rows ............: " << m.m_rows << " (compressed " << |
| 595 | - m.m_num_rowsel << ")" << endl; | |
| 592 | + m.m_num_rowsel << ")" << std::endl; | |
| 596 | 593 | else |
| 597 | - os << " Number of rows ............: " << m.m_rows << endl; | |
| 594 | + os << " Number of rows ............: " << m.m_rows << std::endl; | |
| 598 | 595 | if (m.m_colsel != NULL) |
| 599 | 596 | os << " Number of columns .........: " << m.m_cols << " (compressed " << |
| 600 | - m.m_num_colsel << ")" << endl; | |
| 597 | + m.m_num_colsel << ")" << std::endl; | |
| 601 | 598 | else |
| 602 | - os << " Number of columns .........: " << m.m_cols << endl; | |
| 603 | - os << " Number of elements ........: " << m.m_elements << endl; | |
| 604 | - os << " Number of allocated cells .: " << m.m_alloc << endl; | |
| 599 | + os << " Number of columns .........: " << m.m_cols << std::endl; | |
| 600 | + os << " Number of elements ........: " << m.m_elements << std::endl; | |
| 601 | + os << " Number of allocated cells .: " << m.m_alloc << std::endl; | |
| 605 | 602 | |
| 606 | 603 | // Dump elements and compression schemes |
| 607 | 604 | m.dump_elements(os); | ... | ... |
src/linalg/GMatrixBase.cpp
| ... | ... | @@ -16,9 +16,6 @@ |
| 16 | 16 | #include "GException.hpp" |
| 17 | 17 | #include "GVector.hpp" |
| 18 | 18 | |
| 19 | -/* __ Namespaces _________________________________________________________ */ | |
| 20 | -using namespace std; | |
| 21 | - | |
| 22 | 19 | /* __ Method name definitions ____________________________________________ */ |
| 23 | 20 | #define G_COPY_MEMBERS "GMatrixBase::copy_members(const GMatrixBase&)" |
| 24 | 21 | #define G_SELECT_NON_ZERO "GMatrixBase::select_non_zero()" |
| ... | ... | @@ -330,7 +327,7 @@ double GMatrixBase::get_element_sum() const |
| 330 | 327 | * Dump all matrix elements in ostream * |
| 331 | 328 | * ----------------------------------------------------------------------- * |
| 332 | 329 | ***************************************************************************/ |
| 333 | -void GMatrixBase::dump_elements(ostream& os) const | |
| 330 | +void GMatrixBase::dump_elements(std::ostream& os) const | |
| 334 | 331 | { |
| 335 | 332 | // Dump matrix elements row by row using the access function |
| 336 | 333 | for (int row = 0; row < m_rows; ++row) { |
| ... | ... | @@ -341,7 +338,7 @@ void GMatrixBase::dump_elements(ostream& os) const |
| 341 | 338 | os << ", "; |
| 342 | 339 | } |
| 343 | 340 | if (row != m_rows-1) |
| 344 | - os << endl; | |
| 341 | + os << std::endl; | |
| 345 | 342 | } |
| 346 | 343 | |
| 347 | 344 | // Return |
| ... | ... | @@ -353,11 +350,11 @@ void GMatrixBase::dump_elements(ostream& os) const |
| 353 | 350 | * Dump row compression scheme in ostream if it exists * |
| 354 | 351 | * ----------------------------------------------------------------------- * |
| 355 | 352 | ***************************************************************************/ |
| 356 | -void GMatrixBase::dump_row_comp(ostream& os) const | |
| 353 | +void GMatrixBase::dump_row_comp(std::ostream& os) const | |
| 357 | 354 | { |
| 358 | 355 | // If there is a row compression the show scheme |
| 359 | 356 | if (m_rowsel != NULL) { |
| 360 | - os << endl << " Row selection ..:"; | |
| 357 | + os << std::endl << " Row selection ..:"; | |
| 361 | 358 | for (int row = 0; row < m_num_rowsel; ++row) |
| 362 | 359 | os << " " << m_rowsel[row]; |
| 363 | 360 | } |
| ... | ... | @@ -371,11 +368,11 @@ void GMatrixBase::dump_row_comp(ostream& os) const |
| 371 | 368 | * Dump column compression scheme in ostream if it exists * |
| 372 | 369 | * ----------------------------------------------------------------------- * |
| 373 | 370 | ***************************************************************************/ |
| 374 | -void GMatrixBase::dump_col_comp(ostream& os) const | |
| 371 | +void GMatrixBase::dump_col_comp(std::ostream& os) const | |
| 375 | 372 | { |
| 376 | 373 | // If there is a column compression the show scheme |
| 377 | 374 | if (m_colsel != NULL) { |
| 378 | - os << endl << " Column selection:"; | |
| 375 | + os << std::endl << " Column selection:"; | |
| 379 | 376 | for (int col = 0; col < m_num_colsel; ++col) |
| 380 | 377 | os << " " << m_colsel[col]; |
| 381 | 378 | } | ... | ... |
src/linalg/GSparseMatrix.cpp
| ... | ... | @@ -28,9 +28,6 @@ |
| 28 | 28 | #include "GSparseSymbolic.hpp" |
| 29 | 29 | #include "GSparseNumeric.hpp" |
| 30 | 30 | |
| 31 | -/* __ Namespaces _________________________________________________________ */ | |
| 32 | -using namespace std; | |
| 33 | - | |
| 34 | 31 | /* __ Method name definitions ____________________________________________ */ |
| 35 | 32 | #define G_OP_MUL_VEC "GSparseMatrix::operator* (const GVector&) const" |
| 36 | 33 | #define G_OP_ADD "GSparseMatrix::operator+= (const GSparseMatrix&)" |
| ... | ... | @@ -2705,32 +2702,32 @@ void GSparseMatrix::mix_column(const double* src1_data, const int* src1_row, |
| 2705 | 2702 | * Output operator * |
| 2706 | 2703 | * ----------------------------------------------------------------------- * |
| 2707 | 2704 | ***************************************************************************/ |
| 2708 | -ostream& operator<< (ostream& os, const GSparseMatrix& m) | |
| 2705 | +std::ostream& operator<< (std::ostream& os, const GSparseMatrix& m) | |
| 2709 | 2706 | { |
| 2710 | 2707 | // Put header in stream |
| 2711 | - os << "=== GSparseMatrix ===" << endl; | |
| 2708 | + os << "=== GSparseMatrix ===" << std::endl; | |
| 2712 | 2709 | if (m.m_rowsel != NULL) |
| 2713 | 2710 | os << " Number of rows ............: " << m.m_rows << " (compressed " << |
| 2714 | - m.m_num_rowsel << ")" << endl; | |
| 2711 | + m.m_num_rowsel << ")" << std::endl; | |
| 2715 | 2712 | else |
| 2716 | - os << " Number of rows ............: " << m.m_rows << endl; | |
| 2713 | + os << " Number of rows ............: " << m.m_rows << std::endl; | |
| 2717 | 2714 | if (m.m_colsel != NULL) |
| 2718 | 2715 | os << " Number of columns .........: " << m.m_cols << " (compressed " << |
| 2719 | - m.m_num_colsel << ")" << endl; | |
| 2716 | + m.m_num_colsel << ")" << std::endl; | |
| 2720 | 2717 | else |
| 2721 | - os << " Number of columns .........: " << m.m_cols << endl; | |
| 2718 | + os << " Number of columns .........: " << m.m_cols << std::endl; | |
| 2722 | 2719 | if (m.m_fill_val == 0.0) |
| 2723 | 2720 | os << " Number of non-zero elements: " << m.m_colstart[m.m_cols] << " (" << |
| 2724 | - m.m_elements << ")" << endl; | |
| 2721 | + m.m_elements << ")" << std::endl; | |
| 2725 | 2722 | else { |
| 2726 | 2723 | os << " Number of non-zero elements: " << m.m_colstart[m.m_cols]+1 << " (" << |
| 2727 | - m.m_elements+1 << ")" << endl; | |
| 2724 | + m.m_elements+1 << ")" << std::endl; | |
| 2728 | 2725 | os << " Pending element ...........: (" << m.m_fill_row << "," << m.m_fill_col << |
| 2729 | - ")=" << m.m_fill_val << endl; | |
| 2726 | + ")=" << m.m_fill_val << std::endl; | |
| 2730 | 2727 | } |
| 2731 | - os << " Number of allocated cells .: " << m.m_alloc << endl; | |
| 2732 | - os << " Memory block size .........: " << m.m_mem_block << endl; | |
| 2733 | - os << " Sparse matrix fill ........: " << m.fill() << endl; | |
| 2728 | + os << " Number of allocated cells .: " << m.m_alloc << std::endl; | |
| 2729 | + os << " Memory block size .........: " << m.m_mem_block << std::endl; | |
| 2730 | + os << " Sparse matrix fill ........: " << m.fill() << std::endl; | |
| 2734 | 2731 | |
| 2735 | 2732 | // Dump elements and compression schemes |
| 2736 | 2733 | m.dump_elements(os); |
| ... | ... | @@ -2739,12 +2736,12 @@ ostream& operator<< (ostream& os, const GSparseMatrix& m) |
| 2739 | 2736 | |
| 2740 | 2737 | // If there is a symbolic decomposition then put it also in the stream |
| 2741 | 2738 | if (m.m_symbolic != NULL) { |
| 2742 | - os << endl << *((GSparseSymbolic*)m.m_symbolic); | |
| 2739 | + os << std::endl << *((GSparseSymbolic*)m.m_symbolic); | |
| 2743 | 2740 | } |
| 2744 | 2741 | |
| 2745 | 2742 | // If there is a numeric decomposition then put it also in the stream |
| 2746 | 2743 | if (m.m_numeric != NULL) { |
| 2747 | - os << endl << *((GSparseNumeric*)m.m_numeric); | |
| 2744 | + os << std::endl << *((GSparseNumeric*)m.m_numeric); | |
| 2748 | 2745 | } |
| 2749 | 2746 | |
| 2750 | 2747 | // Return output stream | ... | ... |
src/linalg/GSparseNumeric.cpp
| ... | ... | @@ -14,9 +14,6 @@ |
| 14 | 14 | /* __ Includes ___________________________________________________________ */ |
| 15 | 15 | #include "GSparseNumeric.hpp" |
| 16 | 16 | |
| 17 | -/* __ Namespaces _________________________________________________________ */ | |
| 18 | -using namespace std; | |
| 19 | - | |
| 20 | 17 | /* __ Macros _____________________________________________________________ */ |
| 21 | 18 | #define CS_FLIP(i) (-(i)-2) |
| 22 | 19 | #define CS_MARK(w,j) { w [j] = CS_FLIP (w [j]) ; } |
| ... | ... | @@ -366,35 +363,35 @@ int GSparseNumeric::cs_ereach(const GSparseMatrix* A, int k, |
| 366 | 363 | /*************************************************************************** |
| 367 | 364 | * Output operator * |
| 368 | 365 | ***************************************************************************/ |
| 369 | -ostream& operator<< (ostream& os, const GSparseNumeric& n) | |
| 366 | +std::ostream& operator<< (std::ostream& os, const GSparseNumeric& n) | |
| 370 | 367 | { |
| 371 | 368 | // Put header is stream |
| 372 | 369 | os << "=== GSparseNumeric ==="; |
| 373 | 370 | |
| 374 | 371 | // Show L or V matrix |
| 375 | 372 | if (n.m_L != NULL) { |
| 376 | - os << endl << | |
| 373 | + os << std::endl << | |
| 377 | 374 | " === L or V "; |
| 378 | - os << *n.m_L << endl; | |
| 375 | + os << *n.m_L << std::endl; | |
| 379 | 376 | } |
| 380 | 377 | |
| 381 | 378 | // Show U or R matrix |
| 382 | 379 | if (n.m_U != NULL) { |
| 383 | - os << endl << | |
| 380 | + os << std::endl << | |
| 384 | 381 | " === U or R matrix "; |
| 385 | - os << *n.m_U << endl; | |
| 382 | + os << *n.m_U << std::endl; | |
| 386 | 383 | } |
| 387 | 384 | |
| 388 | 385 | // Show inverse permutation if it exists |
| 389 | 386 | if (n.m_pinv != NULL) { |
| 390 | - os << endl << " Inverse permutation (of " << n.m_n_pinv << " elements)" << endl; | |
| 387 | + os << std::endl << " Inverse permutation (of " << n.m_n_pinv << " elements)" << std::endl; | |
| 391 | 388 | for (int i = 0; i < n.m_n_pinv; ++i) |
| 392 | 389 | os << " " << n.m_pinv[i]; |
| 393 | 390 | } |
| 394 | 391 | |
| 395 | 392 | // Show beta array if it exists |
| 396 | 393 | if (n.m_B != NULL) { |
| 397 | - os << endl << " Beta[0.." << n.m_n_B << "]" << endl; | |
| 394 | + os << std::endl << " Beta[0.." << n.m_n_B << "]" << std::endl; | |
| 398 | 395 | for (int i = 0; i < n.m_n_B; ++i) |
| 399 | 396 | os << " " << n.m_B[i]; |
| 400 | 397 | } | ... | ... |
src/linalg/GSparseNumeric.hpp
| ... | ... | @@ -21,9 +21,6 @@ |
| 21 | 21 | #include "GSparseMatrix.hpp" |
| 22 | 22 | #include "GSparseSymbolic.hpp" |
| 23 | 23 | |
| 24 | -/* __ Namespaces _________________________________________________________ */ | |
| 25 | -using namespace std; | |
| 26 | - | |
| 27 | 24 | /* __ Definitions ________________________________________________________ */ |
| 28 | 25 | |
| 29 | 26 | /* __ Enumerators ________________________________________________________ */ |
| ... | ... | @@ -41,7 +38,7 @@ class GSparseNumeric { |
| 41 | 38 | friend class GSparseMatrix; |
| 42 | 39 | |
| 43 | 40 | // I/O friends |
| 44 | - friend ostream& operator<< (ostream& os, const GSparseNumeric& n); | |
| 41 | + friend std::ostream& operator<< (std::ostream& os, const GSparseNumeric& n); | |
| 45 | 42 | |
| 46 | 43 | public: |
| 47 | 44 | // Constructors and destructors | ... | ... |
src/linalg/GSparseSymbolic.cpp
| ... | ... | @@ -14,9 +14,6 @@ |
| 14 | 14 | /* __ Includes ___________________________________________________________ */ |
| 15 | 15 | #include "GSparseSymbolic.hpp" |
| 16 | 16 | |
| 17 | -/* __ Namespaces _________________________________________________________ */ | |
| 18 | -using namespace std; | |
| 19 | - | |
| 20 | 17 | /* __ Macros _____________________________________________________________ */ |
| 21 | 18 | #define CS_MIN(a,b) (((a) < (b)) ? (a) : (b)) |
| 22 | 19 | #define CS_MAX(a,b) (((a) > (b)) ? (a) : (b)) |
| ... | ... | @@ -1479,47 +1476,47 @@ int GSparseSymbolic::cs_wclear(int mark, int lemax, int* w, int n) |
| 1479 | 1476 | /*************************************************************************** |
| 1480 | 1477 | * Output operator * |
| 1481 | 1478 | ***************************************************************************/ |
| 1482 | -ostream& operator<< (ostream& os, const GSparseSymbolic& s) | |
| 1479 | +std::ostream& operator<< (std::ostream& os, const GSparseSymbolic& s) | |
| 1483 | 1480 | { |
| 1484 | 1481 | // Put header is stream |
| 1485 | 1482 | os << "=== GSparseSymbolic ==="; |
| 1486 | 1483 | |
| 1487 | 1484 | // Show inverse permutation if it exists |
| 1488 | 1485 | if (s.m_pinv != NULL) { |
| 1489 | - os << endl << " Inverse permutation (of " << s.m_n_pinv << " elements)" << | |
| 1490 | - endl; | |
| 1486 | + os << std::endl << " Inverse permutation (of " << s.m_n_pinv << " elements)" << | |
| 1487 | + std::endl; | |
| 1491 | 1488 | for (int i = 0; i < s.m_n_pinv; ++i) |
| 1492 | 1489 | os << " " << s.m_pinv[i]; |
| 1493 | 1490 | } |
| 1494 | 1491 | |
| 1495 | 1492 | // Show fill reducing column permutation if it exists |
| 1496 | 1493 | if (s.m_q != NULL) { |
| 1497 | - os << endl << " Fill reducing column permutation (" << s.m_n_cp << | |
| 1498 | - " elements)" << endl; | |
| 1494 | + os << std::endl << " Fill reducing column permutation (" << s.m_n_cp << | |
| 1495 | + " elements)" << std::endl; | |
| 1499 | 1496 | for (int i = 0; i < s.m_n_cp; ++i) |
| 1500 | 1497 | os << " " << s.m_q[i]; |
| 1501 | 1498 | } |
| 1502 | 1499 | |
| 1503 | 1500 | // Show elimination tree for Cholesky and QR if it exists |
| 1504 | 1501 | if (s.m_parent != NULL) { |
| 1505 | - os << endl << " Elimination tree (" << s.m_n_parent << " elements)" << | |
| 1506 | - endl; | |
| 1502 | + os << std::endl << " Elimination tree (" << s.m_n_parent << " elements)" << | |
| 1503 | + std::endl; | |
| 1507 | 1504 | for (int i = 0; i < s.m_n_parent; ++i) |
| 1508 | 1505 | os << " " << s.m_parent[i]; |
| 1509 | 1506 | } |
| 1510 | 1507 | |
| 1511 | 1508 | // Show column pointers for Cholesky row counts for QR if it exists |
| 1512 | 1509 | if (s.m_cp != NULL) { |
| 1513 | - os << endl << " Cholesky column pointers/QR row counts (" << s.m_n_cp << | |
| 1514 | - " elements)" << endl; | |
| 1510 | + os << std::endl << " Cholesky column pointers/QR row counts (" << s.m_n_cp << | |
| 1511 | + " elements)" << std::endl; | |
| 1515 | 1512 | for (int i = 0; i < s.m_n_cp; ++i) |
| 1516 | 1513 | os << " " << s.m_cp[i]; |
| 1517 | 1514 | } |
| 1518 | 1515 | |
| 1519 | 1516 | // Show leftmost[i] = min(find(A(i,:))) if it exists |
| 1520 | 1517 | if (s.m_leftmost != NULL) { |
| 1521 | - os << endl << " leftmost[i] = min(find(A(i,:))) (" << s.m_n_leftmost << | |
| 1522 | - " elements)" << endl; | |
| 1518 | + os << std::endl << " leftmost[i] = min(find(A(i,:))) (" << s.m_n_leftmost << | |
| 1519 | + " elements)" << std::endl; | |
| 1523 | 1520 | for (int i = 0; i < s.m_n_leftmost; ++i) |
| 1524 | 1521 | os << " " << s.m_leftmost[i]; |
| 1525 | 1522 | } | ... | ... |
src/linalg/GSparseSymbolic.hpp
| ... | ... | @@ -20,9 +20,6 @@ |
| 20 | 20 | #include "GMatrix.hpp" |
| 21 | 21 | #include "GSparseMatrix.hpp" |
| 22 | 22 | |
| 23 | -/* __ Namespaces _________________________________________________________ */ | |
| 24 | -using namespace std; | |
| 25 | - | |
| 26 | 23 | /* __ Definitions ________________________________________________________ */ |
| 27 | 24 | |
| 28 | 25 | /* __ Enumerators ________________________________________________________ */ |
| ... | ... | @@ -43,7 +40,7 @@ class GSparseSymbolic { |
| 43 | 40 | // Binary operator friends |
| 44 | 41 | |
| 45 | 42 | // I/O friends |
| 46 | - friend ostream& operator<< (ostream& os, const GSparseSymbolic& s); | |
| 43 | + friend std::ostream& operator<< (std::ostream& os, const GSparseSymbolic& s); | |
| 47 | 44 | |
| 48 | 45 | // Friend functions |
| 49 | 46 | ... | ... |
src/linalg/GSymMatrix.cpp
| ... | ... | @@ -18,9 +18,6 @@ |
| 18 | 18 | #include "GSymMatrix.hpp" |
| 19 | 19 | #include "GSparseMatrix.hpp" |
| 20 | 20 | |
| 21 | -/* __ Namespaces _________________________________________________________ */ | |
| 22 | -using namespace std; | |
| 23 | - | |
| 24 | 21 | /* __ Method name definitions ____________________________________________ */ |
| 25 | 22 | #define G_CAST_MATRIX "GSymMatrix::GSymMatrix(const GMatrix&)" |
| 26 | 23 | #define G_CAST_SPARSEMATRIX "GSymMatrix::GSymMatrix(const GSparseMatrix&)" |
| ... | ... | @@ -917,22 +914,22 @@ void GSymMatrix::set_inx(void) |
| 917 | 914 | * Output operator * |
| 918 | 915 | * ----------------------------------------------------------------------- * |
| 919 | 916 | ***************************************************************************/ |
| 920 | -ostream& operator<< (ostream& os, const GSymMatrix& m) | |
| 917 | +std::ostream& operator<< (std::ostream& os, const GSymMatrix& m) | |
| 921 | 918 | { |
| 922 | 919 | // Put header in stream |
| 923 | - os << "=== GSymMatrix ===" << endl; | |
| 920 | + os << "=== GSymMatrix ===" << std::endl; | |
| 924 | 921 | if (m.m_rowsel != NULL) |
| 925 | 922 | os << " Number of rows ............: " << m.m_rows << " (compressed " << |
| 926 | - m.m_num_rowsel << ")" << endl; | |
| 923 | + m.m_num_rowsel << ")" << std::endl; | |
| 927 | 924 | else |
| 928 | - os << " Number of rows ............: " << m.m_rows << endl; | |
| 925 | + os << " Number of rows ............: " << m.m_rows << std::endl; | |
| 929 | 926 | if (m.m_colsel != NULL) |
| 930 | 927 | os << " Number of columns .........: " << m.m_cols << " (compressed " << |
| 931 | - m.m_num_colsel << ")" << endl; | |
| 928 | + m.m_num_colsel << ")" << std::endl; | |
| 932 | 929 | else |
| 933 | - os << " Number of columns .........: " << m.m_cols << endl; | |
| 934 | - os << " Number of elements ........: " << m.m_elements << endl; | |
| 935 | - os << " Number of allocated cells .: " << m.m_alloc << endl; | |
| 930 | + os << " Number of columns .........: " << m.m_cols << std::endl; | |
| 931 | + os << " Number of elements ........: " << m.m_elements << std::endl; | |
| 932 | + os << " Number of allocated cells .: " << m.m_alloc << std::endl; | |
| 936 | 933 | |
| 937 | 934 | // Dump elements and compression schemes |
| 938 | 935 | m.dump_elements(os); | ... | ... |
src/linalg/GVector.cpp
| ... | ... | @@ -14,9 +14,6 @@ |
| 14 | 14 | /* __ Includes ___________________________________________________________ */ |
| 15 | 15 | #include "GVector.hpp" |
| 16 | 16 | |
| 17 | -/* __ Namespaces _________________________________________________________ */ | |
| 18 | -using namespace std; | |
| 19 | - | |
| 20 | 17 | |
| 21 | 18 | /*========================================================================== |
| 22 | 19 | = = |
| ... | ... | @@ -154,7 +151,7 @@ int GVector::non_zeros() const |
| 154 | 151 | /*************************************************************************** |
| 155 | 152 | * GVector output operator * |
| 156 | 153 | ***************************************************************************/ |
| 157 | -ostream& operator<< (ostream& os, const GVector& v) | |
| 154 | +std::ostream& operator<< (std::ostream& os, const GVector& v) | |
| 158 | 155 | { |
| 159 | 156 | for (int i = 0; i < v.m_num; ++i) { |
| 160 | 157 | os << v(i); | ... | ... |
src/obs/GData.cpp
| ... | ... | @@ -21,8 +21,6 @@ |
| 21 | 21 | #include "GException.hpp" |
| 22 | 22 | #include "GData.hpp" |
| 23 | 23 | |
| 24 | -/* __ Namespaces _________________________________________________________ */ | |
| 25 | - | |
| 26 | 24 | /* __ Method name definitions ____________________________________________ */ |
| 27 | 25 | |
| 28 | 26 | /* __ Macros _____________________________________________________________ */ | ... | ... |
src/obs/GGti.cpp
| ... | ... | @@ -22,8 +22,6 @@ |
| 22 | 22 | #include "GException.hpp" |
| 23 | 23 | #include "GGti.hpp" |
| 24 | 24 | |
| 25 | -/* __ Namespaces _________________________________________________________ */ | |
| 26 | - | |
| 27 | 25 | /* __ Method name definitions ____________________________________________ */ |
| 28 | 26 | #define G_COPY_MEMBERS "GGti::copy_members(const GGti&)" |
| 29 | 27 | ... | ... |
src/obs/GObservation.cpp
| ... | ... | @@ -22,8 +22,6 @@ |
| 22 | 22 | #include "GException.hpp" |
| 23 | 23 | #include "GObservation.hpp" |
| 24 | 24 | |
| 25 | -/* __ Namespaces _________________________________________________________ */ | |
| 26 | - | |
| 27 | 25 | /* __ Method name definitions ____________________________________________ */ |
| 28 | 26 | |
| 29 | 27 | /* __ Macros _____________________________________________________________ */ | ... | ... |
src/obs/GResponse.cpp
| ... | ... | @@ -17,8 +17,6 @@ |
| 17 | 17 | #include "GResponse.hpp" |
| 18 | 18 | #include <iostream> // cout, cerr |
| 19 | 19 | |
| 20 | -/* __ Namespaces _________________________________________________________ */ | |
| 21 | - | |
| 22 | 20 | /* __ Method name definitions ____________________________________________ */ |
| 23 | 21 | |
| 24 | 22 | /* __ Macros _____________________________________________________________ */ | ... | ... |