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 NonZeroVectormultiply(NonZeroVector v)Multiply the matrix by aNonZeroVector.Pointmultiply(Point p)Multiply the matrix by aPoint.<T extends Triple>
Tmultiply(Triple triple, DoubleTriFunction<T> creator)Multiply the matrix by aTriple.Matrixscale(double t)Mutlyply the matrix by a scalar.java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
Matrix
Matrix constructor which takes threeVectors.- 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- TheNonZeroVectorto multiply by the matrix.- Returns:
- The
NonZeroVectorresulting from the multiplication.
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-