CARLsim
4.1.0
CARLsim: a GPU-accelerated SNN simulator
|
Go to the documentation of this file.
42 #ifndef _LINEAR_ALGEBRA_H_
43 #define _LINEAR_ALGEBRA_H_
59 Point3D(
int _x,
int _y,
int _z) :
x(1.0*_x),
y(1.0*_y),
z(1.0*_z) {}
60 Point3D(
double _x,
double _y,
double _z) :
x(_x),
y(_y),
z(_z) {}
65 return strm <<
"Point3D=(" << p.
x <<
"," << p.
y <<
"," << p.
z <<
")";
88 bool Equals(
const Point3D& p)
const {
return (
x==p.
x &&
y==p.
y &&
z==p.
z); }
89 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); }
friend std::ostream & operator<<(std::ostream &strm, const Point3D &p)
double dist(Point3D &p1, Point3D &p2)
bool operator==(const Point3D &p) const
Point3D operator+(const Point3D &p) const
bool operator<(const Point3D &p) const
bool operator>=(const Point3D &p) const
Point3D operator*(const double a) const
Point3D operator+(const double a) const
Point3D operator-(const Point3D &p) const
Point3D operator-(const double a) const
Point3D operator/(const Point3D &p) const
bool operator!=(const Point3D &p) const
Point3D operator*(const Point3D &p) const
unsigned long int get_time_ms64()
bool operator<=(const Point3D &p) const
Point3D operator/(const double a) const
bool operator>(const Point3D &p) const
Point3D(double _x, double _y, double _z)
double norm(const Point3D &p)
double norm2(const Point3D &p)
calculate norm^2
Point3D(int _x, int _y, int _z)