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 5264 def initialize(ifunc,jfunc,cofac=nil) 5265 #puts "ifunc = " + ifunc.to_s + ","; 5266 #puts "jfunc = " + jfunc.to_s + ","; 5267 #puts "cofac = " + cofac.to_s + ","; 5268 super(); 5269 if jfunc == nil && cofac == nil 5270 raise "invalid arguments" 5271 end 5272 @coFac = cofac; 5273 @ifunc = ifunc; 5274 @jfunc = jfunc; 5275 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 5283 def generate(i) 5284 if @jfunc == nil 5285 return @coFac.fromInteger( @ifunc.call(i) ); 5286 else 5287 return @jfunc.call(i); 5288 end 5289 end