This module contains helpers for processing matrix market files.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | parameter | :: | MAX_LINE_LENGTH | = | 1024 |
The longest line size possible according to the spec. |
enumerator | :: | MM_COORDINATE | = | 1 | Sparse coordinate file. |
enumerator | :: | MM_ARRAY | = | 2 | Dense array file. |
enumerator | :: | MM_REAL | = | 1 | Real data being read in. |
enumerator | :: | MM_INTEGER | = | 2 | Integer data being read in. |
enumerator | :: | MM_COMPLEX | = | 3 | Complex numbers being read in. |
enumerator | :: | MM_PATTERN | = | 4 | Just a pattern of non zeros. |
enumerator | :: | MM_GENERAL | = | 1 | File lacks symmetry. |
enumerator | :: | MM_SYMMETRIC | = | 2 | File is symmetric |
enumerator | :: | MM_SKEW_SYMMETRIC | = | 3 | File is skew symmetric. |
enumerator | :: | MM_HERMITIAN | = | 4 | File is hermitian. |
Write a single line that would correspond to a matrix market entry.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=MAX_LINE_LENGTH), | intent(inout) | :: | outstring |
The final string is written to this variable. |
||
integer, | intent(in) | :: | row |
The first coordinate value |
||
integer, | intent(in) | :: | column |
The second coordinate value |
||
logical, | intent(in), | optional | :: | add_newline_in |
Whether to append a new line to the output (default = .false.) |
Write a single line that would correspond to a matrix market entry.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=MAX_LINE_LENGTH), | intent(inout) | :: | outstring |
The final string is written to this variable. |
||
integer, | intent(in) | :: | row |
The first coordinate value |
||
integer, | intent(in) | :: | column |
The second coordinate value |
||
real(kind=NTREAL), | intent(in) | :: | val |
The value at that coordinate |
||
logical, | intent(in), | optional | :: | add_newline_in |
Whether to append a new line to the output (default = .false.) |
Write a single line that would correspond to a matrix market entry.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=MAX_LINE_LENGTH), | intent(inout) | :: | outstring |
The final string is written to this variable. |
||
integer, | intent(in) | :: | row |
The first coordinate value |
||
integer, | intent(in) | :: | column |
The second coordinate value |
||
real(kind=NTREAL), | intent(in) | :: | val1 |
The value at that coordinate |
||
real(kind=NTREAL), | intent(in) | :: | val2 |
The second value at the coordinate |
||
logical, | intent(in), | optional | :: | add_newline_in |
Whether to append a new line to the output (default = .false.) |
Write a single line that would correspond to a matrix market entry.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=MAX_LINE_LENGTH), | intent(inout) | :: | outstring |
The final string is written to this variable. |
||
real(kind=NTREAL), | intent(in) | :: | val |
The value at that coordinate |
||
logical, | intent(in), | optional | :: | add_newline_in |
Whether to append a new line to the output (default = .false.) |
Write a single line that would correspond to a matrix market entry.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=MAX_LINE_LENGTH), | intent(inout) | :: | outstring |
The final string is written to this variable. |
||
real(kind=NTREAL), | intent(in) | :: | val1 |
The value at that coordinate |
||
real(kind=NTREAL), | intent(in) | :: | val2 |
The second value at that coordinate |
||
logical, | intent(in), | optional | :: | add_newline_in |
Whether to append a new line to the output (default = .false.) |
Parse a matrix market header.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | line |
String to parse. |
||
integer, | intent(out) | :: | sparsity_type |
If coordinate or array type. |
||
integer, | intent(out) | :: | data_type |
If real, integer, complex, pattern. |
||
integer, | intent(out) | :: | pattern_type |
If general, symmetric, skew_symmetric, hermitian. |
True if no errors.
Write the line describing the size of the matrix
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=MAX_LINE_LENGTH), | intent(inout) | :: | outstring |
The final string is written to this variable. |
||
integer, | intent(in) | :: | rows |
The number of rows of the matrix |
||
integer, | intent(in) | :: | columns |
The number of columns of the matrix |
||
integer(kind=NTLONG), | intent(in), | optional | :: | values_in |
The total number of non zero values in the matrix (for sparse format). |
Write a single line that would correspond to a matrix market entry.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=MAX_LINE_LENGTH), | intent(inout) | :: | outstring |
The final string is written to this variable. |
||
integer, | intent(in) | :: | row |
The first coordinate value |
||
integer, | intent(in) | :: | column |
The second coordinate value |
||
logical, | intent(in), | optional | :: | add_newline_in |
Whether to append a new line to the output (default = .false.) |
Write a single line that would correspond to a matrix market entry.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=MAX_LINE_LENGTH), | intent(inout) | :: | outstring |
The final string is written to this variable. |
||
integer, | intent(in) | :: | row |
The first coordinate value |
||
integer, | intent(in) | :: | column |
The second coordinate value |
||
real(kind=NTREAL), | intent(in) | :: | val |
The value at that coordinate |
||
logical, | intent(in), | optional | :: | add_newline_in |
Whether to append a new line to the output (default = .false.) |
Write a single line that would correspond to a matrix market entry.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=MAX_LINE_LENGTH), | intent(inout) | :: | outstring |
The final string is written to this variable. |
||
integer, | intent(in) | :: | row |
The first coordinate value |
||
integer, | intent(in) | :: | column |
The second coordinate value |
||
real(kind=NTREAL), | intent(in) | :: | val1 |
The value at that coordinate |
||
real(kind=NTREAL), | intent(in) | :: | val2 |
The second value at the coordinate |
||
logical, | intent(in), | optional | :: | add_newline_in |
Whether to append a new line to the output (default = .false.) |
Write a single line that would correspond to a matrix market entry.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=MAX_LINE_LENGTH), | intent(inout) | :: | outstring |
The final string is written to this variable. |
||
real(kind=NTREAL), | intent(in) | :: | val |
The value at that coordinate |
||
logical, | intent(in), | optional | :: | add_newline_in |
Whether to append a new line to the output (default = .false.) |
Write a single line that would correspond to a matrix market entry.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=MAX_LINE_LENGTH), | intent(inout) | :: | outstring |
The final string is written to this variable. |
||
real(kind=NTREAL), | intent(in) | :: | val1 |
The value at that coordinate |
||
real(kind=NTREAL), | intent(in) | :: | val2 |
The second value at that coordinate |
||
logical, | intent(in), | optional | :: | add_newline_in |
Whether to append a new line to the output (default = .false.) |