Package math.matrices
Class Matrix
java.lang.Object
math.matrices.Matrix
- Direct Known Subclasses:
RotationMatrix
public class Matrix
extends java.lang.Object
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description NonZeroVector
multiply(NonZeroVector v)
Multiply the matrix by aNonZeroVector
.Point
multiply(Point p)
Multiply the matrix by aPoint
.<T extends Triple>
Tmultiply(Triple triple, DoubleTriFunction<T> creator)
Multiply the matrix by aTriple
.Matrix
scale(double t)
Mutlyply the matrix by a scalar.java.lang.String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
Matrix
Matrix constructor which takes threeVector
s.- Parameters:
r1
- The first row.r2
- The second row.r3
- The third row.
-
-
Method Details
-
scale
Mutlyply the matrix by a scalar.- Parameters:
t
- The scalar to multiply the matrix by.- Returns:
- A new matrix which is the result of the multiplication.
-
multiply
Multiply the matrix by aTriple
. -
multiply
Multiply the matrix by aPoint
. -
multiply
Multiply the matrix by aNonZeroVector
.- Parameters:
v
- TheNonZeroVector
to multiply by the matrix.- Returns:
- The
NonZeroVector
resulting from the multiplication.
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-