1Math::NumSeq::Modulo(3)User Contributed Perl DocumentatioMnath::NumSeq::Modulo(3)
2
3
4
6 Math::NumSeq::Modulo -- remainders modulo of a given number
7
9 use Math::NumSeq::Modulo;
10 my $seq = Math::NumSeq::Modulo->new (modulus => 123);
11 my ($i, $value) = $seq->next;
12
14 A simple sequence of remainders to a given modulus of a given number,
15 for example modulus 5 gives 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, etc.
16
18 See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence
19 classes.
20
21 "$seq = Math::NumSeq::Modulo->new (modulus => $number)"
22 Create and return a new sequence object.
23
24 Random Access
25 "$value = $seq->ith($i)"
26 Return "$i % $modulus".
27
28 "$bool = $seq->pred($value)"
29 Return true if $value occurs as a remainder, so 0 <= $value <=
30 modulus-1.
31
33 Math::NumSeq, Math::NumSeq::Multiples
34
36 <http://user42.tuxfamily.org/math-numseq/index.html>
37
39 Copyright 2010, 2011, 2012, 2013, 2014, 2016, 2017, 2018, 2019 Kevin
40 Ryde
41
42 Math-NumSeq is free software; you can redistribute it and/or modify it
43 under the terms of the GNU General Public License as published by the
44 Free Software Foundation; either version 3, or (at your option) any
45 later version.
46
47 Math-NumSeq is distributed in the hope that it will be useful, but
48 WITHOUT ANY WARRANTY; without even the implied warranty of
49 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
50 General Public License for more details.
51
52 You should have received a copy of the GNU General Public License along
53 with Math-NumSeq. If not, see <http://www.gnu.org/licenses/>.
54
55
56
57perl v5.32.0 2020-07-28 Math::NumSeq::Modulo(3)