Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/fining/examples/include/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 27.6.2023 mit Größe 1 kB image not shown  

Quelle  _Chapter_Hashsets.xml   Sprache: unbekannt

 
<?xml version="1.0" encoding="UTF-8"?>

<!-- This is an automatically generated file. -->
<Chapter Label="Chapter_Hashsets">
<Heading>Hashsets</Heading>

<P/>
 A hash set stores objects and allows efficient lookup whether an object
 is already a member of the set.
<P/>
 <Package>datastructures</Package> currently provides a reference implementation
 of hashsets using a hashtable stored in a plain &GAP; list.
<Section Label="Chapter_Hashsets_Section_API">
<Heading>API</Heading>

<P/>
<ManSection>
  <Filt Arg="arg" Name="IsHashSet" Label="for IsObject and IsFinite"/>
 <Returns><K>true</K> or <K>false</K>
</Returns>
 <Description>
 Category of hashsets
 </Description>
</ManSection>


<ManSection>
  <Func Arg="[values] [hashfunc[, eqfunc]] [capacity]" Name="HashSet" />
 <Description>
 Create a new hashset. The optional argument <A>values</A> must be a list of values,
 which will be inserted into the new hashset in order.
 The optional argument <A>hashfunc</A> must be a hash-
 function, <A>eqfunc</A> must
 be a binary equality testing function that returns <K>true</K> if the two arguments
 are considered equal, and <K>false</K> if they are not. Refer to Chapter
 <Ref Chap="Chapter_HashFunctions"/> about the requirements for hashfunctions and
 equality testers.
 The optional argument <A>capacity</A> determines the initial size of the hashmap.
<P/>
 </Description>
</ManSection>


<ManSection>
  <Oper Arg="hashset, obj" Name="AddSet" Label="for IsHashSetRep, IsObject"/>
 <Description>
 Add <A>obj</A> to <A>hashset</A>.
 </Description>
</ManSection>


<ManSection>
  <Oper Arg="obj, hashset" Name="\in" Label="for IsObject, IsHashSetRep"/>
 <Description>
 Test membership of <A>obj</A> in <A>hashset</A>
 </Description>
</ManSection>


<ManSection>
  <Oper Arg="hashset, obj" Name="RemoveSet" Label="for IsHashSetRep, IsObject"/>
 <Description>
 Remove <A>obj</A> from <A>hashset</A>.
 </Description>
</ManSection>


<ManSection>
  <Oper Arg="hashset" Name="Size" Label="for IsHashSetRep"/>
 <Description>
 Return the size of a hashset
 Returns an integer
 </Description>
</ManSection>


<ManSection>
  <Oper Arg="hashset" Name="IsEmpty" Label="for IsHashSetRep"/>
 <Returns>a boolean
</Returns>
 <Description>
 Test a hashset for emptiness.
 </Description>
</ManSection>


<ManSection>
  <Oper Arg="hashset" Name="Set" Label="for IsHashSetRep"/>
 <Returns>a set
</Returns>
 <Description>
 Convert a hashset into a &GAP; set
 </Description>
</ManSection>


<ManSection>
  <Oper Arg="hashset" Name="AsSet" Label="for IsHashSetRep"/>
 <Returns>an immutable set
</Returns>
 <Description>
 Convert a hashset into a &GAP; set
 </Description>
</ManSection>


<ManSection>
  <Oper Arg="set" Name="Iterator" Label="for IsHashSetRep"/>
 <Returns>an iterator
</Returns>
 <Description>
 Create an iterator for the values contained in a hashset.
 Note that elements added to the hashset after
 the creation of an iterator are not guaranteed to be returned by that iterator.
 </Description>
</ManSection>


</Section>


</Chapter>

99%


[ zur Elbe Produktseite wechseln0.7Quellennavigators  Analyse erneut starten  ]