comparison solvers/SMALL_ompGabor/ompcoreGabor.h @ 140:31d2864dfdd4 ivand_dev

Audio Impainting additional constraints with cvx added
author Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk>
date Mon, 25 Jul 2011 17:27:05 +0100
parents
children
comparison
equal deleted inserted replaced
139:4bd6856a7128 140:31d2864dfdd4
1 /**************************************************************************
2 *
3 * File name: ompcore.h
4 *
5 * Ron Rubinstein
6 * Computer Science Department
7 * Technion, Haifa 32000 Israel
8 * ronrubin@cs
9 *
10 * Last Updated: 18.8.2009
11 *
12 * Contains the core implementation of Batch-OMP / OMP-Cholesky.
13 *
14 *************************************************************************/
15
16
17 #ifndef __OMP_CORE_H__
18 #define __OMP_CORE_H__
19
20
21 #include "mex.h"
22
23
24
25 /**************************************************************************
26 * Perform Batch-OMP or OMP-Cholesky on a specified set of signals, using
27 * either a fixed number of atoms or an error bound.
28 *
29 * Parameters (not all required):
30 *
31 * D - the dictionary, of size n X m
32 * x - the signals, of size n X L
33 * DtX - D'*x, of size m X L
34 * XtX - squared norms of the signals in x, sum(x.*x), of length L
35 * G - D'*D, of size m X m
36 * T - target sparsity, or maximal number of atoms for error-based OMP
37 * eps - target residual norm for error-based OMP
38 * gamma_mode - one of the constants FULL_GAMMA or SPARSE_GAMMA
39 * profile - if non-zero, profiling info is printed
40 * msg_delta - positive: the # of seconds between status prints, otherwise: nothing is printed
41 * erroromp - if nonzero indicates error-based OMP, otherwise fixed sparsity OMP
42 *
43 * Usage:
44 *
45 * The function can be called using different parameters, and will have
46 * different complexity depending on the parameters specified. Arrays which
47 * are not specified should be passed as null (0). When G is specified,
48 * Batch-OMP is performed. Otherwise, OMP-Cholesky is performed.
49 *
50 * Fixed-sparsity usage:
51 * ---------------------
52 * Either DtX, or D and x, must be specified. Specifying DtX is more efficient.
53 * XtX does not need to be specified.
54 * When D and x are specified, G is not required. However, not providing G
55 * will significantly degrade efficiency.
56 * The number of atoms must be specified in T. The value of eps is ignored.
57 * Finally, set erroromp to 0.
58 *
59 * Error-OMP usage:
60 * ----------------
61 * Either DtX and Xtx, or D and x, must be specified. Specifying DtX and XtX
62 * is more efficient.
63 * When D and x are specified, G is not required. However, not providing G
64 * will significantly degrade efficiency.
65 * The target error must be specified in eps. A hard limit on the number
66 * of atoms can also be specified via the parameter T. Otherwise, T should
67 * be negative. Finally, set erroromp to nonzero.
68 *
69 *
70 * Returns:
71 * An mxArray containing the sparse representations of the signals in x
72 * (allocated using the appropriate mxCreateXXX() function).
73 * The array is either full or sparse, depending on gamma_mode.
74 *
75 **************************************************************************/
76 mxArray* ompcoreGabor(double D[], double x[], double DtX[], double XtX[], double G[], mwSize n, mwSize m, mwSize L,
77 int T, double eps, int gamma_mode, int profile, double msg_delta, int erroromp);
78
79
80 #endif