The LevAWC Project
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
Macros | Functions
algo.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "algo.h"

Go to the source code of this file.

Macros

#define OK   0
 
#define TRUE   1
 
#define FALSE   0
 

Functions

int ALGOdsp (Graph gr, const DspVertexdata start, Slist *spath, int(*match)(const void *key1, const void *key2))
 
int ALGOmst (Graph gr, const MstVertexdata start, Slist *span, int(*match)(const void *key1, const void *key2))
 
int ALGOtsp (Slist vertices, const TspVertexdata start, Slist *tour, int(*match)(const void *key1, const void *key2))
 
int ALGObfs (Graph gr, const BfsVertexdata start, Slist *hops, int(*match)(const void *key1, const void *key2))
 
int ALGOdfs (Graph gr, Slist *ordered)
 

Function Documentation

int ALGObfs ( Graph  gr,
const BfsVertexdata  start,
Slist hops,
int(*)(const void *key1, const void *key2)  match 
)

Do a breadth-first search in a graph

Definition at line 380 of file algo.c.

int ALGOdfs ( Graph  gr,
Slist ordered 
)

Do a depth-first search in a graph

Definition at line 499 of file algo.c.

int ALGOdsp ( Graph  gr,
const DspVertexdata  start,
Slist spath,
int(*)(const void *key1, const void *key2)  match 
)

Find shortest path with Dijkstra's algorithm

Definition at line 45 of file algo.c.

int ALGOmst ( Graph  gr,
const MstVertexdata  start,
Slist span,
int(*)(const void *key1, const void *key2)  match 
)

Find minimal spanning tree with Prims's algorithm

Definition at line 161 of file algo.c.

int ALGOtsp ( Slist  vertices,
const TspVertexdata  start,
Slist tour,
int(*)(const void *key1, const void *key2)  match 
)

Find route for Travelling Salesman

Definition at line 272 of file algo.c.