This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Compile your code (using mex) with -g flag | |
2) Call gdb via MATLAB's 'matlab -Dgdb' functionality | |
3) Set a breakpoint for instance by 'break testfile.cpp:9' | |
3) Run MATLAB without the JVM by 'run -nojvm' | |
4) Now, run the segfaulting mex function | |
5) Get a backtrace via 'bt' and use your debugging magic | |
Example: | |
$ cd '/mycode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""kw-techtip-04-03-2013-p3.py | |
Compute BoW representations and train / test a SVM classifier in a N-fold | |
cross-validation setup. | |
Usage | |
----- | |
$ python kw-techtip-04-03-2013-p3.py <DataFile> <IndexFile> <ClassInfoFile> | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""kw-techtip-04-03-2013-p2.py | |
Fine-structure analysis of a graph. | |
Usage | |
----- | |
Assuming that the file "graph.txt" generated by kw-techtip-04-03-2013-p1.py | |
resides in "/tmp", run | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""kw-techtip-04-03-2013-p1.py | |
Simple example of how to construct a graph from a {0,1} adjacency matrix and a | |
file with vertex labels. | |
Usage | |
----- | |
$ python kw-techtip-04-03-2013-p1.py <AdjacencyFile> <LabelFile> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2014-09-29 09:29:04 +0200 | |
make | |
all | |
clang -O -c -o vecLibFort.o vecLibFort.c | |
clang -shared -O -DVECLIBFORT_INTERPOSE -o libvecLibFortI.dylib -O vecLibFort.c \ | |
-Wl,-reexport_framework -Wl,Accelerate \ | |
-install_name /usr/local/lib/libvecLibFortI.dylib | |
ar -cru libvecLibFort.a vecLibFort.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2014-09-29 09:29:04 +0200 | |
make | |
all | |
clang -O -c -o vecLibFort.o vecLibFort.c | |
clang -shared -O -DVECLIBFORT_INTERPOSE -o libvecLibFortI.dylib -O vecLibFort.c \ | |
-Wl,-reexport_framework -Wl,Accelerate \ | |
-install_name /usr/local/lib/libvecLibFortI.dylib | |
ar -cru libvecLibFort.a vecLibFort.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [pos_ev_idx,neg_ev_idx,seed,data] = test_negative_type_simple(options) | |
% TEST_NEGATIVE_TYPE_SIMPLE evaluate the eigenvalues of Gram matrices | |
% | |
% This function evaluates the number of positive/negative eigenvalues | |
% of the Gram matrix M, either constructed from the (1) q-Wasserstein | |
% distance or (2) the bottleneck distance. | |
% | |
% Both distances lead to nonnegative (symmetric) Gram matrices and | |
% the question is if the Gram matrices are (conditionally) negative | |
% definite (see suppl. material). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int f(int a, int b, int c) | |
{ | |
int c; | |
c = a + b; | |
return c; | |
} | |
int main() | |
{ | |
int a; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int a = 1111; | |
int main() { | |
a = 3333; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int g(int x, int y) { | |
if (y > 0) | |
return g(x, y - 1) + 1 ; | |
else | |
return x; | |
} | |
int main() { | |
int a; |
OlderNewer