Gromacs  2022.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Friends
gmx::AnalysisHistogramSettingsInitializer Class Reference

#include <gromacs/analysisdata/modules/histogram.h>

Description

Provides "named parameter" idiom for constructing histograms.

See Also
histogramFromBins()
histogramFromRange()

Methods in this class do not throw.

Public Member Functions

 AnalysisHistogramSettingsInitializer ()
 Creates an empty initializer. More...
 
AnalysisHistogramSettingsInitializerstart (real min)
 Sets the first bin location. More...
 
AnalysisHistogramSettingsInitializerbinCount (int binCount)
 Sets the number of bins in the histogram. More...
 
AnalysisHistogramSettingsInitializerrange (real min, real max)
 Sets the first and last bin locations. More...
 
AnalysisHistogramSettingsInitializerbinWidth (real binWidth)
 Sets the bin width of the histogram. More...
 
AnalysisHistogramSettingsInitializerintegerBins (bool enabled=true)
 Indicate that first and last bin locations to specify bin centers. More...
 
AnalysisHistogramSettingsInitializerroundRange (bool enabled=true)
 Round first and last bin locations. More...
 
AnalysisHistogramSettingsInitializerincludeAll (bool enabled=true)
 Sets the histogram to match all values. More...
 

Friends

class AnalysisHistogramSettings
 

Constructor & Destructor Documentation

gmx::AnalysisHistogramSettingsInitializer::AnalysisHistogramSettingsInitializer ( )

Creates an empty initializer.

Should not be called directly, but histogramFromRange() or histogramFromBins() should be used instead.

Member Function Documentation

AnalysisHistogramSettingsInitializer& gmx::AnalysisHistogramSettingsInitializer::binCount ( int  binCount)
inline

Sets the number of bins in the histogram.

If only the first bin location is specified, this value is required (and automatically provided if histogramFromBins() is used). If both the first and last bins are specified, either this value or binWidth() is required.

AnalysisHistogramSettingsInitializer& gmx::AnalysisHistogramSettingsInitializer::binWidth ( real  binWidth)
inline

Sets the bin width of the histogram.

If only the first bin location is specified, this value is required (and automatically provided if histogramFromBins() is used). If both the first and last bins are specified, either this value or binCount() is required. If a bin width is provided with both first and last bin locations, and the given bin width does not divide the range exactly, the last bin location is adjusted to match.

AnalysisHistogramSettingsInitializer& gmx::AnalysisHistogramSettingsInitializer::includeAll ( bool  enabled = true)
inline

Sets the histogram to match all values.

If set, the histogram behaves as if the bins at the ends extended to +-infinity.

AnalysisHistogramSettingsInitializer& gmx::AnalysisHistogramSettingsInitializer::integerBins ( bool  enabled = true)
inline

Indicate that first and last bin locations to specify bin centers.

If set, the first and last bin locations are interpreted as bin centers. If not set (the default), the first and last bin locations are interpreted as the edges of the whole histogram.

Cannot be specified together with roundRange().

AnalysisHistogramSettingsInitializer& gmx::AnalysisHistogramSettingsInitializer::range ( real  min,
real  max 
)
inline

Sets the first and last bin locations.

Typically should not be called directly, but through histogramFromRange().

AnalysisHistogramSettingsInitializer& gmx::AnalysisHistogramSettingsInitializer::roundRange ( bool  enabled = true)
inline

Round first and last bin locations.

If set, the resulting histogram will cover the range specified, but the actual bin locations will be rounded such that the edges fall on multiples of the bin width. Only implemented when both first and last bin location and bin width are defined. Cannot be specified together with integerBins() or with binCount().

AnalysisHistogramSettingsInitializer& gmx::AnalysisHistogramSettingsInitializer::start ( real  min)
inline

Sets the first bin location.

Typically should not be called directly, but through histogramFromBins().


The documentation for this class was generated from the following files: