00001 00027 #ifndef POTENTIALCLUSTER_H_ 00028 #define POTENTIALCLUSTER_H_ 00029 #include<limits> 00030 #include"NodeWrapper.h" 00031 00032 using namespace std; 00033 class PotentialCluster { 00034 public: 00035 const NodeWrapper & original; 00036 NodeWrapper * closest; 00037 double clusterSize; 00038 00039 PotentialCluster(NodeWrapper & pOriginal): original(pOriginal) { 00040 closest = NULL; 00041 clusterSize = numeric_limits<float>::max(); 00042 } 00043 friend ostream & operator<<(ostream & s, const PotentialCluster & p); 00044 00045 }; 00046 ostream & operator<<(ostream & s, const PotentialCluster & p){ 00047 s<<"PC : ["<<p.original<<", ?"; 00048 if(p.closest!=NULL) 00049 s<<*(p.closest); 00050 else 00051 s<<"NULL"; 00052 s<<","<<p.clusterSize<<"]"; 00053 return s; 00054 } 00055 00056 #endif /* POTENTIALCLUSTER_H_ */