libDAI
matlab.h
Go to the documentation of this file.
1 /* This file is part of libDAI - http://www.libdai.org/
2  *
3  * Copyright (c) 2006-2011, The libDAI authors. All rights reserved.
4  *
5  * Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
6  */
7 
8 
11 
12 
13 #ifndef __defined_libdai_matlab_h
14 #define __defined_libdai_matlab_h
15 
16 
17 #include "mex.h"
18 #include <dai/factor.h>
19 
20 
21 namespace dai {
22 
23 
24 #ifdef SMALLMEM
25  typedef int mwSize;
26  typedef int mwIndex;
27 #endif
28 
29 
31 mxArray *Factors2mx(const std::vector<Factor> &Ps);
32 
34 std::vector<Factor> mx2Factors(const mxArray *psi, long verbose);
35 
37 Factor mx2Factor(const mxArray *psi);
38 
39 
40 } // end of namespace dai
41 
42 
43 #endif
TFactor< Real > Factor
Represents a factor with values of type dai::Real.
Definition: factor.h:640
Factor mx2Factor(const mxArray *psi)
Convert CPTAB-like struct to Factor.
Definition: matlab.cpp:134
mxArray * Factors2mx(const vector< Factor > &Ps)
Convert vector structure to a cell vector of CPTAB-like structs.
Definition: matlab.cpp:20
Namespace for libDAI.
Definition: alldai.cpp:16
Defines TFactor<> and Factor classes which represent factors in probability distributions.
vector< Factor > mx2Factors(const mxArray *psi, long verbose)
Convert cell vector of CPTAB-like structs to vector
Definition: matlab.cpp:59