public class Z3
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
int |
i
first coordinate
|
int |
j
second coordinate
|
int |
k
third coordinate
|
Constructor and Description |
---|
Z3()
Creates a new instance of Z3, the zero element.
|
Z3(int i,
int j,
int k)
Creates a new instance of Z3 initialized to arguments.
|
Z3(Z3 vecPt)
Creates a new instance of Z3 initialized to argument.
|
Modifier and Type | Method and Description |
---|---|
Z3 |
copy()
Performs a deep copk operation.
|
boolean |
equals(Z3 r)
Element by element equivalence comparison (i.e., this==r)
|
int |
geti()
Return first coordinate value.
|
int |
getj()
Return second coordinate value.
|
int |
getk()
Return third coordinate value.
|
boolean |
greaterThan(Z3 r)
Element by element greater than comparison (i.e., this>r)
|
boolean |
lessThan(Z3 r)
Element by element less than comparison (i.e., this |
Z3 |
minus(Z3 r)
Vector subtraction.
|
int |
norm1()
Compute the l1 norm of the vector in Z3.
|
int |
normInf()
Compute the l-infinity norm of the vector in Z3.
|
Z3 |
plus(Z3 r)
Vector addition.
|
void |
print(java.io.PrintWriter os)
Print out centents on an output stream.
|
void |
println(java.io.PrintWriter os)
Print out centents on an output stream, terminate with new line character.
|
void |
set(int s)
Set all coordinates to value
|
void |
seti(int i)
Set first coordinate value.
|
void |
setj(int j)
Set second coordinate value.
|
void |
setk(int k)
Set third coordinate value.
|
Z3 |
times(int s)
Scalar multiplication.
|
Z3 |
times(Z3 r)
Vector multiplication using three-dimensional cross product.
|
public int i
public int j
public int k
public Z3()
public Z3(int i, int j, int k)
i
- first coordinate valuej
- first coordinate valuek
- first coordinate valuepublic Z3(Z3 vecPt)
vecPt
- deep copies this valuepublic Z3 copy()
public void seti(int i)
public void setj(int j)
public void setk(int k)
public void set(int s)
public int geti()
public int getj()
public int getk()
public Z3 times(int s)
s
- scalar to multiply this vectorpublic Z3 plus(Z3 r)
r
- vector displacementpublic Z3 minus(Z3 r)
r
- vector displacementpublic Z3 times(Z3 r)
r
- second (right) operand in cross-product (this is first operand)public int norm1()
public int normInf()
public boolean equals(Z3 r)
r
- right-hand argument to ==public boolean greaterThan(Z3 r)
r
- right-hand argument to >public boolean lessThan(Z3 r)
r
- right-hand argument to <public void print(java.io.PrintWriter os)
os
- output stream receive content dumppublic void println(java.io.PrintWriter os)
os
- output stream receive content dump