# jungerer.graph

Functions to create and manipulate a graph.

### ->edge

`(->edge inner-edge)`

### add-edge!

`(add-edge! graph edge)`

Adds edge to graph. Returns true if the addition suceeded. Note that this
function is not immutable, changing the graph state.

### add-node!

`(add-node! graph node)`

Adds node to graph. Returns true if the addition suceeded. Note that this
function is not immutable, changing the graph state.

### contains-edge?

`(contains-edge? graph edge)`

Returns true if graph's edge collection contains edge.

### contains-node?

`(contains-node? graph node)`

Returns true if graph's node collection contains node.

### degree

`(degree graph node)`

Returns the number of edges incident to node.

### directed-graph

`(directed-graph)`

`(directed-graph edges)`

Returns an edu.uci.ic.jung.graph.DirectedSparseGraph. If a list or vector
of edges is passed, returning graph including the edges.

### directed-multigraph

`(directed-multigraph)`

`(directed-multigraph edges)`

Returns an edu.uci.ic.jung.graph.DirectedSparseMultigraph. If a list or
vector of edges is passed, returning graph including the edges.

### edges

`(edges graph)`

Returns all edges in graph.

### in-degree

`(in-degree graph node)`

Returns the number of incoming edges incident to node.

### in-edges

`(in-edges graph node)`

Returns incoming edges incident to node in graph.

### inner-edge

`(inner-edge edge)`

### nodes

`(nodes graph)`

Returns all nodes in graph as set.

### out-degree

`(out-degree graph node)`

Returns the number of outgoing edges incident to node.

### predecessors

`(predecessors graph node)`

Returns the predecessors of node in graph as set. A predecessor of node is
defined as a node v which is connected to node by an edge e, where e is an
outgoing edge of v and an incoming edge of node.

### remove-edge!

`(remove-edge! graph edge)`

Removes edge from graph. Returns true if the removal suceeded. Note that this
function is not immutable, changing the graph state.

### remove-node!

`(remove-node! graph node)`

Removes node from graph. Returns true if the removal suceeded. As a side
effect, removes any edges incident to the node if the removal of the node
would cause the edge to be incident to an illegal number of nodes. Note that
this function is not immutable, changing the graph state.

### successors

`(successors graph node)`

Returns the successors of node in graph as set. A successor of node is
defined as a node v which is connected to node by an edge e, where e is an
incoming edge of v and an outgoing edge of node.

### undirected-graph

`(undirected-graph)`

`(undirected-graph edges)`

Returns an edu.uci.ic.jung.graph.UndirectedSparseGraph. If a list or vector
of edges is passed, returning graph including the edges.

### undirected-multigraph

`(undirected-multigraph)`

`(undirected-multigraph edges)`

Returns an edu.uci.ic.jung.graph.UndirectedSparseMultigraph. If a list or
vector of edges is passed, returning graph including the edges.