|
|
|||
Warning, file /include/opencascade/NCollection_Primes.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // Copyright (c) 2024 OPEN CASCADE SAS 0002 // 0003 // This file is part of Open CASCADE Technology software library. 0004 // 0005 // This library is free software; you can redistribute it and/or modify it under 0006 // the terms of the GNU Lesser General Public License version 2.1 as published 0007 // by the Free Software Foundation, with special exception defined in the file 0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0009 // distribution for complete text of the license and disclaimer of any warranty. 0010 // 0011 // Alternatively, this file may be used under the terms of Open CASCADE 0012 // commercial license or contractual agreement. 0013 0014 #ifndef _NCollection_Primes_HeaderFile 0015 #define _NCollection_Primes_HeaderFile 0016 0017 #include <Standard_Macro.hxx> 0018 0019 //! Namespace provides a collection of prime numbers. 0020 //! 0021 //! This namespace is used to store a collection of prime numbers that are used as 0022 //! consecutive steps for the size of an array of buckets in a map. The prime 0023 //! numbers are chosen to minimize the probability of having the same hash codes 0024 //! for different map items. The namespace also provides a method to find the next 0025 //! prime number greater than or equal to a given number. 0026 //! 0027 //! The following are Pierpont primes, prime numbers of the form 2^u * 3^v + 1: 0028 //! 101, 1009, 2003, 5003, 10007, 20011, 37003, 57037, 65003, 100019, 209953, 472393, 0029 //! 995329, 2359297, 4478977, 9437185, 17915905, 35831809, 71663617, 150994945, 0030 //! 301989889, 573308929, 1019215873, 2038431745 0031 namespace NCollection_Primes 0032 { 0033 //! Returns the next prime number greater than or equal to theN. 0034 Standard_EXPORT int NextPrimeForMap(const int theN); 0035 }; // namespace NCollection_Primes 0036 0037 #endif // _NCollection_Primes_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|