- java.lang.Object
-
- swim.math.R3
-
- All Implemented Interfaces:
Debug
,AffineSpace<R3Point,R3Vector,Double>
,F3<R3Vector,Double>
,TensorSpace<R3Vector,Double>
,VectorModule<R3Vector,Double>
,VectorSpace<R3Vector,Double>
public class R3 extends Object implements AffineSpace<R3Point,R3Vector,Double>, VectorSpace<R3Vector,Double>, F3<R3Vector,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 R3Vector
add(R3Vector u, R3Vector v)
R3Vector
combine(Double a, R3Vector u, Double b, R3Vector v)
<T> Output<T>
debug(Output<T> output)
Writes a developer readable, debug-formatted string representation of this object tooutput
.R3Vector
difference(R3Point p, R3Point q)
TensorDims
dimensions()
Double
getX(R3Vector v)
Double
getY(R3Vector v)
Double
getZ(R3Vector v)
R3Vector
multiply(R3Vector u, Double a)
R3Vector
of(Double x, Double y, Double z)
R3Vector
opposite(R3Vector v)
R3Point
origin()
R
scalar()
static R3
space()
R3Vector
subtract(R3Vector u, R3Vector v)
String
toString()
R3Point
translate(R3Point p, R3Vector v)
R3
vector()
R3Vector
zero()
-
-
-
Method Detail
-
vector
public final R3 vector()
- Specified by:
vector
in interfaceAffineSpace<R3Point,R3Vector,Double>
-
scalar
public final R scalar()
- Specified by:
scalar
in interfaceAffineSpace<R3Point,R3Vector,Double>
- Specified by:
scalar
in interfaceTensorSpace<R3Vector,Double>
- Specified by:
scalar
in interfaceVectorModule<R3Vector,Double>
- Specified by:
scalar
in interfaceVectorSpace<R3Vector,Double>
-
dimensions
public TensorDims dimensions()
- Specified by:
dimensions
in interfaceTensorSpace<R3Vector,Double>
-
origin
public final R3Point origin()
- Specified by:
origin
in interfaceAffineSpace<R3Point,R3Vector,Double>
-
zero
public final R3Vector zero()
- Specified by:
zero
in interfaceTensorSpace<R3Vector,Double>
- Specified by:
zero
in interfaceVectorModule<R3Vector,Double>
- Specified by:
zero
in interfaceVectorSpace<R3Vector,Double>
-
add
public final R3Vector add(R3Vector u, R3Vector v)
- Specified by:
add
in interfaceTensorSpace<R3Vector,Double>
- Specified by:
add
in interfaceVectorModule<R3Vector,Double>
- Specified by:
add
in interfaceVectorSpace<R3Vector,Double>
-
opposite
public final R3Vector opposite(R3Vector v)
- Specified by:
opposite
in interfaceTensorSpace<R3Vector,Double>
- Specified by:
opposite
in interfaceVectorModule<R3Vector,Double>
- Specified by:
opposite
in interfaceVectorSpace<R3Vector,Double>
-
subtract
public final R3Vector subtract(R3Vector u, R3Vector v)
- Specified by:
subtract
in interfaceTensorSpace<R3Vector,Double>
- Specified by:
subtract
in interfaceVectorModule<R3Vector,Double>
- Specified by:
subtract
in interfaceVectorSpace<R3Vector,Double>
-
multiply
public final R3Vector multiply(R3Vector u, Double a)
- Specified by:
multiply
in interfaceTensorSpace<R3Vector,Double>
- Specified by:
multiply
in interfaceVectorModule<R3Vector,Double>
- Specified by:
multiply
in interfaceVectorSpace<R3Vector,Double>
-
combine
public final R3Vector combine(Double a, R3Vector u, Double b, R3Vector v)
- Specified by:
combine
in interfaceTensorSpace<R3Vector,Double>
- Specified by:
combine
in interfaceVectorModule<R3Vector,Double>
- Specified by:
combine
in interfaceVectorSpace<R3Vector,Double>
-
translate
public final R3Point translate(R3Point p, R3Vector v)
- Specified by:
translate
in interfaceAffineSpace<R3Point,R3Vector,Double>
-
difference
public final R3Vector difference(R3Point p, R3Point q)
- Specified by:
difference
in interfaceAffineSpace<R3Point,R3Vector,Double>
-
debug
public <T> Output<T> debug(Output<T> output)
Description copied from interface:Debug
Writes a developer readable, debug-formatted string representation of this object tooutput
.
-
space
public static R3 space()
-
-