Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

vector Class Reference

#include <setdest.h>

Collaboration diagram for vector:

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

Public Attributes

double X
double Y
double Z

Friends

vector operator * (const double a, const vector b)
vector operator/ (const vector a, const double b)
vector operator * (const double a, const vector 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         }


Member Data Documentation

double vector::X
 

Definition at line 114 of file god.h.

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

double vector::Y
 

Definition at line 115 of file god.h.

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

double vector::Z
 

Definition at line 116 of file god.h.

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


The documentation for this class was generated from the following files:
Generated on Tue Apr 20 13:34:53 2004 for NS2.26SourcesOriginal by doxygen 1.3.3