00001
00002
00003
00004
00005
00006
00007 #ifndef synaps_topology_vertex_H
00008 #define synaps_topology_vertex_H
00009
00010 #include <vector>
00011 #include <synaps/init.h>
00012
00013 __BEGIN_NAMESPACE_SYNAPS
00014
00015 namespace topology
00016 {
00018
00022 template <class Point>
00023 struct vertex
00024 {
00026 typedef typename Point::coeff_t coeff_t;
00027
00029 Point point;
00030
00033 unsigned index;
00034
00036 vertex() {point = Point();}
00037
00039 vertex( coeff_t x, coeff_t y, coeff_t z )
00040 {
00041 point = Point(x,y,z);
00042 }
00043
00044 private:
00045
00050 vertex( const vertex & Vertex )
00051 {std::cerr << " vertex(const vertex & Vertex) \n";}
00052 };
00053
00055 template <class Point>
00056 bool
00057 operator == ( const vertex<Point> &v1, const vertex<Point> &v2 )
00058 {return ( v1.point == v2.point );}
00059
00064 template<class Point>
00065 std::ostream &
00066 operator<<(std::ostream & os, const vertex<Point> & v)
00067 {
00068 os << "Vertex:" << std::endl;
00069 os << "->index: " << v.index << std::endl;
00070 os << "->point: " << v.point << std::endl;
00071 return os;
00072 }
00073
00074
00075 }
00076
00077 __END_NAMESPACE_SYNAPS
00078
00079 #endif // synaps_topology_vertex_H