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 5023 def initialize(ifunc,jfunc,cofac=nil) 5024 #puts "ifunc = " + ifunc.to_s + ","; 5025 #puts "jfunc = " + jfunc.to_s + ","; 5026 #puts "cofac = " + cofac.to_s + ","; 5027 super(); 5028 if jfunc == nil && cofac == nil 5029 raise "invalid arguments" 5030 end 5031 @coFac = cofac; 5032 @ifunc = ifunc; 5033 @jfunc = jfunc; 5034 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 5042 def generate(i) 5043 if @jfunc == nil 5044 return @coFac.fromInteger( @ifunc.call(i) ); 5045 else 5046 return @jfunc.call(i); 5047 end 5048 end