src/test/path_test.cc
changeset 1435 8e85e6bbefdf
parent 1434 d8475431bbbb
child 1436 e0beb94d08bf
     1.1 --- a/src/test/path_test.cc	Sat May 21 21:04:57 2005 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,96 +0,0 @@
     1.4 -/* -*- C++ -*-
     1.5 - * src/test/path_test.cc - Part of LEMON, a generic C++ optimization library
     1.6 - *
     1.7 - * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     1.8 - * (Egervary Research Group on Combinatorial Optimization, EGRES).
     1.9 - *
    1.10 - * Permission to use, modify and distribute this software is granted
    1.11 - * provided that this copyright notice appears in all copies. For
    1.12 - * precise terms see the accompanying LICENSE file.
    1.13 - *
    1.14 - * This software is provided "AS IS" with no warranty of any kind,
    1.15 - * express or implied, and with no claim as to its suitability for any
    1.16 - * purpose.
    1.17 - *
    1.18 - */
    1.19 -
    1.20 -#include <string>
    1.21 -#include <iostream>
    1.22 -#include <lemon/concept/path.h>
    1.23 -#include <lemon/path.h>
    1.24 -#include <lemon/list_graph.h>
    1.25 -
    1.26 -using namespace std;
    1.27 -using namespace lemon;
    1.28 -using namespace lemon::concept;
    1.29 -
    1.30 -template<class Path> void checkCompilePath(Path &P) 
    1.31 -{
    1.32 -  typedef typename Path::EdgeIt EdgeIt;
    1.33 -  typedef typename Path::NodeIt NodeIt;
    1.34 -  typedef typename Path::GraphNode GraphNode;
    1.35 -  typedef typename Path::GraphEdge GraphEdge;
    1.36 -  //typedef typename Path::Builder Builder;
    1.37 -  //??? ha csinalok ilyet es siman Builderrel peldanyositok, akkor warningol. Talan friend miatt? De ki az?
    1.38 -
    1.39 -  EdgeIt ei;
    1.40 -  NodeIt ni;
    1.41 -  GraphNode gn;
    1.42 -  GraphEdge ge;
    1.43 -
    1.44 -  size_t st;
    1.45 -  bool b;
    1.46 -
    1.47 -  //Path(const Graph &_G) {}      //the constructor has been already called
    1.48 -
    1.49 -  st=P.length();                  //size_t length() const {return 0;}
    1.50 -  b=P.empty();                    //bool empty() const {}
    1.51 -  P.clear();                      //void clear() {}
    1.52 -
    1.53 -  gn=P.target();                    //GraphNode/*It*/ target() const {return INVALID;}
    1.54 -  gn=P.source();                    //GraphNode/*It*/ source() const {return INVALID;}
    1.55 -
    1.56 -  ei=P.first(ei);                 //It& first(It &i) const { return i=It(*this); }
    1.57 -
    1.58 -  ni=P.target(ei);                  //NodeIt target(const EdgeIt& e) const {}
    1.59 -  ni=P.source(ei);                  //NodeIt source(const EdgeIt& e) const {}
    1.60 -
    1.61 -
    1.62 -  ListGraph lg;
    1.63 -  Path p(lg);
    1.64 -
    1.65 -  EdgeIt i;	                  //EdgeIt() {}
    1.66 -  EdgeIt j(INVALID);	          //EdgeIt(Invalid) {}
    1.67 -  EdgeIt k(p);	                  //EdgeIt(const Path &_p) {}
    1.68 -
    1.69 -  i=++j;	                  //EdgeIt& operator++() {}
    1.70 -  ++k;
    1.71 -  b=(i==j);	                  //bool operator==(const EdgeIt& e) const {return true;}
    1.72 -  b=(i!=j);	                  //bool operator!=(const EdgeIt& e) const {return true;}
    1.73 -
    1.74 -
    1.75 -  NodeIt l;                       //NodeIt() {}
    1.76 -  NodeIt m(INVALID);	          //NodeIt(Invalid) {}
    1.77 -  NodeIt n(p);	                  //NodeIt(const Path &_p) {}
    1.78 -
    1.79 -  l=++m;                          //NodeIt& operator++() {}
    1.80 -  b=(m==n);                       //bool operator==(const NodeIt& e) const {}
    1.81 -  b=(m!=n);                   	  //bool operator!=(const NodeIt& e) const {}
    1.82 -
    1.83 -  typename Path::Builder builder(p);     //Builder(Path &_P) : P(_P) {}
    1.84 -  builder.setStartNode(gn);     	 //void setStartNode(const GraphNode &) {}
    1.85 -  builder.pushFront(ge);	         //void pushFront(const GraphEdge& e) {}
    1.86 -  builder.pushBack(ge);	                 //void pushBack(const GraphEdge& e) {}
    1.87 -  builder.commit();	                 //void commit() {}
    1.88 -  builder.reserveFront(st);	         //void reserveFront(size_t r) {}
    1.89 -  builder.reserveBack(st);	         //void reserveBack(size_t r) {}
    1.90 -
    1.91 -}
    1.92 -
    1.93 -template void checkCompilePath< concept::Path<ListGraph> >(concept::Path<ListGraph> &);
    1.94 -template void checkCompilePath< DirPath<ListGraph> >(DirPath<ListGraph> &);
    1.95 -template void checkCompilePath< UndirPath<ListGraph> >(UndirPath<ListGraph> &);
    1.96 -
    1.97 -int main() 
    1.98 -{
    1.99 -}