# walkmap.routing documentation

## Generated by Codox

# Walkmap 0.1.0-SNAPSHOT

# walkmap.routing

Finding optimal routes to traverse a map.

### *gradient-exponent*

#### dynamic

The exponent to be applied to `(inc (:z (unit-vector from to)))` of a path segment to calculate the gradient-related part of the cost of traversal. Dynamic, because we will want to tune this.

view source

### *traversals-exponent*

#### dynamic

The (expected to be negative) exponent to be applied to the number of traversals of a path to compute the road bonus. Paths more travelled by should have larger bonuses, but not dramatically so - so the increase in bonus needs to scale significantly less than linearly with the number of traversals. Dynamic, because we will want to tune this.

view source

### barriers-crossed

`(barriers-crossed from to s)`

Search superstructure `s` and return a sequence of barriers, if any, which obstruct traversal from vertex `from` to vertex `to`.

view source

### best-road

`(best-road from to s)`

Find the best traversable path which links the vertices `from` and `to` in this superstructure `s`, or nil if there are none.

view source

### crossing-penalty

`(crossing-penalty barrier from to s)`

TODO: should return the cost of crossing this `barrier`, initially mainly a watercourse, on the axis from vertex `from` to vertex `to`. in the context of superstructure `s`. If there’s a bridge, ferry or other crossing mechanism in `s` at the intersection of the vertex and the barrier, then the penalty should be substantially less than it would otherwise be.

view source

### extend-frontier

`(extend-frontier frontier candidates)``(extend-frontier frontier candidates rejects)`

Return a sequence like `frontier` with all of these `candidates` which are not already members either of `frontier` or of `rejects` appended.

view source

### gradient-cost

`(gradient-cost edge)`

Compute the per-unit-distance cost of traversing this `edge`.

view source

### path-traversal-cost

`(path-traversal-cost path s)`

TODO: write docs

view source

### road-bonus

`(road-bonus from to s)`

Calculate the road bonus of the edge represented by the vertices `from`, `to`, in the context of the superstructure `s`. Obviously there only is such a bonus if there actually is an existing thoroughfare to use. Road bonuses scale with some fractional exponent of the number of traversals which have been made of the road segment in question.

view source

### route

`(route from to s search-radius)`

TODO: write docs

view source

### traversable?

`(traversable? object)`

True if this object can be considered as part of the walkmap.

view source

### traversal-cost

`(traversal-cost from to s)`

Return the traversal cost of the edge represented by the vertices `from`, `to`, in the context of the superstructure `s`. It is legitimate to pass `nil` as the `to` argument, in which case the result will be zero, in order to allow `reduce` to be used to compute total path costs.

view source

### vertices-traversal-cost

`(vertices-traversal-cost vertices s)`

TODO: write docs

view source