Updated copyright headers
[libdai.git] / include / dai / matlab / matlab.h
1 /* This file is part of libDAI - http://www.libdai.org/
2 *
3 * libDAI is licensed under the terms of the GNU General Public License version
4 * 2, or (at your option) any later version. libDAI is distributed without any
5 * warranty. See the file COPYING for more details.
6 *
7 * Copyright (C) 2006-2009 Joris Mooij [joris dot mooij at libdai dot org]
8 * Copyright (C) 2006-2007 Radboud University Nijmegen, The Netherlands
9 */
10
11
12 /// \file
13 /// \brief Defines some utility functions for interfacing with MatLab
14
15
16 #ifndef __defined_libdai_matlab_h
17 #define __defined_libdai_matlab_h
18
19
20 #include "mex.h"
21 #include <dai/factor.h>
22
23
24 namespace dai {
25
26
27 #ifdef SMALLMEM
28 typedef int mwSize;
29 typedef int mwIndex;
30 #endif
31
32
33 /// Convert vector<Factor> structure to a cell vector of CPTAB-like structs
34 mxArray *Factors2mx(const std::vector<Factor> &Ps);
35
36 /// Convert cell vector of CPTAB-like structs to vector<Factor>
37 std::vector<Factor> mx2Factors(const mxArray *psi, long verbose);
38
39 /// Convert CPTAB-like struct to Factor
40 Factor mx2Factor(const mxArray *psi);
41
42
43 } // end of namespace dai
44
45
46 #endif