double coordinates[dim];
};
-// /**
-// * Prints the coordinates of this point in the
-// * form #(x1,x2,x3,etc)#.
-// */
-//template <int dim>
-//ostream & operator << (ostream &out, const Point<dim> &p);
+ /**
+ * Prints the coordinates of this point in the
+ * form #x1 x2 x3 etc#.
+ */
+template <int dim>
+ostream & operator << (ostream &out, const Point<dim> &p);
+template <>
inline
Point<1>::Point (const double x) {
coordinates[0] = x;
+template <>
inline
Point<2>::Point (const double x, const double y) {
coordinates[0] = x;
+template <>
inline
Point<3>::Point (const double x, const double y, const double z) {
coordinates[0] = x;
+template <int dim>
inline
-ostream & operator << (ostream &out, const Point<1> &p) {
- out << p(0);
- return out;
-};
-
-
-inline
-ostream & operator << (ostream &out, const Point<2> &p) {
-// out << "(";
-// for (unsigned int i=0; i<1; i++)
-// out << p(i) << ",";
-// out << p(1) << ")";
- out << p(0) << " " << p(1);
+ostream & operator << (ostream &out, const Point<dim> &p) {
+ for (unsigned int i=0; i<dim; ++i)
+ out << p(i);
return out;
};