# graph.structure

From igraph v0.1.2
by Gabor Csardi

##### Method for structural manipulation of graphs

These are the methods for simple manipulation of graphs: adding and deleting edges and vertices.

- Keywords
- graphs

##### Usage

```
add.edges(graph, edges)
add.vertices(graph, nv)
delete.edges(graph, edges)
delete.vertices(graph, v)
```

##### Arguments

- graph
- The graph to work on.
- edges
- Numeric vector, the edges to add or remove.
- nv
- Numeric constant, the number of vertices to add.
- v
- Numeric vector, the vertices to remove.

##### Details

`add.edges`

adds the specified edges to the graph. The ids of the
vertices are preserved.

`add.vertices`

adds the specified number of isolate vertices to
the graph. The ids of the old vertices are preserved.

`delete.edges`

removes the specified edges from the graph. If a
specified edge is not present, the function gives an error message,
and the original graph remains unchanged.
The ids of the vertices are preserved.

`delete.vertices`

removes the specified vertices from the graph
together with their adjacent edges. The ids of the vertices are
*not* preserved.

##### Value

- The new graph.

##### Examples

```
g <- graph.ring(10)
add.edges(g, c(1,5,2,6) )
delete.edges(g, c(0,9, 1,2) )
delete.vertices(g, c(1,6,7) )
```

*Documentation reproduced from package igraph, version 0.1.2, License: GPL version 2 or later (June, 1991)*

### Community examples

Looks like there are no examples yet.