Skip to content

Commit

Permalink
Fix type issues - thanks Lin Ziyuan for the report.
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed Apr 6, 2011
1 parent c0c5990 commit 827a449
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/libshogun/lib/Mathematics.h
Expand Up @@ -1090,8 +1090,8 @@ class CMath : public CSGObject
template <class T>
static T* get_row_sum(T* matrix, int32_t m, int32_t n)
{
T* rowsums=new float64_t[n];
fill_vector(rowsums, n, 0.0);
T* rowsums=new T[n];
fill_vector(rowsums, n, (T) 0);

for (int32_t i=0; i<n; i++)
{
Expand All @@ -1105,8 +1105,8 @@ class CMath : public CSGObject
template <class T>
static T* get_column_sum(T* matrix, int32_t m, int32_t n)
{
T* colsums=new float64_t[m];
fill_vector(colsums, m, 0.0);
T* colsums=new T[m];
fill_vector(colsums, m, (T) 0);

for (int32_t i=0; i<n; i++)
{
Expand All @@ -1123,7 +1123,7 @@ class CMath : public CSGObject
float64_t num_data=n;

T* colsums=get_column_sum(matrix, m,n);
T* rowsums=get_column_sum(matrix, m,n);
T* rowsums=get_row_sum(matrix, m,n);

for (int32_t i=0; i<m; i++)
colsums[i]/=num_data;
Expand Down

0 comments on commit 827a449

Please sign in to comment.