test_tools.h File Reference


Detailed Description

#include <iostream>
#include <vector>
#include <cstdlib>
#include <ctime>
#include <lemon/concept_check.h>
#include <lemon/concepts/graph.h>
#include <lemon/random.h>

Classes

struct  PetStruct< Graph >
struct  UPetStruct< Graph >

Defines

#define check(rc, msg)
 If rc is fail, writes an error message end exit.

Functions

template<typename Graph >
PetStruct< GraphaddPetersen (Graph &G, int num=5)
 Adds a Petersen graph to G.
template<class Graph >
void bidirGraph (Graph &G)
template<class Graph >
void checkBidirPetersen (Graph &G, int num=5)
template<typename Graph >
UPetStruct< GraphaddUPetersen (Graph &G, int num=5)
 Adds a Petersen graph to the undirected G.

Define Documentation

#define check ( rc,
msg   ) 

Value:

if(!(rc)) { \
    std::cerr << __FILE__ ":" << __LINE__ << ": error: " << msg << std::endl; \
    abort(); \
  } else { } \
If rc is fail, writes an error message end exit. The error message contains the file name and the line number of the source code in a standard from, which makes it possible to go there using good source browsers like e.g. emacs.

For example

 check(0==1,"This is obviously false.");
will print this (and then exits).
graph_test.cc:123: error: This is obviously false. 

Todo:
It should be in error.h


Function Documentation

PetStruct<Graph> addPetersen ( Graph G,
int  num = 5 
) [inline]

Adds a Petersen graph to G.

Returns:
The nodes and edges of the generated graph.

void bidirGraph ( Graph G  )  [inline]

Adds to the graph the reverse pair of all edges.

void checkBidirPetersen ( Graph G,
int  num = 5 
) [inline]

Checks the bidirectioned Petersen graph.

UPetStruct<Graph> addUPetersen ( Graph G,
int  num = 5 
) [inline]

Adds a Petersen graph to the undirected G.

Returns:
The nodes and edges of the generated graph.


Generated on Thu Jun 4 04:03:10 2009 for LEMON by  doxygen 1.5.9