40 #ifndef MSQ_QUALITYASSESSOR_HPP
41 #define MSQ_QUALITYASSESSOR_HPP
48 #ifdef MSQ_USE_OLD_STD_HEADERS
56 #ifdef MSQ_USE_OLD_IO_HEADERS
122 msq_std::string name =
"QualityAssessor" );
126 msq_stdio::ostream& output_stream,
128 msq_std::string name =
"QualityAssessor" );
134 msq_std::string name =
"QualityAssessor" );
223 double& upper_bound_out,
224 msq_std::vector<int>& counts_out,
320 #endif // QualityAssessor_hpp
msq_std::vector< int > histogram
void reset_data()
Reset calculated data.
msq_stdio::ostream & outputStream
Stream to which to write summary of metric data.
Used to hold the error state and return it to the application.
static msq_std::string get_QAFunction_name(enum QualityAssessor::QAFunction)
Base class for concrete quality metrics.
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
QualityMetric * get_metric() const
Get the QualityMetric.
int get_invalid_element_count() const
virtual AlgorithmType get_algorithm_type()
Return the algorithm type (to avoid RTTI use).
~QualityAssessor()
Destructor.
void print_histogram(msq_stdio::ostream &) const
Print the histogram.
This should be the parent class of all algorithms retrieving information from a MeshSet object...
void print_summary(msq_stdio::ostream &stream) const
Print accumulated summary data to specified stream.
double get_stddev() const
Per-metric QualityAssessor data.
const msq_std::list< Assessor > & get_all_results() const
Get list of all summary data.
Assessor(QualityMetric *metric)
virtual double loop_over_mesh(MeshSet &ms, MsqError &err)
Does one sweep over the mesh and assess the quality with the metrics previously added.
A QualityAssessor instance can be inserted into an InstructionQueue to calculate and summarize regist...
void add_quality_assessment(QualityMetric *qm, int function_flags, MsqError &err)
Adds a quality metric and a wrapper function (min, max, ...).
double get_minimum() const
msq_std::list< Assessor >::iterator find_or_add(QualityMetric *qm)
Find an Assessor corresponding to the passed QualityMetric, or create it if is not found in the list...
void set_name(msq_std::string name)
Provides a name to the QualityAssessor (use it for default name in constructor).
msq_std::string qualityAssessorName
Name.
msq_std::list< Assessor >::iterator stoppingMetric
Metric in assessList to use as return value for loop_over_mesh.
QualityMetric *const qualMetric
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
virtual msq_std::string get_name()
Retrieves the QualityAssessor name. A default name should be set in the constructor.
bool haveHistRange
The histogram counts, where the first and last values are counts of values below the lower bound and ...
void get_histogram(double &lower_bound_out, double &upper_bound_out, msq_std::vector< int > &counts_out, MsqError &err) const
Get historgram of data, if calculated.
msq_std::list< Assessor > assessList
List of quality metrics and corresponding data.
void add_histogram_assessment(QualityMetric *qm, double min, double max, int intervals, MsqError &err)
Add a quality metric for which the histogram is to be calculated, and set histogram parameters...
void add_hist_value(double metric_value)
Add a value to the hisogram data.
QAFunction stoppingFunction
Value to use as return value for loop_over_mesh.
void set_stopping_assessment(QualityMetric *qm, QAFunction func, MsqError &err)
void add_value(double metric_value)
Add a value to the running counts.
bool printSummary
Disable printing.
QualityAssessor(msq_std::string name="QualityAssessor")
Constructor - output to std::cout.
void reset_data()
Reset all calculated data.
double get_maximum() const
double get_average() const
void disable_printing_results()
Do not print results of assessment.
The MeshSet class stores one or more Mesquite::Mesh pointers and manages access to the mesh informati...
void calculate_histogram_range()
If range of histogram has not yet been determined, calculate it from the min/max values.
const Assessor * get_results(QualityMetric *metric) const
Request summary data for a specific QualityMetric This method allows the application to request the s...
bool invalid_elements() const
True if any metric evaluated to an invalid value for any element.
void add_invalid_value()
Note invalid result.