44 Point(
double newx,
double newy,
double newz);
45 Point(
int newx,
int newy,
int newz);
46 Point(
unsigned int newx,
unsigned int newy,
unsigned int newz);
52 const double& x()
const {
return _x; };
53 const double& y()
const {
return _y; };
54 const double& z()
const {
return _z; };
56 int xint()
const {
return static_cast<int>(_x); };
57 int yint()
const {
return static_cast<int>(_y); };
58 int zint()
const {
return static_cast<int>(_z); };
63 Point operator-()
const;
65 void operator += (
const Point &other);
66 void operator /= (
const int divisor);
67 void operator /= (
const double divisor);
68 void operator *= (
const int factor);
69 void operator *= (
const double factor);
76 Point operator/(
const double divisor);
77 Point operator*(
const double factor);
81 inline bool operator != (
const Point &other) {
return ( (xint() != other.xint() ) || (yint() != other.yint()) || (zint() != other.zint())); };
83 inline bool operator == (
const Point &other) {
return ( ( xint() == other.xint() ) && ( yint() == other.yint()) && ( zint() == other.zint())); };
86 inline double dot(
Point Other) {
87 return (_x*Other._x+_y*Other._y+_z*Other._z);
91 return Point(_y*Other._z-Other._y*_z, _z*Other._x-_x*Other._z,
92 _x*Other._y-_y*Other._x);
96 return sqrt(_x*_x+_y*_y+_z*_z);
101 static Point TransMatMultiply(
double* transMat,
Point inPoint);
113 template <
typename T>
120 static void Point_SUM(
void *in,
void *inout,
int* len, MPI_Datatype * dptr) {
121 for(
int i = 0; i < (*len); i++) {
124 (
static_cast<Point*
>(inout))[i] +=p1;
134 static bool first =
true;
148 static bool first =
true;
149 static MPI_Datatype datatype;
154 MPI_Type_contiguous(
sizeof(
Point), MPI_BYTE, &datatype);
155 MPI_Type_commit(&datatype);
static MPI_Datatype value()
Definition: point.h:146
A point class.
Definition: point.h:36
static MPI_Op _SUM()
define MPI_SUM operator on Points
Definition: point.h:133
An abstract class used for communicating messages using user-defined datatypes. The user must impleme...
Definition: zoltan_hilbert.h:76
Collection of Generic Parallel Functions: Sorting, Partitioning, Searching,...
Definition: zoltan_hilbert.h:72