Record Class NativeSparseTriplets
java.lang.Object
java.lang.Record
org.wpilib.math.autodiff.NativeSparseTriplets
- Record Components:
rows- Triplet rows.cols- Triplet columns.values- Triplet values.
Wrapper for sparse matrix triplets from JNI.
We can't use DMatrixSparseTriplet because it doesn't have a method for bulk-initialization from triplet arrays.
-
Constructor Summary
ConstructorsConstructorDescriptionNativeSparseTriplets(int[] rows, int[] cols, double[] values) Creates an instance of aNativeSparseTripletsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionint[]cols()Returns the value of thecolsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.int[]rows()Returns the value of therowsrecord component.org.ejml.simple.SimpleMatrixtoSimpleMatrix(int rows, int cols) Returns a SimpleMatrix wrapper for this set of triplets.final StringtoString()Returns a string representation of this record class.double[]values()Returns the value of thevaluesrecord component.
-
Constructor Details
-
Method Details
-
toSimpleMatrix
Returns a SimpleMatrix wrapper for this set of triplets.- Parameters:
rows- Number of rows in sparse SimpleMatrix.cols- Number of columns in sparse SimpleMatrix.- Returns:
- A SimpleMatrix wrapper for this set of triplets.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
rows
-
cols
-
values
-