test/graph_test.cc
author deba
Fri, 14 Apr 2006 18:07:33 +0000
changeset 2051 08652c1763f6
parent 1712 4fb435ad31cf
child 2111 ea1fa1bc3f6d
permissions -rw-r--r--
MaxWeightedBipartiteMatching
MinCostMaxBipartiteMatching

Both algorithms are based on successive shortest
path algorithm with dijkstra shortest path
finding
alpar@1956
     1
/* -*- C++ -*-
alpar@1956
     2
 *
alpar@1956
     3
 * This file is a part of LEMON, a generic C++ optimization library
alpar@1956
     4
 *
alpar@1956
     5
 * Copyright (C) 2003-2006
alpar@1956
     6
 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
alpar@1956
     7
 * (Egervary Research Group on Combinatorial Optimization, EGRES).
alpar@1956
     8
 *
alpar@1956
     9
 * Permission to use, modify and distribute this software is granted
alpar@1956
    10
 * provided that this copyright notice appears in all copies. For
alpar@1956
    11
 * precise terms see the accompanying LICENSE file.
alpar@1956
    12
 *
alpar@1956
    13
 * This software is provided "AS IS" with no warranty of any kind,
alpar@1956
    14
 * express or implied, and with no claim as to its suitability for any
alpar@1956
    15
 * purpose.
alpar@1956
    16
 *
alpar@1956
    17
 */
alpar@906
    18
klao@946
    19
#include <iostream>
klao@946
    20
#include <vector>
alpar@578
    21
klao@959
    22
#include <lemon/concept/graph.h>
klao@946
    23
#include <lemon/list_graph.h>
klao@946
    24
#include <lemon/smart_graph.h>
klao@946
    25
#include <lemon/full_graph.h>
deba@1712
    26
#include <lemon/hypercube_graph.h>
alpar@567
    27
klao@946
    28
#include "test_tools.h"
klao@946
    29
#include "graph_test.h"
klao@946
    30
#include "map_test.h"
alpar@503
    31
alpar@503
    32
alpar@921
    33
using namespace lemon;
klao@959
    34
using namespace lemon::concept;
alpar@503
    35
alpar@503
    36
klao@946
    37
int main() {
klao@946
    38
  { // checking graph components
deba@989
    39
    checkConcept<BaseGraphComponent, BaseGraphComponent >();
alpar@503
    40
deba@989
    41
    checkConcept<BaseIterableGraphComponent, BaseIterableGraphComponent >();
alpar@503
    42
deba@989
    43
    checkConcept<IDableGraphComponent, IDableGraphComponent >();
deba@989
    44
    checkConcept<MaxIDableGraphComponent, MaxIDableGraphComponent >();
alpar@503
    45
deba@989
    46
    checkConcept<BaseExtendableGraphComponent, BaseExtendableGraphComponent >();
deba@989
    47
    checkConcept<BaseErasableGraphComponent, BaseErasableGraphComponent >();
alpar@503
    48
deba@989
    49
    checkConcept<IterableGraphComponent, IterableGraphComponent >();
alpar@503
    50
deba@989
    51
    checkConcept<MappableGraphComponent, MappableGraphComponent >();
alpar@793
    52
deba@989
    53
    checkConcept<ExtendableGraphComponent, ExtendableGraphComponent >();
deba@989
    54
    checkConcept<ErasableGraphComponent, ErasableGraphComponent >();
deba@989
    55
    checkConcept<ClearableGraphComponent, ClearableGraphComponent >();
klao@946
    56
  }
klao@946
    57
  { // checking skeleton graphs
deba@989
    58
    checkConcept<StaticGraph, StaticGraph >();
deba@989
    59
    checkConcept<ExtendableGraph, ExtendableGraph >();
deba@989
    60
    checkConcept<ErasableGraph, ErasableGraph >();
klao@946
    61
  }
klao@946
    62
  { // checking list graph
deba@989
    63
    checkConcept<ErasableGraph, ListGraph >();
alpar@793
    64
klao@946
    65
    checkGraph<ListGraph>();
klao@946
    66
    checkGraphNodeMap<ListGraph>();
klao@946
    67
    checkGraphEdgeMap<ListGraph>();
klao@946
    68
  }
klao@946
    69
  { // checking smart graph
deba@989
    70
    checkConcept<ExtendableGraph, SmartGraph >();
alpar@733
    71
klao@946
    72
    checkGraph<SmartGraph>();
klao@946
    73
    checkGraphNodeMap<SmartGraph>();
klao@946
    74
    checkGraphEdgeMap<SmartGraph>();
alpar@503
    75
  }
klao@946
    76
  { // checking full graph
deba@989
    77
    checkConcept<StaticGraph, FullGraph >();
alpar@578
    78
  }
deba@1712
    79
  { // checking full graph
deba@1712
    80
    checkConcept<StaticGraph, HyperCubeGraph >();
deba@1712
    81
  }
alpar@503
    82
alpar@503
    83
  std::cout << __FILE__ ": All tests passed.\n";
alpar@503
    84
alpar@579
    85
  return 0;
alpar@503
    86
}