Go to the documentation of this file.
44 #ifndef GNSSTK_MOST_COMMON_VALUE_INCLUDE
45 #define GNSSTK_MOST_COMMON_VALUE_INCLUDE
66 #define DEFAULT_TOL 0.00095 // less than a millisecond
84 inline void add(
double dt)
86 for (
int j = 0; j <
N; j++)
129 for (i = 1; i <
counts.size(); i++)
145 for (i = 1; i <
counts.size(); i++)
161 std::vector<double>& out_values)
168 void dump(std::ostream& os,
int prec = 3)
170 os <<
" MostCommonValue::dump(); tolerance is " << std::fixed
171 << std::setprecision(prec) <<
tol << std::endl;
172 os <<
" Table of counts and values from class MostCommonValue:\n";
179 for (
int j = 0; j <
counts.size(); j++)
180 os <<
" " << std::setw(3) <<
counts[j] <<
" " << std::fixed
181 << std::setprecision(prec) <<
values[j] << std::endl;
188 #endif // GNSSTK_MOST_COMMON_VALUE_INCLUDE
std::vector< double > values
value being considered - parallel to counts
void dump(std::ostream &os, int prec=3)
dump the table of values and counts
MostCommonValue(int i=DEFAULT_DIM)
void setTol(double t)
set the tolerance used in comparing timesteps
void getResults(std::vector< int > &out_counts, std::vector< double > &out_values)
get the table of all the values and the number of times seen
int N
number of different values to be considered
std::vector< int > counts
number of times this value has been seen
int bestN()
return count for best estimate
double tol
tolerance in comparing input to values[]
void add(double dt)
add a measured timestep to the analysis
void reset(int i=DEFAULT_DIM)
reset
double getTol()
access the tolerance used in comparing timesteps
double bestDT()
return the best estimate of timestep
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:40