tsort.h 663 B

1234567891011121314151617181920212223242526
  1. /*
  2. * tsort.h - Topological sort
  3. *
  4. * Written 2010 by Werner Almesberger
  5. * Copyright 2010 by Werner Almesberger
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. */
  12. #ifndef TSORT_H
  13. #define TSORT_H
  14. struct node;
  15. struct tsort;
  16. struct node *add_node(struct tsort *tsort, void *user, int decay);
  17. void add_edge(struct node *from, struct node *to, int priority);
  18. struct tsort *begin_tsort(void);
  19. void **end_tsort(struct tsort *tsort);
  20. #endif /* !TSORT_H */