<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --> <!-- %% --> <!-- %A coll.xml GAP documentation Alexander Hulpke --> <!-- %% --> <!-- %% --> <!-- %Y (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland --> <!-- %Y Copyright (C) 2002 The GAP Group --> <!-- %% -->
<Chapter Label="Collections">
<Heading>Collections</Heading>
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Lists and Collections">
<Heading>Lists and Collections</Heading>
<Index>Sorted Lists as Collections</Index>
The following functions take a <E>list or collection</E> as argument,
and return a corresponding <E>list</E>.
They differ in whether or not the result is
mutable or immutable (see <Ref Sect="Mutability and Copyability"/>),
guaranteed to be sorted,
or guaranteed to admit list access in constant time
(see <Ref Filt="IsConstantTimeAccessList"/>).
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Attributes and Properties for Collections">
<Heading>Attributes and Properties for Collections</Heading>
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Operations for Collections">
<Heading>Operations for Collections</Heading>
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Membership Test for Collections">
<Heading>Membership Test for Collections</Heading>
<ManSection>
<Oper Name="\in" Arg='obj, C' Label="for a collection"/>
<Description>
returns <K>true</K> if the object <A>obj</A> lies in the collection <A>C</A>,
and <K>false</K> otherwise.
<P/>
The infix version of the command
<P/>
<A>obj</A> <K>in</K> <A>C</A>
<P/>
calls the operation <Ref Oper="\in" Label="for a collection"/>,
for which methods can be installed.
<P/>
<Example><![CDATA[
gap> 13 in Integers; [ 1, 2 ] in Integers;
true
false
gap> g:= Group( (1,2) );; (1,2) in g; (1,2,3) in g;
true
false
]]></Example>
</Description>
</ManSection>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.