This chapter describes the mine C++ wrapper. The class is declared in the header file cppmine.h
, located in the libmine/
folder. You need to add #include "cppmine.h"
in your C++ source files and link your program with mine.c
and cppmine.c
.
See the c_api
documentation.
The example is located in examples/cpp_example.cpp
.
../../examples/cpp_example.cpp
To compile the example, open a terminal, go into the example (examples/
) folder and run:
$ g++ -O3 -Wall -Wno-write-strings cpp_example.cpp ../libmine/cppmine.cpp \
../libmine/mine.c -I../libmine/
Run the example by typing:
MIC: 0.999999
MAS: 0.728144
MEV: 0.999999
MCN (eps=0): 4.58496
MCN (eps=1-MIC): 4.58496
TIC: 67.5236
The example is located in examples/cpp_example2.cpp
.
../../examples/cpp_example2.cpp
To compile the example, open a terminal, go into the example (examples/
) folder and run:
$ g++ -O3 -Wall -Wno-write-strings cpp_example2.cpp ../libmine/cppmine.cpp \
../libmine/mine.c -I../libmine/
Run the example by typing:
$ ./a.out
MIC: 0.291692