Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Friends
Macros
Pages
include
paal
data_structures
metric
metric_traits.hpp
Go to the documentation of this file.
1
//=======================================================================
2
// Copyright (c) 2013 Piotr Wygocki
3
//
4
// Distributed under the Boost Software License, Version 1.0. (See
5
// accompanying file LICENSE_1_0.txt or copy at
6
// http://www.boost.org/LICENSE_1_0.txt)
7
//=======================================================================
15
#ifndef PAAL_METRIC_TRAITS_HPP
16
#define PAAL_METRIC_TRAITS_HPP
17
18
#include "
paal/utils/type_functions.hpp
"
19
20
#include <type_traits>
21
22
namespace
paal {
23
namespace
data_structures {
24
31
template
<
typename
Metric,
typename
_VertexType>
struct
_metric_traits
{
32
using
VertexType = _VertexType;
34
using
DistanceType
=
puretype
(std::declval<Metric>()(
35
std::declval<VertexType>(), std::declval<VertexType>()));
36
};
37
43
template
<
typename
Metric>
44
struct
metric_traits
:
public
_metric_traits
<Metric, int> {};
45
}
46
}
47
#endif // PAAL_METRIC_TRAITS_HPP
type_functions.hpp
puretype
#define puretype(t)
for given expression returns its type with removed const and reference
Definition:
type_functions.hpp:32
paal::data_structures::_metric_traits
base for metric traits
Definition:
metric_traits.hpp:31
paal::data_structures::metric_traits
metric traits
Definition:
metric_traits.hpp:44
paal::data_structures::_metric_traits::DistanceType
puretype(std::declval< Metric >()(std::declval< VertexType >(), std::declval< VertexType >())) DistanceType
Distance type.
Definition:
metric_traits.hpp:35
Generated on Tue Jan 31 2017 00:30:50 by
1.8.5