21 #ifndef SELDON_FILE_MATRIX_SPARSE_IOMATRIXMARKET_HXX
39 template<
class T
int,
class AllocInt,
class T,
class Allocator>
40 void ReadCoordinateMatrix(istream& FileStream,
41 Vector<Tint, VectFull, AllocInt>& row_numbers,
42 Vector<Tint, VectFull, AllocInt>& col_numbers,
43 Vector<T, VectFull, Allocator>& values,
46 template<
class Matrix1,
class T>
47 void ReadCoordinateMatrix(Matrix1& A, istream& FileStream, T& zero,
48 int index = 1,
long nnz = -1,
bool cplx =
false);
50 template<
class T
int,
class AllocInt,
class T,
class Allocator>
51 void WriteCoordinateMatrix(ostream& FileStream,
52 const Vector<Tint, VectFull, AllocInt>& row_numbers,
53 const Vector<Tint, VectFull, AllocInt>& col_numbers,
54 const Vector<T, VectFull, Allocator>& values,
57 template<
class T0,
class Prop0,
class Storage0,
class Alloc0,
class T>
58 void WriteCoordinateMatrix(
const Matrix<T0, Prop0, Storage0, Alloc0>& A,
59 ostream& FileStream, T& zero,
60 int index = 1,
bool cplx =
false);
62 template <
class T,
class Prop,
class Allocator>
63 void ReadHarwellBoeing(
string filename,
64 Matrix<T, Prop, ColSparse, Allocator>& A);
67 template <
class T,
class Prop,
class Allocator>
68 void ReadHarwellBoeing(
string filename,
69 Matrix<complex<T>, Prop, ColSparse, Allocator>& A);
72 template <
class T,
class Prop,
class Allocator>
73 void ReadHarwellBoeing(
string filename,
74 Matrix<T, Prop, RowSymSparse, Allocator>& A);
77 template <
class T,
class Prop,
class Allocator>
78 void ReadHarwellBoeing(
string filename,
79 Matrix<complex<T>, Prop, RowSymSparse, Allocator>& A);
82 template <
class T,
class T2,
class Storage,
class Allocator>
83 void ReadHarwellBoeing(
string filename,
const T2& val,
84 Matrix<T, Symmetric, Storage, Allocator>& A);
87 template <
class T,
class T2,
class Storage,
class Allocator>
88 void ReadHarwellBoeing(
string filename,
const T2& val,
89 Matrix<T, General, Storage, Allocator>& A);
92 template <
class T,
class T2,
class Storage,
class Allocator>
93 void ReadHarwellBoeing(
string filename,
const complex<T2>& val,
94 Matrix<T, Symmetric, Storage, Allocator>& A);
97 template <
class T,
class T2,
class Storage,
class Allocator>
98 void ReadHarwellBoeing(
string filename,
const complex<T2>& val,
99 Matrix<T, General, Storage, Allocator>& A);
102 template <
class T,
class Prop,
class Storage,
class Allocator>
103 void ReadHarwellBoeing(
string filename,
104 Matrix<T, Prop, Storage, Allocator>& A);
108 void ReadComplexValuesHarwell(
long Nnonzero,
int Nline_val,
int line_width_val,
109 int element_width_val,
110 istream& input_stream, T* A_data);
114 void ReadComplexValuesHarwell(
long Nnonzero,
int Nline_val,
int line_width_val,
115 int element_width_val,
116 istream& input_stream, complex<T>* A_data);
119 template <
class T,
class Prop,
class Storage,
class Allocator>
120 void ReadHarwellBoeing(
string filename,
121 string value_type,
string matrix_type,
122 Matrix<T, Prop, Storage, Allocator> & A);
126 void PrintComplexValuesHarwell(
long nnz,
const Vector<complex<T> >& Val,
131 void PrintComplexValuesHarwell(
long nnz,
const Vector<T>& Val,
135 template<
class T,
class Prop,
class Storage,
class Allocator>
136 void WriteHarwellBoeing(
const Matrix<T, Prop, Storage, Allocator>& A,
137 const string& file_name);
140 template <
class T,
class Prop,
class Storage,
class Allocator>
141 void ReadMatrixMarket(
string filename,
142 Matrix<T, Prop, Storage, Allocator>& A);
145 template<
class T,
class Prop,
class Storage,
class Allocator>
146 void WriteMatrixMarket(
const Matrix<T, Prop, Storage, Allocator>& A,
147 const string& file_name);
153 #define SELDON_FILE_MATRIX_SPARSE_IOMATRIXMARKET_HXX