73#ifndef __ADS_SparseAssembly
74 #define __ADS_SparseAssembly
105template<
class I ,
class V >
109 using Vector = std::vector< U , detail::DefaultInitAllocator< U > >;
113 std::vector< std::pair< I , V > >
pairs;
160template<
class I ,
class V ,
class J >
162 std::size_t z ,
const J * major ,
164 const V * value , I * beg , I * ind , V * val ,
168template<
class I ,
class V ,
class J >
170 std::size_t z ,
const J * major ,
172 const V * value , I * beg , I * ind , V * val );
188template<
class I ,
class V ,
class J >
189std::size_t
assembleCsc( std::size_t m , std::size_t n , std::size_t z ,
190 const J * row ,
const J * col ,
const V * value ,
191 I * beg , I * ind , V * val ,
205template<
class I ,
class V ,
class J >
206std::size_t
assembleCsr( std::size_t m , std::size_t n , std::size_t z ,
207 const J * row ,
const J * col ,
const V * value ,
208 I * beg , I * ind , V * val ,
219#include "ADS/numeric/impl/SparseAssembly.tpp"
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
The dense matrices by rows, beyond the book: DenseMatrix keeps the entries by rows in one contiguous...
std::size_t compressTriplets(std::size_t nmajor, std::size_t nminor, std::size_t z, const J *major, const J *minor, const V *value, I *beg, I *ind, V *val, AssemblyWorkspace< I, V > &work)
the compressed form, by major index, of the triplets of a matrix of , the values of equal places su...
std::size_t assembleCsc(std::size_t m, std::size_t n, std::size_t z, const J *row, const J *col, const V *value, I *beg, I *ind, V *val, AssemblyWorkspace< I, V > &work)
the compressed sparse columns of the matrix of the triplets : beg has places, ind holds the rows; ...
std::size_t assembleCsr(std::size_t m, std::size_t n, std::size_t z, const J *row, const J *col, const V *value, I *beg, I *ind, V *val, AssemblyWorkspace< I, V > &work)
the compressed sparse rows of the same: beg has places, ind holds the columns; the number of the ent...
the scratch of compressTriplets(), which keeps its memory from one call to the next
Definition SparseAssembly.h:107
std::vector< U, detail::DefaultInitAllocator< U > > Vector
Definition SparseAssembly.h:109
std::vector< std::pair< I, V > > pairs
a long one, to sort
Definition SparseAssembly.h:113
Vector< I > cursor
the cursor of each major index
Definition SparseAssembly.h:111
Vector< I > mark
the last place of each minor one
Definition SparseAssembly.h:112