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 5076 def initialize(ifunc,jfunc,cofac=nil) 5077 #puts "ifunc = " + ifunc.to_s + ","; 5078 #puts "jfunc = " + jfunc.to_s + ","; 5079 #puts "cofac = " + cofac.to_s + ","; 5080 super(); 5081 if jfunc == nil && cofac == nil 5082 raise "invalid arguments" 5083 end 5084 @coFac = cofac; 5085 @ifunc = ifunc; 5086 @jfunc = jfunc; 5087 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 5095 def generate(i) 5096 if @jfunc == nil 5097 return @coFac.fromInteger( @ifunc.call(i) ); 5098 else 5099 return @jfunc.call(i); 5100 end 5101 end