H2Lib  3.0
Data Structures | Typedefs | Functions
duniform

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 duniformpduniform
 Pointer to duniform objects.
 
typedef const duniformpcduniform
 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 $y \gets y + \alpha G x$. More...
 
void slowaddevaltrans_duniform_avector (field alpha, pcduniform u, pcavector x, pavector y)
 Slow adjoint matrix-vector multiplication $y \gets y + \alpha G^* x$. 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...
 

Detailed Description

Uniform matrices with directional cluster bases.

Function Documentation

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 $ S_{b,\text{new}} $ another duniform matrix $ \tilde S $. Where $ \tilde S $ depends on the equality of the row- and column basis. The matrix can be either

\[ \tilde S = S_{b}, \quad \tilde S = C_{t, rd} S_{b} \quad \tilde S = S_{b} C_{s, cd}^{*} \text{ or } \quad \tilde S = C_{t, rd} S_{b} C_{s, cd}^{*}, \]

where $rd, cd $ denotes the directions corresponding to $ S_{b} $.

Parameters
uSource duniform matrix with corresponding $ S_b $.
rodclusteroperator describes the basis-change for the directional row cluster basis with corresponding weight matrix $ C_{t, rd} $.
codclusteroperator describes the basis-change for the directional column cluster basis with corresponding weight matrix $ C_{s, cd} $.
unewSource duniform matrix with corresponding $ S_{b, \text{new}} $.
void clear_duniform ( pduniform  u)

Set a duniform matrix to zero.

Parameters
uMatrix.
void copy_duniform ( pcduniform  src,
pduniform  trg 
)

Copy a duniform matrix.

Parameters
srcSource matrix.
trgTarget matrix.
void del_duniform ( pduniform  u)

Delete a duniform object.

Parameters
uObject to be deleted.
void expand_duniform ( field  alpha,
pcduniform  u,
pamatrix  G 
)

Convert a duniform matrix to a dense matrix.

Adds $\alpha V_{t c} S_{ts} W_{s c}^*$ to a matrix $G$.

Parameters
alphaScaling factor $\alpha$.
uSource matrix.
GTarget 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.

Parameters
alphaScaling factor $\alpha$.
uMatrix.
xtTransformed input vector as provided, e.g., by forward_dclusterbasis. Size u->cb->ktree.
ytTransformed 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.

Parameters
alphaScaling factor $\alpha$.
uMatrix.
xtTransformed input vector as provided, e.g., by forward_dclusterbasis. Size u->rb->ktree
ytTransformed 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.

Parameters
uObject.
Returns
Storage size of u in bytes, not including the cluster bases.
pduniform new_duniform ( pdclusterbasis  rb,
uint  rd,
pdclusterbasis  cb,
uint  cd 
)

Create a new duniform object.

Parameters
rbRow cluster basis.
rdDirection for row basis.
cbColumn cluster basis.
cdDirection for column basis.
Returns
New object.
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 $ \| S_{b} \|_{2} $. If a directional row $ ro $ or column cluster operators $ co $ are given

\[ \| C_{t, rd} S_{b} \|_{2}, \| S_{b} C_{s, cd}^{*} \|_{2} \text{ or } \| C_{t, rd} S_{b} C_{s, cd}^{*} \|_{2} ,\]

where $rd, cd $ denotes the directions corresponding to $ S_{b} $, will be computed.

Parameters
uduniform object for the coupling matrix.
roOptional directional row cluster operator. If ro == NULL, no $ C_{t, rd} $ will be used.
coOptional directional column cluster operator. If c0 == NULL, no $ C_{s, cd} $ will be used.
Returns
Approximation of the Euclidean norm of the coupling matrix or of the product of one or two weight matrices with the coupling matrix.
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 $ \| S_{b} \|_{2} $. If directional row $ ro $ or column cluster operators $ co $ are given

\[ \| C_{t, rd} S_{b} \|_{2}, \| S_{b} C_{s, cd}^{*} \|_{2} \text{ or } \| C_{t, rd} S_{b} C_{s, cd}^{*} \|_{2} ,\]

where $rd, cd $ denotes the directions corresponding to $ S_{b} $, will be computed.

Parameters
uduniform object for the coupling matrix.
roOptional directional row cluster operator. If ro == NULL, no $ C_{t, rd} $ will be used.
coOptional directional column cluster operator. If co == NULL, no $ C_{s, cd} $ will be used.
Returns
Approximation of the Frbenius norm of the coupling matrix or of the product of one or two weight matrices with the coupling matrix.
void slowaddeval_duniform_avector ( field  alpha,
pcduniform  u,
pcavector  x,
pavector  y 
)

Slow matrix-vector multiplication $y \gets y + \alpha G x$.

Intended for debugging, applies forward and backward transformation for each individual block instead of sharing transformed vectors.

Parameters
alphaScaling factor $\alpha$.
umatrix.
xInput vector $x$.
yOutput vector $y$.
void slowaddevaltrans_duniform_avector ( field  alpha,
pcduniform  u,
pcavector  x,
pavector  y 
)

Slow adjoint matrix-vector multiplication $y \gets y + \alpha G^* x$.

Intended for debugging, applies forward and backward transformation for each individual block instead of sharing transformed vectors.

Parameters
alphaScaling factor $\alpha$.
umatrix.
xInput vector $x$.
yOutput vector $y$.