Coder Social home page Coder Social logo

Abstract Groups Type about furiousgenius HOT 2 CLOSED

aidevnn avatar aidevnn commented on June 13, 2024
Abstract Groups Type

from furiousgenius.

Comments (2)

aidevnn avatar aidevnn commented on June 13, 2024

In other terms, the neutral must be a essential part of the definition and it must takes more attention.

FuriousGenius/src/Sn.jl

Lines 33 to 44 in e60d4cc

struct Perm <: Elt
baseGroup::Sn
p::Vector{Int}
eHash::UInt
function Perm(sn::Sn, p::Vector{Int})
new(sn, p, hash(p, sn.gHash))
end
function Perm(sn::Sn, cycles::Vector{Vector{Int}})
p = CyclesToPermutation(sn.N, cycles)
return Perm(sn, p)
end
end

FuriousGenius/src/Zn.jl

Lines 21 to 36 in e60d4cc

struct ZnInt <: Elt
baseGroup::Zn
k::Int
eHash::UInt
function ZnInt(zn::Zn, k::Int)
k0 = k % zn.mod
if k0 < 0
k0 += zn.mod
end
return new(zn, k0, hash(k0, zn.gHash))
end
function ZnInt(k::Int, mod::Int)
zn = Zn(mod)
return ZnInt(zn, k)
end
end

from furiousgenius.

aidevnn avatar aidevnn commented on June 13, 2024

CGroup type is for DirectProduct, QuotientGroup and SemiDirectProduct. It is about to providing an inheritence operation from a superGroup to subGroups or to providing more operations like morphisms or group action over elements.

For example, QuotientGroup needs to apply a morphism over elements through a mapping and a Dictionary, and SemiDirectProduct needs to apply an action. They all deal with ConcreteGroup and now, it is well defined by taking more attention over Neutral inside the constructor.

The ambiguous issue about abstract types is solved.

from furiousgenius.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.