44 #ifndef _LINEAR_ALGEBRA_H_ 45 #define _LINEAR_ALGEBRA_H_ 61 Point3D(
int _x,
int _y,
int _z) :
x(1.0*_x),
y(1.0*_y),
z(1.0*_z) {}
62 Point3D(
double _x,
double _y,
double _z) :
x(_x),
y(_y),
z(_z) {}
67 return strm <<
"Point3D=(" << p.
x <<
"," << p.
y <<
"," << p.
z <<
")";
90 bool Equals(
const Point3D& p)
const {
return (x==p.
x && y==p.
y && z==p.
z); }
91 int CompareTo(
const Point3D& p)
const {
return (x>p.
x&&y>p.
y&&z>p.
z) ? 1 : ( (x<p.
x&&y<p.
y&&z<p.
z) ? -1 : 0); }
bool operator>=(const Point3D &p) const
unsigned long int get_time_ms64()
Point3D operator-(const Point3D &p) const
bool operator==(const Point3D &p) const
double dist(Point3D &p1, Point3D &p2)
Point3D operator-(const double a) const
bool operator!=(const Point3D &p) const
Point3D operator+(const double a) const
double norm2(const Point3D &p)
calculate norm^2
Point3D operator*(const Point3D &p) const
bool operator<=(const Point3D &p) const
bool operator<(const Point3D &p) const
Point3D operator/(const Point3D &p) const
Point3D(double _x, double _y, double _z)
bool operator>(const Point3D &p) const
Point3D operator/(const double a) const
friend std::ostream & operator<<(std::ostream &strm, const Point3D &p)
Point3D(int _x, int _y, int _z)
double norm(const Point3D &p)
Point3D operator+(const Point3D &p) const
Point3D operator*(const double a) const