forked from boostorg/algorithm
Added some concept checking, and renamed a few template parameters.
[SVN r45227]
This commit is contained in:
38
include/boost/algorithm/cluster/concept.hpp
Normal file
38
include/boost/algorithm/cluster/concept.hpp
Normal file
@ -0,0 +1,38 @@
|
||||
// (C) Copyright Jonathan Franklin 2008.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#if ! defined BOOST_ALGORITHM_CLUSTER_CONCEPT_HPP
|
||||
#define BOOST_ALGORITHM_CLUSTER_CONCEPT_HPP
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace algorithm
|
||||
{
|
||||
namespace cluster
|
||||
{
|
||||
|
||||
// TODO: Document the purpose of this concept.
|
||||
template<typename T, typename DistanceFunT>
|
||||
struct DistanceComparableConcept
|
||||
{
|
||||
void constraints()
|
||||
{
|
||||
// Operation
|
||||
d(t, t);
|
||||
}
|
||||
private:
|
||||
T t;
|
||||
DistanceFunT d;
|
||||
};
|
||||
|
||||
// TODO: Add concepts here, then delete this comment.
|
||||
|
||||
} // End of namespace cluster;
|
||||
} // End of namespace algorithm;
|
||||
} // End of namespace boost;
|
||||
|
||||
#endif // BOOST_ALGORITHM_CLUSTER_CONCEPT_HPP
|
Reference in New Issue
Block a user