Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add and document new function DirectProductFamily #3455

Merged
merged 1 commit into from
Jun 27, 2019

Conversation

ssiccha
Copy link
Contributor

@ssiccha ssiccha commented May 15, 2019

lib: add operation DirectProductFamily

This declares the new operation DirectProductFamily and installs a
method for it. Also adds documentation and tests.

In the reference manual, the section "IsDirectProductElement (Filter)"
is renamed into "Direct Products and their Elements" to also accomodate
the documentation of DirectProductFamily and future categories and
operations.

UnderlyingRelation is adapted to use the new method, which makes it
easier to read.

@ssiccha ssiccha added kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements topic: library release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes labels May 15, 2019
@ssiccha
Copy link
Contributor Author

ssiccha commented May 15, 2019

I have added the release notes not needed tag since this function is not documented. Or should I document it?

@DominikBernhardt
Copy link
Contributor

Several tests failed due to a No method found error. You should check that.

@ssiccha ssiccha force-pushed the ss/add-DirectProductFamily branch from af39b21 to 2c4928e Compare May 17, 2019 08:44
@codecov
Copy link

codecov bot commented May 17, 2019

Codecov Report

Merging #3455 into master will increase coverage by 0.22%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3455      +/-   ##
==========================================
+ Coverage    85.4%   85.63%   +0.22%     
==========================================
  Files         696      646      -50     
  Lines      344610   319019   -25591     
==========================================
- Hits       294327   273203   -21124     
+ Misses      50283    45816    -4467
Impacted Files Coverage Δ
lib/mapping.gi 89.78% <100%> (-0.02%) ⬇️
lib/tuples.gi 95.72% <100%> (+0.12%) ⬆️
lib/tuples.gd 100% <100%> (ø) ⬆️
src/libgap-api.c 0% <0%> (-64.54%) ⬇️
lib/random.g 66.66% <0%> (-30.56%) ⬇️
src/compiler.c 67.44% <0%> (-21.21%) ⬇️
src/error.c 67.87% <0%> (-20.35%) ⬇️
lib/read2.g 85.71% <0%> (-14.29%) ⬇️
lib/read1.g 85.36% <0%> (-13.42%) ⬇️
lib/session.g 57.69% <0%> (-12.83%) ⬇️
... and 174 more

@ssiccha
Copy link
Contributor Author

ssiccha commented May 17, 2019

Thanks for the heads-up.

I fixed the issue. The filter IsCollection was (in hindsight obviously) too restrictive.

@coveralls
Copy link

coveralls commented May 17, 2019

Coverage Status

Coverage increased (+0.0007%) to 85.232% when pulling 4ea0738 on ssiccha:ss/add-DirectProductFamily into f71497d on gap-system:master.

@ChrisJefferson
Copy link
Contributor

Do you want to be able to call this in your own code? If so, we should document it, so we know what it is supposed to do.

@DominikBernhardt
Copy link
Contributor

Tests for DirectProductFamily checking your added code would be nice.

Copy link
Contributor

@DominikBernhardt DominikBernhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to document your code, I don't see any reason against it?

lib/tuples.gi Outdated Show resolved Hide resolved
@stevelinton
Copy link
Contributor

In documenting this, (and DirectProductElement) it is probably worth pointing out that not all direct products are made this way. For instance:

gap> g := SymmetricGroup(4);
Sym( [ 1 .. 4 ] )
gap> DirectProduct(g,g);    
Group([ (1,2,3,4), (1,2), (5,6,7,8), (5,6) ])

Arguably, perhaps they should be, with IsomorphismPermGroup available to those who want a nicer form, but that's a question for another time.

@ssiccha
Copy link
Contributor Author

ssiccha commented May 19, 2019

Good point! Thanks

@ssiccha
Copy link
Contributor Author

ssiccha commented May 19, 2019

I was thinking about doing a function DirectProductGroupInProductAction. But that's low priority for me atm.

@ssiccha ssiccha force-pushed the ss/add-DirectProductFamily branch 2 times, most recently from 9070d68 to 823999a Compare May 21, 2019 15:12
@ssiccha
Copy link
Contributor Author

ssiccha commented May 21, 2019

I've updated the PR!

@ssiccha ssiccha changed the title lib: add operation DirectProductFamily Add and document new function DirectProductFamily May 21, 2019
@ssiccha ssiccha added release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes and removed release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes labels May 21, 2019
@ssiccha ssiccha force-pushed the ss/add-DirectProductFamily branch from 823999a to 49acf72 Compare May 22, 2019 12:39
@ssiccha
Copy link
Contributor Author

ssiccha commented May 22, 2019

Added the method to hpcgap/lib/tuples.gi

Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems plausible to me.

@DominikBernhardt
Copy link
Contributor

Looks good to me.

lib/tuples.gd Outdated Show resolved Hide resolved
@ssiccha ssiccha force-pushed the ss/add-DirectProductFamily branch from 49acf72 to a715bed Compare May 30, 2019 09:35
lib/tuples.gd Outdated Show resolved Hide resolved
lib/tuples.gd Outdated Show resolved Hide resolved
lib/tuples.gd Outdated Show resolved Hide resolved
lib/tuples.gd Outdated Show resolved Hide resolved
lib/tuples.gd Show resolved Hide resolved
@ssiccha ssiccha force-pushed the ss/add-DirectProductFamily branch from a3befc2 to fc8b876 Compare June 24, 2019 12:22
@ssiccha
Copy link
Contributor Author

ssiccha commented Jun 24, 2019

I rebased onto master and put the new changes into a separate commit. Once this PR is accepted I'll squash everything into a single commit.

@ssiccha ssiccha force-pushed the ss/add-DirectProductFamily branch from fc8b876 to 0911e3e Compare June 24, 2019 13:04
@ssiccha
Copy link
Contributor Author

ssiccha commented Jun 24, 2019

Squashed.

Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this looks pretty good now! Unfortunately there is one issue left, but that should be easy to fix: changes to lib/mapping.gi also need to be applied to hpcgap/lib/mapping.gi.

lib/mapping.gi Show resolved Hide resolved
This declares the new operation DirectProductFamily and installs a
method for it. The new method is also added to `hpcgap/lib/tuples.gi`.
Also adds documentation and tests.

In the reference manual, the section "IsDirectProductElement (Filter)"
is renamed into "Direct Products and their Elements" to also accomodate
the documentation of DirectProductFamily and future categories and
operations.

UnderlyingRelation is adapted to use the new method, which makes it
easier to read. The same change is replicated to
`hpcgap/lib/mapping.gi`.
@ssiccha ssiccha force-pushed the ss/add-DirectProductFamily branch from 0911e3e to 4ea0738 Compare June 26, 2019 10:39
@fingolfin fingolfin merged commit efcf24e into gap-system:master Jun 27, 2019
@ssiccha ssiccha deleted the ss/add-DirectProductFamily branch August 7, 2019 08:46
@DominikBernhardt DominikBernhardt added release notes: added PRs introducing changes that have since been mentioned in the release notes and removed release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels Aug 21, 2019
@olexandr-konovalov olexandr-konovalov added this to the GAP 4.11.0 milestone Feb 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements release notes: added PRs introducing changes that have since been mentioned in the release notes topic: library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants