- java.lang.Object
-
- swim.math.R3
-
- All Implemented Interfaces:
Debug
,AffineSpace<PointR3,VectorR3,Double>
,F3<VectorR3,Double>
,TensorSpace<VectorR3,Double>
,VectorModule<VectorR3,Double>
,VectorSpace<VectorR3,Double>
public class R3 extends Object implements AffineSpace<PointR3,VectorR3,Double>, VectorSpace<VectorR3,Double>, F3<VectorR3,Double>, Debug
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
R3()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VectorR3
add(VectorR3 u, VectorR3 v)
VectorR3
combine(Double a, VectorR3 u, Double b, VectorR3 v)
void
debug(Output<?> output)
Writes a developer readable, debug-formatted string representation of this object tooutput
.VectorR3
difference(PointR3 p, PointR3 q)
TensorDims
dimensions()
Double
getX(VectorR3 v)
Double
getY(VectorR3 v)
Double
getZ(VectorR3 v)
VectorR3
multiply(VectorR3 u, Double a)
VectorR3
of(Double x, Double y, Double z)
VectorR3
opposite(VectorR3 v)
PointR3
origin()
R
scalar()
static R3
space()
VectorR3
subtract(VectorR3 u, VectorR3 v)
String
toString()
PointR3
translate(PointR3 p, VectorR3 v)
R3
vector()
VectorR3
zero()
-
-
-
Method Detail
-
space
public static R3 space()
-
vector
public final R3 vector()
- Specified by:
vector
in interfaceAffineSpace<PointR3,VectorR3,Double>
-
scalar
public final R scalar()
- Specified by:
scalar
in interfaceAffineSpace<PointR3,VectorR3,Double>
- Specified by:
scalar
in interfaceTensorSpace<VectorR3,Double>
- Specified by:
scalar
in interfaceVectorModule<VectorR3,Double>
- Specified by:
scalar
in interfaceVectorSpace<VectorR3,Double>
-
dimensions
public TensorDims dimensions()
- Specified by:
dimensions
in interfaceTensorSpace<VectorR3,Double>
-
origin
public final PointR3 origin()
- Specified by:
origin
in interfaceAffineSpace<PointR3,VectorR3,Double>
-
zero
public final VectorR3 zero()
- Specified by:
zero
in interfaceTensorSpace<VectorR3,Double>
- Specified by:
zero
in interfaceVectorModule<VectorR3,Double>
- Specified by:
zero
in interfaceVectorSpace<VectorR3,Double>
-
add
public final VectorR3 add(VectorR3 u, VectorR3 v)
- Specified by:
add
in interfaceTensorSpace<VectorR3,Double>
- Specified by:
add
in interfaceVectorModule<VectorR3,Double>
- Specified by:
add
in interfaceVectorSpace<VectorR3,Double>
-
opposite
public final VectorR3 opposite(VectorR3 v)
- Specified by:
opposite
in interfaceTensorSpace<VectorR3,Double>
- Specified by:
opposite
in interfaceVectorModule<VectorR3,Double>
- Specified by:
opposite
in interfaceVectorSpace<VectorR3,Double>
-
subtract
public final VectorR3 subtract(VectorR3 u, VectorR3 v)
- Specified by:
subtract
in interfaceTensorSpace<VectorR3,Double>
- Specified by:
subtract
in interfaceVectorModule<VectorR3,Double>
- Specified by:
subtract
in interfaceVectorSpace<VectorR3,Double>
-
multiply
public final VectorR3 multiply(VectorR3 u, Double a)
- Specified by:
multiply
in interfaceTensorSpace<VectorR3,Double>
- Specified by:
multiply
in interfaceVectorModule<VectorR3,Double>
- Specified by:
multiply
in interfaceVectorSpace<VectorR3,Double>
-
combine
public final VectorR3 combine(Double a, VectorR3 u, Double b, VectorR3 v)
- Specified by:
combine
in interfaceTensorSpace<VectorR3,Double>
- Specified by:
combine
in interfaceVectorModule<VectorR3,Double>
- Specified by:
combine
in interfaceVectorSpace<VectorR3,Double>
-
translate
public final PointR3 translate(PointR3 p, VectorR3 v)
- Specified by:
translate
in interfaceAffineSpace<PointR3,VectorR3,Double>
-
difference
public final VectorR3 difference(PointR3 p, PointR3 q)
- Specified by:
difference
in interfaceAffineSpace<PointR3,VectorR3,Double>
-
debug
public void debug(Output<?> output)
Description copied from interface:Debug
Writes a developer readable, debug-formatted string representation of this object tooutput
.
-
-