projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r310: plotfile updates
[ctsim.git]
/
libctsupport
/
plotfile.cpp
diff --git
a/libctsupport/plotfile.cpp
b/libctsupport/plotfile.cpp
index 5a160cdbe4bbf31a1f18291b1f887e0962bc8c81..b9e8ac641b5a80a3b5e905600634bf4f41605473 100644
(file)
--- a/
libctsupport/plotfile.cpp
+++ b/
libctsupport/plotfile.cpp
@@
-9,7
+9,7
@@
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: plotfile.cpp,v 1.
3 2000/12/20 20:08:4
8 kevin Exp $
+** $Id: plotfile.cpp,v 1.
4 2000/12/21 03:40:5
8 kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
@@
-153,15
+153,17
@@
PlotFile::statistics (int iStartingCol, double& min, double& max, double& mean,
\r
int iOffset = iStartingCol * m_iNumRecords;
\r
int iNPoints = (m_iNumColumns - iStartingCol) * m_iNumRecords;
\r
\r
int iOffset = iStartingCol * m_iNumRecords;
\r
int iNPoints = (m_iNumColumns - iStartingCol) * m_iNumRecords;
\r
- std::vector<double> vec (iNPoints);
\r
+ std::vector<double> vec;
\r
+ vec.resize (iNPoints);
\r
\r
\r
+ int iVec = 0;
\r
for (int iCol = iStartingCol; iCol < m_iNumColumns; iCol++) {
\r
int iOffset = iCol * m_iNumRecords;
\r
for (int iRec = 0; iRec < m_iNumRecords; iRec++)
\r
for (int iCol = iStartingCol; iCol < m_iNumColumns; iCol++) {
\r
int iOffset = iCol * m_iNumRecords;
\r
for (int iRec = 0; iRec < m_iNumRecords; iRec++)
\r
- vec
.push_back( m_vecCurves[ iRec + iOffset ] )
;
\r
+ vec
[iVec++] = m_vecCurves[ iRec + iOffset ]
;
\r
}
\r
\r
}
\r
\r
- vectorNumericStatistics (vec, min, max, mean, mode, median, stddev);
\r
+ vectorNumericStatistics (vec,
iNPoints,
min, max, mean, mode, median, stddev);
\r
\r
return true;
\r
}
\r
\r
return true;
\r
}
\r