From 7b2a522f9d6cdea1b1b705cb0ca14442fa2df68d Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Sat, 22 Jul 2017 15:25:25 +0900 Subject: [PATCH] add const for Vint::isPrime --- include/mcl/vint.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/mcl/vint.hpp b/include/mcl/vint.hpp index afe6d65..a7d849c 100644 --- a/include/mcl/vint.hpp +++ b/include/mcl/vint.hpp @@ -1454,11 +1454,11 @@ public: return true; } template - bool isPrime(RG& rg, int tryNum = 32) + bool isPrime(RG& rg, int tryNum = 32) const { return isPrime(*this, rg, tryNum); } - bool isPrime(int tryNum = 32) + bool isPrime(int tryNum = 32) const { cybozu::XorShift rg; return isPrime(rg, tryNum); @@ -1536,6 +1536,7 @@ public: VintT operator++(int) { VintT c = *this; add(*this, *this, 1); return c; } VintT operator--(int) { VintT c = *this; sub(*this, *this, 1); return c; } const Unit *getUnit() const { return &buf_[0]; } + size_t getUnitSize() const { return size_; } friend bool operator<(const VintT& x, const VintT& y) { return compare(x, y) < 0; } friend bool operator>=(const VintT& x, const VintT& y) { return !operator<(x, y); } friend bool operator>(const VintT& x, const VintT& y) { return compare(x, y) > 0; }