changa 3.5
Loading...
Searching...
No Matches
TreeNode.h
Go to the documentation of this file.
1
6
7#ifndef TREENODE_H
8#define TREENODE_H
9
10#include <sstream>
11
12#include "SFC.h"
13
14namespace TreeStuff {
15
16using namespace SFC;
17
19inline std::string keyBits(const Key k, const int numBits) {
20 std::ostringstream oss;
21 //oss << "N";
22 bool ready = false;
23 for(int i = 0; i < numBits; i++) {
24 Key k2 = k & (static_cast<Key>(1) << (62 - i));
25 if (ready) oss << (k2 ? 1 : 0);
26 else if (k2 != 0) ready = true;
27 }
28 return oss.str();
29}
30
34
35const double opening_geometry_factor = 2 / sqrt(3.0);
36
38extern int maxBucketSize;
39
40
41} //close namespace TreeStuff
42
43#endif //TREENODE_H
std::string keyBits(const Key k, const int numBits)
Convert a Key into a printable string.
Definition TreeNode.h:19
int maxBucketSize
The maximum number of particles in a bucket.
Definition TreePiece.cpp:52
const double opening_geometry_factor
Definition TreeNode.h:35