linbox
1
|
Example of a blackbox that is space efficient, though not time efficient. More...
#include <jit-matrix.h>
Public Member Functions | |
JIT_Matrix (_Field &F, const size_t m, const size_t n, const JIT_EntryGenerator &JIT) |
Example of a blackbox that is space efficient, though not time efficient.
Just In Time Matrix.
The matrix itself is not stored in memory. Rather, an EntryGenerator function is called to provide the entries. The entry generator is called once for each entry during an apply or applyTranspose operation.
An toy example of its use is the Hilbert matrix, whose i,j entry is generated by the formula 1/(i+j+2) in zero based indexing. The motivating examples were matrices also defined by formula, the Paley type matrices. [MSW07]}% ISSAC 07 paper In that context block structured turned out to be essential and the JIT_Matrix class is primarily intended for block structured matrices, the JIT entries being matrix blocks.
The | _Field only need provide the init() and axpyin() functions. |
The | JIT_EntryGenerator gen() is a function object defining the matrix by providing gen(e, i, j) which sets field element e to the i,j entry of the matrix. Indexing is zero based. |
JIT_Matrix | ( | _Field & | F, |
const size_t | m, | ||
const size_t | n, | ||
const JIT_EntryGenerator & | JIT | ||
) | [inline] |
m by n matrix is constructed. JIT(Field::Element& e, size_t i, size_t j) is a function object which assigns the i,j entry to e (and returns a reference to e) and must be valid for 0 <= i < m, 0 <= j < n.