Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Coordinate Class Reference

List of all members.

Detailed Description

This is a coordinate position on a Cartesian plane.

Author:
John Schneiderman

Definition at line 30 of file coordinate.h.

Public Member Functions

 Coordinate (const Coordinate &point)
 Coordinate (double setX, double setY, double setZ)
 Coordinate (double value)
 Coordinate ()
Coordinate operator * (const Coordinate &rhs) const
Coordinateoperator *= (const Coordinate &rhs)
bool operator!= (const Coordinate &rhs) const
Coordinate operator+ (const Coordinate &rhs) const
Coordinateoperator+= (const Coordinate &rhs)
Coordinate operator- (const Coordinate &rhs) const
Coordinateoperator-= (const Coordinate &rhs)
Coordinate operator/ (const Coordinate &rhs) const
Coordinateoperator/= (const Coordinate &rhs)
Coordinateoperator= (const Coordinate &rhs)
bool operator== (const Coordinate &rhs) const

Public Attributes

double x
double y
double z

Friends

ostream & operator<< (ostream &out, const Coordinate &point)
istream & operator>> (istream &in, Coordinate &point)


Constructor & Destructor Documentation

Coordinate::Coordinate  ) 
 

Default constructor.

Definition at line 20 of file coordinate.cpp.

References x, y, and z.

Coordinate::Coordinate double  value  ) 
 

One-argument constructor.

Parameters:
value is the number to set all of the coordinates to.

Definition at line 27 of file coordinate.cpp.

References x, y, and z.

Coordinate::Coordinate double  setX,
double  setY,
double  setZ
 

Three-argument constructor.

Parameters:
setX is the number to set the x-coordinate to.
setY is the number to set the y-coordinate to.
setZ is the number to set the z-coordinate to.

Definition at line 34 of file coordinate.cpp.

References x, y, and z.

Coordinate::Coordinate const Coordinate point  ) 
 

Copy constructor.

Parameters:
point is the coordinates for *this.

Definition at line 41 of file coordinate.cpp.


Member Function Documentation

Coordinate Coordinate::operator * const Coordinate rhs  )  const
 

Multiplies two coordinates.
*this.x * rhs.x
*this.y * rhs.y
*this.z * rhs.z

Parameters:
rhs are the values to multiply to *this.
Returns:
the result of the multiplication.

Definition at line 76 of file coordinate.cpp.

References x, y, and z.

Coordinate & Coordinate::operator *= const Coordinate rhs  ) 
 

Multiplies two coordinates together and assigns it into *this.
*this.x *= rhs.x
*this.y *= rhs.y
*this.z *= rhs.z

Parameters:
rhs are the values to multiply into *this.
Returns:
*this

Definition at line 112 of file coordinate.cpp.

References x, y, and z.

bool Coordinate::operator!= const Coordinate rhs  )  const
 

Unequivalant operator.

Parameters:
rhs are the values to compare to *this.
Returns:
false if x, y, z are equal to rhs.x, rhs.y, rhs.z, true else wise.

Definition at line 136 of file coordinate.cpp.

Coordinate Coordinate::operator+ const Coordinate rhs  )  const
 

Adds two coordinates together.
*this.x + rhs.x
*this.y + rhs.y
*this.z + rhs.z

Parameters:
rhs are the values to add to *this.
Returns:
the result of the addition.

Definition at line 56 of file coordinate.cpp.

References x, y, and z.

Coordinate & Coordinate::operator+= const Coordinate rhs  ) 
 

Adds two coordinates together and assigns it into *this.
*this.x += rhs.x
*this.y += rhs.y
*this.z += rhs.z

Parameters:
rhs are the values to add to *this.
Returns:
*this

Definition at line 96 of file coordinate.cpp.

References x, y, and z.

Coordinate Coordinate::operator- const Coordinate rhs  )  const
 

Subtracts two coordinates.
*this.x - rhs.x
*this.y - rhs.y
*this.z - rhs.z

Parameters:
rhs are the values to subtract from *this.
Returns:
the result of the subtraction.

Definition at line 66 of file coordinate.cpp.

