eminem
Parse Matrix Market files in C++
Loading...
Searching...
No Matches
eminem Namespace Reference

Classes and methods for parsing Matrix Market files. More...

Classes

struct  MatrixDetails
 Details extracted from the Matrix Market banner. More...
 
struct  ParseGzipFileOptions
 Options for parse_gzip_file(). More...
 
class  Parser
 Parse a matrix from a Matrix Market file. More...
 
struct  ParserOptions
 Options for the Parser constructor. More...
 
struct  ParseSomeBufferOptions
 Options for parse_some_buffer(). More...
 
struct  ParseSomeFileOptions
 Options for parse_some_file(). More...
 
struct  ParseTextBufferOptions
 Options for parse_text_buffer(). More...
 
struct  ParseTextFileOptions
 Options for parse_text_file(). More...
 
struct  ParseZlibBufferOptions
 Options for parse_zlib_buffer(). More...
 

Typedefs

typedef unsigned long long LineIndex
 

Enumerations

enum class  Object : char { MATRIX , VECTOR }
 
enum class  Format : char { COORDINATE , ARRAY }
 
enum class  Field : char {
  REAL , DOUBLE , COMPLEX , INTEGER ,
  PATTERN
}
 
enum class  Symmetry : char { GENERAL , SYMMETRIC , SKEW_SYMMETRIC , HERMITIAN }
 

Functions

template<typename Index_ = unsigned long long>
Parser< std::unique_ptr< byteme::PerByteSerial< char > >, Index_ > parse_gzip_file (const char *path, const ParseGzipFileOptions &options)
 
template<typename Index_ = unsigned long long>
Parser< std::unique_ptr< byteme::PerByteSerial< char > >, Index_ > parse_zlib_buffer (const unsigned char *buffer, std::size_t len, const ParseZlibBufferOptions &options)
 
template<typename Index_ = unsigned long long>
Parser< std::unique_ptr< byteme::PerByteSerial< char > >, Index_ > parse_some_file (const char *path, const ParseSomeFileOptions &options)
 
template<typename Index_ = unsigned long long>
Parser< std::unique_ptr< byteme::PerByteSerial< char > >, Index_ > parse_some_buffer (const unsigned char *buffer, std::size_t len, const ParseSomeBufferOptions &options)
 
template<typename Index_ = unsigned long long>
Parser< std::unique_ptr< byteme::PerByteSerial< char > >, Index_ > parse_text_file (const char *path, const ParseTextFileOptions &options)
 
template<typename Index_ = unsigned long long>
Parser< std::unique_ptr< byteme::PerByteSerial< char > >, Index_ > parse_text_buffer (const unsigned char *buffer, std::size_t len, const ParseTextBufferOptions &options)
 

Detailed Description

Classes and methods for parsing Matrix Market files.

Typedef Documentation

◆ LineIndex

typedef unsigned long long eminem::LineIndex

Integer type of the line count and line numbers in Parser. We use an unsigned long long by default to guarantee at least 64 bits of storage.

Enumeration Type Documentation

◆ Object

enum class eminem::Object : char
strong

Type of object in the Matrix Market file. For the most part, vectors are treated as matrices with 1 column.

◆ Format

enum class eminem::Format : char
strong

Format of the matrix data. For COORDINATE, each line contains the coordinates for a non-zero value. For ARRAY, each line contains the value in column-major format.

◆ Field

enum class eminem::Field : char
strong

Type of the matrix value field:

  • REAL: integer or floating-point values, in a single field.
  • DOUBLE: floating-point values only, in a single field.
  • INTEGER: integer values only, in a single field.
  • COMPLEX: complex values, including both real and imaginary parts in two separate fields.
  • PATTERN: the presence of a matrix entry, no field is required.

◆ Symmetry

enum class eminem::Symmetry : char
strong

Symmetry in the matrix.

  • GENERAL: no symmetric, valid for all choices of Field.
  • SYMMETRIC: symmetric, valid for all choices of Field.
  • SKEW_SYMMETRIC: symmetric, valid for all choices of Field except Field::PATTERN.
  • HERMITIAN: symmetric, valid for Field::COMPLEX only.

Function Documentation

◆ parse_gzip_file()

template<typename Index_ = unsigned long long>
Parser< std::unique_ptr< byteme::PerByteSerial< char > >, Index_ > eminem::parse_gzip_file ( const char * path,
const ParseGzipFileOptions & options )

Parse a Gzip-compressed Matrix Market file.

Template Parameters
Index_Integer type of the row/column indices.
Parameters
pathPointer to a string containing a path to a Gzip-compressed Matrix Market file.
optionsFurther options.

◆ parse_zlib_buffer()

template<typename Index_ = unsigned long long>
Parser< std::unique_ptr< byteme::PerByteSerial< char > >, Index_ > eminem::parse_zlib_buffer ( const unsigned char * buffer,
std::size_t len,
const ParseZlibBufferOptions & options )

Parse a Zlib-compressed Matrix Market buffer.

Template Parameters
Index_Integer type of the row/column indices.
Parameters
bufferPointer to an array containing the contents of a Zlib-compressed Matrix Market file.
lenLength of the array referenced by buffer.
optionsFurther options.

◆ parse_some_file()

template<typename Index_ = unsigned long long>
Parser< std::unique_ptr< byteme::PerByteSerial< char > >, Index_ > eminem::parse_some_file ( const char * path,
const ParseSomeFileOptions & options )

Parse a possibly Gzip-compressed or uncompressed Matrix Market file.

Template Parameters
Index_Integer type of the row/column indices.
Parameters
pathPointer to a string containing a path to a possibly-compressed Matrix Market file.
optionsFurther options.

◆ parse_some_buffer()

template<typename Index_ = unsigned long long>
Parser< std::unique_ptr< byteme::PerByteSerial< char > >, Index_ > eminem::parse_some_buffer ( const unsigned char * buffer,
std::size_t len,
const ParseSomeBufferOptions & options )

Parse a possibly Zlib-compressed or uncompressed Matrix Market buffer.

Template Parameters
Index_Integer type of the row/column indices.
Parameters
bufferPointer to an array containing the contents of a possibly-compressed Matrix Market file.
lenLength of the array referenced by buffer.
optionsFurther options.

◆ parse_text_file()

template<typename Index_ = unsigned long long>
Parser< std::unique_ptr< byteme::PerByteSerial< char > >, Index_ > eminem::parse_text_file ( const char * path,
const ParseTextFileOptions & options )

Parse a Matrix Market text file.

Template Parameters
Index_Integer type of the row/column indices.
Parameters
pathPointer to a string containing a path to an uncompressed Matrix Market file.
optionsFurther options.

◆ parse_text_buffer()

template<typename Index_ = unsigned long long>
Parser< std::unique_ptr< byteme::PerByteSerial< char > >, Index_ > eminem::parse_text_buffer ( const unsigned char * buffer,
std::size_t len,
const ParseTextBufferOptions & options )

Parse a Matrix Market text buffer.

Template Parameters
Index_Integer type of the row/column indices.
Parameters
bufferPointer to an array containing the contents of an uncompressed Matrix Market file.
lenLength of the array referenced by buffer.
optionsFurther options.