35namespace energybased {
38template<
typename IntType,
int Dim>
40 const IntType a[
Dim],
const IntType b[
Dim]) {
42 for (
int d =
Dim - 1;
d >= 0;
d--) {
52template<
typename IntType,
int Dim>
54 const IntType b[
Dim]) {
59template<
typename IntType,
int Dim>
61 const IntType b[
Dim]) {
62 return a[0] == b[0] && a[1] == b[1];
65template<
typename IntType,
int Dim>
67 const IntType a[
Dim],
const IntType b[
Dim]) {
69 for (
int d =
Dim - 1;
d >= 0;
d--) {
79template<
typename IntType,
int Dim>
81 const unsigned int b[
Dim]) {
86template<
typename IntType,
int Dim>
88 const unsigned int b[
Dim]) {
89 return (a[1] == b[1]) ? a[0] < b[0] : a[1] < b[1];
92template<
typename IntType,
int Dim>
93inline typename std::enable_if<Dim != 1 && Dim != 2, void>::type
interleaveBits(
94 const IntType coords[
Dim], IntType
mnr[
Dim]) {
96 const int BitLength =
sizeof(IntType) << 3;
99 for (
int d = 0;
d <
Dim;
d++) {
110 for (
int d = 0;
d <
Dim;
d++) {
120template<
typename IntType,
int Dim>
121inline typename std::enable_if<Dim == 1, void>::type
interleaveBits(
const unsigned int coords[
Dim],
126template<
typename IntType,
int Dim>
127inline typename std::enable_if<Dim == 2, void>::type
interleaveBits(
const unsigned int coords[
Dim],
138 unsigned int x_lo[2] = {coords[0], coords[1]};
144 unsigned int mask = ~0x0;
166template<
typename IntType>
169 const size_t BitLength =
sizeof(IntType) << 3;
175 for (
unsigned int i = (
BitLength >> 1); i > 0; i = i >> 1) {
190template<
typename IntType,
int Dim>
192 const IntType b[
Dim]) {
194 const size_t BitLength =
sizeof(IntType) << 3;
197 for (
int d =
Dim - 1;
d >= 0;
d--) {
210template<
typename IntType,
int Dim>
212 const unsigned int a[
Dim],
const unsigned int b[
Dim]) {
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
std::enable_if< Dim!=1, int >::type lowestCommonAncestorLevel(const IntType a[Dim], const IntType b[Dim])
std::enable_if< Dim!=1 &&Dim!=2, void >::type interleaveBits(const IntType coords[Dim], IntType mnr[Dim])
std::enable_if< Dim!=1 &&Dim!=2, bool >::type mortonComparerLess(const IntType a[Dim], const IntType b[Dim])
std::enable_if< Dim!=1 &&Dim!=2, bool >::type mortonComparerEqual(const IntType a[Dim], const IntType b[Dim])
int mostSignificantBit(IntType x)
The namespace for all OGDF objects.