Majoranapp
A C++ library for studying MZM in non-interacting systems
Misc.hpp
Go to the documentation of this file.
1
#ifndef MISC_HPP
2
#define MISC_HPP
3
19
constexpr
unsigned
int
str2int
(
const
char
* str,
int
h = 0)
20
{
21
return
!str[h] ? 5381 : (
str2int
(str, h+1) * 33) ^ str[h];
22
}
23
24
#endif
str2int
constexpr unsigned int str2int(const char *str, int h=0)
converting c_str() into constexpr int, which can be used in switch statement
Definition:
Misc.hpp:19
Majoranapp
Majoranapp_bits
Misc.hpp
Generated on Tue Jun 9 2020 18:43:16 for Majoranapp by
1.8.13