MLPACK
1.0.8
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
mlpack
core
tree
cosine_tree
cosine_tree.hpp
Go to the documentation of this file.
1
23
#ifndef __MLPACK_CORE_TREE_COSINE_TREE_COSINE_TREE_HPP
24
#define __MLPACK_CORE_TREE_COSINE_TREE_COSINE_TREE_HPP
25
26
#include <
mlpack/core.hpp
>
27
28
namespace
mlpack {
29
namespace
tree {
30
31
class
CosineTree
32
{
33
private
:
35
arma::mat
data
;
37
arma::rowvec
centroid
;
39
arma::vec
probabilities
;
41
CosineTree
*
left
;
43
CosineTree
*
right
;
45
size_t
numPoints
;
46
47
public
:
49
//typedef MatType Mat;
57
CosineTree
(arma::mat
data
, arma::rowvec
centroid
, arma::vec
probabilities
);
58
62
CosineTree
();
63
69
~CosineTree
();
70
72
CosineTree
*
Left
()
const
;
73
75
void
Left
(
CosineTree
* child);
76
78
CosineTree
*
Right
()
const
;
79
81
void
Right
(
CosineTree
* child);
82
89
CosineTree
&
Child
(
const
size_t
child)
const
;
90
92
size_t
NumPoints
()
const
;
93
95
arma::mat
Data
();
96
98
void
Data
(arma::mat& d);
99
101
arma::vec
Probabilities
();
102
104
void
Probabilities
(arma::vec& prob);
105
107
arma::rowvec
Centroid
();
108
110
void
Centroid
(arma::rowvec& centr);
111
112
};
113
114
};
// namespace tree
115
};
// namespace mlpack
116
117
// Include implementation.
118
#include "cosine_tree_impl.hpp"
119
120
#endif
Generated by
1.8.3.1