Implements 3D vector of discrete spatial coordinates. More...
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 |
Implements 3D vector of discrete spatial coordinates.
Implements 3D vector of discrete spatial coordinates
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
coordinatesRoot | Set 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
cc | Continuous vector containing points on a grid |
res | The 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
n | N coordinate |
m | M coordinate |
l | L coordinate |
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
i | I coordinate |
j | J coordinate |
k | K coordinate |
void simulator.geometry.DiscreteVector.add | ( | DiscreteVector | dC | ) |
Add vector v to this discrete vector.
Add vector v to this discrete vector
dC | DiscreteVector to add to this vector |
DiscreteVector simulator.geometry.DiscreteVector.clone | ( | ) |
Creates a clone of this discrete vector.
Creates a clone of this discrete vector
void simulator.geometry.DiscreteVector.diff | ( | DiscreteVector | dC | ) |
Subtract vector v from this discrete vector.
Subtract vector v from this discrete vector
dC | DiscreteVector 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
dc | Discrete vector to compare to this vector |
double simulator.geometry.DiscreteVector.norm | ( | ) |
Return absolute length.
Return absolute length
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
v | First discrete vector to produce |
w | Second 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
dc | Discrete vector to multiply (dot product) with this vector |
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
a | First discrete vector |
b | Discrete 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
dV | DiscreteVector 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
i0 | i coordinate |
j0 | j coordinate |
k0 | k coordinate |
void simulator.geometry.DiscreteVector.times | ( | double | n | ) |
Multiply (stretch) this vector by supplied multiplier.
Multiply (stretch) this vector by supplied multiplier
n | Amount to stretch this vector by |
String simulator.geometry.DiscreteVector.toString | ( | ) |
Print coordinates to string.
Print coordinates to string
void simulator.geometry.DiscreteVector.turnAround | ( | ) |
Changes the sign of the vector. Used for movement vectors.
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