COIN-OR::LEMON - Graph Library

source: lemon-0.x/test/graph_adaptor_test.cc @ 1956:a055123339d5

Last change on this file since 1956:a055123339d5 was 1956:a055123339d5, checked in by Alpar Juttner, 18 years ago

Unified copyright notices

File size: 2.2 KB
RevLine 
[906]1/* -*- C++ -*-
2 *
[1956]3 * This file is a part of LEMON, a generic C++ optimization library
4 *
5 * Copyright (C) 2003-2006
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
[1359]7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
[906]8 *
9 * Permission to use, modify and distribute this software is granted
10 * provided that this copyright notice appears in all copies. For
11 * precise terms see the accompanying LICENSE file.
12 *
13 * This software is provided "AS IS" with no warranty of any kind,
14 * express or implied, and with no claim as to its suitability for any
15 * purpose.
16 *
17 */
18
[849]19#include<iostream>
[946]20#include<lemon/concept_check.h>
21
[921]22#include<lemon/smart_graph.h>
[959]23#include<lemon/concept/graph.h>
[1909]24#include<lemon/concept/ugraph.h>
[946]25
[921]26#include<lemon/list_graph.h>
27#include<lemon/full_graph.h>
[1401]28#include<lemon/graph_adaptor.h>
[849]29
[870]30#include"test/test_tools.h"
31#include"test/graph_test.h"
[849]32
33/**
34\file
[1401]35This test makes consistency checks of graph adaptors.
[849]36
[878]37\todo More extensive tests are needed
[849]38*/
39
[921]40using namespace lemon;
[959]41using namespace lemon::concept;
[849]42
43
44
45int main()
46{
[946]47  {
[998]48    typedef StaticGraph Graph;
[1401]49    checkConcept<StaticGraph, GraphAdaptor<Graph> >();
[946]50
[1401]51    checkConcept<StaticGraph, RevGraphAdaptor<Graph> >();
[946]52
[1401]53    checkConcept<StaticGraph, SubGraphAdaptor<Graph,
[998]54      Graph::NodeMap<bool> , Graph::EdgeMap<bool> > >();
[1401]55    checkConcept<StaticGraph, NodeSubGraphAdaptor<Graph,
[998]56      Graph::NodeMap<bool> > >();
[1401]57    checkConcept<StaticGraph, EdgeSubGraphAdaptor<Graph,
[998]58      Graph::EdgeMap<bool> > >();
[992]59   
[1401]60    checkConcept<StaticGraph, SubBidirGraphAdaptor<Graph,
[998]61      Graph::EdgeMap<bool>, Graph::EdgeMap<bool> > >();
[1160]62    //    checkConcept<StaticGraph, BidirGraph<Graph> >();
[1401]63    checkConcept<StaticGraph, ResGraphAdaptor<Graph, int,
[998]64      Graph::EdgeMap<int>, Graph::EdgeMap<int> > >();
[946]65
[1401]66    checkConcept<StaticGraph, ErasingFirstGraphAdaptor<Graph,
[998]67      Graph::NodeMap<Graph::Edge> > >();
[1383]68
69    /// \bug why does not compile with StaticGraph
[1909]70    checkConcept<BaseIterableUGraphConcept, UGraphAdaptor<ListGraph> >();
71    checkConcept<IterableUGraphConcept, UGraphAdaptor<ListGraph> >();
72    checkConcept<MappableUGraphConcept, UGraphAdaptor<ListGraph> >();
[946]73  }
[849]74  std::cout << __FILE__ ": All tests passed.\n";
75
76  return 0;
77}
Note: See TracBrowser for help on using the repository browser.