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

Implements 3D vector of discrete spatial coordinates. More...

Inheritance diagram for simulator.geometry.DiscreteVector:

Public Member Functions

 DiscreteVector ()
 Creates a discrete vector initialised at 0,0,0. More...
 
 DiscreteVector (Element coordinatesRoot)
 Constructs a discrete vector with points specified from XML tags. More...
 
DiscreteVector clone ()
 Creates a clone of this discrete vector. More...
 
void set (DiscreteVector dV)
 Constructs a continuous vector with points specified by a provided discrete vector. More...
 
 DiscreteVector (ContinuousVector cc, double res)
 Translate a continuous coordinate expressed on a spatial grid with the resolution res to form a discrete vector. More...
 
void set (int i0, int j0, int k0)
 Set this vector to the supplied i,j,k points. More...
 
void reset ()
 Set all points in the vector to zero. More...
 
 DiscreteVector (int n, int m, int l)
 Create a discrete vector from three provided points. More...
 
void add (int i, int j, int k)
 Add points I,J,K to their respective point in this vector. More...
 
void add (DiscreteVector dC)
 Add vector v to this discrete vector. More...
 
void sendSum (DiscreteVector a, DiscreteVector b)
 Store in this vector the sum of two other discrete vectors. More...
 
void diff (DiscreteVector dC)
 Subtract vector v from this discrete vector. More...
 
void times (double n)
 Multiply (stretch) this vector by supplied multiplier. More...
 
void turnAround ()
 
double norm ()
 Return absolute length. More...
 
boolean equals (DiscreteVector dc)
 Determine if this vector equals the points given in the provided vector. More...
 
int prodScalar (DiscreteVector dc)
 Calculate scalar product (dot product) of this vector with vector dc supplied. More...
 
void orthoVector (DiscreteVector v, DiscreteVector w)
 Calculates two orthogonal vectors colinear to this vector. More...
 
String toString ()
 Print coordinates to string. More...
 

Public Attributes

int i
 
int j
 
int k
 

Detailed Description

Implements 3D vector of discrete spatial coordinates.

Implements 3D vector of discrete spatial coordinates

Author
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.DiscreteVector.DiscreteVector ( )

Creates a discrete vector initialised at 0,0,0.

Creates a discrete vector initialised at 0,0,0

simulator.geometry.DiscreteVector.DiscreteVector ( Element  coordinatesRoot)

Constructs a discrete vector with points specified from XML tags.

Constructs a discrete vector with points specified from XML tags

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

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

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

Parameters
ccContinuous vector containing points on a grid
resThe resolution of this grid, to use to transform these points
simulator.geometry.DiscreteVector.DiscreteVector ( int  n,
int  m,
int  l 
)

Create a discrete vector from three provided points.

Create a discrete vector from three provided points

Parameters
nN coordinate
mM coordinate
lL coordinate

Member Function Documentation

void simulator.geometry.DiscreteVector.add ( int  i,
int  j,
int  k 
)

Add points I,J,K to their respective point in this vector.

Add points I,J,K to their respective point in this vector

Parameters
iI coordinate
jJ coordinate
kK coordinate
void simulator.geometry.DiscreteVector.add ( DiscreteVector  dC)

Add vector v to this discrete vector.

Add vector v to this discrete vector

Parameters
dCDiscreteVector to add to this vector
DiscreteVector simulator.geometry.DiscreteVector.clone ( )

Creates a clone of this discrete vector.

Creates a clone of this discrete vector

Returns
Clone of this discrete vector object
void simulator.geometry.DiscreteVector.diff ( DiscreteVector  dC)

Subtract vector v from this discrete vector.

Subtract vector v from this discrete vector

Parameters
dCDiscreteVector to subtract from this vector
boolean simulator.geometry.DiscreteVector.equals ( DiscreteVector  dc)

Determine if this vector equals the points given in the provided vector.

Determine if this vector equals the points given in the provided vector

Parameters
dcDiscrete vector to compare to this vector
Returns
Boolean stating whether the two vectors are equal
double simulator.geometry.DiscreteVector.norm ( )

Return absolute length.

Return absolute length

Returns
Double value stating absolute length of this vector
void simulator.geometry.DiscreteVector.orthoVector ( DiscreteVector  v,
DiscreteVector  w 
)

Calculates two orthogonal vectors colinear to this vector.

Calculates two orthogonal vectors colinear to this vector

Parameters
vFirst discrete vector to produce
wSecond discrete vector to produce
int simulator.geometry.DiscreteVector.prodScalar ( DiscreteVector  dc)

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

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

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

Set all points in the vector to zero.

Set all points in the vector to zero

void simulator.geometry.DiscreteVector.sendSum ( DiscreteVector  a,
DiscreteVector  b 
)

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

Store in this vector the sum of two other discrete vectors

Parameters
aFirst discrete vector
bDiscrete vector to add to first
void simulator.geometry.DiscreteVector.set ( DiscreteVector  dV)

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

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

Parameters
dVDiscreteVector which to initialise the points from
void simulator.geometry.DiscreteVector.set ( int  i0,
int  j0,
int  k0 
)

Set this vector to the supplied i,j,k points.

Set this vector to the supplied i,j,k points

Parameters
i0i coordinate
j0j coordinate
k0k coordinate
void simulator.geometry.DiscreteVector.times ( double  n)

Multiply (stretch) this vector by supplied multiplier.

Multiply (stretch) this vector by supplied multiplier

Parameters
nAmount to stretch this vector by
String simulator.geometry.DiscreteVector.toString ( )

Print coordinates to string.

Print coordinates to string

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

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

Member Data Documentation

int simulator.geometry.DiscreteVector.i

I Location on a grid

int simulator.geometry.DiscreteVector.j

J Location on a grid

int simulator.geometry.DiscreteVector.k

K Location on a grid


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