From 917606af539d993ef61c79e2ac6a6cc2dc8e8acb Mon Sep 17 00:00:00 2001 From: kalmar Date: Wed, 17 May 2017 11:27:25 +0200 Subject: [PATCH] move the simplest GroupRing constructor to type definition --- src/GroupRings.jl | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/GroupRings.jl b/src/GroupRings.jl index e46214c..7f49618 100644 --- a/src/GroupRings.jl +++ b/src/GroupRings.jl @@ -17,7 +17,13 @@ type GroupRing <: Ring basis::Vector{GroupElem} basis_dict::Dict{GroupElem, Int} - GroupRing(G::Group) = new(G) + function GroupRing(G::Group; full=false) + A = new(G) + if full + complete(A) + end + return A + end end type GroupRingElem{T<:Number} @@ -68,14 +74,6 @@ function GroupRing(G::Group, pm::Array{Int,2}, basis::Vector) return GroupRing(Group, pm, basis, basis_dict) end -function GroupRing(G::Group; complete=false) - A = GroupRing(Group) - if complete - complete(A) - end - return A -end - ############################################################################### # # Parent object call overloads