linear_algebra plugged.
[scilab.git] / scilab / modules / linear_algebra / sci_gateway / cpp / linear_algebra_gw.cpp
1 /*
2  *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  *  Copyright (C) 2011 - DIGITEO - Cedric DELAMARRE
4  *
5  *  This file must be used under the terms of the CeCILL.
6  *  This source file is licensed as described in the file COPYING, which
7  *  you should have received as part of this distribution.  The terms
8  *  are also available at
9  *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10  *
11  */
12
13 #include "context.hxx"
14 #include "function.hxx"
15 #include "linear_algebra_gw.hxx"
16 extern "C"
17 {
18     #include "gw_linear_algebra.h"
19 }
20
21 #define MODULE_NAME L"linear_algebra"
22
23 int LinearAlgebraModule::Load()
24 {
25     symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"chol", &sci_chol, MODULE_NAME));
26     symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"bdiag", &sci_bdiag, MODULE_NAME));
27     symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"svd", &sci_svd, MODULE_NAME));
28     symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"rcond", &sci_rcond, MODULE_NAME));
29     symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"qr", &sci_qr, MODULE_NAME));
30     symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"lu", &sci_lu, MODULE_NAME));
31     symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"lsq", &sci_lsq, MODULE_NAME));
32     symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"inv", &sci_inv, MODULE_NAME));
33     symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"hess", &sci_hess, MODULE_NAME));
34     symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"spec", &sci_spec, MODULE_NAME));
35     symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"det", &sci_det, MODULE_NAME));
36     symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"balanc", &sci_balanc, MODULE_NAME));
37     symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"schur", &sci_schur, MODULE_NAME));
38     return true;
39 }