In Files

Parent

Methods

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.

# File examples/jas.rb, line 4713
def initialize(ifunc,jfunc,cofac=nil)
    #puts "ifunc = " + ifunc.to_s + ",";
    #puts "jfunc = " + jfunc.to_s + ",";
    #puts "cofac = " + cofac.to_s + ",";
    super();
    if jfunc == nil && cofac == nil 
      raise "invalid arguments"
    end
    @coFac = cofac;
    @ifunc = ifunc;
    @jfunc = jfunc;
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, line 4732
def generate(i)
    if @jfunc == nil
        return @coFac.fromInteger( @ifunc.call(i) );
    else
        return @jfunc.call(i);
    end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.