---
title: "WeightedPath"
sidebar_label: "WeightedPath"
description: "The clika_runtime.graph WeightedPath class."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

A path with the edges it takes and its summed cost, the answer of ModelGraph.shortest_path given an edge cost and of critical_path: edges[i] joins nodes[i] to nodes[i + 1], naming the parallel edge taken. Empty, at cost 0, when no path runs. Its views keep the graph alive.

## `cost` (property)

The path's summed cost.

## `edges` (property)

The edges the path takes: edges[i] joins nodes[i] to nodes[i + 1].

## `nodes` (property)

The path's nodes, in order.

## `__init__`

```python
__init__(self, /, *args, **kwargs)
```

Initialize self.  See help(type(self)) for accurate signature.
