11 #ifndef CLUSTERBASIS_H 12 #define CLUSTERBASIS_H 74 #define CLUSTERBASIS_TYPE_COMPLETE 869 #if defined(CLUSTERBASIS_TYPE_COMPLETE) && !defined(CLUSTERBASIS_COMPLETE) 870 #define CLUSTERBASIS_COMPLETE uint kbranch
Maximal rank sum for all branches below t
Definition: clusterbasis.h:49
void backward_notransfer_clusterbasis_avector(pcclusterbasis cb, pavector yt, pavector y)
Backward transformation without transfer matrices.
pclusterbasis init_leaf_clusterbasis(pclusterbasis cb, pccluster t)
Initialize a clusterbasis object for a leaf.
void compress_clusterbasis_avector(pcclusterbasis cb, pcavector xp, pavector xt)
Compute .
void update_tree_clusterbasis(pclusterbasis cb)
Updates bookkeeping information, e.g., cb->ktree, for a clusterbasis object and all its descendants...
void backward_clusterbasis_trans_amatrix(pcclusterbasis cb, pamatrix Yt, pamatrix Yp)
Adjoint matrix backward transformation.
void ref_clusterbasis(pclusterbasis *ptr, pclusterbasis cb)
Set a pointer to a clusterbasis object, increase its reference counter, and decrease reference counte...
pclusterbasis init_sub_clusterbasis(pclusterbasis cb, pclusterbasis src, pccluster t, uint off)
Initialize a clusterbasis object representing a leaf son cluster for a leaf cluster basis...
real check_ortho_clusterbasis(pcclusterbasis cb)
Check whether a cluster basis is orthogonal.
Representation of a cluster operator.
Definition: clusteroperator.h:44
uint sons
Number of sons, either t->sons or zero.
Definition: clusterbasis.h:57
pclusterbasis new_clusterbasis(pccluster t)
Create a new clusterbasis object.
void compress_clusterbasis_amatrix(pcclusterbasis cb, pcamatrix Xp, pamatrix Xt)
Compute .
void ortho_clusterbasis(pclusterbasis cb, pclusteroperator co)
Orthogonalize a cluster basis.
pclusterbasis * son
Pointers to sons.
Definition: clusterbasis.h:59
amatrix E
Transfer matrix to father.
Definition: clusterbasis.h:54
puniform clist
List of matrices using this basis as column basis.
Definition: clusterbasis.h:70
void clear_weight_clusterbasis(pclusterbasis cb)
Delete all weight matrices of the clusterbasis and its descendants.
pclusterbasis init_clusterbasis(pclusterbasis cb, pccluster t)
Initialize a clusterbasis object.
Representation of a cluster basis.
Definition: clusterbasis.h:40
pclusterbasis * enumerate_clusterbasis(pccluster t, pclusterbasis cb)
Enumerate clusterbasis according to cluster tree.
const clusterbasis * pcclusterbasis
Pointer to constant clusterbasis object.
Definition: clusterbasis.h:32
unsigned uint
Unsigned integer type.
Definition: settings.h:70
void setrank_clusterbasis(pclusterbasis cb, uint k)
Change the rank of a cluster basis and resize cb->V, while cb->son[i]->E is resized for all sons...
clusterbasis * pclusterbasis
Pointer to clusterbasis object.
Definition: clusterbasis.h:29
pclusterbasis clone_clusterbasis(pcclusterbasis cb)
Create a copy of a clusterbasis.
void iterate_parallel_clusterbasis(pcclusterbasis cb, uint cbname, uint pardepth, void(*pre)(pcclusterbasis cb, uint cbname, void *data), void(*post)(pcclusterbasis cb, uint cbname, void *data), void *data)
Parallel hierarchical iterator for a clusterbasis.
void forward_notransfer_clusterbasis_avector(pcclusterbasis cb, pcavector x, pavector xt)
Forward transformation without transfer matrices.
void forward_clusterbasis_avector(pcclusterbasis cb, pcavector x, pavector xt)
Forward transformation.
double _Complex field
Field type.
Definition: settings.h:171
pccluster t
Corresponding cluster.
Definition: clusterbasis.h:42
pclusterbasis read_cdf_clusterbasis(const char *name, pccluster t)
Read clusterbasis from NetCdf file.
void backward_nopermutation_clusterbasis_avector(pcclusterbasis cb, pavector yt, pavector yp)
Backward transformation for vectors in cluster numbering.
uint ktree
Sum of ranks in entire subtree below t
Definition: clusterbasis.h:47
#define INLINE_PREFIX
Prefix for inline functions.
Definition: settings.h:36
pclusterbasis build_from_cluster_clusterbasis(pccluster t)
Construct a clusterbasis from a cluster tree.
pamatrix weight_enum_clusterbasis_clusteroperator(pcclusterbasis cb)
Compute weight matrices for a cluster basis using an iterator over the cluster tree.
size_t getsize_clusterbasis(pcclusterbasis cb)
Get the size of a given clusterbasis object.
pclusterbasis clonestructure_clusterbasis(pcclusterbasis cb)
Copy the tree structure of a clusterbasis.
void backward_clusterbasis_avector(pcclusterbasis cb, pavector yt, pavector y)
Backward transformation.
void addevaltrans_clusterbasis_avector(field alpha, pcclusterbasis cb, pcavector xp, pavector xc)
Compute .
void forward_parallel_clusterbasis_avector(pcclusterbasis cb, pcavector x, pavector xt, uint pardepth)
Parallel forward transformation.
pavector new_coeffs_clusterbasis_avector(pcclusterbasis cb)
Create coefficient vector for cluster basis.
void backward_parallel_clusterbasis_avector(pcclusterbasis cb, pavector yt, pavector y, uint pardepth)
Parallel backward transformation.
pclusteroperator weight_clusterbasis_clusteroperator(pcclusterbasis cb, pclusteroperator co)
Compute weight matrices for a cluster basis.
void unref_clusterbasis(pclusterbasis cb)
Reduce the reference counter of a clusterbasis object.
void backward_clusterbasis_amatrix(pcclusterbasis cb, pamatrix Yt, pamatrix Yp)
Matrix backward transformation.
void write_cdfpart_clusterbasis(pcclusterbasis cb, int nc_file, const char *prefix)
Write clusterbasis to part of NetCDF file.
void update_clusterbasis(pclusterbasis cb)
Updates bookkeeping information, e.g., cb->ktree, for a clusterbasis object after its sons have been ...
#define HEADER_PREFIX
Prefix for function declarations.
Definition: settings.h:43
double real
real floating point type.
Definition: settings.h:97
void compress_parallel_clusterbasis_amatrix(pcclusterbasis cb, pcamatrix Xp, pamatrix Xt, uint pardepth)
Compute .
uint k
Maximal rank.
Definition: clusterbasis.h:45
uint refs
References to this cluster basis.
Definition: clusterbasis.h:65
void forward_nopermutation_clusterbasis_avector(pcclusterbasis cb, pcavector xp, pavector xt)
Forward transformation for vectors using cluster numbering.
void expand_clusterbasis_avector(pcclusterbasis cb, pavector yt, pavector yp)
Add to target vector .
puniform rlist
List of matrices using this basis as row basis.
Definition: clusterbasis.h:68
void forward_clusterbasis_amatrix(pcclusterbasis cb, pcamatrix Xp, pamatrix Xt)
Matrix forward transformation.
void resize_clusterbasis(pclusterbasis cb, uint k)
Change the rank of a cluster basis and resize cb->V, cb->son[i]->E is resized for all sons...
pclusterbasis new_leaf_clusterbasis(pccluster t)
Create a new clusterbasis object for a leaf.
uint getactives_clusterbasis()
Get number of active clusterbasis objects.
pclusterbasis read_cdfpart_clusterbasis(int nc_file, const char *prefix, pccluster t)
Read clusterbasis from part of a NetCdf file.
Representation of cluster trees.
Definition: cluster.h:40
void forward_clusterbasis_trans_amatrix(pcclusterbasis cb, pcamatrix Xp, pamatrix Xt)
Adjoint matrix forward transformation.
amatrix V
Leaf matrix .
Definition: clusterbasis.h:52
void addeval_clusterbasis_avector(field alpha, pcclusterbasis cb, pcavector yc, pavector yp)
Compute .
void iterate_clusterbasis(pcclusterbasis cb, uint cbname, void(*pre)(pcclusterbasis cb, uint cbname, void *data), void(*post)(pcclusterbasis cb, uint cbname, void *data), void *data)
Hierarchical iterator for a clusterbasis.
Representation of a matrix as an array in column-major order.
Definition: amatrix.h:43
pamatrix Z
Weight matrix used to represent total cluster basis.
Definition: clusterbasis.h:62
void uninit_clusterbasis(pclusterbasis cb)
Uninitializes a clusterbasis object.
void del_clusterbasis(pclusterbasis cb)
Delete a clusterbasis object.
void write_cdf_clusterbasis(pcclusterbasis cb, const char *name)
Write clusterbasis to NetCDF file.