43 #ifndef __H__UG__LIB_ALGEBRA__MM_TYPE_CODE_H
44 #define __H__UG__LIB_ALGEBRA__MM_TYPE_CODE_H
98 #define MM_BANNER_STR "%%MatrixMarket"
99 #define MM_MTX_STR "matrix"
100 #define MM_COORDINATE_STR "coordinate"
101 #define MM_SPARSE_STR "coordinate"
102 #define MM_ARRAY_STR "array"
103 #define MM_DENSE_STR "array"
104 #define MM_REAL_STR "real"
105 #define MM_COMPLEX_STR "complex"
106 #define MM_INTEGER_STR "integer"
107 #define MM_PATTERN_STR "pattern"
108 #define MM_GENERAL_STR "general"
109 #define MM_SYMMETRIC_STR "symmetric"
110 #define MM_SKEW_STR "skew-symmetric"
111 #define MM_HERMITIAN_STR "hermitian"
145 std::stringstream out;
146 out <<
"MatrixMarket Type Codes:\n";
211 UG_THROW(
"MatrixMarket Type code is invalid: " << type );
226 UG_THROW(
"MatrixMarket Type is invalid: " << type );
251 UG_THROW(
"MatrixMarket numeric type code is invalid: " << type );
271 UG_THROW(
"MatrixMarket numeric type is invalid: " << type );
296 UG_THROW(
"MatrixMarket algebraic type code is invalid: " << type );
316 UG_THROW(
"MatrixMarket algebraic type is invalid: " << type );
Type representation for MatrixMarket matrix exchange files.
Definition: mm_type_code.h:60
void set_numeric_type(std::string type)
Sets a new numeric type from a string.
Definition: mm_type_code.h:261
void set_class_type(int type)
Sets a new class type from an enum value.
Definition: mm_type_code.h:202
int m_numeric_type
Holds a value of MMTypeCode::NumericType (initialized with 0)
Definition: mm_type_code.h:117
bool is_general() const
Tells whether MMTypeCode is general.
Definition: mm_type_code.h:176
bool is_skew_symmetric() const
Tells whether MMTypeCode is skew-symmetric.
Definition: mm_type_code.h:192
std::string to_string()
Pretty prints the three classes and their current value.
Definition: mm_type_code.h:144
void set_numeric_type(int type)
Sets a new numeric type from an enum value.
Definition: mm_type_code.h:236
static const int MM_LINE_LENGTH
Maximum line length in characters as defined by the MatrixMarket specifications.
Definition: mm_type_code.h:97
bool is_real() const
Tells whether MMTypeCode is real.
Definition: mm_type_code.h:167
void set_algebraic_type(int type)
Sets a new algebraic type from an enum value.
Definition: mm_type_code.h:281
bool is_symmetric() const
Tells whether MMTypeCode is symmetric.
Definition: mm_type_code.h:184
void set_algebraic_type(std::string type)
Sets a new algebraic type from a string.
Definition: mm_type_code.h:306
bool is_sparse() const
Tells whether MMTypeCode is sparse.
Definition: mm_type_code.h:158
NumericType
Numeric type of the described matrix.
Definition: mm_type_code.h:77
@ INTEGER
Definition: mm_type_code.h:80
@ COMPLEX
Definition: mm_type_code.h:79
@ REAL
Definition: mm_type_code.h:78
@ PATTERN
Definition: mm_type_code.h:81
AlgebraicType
Algebraic type of the described matrix.
Definition: mm_type_code.h:89
@ GENERAL
Definition: mm_type_code.h:90
@ HERMITIAN
Definition: mm_type_code.h:93
@ SYMMETRIC
Definition: mm_type_code.h:91
@ SKEW
Definition: mm_type_code.h:92
int m_class_type
Holds a value of MMTypeCode::ClassType (initialized with 0)
Definition: mm_type_code.h:115
void set_class_type(std::string type)
Sets a new class type from a string.
Definition: mm_type_code.h:220
ClassType
Class type of the described matrix.
Definition: mm_type_code.h:67
@ ARRAY
Definition: mm_type_code.h:69
@ COORDINATE
Definition: mm_type_code.h:68
MMTypeCode()
Default constructor.
Definition: mm_type_code.h:127
int m_algebraic_type
Holds a value of MMTypeCode::AlgebraicType (initialized with 0)
Definition: mm_type_code.h:119
#define UG_THROW(msg)
Definition: error.h:57
#define MM_PATTERN_STR
Definition: mm_type_code.h:107
#define MM_SKEW_STR
Definition: mm_type_code.h:110
#define MM_GENERAL_STR
Definition: mm_type_code.h:108
#define MM_COMPLEX_STR
Definition: mm_type_code.h:105
#define MM_COORDINATE_STR
Definition: mm_type_code.h:100
#define MM_SPARSE_STR
Definition: mm_type_code.h:101
#define MM_HERMITIAN_STR
Definition: mm_type_code.h:111
#define MM_SYMMETRIC_STR
Definition: mm_type_code.h:109
#define MM_INTEGER_STR
Definition: mm_type_code.h:106
#define MM_ARRAY_STR
Definition: mm_type_code.h:102
#define MM_DENSE_STR
Definition: mm_type_code.h:103
#define MM_REAL_STR
Definition: mm_type_code.h:104