Skip to content

Commit

Permalink
minor source code beautification
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed Feb 14, 2012
1 parent c08a984 commit cda7657
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/shogun/mathematics/Math.h
Expand Up @@ -1257,11 +1257,14 @@ class CMath : public CSGObject
static int32_t unique(T* output, int32_t size)
{
qsort(output, size);
int32_t i,j=0 ;
for (i=0; i<size; i++)
int32_t j=0;

for (int32_t i=0; i<size; i++)
{
if (i==0 || output[i]!=output[i-1])
output[j++]=output[i];
return j ;
}
return j;
}

/** compute eigenvalues and eigenvectors of symmetric matrix
Expand Down

0 comments on commit cda7657

Please sign in to comment.