Version 1.2 (June 2013)
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
simulator.geometry.ContinuousVector Class Reference

Implements 3D vector of continuous spatial coordinates. Can be used to store Continuous coordinates or Movement vectors. More...

Inheritance diagram for simulator.geometry.ContinuousVector:

Public Member Functions

 ContinuousVector ()
 Default Constructor - constructs a ContinuousVector with points at 0,0,0. More...
 
 ContinuousVector (ContinuousVector aCC)
 Constructs a continuous vector with points specified by a provided continuous vector. More...
 
 ContinuousVector (Element xmlRoot)
 Constructs a continuous vector with points specified from XML tags. More...
 
 ContinuousVector (DiscreteVector dC, double res)
 Translate a discrete coordinates expressed on a discrete spatial grid with the resolution res to form continuous vector. More...
 
 ContinuousVector (double x, double y, double z)
 Create a continuous vector from three provided points. More...
 
void set (ContinuousVector cc)
 Set this vector to the points contained in a supplied continuous vector. More...
 
void set (double x, double y, double z)
 Set this vector to the supplied X,Y,Z points. More...
 
void reset ()
 Set all points in the vector to zero. More...
 
boolean isValid ()
 Determine whether the numeric points in this vector are valid. More...
 
void turnAround ()
 
boolean equals (double x, double y, double z)
 Determine if this vector is in the location giving by the points X,Y,Z. More...
 
boolean isZero ()
 Determine if all points in the vector are zero. More...
 
String toString ()
 Print coordinates to string. More...
 
void add (ContinuousVector v)
 Add vector v to this continuous vector. More...
 
void add (double x, double y, double z)
 Add points X,Y,Z to their respective point in this vector. More...
 
void sendSum (ContinuousVector a, ContinuousVector b)
 Store in this vector the sum of two other continuous vectors. More...
 
void subtract (ContinuousVector v)
 Subtract vector v from this continuous vector. More...
 
void sendDiff (ContinuousVector a, ContinuousVector b)
 Store in this vector the subtraction of two other continuous vectors. More...
 
double prodScalar (ContinuousVector cc)
 Calculate scalar product (dot product) of this vector with vector cc supplied. More...
 
void times (double multiplier)
 Multiply (stretch) this vector by supplied multiplier. More...
 
void alea (boolean is3D)
 Set this vector to a random coordinate (x,y,z) More...
 
void normalizeVector ()
 
void normalizeVector (double newLength)
 Normalize this Vector to a given length. More...
 
double distance (ContinuousVector cc)
 Calculate and return the absolute distance to a vector expressed in cc. More...
 
double norm ()
 Return absolute length. More...
 
double cosAngle (ContinuousVector cc)
 Calculate cosine of the angle to vector cc. More...
 
Object clone () throws CloneNotSupportedException
 Clone this vector, if supported. More...
 

Public Attributes

double x
 
double y
 
double z
 

Detailed Description

Implements 3D vector of continuous spatial coordinates. Can be used to store Continuous coordinates or Movement vectors.

Implements 3D vector of continuous spatial coordinates. Can be used to store Continuous coordinates or Movement vectors

Author
Andreas D�tsch (andre.nosp@m.as.d.nosp@m.oetsc.nosp@m.h@he.nosp@m.lmhol.nosp@m.tz-h.nosp@m.zi.de), Helmholtz Centre for Infection Research (Germany)
Laurent Lardon (lardo.nosp@m.nl@s.nosp@m.upagr.nosp@m.o.in.nosp@m.ra.fr), INRA, France
Jo�o Xavier (xavie.nosp@m.rj@m.nosp@m.skcc..nosp@m.org), Memorial Sloan-Kettering Cancer Center (NY, USA)

Constructor & Destructor Documentation

simulator.geometry.ContinuousVector.ContinuousVector ( )

Default Constructor - constructs a ContinuousVector with points at 0,0,0.

Default Constructor - constructs a ContinuousVector with points at 0,0,0

simulator.geometry.ContinuousVector.ContinuousVector ( ContinuousVector  aCC)

Constructs a continuous vector with points specified by a provided continuous vector.

Constructs a continuous vector with points specified by a provided continuous vector

Parameters
aCCContinuousVector which to initialise the points from
simulator.geometry.ContinuousVector.ContinuousVector ( Element  xmlRoot)

Constructs a continuous vector with points specified from XML tags.

Constructs a continuous vector with points specified from XML tags

Parameters
xmlRootSet of XML tags containing an X,Y,and Z coordinate
simulator.geometry.ContinuousVector.ContinuousVector ( DiscreteVector  dC,
double  res 
)

Translate a discrete coordinates expressed on a discrete spatial grid with the resolution res to form continuous vector.

Translate a discrete coordinates expressed on a discrete spatial grid with the resolution res to form continuous vector

Parameters
dCDiscrete vector containing points on a grid
resThe resolution of this grid, to use to transform these points
simulator.geometry.ContinuousVector.ContinuousVector ( double  x,
double  y,
double  z 
)

Create a continuous vector from three provided points.

Create a continuous vector from three provided points

Parameters
xX coordinate
yY coordinate
zZ coordinate

Member Function Documentation

void simulator.geometry.ContinuousVector.add ( ContinuousVector  v)

