Skip to content

Commit

Permalink
Got examples back to work
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Jun 26, 2012
1 parent 7c20b8c commit 3eb7bcd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Expand Up @@ -74,7 +74,7 @@ int main(int argc, char **argv)
SG_SPRINT("%f, ", vec.features[j].entry);

SG_SPRINT("]\n");
f->free_sparse_feature_vector(vec, i);
f->free_sparse_feature_vector(i);
}

/* indices that are to copy */
Expand All @@ -99,7 +99,7 @@ int main(int argc, char **argv)
SG_SPRINT("%f, ", vec.features[j].entry);

SG_SPRINT("]\n");
subset_copy->free_sparse_feature_vector(vec, i);
subset_copy->free_sparse_feature_vector(i);
}

/* test if all elements are copied correctly */
Expand All @@ -119,7 +119,7 @@ int main(int argc, char **argv)
ASSERT(a_idx==b_idx);
}

subset_copy->free_sparse_feature_vector(vec, i);
subset_copy->free_sparse_feature_vector(i);
}

SG_UNREF(f);
Expand Down
Expand Up @@ -37,8 +37,8 @@ void check_transposed(CSparseFeatures<int32_t>* features)
ASSERT(orig_vec.features[j].entry==new_vec.features[j].entry);

/* not necessary since feature matrix is in memory. for documentation */
features->free_sparse_feature_vector(orig_vec, i);
double_transposed->free_sparse_feature_vector(new_vec, i);
features->free_sparse_feature_vector(i);
double_transposed->free_sparse_feature_vector(i);
}

SG_UNREF(transposed);
Expand Down Expand Up @@ -107,7 +107,7 @@ int main(int argc, char **argv)
ASSERT(a==b);
}

features->free_sparse_feature_vector(vec, i);
features->free_sparse_feature_vector(i);
}

/* remove features subset */
Expand Down Expand Up @@ -141,7 +141,7 @@ int main(int argc, char **argv)
for (index_t j=0; j<vec.num_feat_entries; ++j)
ASSERT(vec.features[j].entry==data.matrix[i*num_vectors+j]);

features->free_sparse_feature_vector(vec, i);
features->free_sparse_feature_vector(i);
}

SG_UNREF(features);
Expand Down
Expand Up @@ -8,7 +8,7 @@
*/

#include <shogun/base/init.h>
#include <shogun/features/Labels.h>
#include <shogun/labels/RegressionLabels.h>
#include <shogun/features/DenseFeatures.h>
#include <shogun/kernel/GaussianKernel.h>
#include <shogun/mathematics/Math.h>
Expand Down Expand Up @@ -110,4 +110,4 @@ int main(int argc, char **argv)
exit_shogun();

return 0;
}
}

0 comments on commit 3eb7bcd

Please sign in to comment.