37 auto lhandle = group.openGroup(
"left");
38 left_details =
validate(lhandle, version, options);
40 std::throw_with_nested(std::runtime_error(
"failed to validate 'left'"));
45 auto rhandle = group.openGroup(
"right");
46 right_details =
validate(rhandle, version, options);
48 std::throw_with_nested(std::runtime_error(
"failed to validate 'right'"));
53 throw std::runtime_error(
"'left' and 'right' should have the same dimensions");
56 if ((left_details.
type == STRING) != (right_details.
type == STRING)) {
57 throw std::runtime_error(
"both or neither of 'left' and 'right' should contain strings");
61 auto mhandle = group.openDataSet(
"method");
62 auto method = read_scalar_string_dataset(mhandle);
63 if (!is_valid_comparison_operation(method)) {
64 throw std::runtime_error(
"unrecognized operation '" + method +
"'");
67 std::throw_with_nested(std::runtime_error(
"failed to validate 'method'"));
71 left_details.
type = BOOLEAN;
ArrayDetails validate_binary_comparison(const H5::Group &group, const ritsuko::Version &version, const Options &options)
Definition binary_comparison.hpp:34
ArrayDetails validate(const H5::Group &group, const ritsuko::Version &version, const Options &options)
Definition validate.hpp:96