Commit 31662ca6 authored by Davis King's avatar Davis King

I just made the way the template is declared for the pick_initial_centers()

function a little more flexible.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403427
parent c49e76ad
......@@ -295,13 +295,14 @@ namespace dlib
};
template <
typename vector_type,
typename vector_type1,
typename vector_type2,
typename kernel_type
>
void pick_initial_centers(
long num_centers,
vector_type& centers,
const vector_type& samples,
vector_type1& centers,
const vector_type2& samples,
const kernel_type& k,
double percentile = 0.01
)
......
......@@ -204,13 +204,14 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template <
typename vector_type,
typename vector_type1,
typename vector_type2,
typename kernel_type
>
void pick_initial_centers(
long num_centers,
vector_type& centers,
const vector_type& samples,
vector_type1& centers,
const vector_type2& samples,
const kernel_type& k,
double percentile = 0.01
);
......@@ -219,7 +220,8 @@ namespace dlib
- num_centers > 1
- 0 <= percentile < 1
- samples.size() > 1
- vector_type == something with an interface compatible with std::vector
- vector_type1 == something with an interface compatible with std::vector
- vector_type2 == something with an interface compatible with std::vector
- k(samples[0],samples[0]) must be a valid expression that returns a double
ensures
- finds num_centers candidate cluster centers in the data in the samples
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment