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

Turn IsLexicographicallyLess into an obsolete synonym for \< #4504

Merged
merged 2 commits into from
May 21, 2021
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
1 change: 0 additions & 1 deletion doc/ref/lists.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,6 @@ with possibly slightly different meaning for lists and non-list collections.
<#Include Label="Flat">
<#Include Label="Reversed">
<#Include Label="Shuffle">
<#Include Label="IsLexicographicallyLess">
<#Include Label="Apply">
<#Include Label="Perform">
<#Include Label="PermListList">
Expand Down
16 changes: 8 additions & 8 deletions doc/ref/obsolete.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,32 @@ We decided to change the names to avoid confusion with the term
<P/>
Here are some examples of such name changes.
<P/>
<Index Key="Operation"><C>Operation</C></Index>
<Index Key="RepresentativeOperation"><C>RepresentativeOperation</C></Index>
<Index Key="OperationHomomorphism"><C>OperationHomomorphism</C></Index>
<Index Key="FunctionOperation"><C>FunctionOperation</C></Index>
<Table Align="l|l">
<Row>
<Item><E>OLD</E></Item>
<Item><E>NOW USE</E></Item>
</Row>
<HorLine/>
<Row>
<Item><C>Operation</C></Item>
<Item><C>Operation</C><Index Key="Operation"><C>Operation</C></Index></Item>
<Item><Ref Func="Action" Label="for a group, an action domain, etc."/></Item>
</Row>
<Row>
<Item><C>RepresentativeOperation</C></Item>
<Item><C>RepresentativeOperation</C><Index Key="RepresentativeOperation"><C>RepresentativeOperation</C></Index></Item>
<Item><Ref Func="RepresentativeAction"/></Item>
</Row>
<Row>
<Item><C>OperationHomomorphism</C></Item>
<Item><C>OperationHomomorphism</C><Index Key="OperationHomomorphism"><C>OperationHomomorphism</C></Index></Item>
<Item><Ref Func="ActionHomomorphism" Label="for a group, an action domain, etc."/></Item>
</Row>
<Row>
<Item><C>FunctionOperation</C></Item>
<Item><C>FunctionOperation</C><Index Key="FunctionOperation"><C>FunctionOperation</C></Index></Item>
<Item><Ref Attr="FunctionAction"/></Item>
</Row>
<Row>
<Item><C>IsLexicographicallyLess</C><Index Key="IsLexicographicallyLess"><C>IsLexicographicallyLess</C></Index></Item>
<Item><Ref Attr="\&lt;"/></Item>
</Row>
</Table>

</Section>
Expand Down
23 changes: 0 additions & 23 deletions lib/list.gd
Original file line number Diff line number Diff line change
Expand Up @@ -1599,29 +1599,6 @@ DeclareOperation( "ReversedOp", [ IsDenseList ] );
##
DeclareOperation( "Shuffle", [IsDenseList and IsMutable] );

#############################################################################
##
#F IsLexicographicallyLess( <list1>, <list2> )
##
## <#GAPDoc Label="IsLexicographicallyLess">
## <ManSection>
## <Func Name="IsLexicographicallyLess" Arg='list1, list2'/>
##
## <Description>
## Let <A>list1</A> and <A>list2</A> be two dense, but not necessarily
## homogeneous lists
## (see&nbsp;<Ref Filt="IsDenseList"/>, <Ref Filt="IsHomogeneousList"/>),
## such that for each <M>i</M>, the entries in both lists at position
## <M>i</M> can be compared via <C>&lt;</C>.
## <Ref Func="IsLexicographicallyLess"/> returns <K>true</K> if <A>list1</A>
## is smaller than <A>list2</A> w.r.t.&nbsp;lexicographical ordering,
## and <K>false</K> otherwise.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareGlobalFunction( "IsLexicographicallyLess" );


#############################################################################
##
Expand Down
17 changes: 0 additions & 17 deletions lib/list.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2385,23 +2385,6 @@ InstallOtherMethod( StableSort,
[ IsList, IsFunction ],
SORT_MUTABILITY_ERROR_HANDLER );

#############################################################################
##
#F IsLexicographicallyLess( <list1>, <list2> )
##
InstallGlobalFunction( IsLexicographicallyLess, function( list1, list2 )
local len, i;
len:= Minimum( Length( list1 ), Length( list2 ) );
for i in [ 1 .. len ] do
if list1[i] < list2[i] then
return true;
elif list2[i] < list1[i] then
return false;
fi;
od;
return len < Length( list2 );
end );


#############################################################################
##
Expand Down
4 changes: 2 additions & 2 deletions lib/matblock.gi
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ InstallGlobalFunction( BlockMatrix, function( arg )
Add( newblocks, block );
fi;
od;
Sort( newblocks, IsLexicographicallyLess );
Sort( newblocks );
i:=1;
while i+1<=Length(newblocks) do
if newblocks[i][1] = newblocks[ i+1 ][1] and
Expand Down Expand Up @@ -337,7 +337,7 @@ InstallMethod( \+,
and bm1!.cpb = bm2!.cpb then

blocks:= Concatenation( bm1!.blocks, bm2!.blocks );
Sort( blocks, IsLexicographicallyLess );
Sort( blocks );
pos:= 1;
i:= 1;
while i < Length( blocks ) do
Expand Down
25 changes: 25 additions & 0 deletions lib/obsolete.gd
Original file line number Diff line number Diff line change
Expand Up @@ -722,3 +722,28 @@ end);
DeclareObsoleteSynonym("GAP_EXIT_CODE", "GapExitCode", 2);
DeclareObsoleteSynonym("QUIT_GAP", "QuitGap", 2);
DeclareObsoleteSynonym("FORCE_QUIT_GAP", "ForceQuitGap", 2);


#############################################################################
##
#F IsLexicographicallyLess( <list1>, <list2> )
##
## <#GAPDoc Label="IsLexicographicallyLess">
## <ManSection>
## <Func Name="IsLexicographicallyLess" Arg='list1, list2'/>
##
## <Description>
## Let <A>list1</A> and <A>list2</A> be two dense, but not necessarily
## homogeneous lists
## (see&nbsp;<Ref Filt="IsDenseList"/>, <Ref Filt="IsHomogeneousList"/>),
## such that for each <M>i</M>, the entries in both lists at position
## <M>i</M> can be compared via <C>&lt;</C>.
## <Ref Func="IsLexicographicallyLess"/> returns <K>true</K> if <A>list1</A>
## is smaller than <A>list2</A> w.r.t.&nbsp;lexicographical ordering,
## and <K>false</K> otherwise.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
## Not used in any redistributed package (05/2021)
DeclareObsoleteSynonym( "IsLexicographicallyLess", "<" );