Class PMatrix4x4D<A,B>
java.lang.Object
com.io7m.jtensors.core.parameterized.matrices.PMatrix4x4D<A,B>
- Type Parameters:
A
- A phantom type parameter (possibly representing a source coordinate system)B
- A phantom type parameter (possibly representing a target coordinate system)
- All Implemented Interfaces:
MatrixComputationalType
,PMatrix4x4DType<A,B>
,PMatrixReadable4x4DType<A,B>
,MatrixReadable4x4DType
,MatrixReadableDType
public final class PMatrix4x4D<A,B> extends java.lang.Object implements PMatrix4x4DType<A,B>
The type of 4x4
double
-typed matrices.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PMatrix4x4D.Builder<A,B>
Builds instances of typePMatrix4x4D
. -
Method Summary
Modifier and Type Method Description static <A, B> PMatrix4x4D.Builder<A,B>
builder()
Creates a builder forPMatrix4x4D
.static <A, B> PMatrix4x4D<A,B>
copyOf(PMatrix4x4DType<A,B> instance)
Creates an immutable copy of aPMatrix4x4DType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofPMatrix4x4D
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:r0c0
,r0c1
,r0c2
,r0c3
,r1c0
,r1c1
,r1c2
,r1c3
,r2c0
,r2c1
,r2c2
,r2c3
,r3c0
,r3c1
,r3c2
,r3c3
.static <A, B> PMatrix4x4D<A,B>
of(double r0c0, double r0c1, double r0c2, double r0c3, double r1c0, double r1c1, double r1c2, double r1c3, double r2c0, double r2c1, double r2c2, double r2c3, double r3c0, double r3c1, double r3c2, double r3c3)
Construct a new immutablePMatrix4x4D
instance.double
r0c0()
double
r0c1()
double
r0c2()
double
r0c3()
double
r1c0()
double
r1c1()
double
r1c2()
double
r1c3()
double
r2c0()
double
r2c1()
double
r2c2()
double
r2c3()
double
r3c0()
double
r3c1()
double
r3c2()
double
r3c3()
java.lang.String
toString()
Prints the immutable valuePMatrix4x4D
with attribute values.PMatrix4x4D<A,B>
withR0c0(double value)
Copy the current immutable object by setting a value for ther0c0
attribute.PMatrix4x4D<A,B>
withR0c1(double value)
Copy the current immutable object by setting a value for ther0c1
attribute.PMatrix4x4D<A,B>
withR0c2(double value)
Copy the current immutable object by setting a value for ther0c2
attribute.PMatrix4x4D<A,B>
withR0c3(double value)
Copy the current immutable object by setting a value for ther0c3
attribute.PMatrix4x4D<A,B>
withR1c0(double value)
Copy the current immutable object by setting a value for ther1c0
attribute.PMatrix4x4D<A,B>
withR1c1(double value)
Copy the current immutable object by setting a value for ther1c1
attribute.PMatrix4x4D<A,B>
withR1c2(double value)
Copy the current immutable object by setting a value for ther1c2
attribute.PMatrix4x4D<A,B>
withR1c3(double value)
Copy the current immutable object by setting a value for ther1c3
attribute.PMatrix4x4D<A,B>
withR2c0(double value)
Copy the current immutable object by setting a value for ther2c0
attribute.PMatrix4x4D<A,B>
withR2c1(double value)
Copy the current immutable object by setting a value for ther2c1
attribute.PMatrix4x4D<A,B>
withR2c2(double value)
Copy the current immutable object by setting a value for ther2c2
attribute.PMatrix4x4D<A,B>
withR2c3(double value)
Copy the current immutable object by setting a value for ther2c3
attribute.PMatrix4x4D<A,B>
withR3c0(double value)
Copy the current immutable object by setting a value for ther3c0
attribute.PMatrix4x4D<A,B>
withR3c1(double value)
Copy the current immutable object by setting a value for ther3c1
attribute.PMatrix4x4D<A,B>
withR3c2(double value)
Copy the current immutable object by setting a value for ther3c2
attribute.PMatrix4x4D<A,B>
withR3c3(double value)
Copy the current immutable object by setting a value for ther3c3
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.io7m.jtensors.core.unparameterized.matrices.MatrixReadable4x4DType
rowColumn
-
Method Details
-
r0c0
public double r0c0()- Specified by:
r0c0
in interfaceMatrixReadable4x4DType
- Specified by:
r0c0
in interfacePMatrix4x4DType<A,B>
- Returns:
- The value at row 0 column 0
-
r0c1
public double r0c1()- Specified by:
r0c1
in interfaceMatrixReadable4x4DType
- Specified by:
r0c1
in interfacePMatrix4x4DType<A,B>
- Returns:
- The value at row 0 column 1
-
r0c2
public double r0c2()- Specified by:
r0c2
in interfaceMatrixReadable4x4DType
- Specified by:
r0c2
in interfacePMatrix4x4DType<A,B>
- Returns:
- The value at row 0 column 2
-
r0c3
public double r0c3()- Specified by:
r0c3
in interfaceMatrixReadable4x4DType
- Specified by:
r0c3
in interfacePMatrix4x4DType<A,B>
- Returns:
- The value at row 0 column 3
-
r1c0
public double r1c0()- Specified by:
r1c0
in interfaceMatrixReadable4x4DType
- Specified by:
r1c0
in interfacePMatrix4x4DType<A,B>
- Returns:
- The value at row 1 column 0
-
r1c1
public double r1c1()- Specified by:
r1c1
in interfaceMatrixReadable4x4DType
- Specified by:
r1c1
in interfacePMatrix4x4DType<A,B>
- Returns:
- The value at row 1 column 1
-
r1c2
public double r1c2()- Specified by:
r1c2
in interfaceMatrixReadable4x4DType
- Specified by:
r1c2
in interfacePMatrix4x4DType<A,B>
- Returns:
- The value at row 1 column 2
-
r1c3
public double r1c3()- Specified by:
r1c3
in interfaceMatrixReadable4x4DType
- Specified by:
r1c3
in interfacePMatrix4x4DType<A,B>
- Returns:
- The value at row 1 column 3
-
r2c0
public double r2c0()- Specified by:
r2c0
in interfaceMatrixReadable4x4DType
- Specified by:
r2c0
in interfacePMatrix4x4DType<A,B>
- Returns:
- The value at row 2 column 0
-
r2c1
public double r2c1()- Specified by:
r2c1
in interfaceMatrixReadable4x4DType
- Specified by:
r2c1
in interfacePMatrix4x4DType<A,B>
- Returns:
- The value at row 2 column 1
-
r2c2
public double r2c2()- Specified by:
r2c2
in interfaceMatrixReadable4x4DType
- Specified by:
r2c2
in interfacePMatrix4x4DType<A,B>
- Returns:
- The value at row 2 column 2
-
r2c3
public double r2c3()- Specified by:
r2c3
in interfaceMatrixReadable4x4DType
- Specified by:
r2c3
in interfacePMatrix4x4DType<A,B>
- Returns:
- The value at row 2 column 3
-
r3c0
public double r3c0()- Specified by:
r3c0
in interfaceMatrixReadable4x4DType
- Specified by:
r3c0
in interfacePMatrix4x4DType<A,B>
- Returns:
- The value at row 3 column 0
-
r3c1
public double r3c1()- Specified by:
r3c1
in interfaceMatrixReadable4x4DType
- Specified by:
r3c1
in interfacePMatrix4x4DType<A,B>
- Returns:
- The value at row 3 column 1
-
r3c2
public double r3c2()- Specified by:
r3c2
in interfaceMatrixReadable4x4DType
- Specified by:
r3c2
in interfacePMatrix4x4DType<A,B>
- Returns:
- The value at row 3 column 2
-
r3c3
public double r3c3()- Specified by:
r3c3
in interfaceMatrixReadable4x4DType
- Specified by:
r3c3
in interfacePMatrix4x4DType<A,B>
- Returns:
- The value at row 3 column 3
-
withR0c0
Copy the current immutable object by setting a value for ther0c0
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for r0c0- Returns:
- A modified copy of the
this
object
-
withR0c1
Copy the current immutable object by setting a value for ther0c1
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for r0c1- Returns:
- A modified copy of the
this
object
-
withR0c2
Copy the current immutable object by setting a value for ther0c2
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for r0c2- Returns:
- A modified copy of the
this
object
-
withR0c3
Copy the current immutable object by setting a value for ther0c3
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for r0c3- Returns:
- A modified copy of the
this
object
-
withR1c0
Copy the current immutable object by setting a value for ther1c0
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for r1c0- Returns:
- A modified copy of the
this
object
-
withR1c1
Copy the current immutable object by setting a value for ther1c1
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for r1c1- Returns:
- A modified copy of the
this
object
-
withR1c2
Copy the current immutable object by setting a value for ther1c2
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for r1c2- Returns:
- A modified copy of the
this
object
-
withR1c3
Copy the current immutable object by setting a value for ther1c3
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for r1c3- Returns:
- A modified copy of the
this
object
-
withR2c0
Copy the current immutable object by setting a value for ther2c0
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for r2c0- Returns:
- A modified copy of the
this
object
-
withR2c1
Copy the current immutable object by setting a value for ther2c1
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for r2c1- Returns:
- A modified copy of the
this
object
-
withR2c2
Copy the current immutable object by setting a value for ther2c2
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for r2c2- Returns:
- A modified copy of the
this
object
-
withR2c3
Copy the current immutable object by setting a value for ther2c3
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for r2c3- Returns:
- A modified copy of the
this
object
-
withR3c0
Copy the current immutable object by setting a value for ther3c0
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for r3c0- Returns:
- A modified copy of the
this
object
-
withR3c1
Copy the current immutable object by setting a value for ther3c1
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for r3c1- Returns:
- A modified copy of the
this
object
-
withR3c2
Copy the current immutable object by setting a value for ther3c2
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for r3c2- Returns:
- A modified copy of the
this
object
-
withR3c3
Copy the current immutable object by setting a value for ther3c3
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for r3c3- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofPMatrix4x4D
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()Computes a hash code from attributes:r0c0
,r0c1
,r0c2
,r0c3
,r1c0
,r1c1
,r1c2
,r1c3
,r2c0
,r2c1
,r2c2
,r2c3
,r3c0
,r3c1
,r3c2
,r3c3
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valuePMatrix4x4D
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static <A, B> PMatrix4x4D<A,B> of(double r0c0, double r0c1, double r0c2, double r0c3, double r1c0, double r1c1, double r1c2, double r1c3, double r2c0, double r2c1, double r2c2, double r2c3, double r3c0, double r3c1, double r3c2, double r3c3)Construct a new immutablePMatrix4x4D
instance.- Type Parameters:
A
- generic parameter AB
- generic parameter B- Parameters:
r0c0
- The value for ther0c0
attributer0c1
- The value for ther0c1
attributer0c2
- The value for ther0c2
attributer0c3
- The value for ther0c3
attributer1c0
- The value for ther1c0
attributer1c1
- The value for ther1c1
attributer1c2
- The value for ther1c2
attributer1c3
- The value for ther1c3
attributer2c0
- The value for ther2c0
attributer2c1
- The value for ther2c1
attributer2c2
- The value for ther2c2
attributer2c3
- The value for ther2c3
attributer3c0
- The value for ther3c0
attributer3c1
- The value for ther3c1
attributer3c2
- The value for ther3c2
attributer3c3
- The value for ther3c3
attribute- Returns:
- An immutable PMatrix4x4D instance
-
copyOf
Creates an immutable copy of aPMatrix4x4DType
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
A
- generic parameter AB
- generic parameter B- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable PMatrix4x4D instance
-
builder
Creates a builder forPMatrix4x4D
.PMatrix4x4D.<A, B>builder() .setR0c0(double) // required
r0c0
.setR0c1(double) // requiredr0c1
.setR0c2(double) // requiredr0c2
.setR0c3(double) // requiredr0c3
.setR1c0(double) // requiredr1c0
.setR1c1(double) // requiredr1c1
.setR1c2(double) // requiredr1c2
.setR1c3(double) // requiredr1c3
.setR2c0(double) // requiredr2c0
.setR2c1(double) // requiredr2c1
.setR2c2(double) // requiredr2c2
.setR2c3(double) // requiredr2c3
.setR3c0(double) // requiredr3c0
.setR3c1(double) // requiredr3c1
.setR3c2(double) // requiredr3c2
.setR3c3(double) // requiredr3c3
.build();- Type Parameters:
A
- generic parameter AB
- generic parameter B- Returns:
- A new PMatrix4x4D builder
-