SparseLibrary  Version 1.6.0
Matrix2HilbertCoordinates.hpp
1 /*
2  * Copyright (c) 2007-2014, A. N. Yzelman, Utrecht University 2007-2011;
3  * KU Leuven 2011-2014.
4  * R. H. Bisseling, Utrecht University 2007-2014.
5  *
6  * This file is part of the Sparse Library.
7  *
8  * This library was developed under supervision of Prof. dr. Rob H. Bisseling at
9  * Utrecht University, from 2007 until 2011. From 2011-2014, development continued
10  * at KU Leuven, where Prof. dr. Dirk Roose contributed significantly to the ideas
11  * behind the newer parts of the library code.
12  *
13  * The Sparse Library is free software: you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by the
15  * Free Software Foundation, either version 3 of the License, or (at your
16  * option) any later version.
17  *
18  * The Sparse Library is distributed in the hope that it will be useful, but
19  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  * for more details.
22  *
23  * You should have received a copy of the GNU General Public License along
24  * with the Sparse Library. If not, see <http://www.gnu.org/licenses/>.
25  */
26 
27 
28 /*
29  * File created by:
30  * A. N. Yzelman, Dept. of Mathematics, Utrecht University, 2007.
31  */
32 
33 
34 #ifndef _H_MATRIX2HILBERTCOORDINATES
35 #define _H_MATRIX2HILBERTCOORDINATES
36 
37 #include <cmath>
38 #include <vector>
39 #include <iostream>
40 #include <cstdlib>
41 
46 
47  private:
48 
51 
52  protected:
53 
55  static const unsigned char BITWIDTH = 8 * sizeof(size_t);
56 
57  public:
58 
74  static void IntegerToHilbert( const size_t i, const size_t j,
75  size_t &h1, size_t &h2 );
76 
77 };
78 
79 #endif
80 
static const unsigned char BITWIDTH
The amount of bits in a native data word.
Definition: Matrix2HilbertCoordinates.hpp:55
static void IntegerToHilbert(const size_t i, const size_t j, size_t &h1, size_t &h2)
New method, October 2010.
Definition: Matrix2HilbertCoordinates.cpp:48
Class which maps coordinates to 1D Hilbert Coordinates.
Definition: Matrix2HilbertCoordinates.hpp:45