Record Class MatrixMarketHeader
java.lang.Object
java.lang.Record
org.flag4j.io.MatrixMarketHeader
- Record Components:
object- The type of object the Matrix Market file contains (e.g. matrix or vector).format- The format of the data the Matrix Market file contains (e.g. array (dense) or coordinate (sparse COO)).field- The field the elements belong to in the Matrix Market file (e.g. real, integer, or complex).symmetry- The symmetry of the data in the Matrix Market file (e.g. general, symmetric, skew-symmetric, Hermitian).comments- Comments to prepend to file after the main header.
public record MatrixMarketHeader(MatrixMarketHeader.MMObject object, MatrixMarketHeader.MMFormat format, MatrixMarketHeader.MMField field, MatrixMarketHeader.MMSymmetry symmetry, String[] comments)
extends Record
A data record for storing the tokens of a Matrix Market Exchange Format file header. Valid tokens for each modifier are defined by the following enums:
MatrixMarketHeader.MMObject- Valid object types in the Matrix Market file.MatrixMarketHeader.MMFormat- Valid formats in the Matrix Market file.MatrixMarketHeader.MMField- Valid field types in the Matrix Market file.MatrixMarketHeader.MMSymmetry- Valid symmetries in the Matrix Market file.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum containing valid field types in a Matrix Market file.static enumEnum containing valid formats in a Matrix Market file.static enumEnum containing valid object types in a Matrix Market file.static enumEnum containing valid symmetry in a Matrix Market file. -
Constructor Summary
ConstructorsConstructorDescriptionMatrixMarketHeader(MatrixMarketHeader.MMObject object, MatrixMarketHeader.MMFormat format, MatrixMarketHeader.MMField field, MatrixMarketHeader.MMSymmetry symmetry, String... comments) Creates an instance of aMatrixMarketHeaderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionString[]comments()Returns the value of thecommentsrecord component.final booleanIndicates whether some other object is "equal to" this one.field()Returns the value of thefieldrecord component.format()Returns the value of theformatrecord component.final inthashCode()Returns a hash code value for this object.object()Returns the value of theobjectrecord component.static MatrixMarketHeaderparseHeader(String header) Parses a string representing the header of a Matrix Market file and stores in aMatrixMarketHeaderobject.symmetry()Returns the value of thesymmetryrecord component.toString()The String representation of this Matrix Market Exchange Format header.
-
Constructor Details
-
MatrixMarketHeader
public MatrixMarketHeader(MatrixMarketHeader.MMObject object, MatrixMarketHeader.MMFormat format, MatrixMarketHeader.MMField field, MatrixMarketHeader.MMSymmetry symmetry, String... comments) Creates an instance of aMatrixMarketHeaderrecord class.
-
-
Method Details
-
parseHeader
Parses a string representing the header of a Matrix Market file and stores in aMatrixMarketHeaderobject.- Parameters:
header- String containing the header, and only the header, of the Matrix Market file.- Returns:
- A
MatrixMarketHeaderobject containing information about the Matrix Market object type, format, field type, and symmetry.
-
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). -
object
-
format
-
field
-
symmetry
-
comments
-