Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixes for transition
  • Loading branch information
gsomix committed May 3, 2012
1 parent 7c05227 commit b225c47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions examples/undocumented/libshogun/library_hashset.cpp
@@ -1,4 +1,4 @@
#include <shogun/lib/HashSet.h>
#include <shogun/lib/HSet.h>
#include <stdio.h>

using namespace shogun;
Expand All @@ -8,10 +8,13 @@ int main(int argc, char** argv)
init_shogun();
double v[8] = {0.0,0.0,0.1,0.1,0.2,0.2,0.3,0.3};

CHashSet* set = new CHashSet(8);
CHSet<double>* set = new CHSet<double>(2, 8);

for (int i=0; i<8; i++)
set->insert_key(i,v[i]);
set->add(v[i]);

set->remove(0.1);
set->add(0.4);

delete set;
exit_shogun();
Expand Down
2 changes: 1 addition & 1 deletion src/shogun/base/init.cpp
Expand Up @@ -54,7 +54,7 @@ namespace shogun
sg_math = new shogun::CMath();
#ifdef TRACE_MEMORY_ALLOCS
if (!sg_mallocs)
sg_mallocs = new shogun::CSet<MemoryBlock>(false);
sg_mallocs = new shogun::CSet<MemoryBlock>(631, 1024);

SG_REF(sg_mallocs);
#endif
Expand Down

0 comments on commit b225c47

Please sign in to comment.