/[paths]/src/graph.h
ViewVC logotype

Annotation of /src/graph.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5 - (hide annotations)
Sat Jul 7 15:20:01 2012 UTC (8 years, 2 months ago) by ben
File MIME type: text/plain
File size: 696 byte(s)
remove useless defitnions

1 ben 2 #ifndef GRAPH_H
2     #define GRAPH_H
3     struct event {
4     int pitch;
5     int duration;
6     int attack;
7     int decay;
8     int sustain;
9     int release;
10     int instrument;
11     int modulation;
12     int detune;
13     int velocity;
14     int volume;
15     };
16    
17     struct node;
18    
19     struct edge {
20     struct node *to;
21     int distance;
22     };
23    
24     struct node {
25     struct event;
26     int wheight;
27     struct edge *neighbours;
28 ben 3 int count;
29 ben 2 };
30    
31 ben 4 struct graph {
32     struct node* nodes;
33     int count;
34     }
35    
36 ben 2 void node_destroy(struct node* n);
37    
38 ben 5 void node_radomize(struct node* n);
39 ben 2
40     void edge_randomize(struct edge* e);
41    
42     void node_link(struct node* a, struct node* b);
43    
44     void node_unlink(struct node* a, struct node* b);
45    
46 ben 5 struct graph* graph_new(int n);
47 ben 2
48 ben 5 void graph_randomize(struct graph*);
49 ben 2
50     #endif

  ViewVC Help
Powered by ViewVC 1.1.26