H2Lib  3.0
truncation.h
Go to the documentation of this file.
1 /* ------------------------------------------------------------
2  This is the file "truncation.h" of the H2Lib package.
3  All rights reserved, Steffen Boerm 2014
4  ------------------------------------------------------------ */
5 
9 #ifndef TRUNCATION_H
10 #define TRUNCATION_H
11 
20 typedef struct _truncmode truncmode;
21 
26 
30 typedef const truncmode *pctruncmode;
31 
32 #include "realavector.h"
33 #include "settings.h"
34 
35 /* ------------------------------------------------------------
36  Truncation strategy
37  ------------------------------------------------------------ */
38 
43 struct _truncmode {
45  bool frobenius;
47  bool absolute;
49  bool blocks;
50 
55 };
56 
57 /* ------------------------------------------------------------
58  Constructors for standard truncation strategies
59  ------------------------------------------------------------ */
60 
68 
74 HEADER_PREFIX void
76 
85 
94 
104 
114 
123 
124 /* ------------------------------------------------------------
125  Find minimal acceptable rank
126  ------------------------------------------------------------ */
127 
142 
146 #endif
truncmode * ptruncmode
Abbreviation for a pointer to a truncmode object.
Definition: truncation.h:25
Definition: realavector.h:48
ptruncmode new_releucl_truncmode()
Create a new truncmode object with relative euclidean error norm.
uint findrank_truncmode(pctruncmode tm, real eps, pcrealavector sigma)
Determine new rank for truncation routines.
real zeta_level
Level-dependent tolerance factor.
Definition: truncation.h:52
const truncmode * pctruncmode
Abbreviation for a pointer to a constant truncmode object.
Definition: truncation.h:30
unsigned uint
Unsigned integer type.
Definition: settings.h:70
ptruncmode new_blockrelfrob_truncmode()
Create a new truncmode object with block relative frobenius error norm.
bool absolute
If set to true Absolute instead of relative error is used.
Definition: truncation.h:47
void del_truncmode(ptruncmode tm)
Free storage for truncmode object.
Define different strategies used by various truncation and compression algorithms for hmatrices and h...
Definition: truncation.h:43
bool blocks
If set to true Blockwise error will be considered.
Definition: truncation.h:49
#define HEADER_PREFIX
Prefix for function declarations.
Definition: settings.h:43
double real
real floating point type.
Definition: settings.h:97
ptruncmode new_truncmode()
Create a new truncmode object without any further initializations.
ptruncmode new_blockreleucl_truncmode()
Create a new truncmode object with block relative euclidean error norm.
bool frobenius
If set to true Frobenius instead of spectral norm is used.
Definition: truncation.h:45
ptruncmode new_relfrob_truncmode()
Create a new truncmode object with relative frobenius error norm.
real zeta_age
Block-age-dependent tolerance factor.
Definition: truncation.h:54
ptruncmode new_abseucl_truncmode()
Create a new truncmode object with absolute euclidean error norm.