Computes the covariance function for a Whittle-Matérn field.

## Arguments

- P
Location (edge number and normalized location on the edge) for the location to evaluate the covariance function at.

- kappa
Parameter kappa from the SPDE.

- tau
Parameter tau from the SPDE.

- range
Range parameter.

- sigma
Standard deviation parameter.

- alpha
Smoothness parameter (1 or 2).

- graph
A

`metric_graph`

object.- directional
bool is the model a directional or not. directional only works for alpha=1