class JAS::Coeff
(Was inner) class which extends edu.jas.ps.Coefficients
Public Class Methods
new(cof,&f)
click to toggle source
Constructor.
cof RingFactory for coefficients. f(int i) must return a value of type cof.
Calls superclass method
# File examples/jas.rb, line 5329 def initialize(cof,&f) super() # this is important in jruby 1.5.6! #puts "cof type(#{cof}) = #{cof.class}\n"; @coFac = cof; #puts "f type(#{f}) = #{f.class}\n"; @func = f end
Public Instance Methods
generate(i)
click to toggle source
Generator for a coefficient.
long i parameter. returns a value of type cof.
# File examples/jas.rb, line 5343 def generate(i) #puts "f_3 type(#{@func}) = #{@func.class}\n"; #puts "f_3 type(#{i}) = #{i.class}\n"; #return @coFac.getZERO() c = @func.call(i) #puts "f_3 type(#{c}) = #{c.class}\n"; if c.is_a? RingElem c = c.elem end return c end