zawatins-library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub zawa-tin/zawatins-library

:heavy_check_mark: xorMonoid (排他的論理和モノイド)
(src/utility/monoid/xorMonoid.hpp)

概要

xor演算のモノイドを表現した構造体です。

機能

zawa::xorMonoid<T>

メンバ

using valueType = T

static constexpr valueType identity

static valueType operation(const valueType& a, const valueType& b)

Verified with

Code

#pragma once

namespace zawa {

template <class T>
struct xorMonoid {
	using valueType = T;
	static constexpr valueType identity{};
	static valueType operation(const valueType& a, const valueType& b) {
		return (a ^ b);
	}
};

} // namespace zawa
#line 2 "src/utility/monoid/xorMonoid.hpp"

namespace zawa {

template <class T>
struct xorMonoid {
	using valueType = T;
	static constexpr valueType identity{};
	static valueType operation(const valueType& a, const valueType& b) {
		return (a ^ b);
	}
};

} // namespace zawa
Back to top page