ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
RowFingerprint.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*/
2/*------------------------- File RowFingerprint.h --------------------------*/
3/*--------------------------------------------------------------------------*/
53/*--------------------------------------------------------------------------*/
54/*----------------------------- DEFINITIONS --------------------------------*/
55/*--------------------------------------------------------------------------*/
56
57#ifndef __ADS_RowFingerprint
58 #define __ADS_RowFingerprint
59/* self-identification: #endif constant */
60
61/*--------------------------------------------------------------------------*/
62/*------------------------------ INCLUDES ----------------------------------*/
63/*--------------------------------------------------------------------------*/
64
65#include "ADS/Contract.h"
67
68#include <bit>
69#include <cstddef>
70#include <cstdint>
71#include <cstring>
72#include <span>
73#include <type_traits>
74
75/*--------------------------------------------------------------------------*/
76/*--------------------------- NAMESPACE ------------------------------------*/
77/*--------------------------------------------------------------------------*/
78
79namespace ADS
80{
81
82/*--------------------------------------------------------------------------*/
83/*------------------------------ FUNCTIONS ---------------------------------*/
84/*--------------------------------------------------------------------------*/
85
88[[nodiscard]] inline std::uint64_t canonicalWord( double x );
89
107[[nodiscard]] std::uint64_t rowFingerprint( std::span< const double > x ,
108 std::uint64_t seed = 0 );
109
115template< class I >
116[[nodiscard]] std::uint64_t rowFingerprint( std::size_t n , const I * ind ,
117 const double * val ,
118 std::uint64_t seed = 0 );
119
138[[nodiscard]] bool sameRow( std::span< const double > a ,
139 std::span< const double > b );
140
144template< class I >
145[[nodiscard]] bool sameRow( std::size_t na , const I * ia , const double * va ,
146 std::size_t nb , const I * ib ,
147 const double * vb );
148
149/*--------------------------------------------------------------------------*/
150
151} // end( namespace ADS )
152
153/*--------------------------------------------------------------------------*/
154/*-------------------------- IMPLEMENTATION --------------------------------*/
155/*--------------------------------------------------------------------------*/
156
157#include "ADS/dictionary/impl/RowFingerprint.tpp"
158
159/*--------------------------------------------------------------------------*/
160
161#endif /* RowFingerprint.h included */
162
163/*--------------------------------------------------------------------------*/
164/*------------------------ End File RowFingerprint.h -----------------------*/
165/*--------------------------------------------------------------------------*/
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
The engineered hash functions of ADS, beyond the book [see HashFunctions.h for those of section 7....
std::uint64_t rowFingerprint(std::span< const double > x, std::uint64_t seed=0)
the fingerprint of the dense row under the seed
std::uint64_t canonicalWord(double x)
the canonical word of : 0 for and , one quiet NaN for every NaN, the bits of otherwise
bool sameRow(std::span< const double > a, std::span< const double > b)
true if the dense rows and have the same length and equal values, equal to and every NaN equal to...
Definition ADT.h:96