Add vector v to this continuous vector.

Add vector v to this continuous vector

Parameters
vContinuousVector to add to this vector
void simulator.geometry.ContinuousVector.add ( double  x,
double  y,
double  z 
)

Add points X,Y,Z to their respective point in this vector.

Add points X,Y,Z to their respective point in this vector

Parameters
xX coordinate
yY coordinate
zZ coordinater
void simulator.geometry.ContinuousVector.alea ( boolean  is3D)

Set this vector to a random coordinate (x,y,z)

Set this vector to a random coordinate (x,y,z)

Parameters
is3DBoolean noting if a Z coordinate needs to be calculated (if domain is 3D)
Object simulator.geometry.ContinuousVector.clone ( ) throws CloneNotSupportedException

Clone this vector, if supported.

Clone this vector, if supported

Exceptions
CloneNotSupportedExceptionThrown if the object cannot be cloned
double simulator.geometry.ContinuousVector.cosAngle ( ContinuousVector  cc)

Calculate cosine of the angle to vector cc.

Calculate cosine of the angle to vector cc

Parameters
ccContinuousVector for which cosine of the angle to this one should be calculated
Returns
Cosine of the angle to vector cc
double simulator.geometry.ContinuousVector.distance ( ContinuousVector  cc)

Calculate and return the absolute distance to a vector expressed in cc.

Calculate and return the absolute distance to a vector expressed in cc

Parameters
ccContinuousVector to calculate distance to
boolean simulator.geometry.ContinuousVector.equals ( double  x,
double  y,
double  z 
)

Determine if this vector is in the location giving by the points X,Y,Z.

Determine if this vector is in the location giving by the points X,Y,Z

Parameters
xX coordinate
yY coordinate
zZ coordinate
Returns
Booloean stating whether the vector position and coordinate (x,y,z) is identical
boolean simulator.geometry.ContinuousVector.isValid ( )

Determine whether the numeric points in this vector are valid.

Determine whether the numeric points in this vector are valid

Returns
Boolean stating whether this vector is valid (true) or not (false)
boolean simulator.geometry.ContinuousVector.isZero ( )

Determine if all points in the vector are zero.

Determine if all points in the vector are zero

Returns
Boolean stating whether all points in the vector are zero
double simulator.geometry.ContinuousVector.norm ( )

Return absolute length.

Return absolute length

Returns
Double value stating absolute length of this vector
void simulator.geometry.ContinuousVector.normalizeVector ( )

Normalize this Vector to unit length.

void simulator.geometry.ContinuousVector.normalizeVector ( double  newLength)

Normalize this Vector to a given length.

Normalize this Vector to a given length.

Parameters
newLengthLength used to normalise vector
double simulator.geometry.ContinuousVector.prodScalar ( ContinuousVector  cc)

Calculate scalar product (dot product) of this vector with vector cc supplied.

Calculate scalar product (dot product) of this vector with vector cc supplied

Parameters
ccContinuous vector to multiply (dot product) with this vector
Returns
Double value of scalar product of two vectors
void simulator.geometry.ContinuousVector.reset ( )

Set all points in the vector to zero.

Set all points in the vector to zero

void simulator.geometry.ContinuousVector.sendDiff ( ContinuousVector  a,
ContinuousVector  b 
)

Store in this vector the subtraction of two other continuous vectors.

Store in this vector the subtraction of two other continuous vectors

Parameters
aFirst continuous vector
bContinuous vector to subtract from the first
void simulator.geometry.ContinuousVector.sendSum ( ContinuousVector  a,
ContinuousVector  b 
)

Store in this vector the sum of two other continuous vectors.

Store in this vector the sum of two other continuous vectors

Parameters
aFirst continuous vector
bContinuous vector to add to first
void simulator.geometry.ContinuousVector.set ( ContinuousVector  cc)

Set this vector to the points contained in a supplied continuous vector.

Set this vector to the points contained in a supplied continuous vector

Parameters
ccContinuous vector of points to set this vector to
void simulator.geometry.ContinuousVector.set ( double  x,
double  y,
double  z 
)

Set this vector to the supplied X,Y,Z points.

Set this vector to the supplied X,Y,Z points

Parameters
xX coordinate
yY coordinate
zZ coordinate
void simulator.geometry.ContinuousVector.subtract ( ContinuousVector  v)

Subtract vector v from this continuous vector.

Subtract vector v from this continuous vector

Parameters
vContinuousVector to subtract from this vector
void simulator.geometry.ContinuousVector.times ( double  multiplier)

Multiply (stretch) this vector by supplied multiplier.

Multiply (stretch) this vector by supplied multiplier

Parameters
multiplierAmount to stretch this vector by
String simulator.geometry.ContinuousVector.toString ( )

Print coordinates to string.

Print coordinates to string

Returns
String containing the points in this vector
void simulator.geometry.ContinuousVector.turnAround ( )

Changes the sign of the vector. Used for movement vectors.

Member Data Documentation

double simulator.geometry.ContinuousVector.x

X coordinate of the point contained in this vector

double simulator.geometry.ContinuousVector.y

Y coordinate of the point contained in this vector

double simulator.geometry.ContinuousVector.z

Z coordinate of the point contained in this vector


The documentation for this class was generated from the following file: