vector Class Reference

#include <setdest.h>

Collaboration diagram for vector:

Collaboration graph
[legend]

Detailed Description

Definition at line 17 of file setdest.h.

Public Member Functions

double length ()
double length ()
int operator!= (const vector a)
int operator!= (const vector a)
void operator+= (const vector a)
void operator+= (const vector a)
vector operator- (const vector a)
vector operator- (const vector a)
void operator= (const vector a)
void operator= (const vector a)
int operator== (const vector a)
int operator== (const vector a)
 vector (double x=0.0, double y=0.0, double z=0.0)
 vector (double x=0.0, double y=0.0, double z=0.0)

Data Fields

double X
double Y
double Z

Friends

vector operator * (const double a, const vector b)
vector operator * (const double a, const vector b)
vector operator/ (const vector a, const double b)
vector operator/ (const vector a, const double b)


Constructor & Destructor Documentation

vector::vector double  x = 0.0,
double  y = 0.0,
double  z = 0.0
[inline]
 

Definition at line 19 of file setdest.h.

00019                                                            {
00020         X = x; Y = y; Z = z;
00021     }

vector::vector double  x = 0.0,
double  y = 0.0,
double  z = 0.0
[inline]
 

Definition at line 81 of file god.h.

00081                                                            {
00082         X = x; Y = y; Z = z;
00083     }


Member Function Documentation

double vector::length  )  [inline]
 

Definition at line 84 of file god.h.

00084                     {
00085         return sqrt(X*X + Y*Y + Z*Z);
00086     }

double vector::length  )  [inline]
 

Definition at line 22 of file setdest.h.

Referenced by God::IsNeighbor(), Node::Update(), and Node::UpdateNeighbors().

00022                     {
00023         return sqrt(X*X + Y*Y + Z*Z);
00024     }

int vector::operator!= const vector  a  )  [inline]
 

Definition at line 101 of file god.h.

00101                                                 {
00102         return (X != a.X || Y != a.Y || Z != a.Z);
00103     }

int vector::operator!= const vector  a  )  [inline]
 

Definition at line 39 of file setdest.h.

00039                                                 {
00040         return (X != a.X || Y != a.Y || Z != a.Z);
00041     }

void vector::operator+= const vector  a  )  [inline]
 

Definition at line 93 of file god.h.

00093                                                  {
00094         X += a.X;
00095         Y += a.Y;
00096         Z += a.Z;
00097     }

void vector::operator+= const vector  a  )  [inline]
 

Definition at line 31 of file setdest.h.

00031                                                  {
00032         X += a.X;
00033         Y += a.Y;
00034         Z += a.Z;
00035     }

vector vector::operator- const vector  a  )  [inline]
 

Definition at line 104 of file god.h.

00104                                             {
00105         return vector(X-a.X, Y-a.Y, Z-a.Z);
00106     }

vector vector::operator- const vector  a  )  [inline]
 

Definition at line 42 of file setdest.h.

00042                                             {
00043         return vector(X-a.X, Y-a.Y, Z-a.Z);
00044     }

void vector::operator= const vector  a  )  [inline]
 

Definition at line 88 of file god.h.

00088                                                 {
00089         X = a.X;
00090         Y = a.Y;
00091         Z = a.Z;
00092     }

void vector::operator= const vector  a  )  [inline]
 

Definition at line 26 of file setdest.h.

00026                                                 {
00027         X = a.X;
00028         Y = a.Y;
00029         Z = a.Z;
00030     }

int vector::operator== const vector  a  )  [inline]
 

Definition at line 98 of file god.h.

00098                                                 {
00099         return (X == a.X && Y == a.Y && Z == a.Z);
00100     }

int vector::operator== const vector  a  )  [inline]
 

Definition at line 36 of file setdest.h.

00036                                                 {
00037         return (X == a.X && Y == a.Y && Z == a.Z);
00038     }


Friends And Related Function Documentation

vector operator * const double  a,
const vector  b
[friend]
 

Definition at line 107 of file god.h.

00107                                                                    {
00108         return vector(a*b.X, a*b.Y, a*b.Z);
00109     }

vector operator * const double  a,
const vector  b
[friend]
 

Definition at line 45 of file setdest.h.

00045                                                                    {
00046         return vector(a*b.X, a*b.Y, a*b.Z);
00047     }

vector operator/ const vector  a,
const double  b
[friend]
 

Definition at line 110 of file god.h.

00110                                                                    {
00111         return vector(a.X/b, a.Y/b, a.Z/b);
00112     }

vector operator/ const vector  a,
const double  b
[friend]
 

Definition at line 48 of file setdest.h.

00048                                                                    {
00049         return vector(a.X/b, a.Y/b, a.Z/b);
00050     }


Field Documentation

double vector::X
 

Definition at line 52 of file setdest.h.

Referenced by Node::Dump(), vector< int >::length(), vector< int >::operator!=(), vector< int >::operator+=(), vector< int >::operator=(), vector< int >::operator==(), Node::RandomDestination(), Node::RandomPosition(), ReadInMovementPattern(), Node::Update(), and vector< int >::vector().

double vector::Y
 

Definition at line 53 of file setdest.h.

Referenced by Node::Dump(), vector< int >::length(), vector< int >::operator!=(), vector< int >::operator+=(), vector< int >::operator=(), vector< int >::operator==(), Node::RandomDestination(), Node::RandomPosition(), ReadInMovementPattern(), Node::Update(), and vector< int >::vector().

double vector::Z
 

Definition at line 54 of file setdest.h.

Referenced by Node::Dump(), vector< int >::length(), vector< int >::operator!=(), vector< int >::operator+=(), vector< int >::operator=(), vector< int >::operator==(), Node::RandomDestination(), Node::RandomPosition(), ReadInMovementPattern(), Node::Update(), and vector< int >::vector().


The documentation for this class was generated from the following files:
Generated on Tue Mar 6 17:35:20 2007 for ns2 Network Simulator 2.29 by  doxygen 1.4.6