Loading...
Searching...
No Matches
GraphItem Class Reference

## Detailed Description

This class describes the concept of `Node`, `Arc` and `Edge` subtypes of digraph and graph types.

Note
  This class is a template class so that we can use it to create graph skeleton classes. The reason for this is that `Node` and `Arc` (or `Edge`) types should not derive from the same base class. For `Node` you should instantiate it with character `'n'`, for `Arc` with `'a'` and for `Edge` with `'e'`.

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

## Public Member Functions

| GraphItem ()
| Default constructor.
| GraphItem (const GraphItem &)
| Copy constructor.
| GraphItem (Invalid)
| Constructor for conversion from `INVALID`.
GraphItem & | operator= (const GraphItem &)
| Assignment operator.
GraphItem & | operator= (Invalid)
| Assignment operator for INVALID.
bool | operator== (const GraphItem &) const
| Equality operator.
bool | operator!= (const GraphItem &) const
| Inequality operator.
bool | operator< (const GraphItem &) const
| Ordering operator.

## Constructor & Destructor Documentation

## GraphItem() [1/3]

GraphItem | ( |  | ) |

inline

Default constructor.

Warning
  The default constructor is not required to set the item to some well-defined value. So you should consider it as uninitialized.

## GraphItem() [2/3]

GraphItem | ( | const GraphItem & |  | ) |

inline

Copy constructor.

## GraphItem() [3/3]

GraphItem | ( | Invalid |  | ) |

inline

Constructor for conversion from `INVALID`. It initializes the item to be invalid.

See also
  Invalid for more details.

## Member Function Documentation

## operator=() [1/2]

GraphItem & operator= | ( | const GraphItem & |  | ) |

inline

Assignment operator for the item.

## operator=() [2/2]

GraphItem & operator= | ( | Invalid |  | ) |

inline

This operator makes the item invalid.

## operator==()

bool operator== | ( | const GraphItem & |  | ) | const

inline

Equality operator.

## operator!=()

bool operator!= | ( | const GraphItem & |  | ) | const

inline

Inequality operator.

## operator<()

bool operator< | ( | const GraphItem & |  | ) | const

inline

This operator defines an ordering of the items. It makes possible to use graph item types as key types in associative containers (e.g. `std::map`).

Note
  This operator only has to define some strict ordering of the items; this order has nothing to do with the iteration ordering of the items.