Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F19250539
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/Utilities/SmplHist.h b/Utilities/SmplHist.h
--- a/Utilities/SmplHist.h
+++ b/Utilities/SmplHist.h
@@ -1,82 +1,84 @@
/*
* --- patched version!!!, see file 'libg-diffs' ---
*/
// This may look like C code, but it is really -*- C++ -*-
#ifndef SampleHistogram_h
#ifdef __GNUG__
#pragma interface
#endif
#define SampleHistogram_h 1
#include <iostream>
#include <fstream>
+#include <vector>
#include "SmplStat.h"
extern const int SampleHistogramMinimum;
extern const int SampleHistogramMaximum;
+using std::vector;
/** \ingroup Utilities
*
* Copyright (C) 1988 Free Software Foundation
* written by Dirk Grunwald (grunwald@cs.uiuc.edu)
*
* This file is part of the GNU C++ Library. This library is free
* software; you can redistribute it and/or modify it under the terms of
* the GNU Library General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your
* option) any later version. This library is distributed in the hope
* that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Library General Public License for more details.
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
class SampleHistogram : public SampleStatistic {
protected:
short howManyBuckets;
- int *bucketCount;
- double *bucketLimit;
+ vector<int> bucketCount;
+ vector<double> bucketLimit;
public:
SampleHistogram(double low=0., double h=0., double bucketWidth = -1.0);
SampleHistogram(double loVals[], int size);
~SampleHistogram();
void reset();
void operator+=(double);
int similarSamples(double);
int buckets();
double bucketThreshold(int i);
int inBucket(int i);
void printBuckets(std::ostream&);
void printGnuplot(char* name);
void printMoments(char*,double,double,double,double);
};
inline int SampleHistogram:: buckets() { return(howManyBuckets); }
inline double SampleHistogram:: bucketThreshold(int i) {
if (i < 0 || i >= howManyBuckets)
error("invalid bucket access");
return(bucketLimit[i]);
}
inline int SampleHistogram:: inBucket(int i) {
if (i < 0 || i >= howManyBuckets)
error("invalid bucket access");
return(bucketCount[i]);
}
#endif
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Sep 30, 5:42 AM (1 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6566254
Default Alt Text
(2 KB)
Attached To
Mode
rHERWIGHG herwighg
Attached
Detach File
Event Timeline
Log In to Comment