PPL Logo

util/hilbert.C File Reference

Go to the source code of this file.

Functions

static int gray_encode (int i)
 Author: Harshitha Menon, Nikhil Jain, Yanhua Sun Contact: gplkrsh2@illinois.edu, nikhil@illinois.edu, sun51@illinois.edu.
static int gray_decode (int n)
static void initial_start_end (int nChunks, int dim, int &start, int &end)
static int pack_index (vector< int > chunks, int dim)
static vector< inttranspose_bits (vector< int > srcs, int nDests)
static vector< intpack_coords (vector< int > coord_chunks, int dim)
static vector< intunpack_coords (const vector< int > &coords, int dim)
static void unpack_index (int i, int dim, vector< int > &chunks)
static int gray_encode_travel (int start, int end, int mask, int i)
static int gray_decode_travel (int start, int end, int mask, int i)
static void child_start_end (int parent_start, int parent_end, int mask, int i, int &child_start, int &child_end)
vector< intint_to_Hilbert (int i, int dim)
int Hilbert_to_int (const vector< int > &coords, int dim)


Function Documentation

static int gray_encode ( int  i  )  [static]

Author: Harshitha Menon, Nikhil Jain, Yanhua Sun Contact: gplkrsh2@illinois.edu, nikhil@illinois.edu, sun51@illinois.edu.

More details about this implementation of the Hilbert curve can be found from https://github.com/straup/gae-spacetimeid/blob/master/hilbert.py and this is a C++ implementation of what is given there.

Definition at line 25 of file hilbert.C.

Referenced by gray_encode_travel().

Here is the caller graph for this function:

static int gray_decode ( int  n  )  [static]

Definition at line 30 of file hilbert.C.

Referenced by gray_decode_travel().

Here is the caller graph for this function:

static void initial_start_end ( int  nChunks,
int  dim,
int start,
int end 
) [static]

Definition at line 43 of file hilbert.C.

Referenced by Hilbert_to_int(), and int_to_Hilbert().

Here is the caller graph for this function:

static int pack_index ( vector< int chunks,
int  dim 
) [static]

Definition at line 53 of file hilbert.C.

References p.

Referenced by Hilbert_to_int().

Here is the caller graph for this function:

static vector<int> transpose_bits ( vector< int srcs,
int  nDests 
) [static]

Definition at line 63 of file hilbert.C.

References dest.

Referenced by pack_coords(), and unpack_coords().

Here is the caller graph for this function:

static vector<int> pack_coords ( vector< int coord_chunks,
int  dim 
) [static]

Definition at line 81 of file hilbert.C.

References transpose_bits().

Referenced by int_to_Hilbert().

Here is the call graph for this function:

Here is the caller graph for this function:

static vector<int> unpack_coords ( const vector< int > &  coords,
int  dim 
) [static]

Definition at line 85 of file hilbert.C.

References max(), and transpose_bits().

Referenced by Hilbert_to_int().

Here is the call graph for this function:

Here is the caller graph for this function:

static void unpack_index ( int  i,
int  dim,
vector< int > &  chunks 
) [static]

Definition at line 97 of file hilbert.C.

References max(), and p.

Referenced by int_to_Hilbert().

Here is the call graph for this function:

Here is the caller graph for this function:

static int gray_encode_travel ( int  start,
int  end,
int  mask,
int  i 
) [static]

Definition at line 110 of file hilbert.C.

References gray_encode().

Referenced by child_start_end(), and int_to_Hilbert().

Here is the call graph for this function:

Here is the caller graph for this function:

static int gray_decode_travel ( int  start,
int  end,
int  mask,
int  i 
) [static]

Definition at line 118 of file hilbert.C.

References gray_decode().

Referenced by Hilbert_to_int().

Here is the call graph for this function:

Here is the caller graph for this function:

static void child_start_end ( int  parent_start,
int  parent_end,
int  mask,
int  i,
int child_start,
int child_end 
) [static]

Definition at line 125 of file hilbert.C.

References gray_encode_travel(), max(), and min().

Referenced by Hilbert_to_int(), and int_to_Hilbert().

Here is the call graph for this function:

Here is the caller graph for this function:

vector<int> int_to_Hilbert ( int  i,
int  dim 
)

Definition at line 136 of file hilbert.C.

References child_start_end(), gray_encode_travel(), initial_start_end(), pack_coords(), and unpack_index().

Referenced by getHilbertList().

Here is the call graph for this function:

Here is the caller graph for this function:

int Hilbert_to_int ( const vector< int > &  coords,
int  dim 
)

Definition at line 159 of file hilbert.C.

References child_start_end(), gray_decode_travel(), initial_start_end(), pack_index(), and unpack_coords().

Referenced by HilbertArrayMap::registerArray().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Mon Sep 21 08:11:49 2020 for Charm++ by  doxygen 1.5.5