class JAS::ExtPolyRing
Represents a JAS
exterior form / vector / polynomial ring: GenExteriorPolynomialRing.
Provides more convenient constructor. Then returns a Ring
.
Attributes
auto_inject[RW]
inject variables into environment
auto_lowervar[RW]
avoid capital letter variables
Public Class Methods
new(coeff, s, var="E")
click to toggle source
Ring
constructor.
coeff = factory for coefficients, s = size of index list, var = string with one variable name.
Calls superclass method
JAS::ExtRing::new
# File examples/jas.rb 6207 def initialize(coeff, s, var="E") 6208 #puts "ExtPolyRing.new" 6209 if coeff == nil 6210 raise ArgumentError, "No coefficient given." 6211 end 6212 cf = coeff; 6213 if coeff.is_a? RingElem 6214 cf = coeff.elem.factory(); 6215 end 6216 if coeff.is_a? Ring 6217 cf = coeff.ring; 6218 end 6219 if s == nil 6220 raise ArgumentError, "No variable size given." 6221 end 6222 names = var; 6223 if not var.is_a? String 6224 names = GenPolynomialTokenizer.variableList(var); 6225 end 6226 wf = IndexFactory.new(s, names); 6227 @ring = GenExteriorPolynomialRing.new(cf, wf); 6228 super("",@ring) 6229 #puts "ExtPolyRing.new: self.class.auto_inject = " + self.class.auto_inject.to_s 6230 #inject_variables(); 6231 #puts "ExtPolyRing.new: self.class.superclass.auto_inject = " + self.class.superclass.auto_inject.to_s 6232 end
Public Instance Methods
to_s()
click to toggle source
Create a string representation.
# File examples/jas.rb 6237 def to_s() 6238 return @ring.toScript(); 6239 end