mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-12-22 23:55:30 +02:00
190bcaf982
- tsort.h, tsort.c, Makefile: stable topological sort with priorities - fpd.l, fpd.y: added directive %tsort to test-drive the sort algorithm - README: documented %tsort git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5942 99fdad57-331a-0410-800a-d7fa5415bdb3
26 lines
663 B
C
26 lines
663 B
C
/*
|
|
* tsort.h - Topological sort
|
|
*
|
|
* Written 2010 by Werner Almesberger
|
|
* Copyright 2010 by Werner Almesberger
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*/
|
|
|
|
#ifndef TSORT_H
|
|
#define TSORT_H
|
|
|
|
struct node;
|
|
struct tsort;
|
|
|
|
struct node *add_node(struct tsort *tsort, void *user, int decay);
|
|
void add_edge(struct node *from, struct node *to, int priority);
|
|
|
|
struct tsort *begin_tsort(void);
|
|
void **end_tsort(struct tsort *tsort);
|
|
|
|
#endif /* !TSORT_H */
|