20 #include "headcpp.hpp"
23 #include "utilities.hpp"
27 fread_be (&
ndim,
sizeof(
int), 1, fd) ;
29 fread_be (
coord.set_data(),
sizeof(
double),
ndim, fd) ;
34 fwrite_be (&
ndim,
sizeof(
int), 1, fd) ;
35 fwrite_be (
coord.get_data(),
sizeof(
double),
ndim, fd) ;
38 ostream& operator<< (ostream& o,
const Point& so) {
41 for (
int i=0 ; i<so.
ndim-1 ; i++)
42 o << so.
coord[i] <<
", " ;
The class Point is used to store the coordinates of a point.
Memory_mapped_array< double > coord
Array on the coordinates (mainly designed for absolute Cartesian coordinates).
int ndim
Number of dimensions.
void save(FILE *) const
Saving function.
Point(int n)
Standard constructor (the coordinates are not affected).