class Algebra::PermutationGroup
Attributes
degree[R]
Public Class Methods
alternate(n)
click to toggle source
# File lib/algebra/permutation-group.rb, line 33 def self.alternate(n) symmetric(n).separate { |x| x.sign > 0 } # slow two times end
new(u, *a)
click to toggle source
Calls superclass method
Algebra::Group::new
# File lib/algebra/permutation-group.rb, line 37 def initialize(u, *a) @degree = u.degree super(u, *a) end
perm(a)
click to toggle source
# File lib/algebra/permutation-group.rb, line 21 def self.perm(a) Permutation.new(a) end
symmetric(n)
click to toggle source
# File lib/algebra/permutation-group.rb, line 25 def self.symmetric(n) s = new(unity(n)) Combinatorial.perm(n) do |x| s << perm(x) # unity is not duplicated naturally end s end
unit_group(d)
click to toggle source
# File lib/algebra/permutation-group.rb, line 13 def self.unit_group(d) self[unity(d)] end
unity(n)
click to toggle source
# File lib/algebra/permutation-group.rb, line 17 def self.unity(n) Permutation.unity(n) end