calculation

package
v0.0.0-...-6387df7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PlotAllEdges

func PlotAllEdges(edges datacollection.Edges, filename string) error

PlotAllEdges makes a graph with all edges on it

func PlotEdge

func PlotEdge(edges datacollection.Edges, edgeKey string, outputFile string) error

PlotEdge makes a graph of one of the edges

func PrintStops

func PrintStops(stops []datacollection.Stop) string

PrintStops prints out an array of the stops in a route

Types

type Calculator

type Calculator struct {
	// contains filtered or unexported fields
}

Calculator contains data for route calculation

func NewCalculator

func NewCalculator(edgeData datacollection.Edges, latestTime time.Time) (*Calculator, error)

NewCalculator returns a new calculator object

func (*Calculator) FindBestRoute

func (c *Calculator) FindBestRoute(stops []datacollection.Stop, startTime time.Time) ([]datacollection.Stop, time.Duration)

FindBestRoute finds the fastest route to traverse every stop, every stop must have an edge to every other stop

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL