class PythagoreanTriples

Included Modules

Defined in:

math/pythagorean_triples.cr

Constructors

Instance Method Summary

Instance methods inherited from module Enumerable({Int32, Int32, Int32})

accumulate(init : U) : Array(U) forall U
accumulate : Array({Int32, Int32, Int32})
accumulate(init : U, &block : U, {Int32, Int32, Int32} -> U) : Array(U) forall U
accumulate(&block : {Int32, Int32, Int32}, {Int32, Int32, Int32} -> {Int32, Int32, Int32}) : Array({Int32, Int32, Int32})
accumulate
, mex : {Int32, Int32, Int32} mex, mex_sorted : {Int32, Int32, Int32} mex_sorted, tally(*, default : Int32) : Hash({Int32, Int32, Int32}, Int32) tally, unique : self
unique(&) : self
unique

Constructor Detail

def self.new(limit : Int32) #

[View source]

Instance Method Detail

def each(&) #

Enumerates all primitive Pythagorean triples not more than #limit.


[View source]
def each #

Returns an Iterator for all primitive Pythagorean triples not more than #limit.


[View source]
def limit : Int32 #

[View source]