MLPACK
1.0.11
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
mlpack
methods
emst
dtb_stat.hpp
Go to the documentation of this file.
1
22
#ifndef __MLPACK_METHODS_EMST_DTB_STAT_HPP
23
#define __MLPACK_METHODS_EMST_DTB_STAT_HPP
24
25
#include <
mlpack/core.hpp
>
26
27
namespace
mlpack {
28
namespace
emst {
29
34
class
DTBStat
35
{
36
private
:
39
double
maxNeighborDistance
;
40
43
double
minNeighborDistance
;
44
46
double
bound
;
47
52
int
componentMembership
;
53
54
public
:
59
DTBStat
() :
60
maxNeighborDistance
(DBL_MAX),
61
minNeighborDistance
(DBL_MAX),
62
bound
(DBL_MAX),
63
componentMembership
(-1) { }
64
72
template
<
typename
TreeType>
73
DTBStat
(
const
TreeType& node) :
74
maxNeighborDistance
(DBL_MAX),
75
minNeighborDistance
(DBL_MAX),
76
bound
(DBL_MAX),
77
componentMembership
(
78
((node.NumPoints() == 1) && (node.NumChildren() == 0)) ?
79
node.Point(0) : -1) { }
80
82
double
MaxNeighborDistance
()
const
{
return
maxNeighborDistance
; }
84
double
&
MaxNeighborDistance
() {
return
maxNeighborDistance
; }
85
87
double
MinNeighborDistance
()
const
{
return
minNeighborDistance
; }
89
double
&
MinNeighborDistance
() {
return
minNeighborDistance
; }
90
92
double
Bound
()
const
{
return
bound
; }
94
double
&
Bound
() {
return
bound
; }
95
97
int
ComponentMembership
()
const
{
return
componentMembership
; }
99
int
&
ComponentMembership
() {
return
componentMembership
; }
100
101
};
// class DTBStat
102
103
};
// namespace emst
104
};
// namespace mlpack
105
106
#endif // __MLPACK_METHODS_EMST_DTB_STAT_HPP
Generated by
1.8.3.1