---
title: "ClikaRT::graph::Edge"
sidebar_label: "Edge"
description: "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."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--class">class</span>

**Header:** `ClikaRT/graph/node.h`

One read of a value: the value [`src()`](./Edge.md#src) produces on output port [`src_port()`](./Edge.md#src_port), read by [`dst()`](./Edge.md#dst) on input port [`dst_port()`](./Edge.md#dst_port); `Mul(x, x)` reads `x` over two edges. Edges join nodes only: a constant or a state operand is a [`Value`](./Value.md) ([`Node::inputs()`](./Node.md#inputs), `Node::input(port)`), not an edge, and returning a value from the graph adds none. The view finds its edge again by its two nodes and ports after an edit; once no edge has them, the view answers empty and [`check()`](./Edge.md#check) says so.

## Member functions

### check() {#check}

<div class="api-signature">

`void` **`check`**() `const`

</div>

Nothing when the graph still holds this edge; [`Status::InvalidArgument`](../../index.md#Status) naming its two nodes and ports when it no longer does (an end was removed or renamed, or the read moved to another port) or when the graph itself no longer exists.

<div class="api-declared">

Declared in `ClikaRT/graph/node.h`, line 195

</div>

### src() {#src}

<div class="api-signature">

[`Node`](./Node.md) **`src`**() `const`

</div>

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

<div class="api-declared">

Declared in `ClikaRT/graph/node.h`, line 197

</div>

### src\_port() {#src_port}

<div class="api-signature">

`int` **`src_port`**() `const`

</div>

<div class="api-declared">

Declared in `ClikaRT/graph/node.h`, line 198

</div>

### dst() {#dst}

<div class="api-signature">

[`Node`](./Node.md) **`dst`**() `const`

</div>

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

<div class="api-declared">

Declared in `ClikaRT/graph/node.h`, line 200

</div>

### dst\_port() {#dst_port}

<div class="api-signature">

`int` **`dst_port`**() `const`

</div>

<div class="api-declared">

Declared in `ClikaRT/graph/node.h`, line 201

</div>

## Friends

### operator== {#operator-eq}

<div class="api-signature">

`friend` `bool` **`operator==`**(`const Edge&` `a`, `const Edge&` `b`) `noexcept`

</div>

Two views of the same edge (the same graph, nodes and ports) compare equal.

<div class="api-declared">

Declared in `ClikaRT/graph/node.h`, line 205

</div>
