Easy_rider
 
Loading...
Searching...
No Matches
StreetGenerator Class Reference

For each intersection, connects it to its k nearest neighbors - Street generator. More...

#include <StreetGenerator.h>

Inheritance diagram for StreetGenerator:
Collaboration diagram for StreetGenerator:

Public Member Functions

 StreetGenerator (size_t k, int defaultSpeed)
 
void generate (Graph< Intersection, Road > &graph) override
 Append new bidirectional roads into the graph (no duplicates).
 

Additional Inherited Members

- Static Protected Member Functions inherited from RoadGenerator
static double euclid (const Intersection &a, const Intersection &b)
 Compute the Euclidean distance between two intersections.
 

Detailed Description

For each intersection, connects it to its k nearest neighbors - Street generator.

Constructor & Destructor Documentation

◆ StreetGenerator()

StreetGenerator::StreetGenerator ( size_t  k,
int  defaultSpeed 
)
Parameters
kNumber of neighbors.
defaultSpeedSpeed for every new Road.

Member Function Documentation

◆ generate()

void StreetGenerator::generate ( Graph< Intersection, Road > &  graph)
overridevirtual

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

Implements RoadGenerator.


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