12 : m_allowEmpty(allowEmpty), m_allowRange(allowRange) {}
26 return "Enter values for this property";
33 return "When giving a range the second value must be larger than the "
38 if (
value.size() % 2 == 0) {
39 return "The number of bin boundary parameters provided must be odd";
43 for (
size_t i = 1; i <
value.size(); i += 2) {
44 if (
value[i] == 0.0) {
45 return "Cannot have a zero bin width";
50 double previous =
value[0];
51 for (
size_t i = 2; i <
value.size(); i += 2) {
52 if ((
value[i - 1] < 0) && (previous <= 0)) {
53 return "Bin boundaries must be positive for logarithmic binning";
55 if (
value[i] <= previous) {
56 return "Bin boundary values must be given in order of increasing value";
double value
The value of the point.
IValidator_sptr clone() const override
std::string checkValidity(const std::vector< double > &value) const override
Check on the inputed bin boundaries and widths.
RebinParamsValidator(bool allowEmpty=false, bool allowRange=false)
std::shared_ptr< IValidator > IValidator_sptr
A shared_ptr to an IValidator.