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
5402 def initialize(ifunc,jfunc,cofac=nil)
5403     #puts "ifunc = " + ifunc.to_s + ",";
5404     #puts "jfunc = " + jfunc.to_s + ",";
5405     #puts "cofac = " + cofac.to_s + ",";
5406     super();
5407     if jfunc == nil && cofac == nil 
5408       raise "invalid arguments"
5409     end
5410     @coFac = cofac;
5411     @ifunc = ifunc;
5412     @jfunc = jfunc;
5413 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
5421 def generate(i)
5422     if @jfunc == nil
5423         return @coFac.fromInteger( @ifunc.call(i) );
5424     else
5425         return @jfunc.call(i);
5426     end
5427 end