1#ifndef CHIHAYA_BINARY_COMPARISON_HPP
2#define CHIHAYA_BINARY_COMPARISON_HPP
5#include "ritsuko/hdf5/hdf5.hpp"
6#include "ritsuko/ritsuko.hpp"
12#include "utils_misc.hpp"
13#include "utils_comparison.hpp"
14#include "utils_unary.hpp"
27namespace binary_comparison {
38 auto left_details = internal_misc::load_seed_details(handle,
"left", version, options);
39 auto right_details = internal_misc::load_seed_details(handle,
"right", version, options);
42 if (!internal_misc::are_dimensions_equal(left_details.dimensions, right_details.dimensions)) {
43 throw std::runtime_error(
"'left' and 'right' should have the same dimensions");
46 if ((left_details.type == STRING) != (right_details.type == STRING)) {
47 throw std::runtime_error(
"both or neither of 'left' and 'right' should contain strings");
51 auto method = internal_unary::load_method(handle);
53 if (!internal_comparison::is_valid_operation(method)) {
54 throw std::runtime_error(
"unrecognized 'method' (" + method +
")");
58 left_details.type = BOOLEAN;
ArrayDetails validate(const H5::Group &handle, const ritsuko::Version &version, Options &options)
Definition: binary_comparison.hpp:37
Namespace for all chihaya functions.
Definition: binary_arithmetic.hpp:22
Details about an array.
Definition: utils_public.hpp:36
Validation options.
Definition: utils_public.hpp:66
bool details_only
Definition: utils_public.hpp:71
Various public utilities.