# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# isEdge

Class: TriRep

(Not recommended) Test if vertices are joined by edge

### Note

`isEdge(TriRep)` is not recommended. Use `isConnected(triangulation)` instead.

`TriRep` is not recommended. Use `triangulation` instead.

## Syntax

```TF = isEdge(TR, V1, V2) TF = isEdge(TR, EDGE) ```

## Description

`TF = isEdge(TR, V1, V2)` returns an array of 1/0 (true/false) flags, where each entry `TF(i)` is true if `V1(i)`, `V2(i)` is an edge in the triangulation. `V1`, `V2` are column vectors representing the indices of the vertices in the mesh, that is, indices into the vertex coordinate arrays.

`TF = isEdge(TR, EDGE)` specifies the edge start and end indices in matrix format.

## Input Arguments

 `TR` Triangulation representation. `V1, V2` Column vectors of mesh vertices. `EDGE` Matrix of size `n`-by-2 where `n` is the number of query edges.

## Output Arguments

 `TF` Array of 1/0 (true/false) flags, where each entry `TF(i)` is true if `V1(i)`, `V2(i)` is an edge in the triangulation.

## Examples

### Example 1

Load a 2-D triangulation and use `TriRep` to query the presence of an edge between pairs of points.

```load trimesh2d trep = TriRep(tri, x,y); ```

Test if vertices 3 and 117 are connected by an edge

```isEdge(trep, 3, 117) ```

Test if vertices 3 and 164 are connected by an edge

`isEdge(trep, 3, 164)`

### Example 2

Direct query of a 3-D Delaunay triangulation created using `DelaunayTri`.

```X = rand(10,3) dt = DelaunayTri(X)```

Test if vertices 2 and 7 are connected by an edge

`isEdge(dt, 2, 7);`