Skip to content

Commit

Permalink
PNorm: initialise the norm to 0.0 in the beginning
Browse files Browse the repository at this point in the history
  • Loading branch information
vigsterkr committed Apr 13, 2012
1 parent 92348cf commit 7f6d2d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shogun/preprocessor/PNorm.cpp
Expand Up @@ -117,7 +117,7 @@ void CPNorm::register_param ()

inline float64_t CPNorm::get_pnorm (float64_t* vec, int32_t vec_len) const
{
float64_t norm;
float64_t norm = 0.0;
if (m_p == 1.0)
{
for (int i = 0; i < vec_len; ++i)
Expand Down

0 comments on commit 7f6d2d2

Please sign in to comment.