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

New Union implementation #444

Merged
merged 2 commits into from
Jan 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions dev/Updates/union
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Format 'yyyy/mm/dd'
!! Date
2016/01/11
!! Changed by
SL
! Reported by
Nick Loughlin
!! Type of Change
Fix: wrong result

!! Description
Under some circumstances the union of a combination of lists of small integers
and ranges could be computed incorrectly. This change fixes this and also
avoids expanding ranges unnecessarily in some cases.

! Test Code
# included in union.tst

! Prefetch

!! Changeset

!! End
5 changes: 4 additions & 1 deletion lib/coll.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3092,7 +3092,10 @@ DeclareOperation( "Intersection2",
## [ 1, 2, 3, 4 ]
## gap> Union( [ ] );
## [ ]
## ]]></Example>
## ]]></Example><P/>
## When computing the Union of lists or sets of small integers and ranges,
## every attempt is made to return the result as a range and to avoid expanding
## ranges provided as input.
## </Description>
## </ManSection>
## <#/GAPDoc>
Expand Down
Loading