Easy_rider
 
Loading...
Searching...
No Matches
RoadGenerator.h
1#ifndef ROAD_GENERATOR_H
2#define ROAD_GENERATOR_H
3
4#include "Graph.h"
5#include "Intersection.h"
6#include "Road.h"
12public:
13 virtual ~RoadGenerator() = default;
14
18 virtual void generate(Graph<Intersection, Road> &graph) = 0;
19
20protected:
27 static double euclid(const Intersection &a, const Intersection &b);
28};
29
30#endif // ROAD_GENERATOR_H
A generic Graph template parameterized on Node and Edge types.
Declaration of the Intersection class representing a point in 2D space.
Declaration of the Road class representing a connection between two Intersections.
A templated graph storing nodes of type T and edges of type U.
Definition Graph.h:58
Represents a point (intersection) in a 2D coordinate system.
Definition Intersection.h:16
Abstract base class for generating roads on a Graph<Intersection,Road>.
Definition RoadGenerator.h:11
static double euclid(const Intersection &a, const Intersection &b)
Compute the Euclidean distance between two intersections.
Definition RoadGenerator.cpp:4
virtual void generate(Graph< Intersection, Road > &graph)=0
Append new bidirectional roads into the graph (no duplicates).