aquirin / pathfinder Goto Github PK
View Code? Open in Web Editor NEWImplementation of various Pathfinder / PFNET algorithms, check also http://aquirin.ovh.org/research/mstpathfinder.html
Implementation of various Pathfinder / PFNET algorithms, check also http://aquirin.ovh.org/research/mstpathfinder.html
Hi,
I'm trying to apply a pathfinder algorithm to a directed graph, according to your web page the better algorithm to do that is the Binary Pathfinder, which is also the only one without a makefile.
I had tried to create one using the others as it could be seen in the following code
#
# MAKEFILE
#
# -g: Compilar
# -c: Permitir depuracion posterior
# For "valgrind -v --leak-check=yes --show-reachable=yes "
#CFLAGS = -g -c -O0
# Normal way
CFLAGS = -c -O3
# Ficheros .c
C = binary.c routines.c
# Ficheros .o
O = binary.o routines.o
# Compilacion inicial
.c.o:
gcc $(CFLAGS) $(C)
# Compilacion final
pathfinder: binary.o $(O)
gcc -o binary_pathfinder $(O) -lm
clean:
rm -rf binary_pathfinder *.o
But i got several errors with the routines.c
file:
$ make
gcc -g -c -O3 binary.c routines.c
routines.c: In function ‘alead’:
routines.c:288:9: warning: incompatible implicit declaration of built-in function ‘fabs’
return fabs(b-a)*rand()/(RAND_MAX+1.0)+MIN(a,b);
^
routines.c: In function ‘aleado’:
routines.c:293:9: warning: incompatible implicit declaration of built-in function ‘fabs’
return fabs(b-a)*rand()/(RAND_MAX)+MIN(a,b);
^
routines.c: In function ‘rnd’:
routines.c:353:9: warning: incompatible implicit declaration of built-in function ‘floor’
return floor(f*g+0.5)/g; // Comportement OK : rnd(-2.5,0) = -2
^
routines.c: In function ‘rnd_sup’:
routines.c:363:9: warning: incompatible implicit declaration of built-in function ‘ceil’
return ceil(f*g)/g;
^
routines.c: In function ‘rnd_inf’:
routines.c:373:9: warning: incompatible implicit declaration of built-in function ‘floor’
return floor(f*g)/g;
^
routines.c: At top level:
routines.c:913:7: error: conflicting types for ‘getline’
char* getline(FILE* in, int *size)
^
In file included from base.h:5:0,
from routines.c:5:
/usr/include/stdio.h:678:20: note: previous declaration of ‘getline’ was here
extern _IO_ssize_t getline (char **__restrict __lineptr,
^
makefile:25: recipe for target 'binary.o' failed
make: *** [binary.o] Error 1
I'm using GNU Make 4.0 and gcc 4.9.2 on a Debian 8.7 machine.
Thanks in advance.
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.