linear_algebra plugged.
[scilab.git] / scilab / modules / elementary_functions / sci_gateway / cpp / elem_func_gw.cpp
1 /*
2 *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 *  Copyright (C) 2008-2008 - DIGITEO - Antoine ELIAS
4 *  Copyright (C) 2011-2011 - DIGITEO - Bruno JOFRET
5 *
6 *  This file must be used under the terms of the CeCILL.
7 *  This source file is licensed as described in the file COPYING, which
8 *  you should have received as part of this distribution.  The terms
9 *  are also available at
10 *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11 *
12 */
13
14 #include "elem_func_gw.hxx"
15 #include "context.hxx"
16
17 #define MODULE_NAME L"elementary_functions"
18 extern "C"
19 {
20         #include "gw_elementary_functions.h"
21 }
22
23 int ElemFuncModule::Load()
24 {
25         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"abs", &sci_abs, MODULE_NAME));
26         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"acos", &sci_acos, MODULE_NAME));
27         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"asin", &sci_asin, MODULE_NAME));
28         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"atan", &sci_atan, MODULE_NAME));
29         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"ceil", &sci_ceil, MODULE_NAME));
30         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"clean", &sci_clean, MODULE_NAME));
31         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"conj", &sci_conj, MODULE_NAME));
32         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"cos", &sci_cos, MODULE_NAME));
33         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"cumprod", &sci_cumprod, MODULE_NAME));
34         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"cumsum", &sci_cumsum, MODULE_NAME));
35         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"diag", &sci_diag, MODULE_NAME));
36         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"dsearch", &sci_dsearch, MODULE_NAME));
37         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"exp", &sci_exp, MODULE_NAME));
38         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"expm", &sci_expm, MODULE_NAME));
39         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"eye", &sci_eye, MODULE_NAME));
40         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"floor", &sci_floor, MODULE_NAME));
41         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"frexp", &sci_frexp, MODULE_NAME));
42         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"gsort", &sci_gsort, MODULE_NAME));
43         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"imag", &sci_imag, MODULE_NAME));
44         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"imult", &sci_imult, MODULE_NAME));
45         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"int", &sci_int, MODULE_NAME));
46         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"isreal", &sci_isreal, MODULE_NAME));
47         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"isequal", &sci_isequal, MODULE_NAME));
48         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"kron", &sci_kron, MODULE_NAME));
49         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"log", &sci_log, MODULE_NAME));
50         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"log1p", &sci_log1p, MODULE_NAME));
51         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"matrix", &sci_scimatrix, MODULE_NAME));
52         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"max", &sci_maxi, MODULE_NAME));
53         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"min", &sci_mini, MODULE_NAME));
54         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"nearfloat", &sci_nearfloat, MODULE_NAME));
55         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"number_properties", &sci_number_properties, MODULE_NAME));
56         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"ones", &sci_ones, MODULE_NAME));
57         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"prod", &sci_prod, MODULE_NAME));
58         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"rand", &sci_rand, MODULE_NAME));
59         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"real", &sci_real, MODULE_NAME));
60         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"round", &sci_round, MODULE_NAME));
61         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"sign", &sci_sign, MODULE_NAME));
62         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"sin", &sci_sin, MODULE_NAME));
63         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"size", &sci_size, MODULE_NAME));
64         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"sqrt", &sci_sqrt, MODULE_NAME));
65         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"sum", &sci_sum, MODULE_NAME));
66         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"tan", &sci_tan, MODULE_NAME));
67         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"testmatrix", &sci_testmatrix, MODULE_NAME));
68         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"tril", &sci_tril, MODULE_NAME));
69         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"triu", &sci_triu, MODULE_NAME));
70         symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"zeros", &sci_zeros, MODULE_NAME));
71         return 1;
72 }