Giter Site home page Giter Site logo

pathfinder's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pathfinder's Issues

Missing makefile in Binary Pathfinder

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.