kyopro-lib

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

View on GitHub

:question: Sum group
(Mylib/AlgebraicStructure/Group/sum.cpp)

Operations

Requirements

Notes

Problems

References

Verified with

Code

#pragma once

namespace haar_lib {
  template <typename T>
  struct sum_group {
    using value_type = T;

    value_type operator()() const { return 0; }
    value_type operator()(const value_type &a, const value_type &b) const { return a + b; }
    value_type inv(const value_type &a) const { return -a; }
  };
}  // namespace haar_lib
#line 2 "Mylib/AlgebraicStructure/Group/sum.cpp"

namespace haar_lib {
  template <typename T>
  struct sum_group {
    using value_type = T;

    value_type operator()() const { return 0; }
    value_type operator()(const value_type &a, const value_type &b) const { return a + b; }
    value_type inv(const value_type &a) const { return -a; }
  };
}  // namespace haar_lib
Back to top page