PRCYCoin  2.0.0.7rc1
P2P Digital Currency
adjacency_graphs.hpp
Go to the documentation of this file.
1 // generated by scripts/build_keyboard_adjacency_graphs.py
2 #ifndef __ZXCVBN__ADJACENCY_GRAPHS_HPP
3 #define __ZXCVBN__ADJACENCY_GRAPHS_HPP
4 
5 #include <zxcvbn/optional.hpp>
6 
7 #include <array>
8 #include <initializer_list>
9 #include <string>
10 #include <unordered_map>
11 #include <utility>
12 #include <vector>
13 
14 namespace zxcvbn {
15 
16 enum class GraphTag {
17  QWERTY,
18  DVORAK,
19  KEYPAD,
21 };
22 
23 }
24 
25 namespace std {
26 
27 template<>
28 struct hash<zxcvbn::GraphTag> {
29  std::size_t operator()(const zxcvbn::GraphTag & v) const {
30  return static_cast<std::size_t>(v);
31  }
32 };
33 
34 }
35 
36 namespace zxcvbn {
37 
38 using Graph = std::unordered_map<std::string, std::vector<optional::optional<std::string>>>;
39 using Graphs = std::unordered_map<GraphTag, Graph>;
40 const Graphs & graphs();
41 
42 using degree_t = double;
43 
46 
47 extern const std::size_t KEYBOARD_STARTING_POSITIONS;
48 extern const std::size_t KEYPAD_STARTING_POSITIONS;
49 
50 }
51 
52 #endif
zxcvbn::GraphTag::MAC_KEYPAD
@ MAC_KEYPAD
std::hash< zxcvbn::GraphTag >::operator()
std::size_t operator()(const zxcvbn::GraphTag &v) const
Definition: adjacency_graphs.hpp:29
zxcvbn::KEYBOARD_STARTING_POSITIONS
const std::size_t KEYBOARD_STARTING_POSITIONS
Definition: adjacency_graphs.hpp:47
zxcvbn::GraphTag::KEYPAD
@ KEYPAD
zxcvbn::GraphTag::QWERTY
@ QWERTY
zxcvbn
Definition: _frequency_lists.cpp:7
zxcvbn::Graphs
std::unordered_map< GraphTag, Graph > Graphs
Definition: adjacency_graphs.hpp:39
zxcvbn::GraphTag::DVORAK
@ DVORAK
zxcvbn::GraphTag
GraphTag
Definition: adjacency_graphs.hpp:16
zxcvbn::degree_t
double degree_t
Definition: adjacency_graphs.hpp:42
zxcvbn::KEYPAD_STARTING_POSITIONS
const std::size_t KEYPAD_STARTING_POSITIONS
Definition: adjacency_graphs.hpp:48
std
Definition: adjacency_graphs.hpp:25
zxcvbn::Graph
std::unordered_map< std::string, std::vector< optional::optional< std::string > >> Graph
Definition: adjacency_graphs.hpp:38
zxcvbn::graphs
const Graphs & graphs()
Definition: adjacency_graphs.cpp:270
zxcvbn::KEYPAD_AVERAGE_DEGREE
const degree_t KEYPAD_AVERAGE_DEGREE
Definition: adjacency_graphs.hpp:45
zxcvbn::KEYBOARD_AVERAGE_DEGREE
const degree_t KEYBOARD_AVERAGE_DEGREE
Definition: adjacency_graphs.hpp:44
optional.hpp