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

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

One read of a value: the value src() produces on output port src_port(), read by dst() on input port dst_port(); Mul(x, x) reads x over two edges. Edges join nodes only: a constant or a state operand is a Value (Node.inputs, Node.input(port)), not an edge, and returning a value from the graph adds none. Two views of the same edge compare equal. Holding an Edge keeps the graph alive. After an edit the view finds its edge again by its two nodes and ports; once no edge has them, or a merge, a split or an extract consumes the graph, check() and every accessor raise InvalidArgumentError naming them, while ==, hash and repr keep working.

## `__init__`

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

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

## `check`

```python
checkcheck(self) -> None
```

check(self) -> None

check() -> None

None while the graph holds this edge; raises InvalidArgumentError naming its two nodes and ports once it does not (an end was removed or renamed, the read moved to another port, or a merge, a split or an extract consumed the graph).

## `dst`

```python
dstdst(self) -> object
```

dst(self) -> object

dst() -> Node

The node the edge enters: the operator that reads the value.

## `dst_port`

```python
dst_portdst_port(self) -> int
```

dst_port(self) -> int

dst_port() -> int

The input port of dst() that reads the value.

## `src`

```python
srcsrc(self) -> object
```

src(self) -> object

src() -> Node

The node the edge leaves: the producer of the value it carries.

## `src_port`

```python
src_portsrc_port(self) -> int
```

src_port(self) -> int

src_port() -> int

The output port of src() the value leaves on.
