Class: Math::Expr::ArithmeticSequence

Inherits:
Sequence show all
Defined in:
lib/ruuuby/math/expr/seq/arithmetic.rb

Overview

“the difference between one term and the next is a constant”

Instance Attribute Summary

Attributes inherited from Sequence

#input_type

Instance Method Summary collapse

Methods inherited from Sequence

#A∀ₓ, #[], #calc_val_at, #populate_cache, #∀ₓ, #∀ₓᵢ, #∋?

Constructor Details

#initialize(max_cache_index, input_type) ⇒ ArithmeticSequence

TODO: add gauss formula here (work w/ any arithmetic series, not just 2, 3…n)



12
13
14
# File 'lib/ruuuby/math/expr/seq/arithmetic.rb', line 12

def initialize(max_cache_index, input_type)
  super(max_cache_index, input_type)
end