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