H2Lib
3.0
|
Uniform matrices with directional cluster bases. More...
Data Structures | |
struct | _duniform |
Uniform matrices with directional cluster bases. More... | |
Typedefs | |
typedef struct _duniform | duniform |
Uniform matrices with directional cluster bases. | |
typedef duniform * | pduniform |
Pointer to duniform objects. | |
typedef const duniform * | pcduniform |
Pointer to constant duniform objects. | |
Functions | |
pduniform | new_duniform (pdclusterbasis rb, uint rd, pdclusterbasis cb, uint cd) |
Create a new duniform object. More... | |
void | del_duniform (pduniform u) |
Delete a duniform object. More... | |
size_t | getsize_duniform (pcduniform u) |
Compute the storage size of a duniform object. More... | |
void | clear_duniform (pduniform u) |
Set a duniform matrix to zero. More... | |
void | copy_duniform (pcduniform src, pduniform trg) |
Copy a duniform matrix. More... | |
void | fastaddeval_duniform_avector (field alpha, pcduniform u, pcavector xt, pavector yt) |
Fast matrix-vector multiplication. More... | |
void | fastaddevaltrans_duniform_avector (field alpha, pcduniform u, pcavector xt, pavector yt) |
Fast adjoint matrix-vector multiplication. More... | |
void | slowaddeval_duniform_avector (field alpha, pcduniform u, pcavector x, pavector y) |
Slow matrix-vector multiplication . More... | |
void | slowaddevaltrans_duniform_avector (field alpha, pcduniform u, pcavector x, pavector y) |
Slow adjoint matrix-vector multiplication . More... | |
void | expand_duniform (field alpha, pcduniform u, pamatrix G) |
Convert a duniform matrix to a dense matrix. More... | |
real | norm2_fast_duniform (pcduniform u, pcdclusteroperator ro, pcdclusteroperator co) |
Will compute the Euclidean norm of the coupling matrix or of the product of one or two weight matrices with the coupling matrix. More... | |
real | normfrob_fast_duniform (pcduniform u, pcdclusteroperator ro, pcdclusteroperator co) |
Will compute the Frobenius norm of the coupling matrix or of the product of one or two weight matrices with the coupling matrix. More... | |
void | add_projected_duniform (pcduniform u, pcdclusteroperator ro, pcdclusteroperator co, pduniform unew) |
Addition of two duniform matrices even with different directional cluster basis. More... | |
Uniform matrices with directional cluster bases.
void add_projected_duniform | ( | pcduniform | u, |
pcdclusteroperator | ro, | ||
pcdclusteroperator | co, | ||
pduniform | unew | ||
) |
Addition of two duniform matrices even with different directional cluster basis.
Add to the duniform matrix another duniform matrix . Where depends on the equality of the row- and column basis. The matrix can be either
where denotes the directions corresponding to .
u | Source duniform matrix with corresponding . |
ro | dclusteroperator describes the basis-change for the directional row cluster basis with corresponding weight matrix . |
co | dclusteroperator describes the basis-change for the directional column cluster basis with corresponding weight matrix . |
unew | Source duniform matrix with corresponding . |
void copy_duniform | ( | pcduniform | src, |
pduniform | trg | ||
) |
Copy a duniform matrix.
src | Source matrix. |
trg | Target matrix. |
void expand_duniform | ( | field | alpha, |
pcduniform | u, | ||
pamatrix | G | ||
) |
Convert a duniform matrix to a dense matrix.
Adds to a matrix .
alpha | Scaling factor . |
u | Source matrix. |
G | Target matrix. |
void fastaddeval_duniform_avector | ( | field | alpha, |
pcduniform | u, | ||
pcavector | xt, | ||
pavector | yt | ||
) |
Fast matrix-vector multiplication.
Multiply the transformed coefficients in xt
by the coupling matrix and add the result to yt
.
alpha | Scaling factor . |
u | Matrix. |
xt | Transformed input vector as provided, e.g., by forward_dclusterbasis. Size u->cb->ktree . |
yt | Transformed output vector, functions like backward_dclusterbasis can be used to obtain the final result. Size u->rb->ktree . |
void fastaddevaltrans_duniform_avector | ( | field | alpha, |
pcduniform | u, | ||
pcavector | xt, | ||
pavector | yt | ||
) |
Fast adjoint matrix-vector multiplication.
Multiply the transformed coefficients in xt
by the adjoint coupling matrix and add the result to yt
.
alpha | Scaling factor . |
u | Matrix. |
xt | Transformed input vector as provided, e.g., by forward_dclusterbasis. Size u->rb->ktree |
yt | Transformed output vector, functions like backward_dclusterbasis can be used to obtain the final result. Size u->cb->ktree . |
size_t getsize_duniform | ( | pcduniform | u | ) |
Compute the storage size of a duniform object.
u | Object. |
u
in bytes, not including the cluster bases. pduniform new_duniform | ( | pdclusterbasis | rb, |
uint | rd, | ||
pdclusterbasis | cb, | ||
uint | cd | ||
) |
Create a new duniform object.
rb | Row cluster basis. |
rd | Direction for row basis. |
cb | Column cluster basis. |
cd | Direction for column basis. |
real norm2_fast_duniform | ( | pcduniform | u, |
pcdclusteroperator | ro, | ||
pcdclusteroperator | co | ||
) |
Will compute the Euclidean norm of the coupling matrix or of the product of one or two weight matrices with the coupling matrix.
If no directional cluster operator is given, the function will compute . If a directional row or column cluster operators are given
where denotes the directions corresponding to , will be computed.
u | duniform object for the coupling matrix. |
ro | Optional directional row cluster operator. If ro == NULL , no will be used. |
co | Optional directional column cluster operator. If c0 == NULL , no will be used. |
real normfrob_fast_duniform | ( | pcduniform | u, |
pcdclusteroperator | ro, | ||
pcdclusteroperator | co | ||
) |
Will compute the Frobenius norm of the coupling matrix or of the product of one or two weight matrices with the coupling matrix.
If no directional cluster operator is given, the function will compute . If directional row or column cluster operators are given
where denotes the directions corresponding to , will be computed.
u | duniform object for the coupling matrix. |
ro | Optional directional row cluster operator. If ro == NULL , no will be used. |
co | Optional directional column cluster operator. If co == NULL , no will be used. |
void slowaddeval_duniform_avector | ( | field | alpha, |
pcduniform | u, | ||
pcavector | x, | ||
pavector | y | ||
) |
Slow matrix-vector multiplication .
Intended for debugging, applies forward and backward transformation for each individual block instead of sharing transformed vectors.
alpha | Scaling factor . |
u | matrix. |
x | Input vector . |
y | Output vector . |
void slowaddevaltrans_duniform_avector | ( | field | alpha, |
pcduniform | u, | ||
pcavector | x, | ||
pavector | y | ||
) |
Slow adjoint matrix-vector multiplication .
Intended for debugging, applies forward and backward transformation for each individual block instead of sharing transformed vectors.
alpha | Scaling factor . |
u | matrix. |
x | Input vector . |
y | Output vector . |