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
This commit is contained in:
Davis King 2010-01-31 18:55:25 +00:00
parent c49e76ad2e
commit 31662ca6d0
2 changed files with 10 additions and 7 deletions

View File

@ -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
)

View File

@ -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