braintech / matching-pursuit Goto Github PK
View Code? Open in Web Editor NEWMatching Pursuit binary engine
Matching Pursuit binary engine
I installed the software following the steps mentioned by the contributer. When I run the code with an LFP signal, the software somehow changes the signal to something else (That is in the final output the signal shown is not the signal given) and decompose it using the matching pursuit. Please help me solve this issue.
I have tried compiling with the instructions provided, yet the process fails during linking. Log of make:
$ make
CC src/mp5-atom.o
CC src/mp5-cmd.o
CC src/mp5-dic.o
src/dic.c:978:29: warning: ‘fromDiracToSinCos’ is static but declared in inline function ‘getAtom’ which is not static
978 | static unsigned int fromDiracToSinCos;
| ^~~~~~~~~~~~~~~~~
src/dic.c:977:29: warning: ‘fromDiracToGauss’ is static but declared in inline function ‘getAtom’ which is not static
977 | static unsigned int fromDiracToGauss;
| ^~~~~~~~~~~~~~~~
src/dic.c:976:29: warning: ‘fromDirac’ is static but declared in inline function ‘getAtom’ which is not static
976 | static unsigned int fromDirac;
| ^~~~~~~~~
src/dic.c:975:21: warning: ‘flag’ is static but declared in inline function ‘getAtom’ which is not static
975 | static char flag = NO;
| ^~~~
CC src/mp5-io_mp5.o
src/io_mp5.c: In function ‘createNamesOfResultFiles’:
src/io_mp5.c:1010:9: warning: ‘strncat’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
1010 | strncat(nameOfResultsFile,mp5Parameters->nameOfDataFile,strlen(mp5Parameters->nameOfDataFile)-len);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/io_mp5.c:1010:65: note: length computed here
1010 | strncat(nameOfResultsFile,mp5Parameters->nameOfDataFile,strlen(mp5Parameters->nameOfDataFile)-len);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC src/mp5-main.o
In file included from src/main.c:33:
./src/include/dic.h:37:22: warning: inline function ‘getAtom’ declared but never defined
37 | inline Atom* getAtom(const Dictionary *dictionary, unsigned int atomIndex);
| ^~~~~~~
CC src/mp5-matrix.o
CC src/mp5-mmp.o
In file included from src/mmp.c:29:
./src/include/dic.h:37:22: warning: inline function ‘getAtom’ declared but never defined
37 | inline Atom* getAtom(const Dictionary *dictionary, unsigned int atomIndex);
| ^~~~~~~
CC src/mp5-mp5.o
In file included from src/mp5.c:33:
./src/include/dic.h:37:22: warning: inline function ‘getAtom’ declared but never defined
37 | inline Atom* getAtom(const Dictionary *dictionary, unsigned int atomIndex);
| ^~~~~~~
CC src/mp5-queue.o
CC src/mp5-r250.o
CC src/mp5-smp.o
In file included from src/smp.c:28:
./src/include/dic.h:37:22: warning: inline function ‘getAtom’ declared but never defined
37 | inline Atom* getAtom(const Dictionary *dictionary, unsigned int atomIndex);
| ^~~~~~~
CC src/mp5-stringTools.o
CC src/mp5-tools.o
CC src/mp5-vector.o
CC src/mp5-random.o
CC src/mp5-mtwist.o
CCLD mp5
/usr/bin/ld: src/mp5-random.o: in function `mts_lrand':
[..]/matching-pursuit/./src/include/mtwist.h:393: multiple definition of `mts_lrand'; src/mp5-dic.o:[..]/matching-pursuit/./src/include/mtwist.h:393: first defined here
/usr/bin/ld: src/mp5-random.o: in function `mts_llrand':
[..]/matching-pursuit/./src/include/mtwist.h:419: multiple definition of `mts_llrand'; src/mp5-dic.o:[..]/matching-pursuit/./src/include/mtwist.h:419: first defined here
/usr/bin/ld: src/mp5-random.o: in function `mts_drand':
[..]/matching-pursuit/./src/include/mtwist.h:464: multiple definition of `mts_drand'; src/mp5-dic.o:[..]/matching-pursuit/./src/include/mtwist.h:464: first defined here
/usr/bin/ld: src/mp5-random.o: in function `mts_ldrand':
[..]/matching-pursuit/./src/include/mtwist.h:480: multiple definition of `mts_ldrand'; src/mp5-dic.o:[..]/matching-pursuit/./src/include/mtwist.h:480: first defined here
/usr/bin/ld: src/mp5-random.o: in function `mt_lrand':
[..]/matching-pursuit/./src/include/mtwist.h:531: multiple definition of `mt_lrand'; src/mp5-dic.o:[..]/matching-pursuit/./src/include/mtwist.h:531: first defined here
/usr/bin/ld: src/mp5-random.o: in function `mt_llrand':
[..]/matching-pursuit/./src/include/mtwist.h:548: multiple definition of `mt_llrand'; src/mp5-dic.o:[..]/matching-pursuit/./src/include/mtwist.h:548: first defined here
/usr/bin/ld: src/mp5-random.o: in function `mt_drand':
[..]/matching-pursuit/./src/include/mtwist.h:595: multiple definition of `mt_drand'; src/mp5-dic.o:[..]/matching-pursuit/./src/include/mtwist.h:595: first defined here
/usr/bin/ld: src/mp5-random.o: in function `mt_ldrand':
[..]/matching-pursuit/./src/include/mtwist.h:610: multiple definition of `mt_ldrand'; src/mp5-dic.o:[..]/matching-pursuit/./src/include/mtwist.h:610: first defined here
/usr/bin/ld: src/mp5-mtwist.o: in function `mts_lrand':
[..]/matching-pursuit/./src/include/mtwist.h:393: multiple definition of `mts_lrand'; src/mp5-dic.o:[..]/matching-pursuit/./src/include/mtwist.h:393: first defined here
/usr/bin/ld: src/mp5-mtwist.o: in function `mts_llrand':
[..]/matching-pursuit/./src/include/mtwist.h:419: multiple definition of `mts_llrand'; src/mp5-dic.o:[..]/matching-pursuit/./src/include/mtwist.h:419: first defined here
/usr/bin/ld: src/mp5-mtwist.o: in function `mts_drand':
[..]/matching-pursuit/./src/include/mtwist.h:464: multiple definition of `mts_drand'; src/mp5-dic.o:[..]/matching-pursuit/./src/include/mtwist.h:464: first defined here
/usr/bin/ld: src/mp5-mtwist.o: in function `mts_ldrand':
[..]/matching-pursuit/./src/include/mtwist.h:480: multiple definition of `mts_ldrand'; src/mp5-dic.o:[..]/matching-pursuit/./src/include/mtwist.h:480: first defined here
/usr/bin/ld: src/mp5-mtwist.o: in function `mt_lrand':
[..]/matching-pursuit/./src/include/mtwist.h:531: multiple definition of `mt_lrand'; src/mp5-dic.o:[..]/matching-pursuit/./src/include/mtwist.h:531: first defined here
/usr/bin/ld: src/mp5-mtwist.o: in function `mt_llrand':
[..]/matching-pursuit/./src/include/mtwist.h:548: multiple definition of `mt_llrand'; src/mp5-dic.o:[..]/matching-pursuit/./src/include/mtwist.h:548: first defined here
/usr/bin/ld: src/mp5-mtwist.o: in function `mt_drand':
[..]/matching-pursuit/./src/include/mtwist.h:595: multiple definition of `mt_drand'; src/mp5-dic.o:[..]/matching-pursuit/./src/include/mtwist.h:595: first defined here
/usr/bin/ld: src/mp5-mtwist.o: in function `mt_ldrand':
[..]/matching-pursuit/./src/include/mtwist.h:610: multiple definition of `mt_ldrand'; src/mp5-dic.o:[..]/matching-pursuit/./src/include/mtwist.h:610: first defined here
/usr/bin/ld: src/mp5-mmp.o: in function `firstIterationMMP':
[..]/matching-pursuit/src/mmp.c:383: undefined reference to `getAtom'
/usr/bin/ld: [..]/matching-pursuit/src/mmp.c:433: undefined reference to `getAtom'
/usr/bin/ld: src/mp5-mmp.o: in function `nextIterationMMP':
[..]/matching-pursuit/src/mmp.c:969: undefined reference to `getAtom'
/usr/bin/ld: [..]/matching-pursuit/src/mmp.c:894: undefined reference to `getAtom'
/usr/bin/ld: src/mp5-mmp.o: in function `firstIterationMultiChannelMultiTrial':
[..]/matching-pursuit/src/mmp.c:1336: undefined reference to `getAtom'
/usr/bin/ld: src/mp5-mmp.o:[..]/matching-pursuit/src/mmp.c:1386: more undefined references to `getAtom' follow
collect2: error: ld returned 1 exit status
make: *** [Makefile:491: mp5] Error 1
I'm using GCC 12
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror --with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.1.0 (GCC)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.