Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/GAP/pkg/datastructures/doc/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 14.9.2025 mit Größe 2 kB image not shown  

Quelle  _Chapter_HashFunctions.xml   Sprache: XML

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

<!-- This is an automatically generated file. -->
<Chapter Label="Chapter_HashFunctions">
<Heading>Hash Functions</Heading>

<P/>
<Section Label="Chapter_Hash_Functions_Section_Introduction">
<Heading>Introduction</Heading>

<P/>
 A hash function in <Package>datastructures</Package> is a
 function <M>H</M> which maps a value <M>X</M> to a small integer (where
 a small integer is an integer in the range <C>[-2^28..2^28-1]</C>
 on a 32-bit system, and <C>[-2^60..2^60-1]</C> on a 64-bit system),
 under the requirement that if <M>X=Y</M>, then <M>H(X)=H(Y)</M>.
<P/>
 A variety of hash functions is provided by <Package>datastructures</Package>,
 with different behaviours. A bad choice of hash function can lead to serious
 performance problems.
<P/>
 <Package>datastructures</Package> does not guarantee consistency of hash
 values across release or &GAP; sessions.
</Section>


<Section Label="Chapter_Hash_Functions_Section_Hash_Functions_for_Basic_Types">
<Heading>Hash Functions for Basic Types</Heading>

<ManSection>
  <Func Arg="obj..." Name="HashBasic" />
 <Returns>a small integer
</Returns>
 <Description>
 Hashes any values built inductively from
 <List>
 <Item> built-in types, namely integers, booleans,
        permutations, transformations, partial permutations, and</Item>
 <Item> constructors for lists and records. </Item>
 </List>
<P/>
 This function is variadic, treating more than one argument
 as equivalent to a list containing the arguments, that is
 <C>HashBasic(x,y,z) = HashBasic([x,y,z])</C>.
 </Description>
</ManSection>


</Section>


<Section Label="Chapter_Hash_Functions_Section_Hash_Functions_for_Permutation_Groups">
<Heading>Hash Functions for Permutation Groups</Heading>

<P/>
 <Package>datastructures</Package> provides two hash functions for permutation groups;
 <Ref Func="Hash_PermGroup_Fast"/> is the faster one, with higher likelihood of collisions
 and <Ref Func="Hash_PermGroup_Complete"/> is slower but provides a lower
 likelihood of collisions.
<ManSection>
  <Func Arg="group" Name="Hash_PermGroup_Fast" />
 <Returns>a small integer
</Returns>
 <Description>
 <Ref Func="Hash_PermGroup_Fast"/> is faster than <Ref Func="Hash_PermGroup_Complete"/>,
 but will return the same value for groups with the same size, orbits and degree of
 transitivity.
 </Description>
</ManSection>


<ManSection>
  <Func Arg="group" Name="Hash_PermGroup_Complete" />
 <Returns>a small integer
</Returns>
 <Description>
 <Ref Func="Hash_PermGroup_Complete"/> is slower than <Ref Func="Hash_PermGroup_Fast"/>,
 but is extremely unlikely to return the same hash for two different groups.
 </Description>
</ManSection>


</Section>


</Chapter>

86%


¤ Dauer der Verarbeitung: 0.31 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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.