annotate DL/RLS-DLA/private/ompcore.h @ 60:ad36f80e2ccf

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