- Main Page
- Modules
- Classes
- Namespaces
- Files
- Related Pages

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
List of all members | Public Member Functions
Graph::IncEdgeIt Class Reference

## Detailed Description

This iterator goes trough the incident undirected edges of a certain node of a graph. Its usage is quite simple, for example, you can compute the degree (i.e. the number of incident edges) of a node `n` in a graph `g` of type `Graph` as follows.

* int count=0;
* for(Graph::IncEdgeIt e(g, n); e!=INVALID; ++e) ++count;
*

Warning
  Loop edges will be iterated twice.

`#include <lemon/concepts/graph.h>`

Inheritance diagram for Graph::IncEdgeIt:
[legend]

## Public Member Functions
| IncEdgeIt ()
| Default constructor. More...
| IncEdgeIt (const IncEdgeIt &e)
| Copy constructor. More...
| IncEdgeIt (Invalid)
| Invalid constructor & conversion. More...
| IncEdgeIt (const Graph &, const Node &)
| Sets the iterator to the first incident edge. More...
| IncEdgeIt (const Graph &, const Edge &)
| Sets the iterator to the given edge. More...
IncEdgeIt & | operator++ ()
| Next incident edge. More...
Public Member Functions inherited from Graph::Edge
| Edge ()
| Default constructor. More...
| Edge (const Edge &)
| Copy constructor. More...
| Edge (Invalid)
| Invalid constructor & conversion. More...
bool | operator== (Edge) const
| Equality operator. More...
bool | operator!= (Edge) const
| Inequality operator. More...
bool | operator< (Edge) const
| Artificial ordering operator. More...

## Constructor & Destructor Documentation

IncEdgeIt | ( |  | ) |
| inline

Default constructor.

Warning
  It sets the iterator to an undefined value.

IncEdgeIt | ( | const IncEdgeIt & | e | ) |
| inline

Copy constructor.

IncEdgeIt | ( | Invalid |  | ) |
| inline

Initializes the iterator to be invalid.

See Also
  Invalid for more details.

IncEdgeIt | ( | const Graph & | ,
|  | const Node & |
| ) |  |
| inline

Sets the iterator to the first incident edge of the given node.

IncEdgeIt | ( | const Graph & | ,
|  | const Edge & |
| ) |  |
| inline

Sets the iterator to the given edge of the given graph.

## Member Function Documentation

IncEdgeIt& operator++ | ( |  | ) |
| inline

Assign the iterator to the next incident edge of the corresponding node.