class Generator::PseudoPrime

Overview

An abstract class for enumerating pseudo-prime numbers.

Concrete subclasses should override succ, next, rewind.

Included Modules

Direct Known Subclasses

Defined in:

generators/pseudo_prime.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(ubound : Int32 | Nil = nil) #

[View source]

Instance Method Detail

def each #

[View source]
def each(&) #
Description copied from module Enumerable(Int32)

Must yield this collection's elements to the block.


[View source]
def next #

[View source]
def rewind #

[View source]
def size #
Description copied from module Enumerable(Int32)

Returns the number of elements in the collection.

[1, 2, 3, 4].size # => 4

[View source]
def succ #

[View source]
def upper_bound : Int32? #

[View source]
def upper_bound=(ubound : Int32 | Nil) #

[View source]
def with_index(offset = 0) #

see +Enumerator+#with_index.


[View source]
def with_index(offset = 0, &) #

see +Enumerator+#with_index.


[View source]
def with_object(obj) #

see +Enumerator+#with_object.


[View source]
def with_object(obj, &) #

see +Enumerator+#with_object.


[View source]