proj home

Files   Classes   Functions   Hierarchy  

edgeTtest.cpp

Go to the documentation of this file.
00001 #include <iostream>
00002 #include <set>
00003 using namespace std;
00004 
00005 #include <edgeT.h>
00006 #include <edgeTtest.h>
00007 #include <print.h>
00008 
00009 
00010 void edgeTtest::test01()
00011 {
00012   typedef edgeT<double> ed;
00013 
00014   ed ei[] = 
00015   { 
00016     ed(1,2,0.0),ed(1,7,0.6),ed(4,3,2.7),ed(2,1,9.7),ed(6,2,-2.4)
00017   };
00018 
00019   set<ed> s;
00020   s.insert(ei[0]);
00021 
00022   cout << (stringc)ei[1] << endl;
00023   cout << ei[2] << endl;
00024   cout << SHOW( ei[0]==ei[3] ) << endl;
00025 
00026   cout << "Testing the find" << endl;
00027   set<ed>::iterator i=s.find(ei[3]);
00028   if (i!=s.end())
00029     cout << "found the element" << endl;
00030   else
00031     cout << "element not in the set." << endl;
00032 
00033   cout << print(ei,ei+5,"\n") << endl;
00034 
00035   cout << "****" << endl;
00036   s.insert(ei+1,ei+5);
00037   cout << print(s.begin(),s.end(),"\n") << endl;
00038 
00039 
00040 
00041 }
00042 
00043 

Generated on Fri Mar 4 00:49:26 2011 for Chelton Evans Source by  doxygen 1.5.8