/usr/include/givaro/givmatstoragesparse.h is in libgivaro-dev 4.0.2-8ubuntu1.
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 | // ==========================================================================
// $Source: /var/lib/cvs/Givaro/src/library/matrix/givmatstoragesparse.h,v $
// Copyright(c)'1994-2009 by The Givaro group
// This file is part of Givaro.
// Givaro is governed by the CeCILL-B license under French law
// and abiding by the rules of distribution of free software.
// see the COPYRIGHT file for more details.
// Authors: T. Gautier
// $Id: givmatstoragesparse.h,v 1.3 2011-02-02 16:23:56 briceboyer Exp $
// ==========================================================================
// Description:
//
#error "dead code"
#ifndef _GIV_MATRIX_STORAGE_SPARSE_H_
#define _GIV_MATRIX_STORAGE_SPARSE_H_
#include "givaro/givmatstorage.h"
namespace Givaro {
#pragma message "#warning this file will probably not compile"
// ==========================================================================
// --
// -- Specialization for sparse representation, using Array0 of givaro
// --
// ==========================================================================
template<class T>
struct RetMatrixStorage<T,Sparse> {
typedef T Type_t;
typedef typename Array0<T>::Indice_t Indice_t;
// --
// -- Iterators of the container
// --
typedef typename Array0<T>::Iterator_t Iterator_t;
typedef typename Array0<T>::constIterator_t constIterator_t;
// --
// --
// --
struct Storage_t {
Indice_t _nrow, _ncol; // - dimension of the block matrix
Array0<Indice_t> _rows; // - rows[i] of the first entry of
// the i-th row in (_index,_data).
// rows a +1 entry
Array0<Indice_t> _index; // - index of the first entry of
Array0<T> _data; // - entries
//-- Store dimension but don't allocate
void allocate( size_t rsz, size_t csz )
{
_data.allocate(0);
_index.allocate(0);
_rows.allocate(rsz+1);
_nrow = rsz; _ncol = csz;
}
//-- Store dimension but don't allocate
void reallocate( size_t rsz, size_t csz )
{
_data.reallocate(0);
_index.reallocate(0);
_rows.reallocate(rsz+1);
_nrow = rsz; _ncol = csz;
}
Storage_t& copy (const Storage_t& V)
{
_data.copy(V._data);
_index.copy(V._index);
_rows.copy(V._rows);
_nrow = V._nrow; _ncol = V._ncol;
return *this;
}
Storage_t& operator= (const Storage_t& V)
{
_data.copy(V._data);
_index.copy(V._index);
_rows.copy(V._rows);
_nrow = V._nrow; _ncol = V._ncol;
return *this;
}
Storage_t ( )
: _nrow(0), _ncol(0), _rows(0), _index(0), _data( 0 ) {}
Storage_t ( Indice_t nrow, Indice_t ncol )
: _nrow(nrow), _ncol(ncol), _rows(nrow+1), _index(0), _data( 0 ) {}
Storage_t ( const Storage_t& s )
: _nrow(s._nrow), _ncol(s._ncol),
_rows ( s._rows, givWithCopy()),
_index( s._index, givWithCopy()),
_data ( s._data, givWithCopy() ) {}
};
};
} // Givaro
#endif
|