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

Fix DisplaySemigroup for transformation semigroups #1785

Merged
merged 1 commit into from
Oct 27, 2017

Conversation

wilfwilson
Copy link
Member

DisplaySemigroup is supposed to give a summary of the Green's structure of a transformation semigroup.

  • The documentation for DisplaySemigroup was not linked into the documentation system. I have now linked this, and reworded the documentation slightly.

  • I have changed the code of DisplaySemigroup so that the output is more readable (and correctly pluralises the word "class").

  • Furthermore, there was an unexpected error for certain types of transformation semigroup when using DisplaySemigroup. This was because the method did not take into account the degree of the semigroup when trying to calculate the rank of an element. For example, in any monoid of transformations of degree n, the IdentityTransformation has rank n. So you need to know the degree of the semigroup in order to get the rank of any element.

@wilfwilson wilfwilson added kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements topic: library kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them labels Oct 19, 2017
lib/semigrp.gi Outdated
Representative(h))) / Size(h);
Print("[H size = ", Size(h), ", ", nrL, " L-class");
if nrL > 1 then
Print("es");
Copy link
Member

Choose a reason for hiding this comment

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

You use 2 spaces for indentation here, while earlier in this function, 4 spaces are used...

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point @fingolfin, I'll unify it to 4 spaces (the original number used by this method).

@codecov
Copy link

codecov bot commented Oct 19, 2017

Codecov Report

Merging #1785 into master will increase coverage by 0.01%.
The diff coverage is 95.65%.

@@            Coverage Diff             @@
##           master    #1785      +/-   ##
==========================================
+ Coverage   62.82%   62.83%   +0.01%     
==========================================
  Files         969      969              
  Lines      295190   295205      +15     
  Branches    13049    13049              
==========================================
+ Hits       185449   185494      +45     
+ Misses     106940   106911      -29     
+ Partials     2801     2800       -1
Impacted Files Coverage Δ
lib/semigrp.gi 62.21% <95.65%> (+7.65%) ⬆️
src/system.c 52.94% <0%> (-0.34%) ⬇️
src/objset.c 82.59% <0%> (ø) ⬆️
src/hpc/threadapi.c 34.27% <0%> (+0.09%) ⬆️
src/stats.c 75.61% <0%> (+0.13%) ⬆️
src/funcs.c 71.96% <0%> (+0.14%) ⬆️
src/hpc/thread.c 46.83% <0%> (+0.19%) ⬆️
hpcgap/lib/hpc/stdtasks.g 38.87% <0%> (+0.25%) ⬆️

The documentation for `DisplaySemigroup` was not linked.
Furthermore, there was an unexpected error for certain
types of transformation semigroup when using `DisplaySemigroup`:
in particular, the method did not take into account the degree
of the semigroup when trying to calculate the rank of an
element. For example, in any monoid of transformations of degree `n`,
`IdentityTransformation` has rank `n`. So you need to know the
degree of the semigroup to get the rank.
@wilfwilson wilfwilson force-pushed the fix-DisplaySemigroup branch from 16090c2 to 8a35b08 Compare October 19, 2017 20:29
Copy link
Contributor

@james-d-mitchell james-d-mitchell left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@markuspf markuspf merged commit d768f44 into gap-system:master Oct 27, 2017
@wilfwilson wilfwilson deleted the fix-DisplaySemigroup branch October 30, 2017 15:08
@olexandr-konovalov olexandr-konovalov added the release notes: added PRs introducing changes that have since been mentioned in the release notes label Jan 22, 2018
@fingolfin fingolfin added the kind: bug Issues describing general bugs, and PRs fixing them label Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them kind: bug Issues describing general bugs, and PRs fixing them 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.

5 participants