Class MatrixByteBuffered4x4s32
java.lang.Object
com.io7m.jtensors.storage.bytebuffered.MatrixByteBuffered4x4s32
- All Implemented Interfaces:
MatrixReadable4x4DType,MatrixReadableDType,MatrixStorageType,MatrixStorage4x4Type,MatrixByteBuffered4x4Type,MatrixByteBufferedType,TensorByteBufferedType
public final class MatrixByteBuffered4x4s32 extends java.lang.Object implements MatrixByteBuffered4x4Type
A storage matrix.
Storage component type: float
Storage component count: 4x4
-
Method Summary
Modifier and Type Method Description java.nio.ByteBufferbyteBuffer()longbyteOffset()protected intbyteOffsetForIndex(int component_index)protected intcomponentBytes()protected intcomponentCount()static MatrixByteBuffered4x4s32createWithBase(java.nio.ByteBuffer b, com.io7m.mutable.numbers.core.MutableLongType base, int offset)Return a new vector that is backed by the given byte bufferbintoffset()doubler0c0()doubler0c1()doubler0c2()doubler0c3()doubler1c0()doubler1c1()doubler1c2()doubler1c3()doubler2c0()doubler2c1()doubler2c2()doubler2c3()doubler3c0()doubler3c1()doubler3c2()doubler3c3()voidsetMatrix4x4D(Matrix4x4D m)Set the components from the given matrix.voidsetMatrix4x4F(Matrix4x4F m)Set the components from the given matrix.intsizeBytes()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.io7m.jtensors.core.unparameterized.matrices.MatrixReadable4x4DType
rowColumnMethods inherited from interface com.io7m.jtensors.storage.bytebuffered.TensorByteBufferedType
byteBuffer, byteOffset, offset, sizeBytes
-
Method Details
-
createWithBase
public static MatrixByteBuffered4x4s32 createWithBase(java.nio.ByteBuffer b, com.io7m.mutable.numbers.core.MutableLongType base, int offset)Return a new vector that is backed by the given byte buffer
bThe data for the instance will be taken from the data at the current value of
base.get() + offset, each time a field is requested or set.No initialization of the data is performed.
- Parameters:
b- The byte bufferbase- The base addressoffset- A constant offset- Returns:
- A new buffered vector
-
componentCount
protected int componentCount() -
r0c0
public double r0c0()- Specified by:
r0c0in interfaceMatrixReadable4x4DType- Returns:
- The value at row 0 column 0
-
r0c1
public double r0c1()- Specified by:
r0c1in interfaceMatrixReadable4x4DType- Returns:
- The value at row 0 column 1
-
r0c2
public double r0c2()- Specified by:
r0c2in interfaceMatrixReadable4x4DType- Returns:
- The value at row 0 column 2
-
r0c3
public double r0c3()- Specified by:
r0c3in interfaceMatrixReadable4x4DType- Returns:
- The value at row 0 column 3
-
r1c0
public double r1c0()- Specified by:
r1c0in interfaceMatrixReadable4x4DType- Returns:
- The value at row 1 column 0
-
r1c1
public double r1c1()- Specified by:
r1c1in interfaceMatrixReadable4x4DType- Returns:
- The value at row 1 column 1
-
r1c2
public double r1c2()- Specified by:
r1c2in interfaceMatrixReadable4x4DType- Returns:
- The value at row 1 column 2
-
r1c3
public double r1c3()- Specified by:
r1c3in interfaceMatrixReadable4x4DType- Returns:
- The value at row 1 column 3
-
r2c0
public double r2c0()- Specified by:
r2c0in interfaceMatrixReadable4x4DType- Returns:
- The value at row 2 column 0
-
r2c1
public double r2c1()- Specified by:
r2c1in interfaceMatrixReadable4x4DType- Returns:
- The value at row 2 column 1
-
r2c2
public double r2c2()- Specified by:
r2c2in interfaceMatrixReadable4x4DType- Returns:
- The value at row 2 column 2
-
r2c3
public double r2c3()- Specified by:
r2c3in interfaceMatrixReadable4x4DType- Returns:
- The value at row 2 column 3
-
r3c0
public double r3c0()- Specified by:
r3c0in interfaceMatrixReadable4x4DType- Returns:
- The value at row 3 column 0
-
r3c1
public double r3c1()- Specified by:
r3c1in interfaceMatrixReadable4x4DType- Returns:
- The value at row 3 column 1
-
r3c2
public double r3c2()- Specified by:
r3c2in interfaceMatrixReadable4x4DType- Returns:
- The value at row 3 column 2
-
r3c3
public double r3c3()- Specified by:
r3c3in interfaceMatrixReadable4x4DType- Returns:
- The value at row 3 column 3
-
setMatrix4x4D
Description copied from interface:MatrixStorage4x4TypeSet the components from the given matrix.- Specified by:
setMatrix4x4Din interfaceMatrixStorage4x4Type- Parameters:
m- The source matrix
-
setMatrix4x4F
Description copied from interface:MatrixStorage4x4TypeSet the components from the given matrix.- Specified by:
setMatrix4x4Fin interfaceMatrixStorage4x4Type- Parameters:
m- The source matrix
-
componentBytes
protected final int componentBytes() -
byteBuffer
public final java.nio.ByteBuffer byteBuffer()- Specified by:
byteBufferin interfaceTensorByteBufferedType- Returns:
- The byte buffer that backs the tensor
-
byteOffset
public final long byteOffset()- Specified by:
byteOffsetin interfaceTensorByteBufferedType- Returns:
- The byte offset of the current tensor
-
offset
public final int offset()- Specified by:
offsetin interfaceTensorByteBufferedType- Returns:
- A constant offset added to
TensorByteBufferedType.byteOffset().
-
sizeBytes
public final int sizeBytes()- Specified by:
sizeBytesin interfaceTensorByteBufferedType- Returns:
- The size of a single tensor in bytes
-
byteOffsetForIndex
protected final int byteOffsetForIndex(int component_index)
-