This file is indexed.

/usr/include/linbox/matrix/sparse-matrix.h is in liblinbox-dev 1.4.2-5build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
/* linbox/matrix/sparse-matrix.h
 * Copyright (C) 2013 the LinBox
 *
 * Written by :
 * Brice Boyer (briceboyer) <boyer.brice@gmail.com>
 *
 * ========LICENCE========
 * This file is part of the library LinBox.
 *
  * LinBox is free software: you can redistribute it and/or modify
 * it under the terms of the  GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * ========LICENCE========
 */

/*! @file matrix/sparse-matrix.h
 * @ingroup matrix
 * @ingroup sparsematrix
 * A <code>SparseMatrix<_Field, _Storage></code> ....
 */

#ifndef __LINBOX_matrix_sparse_matrix_H
#define __LINBOX_matrix_sparse_matrix_H

#ifndef index_t
#define index_t ptrdiff_t
#endif

#include "linbox/matrix/sparse-formats.h"
#include "linbox/matrix/matrix-traits.h"

namespace LinBox {


	// Forward definition
	template<class _Field, class _Storage = SparseMatrixFormat::SparseSeq >
	class SparseMatrix ;


	template <class _Field, class _Storage>
	std::ostream& operator<< (std::ostream & os, const SparseMatrix<_Field,_Storage> & Mat)
	{
		return Mat.write(os);
	}

	template <class _Field, class _Storage>
	std::istream &operator >> (std::istream &is, SparseMatrix<_Field, _Storage> &A)
	{
		return A.read (is);
	}


	template<class _Field, class _Storage>
	class SparseMatrixDomain ;

} // LinBox

#include "sparsematrix/read-write-sparse.h"

#include "sparsematrix/sparse-generic.h"

#include "sparsematrix/sparse-coo-matrix.h"
// #include "sparsematrix/sparse-coo-1-matrix.h"
#include "sparsematrix/sparse-csr-matrix.h"
// #include "sparsematrix/sparse-csr-1-matrix.h"
#include "sparsematrix/sparse-ell-matrix.h"
#include "sparsematrix/sparse-ellr-matrix.h"
// #include "sparsematrix/sparse-ellr-1-matrix.h"
// #include "sparsematrix/sparse-bcsr-matrix.h"
// #include "sparsematrix/sparse-dia-matrix.h"
// #include "sparsematrix/sparse-hyb-matrix.h"

#include "sparsematrix/sparse-tpl-matrix.h"
// #ifdef __LINBOX_USES_OPENMP
#ifdef _OPENMP
#include "sparsematrix/sparse-tpl-matrix-omp.h"
#endif

namespace LinBox { /*  MatrixContainerTraits */

	template <class Field, class Storage>
	class MatrixContainerTrait<SparseMatrix<Field,Storage> > {
	public:
                    //typedef MatrixContainerCategory::Blackbox Type;
                typedef MatrixContainerCategory::Container Type;
	};

	// template <class _Field, class _Storage>
	// struct MatrixTraits< SparseMatrix<_Field, _Storage> > {
		// typedef SparseMatrix<_Field, _Storage>      MatrixType;
		// typedef typename MatrixCategories::RowMatrixTag MatrixCategory;
	// };


	// template <class _Field, class _Storage>
	// struct GetEntryCategory<SparseMatrix<_Field,_Storage> > {
		  // typedef SolutionTags::Local Tag;
	// };
}

namespace LinBox { /*  MatrixTraits */

	template <class Field>
	struct MatrixTraits< SparseMatrix<Field, SparseMatrixFormat::CSR> >
	{
		typedef SparseMatrix<Field, SparseMatrixFormat::CSR> MatrixType;
		typedef typename MatrixCategories::IndexedMatrixTag MatrixCategory;
	};

	template <class Field>
	struct MatrixTraits< const SparseMatrix<Field, SparseMatrixFormat::CSR> >
	{
		typedef SparseMatrix<Field, SparseMatrixFormat::CSR> MatrixType;
		typedef typename MatrixCategories::IndexedMatrixTag MatrixCategory;
	};

	template <class Field>
	struct MatrixTraits< SparseMatrix<Field, SparseMatrixFormat::SparseMap> >
	{
		typedef SparseMatrix<Field, SparseMatrixFormat::SparseMap> MatrixType;
		typedef typename MatrixCategories::RowMatrixTag MatrixCategory;
	};

	template <class Field>
	struct MatrixTraits< const SparseMatrix<Field, SparseMatrixFormat::SparseMap> >
	{
		typedef SparseMatrix<Field, SparseMatrixFormat::SparseMap> MatrixType;
		typedef typename MatrixCategories::RowMatrixTag MatrixCategory;
	};

	template <class Field>
	struct MatrixTraits< SparseMatrix<Field, SparseMatrixFormat::SparsePar> >
	{
		typedef SparseMatrix<Field, SparseMatrixFormat::SparsePar> MatrixType;
		typedef typename MatrixCategories::RowMatrixTag MatrixCategory;
	};

