#include <list>
using std::list;

// Reserve the name for each Struct to allow recursive definition
struct Graph;
struct Vertex;
struct Edge;


struct Graph {
  list<Vertex*> vertices;
};


struct Vertex {
  int id;
  double x;
  double y;
  list<Edge*> edges;
  Vertex(int pId, double pX, double pY)
      : id(pId), x(pX), y(pY) {}
};

struct Edge {
    Vertex *source;
    Vertex *target;
    double weight;
    Edge(Vertex *pSource, Vertex *pTarget, double pWeight)
        : source(pSource), target(pTarget), weight(pWeight) { }
};
