All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Classes | Namespaces | Macros | Functions
core.h File Reference

Detailed Description

This header file contains core utilities for LEMON. It is automatically included by all graph types, therefore it usually do not have to be included directly.

#include <vector>
#include <algorithm>
#include <lemon/config.h>
#include <lemon/bits/enable_if.h>
#include <lemon/bits/traits.h>
#include <lemon/assert.h>

Classes

struct  Invalid
 Dummy type to make it easier to create invalid iterators. More...
 
class  DigraphCopy< From, To >
 Class to copy a digraph. More...
 
class  GraphCopy< From, To >
 Class to copy a graph. More...
 
class  BpGraphCopy< From, To >
 Class to copy a bipartite graph. More...
 
class  ConArcIt< GR >
 Iterator for iterating on parallel arcs connecting the same nodes. More...
 
class  ConEdgeIt< GR >
 Iterator for iterating on parallel edges connecting the same nodes. More...
 
class  DynArcLookUp< GR >
 Dynamic arc look-up between given endpoints. More...
 
class  ArcLookUp< GR >
 Fast arc look-up between given endpoints. More...
 
class  AllArcLookUp< GR >
 Fast look-up of all arcs between given endpoints. More...
 

Namespaces

 lemon
 The namespace of LEMON.
 

Macros

#define DIGRAPH_TYPEDEFS(Digraph)
 Create convenience typedefs for the digraph types and iterators. More...
 
#define TEMPLATE_DIGRAPH_TYPEDEFS(Digraph)
 Create convenience typedefs for the digraph types and iterators. More...
 
#define GRAPH_TYPEDEFS(Graph)
 Create convenience typedefs for the graph types and iterators. More...
 
#define TEMPLATE_GRAPH_TYPEDEFS(Graph)
 Create convenience typedefs for the graph types and iterators. More...
 
#define BPGRAPH_TYPEDEFS(BpGraph)
 Create convenience typedefs for the bipartite graph types and iterators. More...
 
#define TEMPLATE_BPGRAPH_TYPEDEFS(BpGraph)
 Create convenience typedefs for the bipartite graph types and iterators. More...
 

Functions

template<typename Graph , typename Item >
int countItems (const Graph &g)
 Function to count the items in a graph. More...
 
template<typename Graph >
int countNodes (const Graph &g)
 Function to count the nodes in the graph. More...
 
template<typename Graph >
int countRedNodes (const Graph &g)
 Function to count the red nodes in the graph. More...
 
template<typename Graph >
int countBlueNodes (const Graph &g)
 Function to count the blue nodes in the graph. More...
 
template<typename Graph >
int countArcs (const Graph &g)
 Function to count the arcs in the graph. More...
 
template<typename Graph >
int countEdges (const Graph &g)
 Function to count the edges in the graph. More...
 
template<typename Graph >
int countOutArcs (const Graph &g, const typename Graph::Node &n)
 Function to count the number of the out-arcs from node n. More...
 
template<typename Graph >
int countInArcs (const Graph &g, const typename Graph::Node &n)
 Function to count the number of the in-arcs to node n. More...
 
template<typename Graph >
int countIncEdges (const Graph &g, const typename Graph::Node &n)
 Function to count the number of the inc-edges to node n. More...
 
template<typename GR >
bool undirected (const GR &g)
 Check whether a graph is undirected. More...
 
template<typename From , typename To >
DigraphCopy< From, To > digraphCopy (const From &from, To &to)
 Copy a digraph to another digraph. More...
 
template<typename From , typename To >
GraphCopy< From, To > graphCopy (const From &from, To &to)
 Copy a graph to another graph. More...
 
template<typename From , typename To >
BpGraphCopy< From, To > bpGraphCopy (const From &from, To &to)
 Copy a graph to another graph. More...
 
template<typename Graph >
Graph::Arc findArc (const Graph &g, typename Graph::Node u, typename Graph::Node v, typename Graph::Arc prev=INVALID)
 Find an arc between two nodes of a digraph. More...
 
template<typename Graph >
Graph::Edge findEdge (const Graph &g, typename Graph::Node u, typename Graph::Node v, typename Graph::Edge p=INVALID)
 Find an edge between two nodes of a graph. More...