BlistList( list, sub )
BlistList
returns a new boolean list that describes the list sub as a
sublist of the list list, which must have no holes. That is
BlistList
returns a boolean list blist of the same length as list
such that blist[i]
is true
if list[i]
is in sub and
false
otherwise.
list need not be a proper set (see Sets), even though in this case
BlistList
is most efficient. In particular list may contain
duplicates. sub need not be a proper sublist of list, i.e., sub
may contain elements that are not in list. Those elements of course
have no influence on the result of BlistList
.
gap> BlistList( [1..10], [2,3,5,7] ); [ false, true, true, false, true, false, true, false, false, false ] gap> BlistList( [1,2,3,4,5,2,8,6,4,10], [4,8,9,16] ); [ false, false, false, true, false, false, true, false, true, false ]
ListBlist
(see ListBlist) is the inverse function to BlistList
.
GAP 3.4.4