# groupCouplingPairs

Canonical: https://docs.shumoku.dev/en/library/api/groupCouplingPairs
Language: en

@shumoku/core · 0.4.0 · function

# groupCouplingPairs

[Source](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/ha-hull.ts#L230)

Union-find grouping of coupling pairs into redundancy groups (an N-member stack is a chain of pair links). Generic over ids so both renderers can feed their edge shapes in. \`kind\` of the group = the first pair's kind.

```
groupCouplingPairs(pairs: { a: string; b: string; kind?: string }[]): { kind?: string; members: string[] }[]
```

## Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `pairs` | `{ a: string; b: string; kind?: string }[]` | No additional description. | `—` |

## Returns

```
{ kind?: string; members: string[] }[]
```

[`libs/@shumoku/core/src/layout/ha-hull.ts:230`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/ha-hull.ts#L230)
