| Package | Description |
|---|---|
| com.io7m.jtensors |
Core vector and matrix types.
|
| com.io7m.jtensors.bytebuffered |
ByteBuffer backed tensors. |
| com.io7m.jtensors.bytebuffered.parameterized |
ByteBuffer backed parameterized tensors. |
| com.io7m.jtensors.parameterized |
Parameterized vector and matrix types.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
Quaternion4DType
The type of mutable quaternions with
double elements. |
interface |
QuaternionReadable4DType
'Read' interface to four-dimensional quaternions with
double
elements. |
interface |
Vector2DType
The type of two-element vectors that are both readable and writable, and
have
double elements |
interface |
Vector3DType
The type of three-element vectors that are both readable and writable, and
have
double elements |
interface |
Vector4DType
The type of four-element vectors that are both readable and writable, and
have
double elements |
interface |
VectorReadable3DType
'Read' interface to three-dimensional vectors with
double
elements. |
interface |
VectorReadable4DType
'Read' interface to four-dimensional vectors with
double
elements. |
| Modifier and Type | Class and Description |
|---|---|
class |
QuaternionI4D
A four-dimensional immutable quaternion type with
double elements. |
class |
QuaternionM4D
A four-dimensional mutable quaternion type with
double
elements. |
class |
VectorI2D
A two-dimensional immutable vector type with
double elements. |
class |
VectorI3D
A three-dimensional immutable vector type with
double elements. |
class |
VectorI4D
A four-dimensional immutable vector type with
double elements. |
class |
VectorM2D
A two-dimensional mutable vector type with
double elements. |
class |
VectorM3D
A three-dimensional mutable vector type with
double elements. |
class |
VectorM4D
A four-dimensional mutable vector type with
double elements. |
| Modifier and Type | Method and Description |
|---|---|
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.absoluteInPlace(V v)
Calculate the absolute values of the elements in vector
v,
modifying the vector in-place. |
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.addInPlace(V v0,
VectorReadable2DType v1)
Calculate the element-wise sum of the vectors
v0 and v1,
saving the result to v0. |
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.addScaledInPlace(V v0,
VectorReadable2DType v1,
double r)
Calculate the element-wise sum of the vectors
v0 and the
element-wise product of v1 and r, saving the result to
v0. |
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.clampByVectorInPlace(V v,
VectorReadable2DType minimum,
VectorReadable2DType maximum)
Clamp the elements of the vector
v to the inclusive range given by
the corresponding elements in minimum and maximum, saving
the result to v. |
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.clampInPlace(V v,
double minimum,
double maximum)
Clamp the elements of the vector
v to the range {@code [minimum .. |
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.clampMaximumByVectorInPlace(V v,
VectorReadable2DType maximum)
Clamp the elements of the vector
v to the inclusive range given by
the corresponding elements in maximum, saving the result to v. |
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.clampMaximumInPlace(V v,
double maximum)
Clamp the elements of the vector
v to the range {@code [-Infinity
.. |
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.clampMinimumByVectorInPlace(V v,
VectorReadable2DType minimum)
Clamp the elements of the vector
v to the inclusive range given by
the corresponding elements in minimum, saving the result to v. |
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.clampMinimumInPlace(V v,
double minimum)
Clamp the elements of the vector
v to the range {@code [minimum .. |
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.normalizeInPlace(V v)
Returns a vector with the same orientation as
v but with magnitude
equal to 1.0 in v. |
static <V extends VectorReadable2DType,U extends VectorWritable2DType> |
VectorM2D.orthoNormalize(VectorM2D.ContextVM2D c,
VectorReadable2DType v0,
U v0_out,
VectorReadable2DType v1,
U v1_out)
Orthonormalize and return the vectors
v0 and v1 . |
static <V extends VectorWritable2DType & VectorReadable2DType,W extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.orthoNormalizeInPlace(VectorM2D.ContextVM2D c,
V v0,
W v1)
Orthonormalize and the vectors
v0 and v1. |
static <V extends VectorWritable2DType & VectorReadable2DType,W extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.orthoNormalizeInPlace(VectorM2D.ContextVM2D c,
V v0,
W v1)
Orthonormalize and the vectors
v0 and v1. |
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.scaleInPlace(V v,
double r)
Scale the vector
v by the scalar r, saving the result to
v. |
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.subtractInPlace(V v0,
VectorReadable2DType v1)
Subtract the vector
v1 from the vector v0, saving the
result to v0. |
| Modifier and Type | Method and Description |
|---|---|
static VectorI2D |
VectorI2D.absolute(VectorReadable2DType v)
Calculate the absolute value of the vector
v. |
static <V extends VectorWritable2DType> |
VectorM2D.absolute(VectorReadable2DType v,
V out)
Calculate the absolute values of the elements in vector
v, saving
the result to out. |
static VectorI2D |
VectorI2D.add(VectorReadable2DType v0,
VectorReadable2DType v1)
Calculate the element-wise sum of the vectors
v0 and v1. |
static <V extends VectorWritable2DType> |
VectorM2D.add(VectorReadable2DType v0,
VectorReadable2DType v1,
V out)
Calculate the element-wise sum of the vectors
v0 and v1,
saving the result to out. |
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.addInPlace(V v0,
VectorReadable2DType v1)
Calculate the element-wise sum of the vectors
v0 and v1,
saving the result to v0. |
static VectorI2D |
VectorI2D.addScaled(VectorReadable2DType v0,
VectorReadable2DType v1,
double r)
Calculate the element-wise sum of the vectors
v0 and the
element-wise product of v1 and r. |
static <V extends VectorWritable2DType> |
VectorM2D.addScaled(VectorReadable2DType v0,
VectorReadable2DType v1,
double r,
V out)
Calculate the element-wise sum of the vectors
v0 and the
element-wise product of v1 and r, saving the result to
out. |
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.addScaledInPlace(V v0,
VectorReadable2DType v1,
double r)
Calculate the element-wise sum of the vectors
v0 and the
element-wise product of v1 and r, saving the result to
v0. |
static boolean |
VectorM2D.almostEqual(com.io7m.jequality.AlmostEqualDouble.ContextRelative context,
VectorReadable2DType qa,
VectorReadable2DType qb)
Determine whether or not the vectors
qa and qb are equal to
within the degree of error given in context. |
static boolean |
VectorI2D.almostEqual(com.io7m.jequality.AlmostEqualDouble.ContextRelative context,
VectorReadable2DType qa,
VectorReadable2DType qb)
Determine whether or not the vectors
qa and qb are equal to
within the degree of error given in context. |
static double |
VectorM2D.angle(VectorReadable2DType v0,
VectorReadable2DType v1)
Calculate the angle between vectors
v0 and v1, in radians. |
static double |
VectorI2D.angle(VectorReadable2DType v0,
VectorReadable2DType v1)
Calculate the angle between the vectors
v0 and v1 in
radians. |
static VectorI2D |
VectorI2D.clamp(VectorReadable2DType v,
double minimum,
double maximum)
Clamp the elements of the vector
v to the range {@code [minimum .. |
static <V extends VectorWritable2DType> |
VectorM2D.clamp(VectorReadable2DType v,
double minimum,
double maximum,
V out)
Clamp the elements of the vector
v to the range {@code [minimum .. |
static VectorI2D |
VectorI2D.clampByVector(VectorReadable2DType v,
VectorReadable2DType minimum,
VectorReadable2DType maximum)
Clamp the elements of the vector
v to the inclusive range given by
the corresponding elements in minimum and maximum. |
static <V extends VectorWritable2DType> |
VectorM2D.clampByVector(VectorReadable2DType v,
VectorReadable2DType minimum,
VectorReadable2DType maximum,
V out)
Clamp the elements of the vector
v to the inclusive range given by
the corresponding elements in minimum and maximum, saving
the result to out. |
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.clampByVectorInPlace(V v,
VectorReadable2DType minimum,
VectorReadable2DType maximum)
Clamp the elements of the vector
v to the inclusive range given by
the corresponding elements in minimum and maximum, saving
the result to v. |
static VectorI2D |
VectorI2D.clampMaximum(VectorReadable2DType v,
double maximum)
Clamp the elements of the vector
v to the range {@code [-Infinity
.. |
static <V extends VectorWritable2DType> |
VectorM2D.clampMaximum(VectorReadable2DType v,
double maximum,
V out)
Clamp the elements of the vector
v to the range {@code [-Infinity
.. |
static VectorI2D |
VectorI2D.clampMaximumByVector(VectorReadable2DType v,
VectorReadable2DType maximum)
Clamp the elements of the vector
v to the inclusive range given by
the corresponding elements in maximum. |
static <V extends VectorWritable2DType> |
VectorM2D.clampMaximumByVector(VectorReadable2DType v,
VectorReadable2DType maximum,
V out)
Clamp the elements of the vector
v to the inclusive range given by
the corresponding elements in maximum, saving the result to out. |
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.clampMaximumByVectorInPlace(V v,
VectorReadable2DType maximum)
Clamp the elements of the vector
v to the inclusive range given by
the corresponding elements in maximum, saving the result to v. |
static VectorI2D |
VectorI2D.clampMinimum(VectorReadable2DType v,
double minimum)
Clamp the elements of the vector
v to the range {@code [minimum .. |
static <V extends VectorWritable2DType> |
VectorM2D.clampMinimum(VectorReadable2DType v,
double minimum,
V out)
Clamp the elements of the vector
v to the range {@code [minimum .. |
static VectorI2D |
VectorI2D.clampMinimumByVector(VectorReadable2DType v,
VectorReadable2DType minimum)
Clamp the elements of the vector
v to the inclusive range given by
the corresponding elements in minimum. |
static <V extends VectorWritable2DType> |
VectorM2D.clampMinimumByVector(VectorReadable2DType v,
VectorReadable2DType minimum,
V out)
Clamp the elements of the vector
v to the inclusive range given by
the corresponding elements in minimum, saving the result to out. |
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.clampMinimumByVectorInPlace(V v,
VectorReadable2DType minimum)
Clamp the elements of the vector
v to the inclusive range given by
the corresponding elements in minimum, saving the result to v. |
static <V extends VectorWritable2DType> |
VectorM2D.copy(VectorReadable2DType input,
V output)
Copy all elements of the vector
input to the vector output. |
void |
VectorWritable2DType.copyFrom2D(VectorReadable2DType in_v)
Set the current vector to the contents of the input vector.
|
void |
VectorM4D.copyFrom2D(VectorReadable2DType in_v) |
void |
VectorM3D.copyFrom2D(VectorReadable2DType in_v) |
void |
VectorM2D.copyFrom2D(VectorReadable2DType in_v) |
void |
QuaternionM4D.copyFrom2D(VectorReadable2DType in_v) |
static double |
VectorM2D.distance(VectorM2D.ContextVM2D c,
VectorReadable2DType v0,
VectorReadable2DType v1)
Calculate the distance between the two vectors
v0 and v1. |
static double |
VectorI2D.distance(VectorReadable2DType v0,
VectorReadable2DType v1)
Calculate the distance between the two vectors
v0 and v1. |
static double |
VectorM2D.dotProduct(VectorReadable2DType v0,
VectorReadable2DType v1)
Calculate the scalar product of the vectors
v0 and v1. |
static double |
VectorI2D.dotProduct(VectorReadable2DType v0,
VectorReadable2DType v1)
Calculate the scalar product of the vectors
v0 and v1. |
static <V extends VectorWritable2DType> |
VectorM2D.interpolateLinear(VectorM2D.ContextVM2D c,
VectorReadable2DType v0,
VectorReadable2DType v1,
double alpha,
V r)
Linearly interpolate between
v0 and v1 by the amount alpha, saving the result to r. |
static VectorI2D |
VectorI2D.interpolateLinear(VectorReadable2DType v0,
VectorReadable2DType v1,
double alpha)
Linearly interpolate between
v0 and v1 by the amount alpha. |
static double |
VectorM2D.magnitude(VectorReadable2DType v)
Calculate the magnitude of the vector
v. |
static double |
VectorI2D.magnitude(VectorReadable2DType v)
Calculate the magnitude of the vector
v. |
static double |
VectorM2D.magnitudeSquared(VectorReadable2DType v)
Calculate the squared magnitude of the vector
v. |
static double |
VectorI2D.magnitudeSquared(VectorReadable2DType v)
Calculate the squared magnitude of the vector
v. |
static <M extends MatrixWritable3x3DType> |
MatrixM3x3D.makeTranslation2D(VectorReadable2DType v,
M out)
Create a translation matrix that represents a translation by the vector
v, writing the resulting matrix to out. |
static <M extends MatrixWritable4x4DType> |
MatrixM4x4D.makeTranslation2D(VectorReadable2DType v,
M out)
Generate a matrix that represents a translation of
(v.x, v.y) from
the origin, and save to out. |
static <V extends VectorWritable2DType> |
MatrixM2x2D.multiplyVector2D(MatrixM2x2D.ContextMM2D c,
MatrixReadable2x2DType m,
VectorReadable2DType v,
V out)
Multiply the matrix
m with the vector v, writing the
resulting vector to out. |
static MatrixI2x2D |
MatrixI2x2D.newFromColumns(VectorReadable2DType column_0,
VectorReadable2DType column_1)
Construct a new immutable 2x2 matrix from the given columns.
|
static VectorI2D |
VectorI2D.normalize(VectorReadable2DType v)
Normalize the vector
v, preserving its direction but reducing it to
unit length. |
static <V extends VectorWritable2DType> |
VectorM2D.normalize(VectorReadable2DType v,
V out)
Returns a vector with the same orientation as
v but with magnitude
equal to 1.0 in out. |
static <V extends VectorReadable2DType,U extends VectorWritable2DType> |
VectorM2D.orthoNormalize(VectorM2D.ContextVM2D c,
VectorReadable2DType v0,
U v0_out,
VectorReadable2DType v1,
U v1_out)
Orthonormalize and return the vectors
v0 and v1 . |
static com.io7m.jfunctional.Pair<VectorI2D,VectorI2D> |
VectorI2D.orthoNormalize(VectorReadable2DType v0,
VectorReadable2DType v1)
Orthonormalize and return the vectors
v0 and v1 . |
static VectorI2D |
VectorI2D.projection(VectorReadable2DType p,
VectorReadable2DType q)
Calculate the projection of the vector
p onto the vector q. |
static <V extends VectorWritable2DType> |
VectorM2D.projection(VectorReadable2DType p,
VectorReadable2DType q,
V r)
Calculate the projection of the vector
p onto the vector q,
saving the result in r. |
static VectorI2D |
VectorI2D.scale(VectorReadable2DType v,
double r)
Scale the vector
v by the scalar r. |
static <V extends VectorWritable2DType> |
VectorM2D.scale(VectorReadable2DType v,
double r,
V out)
Scale the vector
v by the scalar r, saving the result to
out. |
void |
MatrixWritable2x2DType.setRowWith2D(int row,
VectorReadable2DType v)
Set row
row of the matrix to v. |
void |
MatrixHeapArrayM4x4D.setRowWith2D(int row,
VectorReadable2DType v) |
void |
MatrixHeapArrayM3x3D.setRowWith2D(int row,
VectorReadable2DType v) |
void |
MatrixHeapArrayM2x2D.setRowWith2D(int row,
VectorReadable2DType v) |
void |
MatrixDirectM4x4D.setRowWith2D(int row,
VectorReadable2DType v) |
void |
MatrixDirectM3x3D.setRowWith2D(int row,
VectorReadable2DType v) |
void |
MatrixDirectM2x2D.setRowWith2D(int row,
VectorReadable2DType v) |
void |
MatrixWritable2x2DType.setRowWith2DUnsafe(int row,
VectorReadable2DType v)
Set row
row of the matrix to v. |
void |
MatrixHeapArrayM4x4D.setRowWith2DUnsafe(int row,
VectorReadable2DType v) |
void |
MatrixHeapArrayM3x3D.setRowWith2DUnsafe(int row,
VectorReadable2DType v) |
void |
MatrixHeapArrayM2x2D.setRowWith2DUnsafe(int row,
VectorReadable2DType v) |
void |
MatrixDirectM4x4D.setRowWith2DUnsafe(int row,
VectorReadable2DType v) |
void |
MatrixDirectM3x3D.setRowWith2DUnsafe(int row,
VectorReadable2DType v) |
void |
MatrixDirectM2x2D.setRowWith2DUnsafe(int row,
VectorReadable2DType v) |
static VectorI2D |
VectorI2D.subtract(VectorReadable2DType v0,
VectorReadable2DType v1)
Subtract the vector
v1 from the vector v0. |
static <V extends VectorWritable2DType> |
VectorM2D.subtract(VectorReadable2DType v0,
VectorReadable2DType v1,
V out)
Subtract the vector
v1 from the vector v0, saving the
result to out. |
static <V extends VectorWritable2DType & VectorReadable2DType> |
VectorM2D.subtractInPlace(V v0,
VectorReadable2DType v1)
Subtract the vector
v1 from the vector v0, saving the
result to v0. |
| Constructor and Description |
|---|
VectorI2D(VectorReadable2DType in_v)
Construct a vector initialized with the values given in the vector
v. |
VectorM2D(VectorReadable2DType in_x)
Construct a vector initialized with the values given in the vector
in_x. |
| Modifier and Type | Interface and Description |
|---|---|
interface |
QuaternionByteBuffered4DType
The type of
Quaternion4DType values that are also byte buffered. |
interface |
VectorByteBuffered2DType
The type of
Vector2DType values that are also byte buffered. |
interface |
VectorByteBuffered3DType
The type of
Vector3DType values that are also byte buffered. |
interface |
VectorByteBuffered4DType
The type of
Vector4DType values that are also byte buffered. |
| Modifier and Type | Class and Description |
|---|---|
class |
QuaternionByteBufferedM4D
A quaternion type with
double elements, packed into a ByteBuffer. |
class |
VectorByteBufferedM2D
A two-element vector type with
double elements, packed into a
ByteBuffer. |
class |
VectorByteBufferedM3D
A three-element vector type with
double elements, packed into a
ByteBuffer. |
class |
VectorByteBufferedM4D
A four-element vector type with
double elements, packed into a
ByteBuffer. |
| Modifier and Type | Method and Description |
|---|---|
void |
VectorByteBufferedM4D.copyFrom2D(VectorReadable2DType in_v) |
void |
VectorByteBufferedM3D.copyFrom2D(VectorReadable2DType in_v) |
void |
VectorByteBufferedM2D.copyFrom2D(VectorReadable2DType in_v) |
void |
QuaternionByteBufferedM4D.copyFrom2D(VectorReadable2DType in_v) |
void |
MatrixByteBufferedM4x4D.setRowWith2D(int row,
VectorReadable2DType v) |
void |
MatrixByteBufferedM3x3D.setRowWith2D(int row,
VectorReadable2DType v) |
void |
MatrixByteBufferedM2x2D.setRowWith2D(int row,
VectorReadable2DType v) |
void |
MatrixByteBufferedM4x4D.setRowWith2DUnsafe(int row,
VectorReadable2DType v) |
void |
MatrixByteBufferedM3x3D.setRowWith2DUnsafe(int row,
VectorReadable2DType v) |
void |
MatrixByteBufferedM2x2D.setRowWith2DUnsafe(int row,
VectorReadable2DType v) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
PVectorByteBuffered2DType<T>
The type of
PVector2DType values that are also byte buffered. |
interface |
PVectorByteBuffered3DType<T>
The type of
PVector3DType values that are also byte buffered. |
interface |
PVectorByteBuffered4DType<T>
The type of
PVector4DType values that are also byte buffered. |
| Modifier and Type | Class and Description |
|---|---|
class |
PVectorByteBufferedM2D<T>
A two-element vector type with
double elements, packed into a
ByteBuffer. |
class |
PVectorByteBufferedM3D<T>
A three-element vector type with
double elements, packed into a
ByteBuffer. |
class |
PVectorByteBufferedM4D<T>
A four-element vector type with
double elements, packed into a
ByteBuffer. |
| Modifier and Type | Method and Description |
|---|---|
void |
PVectorByteBufferedM4D.copyFrom2D(VectorReadable2DType in_v) |
void |
PVectorByteBufferedM3D.copyFrom2D(VectorReadable2DType in_v) |
void |
PVectorByteBufferedM2D.copyFrom2D(VectorReadable2DType in_v) |
void |
PMatrixByteBufferedM4x4D.setRowWith2D(int row,
VectorReadable2DType v) |
void |
PMatrixByteBufferedM3x3D.setRowWith2D(int row,
VectorReadable2DType v) |
void |
PMatrixByteBufferedM4x4D.setRowWith2DUnsafe(int row,
VectorReadable2DType v) |
void |
PMatrixByteBufferedM3x3D.setRowWith2DUnsafe(int row,
VectorReadable2DType v) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
PVector2DType<T>
The type of two-element vectors that are both readable and writable, and
have
double elements |
interface |
PVector3DType<T>
The type of three-element vectors that are both readable and writable, and
have
double elements |
interface |
PVector4DType<T>
The type of four-element vectors that are both readable and writable, and
have
double elements |
interface |
PVectorReadable2DType<T>
'Read' interface to phantom-typed two-dimensional vectors with double
precision elements.
|
interface |
PVectorReadable3DType<T>
'Read' interface to phantom-typed three-dimensional vectors with double
precision elements.
|
interface |
PVectorReadable4DType<T>
'Read' interface to phantom-typed four-dimensional vectors with double
precision elements.
|
| Modifier and Type | Class and Description |
|---|---|
class |
PVectorI2D<T>
A two-dimensional immutable vector type with
double elements. |
class |
PVectorI3D<T>
A three-dimensional immutable vector type with
double elements. |
class |
PVectorI4D<T>
A four-dimensional immutable vector type with
double elements. |
class |
PVectorM2D<T>
A two-dimensional mutable vector type with
double elements. |
class |
PVectorM3D<T>
A three-dimensional mutable vector type with
double elements. |
class |
PVectorM4D<T>
A four-dimensional mutable vector type with
double elements. |
| Modifier and Type | Method and Description |
|---|---|
void |
PVectorM4D.copyFrom2D(VectorReadable2DType in_v) |
void |
PVectorM3D.copyFrom2D(VectorReadable2DType in_v) |
void |
PVectorM2D.copyFrom2D(VectorReadable2DType in_v) |
void |
PMatrixHeapArrayM4x4D.setRowWith2D(int row,
VectorReadable2DType v) |
void |
PMatrixHeapArrayM3x3D.setRowWith2D(int row,
VectorReadable2DType v) |
void |
PMatrixDirectM4x4D.setRowWith2D(int row,
VectorReadable2DType v) |
void |
PMatrixDirectM3x3D.setRowWith2D(int row,
VectorReadable2DType v) |
void |
PMatrixHeapArrayM4x4D.setRowWith2DUnsafe(int row,
VectorReadable2DType v) |
void |
PMatrixHeapArrayM3x3D.setRowWith2DUnsafe(int row,
VectorReadable2DType v) |
void |
PMatrixDirectM4x4D.setRowWith2DUnsafe(int row,
VectorReadable2DType v) |
void |
PMatrixDirectM3x3D.setRowWith2DUnsafe(int row,
VectorReadable2DType v) |
Copyright © 2017 <code@io7m.com> http://io7m.com