ADS
Algorithms and Data Structures
Toggle main menu visibility
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
"
66
#include "
ADS/dictionary/FastHash.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
79
namespace
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
115
template
<
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
144
template
<
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
/*--------------------------------------------------------------------------*/
Contract.h
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
FastHash.h
The engineered hash functions of ADS, beyond the book [see HashFunctions.h for those of section 7....
ADS::rowFingerprint
std::uint64_t rowFingerprint(std::span< const double > x, std::uint64_t seed=0)
the fingerprint of the dense row under the seed
ADS::canonicalWord
std::uint64_t canonicalWord(double x)
the canonical word of : 0 for and , one quiet NaN for every NaN, the bits of otherwise
ADS::sameRow
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...
ADS
Definition
ADT.h:96
ADS
dictionary
RowFingerprint.h
Generated by
1.17.0