class Object
Constants
- A
- AEF
- AFF
- B
- C
- CRT
- D
- F
- F5
- Foo
- Fx
- Fxy
Polynimial is a commutative multi-variable ring
- Fy
- G
include
Algebra
- H
> y^7 + (7x + 7)y^6 + 8xy^5 + 4y^4 + (4x + 4)y^3 + 5xy^2 + 7y + x + 1¶ ↑
- K
A
= Polynomial.create(Rational
, “x”) x = A.varB
= Polynomial.create(A
, “y”) y = B.varC
= Polynomial.create(B
, “z”) z = C.varD
= Polynomial.create(C
, “w”) w = D.var p( (x+y+z+w)**4 )- M
- M3
- M33
include
Algebra
- M34
- M43
m = m0 * m2
- M44
- MP
Algebra::MPolynomial.instance_eval do
p AUTO_LOAD
end P.instance_eval do
p ['try convert_to', self, AUTO_LOAD]
end
- P
- P0
- PF
- PQ
- PS
- PZ
- Px
- Pxy
- Py
- Pyx
- Q
- QRx
- QRxy
- QSx
- QZ13x
- R
- Rx
- S
- S3
- Z13
- Z13x
- Z7
- Zp
Public Instance Methods
auto_req(*a, &b)
click to toggle source
# File lib/algebra/auto-require.rb, line 71 def auto_req(*a, &b) Object.auto_req(*a, &b) end
auto_req_init()
click to toggle source
# File lib/algebra/auto-require.rb, line 67 def auto_req_init Object.auto_req_init end
gb(f, sw = false)
click to toggle source
include Algebra
# File lib/algebra/groebner-basis.rb, line 162 def gb(f, sw = false) f0 = f.first print "Basis of: " sw ? puts('', *f) : puts(f.join(", ")) gbase = Algebra::Groebner.reduced_basis(f) print "Is: " sw ? puts('', *gbase) : puts(gbase.join(", ")) puts end
gbc(f)
click to toggle source
include Algebra
# File lib/algebra/groebner-basis-coeff.rb, line 182 def gbc(f) f0 = f.first print 'Basis of: ' puts(f.join(', ')) c, g = Algebra::Groebner.basis_coeff(f) print 'is: ' puts(g.join(', ')) puts 'Coeefitients are: ' c.each do |x| puts x.join(', ') end p 3333 p g p c.collect { |x| f.inner_product x } if g == c.collect { |x| f.inner_product x } puts 'Success!' else puts 'Fail.' end puts end
p!(x)
click to toggle source
# File lib/algebra/sets-system.rb, line 41 def p!(x); puts x.inspect!; end
test(f)
click to toggle source
# File lib/algebra/m-polynomial-factor-int.rb, line 152 def test(f) print "#{f}\n => \n" a = f.factorize_int sw = (f == a.pi) puts "#{a.inspect}, #{sw}" raise unless sw end