Easy_rider
 
Loading...
Searching...
No Matches
RoadGenerator Class Referenceabstract

Abstract base class for generating roads on a Graph<Intersection,Road>. More...

#include <RoadGenerator.h>

Inheritance diagram for RoadGenerator:

Public Member Functions

virtual void generate (Graph< Intersection, Road > &graph)=0
 Append new bidirectional roads into the graph (no duplicates).
 

Static Protected Member Functions

static double euclid (const Intersection &a, const Intersection &b)
 Compute the Euclidean distance between two intersections.
 

Detailed Description

Abstract base class for generating roads on a Graph<Intersection,Road>.

Member Function Documentation

◆ euclid()

double RoadGenerator::euclid ( const Intersection a,
const Intersection b 
)
staticprotected

Compute the Euclidean distance between two intersections.

Parameters
aFirst intersection.
bSecond intersection.
Returns
The Euclidean distance between a and b.

◆ generate()

virtual void RoadGenerator::generate ( Graph< Intersection, Road > &  graph)
pure virtual

Append new bidirectional roads into the graph (no duplicates).

Implemented in HighwayGenerator, MotorwayGenerator, and StreetGenerator.


The documentation for this class was generated from the following files: