# PathSource

Defined in: [packages/graph/src/path.ts:4](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/graph/src/path.ts#L4)

The part of a search result [path](/reference/knotkit/graph/functions/path/) reads: a distance and a parent per vertex.

## Properties

### distance

> `readonly` **distance**: `Int32Array`<`ArrayBufferLike`> | `Float64Array`<`ArrayBufferLike`>

Defined in: [packages/graph/src/path.ts:6](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/graph/src/path.ts#L6)

`-1` or `Infinity` marks an unreached vertex, as `breadthFirstSearch` and `dijkstra` write it.

***

### parent

> `readonly` **parent**: `Int32Array`

Defined in: [packages/graph/src/path.ts:8](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/graph/src/path.ts#L8)

The vertex each one was reached from, `-1` at a source.
