Version: 1.0
utilities.cpp
Go to the documentation of this file.
1 // Copyright (c) 2020, the GRAPHGEN contributors, as
2 // shown by the AUTHORS file. All rights reserved.
3 //
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
6 
7 #include "utilities.h"
8 
10 
11 std::string binary(size_t u, size_t nbits) {
12  std::string s;
13  while (nbits-- > 0)
14  s += ((u >> nbits) & 1) + 48;
15  return s;
16 }
This class stores the configuration data loaded from file. All data are placed in the config global v...
Definition: config_data.h:20
ConfigData conf
Definition: utilities.cpp:9
std::string binary(size_t u, size_t nbits)
Definition: utilities.cpp:11