Skip to content

Commit

Permalink
Add MeetBlist
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph-Edwards committed Aug 27, 2024
1 parent 8936b67 commit 8744a61
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/ref/blist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ In function names we call boolean lists <E>blists</E> for brevity.
<#Include Label="UniteBlistList">
<#Include Label="IntersectBlist">
<#Include Label="SubtractBlist">
<#Include Label="MeetBlist">
<#Include Label="FlipBlist">
<#Include Label="SetAllBlist">
<#Include Label="ClearAllBlist">
Expand Down
28 changes: 28 additions & 0 deletions lib/list.g
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,34 @@ DeclareSynonym( "IntersectBlist", INTER_BLIST );
##
DeclareSynonym( "SubtractBlist", SUBTR_BLIST );

#############################################################################
##
#F MeetBlist( <blist1>, <blist2> )
##
## <#GAPDoc Label="MeetBlist">
## <ManSection>
## <Func Name="MeetBlist" Arg='blist1, blist2'/>
##
## <Description>
## Returns true if <A>blist1</A> and <A>blist2</A> have <K>true</K> in the same
## position and <K>false</K> otherwise. It is equivalent to, but faster than
## <C>SizeBlist(IntersectionBlist(blist1, blist2)) &lt;&gt; 0</C>.
## The lists must have the same length.
## <Example><![CDATA[
## gap> blist1 := [ true, true, true, true ];;
## gap> blist2 := [ true, false, true, false ];;
## gap> MeetBlist( blist1, blist2 );
## true
## gap> FlipBlist( blist1 );
## gap> MeetBlist( blist1, blist2 );
## false
## ]]></Example>
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareSynonym( "MeetBlist", MEET_BLIST );

#############################################################################
##
#F FlipBlist( <blist> )
Expand Down

0 comments on commit 8744a61

Please sign in to comment.