Class JAS::SeriesRing::Ucoeff
In: examples/jas.rb
Parent: Coefficients

(Inner) class which extends edu.jas.ps.Coefficients

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.

Methods

generate   new  

Public Class methods

[Source]

      # File examples/jas.rb, line 3310
3310:             def initialize(ifunc,jfunc,cofac=nil)
3311:                 #puts "ifunc = " + ifunc.to_s + ",";
3312:                 #puts "jfunc = " + jfunc.to_s + ",";
3313:                 #puts "cofac = " + cofac.to_s + ",";
3314:                 super();
3315:                 if jfunc == nil && cofac == nil 
3316:                   raise "invalid arguments"
3317:                 end
3318:                 @coFac = cofac;
3319:                 @ifunc = ifunc;
3320:                 @jfunc = jfunc;
3321:             end

Public Instance methods

[Source]

      # File examples/jas.rb, line 3322
3322:             def generate(i)
3323:                 if @jfunc == nil
3324:                     return @coFac.fromInteger( @ifunc.call(i) );
3325:                 else
3326:                     return @jfunc.call(i);
3327:                 end
3328:             end

[Validate]