1
1
/*
2
-
3
- 3D Zernike Moments
4
- Copyright (C) 2003 by Computer Graphics Group, University of Bonn
5
- http://www.cg.cs.uni-bonn.de/project-pages/3dsearch/
6
-
2
+
3
+ 3D Zernike Moments
4
+ Copyright (C) 2003 by Computer Graphics Group, University of Bonn
5
+ http://www.cg.cs.uni-bonn.de/project-pages/3dsearch/
6
+
7
7
Code by Marcin Novotni: marcin@cs.uni-bonn.de
8
-
8
+
9
9
for more information, see the paper:
10
10
11
- @inproceedings{novotni-2003-3d,
12
- author = {M. Novotni and R. Klein},
13
- title = {3{D} {Z}ernike Descriptors for Content Based Shape Retrieval},
14
- booktitle = {The 8th ACM Symposium on Solid Modeling and Applications},
15
- pages = {216--225},
16
- year = {2003},
17
- month = {June},
18
- institution = {Universit\"{a}t Bonn},
11
+ @inproceedings{novotni-2003-3d,
12
+ author = {M. Novotni and R. Klein},
13
+ title = {3{D} {Z}ernike Descriptors for Content Based Shape Retrieval},
14
+ booktitle = {The 8th ACM Symposium on Solid Modeling and Applications},
15
+ pages = {216--225},
16
+ year = {2003},
17
+ month = {June},
18
+ institution = {Universit\"{a}t Bonn},
19
19
conference = {The 8th ACM Symposium on Solid Modeling and Applications, June 16-20, Seattle, WA}
20
- }
21
- *---------------------------------------------------------------------------*
20
+ }
21
+ *---------------------------------------------------------------------------*
22
22
* *
23
23
* License *
24
24
* *
@@ -35,66 +35,66 @@ for more information, see the paper:
35
35
* License along with this library; if not, write to the Free Software *
36
36
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
37
37
* *
38
- \*===========================================================================*/
39
-
40
- #ifndef BINOMIAL_H
41
- #define BINOMIAL_H
42
-
43
- #include < vector>
44
- #include < assert.h>
45
-
46
- using std::vector;
47
-
48
- /* *
49
- * A template class facilitating fast computation and retrieval of binomials.
50
- * The binomials are computed only once at first call of Get function according
51
- * to Pascal's Triangle.
52
- */
53
- template <class T >
54
- class Binomial
55
- {
56
- public:
57
- typedef vector<T> VectorT;
58
- typedef vector<VectorT> VVectorT;
59
-
60
- /* * Retrieves the binomial _i "over" _j */
61
- static T Get (int _i, int _j);
62
- /* * Sets the maximal value of upper binomial param to _max */
63
- static void SetMax (int _max);
64
- /* * Gets the maximal value of upper binomial param */
65
- static int GetMax ();
66
-
67
- private:
68
- /* * Computed Pascal's Triangle */
69
- static void ComputePascalsTriangle ();
70
-
71
- static VVectorT pascalsTriangle_;
72
- static int max_;
73
- };
74
-
75
-
76
- template <class T >
77
- inline void Binomial<T>::SetMax (int _max)
78
- {
79
- max_ = _max;
80
- ComputePascalsTriangle ();
81
- }
82
-
83
-
84
- template <class T >
85
- inline int Binomial<T>::GetMax ()
86
- {
87
- return max_;
88
- }
89
-
90
-
91
- template <class T >
92
- typename Binomial<T>::VVectorT Binomial<T>::pascalsTriangle_;
93
-
94
- template <class T >
95
- int Binomial<T>::max_ = 60 ;
96
-
97
-
98
- #include " Binomial.cpp"
99
-
100
- #endif
38
+ \*===========================================================================*/
39
+
40
+ #ifndef BINOMIAL_H
41
+ #define BINOMIAL_H
42
+
43
+ #include < vector>
44
+ #include < assert.h>
45
+
46
+ using std::vector;
47
+
48
+ /* *
49
+ * A template class facilitating fast computation and retrieval of binomials.
50
+ * The binomials are computed only once at first call of Get function according
51
+ * to Pascal's Triangle.
52
+ */
53
+ template <class T >
54
+ class Binomial
55
+ {
56
+ public:
57
+ typedef vector<T> VectorT;
58
+ typedef vector<VectorT> VVectorT;
59
+
60
+ /* * Retrieves the binomial _i "over" _j */
61
+ static T Get (int _i, int _j);
62
+ /* * Sets the maximal value of upper binomial param to _max */
63
+ static void SetMax (int _max);
64
+ /* * Gets the maximal value of upper binomial param */
65
+ static int GetMax ();
66
+
67
+ private:
68
+ /* * Computed Pascal's Triangle */
69
+ static void ComputePascalsTriangle ();
70
+
71
+ static VVectorT pascalsTriangle_;
72
+ static int max_;
73
+ };
74
+
75
+
76
+ template <class T >
77
+ inline void Binomial<T>::SetMax (int _max)
78
+ {
79
+ max_ = _max;
80
+ ComputePascalsTriangle ();
81
+ }
82
+
83
+
84
+ template <class T >
85
+ inline int Binomial<T>::GetMax ()
86
+ {
87
+ return max_;
88
+ }
89
+
90
+
91
+ template <class T >
92
+ typename Binomial<T>::VVectorT Binomial<T>::pascalsTriangle_;
93
+
94
+ template <class T >
95
+ int Binomial<T>::max_ = 60 ;
96
+
97
+
98
+ #include " Binomial.cpp"
99
+
100
+ #endif
0 commit comments