#include <algorithm>
#include <vector>
#include <iostream>
#include <iterator>
#include <cmath>
#include <iomanip>
#include "./Close.h"
#include "./removeDistant.h"
Include dependency graph for close.cxx:
Go to the source code of this file.
Namespaces | |
namespace | std |
Functions | |
template<class Iter> | |
void | PrintThem (Iter vb, Iter ve) |
int | main () |
void PrintThem | ( | Iter | vb, | |
Iter | ve | |||
) |
int main | ( | ) |
Definition at line 23 of file close.cxx.
00023 { 00024 00025 typedef int Type; 00026 typedef std::vector<Type> Container; 00027 typedef Type Dist; 00028 00029 Container v ; 00030 ostream_iterator<Type> out(cout," "); 00031 /* 00032 v.push_back(-1.5); 00033 v.push_back(2.5); 00034 v.push_back(6.5); 00035 v.push_back(7.5); 00036 v.push_back(8.566); 00037 v.push_back(15.5); 00038 v.push_back(16.1); 00039 v.push_back(21.1); 00040 Dist distance = 3.; 00041 */ 00042 v.push_back(1); 00043 v.push_back(2); 00044 v.push_back(3); 00045 v.push_back(4); 00046 v.push_back(20); 00047 v.push_back(21); 00048 v.push_back(30); 00049 int distance = 3; 00050 00051 00052 cout<<"** Initial **"<<endl; 00053 PrintThem(v.begin(), v.end() ); 00054 00055 Container areClose 00056 = removeDistant<Close<Dist, Dist>, Container, Dist>(v, distance); 00057 00058 cout<<"** areClose **"<<endl; 00059 PrintThem(areClose.begin(), areClose.end() ); 00060 00061 return 0; 00062 }