	template <class Field>
	struct MatrixTraits< const SparseMatrix<Field, SparseMatrixFormat::SparsePar> >
	{
		typedef SparseMatrix<Field, SparseMatrixFormat::SparsePar> MatrixType;
		typedef typename MatrixCategories::RowMatrixTag MatrixCategory;
	};

	template <class Field>
	struct MatrixTraits< SparseMatrix<Field, SparseMatrixFormat::SparseSeq> >
	{
		typedef SparseMatrix<Field, SparseMatrixFormat::SparseSeq> MatrixType;
		typedef typename MatrixCategories::RowMatrixTag MatrixCategory;
	};

	template <class Field>
	struct MatrixTraits< const SparseMatrix<Field, SparseMatrixFormat::SparseSeq> >
	{
		typedef SparseMatrix<Field, SparseMatrixFormat::SparseSeq> MatrixType;
		typedef typename MatrixCategories::RowMatrixTag MatrixCategory;
	};

} // LinBox

namespace LinBox { /*  MatrixHomTrait */
	template <class Ring, class Field>
	struct MatrixHomTrait<SparseMatrix<Ring, SparseMatrixFormat::SparseSeq>, Field> {
		typedef SparseMatrix<Field, SparseMatrixFormat::SparseSeq> value_type;
	};

	template <class Ring, class Field>
	struct MatrixHomTrait<SparseMatrix<Ring, SparseMatrixFormat::SparsePar>, Field> {
		typedef SparseMatrix<Field, SparseMatrixFormat::SparsePar> value_type;
	};

	template <class Ring, class Field>
	struct MatrixHomTrait<SparseMatrix<Ring, SparseMatrixFormat::SparseMap>, Field> {
		typedef SparseMatrix<Field, SparseMatrixFormat::SparseMap> value_type;
	};

} // LinBox

namespace LinBox { /*  IndexedCategory */

	template<class Field, class Row>
	struct IndexedCategory< SparseMatrix<Field,Row> > 	{
		typedef IndexedTags::HasIndexed Tag;
	};

#if 1
	template<class Field>
	struct IndexedCategory< SparseMatrix<Field,SparseMatrixFormat::CSR> > 	{
		typedef IndexedTags::HasNext Tag;
	};

	template<class Field>
	struct IndexedCategory< SparseMatrix<Field,SparseMatrixFormat::COO> > 	{
		typedef IndexedTags::HasNext Tag;
	};

	template<class Field>
	struct IndexedCategory< SparseMatrix<Field,SparseMatrixFormat::ELL> > 	{
		typedef IndexedTags::HasNext Tag;
	};

	template<class Field>
	struct IndexedCategory< SparseMatrix<Field,SparseMatrixFormat::ELL_R> > 	{
		typedef IndexedTags::HasNext Tag;
	};

#endif




} // LinBox

namespace LinBox { /*  ContainerTraits */

	// this could also be a member of BlasVector
	template<class _Field>
	struct ContainerTraits<SparseMatrix<_Field, SparseMatrixFormat::COO> > {
		typedef ContainerCategories::Matrix ContainerCategory ;
	};

	template<class _Field>
	struct ContainerTraits<SparseMatrix<_Field, SparseMatrixFormat::CSR> > {
		typedef ContainerCategories::Matrix ContainerCategory ;
	};

	template<class _Field>
	struct ContainerTraits<SparseMatrix<_Field, SparseMatrixFormat::ELL> > {
		typedef ContainerCategories::Matrix ContainerCategory ;
	};

	template<class _Field>
	struct ContainerTraits<SparseMatrix<_Field, SparseMatrixFormat::ELL_R> > {
		typedef ContainerCategories::Matrix ContainerCategory ;
	};

}

namespace LinBox { /* Junk */

#if 1 /* make correspond SparseMatrixFormat::XXXSeq and Vector<Field>::XXXSeq */

		template<class Field>
		struct SparseVectorTranslate<Field,SparseMatrixFormat::SparseSeq> {
			typedef typename Vector<Field>::SparseSeq other_t;
		};

		template<class Field>
		struct SparseVectorTranslate<Field,typename Vector<Field>::SparseSeq> {
			typedef SparseMatrixFormat::SparseSeq other_t;
		};


		template<class Field>
		struct SparseVectorTranslate<Field,SparseMatrixFormat::SparsePar> {
			typedef typename Vector<Field>::SparsePar other_t;
		};

		template<class Field>
		struct SparseVectorTranslate<Field,SparseMatrixFormat::SparseMap> {
			typedef typename Vector<Field>::SparseMap other_t;
		};

#endif

} // LinBox

#endif // __LINBOX_matrix_sparse_matrix_H


// Local Variables:
// mode: C++
// tab-width: 8
// indent-tabs-mode: nil
// c-basic-offset: 8
// End:
// vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s