visualizations

Programmatic visualizations
git clone git://git.laack.co/visualizations.git
Log | Files | Refs | README

edge.hpp (388B)


      1 #ifndef EDGE
      2 #define EDGE
      3 
      4 #include "vert.h"
      5 
      6 typedef struct Edge {
      7     Vertex* v1;
      8     Vertex* v2;
      9     float weight;
     10     bool traversed;
     11     bool operator<(const Edge& other) const {
     12         return weight < other.weight;
     13     }
     14 
     15 } Edge;
     16 
     17 Edge gen_edge(int idx1, int idx2, Vertex* vertices);
     18 Edge* gen_edges(Vertex* vertices, int vtCount, int edgeCount);
     19 void print_edge(Edge* e);
     20 
     21 #endif