330 #ifndef RKMATRIX_COMPLETE 331 #define RKMATRIX_COMPLETE prkmatrix clone_rkmatrix(pcrkmatrix r)
Create a copy of an rkmatrix.
pamatrix getA_rkmatrix(prkmatrix r)
Get the factor A of an rkmatrix .
Definition: rkmatrix.h:380
amatrix B
Definition: rkmatrix.h:40
pcrkmatrix init_sub_rkmatrix(prkmatrix r, pcrkmatrix src, uint rows, uint roff, uint cols, uint coff)
Initialize an rkmatrix object to represent a submatrix.
real norm2diff_rkmatrix(pcrkmatrix a, pcrkmatrix b)
Approximate the spectral norm of the difference of two low-rank matrices and .
prkmatrix init_rkmatrix(prkmatrix r, uint rows, uint cols, uint k)
Initialize an rkmatrix object.
uint getrows_rkmatrix(pcrkmatrix r)
Get the number of rows of an rkmatrix .
Definition: rkmatrix.h:351
void setrank_rkmatrix(prkmatrix r, uint k)
Change the rank of an rkmatrix.
unsigned uint
Unsigned integer type.
Definition: settings.h:70
pamatrix getB_rkmatrix(prkmatrix r)
Get the factor B of an rkmatrix .
Definition: rkmatrix.h:389
void copy_rkmatrix(bool atrans, pcrkmatrix a, prkmatrix b)
Copy an rkmatrix into another rkmatrix.
void scale_rkmatrix(field alpha, prkmatrix r)
Scale an rkmatrix by a factor.
double _Complex field
Field type.
Definition: settings.h:171
void random_rkmatrix(prkmatrix r, uint kmax)
Fill an rkmatrix with random values.
uint rows
Number of rows.
Definition: amatrix.h:51
#define INLINE_PREFIX
Prefix for inline functions.
Definition: settings.h:36
void uninit_rkmatrix(prkmatrix r)
Uninitialize an rkmatrix object.
uint k
Definition: rkmatrix.h:43
void mvm_rkmatrix_avector(field alpha, bool rtrans, pcrkmatrix r, pcavector x, pavector y)
Multiply a low-rank matrix or its adjoint by a vector, or .
size_t getsize_heap_rkmatrix(pcrkmatrix r)
Get heap size of a given rkmatrix object.
uint getcols_rkmatrix(pcrkmatrix r)
Get the number of columns of an rkmatrix .
Definition: rkmatrix.h:360
void addevaltrans_rkmatrix_avector(field alpha, pcrkmatrix r, pcavector x, pavector y)
Multiply the adjoint of a low-rank matrix by a vector , .
#define HEADER_PREFIX
Prefix for function declarations.
Definition: settings.h:43
double real
real floating point type.
Definition: settings.h:97
amatrix A
Definition: rkmatrix.h:38
pcrkmatrix new_sub_rkmatrix(pcrkmatrix src, uint rows, uint roff, uint cols, uint coff)
Create a new rkmatrix object representing a submatrix.
uint getrank_rkmatrix(pcrkmatrix r)
Get the rank of an rkmatrix .
Definition: rkmatrix.h:369
void addeval_rkmatrix_avector(field alpha, pcrkmatrix r, pcavector x, pavector y)
Multiply a low-rank matrix by a vector , .
Representation of a low-rank matrix in factorized form .
Definition: rkmatrix.h:36
rkmatrix * prkmatrix
Pointer to rkmatrix object.
Definition: rkmatrix.h:25
Representation of a matrix as an array in column-major order.
Definition: amatrix.h:43
prkmatrix new_rkmatrix(uint rows, uint cols, uint k)
Create a new rkmatrix object.
void resize_rkmatrix(prkmatrix r, uint rows, uint cols, uint k)
Change the size of an rkmatrix.
uint cols
Number of columns.
Definition: amatrix.h:53
size_t getsize_rkmatrix(pcrkmatrix r)
Get size of a given rkmatrix object.
real norm2_rkmatrix(pcrkmatrix R)
Approximate the spectral norm of a matrix .
const rkmatrix * pcrkmatrix
Pointer to constant rkmatrix object.
Definition: rkmatrix.h:28
void del_rkmatrix(prkmatrix r)
Delete an rkmatrix object.