H2Lib  3.0
Data Structures | Macros | Typedefs | Functions
rkmatrix.h File Reference
#include "amatrix.h"
#include "krylov.h"
#include "settings.h"

Go to the source code of this file.

Data Structures

struct  _rkmatrix
 Representation of a low-rank matrix in factorized form $R = A B^*$. More...
 

Typedefs

typedef struct _rkmatrix rkmatrix
 Representation of a low-rank matrix in factorized form.
 
typedef rkmatrixprkmatrix
 Pointer to rkmatrix object.
 
typedef const rkmatrixpcrkmatrix
 Pointer to constant rkmatrix object.
 

Functions

prkmatrix init_rkmatrix (prkmatrix r, uint rows, uint cols, uint k)
 Initialize an rkmatrix object. More...
 
pcrkmatrix init_sub_rkmatrix (prkmatrix r, pcrkmatrix src, uint rows, uint roff, uint cols, uint coff)
 Initialize an rkmatrix object to represent a submatrix. More...
 
void uninit_rkmatrix (prkmatrix r)
 Uninitialize an rkmatrix object. More...
 
prkmatrix new_rkmatrix (uint rows, uint cols, uint k)
 Create a new rkmatrix object. More...
 
pcrkmatrix new_sub_rkmatrix (pcrkmatrix src, uint rows, uint roff, uint cols, uint coff)
 Create a new rkmatrix object representing a submatrix. More...
 
void del_rkmatrix (prkmatrix r)
 Delete an rkmatrix object. More...
 
void setrank_rkmatrix (prkmatrix r, uint k)
 Change the rank of an rkmatrix. More...
 
void resize_rkmatrix (prkmatrix r, uint rows, uint cols, uint k)
 Change the size of an rkmatrix. More...
 
size_t getsize_rkmatrix (pcrkmatrix r)
 Get size of a given rkmatrix object. More...
 
size_t getsize_heap_rkmatrix (pcrkmatrix r)
 Get heap size of a given rkmatrix object. More...
 
prkmatrix clone_rkmatrix (pcrkmatrix r)
 Create a copy of an rkmatrix. More...
 
void copy_rkmatrix (bool atrans, pcrkmatrix a, prkmatrix b)
 Copy an rkmatrix into another rkmatrix. More...
 
void scale_rkmatrix (field alpha, prkmatrix r)
 Scale an rkmatrix by a factor. More...
 
void random_rkmatrix (prkmatrix r, uint kmax)
 Fill an rkmatrix with random values. More...
 
void addeval_rkmatrix_avector (field alpha, pcrkmatrix r, pcavector x, pavector y)
 Multiply a low-rank matrix $R$ by a vector $x$, $y \gets y + \alpha R x$. More...
 
void addevaltrans_rkmatrix_avector (field alpha, pcrkmatrix r, pcavector x, pavector y)
 Multiply the adjoint of a low-rank matrix $R$ by a vector $x$, $y \gets y + \alpha R^* x$. More...
 
void mvm_rkmatrix_avector (field alpha, bool rtrans, pcrkmatrix r, pcavector x, pavector y)
 Multiply a low-rank matrix $R$ or its adjoint $R^*$ by a vector, $y \gets y + \alpha R x$ or $y \gets y + \alpha R^* x$. More...
 
real norm2_rkmatrix (pcrkmatrix R)
 Approximate the spectral norm $\|R\|_2$ of a matrix $R$. More...
 
real norm2diff_rkmatrix (pcrkmatrix a, pcrkmatrix b)
 Approximate the spectral norm $\|R_A-R_B\|_2$ of the difference of two low-rank matrices $R_A$ and $R_B$. More...
 
uint getrows_rkmatrix (pcrkmatrix r)
 Get the number of rows of an rkmatrix $R=A B^*$. More...
 
uint getcols_rkmatrix (pcrkmatrix r)
 Get the number of columns of an rkmatrix $R=A B^*$. More...
 
uint getrank_rkmatrix (pcrkmatrix r)
 Get the rank of an rkmatrix $R=A B^*$. More...
 
pamatrix getA_rkmatrix (prkmatrix r)
 Get the factor A of an rkmatrix $R=A B^*$. More...
 
pamatrix getB_rkmatrix (prkmatrix r)
 Get the factor B of an rkmatrix $R=A B^*$. More...
 

Detailed Description

Author
Steffen Börm