class JAS::SeriesRing::Ucoeff
(Inner) class which extends edu.jas.ps.Coefficients
Public Class Methods
new(ifunc,jfunc,cofac=nil)
click to toggle source
Constructor.
ifunc(int i) must return a value which is used in ((RingFactory)cofac).fromInteger(). jfunc(int i) must return a value of type ring.coFac.
Calls superclass method
# File examples/jas.rb, line 4970 def initialize(ifunc,jfunc,cofac=nil) #puts "ifunc = " + ifunc.to_s + ","; #puts "jfunc = " + jfunc.to_s + ","; #puts "cofac = " + cofac.to_s + ","; super(); if jfunc == nil && cofac == nil raise "invalid arguments" end @coFac = cofac; @ifunc = ifunc; @jfunc = jfunc; end
Public Instance Methods
generate(i)
click to toggle source
Generator for a coefficient.
long i parameter. returns a value of type ring.coFac.
# File examples/jas.rb, line 4989 def generate(i) if @jfunc == nil return @coFac.fromInteger( @ifunc.call(i) ); else return @jfunc.call(i); end end