mlpack
3.1.1
src
mlpack
methods
range_search
range_search_stat.hpp
Go to the documentation of this file.
1
13
#ifndef MLPACK_METHODS_RANGE_SEARCH_RANGE_SEARCH_STAT_HPP
14
#define MLPACK_METHODS_RANGE_SEARCH_RANGE_SEARCH_STAT_HPP
15
16
#include <
mlpack/prereqs.hpp
>
17
18
namespace
mlpack
{
19
namespace
range {
20
26
class
RangeSearchStat
27
{
28
public
:
32
RangeSearchStat
() : lastDistance(0.0) { }
33
38
template
<
typename
TreeType>
39
RangeSearchStat
(TreeType&
/* node */
) :
40
lastDistance(0.0) { }
41
43
double
LastDistance
()
const
{
return
lastDistance; }
45
double
&
LastDistance
() {
return
lastDistance; }
46
48
template
<
typename
Archive>
49
void
serialize
(Archive& ar,
const
unsigned
int
/* version */
)
50
{
51
ar & BOOST_SERIALIZATION_NVP(lastDistance);
52
}
53
54
private
:
56
double
lastDistance;
57
};
58
59
}
// namespace range
60
}
// namespace mlpack
61
62
#endif
mlpack::range::RangeSearchStat::LastDistance
double LastDistance() const
Get the last distance evaluation.
Definition:
range_search_stat.hpp:43
prereqs.hpp
mlpack::range::RangeSearchStat::LastDistance
double & LastDistance()
Modify the last distance evaluation.
Definition:
range_search_stat.hpp:45
mlpack
@serialization.hpp
Definition:
add_to_po.hpp:21
mlpack::range::RangeSearchStat
Statistic class for RangeSearch, to be set to the StatisticType of the tree type that range search is...
Definition:
range_search_stat.hpp:26
mlpack::range::RangeSearchStat::serialize
void serialize(Archive &ar, const unsigned int)
Serialize the statistic.
Definition:
range_search_stat.hpp:49
mlpack::range::RangeSearchStat::RangeSearchStat
RangeSearchStat()
Initialize the statistic.
Definition:
range_search_stat.hpp:32
mlpack::range::RangeSearchStat::RangeSearchStat
RangeSearchStat(TreeType &)
Initialize the statistic given a tree node that this statistic belongs to.
Definition:
range_search_stat.hpp:39
Generated by
1.8.17