Skip to content

Commit

Permalink
Added hashset example, fixed fibonacci heap one
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Aug 23, 2011
1 parent 59a6f41 commit 9f349fd
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/undocumented/libshogun/Makefile
Expand Up @@ -36,6 +36,7 @@ TARGETS = basic_minimal classifier_libsvm classifier_minimal_svm \
splitting_stratified_crossvalidation \
mathematics_arpack \
library_fibonacci_heap \
library_hashset \

all: $(TARGETS)

Expand Down
3 changes: 2 additions & 1 deletion examples/undocumented/libshogun/library_fibonacci_heap.cpp
Expand Up @@ -24,7 +24,8 @@ int main(int argc, char** argv)
printf("Fibonacci heap goes wrong.\n");
}
}


delete heap;
exit_shogun();
return 0;
}
Expand Down
20 changes: 20 additions & 0 deletions examples/undocumented/libshogun/library_hashset.cpp
@@ -0,0 +1,20 @@
#include <shogun/lib/HashSet.h>
#include <stdio.h>

using namespace shogun;

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);

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

delete set;
exit_shogun();
return 0;
}

0 comments on commit 9f349fd

Please sign in to comment.