# VertexInterface

interface
**VertexInterface** (View source)

## Methods

Returns the connections of the current vertex.

Returns the identifier of this vertex.

Returns vertex's potential.

Returns the vertex which gave to the current vertex its potential.

Returns whether the vertex has passed or not.

Marks this vertex as passed, meaning that, in the scope of a graph, he has already been processed in order to calculate its potential.

Sets the potential for the vertex, if the vertex has no potential or the one it has is higher than the new one.

## Details

###
at line 31
```
```**connect**(VertexInterface $vertex, integer $distance = 1)

**connect**(VertexInterface $vertex, integer $distance = 1)

Connects the vertex to another $vertex.

A $distance, to balance the connection, can be specified.

###
at line 38
```
Array
```**getConnections**()

**getConnections**()

Returns the connections of the current vertex.

###
at line 45
```
mixed
```**getId**()

**getId**()

Returns the identifier of this vertex.

###
at line 52
```
integer
```**getPotential**()

**getPotential**()

Returns vertex's potential.

###
at line 59
```
Vertex
```**getPotentialFrom**()

**getPotentialFrom**()

Returns the vertex which gave to the current vertex its potential.

###
at line 66
```
boolean
```**isPassed**()

**isPassed**()

Returns whether the vertex has passed or not.

###
at line 72
```
```**markPassed**()

**markPassed**()

Marks this vertex as passed, meaning that, in the scope of a graph, he has already been processed in order to calculate its potential.

###
at line 82
```
boolean
```**setPotential**(integer $potential, VertexInterface $from)

**setPotential**(integer $potential, VertexInterface $from)

Sets the potential for the vertex, if the vertex has no potential or the one it has is higher than the new one.