class Pascal::Row

Overview

store one row of the pascal triangle

Defined in:

pascal.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(rowNumMax : Int128, nums : Array(BigInt) = [BigInt.new(1)], beginRow : Int128 = 0) #

[View source]

Instance Method Detail

def draw(ctx) #

svg output


[View source]
def drawSize : Float64 #

[View source]
def drawSize=(drawSize : Float64) #

[View source]
def modify(&) #

run a calculation on a row's @nums; the result is stored in @mods


[View source]
def mods : Array(BigInt) #

[View source]
def modulo(m) #

set @mods to be @nums modulo m


[View source]
def next #

compute the next row of the triangle


[View source]
def nums : Array(BigInt) #

[View source]
def output(stream = STDOUT) #

text output


[View source]
def palette : Colors::Palette #

[View source]
def palette=(palette : Colors::Palette) #

[View source]
def rowNumMax : Int128 #

[View source]
def rowNumMax=(rowNumMax : Int128) #

[View source]