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 5240 def initialize(ifunc,jfunc,cofac=nil) 5241 #puts "ifunc = " + ifunc.to_s + ","; 5242 #puts "jfunc = " + jfunc.to_s + ","; 5243 #puts "cofac = " + cofac.to_s + ","; 5244 super(); 5245 if jfunc == nil && cofac == nil 5246 raise "invalid arguments" 5247 end 5248 @coFac = cofac; 5249 @ifunc = ifunc; 5250 @jfunc = jfunc; 5251 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 5259 def generate(i) 5260 if @jfunc == nil 5261 return @coFac.fromInteger( @ifunc.call(i) ); 5262 else 5263 return @jfunc.call(i); 5264 end 5265 end