H2Lib  3.0
dclusterbasis.h
Go to the documentation of this file.
1 
2 /* ------------------------------------------------------------
3  * This is the file "dclusterbasis.h" of the H2Lib package.
4  * All rights reserved, Steffen Boerm 2015
5  * ------------------------------------------------------------ */
6 
11 #ifndef DCLUSTERBASIS_H
12 #define DCLUSTERBASIS_H
13 
20 
23 
26 
27 #include "dcluster.h"
28 #include "dblock.h"
29 #include "amatrix.h"
30 #include "dclusteroperator.h"
31 
46 {
49 
53 
56  uint *k;
57 
63 
66 
69 
73 
77 
85 };
86 
87 /* ------------------------------------------------------------
88  * Constructors and destructors
89  * ------------------------------------------------------------ */
90 
110 
118 HEADER_PREFIX void
120 
133 
141 HEADER_PREFIX void
143 
144 /* ------------------------------------------------------------
145  * Low-level management
146  * ------------------------------------------------------------ */
147 
155 HEADER_PREFIX void
157 
166 HEADER_PREFIX void
168 
179 HEADER_PREFIX void
181 
192 HEADER_PREFIX void
194  pdclusterbasis cb);
195 
196 
197 /* ------------------------------------------------------------
198  * Statistics
199  * ------------------------------------------------------------ */
206 
214 HEADER_PREFIX size_t
216 
226 HEADER_PREFIX size_t
228 
239 
248 
259 HEADER_PREFIX void
261 
262 /* ------------------------------------------------------------
263  * Build cluster basis based on directional cluster tree
264  * ------------------------------------------------------------ */
265 
278 
279 /* ------------------------------------------------------------
280  * Forward and backward transformation
281  * ------------------------------------------------------------ */
293 
328 HEADER_PREFIX void
330 
366 HEADER_PREFIX void
368 
381 HEADER_PREFIX void
383 
396 HEADER_PREFIX void
398 
399 /* ------------------------------------------------------------
400  * Forward and backward transformation for the root only
401  * ------------------------------------------------------------ */
402 
417 HEADER_PREFIX void
419  pcavector xp, pavector xt);
420 
435 HEADER_PREFIX void
437  pavector yt, pavector yp);
438 
452 HEADER_PREFIX void
454  pcamatrix Xp, pamatrix Xt);
455 
470 HEADER_PREFIX void
472  pamatrix Xt, pamatrix Xp);
473 
474 /* ------------------------------------------------------------
475  * Enumeration by cluster number
476  * ------------------------------------------------------------ */
477 
496 
497 /* ------------------------------------------------------------
498  * Hierarchical iterator
499  * ------------------------------------------------------------ */
500 
522 HEADER_PREFIX void
524  uint pardepth,
525  void (*pre)(pdclusterbasis cb, uint tname,
526  uint pardepth, void *data),
527  void (*post)(pdclusterbasis cb, uint tname,
528  uint pardepth, void *data),
529  void *data);
530 
531 /* ------------------------------------------------------------
532  * Orthogonalization
533  * ------------------------------------------------------------ */
534 
535 
559 HEADER_PREFIX void
561 
573 HEADER_PREFIX void
575 
594 
595 
607 
619 
622 #endif
pavector newcoeffs_dclusterbasis(pcdclusterbasis cb)
Create coefficient vector for a directional cluster basis.
pcdcluster t
Corresponding directional cluster.
Definition: dclusterbasis.h:48
Directional cluster tree.
Definition: dcluster.h:40
void expand_dclusterbasis(field alpha, pcdclusterbasis cb, pavector yt, pavector yp)
Add to target vector .
void slowbackward_dclusterbasis(pcdclusterbasis cb, pcavector yt, pavector y)
Slow version of the backward transformation.
void forward_dclusterbasis(pcdclusterbasis cb, pcavector x, pavector xt)
Forward transformation.
Definition: avector.h:39
uint kbranch
Maximum of rank sums along all branches in the subtree.
Definition: dclusterbasis.h:68
void compress_dclusterbasis(pcdclusterbasis cb, pcavector xp, pavector xt)
Compute .
pdclusterbasis buildfromdcluster_dclusterbasis(pcdcluster t)
Construct a dclusterbasis from a directional cluster tree.
uint getactives_dclusterbasis()
Get number of active dclusterbasis objects.
void slowforward_dclusterbasis(pcdclusterbasis cb, pcavector x, pavector xt)
Slow version of the forward transformation.
uint * koff
Partial sums of direction ranks for forward_dclusterbasis and backward_dclusterbasis, koff[iota]= , type uint koff[directions+1]
Definition: dclusterbasis.h:62
pdclusterbasis init_dclusterbasis(pdclusterbasis cb, pcdcluster t)
Initialize a dclusterbasis object.
unsigned uint
Unsigned integer type.
Definition: settings.h:70
void blockcompress_dclusterbasis(pcdclusterbasis cb, pcamatrix Xp, pamatrix Xt)
Compute .
double _Complex field
Field type.
Definition: settings.h:171
dclusterbasis * pdclusterbasis
Pointer to a dclusterbasis object.
Definition: dclusterbasis.h:22
real check_ortho_dclusterbasis(pcdclusterbasis cb)
Check if a given directional cluster basis is orthogonal or not.
void ortho_dclusterbasis(pdclusterbasis cb, pdclusteroperator co)
Create an orthogonal directional cluster basis.
pdclusterbasis new_dclusterbasis(pcdcluster t)
Create a new dclusterbasis object.
pdclusterbasis * enumerate_dclusterbasis(pcdcluster t, pdclusterbasis cb)
Enumerate dclusterbasis according to the durectional cluster tree.
uint ktree
Sum of ranks in the entire subtree.
Definition: dclusterbasis.h:65
Representation of a directional cluster operator.
Definition: dclusteroperator.h:33
uint * k
Ranks, i.e., number of columns of , type uint k[directions]
Definition: dclusterbasis.h:56
uint ** dirson
Son directions corresponding to this cluster's directions, type uint dirson[sons][directions] ...
Definition: dclusterbasis.h:84
Directional block tree.
Definition: dblock.h:45
void weight_dclusterbasis_dclusteroperator(pdclusterbasis cb, pdclusteroperator co)
Compute weight matrices with QR-decomposition.
pamatrix * E
Transfer matrices for all sons, type amatrix E[sons][directions]
Definition: dclusterbasis.h:76
pdclusterbasis duplicate_dclusterbasis(pcdclusterbasis cb)
Duplicate a directional cluster basis.
void blockexpand_dclusterbasis(field alpha, pcdclusterbasis cb, pamatrix Xt, pamatrix Xp)
Compute .
uint directions
Number of directions, matches t->directions if t->direction > 0, otherwise equals one...
Definition: dclusterbasis.h:52
pdclusterbasis clone_structure_dclusterbasis(pcdclusterbasis cb)
Clone the structure of an already existing directional cluster basis.
size_t getsize_dclusterbasis(pcdclusterbasis cb)
Get the size of a given dclusterbasis object.
void update_dclusterbasis(pdclusterbasis cb)
Updates bookkeeping information, e.g., cb->ktree, for a dclusterbasis object after its sons have been...
uint getactivedirections_dclusterbasis(pcdclusterbasis cb)
Count the number of all used directions for a given dclusterbasis object.
void initmatrices_dclusterbasis(pdclusterbasis cb)
Initialize the matrices for a dclusterbasis object.
#define HEADER_PREFIX
Prefix for function declarations.
Definition: settings.h:43
double real
real floating point type.
Definition: settings.h:97
size_t getsize_nonrecursive_dclusterbasis(pcdclusterbasis cb)
Get the size of a given dclusterbasis object, without considering its sons.
pamatrix V
Matrices , only stored if t->sons==0, type amatrix V[directions]
Definition: dclusterbasis.h:72
void findranks_dclusterbasis(uint rank, pcdblock b, pdclusterbasis rb, pdclusterbasis cb)
Determine the ranks of the directional cluster basis.
void del_dclusterbasis(pdclusterbasis cb)
Delete a dclusterbasis object.
pdclusterbasis * son
Pointers to sons.
Definition: dclusterbasis.h:81
void iterate_dclusterbasis(pdclusterbasis cb, uint tname, uint pardepth, void(*pre)(pdclusterbasis cb, uint tname, uint pardepth, void *data), void(*post)(pdclusterbasis cb, uint tname, uint pardepth, void *data), void *data)
Hierarchical iterator for a dclusterbasis.
uint sons
Number of sons.
Definition: dclusterbasis.h:79
Representation of a matrix as an array in column-major order.
Definition: amatrix.h:43
void setrank_dclusterbasis(pdclusterbasis cb, uint iota, uint k)
Change the rank of a directional cluster basis and resize cb->V[iota], while for all sons i the trans...
const dclusterbasis * pcdclusterbasis
Pointer to a constant dclusterbasis object.
Definition: dclusterbasis.h:25
void print_tree_dclusterbasis(pcdclusterbasis cb)
Print the tree structure of a given dclusterbasis object.
void uninit_dclusterbasis(pdclusterbasis cb)
Uninitializes a dclusterbasis object.
uint getmaxrank_dclusterbasis(pcdclusterbasis cb)
Get the maximum rank of a given dclusterbasis object.
Representation of a directional cluster basis.
Definition: dclusterbasis.h:45
void backward_dclusterbasis(pcdclusterbasis cb, pavector yt, pavector y)
Backward transformation.