References x, y, and z.

Coordinate & Coordinate::operator-= const Coordinate rhs  ) 
 

Subtracts two coordinates together and assigns it into *this.
*this.x -= rhs.x
*this.y -= rhs.y
*this.z -= rhs.z

Parameters:
rhs are the values to subtract from *this.
Returns:
*this

Definition at line 104 of file coordinate.cpp.

References x, y, and z.

Coordinate Coordinate::operator/ const Coordinate rhs  )  const
 

Devides two coordinates.
*this.x / rhs.x
*this.y / rhs.y
*this.z / rhs.z

Parameters:
rhs are the values to divide into *this.
Returns:
the result of the division.

Definition at line 86 of file coordinate.cpp.

References x, y, and z.

Coordinate & Coordinate::operator/= const Coordinate rhs  ) 
 

Divides two coordinates together and assigns it into *this.
*this.x /= rhs.x
*this.y /= rhs.y
*this.z /= rhs.z

Parameters:
rhs are the values to divide into *this.
Returns:
*this

Definition at line 120 of file coordinate.cpp.

References x, y, and z.

Coordinate & Coordinate::operator= const Coordinate rhs  ) 
 

Assignment operator.

Parameters:
rhs is the values to assign into *this.
Returns:
*this.

Definition at line 46 of file coordinate.cpp.

References x, y, and z.

bool Coordinate::operator== const Coordinate rhs  )  const
 

Equivalant operator.

Parameters:
rhs are the values to compare to *this.
Returns:
true if x, y, z are equal to rhs.x, rhs.y, rhs.z, false else wise.

Definition at line 128 of file coordinate.cpp.

References x, y, and z.


Friends And Related Function Documentation

ostream& operator<< ostream &  out,
const Coordinate point
[friend]
 

Writes out a coordinate seperated by white space in the order of x, y, z.

Parameters:
out is the output buffer.
point are the vaules to write into out.
Returns:
the output buffer.

Definition at line 150 of file coordinate.cpp.

istream& operator>> istream &  in,
Coordinate point
[friend]
 

Reads in a coordinate seperated by white space in the order of x, y, z.

Parameters:
in is the input buffer.
point is the Coordinate to place the values into.
Returns:
the input buffer.

Definition at line 144 of file coordinate.cpp.


Member Data Documentation

double Coordinate::x
 

Parameters:
x is the x-coordinate on the Cartesian plane.

Definition at line 36 of file coordinate.h.

Referenced by RadialDistributionFunction::acquire(), RadialDensityHistogram::acquire(), MDLJ_Simulation::calculateAccelerations(), Cluster::calculatePotentialEnergy(), Coordinate(), FCC_Lattice::createLattice(), MCLJ_Simulation::generateDistanceToMove(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator=(), operator==(), operator>>(), and MCLJ_Simulation::potentialEnergyDifference().

double Coordinate::y
 

Parameters:
y is the y-coordinate on the Cartesian plane.

Definition at line 40 of file coordinate.h.

Referenced by RadialDistributionFunction::acquire(), RadialDensityHistogram::acquire(), MDLJ_Simulation::calculateAccelerations(), Cluster::calculatePotentialEnergy(), Coordinate(), FCC_Lattice::createLattice(), MCLJ_Simulation::generateDistanceToMove(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator=(), operator==(), operator>>(), and MCLJ_Simulation::potentialEnergyDifference().

double Coordinate::z
 

Parameters:
z is the z-coordinate on the Cartesian plane.

Definition at line 44 of file coordinate.h.

Referenced by RadialDistributionFunction::acquire(), RadialDensityHistogram::acquire(), MDLJ_Simulation::calculateAccelerations(), Cluster::calculatePotentialEnergy(), Coordinate(), FCC_Lattice::createLattice(), MCLJ_Simulation::generateDistanceToMove(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator=(), operator==(), operator>>(), and MCLJ_Simulation::potentialEnergyDifference().


The documentation for this class was generated from the following files:
Generated on Tue Mar 28 23:28:49 2006 for ClusterSim by  doxygen 1.4.4