- java.lang.Object
-
- swim.math.R2
-
- All Implemented Interfaces:
Debug,AffineSpace<R2Point,R2Vector,Double>,F2<R2Vector,Double>,TensorSpace<R2Vector,Double>,VectorModule<R2Vector,Double>,VectorSpace<R2Vector,Double>
public class R2 extends Object implements AffineSpace<R2Point,R2Vector,Double>, VectorSpace<R2Vector,Double>, F2<R2Vector,Double>, Debug
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedR2()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description R2Vectoradd(R2Vector u, R2Vector v)R2Vectorcombine(Double a, R2Vector u, Double b, R2Vector v)<T> Output<T>debug(Output<T> output)Writes a developer readable, debug-formatted string representation of this object tooutput.R2Vectordifference(R2Point p, R2Point q)TensorDimsdimensions()DoublegetX(R2Vector v)DoublegetY(R2Vector v)R2Vectormultiply(R2Vector u, Double a)R2Vectorof(Double x, Double y)R2Vectoropposite(R2Vector v)R2Pointorigin()Rscalar()static R2space()R2Vectorsubtract(R2Vector u, R2Vector v)StringtoString()R2Pointtranslate(R2Point p, R2Vector v)R2vector()R2Vectorzero()
-
-
-
Method Detail
-
vector
public final R2 vector()
- Specified by:
vectorin interfaceAffineSpace<R2Point,R2Vector,Double>
-
scalar
public final R scalar()
- Specified by:
scalarin interfaceAffineSpace<R2Point,R2Vector,Double>- Specified by:
scalarin interfaceTensorSpace<R2Vector,Double>- Specified by:
scalarin interfaceVectorModule<R2Vector,Double>- Specified by:
scalarin interfaceVectorSpace<R2Vector,Double>
-
dimensions
public TensorDims dimensions()
- Specified by:
dimensionsin interfaceTensorSpace<R2Vector,Double>
-
origin
public final R2Point origin()
- Specified by:
originin interfaceAffineSpace<R2Point,R2Vector,Double>
-
zero
public final R2Vector zero()
- Specified by:
zeroin interfaceTensorSpace<R2Vector,Double>- Specified by:
zeroin interfaceVectorModule<R2Vector,Double>- Specified by:
zeroin interfaceVectorSpace<R2Vector,Double>
-
add
public final R2Vector add(R2Vector u, R2Vector v)
- Specified by:
addin interfaceTensorSpace<R2Vector,Double>- Specified by:
addin interfaceVectorModule<R2Vector,Double>- Specified by:
addin interfaceVectorSpace<R2Vector,Double>
-
opposite
public final R2Vector opposite(R2Vector v)
- Specified by:
oppositein interfaceTensorSpace<R2Vector,Double>- Specified by:
oppositein interfaceVectorModule<R2Vector,Double>- Specified by:
oppositein interfaceVectorSpace<R2Vector,Double>
-
subtract
public final R2Vector subtract(R2Vector u, R2Vector v)
- Specified by:
subtractin interfaceTensorSpace<R2Vector,Double>- Specified by:
subtractin interfaceVectorModule<R2Vector,Double>- Specified by:
subtractin interfaceVectorSpace<R2Vector,Double>
-
multiply
public final R2Vector multiply(R2Vector u, Double a)
- Specified by:
multiplyin interfaceTensorSpace<R2Vector,Double>- Specified by:
multiplyin interfaceVectorModule<R2Vector,Double>- Specified by:
multiplyin interfaceVectorSpace<R2Vector,Double>
-
combine
public final R2Vector combine(Double a, R2Vector u, Double b, R2Vector v)
- Specified by:
combinein interfaceTensorSpace<R2Vector,Double>- Specified by:
combinein interfaceVectorModule<R2Vector,Double>- Specified by:
combinein interfaceVectorSpace<R2Vector,Double>
-
translate
public final R2Point translate(R2Point p, R2Vector v)
- Specified by:
translatein interfaceAffineSpace<R2Point,R2Vector,Double>
-
difference
public final R2Vector difference(R2Point p, R2Point q)
- Specified by:
differencein interfaceAffineSpace<R2Point,R2Vector,Double>
-
debug
public <T> Output<T> debug(Output<T> output)
Description copied from interface:DebugWrites a developer readable, debug-formatted string representation of this object tooutput.
-
space
public static R2 space()
-
-