Files Classes Functions Hierarchy
#include <edgeTtest.h>
Static Public Member Functions | |
| static void | test01 () |
| Basic test of edgeT data structure for ordering edges. | |
Definition at line 7 of file edgeTtest.h.
| void edgeTtest::test01 | ( | ) | [static] |
Basic test of edgeT data structure for ordering edges.
Definition at line 10 of file edgeTtest.cpp.
Referenced by main().
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 }
1.5.8