summaryrefslogtreecommitdiffstats
path: root/scilab/modules/api_scilab
diff options
context:
space:
mode:
authorantoine ELIAS <antoine.elias@scilab.org>2010-02-01 11:58:41 +0100
committerantoine ELIAS <antoine.elias@scilab.org>2010-02-01 11:58:41 +0100
commit5ea6be69567d48028835733ccdb50152a1c9dde6 (patch)
treeef4c7b89292f604ec894e843295c30d4e9dceb64 /scilab/modules/api_scilab
parente83af56bd2cb72bd171ce31b248ca2316a94a0f9 (diff)
downloadscilab-5ea6be69567d48028835733ccdb50152a1c9dde6.zip
scilab-5ea6be69567d48028835733ccdb50152a1c9dde6.tar.gz
API doc
Diffstat (limited to 'scilab/modules/api_scilab')
-rw-r--r--scilab/modules/api_scilab/help/en_US/Polynom/A_isPolyType.xml57
-rw-r--r--scilab/modules/api_scilab/help/en_US/Polynom/B_getAllocatedSinglePoly.xml73
-rw-r--r--scilab/modules/api_scilab/help/en_US/Polynom/C_getAllocatedSingleComplexPoly.xml81
-rw-r--r--scilab/modules/api_scilab/help/en_US/Polynom/D_getAllocatedMatrixOfPoly.xml89
-rw-r--r--scilab/modules/api_scilab/help/en_US/Polynom/E_getAllocatedMatrixOfComplexPoly.xml97
-rw-r--r--scilab/modules/api_scilab/help/en_US/Polynom/F_freeAllocatedSinglePoly.xml45
-rw-r--r--scilab/modules/api_scilab/help/en_US/Polynom/G_freeAllocatedSingleComplexPoly.xml53
-rw-r--r--scilab/modules/api_scilab/help/en_US/Polynom/H_freeAllocatedMatrixOfPoly.xml45
-rw-r--r--scilab/modules/api_scilab/help/en_US/Polynom/I_freeAllocatedMatrixOfComplexPoly.xml45
-rw-r--r--scilab/modules/api_scilab/help/en_US/Polynom/J_polyExample.xml183
-rw-r--r--scilab/modules/api_scilab/help/en_US/Sparse/A_isSparseType.xml57
-rw-r--r--scilab/modules/api_scilab/help/en_US/Sparse/B_getAllocatedSparseMatrix.xml105
-rw-r--r--scilab/modules/api_scilab/help/en_US/Sparse/C_getAllocatedComplexSparseMatrix.xml113
-rw-r--r--scilab/modules/api_scilab/help/en_US/Sparse/D_freeAllocatedSparseMatrix.xml61
-rw-r--r--scilab/modules/api_scilab/help/en_US/Sparse/E_freeAllocatedComplexSparseMatrix.xml69
-rw-r--r--scilab/modules/api_scilab/help/en_US/Sparse/F_sparseExample.xml125
-rw-r--r--scilab/modules/api_scilab/help/en_US/String/A_isStringType.xml57
-rw-r--r--scilab/modules/api_scilab/help/en_US/String/B_getAllocatedSingleString.xml74
-rw-r--r--scilab/modules/api_scilab/help/en_US/String/C_getAllocatedMatrixOfString.xml90
-rw-r--r--scilab/modules/api_scilab/help/en_US/String/D_createSingleString.xml74
-rw-r--r--scilab/modules/api_scilab/help/en_US/String/E_freeAllocatedSingleString.xml54
-rw-r--r--scilab/modules/api_scilab/help/en_US/String/F_freeAllocatedMatrixOfString.xml70
-rw-r--r--scilab/modules/api_scilab/help/en_US/String/G_stringExample.xml123
-rw-r--r--scilab/modules/api_scilab/src/cpp/api_poly.cpp4
24 files changed, 1842 insertions, 2 deletions
diff --git a/scilab/modules/api_scilab/help/en_US/Polynom/A_isPolyType.xml b/scilab/modules/api_scilab/help/en_US/Polynom/A_isPolyType.xml
new file mode 100644
index 0000000..97254ec
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/Polynom/A_isPolyType.xml
@@ -0,0 +1,57 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="isPolyType"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>isPolyType</refname>
23
24 <refpurpose>
25 Check if it is a polynom variable.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>int isPolyType(void* _pvCtx, int* _piAddress)</synopsis>
31 </refsynopsisdiv>
32 <refsection>
33 <title>Parameters</title>
34 <variablelist>
35 <varlistentry>
36 <term>_pvCtx</term>
37 <listitem>
38 <para>
39 Scilab environment pointer, pass in "pvApiCtx" provided by api_scilab.h.
40 </para>
41 </listitem>
42 </varlistentry>
43 <varlistentry>
44 <term>_piAddress</term>
45 <listitem>
46 <para>
47 Position in the Scilab memory where you want to put the variable.
48 </para>
49 </listitem>
50 </varlistentry>
51 </variablelist>
52 </refsection>
53 <refsection>
54 <title>Return value</title>
55 <para>1 if variable is a polynom type, otherwise 0</para>
56 </refsection>
57</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/Polynom/B_getAllocatedSinglePoly.xml b/scilab/modules/api_scilab/help/en_US/Polynom/B_getAllocatedSinglePoly.xml
new file mode 100644
index 0000000..cf54752
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/Polynom/B_getAllocatedSinglePoly.xml
@@ -0,0 +1,73 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="getAllocatedSinglePoly"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>getAllocatedSinglePoly</refname>
23
24 <refpurpose>
25 Get single polynom variable.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>int getAllocatedSinglePoly(void* _pvCtx, int* _piAddress, int* _piNbCoef, double** _pdblReal)</synopsis>
31 </refsynopsisdiv>
32 <refsection>
33 <title>Parameters</title>
34 <variablelist>
35 <varlistentry>
36 <term>_pvCtx</term>
37 <listitem>
38 <para>
39 Scilab environment pointer, pass in "pvApiCtx" provided by api_scilab.h.
40 </para>
41 </listitem>
42 </varlistentry>
43 <varlistentry>
44 <term>_piAddress</term>
45 <listitem>
46 <para>
47 Address of the Scilab variable.
48 </para>
49 </listitem>
50 </varlistentry>
51 <varlistentry>
52 <term>_piNbCoef</term>
53 <listitem>
54 <para>
55 Returns number of coefficient.
56 </para>
57 </listitem>
58 </varlistentry>
59 <varlistentry>
60 <term>_pdblReal</term>
61 <listitem>
62 <para>
63 Return array of double.
64 </para>
65 </listitem>
66 </varlistentry>
67 </variablelist>
68 </refsection>
69 <refsection>
70 <title>Return value</title>
71 <para>if successful 0, otherwise print error(s) message(s) in the Scilab console and returns first error number.</para>
72 </refsection>
73</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/Polynom/C_getAllocatedSingleComplexPoly.xml b/scilab/modules/api_scilab/help/en_US/Polynom/C_getAllocatedSingleComplexPoly.xml
new file mode 100644
index 0000000..e43ff47
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/Polynom/C_getAllocatedSingleComplexPoly.xml
@@ -0,0 +1,81 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="getAllocatedSingleComplexPoly"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>getAllocatedSinglePoly</refname>
23
24 <refpurpose>
25 Get single complex polynom variable.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>int getAllocatedSingleComplexPoly(void* _pvCtx, int* _piAddress, int* _piNbCoef, double** _pdblReal, double** _pdblImg)</synopsis>
31 </refsynopsisdiv>
32 <refsection>
33 <title>Parameters</title>
34 <variablelist>
35 <varlistentry>
36 <term>_pvCtx</term>
37 <listitem>
38 <para>
39 Scilab environment pointer, pass in "pvApiCtx" provided by api_scilab.h.
40 </para>
41 </listitem>
42 </varlistentry>
43 <varlistentry>
44 <term>_piAddress</term>
45 <listitem>
46 <para>
47 Address of the Scilab variable.
48 </para>
49 </listitem>
50 </varlistentry>
51 <varlistentry>
52 <term>_piNbCoef</term>
53 <listitem>
54 <para>
55 Returns number of coefficient.
56 </para>
57 </listitem>
58 </varlistentry>
59 <varlistentry>
60 <term>_pdblReal</term>
61 <listitem>
62 <para>
63 Return array of real part.
64 </para>
65 </listitem>
66 </varlistentry>
67 <varlistentry>
68 <term>_pdblImg</term>
69 <listitem>
70 <para>
71 Return array of imaginary part.
72 </para>
73 </listitem>
74 </varlistentry>
75 </variablelist>
76 </refsection>
77 <refsection>
78 <title>Return value</title>
79 <para>if successful 0, otherwise print error(s) message(s) in the Scilab console and returns first error number.</para>
80 </refsection>
81</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/Polynom/D_getAllocatedMatrixOfPoly.xml b/scilab/modules/api_scilab/help/en_US/Polynom/D_getAllocatedMatrixOfPoly.xml
new file mode 100644
index 0000000..5f58333
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/Polynom/D_getAllocatedMatrixOfPoly.xml
@@ -0,0 +1,89 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="getAllocatedMatrixOfPoly"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>getAllocatedMatrixOfPoly</refname>
23
24 <refpurpose>
25 Get matrix of polynom variable.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>int getAllocatedMatrixOfPoly(void* _pvCtx, int* _piAddress, int* _piRows, int* _piCols, int** _piNbCoef, double*** _pdblReal)</synopsis>
31 </refsynopsisdiv>
32 <refsection>
33 <title>Parameters</title>
34 <variablelist>
35 <varlistentry>
36 <term>_pvCtx</term>
37 <listitem>
38 <para>
39 Scilab environment pointer, pass in "pvApiCtx" provided by api_scilab.h.
40 </para>
41 </listitem>
42 </varlistentry>
43 <varlistentry>
44 <term>_piAddress</term>
45 <listitem>
46 <para>
47 Address of the Scilab variable.
48 </para>
49 </listitem>
50 </varlistentry>
51 <varlistentry>
52 <term>_piRows</term>
53 <listitem>
54 <para>
55 Return number of rows.
56 </para>
57 </listitem>
58 </varlistentry>
59 <varlistentry>
60 <term>_piCols</term>
61 <listitem>
62 <para>
63 Return number of columns.
64 </para>
65 </listitem>
66 </varlistentry>
67 <varlistentry>
68 <term>_piNbCoef</term>
69 <listitem>
70 <para>
71 Return number of coefficient for each polynomial. (must be allocated)
72 </para>
73 </listitem>
74 </varlistentry>
75 <varlistentry>
76 <term>_pdblReal</term>
77 <listitem>
78 <para>
79 Return array of coefficients.
80 </para>
81 </listitem>
82 </varlistentry>
83 </variablelist>
84 </refsection>
85 <refsection>
86 <title>Return value</title>
87 <para>if successful 0, otherwise print error(s) message(s) in the Scilab console and returns first error number.</para>
88 </refsection>
89</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/Polynom/E_getAllocatedMatrixOfComplexPoly.xml b/scilab/modules/api_scilab/help/en_US/Polynom/E_getAllocatedMatrixOfComplexPoly.xml
new file mode 100644
index 0000000..5430b5b
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/Polynom/E_getAllocatedMatrixOfComplexPoly.xml
@@ -0,0 +1,97 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="getAllocatedMatrixOfComplexPoly"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>getAllocatedMatrixOfComplexPoly</refname>
23
24 <refpurpose>
25 Get matrix of complex polynom variable.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>int getAllocatedMatrixOfComplexPoly(void* _pvCtx, int* _piAddress, int* _piRows, int* _piCols, int** _piNbCoef, double*** _pdblReal, double*** _pdblImg)</synopsis>
31 </refsynopsisdiv>
32 <refsection>
33 <title>Parameters</title>
34 <variablelist>
35 <varlistentry>
36 <term>_pvCtx</term>
37 <listitem>
38 <para>
39 Scilab environment pointer, pass in "pvApiCtx" provided by api_scilab.h.
40 </para>
41 </listitem>
42 </varlistentry>
43 <varlistentry>
44 <term>_piAddress</term>
45 <listitem>
46 <para>
47 Address of the Scilab variable.
48 </para>
49 </listitem>
50 </varlistentry>
51 <varlistentry>
52 <term>_piRows</term>
53 <listitem>
54 <para>
55 Return number of rows.
56 </para>
57 </listitem>
58 </varlistentry>
59 <varlistentry>
60 <term>_piCols</term>
61 <listitem>
62 <para>
63 Return number of columns.
64 </para>
65 </listitem>
66 </varlistentry>
67 <varlistentry>
68 <term>_piNbCoef</term>
69 <listitem>
70 <para>
71 Return number of coefficient for each polynomial. (must be allocated)
72 </para>
73 </listitem>
74 </varlistentry>
75 <varlistentry>
76 <term>_pdblReal</term>
77 <listitem>
78 <para>
79 Return array of real part coefficients.
80 </para>
81 </listitem>
82 </varlistentry>
83 <varlistentry>
84 <term>_pdblImg</term>
85 <listitem>
86 <para>
87 Return array of real part coefficients.
88 </para>
89 </listitem>
90 </varlistentry>
91 </variablelist>
92 </refsection>
93 <refsection>
94 <title>Return value</title>
95 <para>if successful 0, otherwise print error(s) message(s) in the Scilab console and returns first error number.</para>
96 </refsection>
97</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/Polynom/F_freeAllocatedSinglePoly.xml b/scilab/modules/api_scilab/help/en_US/Polynom/F_freeAllocatedSinglePoly.xml
new file mode 100644
index 0000000..811602d
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/Polynom/F_freeAllocatedSinglePoly.xml
@@ -0,0 +1,45 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="freeAllocatedSinglePoly"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>freeAllocatedSinglePoly</refname>
23
24 <refpurpose>
25 Free memory allocated by getAllocatedSinglePoly function.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>void freeAllocatedSinglePoly(double* _pdblReal)</synopsis>
31 </refsynopsisdiv>
32 <refsection>
33 <title>Parameters</title>
34 <variablelist>
35 <varlistentry>
36 <term>_pdblReal</term>
37 <listitem>
38 <para>
39 Pointer "_pdblReal" allocated by getAllocatedSinglePoly.
40 </para>
41 </listitem>
42 </varlistentry>
43 </variablelist>
44 </refsection>
45</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/Polynom/G_freeAllocatedSingleComplexPoly.xml b/scilab/modules/api_scilab/help/en_US/Polynom/G_freeAllocatedSingleComplexPoly.xml
new file mode 100644
index 0000000..53e3c4a
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/Polynom/G_freeAllocatedSingleComplexPoly.xml
@@ -0,0 +1,53 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="freeAllocatedSingleComplexPoly"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>freeAllocatedSingleComplexPoly</refname>
23
24 <refpurpose>
25 Free memory allocated by getAllocatedSingleComplexPoly function.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>void freeAllocatedSingleComplexPoly(double* _pdblReal, double* _pdblImg)</synopsis>
31 </refsynopsisdiv>
32 <refsection>
33 <title>Parameters</title>
34 <variablelist>
35 <varlistentry>
36 <term>_pdblReal</term>
37 <listitem>
38 <para>
39 Pointer "_pdblReal" allocated by getAllocatedSingleComplexPoly.
40 </para>
41 </listitem>
42 </varlistentry>
43 <varlistentry>
44 <term>_pdblImg</term>
45 <listitem>
46 <para>
47 Pointer "_pdblImg" allocated by getAllocatedSingleComplexPoly.
48 </para>
49 </listitem>
50 </varlistentry>
51 </variablelist>
52 </refsection>
53</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/Polynom/H_freeAllocatedMatrixOfPoly.xml b/scilab/modules/api_scilab/help/en_US/Polynom/H_freeAllocatedMatrixOfPoly.xml
new file mode 100644
index 0000000..811602d
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/Polynom/H_freeAllocatedMatrixOfPoly.xml
@@ -0,0 +1,45 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="freeAllocatedSinglePoly"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>freeAllocatedSinglePoly</refname>
23
24 <refpurpose>
25 Free memory allocated by getAllocatedSinglePoly function.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>void freeAllocatedSinglePoly(double* _pdblReal)</synopsis>
31 </refsynopsisdiv>
32 <refsection>
33 <title>Parameters</title>
34 <variablelist>
35 <varlistentry>
36 <term>_pdblReal</term>
37 <listitem>
38 <para>
39 Pointer "_pdblReal" allocated by getAllocatedSinglePoly.
40 </para>
41 </listitem>
42 </varlistentry>
43 </variablelist>
44 </refsection>
45</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/Polynom/I_freeAllocatedMatrixOfComplexPoly.xml b/scilab/modules/api_scilab/help/en_US/Polynom/I_freeAllocatedMatrixOfComplexPoly.xml
new file mode 100644
index 0000000..811602d
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/Polynom/I_freeAllocatedMatrixOfComplexPoly.xml
@@ -0,0 +1,45 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="freeAllocatedSinglePoly"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>freeAllocatedSinglePoly</refname>
23
24 <refpurpose>
25 Free memory allocated by getAllocatedSinglePoly function.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>void freeAllocatedSinglePoly(double* _pdblReal)</synopsis>
31 </refsynopsisdiv>
32 <refsection>
33 <title>Parameters</title>
34 <variablelist>
35 <varlistentry>
36 <term>_pdblReal</term>
37 <listitem>
38 <para>
39 Pointer "_pdblReal" allocated by getAllocatedSinglePoly.
40 </para>
41 </listitem>
42 </varlistentry>
43 </variablelist>
44 </refsection>
45</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/Polynom/J_polyExample.xml b/scilab/modules/api_scilab/help/en_US/Polynom/J_polyExample.xml
new file mode 100644
index 0000000..e6040b6
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/Polynom/J_polyExample.xml
@@ -0,0 +1,183 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="polyExample"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20 <refnamediv>
21 <refname>polynom example</refname>
22
23 <refpurpose>
24 Polynom use case.
25 </refpurpose>
26 </refnamediv>
27
28 <refsection>
29 <title>Description</title>
30 <para>This example shows how to get a polynom variable and return it to Scilab.</para>
31 </refsection>
32 <refsection>
33 <!--File_gateway: SCI/modules/api_scilab/tests/unit_tests/polyExample.c-->
34 <!--File_scilab: SCI/modules/api_scilab/tests/unit_tests/polyExample.tst-->
35 <!--Lib_name: polyExample-->
36 <!--Func_list: polyExample-->
37 <title>Gateway Source</title>
38 <programlisting role="code_gateway">
39 <![CDATA[
40int polyExample(char *fname,unsigned long fname_len)
41{
42 SciErr sciErr;
43 int* piAddr = NULL;
44 int iType = 0;
45 int iRet = 0;
46
47 CheckRhs(1,1);
48 CheckLhs(0,1);
49
50 sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddr);
51 if(sciErr.iErr)
52 {
53 printError(&sciErr, 0);
54 return 0;
55 }
56
57 if(isPolyType(pvApiCtx, piAddr))
58 {
59 char pstVarName[64];
60 int iLen = 0;
61
62 sciErr = getPolyVariableName(pvApiCtx, piAddr, pstVarName, &iLen);
63 if(sciErr.iErr)
64 {
65 printError(&sciErr, 0);
66 return sciErr.iErr;
67 }
68
69 if(isScalar(pvApiCtx, piAddr))
70 {
71 int iNbCoef = 0;
72 double* pdblReal = NULL;
73 double* pdblImg = NULL;
74
75 if(isVarComplex(pvApiCtx, piAddr))
76 {
77 iRet = getAllocatedSingleComplexPoly(pvApiCtx, piAddr, &iNbCoef, &pdblReal, &pdblImg);
78 if(iRet)
79 {
80 freeAllocatedSingleComplexPoly(pdblReal, pdblImg);
81 return iRet;
82 }
83
84 sciErr = createComplexMatrixOfPoly(pvApiCtx, Rhs + 1, pstVarName, 1, 1, &iNbCoef, &pdblReal, &pdblImg);
85 if(sciErr.iErr)
86 {
87 freeAllocatedSingleComplexPoly(pdblReal, pdblImg);
88 printError(&sciErr, 0);
89 return sciErr.iErr;
90 }
91 freeAllocatedSingleComplexPoly(pdblReal, pdblImg);
92 }
93 else
94 {
95 iRet = getAllocatedSinglePoly(pvApiCtx, piAddr, &iNbCoef, &pdblReal);
96 if(iRet)
97 {
98 freeAllocatedSinglePoly(pdblReal);
99 return iRet;
100 }
101
102 sciErr = createMatrixOfPoly(pvApiCtx, Rhs + 1, pstVarName, 1, 1, &iNbCoef, &pdblReal);
103 if(sciErr.iErr)
104 {
105 freeAllocatedSinglePoly(pdblReal);
106 printError(&sciErr, 0);
107 return sciErr.iErr;
108 }
109 freeAllocatedSinglePoly(pdblReal);
110 }
111 }
112 else
113 {
114 int iRows = 0;
115 int iCols = 0;
116 int* piNbCoef = NULL;
117 double** pdblReal = NULL;
118 double** pdblImg = NULL;
119
120 if(isVarComplex(pvApiCtx, piAddr))
121 {
122 iRet = getAllocatedMatrixOfComplexPoly(pvApiCtx, piAddr, &iRows, &iCols, &piNbCoef, &pdblReal, &pdblImg);
123 if(iRet)
124 {
125 freeAllocatedMatrixOfComplexPoly(iRows, iCols, piNbCoef, pdblReal, pdblImg);
126 return iRet;
127 }
128
129 sciErr = createComplexMatrixOfPoly(pvApiCtx, Rhs + 1, pstVarName, iRows, iCols, piNbCoef, pdblReal, pdblImg);
130 if(sciErr.iErr)
131 {
132 freeAllocatedMatrixOfComplexPoly(iRows, iCols, piNbCoef, pdblReal, pdblImg);
133 printError(&sciErr, 0);
134 return sciErr.iErr;
135 }
136 freeAllocatedMatrixOfComplexPoly(iRows, iCols, piNbCoef, pdblReal, pdblImg);
137 }
138 else
139 {
140 iRet = getAllocatedMatrixOfPoly(pvApiCtx, piAddr, &iRows, &iCols, &piNbCoef, &pdblReal);
141 if(iRet)
142 {
143 freeAllocatedMatrixOfPoly(iRows, iCols, piNbCoef, pdblReal);
144 return iRet;
145 }
146
147 sciErr = createMatrixOfPoly(pvApiCtx, Rhs + 1, pstVarName, iRows, iCols, piNbCoef, pdblReal);
148 if(sciErr.iErr)
149 {
150 freeAllocatedMatrixOfPoly(iRows, iCols, piNbCoef, pdblReal);
151 printError(&sciErr, 0);
152 return sciErr.iErr;
153 }
154 freeAllocatedMatrixOfPoly(iRows, iCols, piNbCoef, pdblReal);
155 }
156 }
157 LhsVar(1) = Rhs + 1;
158 }
159 else
160 {
161 LhsVar(1) = 0;
162 }
163 return 0;
164}
165 ]]>
166 </programlisting>
167 </refsection>
168 <refsection>
169 <title>Scilab test script</title>
170 <programlisting role="code_scilab">
171 <![CDATA[
172a = %s;
173b = (2 + 3*%i) * %s;
174c = [a, 2*a, 3*a;4*a, 5*a, 6*a];
175d = [c + c * %i];
176if polyExample(a) <> a then pause, end
177if polyExample(b) <> b then pause, end
178if polyExample(c) <> c then pause, end
179if polyExample(d) <> d then pause, end
180 ]]>
181 </programlisting>
182 </refsection>
183</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/Sparse/A_isSparseType.xml b/scilab/modules/api_scilab/help/en_US/Sparse/A_isSparseType.xml
new file mode 100644
index 0000000..e15e869
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/Sparse/A_isSparseType.xml
@@ -0,0 +1,57 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="isSparseType"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>isSparseType</refname>
23
24 <refpurpose>
25 Check if it is a sparse variable.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>int isSparseType(void* _pvCtx, int* _piAddress)</synopsis>
31 </refsynopsisdiv>
32 <refsection>
33 <title>Parameters</title>
34 <variablelist>
35 <varlistentry>
36 <term>_pvCtx</term>
37 <listitem>
38 <para>
39 Scilab environment pointer, pass in "pvApiCtx" provided by api_scilab.h.
40 </para>
41 </listitem>
42 </varlistentry>
43 <varlistentry>
44 <term>_piAddress</term>
45 <listitem>
46 <para>
47 Position in the Scilab memory where you want to put the variable.
48 </para>
49 </listitem>
50 </varlistentry>
51 </variablelist>
52 </refsection>
53 <refsection>
54 <title>Return value</title>
55 <para>1 if variable is a sparse type, otherwise 0</para>
56 </refsection>
57</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/Sparse/B_getAllocatedSparseMatrix.xml b/scilab/modules/api_scilab/help/en_US/Sparse/B_getAllocatedSparseMatrix.xml
new file mode 100644
index 0000000..498a28c
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/Sparse/B_getAllocatedSparseMatrix.xml
@@ -0,0 +1,105 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="getAllocatedSparseMatrix"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>getAllocatedSparseMatrix</refname>
23
24 <refpurpose>
25 Get sparse matrix variable.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>int getAllocatedSparseMatrix(void* _pvCtx, int* _piAddress, int* _piRows, int* _piCols, int* _piNbItem, int** _piNbItemRow, int** _piColPos, double** _pdblReal)</synopsis>
31 </refsynopsisdiv>
32 <refsection>
33 <title>Parameters</title>
34 <variablelist>
35 <varlistentry>
36 <term>_pvCtx</term>
37 <listitem>
38 <para>
39 Scilab environment pointer, pass in "pvApiCtx" provided by api_scilab.h.
40 </para>
41 </listitem>
42 </varlistentry>
43 <varlistentry>
44 <term>_piAddress</term>
45 <listitem>
46 <para>
47 Address of the Scilab variable.
48 </para>
49 </listitem>
50 </varlistentry>
51 <varlistentry>
52 <term>_piRows</term>
53 <listitem>
54 <para>
55 Return number of rows.
56 </para>
57 </listitem>
58 </varlistentry>
59 <varlistentry>
60 <term>_piCols</term>
61 <listitem>
62 <para>
63 Return number of columns.
64 </para>
65 </listitem>
66 </varlistentry>
67 <varlistentry>
68 <term>_piNbItem</term>
69 <listitem>
70 <para>
71 Return number of non zero value.
72 </para>
73 </listitem>
74 </varlistentry>
75 <varlistentry>
76 <term>_piNbItemRow</term>
77 <listitem>
78 <para>
79 Return number of item in each rows.
80 </para>
81 </listitem>
82 </varlistentry>
83 <varlistentry>
84 <term>_piColPos</term>
85 <listitem>
86 <para>
87 Return column position for each item.
88 </para>
89 </listitem>
90 </varlistentry>
91 <varlistentry>
92 <term>_pdblReal</term>
93 <listitem>
94 <para>
95 Return address of real data array.
96 </para>
97 </listitem>
98 </varlistentry>
99 </variablelist>
100 </refsection>
101 <refsection>
102 <title>Return value</title>
103 <para>if successful 0, otherwise print error(s) message(s) in the Scilab console and returns first error number.</para>
104 </refsection>
105</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/Sparse/C_getAllocatedComplexSparseMatrix.xml b/scilab/modules/api_scilab/help/en_US/Sparse/C_getAllocatedComplexSparseMatrix.xml
new file mode 100644
index 0000000..a28aa43
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/Sparse/C_getAllocatedComplexSparseMatrix.xml
@@ -0,0 +1,113 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="getAllocatedComplexSparseMatrix"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>getAllocatedComplexSparseMatrix</refname>
23
24 <refpurpose>
25 Get complex sparse matrix variable.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>int getAllocatedComplexSparseMatrix(void* _pvCtx, int* _piAddress, int* _piRows, int* _piCols, int* _piNbItem, int** _piNbItemRow, int** _piColPos, double** _pdblReal, double** _pdblImg)</synopsis>
31 </refsynopsisdiv>
32 <refsection>
33 <title>Parameters</title>
34 <variablelist>
35 <varlistentry>
36 <term>_pvCtx</term>
37 <listitem>
38 <para>
39 Scilab environment pointer, pass in "pvApiCtx" provided by api_scilab.h.
40 </para>
41 </listitem>
42 </varlistentry>
43 <varlistentry>
44 <term>_piAddress</term>
45 <listitem>
46 <para>
47 Address of the Scilab variable.
48 </para>
49 </listitem>
50 </varlistentry>
51 <varlistentry>
52 <term>_piRows</term>
53 <listitem>
54 <para>
55 Return number of rows.
56 </para>
57 </listitem>
58 </varlistentry>
59 <varlistentry>
60 <term>_piCols</term>
61 <listitem>
62 <para>
63 Return number of columns.
64 </para>
65 </listitem>
66 </varlistentry>
67 <varlistentry>
68 <term>_piNbItem</term>
69 <listitem>
70 <para>
71 Return number of non zero value.
72 </para>
73 </listitem>
74 </varlistentry>
75 <varlistentry>
76 <term>_piNbItemRow</term>
77 <listitem>
78 <para>
79 Return number of item in each rows.
80 </para>
81 </listitem>
82 </varlistentry>
83 <varlistentry>
84 <term>_piColPos</term>
85 <listitem>
86 <para>
87 Return column position for each item.
88 </para>
89 </listitem>
90 </varlistentry>
91 <varlistentry>
92 <term>_pdblReal</term>
93 <listitem>
94 <para>
95 Return address of real data array.
96 </para>
97 </listitem>
98 </varlistentry>
99 <varlistentry>
100 <term>_pdblImg</term>
101 <listitem>
102 <para>
103 Return address of imaginary data array (size: _iCols * _iRows)
104 </para>
105 </listitem>
106 </varlistentry>
107 </variablelist>
108 </refsection>
109 <refsection>
110 <title>Return value</title>
111 <para>if successful 0, otherwise print error(s) message(s) in the Scilab console and returns first error number.</para>
112 </refsection>
113</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/Sparse/D_freeAllocatedSparseMatrix.xml b/scilab/modules/api_scilab/help/en_US/Sparse/D_freeAllocatedSparseMatrix.xml
new file mode 100644
index 0000000..4618e96
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/Sparse/D_freeAllocatedSparseMatrix.xml
@@ -0,0 +1,61 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="freeAllocatedSparseMatrix"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>freeAllocatedSparseMatrix</refname>
23
24 <refpurpose>
25 Free memory allocated by getAllocatedSparseMatrix function.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>void freeAllocatedSparseMatrix(int* _piNbItemRows, int* _piColPos, double* _pdblReal)</synopsis>
31 </refsynopsisdiv>
32 <refsection>
33 <title>Parameters</title>
34 <variablelist>
35 <varlistentry>
36 <term>_piNbItemRows</term>
37 <listitem>
38 <para>
39 Pointer "_piNbItemRows" allocated by getAllocatedSparseMatrix.
40 </para>
41 </listitem>
42 </varlistentry>
43 <varlistentry>
44 <term>_piColPos</term>
45 <listitem>
46 <para>
47 Pointer "_piColPos" allocated by getAllocatedSparseMatrix.
48 </para>
49 </listitem>
50 </varlistentry>
51 <varlistentry>
52 <term>_pdblReal</term>
53 <listitem>
54 <para>
55 Pointer "_pdblReal" allocated by getAllocatedSparseMatrix.
56 </para>
57 </listitem>
58 </varlistentry>
59 </variablelist>
60 </refsection>
61</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/Sparse/E_freeAllocatedComplexSparseMatrix.xml b/scilab/modules/api_scilab/help/en_US/Sparse/E_freeAllocatedComplexSparseMatrix.xml
new file mode 100644
index 0000000..6fe4220
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/Sparse/E_freeAllocatedComplexSparseMatrix.xml
@@ -0,0 +1,69 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="freeAllocatedComplexSparseMatrix"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>freeAllocatedComplexSparseMatrix</refname>
23
24 <refpurpose>
25 Free memory allocated by getAllocatedComplexSparseMatrix function.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>void freeAllocatedComplexSparseMatrix(int* _piNbItemRows, int* _piColPos, double* _pdblReal, double* _pdblImg)</synopsis>
31 </refsynopsisdiv>
32 <refsection>
33 <title>Parameters</title>
34 <variablelist>
35 <varlistentry>
36 <term>_piNbItemRows</term>
37 <listitem>
38 <para>
39 Pointer "_piNbItemRows" allocated by getAllocatedComplexSparseMatrix.
40 </para>
41 </listitem>
42 </varlistentry>
43 <varlistentry>
44 <term>_piColPos</term>
45 <listitem>
46 <para>
47 Pointer "_piColPos" allocated by getAllocatedComplexSparseMatrix.
48 </para>
49 </listitem>
50 </varlistentry>
51 <varlistentry>
52 <term>_pdblReal</term>
53 <listitem>
54 <para>
55 Pointer "_pdblReal" allocated by getAllocatedComplexSparseMatrix.
56 </para>
57 </listitem>
58 </varlistentry>
59 <varlistentry>
60 <term>_pdblImg</term>
61 <listitem>
62 <para>
63 Pointer "_pdblImg" allocated by getAllocatedComplexSparseMatrix.
64 </para>
65 </listitem>
66 </varlistentry>
67 </variablelist>
68 </refsection>
69</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/Sparse/F_sparseExample.xml b/scilab/modules/api_scilab/help/en_US/Sparse/F_sparseExample.xml
new file mode 100644
index 0000000..05e6340
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/Sparse/F_sparseExample.xml
@@ -0,0 +1,125 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="sparseExample"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20 <refnamediv>
21 <refname>sparse example</refname>
22
23 <refpurpose>
24 Sparse use case.
25 </refpurpose>
26 </refnamediv>
27
28 <refsection>
29 <title>Description</title>
30 <para>This example shows how to get a sparse variable and return it to Scilab.</para>
31 </refsection>
32 <refsection>
33 <!--File_gateway: SCI/modules/api_scilab/tests/unit_tests/sparseExample.c-->
34 <!--File_scilab: SCI/modules/api_scilab/tests/unit_tests/sparseExample.tst-->
35 <!--Lib_name: sparseExample-->
36 <!--Func_list: sparseExample-->
37 <title>Gateway Source</title>
38 <programlisting role="code_gateway">
39 <![CDATA[
40int sparseExample(char *fname,unsigned long fname_len)
41{
42 SciErr sciErr;
43 int* piAddr = NULL;
44 int iType = 0;
45 int iRet = 0;
46
47 CheckRhs(1,1);
48 CheckLhs(0,1);
49
50 sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddr);
51 if(sciErr.iErr)
52 {
53 printError(&sciErr, 0);
54 return 0;
55 }
56
57 if(isSparseType(pvApiCtx, piAddr))
58 {
59 int iRows = 0;
60 int iCols = 0;
61 int iNbItem = 0;
62 int* piNbItemRow = NULL;
63 int* piColPos = NULL;
64 double* pdblReal = NULL;
65 double* pdblImg = NULL;
66
67 if(isVarComplex(pvApiCtx, piAddr))
68 {
69 iRet = getAllocatedComplexSparseMatrix(pvApiCtx, piAddr, &iRows, &iCols, &iNbItem, &piNbItemRow, &piColPos, &pdblReal, &pdblImg);
70 if(iRet)
71 {
72 freeAllocatedComplexSparseMatrix(piNbItemRow, piColPos, pdblReal, pdblImg);
73 return iRet;
74 }
75
76 sciErr = createComplexSparseMatrix(pvApiCtx, Rhs + 1, iRows, iCols, iNbItem, piNbItemRow, piColPos, pdblReal, pdblImg);
77 if(sciErr.iErr)
78 {
79 freeAllocatedComplexSparseMatrix(piNbItemRow, piColPos, pdblReal, pdblImg);
80 printError(&sciErr, 0);
81 return sciErr.iErr;
82 }
83 freeAllocatedComplexSparseMatrix(piNbItemRow, piColPos, pdblReal, pdblImg);
84 }
85 else
86 {
87 iRet = getAllocatedSparseMatrix(pvApiCtx, piAddr, &iRows, &iCols, &iNbItem, &piNbItemRow, &piColPos, &pdblReal);
88 if(iRet)
89 {
90 freeAllocatedSparseMatrix(piNbItemRow, piColPos, pdblReal);
91 return iRet;
92 }
93
94 sciErr = createSparseMatrix(pvApiCtx, Rhs + 1, iRows, iCols, iNbItem, piNbItemRow, piColPos, pdblReal);
95 if(sciErr.iErr)
96 {
97 freeAllocatedSparseMatrix(piNbItemRow, piColPos, pdblReal);
98 printError(&sciErr, 0);
99 return sciErr.iErr;
100 }
101 freeAllocatedSparseMatrix(piNbItemRow, piColPos, pdblReal);
102 }
103 LhsVar(1) = Rhs + 1;
104 }
105 else
106 {
107 LhsVar(1) = 0;
108 }
109 return 0;
110}
111 ]]>
112 </programlisting>
113 </refsection>
114 <refsection>
115 <title>Scilab test script</title>
116 <programlisting role="code_scilab">
117 <![CDATA[
118a = sparse([1,1;2,2;3,3], [1, 2, 3]);
119b = sparse([1,1;2,2;3,3], [1 + 2 * %i, 3 , -4 * %i]);
120if sparseExample(a) <> a then pause;end
121if sparseExample(b) <> b then pause;end
122 ]]>
123 </programlisting>
124 </refsection>
125</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/String/A_isStringType.xml b/scilab/modules/api_scilab/help/en_US/String/A_isStringType.xml
new file mode 100644
index 0000000..d1413d3
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/String/A_isStringType.xml
@@ -0,0 +1,57 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="isStringType"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>isStringType</refname>
23
24 <refpurpose>
25 Check if it is a string variable.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>int isStringType(void* _pvCtx, int* _piAddress)</synopsis>
31 </refsynopsisdiv>
32 <refsection>
33 <title>Parameters</title>
34 <variablelist>
35 <varlistentry>
36 <term>_pvCtx</term>
37 <listitem>
38 <para>
39 Scilab environment pointer, pass in "pvApiCtx" provided by api_scilab.h.
40 </para>
41 </listitem>
42 </varlistentry>
43 <varlistentry>
44 <term>_piAddress</term>
45 <listitem>
46 <para>
47 Address of the Scilab variable.
48 </para>
49 </listitem>
50 </varlistentry>
51 </variablelist>
52 </refsection>
53 <refsection>
54 <title>Return value</title>
55 <para>1 if variable is a string type, otherwise 0</para>
56 </refsection>
57</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/String/B_getAllocatedSingleString.xml b/scilab/modules/api_scilab/help/en_US/String/B_getAllocatedSingleString.xml
new file mode 100644
index 0000000..369e36a
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/String/B_getAllocatedSingleString.xml
@@ -0,0 +1,74 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="getAllocatedSingleString"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>getAllocatedSingleString</refname>
23
24 <refpurpose>
25 Get single string variable.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>int getAllocatedSingleString(void* _pvCtx, int* _piAddress, char** _pstData)</synopsis>
31 <synopsis xml:id="getAllocatedSingleWideString">int getAllocatedSingleWideString(void* _pvCtx, int* _piAddress, wchar_t** _pwstData)</synopsis>
32 </refsynopsisdiv>
33 <refsection>
34 <title>Parameters</title>
35 <variablelist>
36 <varlistentry>
37 <term>_pvCtx</term>
38 <listitem>
39 <para>
40 Scilab environment pointer, pass in "pvApiCtx" provided by api_scilab.h.
41 </para>
42 </listitem>
43 </varlistentry>
44 <varlistentry>
45 <term>_piAddress</term>
46 <listitem>
47 <para>
48 Address of the Scilab variable.
49 </para>
50 </listitem>
51 </varlistentry>
52 <varlistentry>
53 <term>_pstData</term>
54 <listitem>
55 <para>
56 Return string address.
57 </para>
58 </listitem>
59 </varlistentry>
60 <varlistentry>
61 <term>_pwstData</term>
62 <listitem>
63 <para>
64 Return wide string address.
65 </para>
66 </listitem>
67 </varlistentry>
68 </variablelist>
69 </refsection>
70 <refsection>
71 <title>Return value</title>
72 <para>if successful 0, otherwise print error(s) message(s) in the Scilab console and returns first error number.</para>
73 </refsection>
74</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/String/C_getAllocatedMatrixOfString.xml b/scilab/modules/api_scilab/help/en_US/String/C_getAllocatedMatrixOfString.xml
new file mode 100644
index 0000000..2acfaad
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/String/C_getAllocatedMatrixOfString.xml
@@ -0,0 +1,90 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="getAllocatedMatrixOfString"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>getAllocatedMatrixOfString</refname>
23
24 <refpurpose>
25 Get matrix of polynom variable.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>int getAllocatedMatrixOfString(void* _pvCtx, int* _piAddress, int* _piRows, int* _piCols, char*** _pstData)</synopsis>
31 <synopsis xml:id="getAllocatedMatrixOfWideString">int getAllocatedMatrixOfWideString(void* _pvCtx, int* _piAddress, int* _piRows, int* _piCols, wchar_t*** _pwstData)</synopsis>
32 </refsynopsisdiv>
33 <refsection>
34 <title>Parameters</title>
35 <variablelist>
36 <varlistentry>
37 <term>_pvCtx</term>
38 <listitem>
39 <para>
40 Scilab environment pointer, pass in "pvApiCtx" provided by api_scilab.h.
41 </para>
42 </listitem>
43 </varlistentry>
44 <varlistentry>
45 <term>_piAddress</term>
46 <listitem>
47 <para>
48 Address of the Scilab variable.
49 </para>
50 </listitem>
51 </varlistentry>
52 <varlistentry>
53 <term>_piRows</term>
54 <listitem>
55 <para>
56 Return number of rows.
57 </para>
58 </listitem>
59 </varlistentry>
60 <varlistentry>
61 <term>_piCols</term>
62 <listitem>
63 <para>
64 Return number of columns.
65 </para>
66 </listitem>
67 </varlistentry>
68 <varlistentry>
69 <term>_pstData</term>
70 <listitem>
71 <para>
72 Return array of string
73 </para>
74 </listitem>
75 </varlistentry>
76 <varlistentry>
77 <term>_pwstData</term>
78 <listitem>
79 <para>
80 Return array of wide string.
81 </para>
82 </listitem>
83 </varlistentry>
84 </variablelist>
85 </refsection>
86 <refsection>
87 <title>Return value</title>
88 <para>if successful 0, otherwise print error(s) message(s) in the Scilab console and returns first error number.</para>
89 </refsection>
90</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/String/D_createSingleString.xml b/scilab/modules/api_scilab/help/en_US/String/D_createSingleString.xml
new file mode 100644
index 0000000..0f9e3c7
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/String/D_createSingleString.xml
@@ -0,0 +1,74 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="createSingleString"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>createSingleString</refname>
23
24 <refpurpose>
25 create a single string variable.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>int createSingleString(void* _pvCtx, int _iVar, char* _pstStrings)</synopsis>
31 <synopsis xml:id="createSingleWideString">int createSingleWideString(void* _pvCtx, int _iVar, wchar_t* _pwstStrings)</synopsis>
32 </refsynopsisdiv>
33 <refsection>
34 <title>Parameters</title>
35 <variablelist>
36 <varlistentry>
37 <term>_pvCtx</term>
38 <listitem>
39 <para>
40 Scilab environment pointer, pass in "pvApiCtx" provided by api_scilab.h.
41 </para>
42 </listitem>
43 </varlistentry>
44 <varlistentry>
45 <term>_iVar</term>
46 <listitem>
47 <para>
48 Position in the Scilab memory where you want to put the variable
49 </para>
50 </listitem>
51 </varlistentry>
52 <varlistentry>
53 <term>_pstStrings</term>
54 <listitem>
55 <para>
56 Address of string.
57 </para>
58 </listitem>
59 </varlistentry>
60 <varlistentry>
61 <term>_pwstStrings</term>
62 <listitem>
63 <para>
64 Address of wide string.
65 </para>
66 </listitem>
67 </varlistentry>
68 </variablelist>
69 </refsection>
70 <refsection>
71 <title>Return value</title>
72 <para>if successful 0, otherwise print error(s) message(s) in the Scilab console and returns first error number.</para>
73 </refsection>
74</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/String/E_freeAllocatedSingleString.xml b/scilab/modules/api_scilab/help/en_US/String/E_freeAllocatedSingleString.xml
new file mode 100644
index 0000000..4fb55cd
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/String/E_freeAllocatedSingleString.xml
@@ -0,0 +1,54 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="freeAllocatedSingleString"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>freeAllocatedSingleString</refname>
23
24 <refpurpose>
25 Free memory allocated by getAllocatedSinglePoly function.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>void freeAllocatedSingleString(char* _pstData)</synopsis>
31 <synopsis xml:id="freeAllocatedSingleWideString">void freeAllocatedSingleWideString(wchar_t* _pwstData)</synopsis>
32 </refsynopsisdiv>
33 <refsection>
34 <title>Parameters</title>
35 <variablelist>
36 <varlistentry>
37 <term>_pstData</term>
38 <listitem>
39 <para>
40 Pointer "_pstData" allocated by getAllocatedSingleString.
41 </para>
42 </listitem>
43 </varlistentry>
44 <varlistentry>
45 <term>_pwstData</term>
46 <listitem>
47 <para>
48 Pointer "_pwstData" allocated by getAllocatedSingleWideString.
49 </para>
50 </listitem>
51 </varlistentry>
52 </variablelist>
53 </refsection>
54</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/String/F_freeAllocatedMatrixOfString.xml b/scilab/modules/api_scilab/help/en_US/String/F_freeAllocatedMatrixOfString.xml
new file mode 100644
index 0000000..5c55aa5
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/String/F_freeAllocatedMatrixOfString.xml
@@ -0,0 +1,70 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="freeAllocatedMatrixOfString"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20
21 <refnamediv>
22 <refname>freeAllocatedMatrixOfString</refname>
23
24 <refpurpose>
25 Free memory allocated by freeAllocatedMatrixOfString function.
26 </refpurpose>
27 </refnamediv>
28 <refsynopsisdiv>
29 <title>Calling Sequence</title>
30 <synopsis>void freeAllocatedMatrixOfString(int _iRows, int _iCols, char** _pstData)</synopsis>
31 <synopsis xml:id="">void freeAllocatedMatrixOfWideString(int _iRows, int _iCols, wchar_t** _pwstData)</synopsis>
32 </refsynopsisdiv>
33 <refsection>
34 <title>Parameters</title>
35 <variablelist>
36 <varlistentry>
37 <term>_iRows</term>
38 <listitem>
39 <para>
40 Value "_piRows" returns by freeAllocatedMatrixOfString.
41 </para>
42 </listitem>
43 </varlistentry>
44 <varlistentry>
45 <term>_iCols</term>
46 <listitem>
47 <para>
48 Value "_piCols" returns by freeAllocatedMatrixOfString.
49 </para>
50 </listitem>
51 </varlistentry>
52 <varlistentry>
53 <term>_pstData</term>
54 <listitem>
55 <para>
56 Pointer "_pstData" allocated by freeAllocatedMatrixOfString.
57 </para>
58 </listitem>
59 </varlistentry>
60 <varlistentry>
61 <term>_pwstData</term>
62 <listitem>
63 <para>
64 Pointer "_pwstData" allocated by freeAllocatedWideMatrixOfString.
65 </para>
66 </listitem>
67 </varlistentry>
68 </variablelist>
69 </refsection>
70</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/String/G_stringExample.xml b/scilab/modules/api_scilab/help/en_US/String/G_stringExample.xml
new file mode 100644
index 0000000..09d5f51
--- /dev/null
+++ b/scilab/modules/api_scilab/help/en_US/String/G_stringExample.xml
@@ -0,0 +1,123 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Antoine ELIAS
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<refentry version="5.0-subset Scilab" xml:id="stringExample"
14 xml:lang="en" xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns5="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
20 <refnamediv>
21 <refname>string example</refname>
22
23 <refpurpose>
24 String use case.
25 </refpurpose>
26 </refnamediv>
27
28 <refsection>
29 <title>Description</title>
30 <para>This example shows how to get a string variable and return it to Scilab.</para>
31 </refsection>
32 <refsection>
33 <!--File_gateway: SCI/modules/api_scilab/tests/unit_tests/stringExample.c-->
34 <!--File_scilab: SCI/modules/api_scilab/tests/unit_tests/stringExample.tst-->
35 <!--Lib_name: stringExample-->
36 <!--Func_list: stringExample-->
37 <title>Gateway Source</title>
38 <programlisting role="code_gateway">
39 <![CDATA[
40int stringExample(char *fname,unsigned long fname_len)
41{
42 SciErr sciErr;
43 int* piAddr = NULL;
44 int iType = 0;
45 int iRet = 0;
46
47 CheckRhs(1,1);
48 CheckLhs(0,1);
49
50 sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddr);
51 if(sciErr.iErr)
52 {
53 printError(&sciErr, 0);
54 return 0;
55 }
56
57 if(isStringType(pvApiCtx, piAddr))
58 {
59 if(isScalar(pvApiCtx, piAddr))
60 {
61 char* pstData = NULL;
62
63 iRet = getAllocatedSingleString(pvApiCtx, piAddr, &pstData);
64 if(iRet)
65 {
66 freeAllocatedSingleString(pstData);
67 return iRet;
68 }
69
70 iRet = createSingleString(pvApiCtx, Rhs + 1, pstData);
71 if(iRet)
72 {
73 freeAllocatedSingleString(pstData);
74 return iRet;
75 }
76 freeAllocatedSingleString(pstData);
77 }
78 else
79 {
80 int iRows = 0;
81 int iCols = 0;
82 char** pstData = NULL;
83
84 iRet = getAllocatedMatrixOfString(pvApiCtx, piAddr, &iRows, &iCols, &pstData);
85 if(iRet)
86 {
87 freeAllocatedMatrixOfString(iRows, iCols, pstData);
88 return iRet;
89 }
90
91 sciErr = createMatrixOfString(pvApiCtx, Rhs + 1, iRows, iCols, pstData);
92 if(sciErr.iErr)
93 {
94 freeAllocatedMatrixOfString(iRows, iCols, pstData);
95 printError(&sciErr, 0);
96 return sciErr.iErr;
97 }
98 freeAllocatedMatrixOfString(iRows, iCols, pstData);
99 }
100
101 LhsVar(1) = Rhs + 1;
102 }
103 else
104 {
105 LhsVar(1) = 0;
106 }
107 return 0;
108}
109 ]]>
110 </programlisting>
111 </refsection>
112 <refsection>
113 <title>Scilab test script</title>
114 <programlisting role="code_scilab">
115 <![CDATA[
116a = "Scilab";
117b = ["New","Scilab";"API","functions"];
118if stringExample(a) <> a then pause, end
119if stringExample(b) <> b then pause, end
120 ]]>
121 </programlisting>
122 </refsection>
123</refentry>
diff --git a/scilab/modules/api_scilab/src/cpp/api_poly.cpp b/scilab/modules/api_scilab/src/cpp/api_poly.cpp
index 3f2d5c1..595887b 100644
--- a/scilab/modules/api_scilab/src/cpp/api_poly.cpp
+++ b/scilab/modules/api_scilab/src/cpp/api_poly.cpp
@@ -491,7 +491,7 @@ static int getCommonAllocatedMatrixOfPoly(void* _pvCtx, int* _piAddress, int _iC
491 } 491 }
492 } 492 }
493 493
494 sciErr = getCommonMatrixOfPoly(_pvCtx, _piAddress, _iComplex, _piRows, _piCols, *_piNbCoef, *_pdblReal, *_pdblImg); 494 sciErr = getCommonMatrixOfPoly(_pvCtx, _piAddress, _iComplex, _piRows, _piCols, *_piNbCoef, *_pdblReal, _pdblImg == NULL ? NULL : *_pdblImg);
495 if(sciErr.iErr) 495 if(sciErr.iErr)
496 { 496 {
497 addErrorMessage(&sciErr, API_ERROR_GET_ALLOC_MATRIX_POLY, _("%s: Unable to get argument #%d"), _iComplex ? "getAllocatedSingleComplexPoly" : "getAllocatedSinglePoly", getRhsFromAddress(_pvCtx, _piAddress)); 497 addErrorMessage(&sciErr, API_ERROR_GET_ALLOC_MATRIX_POLY, _("%s: Unable to get argument #%d"), _iComplex ? "getAllocatedSingleComplexPoly" : "getAllocatedSinglePoly", getRhsFromAddress(_pvCtx, _piAddress));
@@ -555,7 +555,7 @@ static int getCommonAllocatedNamedMatrixOfPoly(void* _pvCtx, char* _pstName, int
555 } 555 }
556 } 556 }
557 557
558 sciErr = readCommonNamedMatrixOfPoly(_pvCtx, _pstName, _iComplex, _piRows, _piCols, *_piNbCoef, *_pdblReal, *_pdblImg); 558 sciErr = readCommonNamedMatrixOfPoly(_pvCtx, _pstName, _iComplex, _piRows, _piCols, *_piNbCoef, *_pdblReal, _pdblImg == NULL ? NULL : *_pdblImg);
559 if(sciErr.iErr) 559 if(sciErr.iErr)
560 { 560 {
561 addErrorMessage(&sciErr, API_ERROR_GET_ALLOC_NAMED_MATRIX_POLY, _("%s: Unable to get argument \"%s\""), _iComplex ? "getAllocatedNamedMatrixOfComplexPoly" : "getAllocatedNamedMatrixOfPoly", _pstName); 561 addErrorMessage(&sciErr, API_ERROR_GET_ALLOC_NAMED_MATRIX_POLY, _("%s: Unable to get argument \"%s\""), _iComplex ? "getAllocatedNamedMatrixOfComplexPoly" : "getAllocatedNamedMatrixOfPoly", _pstName);