Class PMatrix2x2F<A,B>
java.lang.Object
com.io7m.jtensors.core.parameterized.matrices.PMatrix2x2F<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
,PMatrix2x2FType<A,
,B> PMatrixReadable2x2FType<A,
,B> MatrixReadable2x2FType
,MatrixReadableFType
The type of 2x2
float
-typed matrices.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <A,
B> PMatrix2x2F.Builder <A, B> builder()
Creates a builder forPMatrix2x2F
.static <A,
B> PMatrix2x2F <A, B> copyOf
(PMatrix2x2FType<A, B> instance) Creates an immutable copy of aPMatrix2x2FType
value.boolean
This instance is equal to all instances ofPMatrix2x2F
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:r0c0
,r0c1
,r1c0
,r1c1
.static <A,
B> PMatrix2x2F <A, B> of
(float r0c0, float r0c1, float r1c0, float r1c1) Construct a new immutablePMatrix2x2F
instance.float
r0c0()
float
r0c1()
float
r1c0()
float
r1c1()
toString()
Prints the immutable valuePMatrix2x2F
with attribute values.final PMatrix2x2F
<A, B> withR0c0
(float value) Copy the current immutable object by setting a value for ther0c0
attribute.final PMatrix2x2F
<A, B> withR0c1
(float value) Copy the current immutable object by setting a value for ther0c1
attribute.final PMatrix2x2F
<A, B> withR1c0
(float value) Copy the current immutable object by setting a value for ther1c0
attribute.final PMatrix2x2F
<A, B> withR1c1
(float value) Copy the current immutable object by setting a value for ther1c1
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.MatrixReadable2x2FType
rowColumn
-
Method Details
-
r0c0
public float r0c0()- Specified by:
r0c0
in interfaceMatrixReadable2x2FType
- Specified by:
r0c0
in interfacePMatrix2x2FType<A,
B> - Returns:
- The value at row 0 column 0
-
r0c1
public float r0c1()- Specified by:
r0c1
in interfaceMatrixReadable2x2FType
- Specified by:
r0c1
in interfacePMatrix2x2FType<A,
B> - Returns:
- The value at row 0 column 1
-
r1c0
public float r1c0()- Specified by:
r1c0
in interfaceMatrixReadable2x2FType
- Specified by:
r1c0
in interfacePMatrix2x2FType<A,
B> - Returns:
- The value at row 1 column 0
-
r1c1
public float r1c1()- Specified by:
r1c1
in interfaceMatrixReadable2x2FType
- Specified by:
r1c1
in interfacePMatrix2x2FType<A,
B> - Returns:
- The value at row 1 column 1
-
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
-
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
-
equals
This instance is equal to all instances ofPMatrix2x2F
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:r0c0
,r0c1
,r1c0
,r1c1
. -
toString
Prints the immutable valuePMatrix2x2F
with attribute values. -
of
Construct a new immutablePMatrix2x2F
instance.- Type Parameters:
A
- generic parameter AB
- generic parameter B- Parameters:
r0c0
- The value for ther0c0
attributer0c1
- The value for ther0c1
attributer1c0
- The value for ther1c0
attributer1c1
- The value for ther1c1
attribute- Returns:
- An immutable PMatrix2x2F instance
-
copyOf
Creates an immutable copy of aPMatrix2x2FType
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 PMatrix2x2F instance
-
builder
Creates a builder forPMatrix2x2F
.PMatrix2x2F.<A, B>builder() .setR0c0(float) // required
r0c0
.setR0c1(float) // requiredr0c1
.setR1c0(float) // requiredr1c0
.setR1c1(float) // requiredr1c1
.build();- Type Parameters:
A
- generic parameter AB
- generic parameter B- Returns:
- A new PMatrix2x2F builder
-