+; Scilab ( http://mwww.scilab.org/ ) - This file is part of Scilab
+; Copyright (C) 2007-2008 - INRIA - Allan CORNET
+;
+; This file must be used under the terms of the CeCILL.
+; This source file is licensed as described in the file COPYING, which
+; you should have received as part of this distribution. The terms
+; are also available at
+; http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+
;##############################################################################################################
; Script d'installation Inno Setup (5.2.1) pour scilab
-; Allan CORNET
; Version TRUNK
-; Copyright INRIA 2007
;##############################################################################################################
;--------------------------------------------------------------------------------------------------------------
; data_structures module
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2006-2008 - INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+
// ====================================================================
-// This file contains command to be executed at the end
+// This file contains command to be executed at the end
// of a scilab session for data_structures module
-// Copyright INRIA 2006
// ====================================================================
// delete help chapter
del_help_chapter('data_structures',%T);
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2006-2008 - INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+
// ====================================================================
-// data_structures module initialisation file
-// Copyright INRIA 2006
+// data_structures module initialisation file
// ====================================================================
//Load functions librarie
load('SCI/modules/data_structures/macros/lib');
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2007-2008 - INRIA - Allan CORNET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+
// ====================================================================
// help data_structures module
// Add chapter
-// Copyright INRIA 2007
-// Allan CORNET
// ====================================================================
path = SCI+'/modules/data_structures/help/'+getdefaultlanguage();
add_help_chapter("Data Structures",path,%T);
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007-2008 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
<!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">
<MAN>
<LANGUAGE>eng</LANGUAGE>
//sub-cell reference
b(1) // result is a cell
-b(1:2)
+b(1:2)
b(1).entries //result is an array
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
<!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">
<MAN>
<LANGUAGE>eng</LANGUAGE>
</DESCRIPTION>
<EXAMPLE>
<![CDATA[
-l=list(1);l(3)=5
+l=list(1);l(3)=5
k=definedfields(l)
t=tlist('x');t(5)=4
definedfields(t)
-m=mlist(['m','a','b']);m.b='sdfgfgd'
-definedfields(m)
+m=mlist(['m','a','b']);m.b='sdfgfgd'
+definedfields(m)
]]>
</EXAMPLE>
<SEE_ALSO>
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
<!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">
<MAN>
<LANGUAGE>eng</LANGUAGE>
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007-2008 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
<!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">
<MAN>
<LANGUAGE>eng</LANGUAGE>
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007-2008 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
<!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">
<MAN>
<LANGUAGE>eng</LANGUAGE>
size(a)
-a(:,:,1) //dimensionnality reduction
+a(:,:,1) //dimensionnality reduction
type(a(:,:,1))
[a a]
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
<!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">
<MAN>
<LANGUAGE>eng</LANGUAGE>
<TYPE>Scilab Function</TYPE>
<DATE>$LastChangedDate$</DATE>
<SHORT_DESCRIPTION name="list"> Scilab object and list function definition</SHORT_DESCRIPTION>
-
+
<CALLING_SEQUENCE>
<CALLING_SEQUENCE_ITEM>list(a1,....an) </CALLING_SEQUENCE_ITEM>
</CALLING_SEQUENCE>
-
+
<DESCRIPTION>
<P>
- Creates a <VERB>list</VERB> with elements <VERB>ai</VERB>'s which are arbitrary Scilab
+ Creates a <VERB>list</VERB> with elements <VERB>ai</VERB>'s which are arbitrary Scilab
objects (<VERB>matrix, list,...</VERB>). Type of <VERB>list</VERB> objects is 15.
<TT>list()</TT> creates the empty <VERB>list</VERB> (0 element).
</P>
</DESCRIPTION>
-
+
<SECTION label="Operations on lists">
<ITEMIZE>
<ITEM label="extraction">
- <SP>: <TT>[x,y,z...]=L(v)</TT> where <TT>v</TT> is a vector of indices;
+ <SP>: <TT>[x,y,z...]=L(v)</TT> where <TT>v</TT> is a vector of indices;
<TT>[x,y,z]=L(:)</TT> extracts all the elements.</SP>
</ITEM>
<ITEM label="insertion at index i">
<SP>: <TT>L3 = lstcat(L1,L2)</TT>.</SP>
</ITEM>
<ITEM label="number of elements of a list">
- <SP>: you can use either <TT>nb_elm = size(L)</TT>
+ <SP>: you can use either <TT>nb_elm = size(L)</TT>
or <TT>nb_elm = length(L)</TT>.</SP>
</ITEM>
<ITEM label="iterations with a list">
- <SP>: it is possible to use a list <TT>L</TT> with a <LINK>for</LINK> loop:
- <TT>for e=L,...,end</TT> is a loop with <TT>length(L)</TT>
+ <SP>: it is possible to use a list <TT>L</TT> with a <LINK>for</LINK> loop:
+ <TT>for e=L,...,end</TT> is a loop with <TT>length(L)</TT>
iterations, the loop variable <TT>e</TT> being equal to <TT>L(i)</TT>
at the i th iteration.</SP>
</ITEM>
</ITEMIZE>
</SECTION>
-
+
<SECTION label="Remarks">
<P>Scilab provides also other kinds of list, the <LINK>tlist</LINK> type (typed list) and
- the <LINK>mlist</LINK> type which are useful to define a new data type with operator
- <LINK>overloading</LINK> facilities (<LINK>hypermatrices</LINK> which are
+ the <LINK>mlist</LINK> type which are useful to define a new data type with operator
+ <LINK>overloading</LINK> facilities (<LINK>hypermatrices</LINK> which are
multi-dimensionnal arrays in scilab are in fact <EM>mlist</EM>).
</P>
<P>Matlab <EM>struct</EM> are also available.</P>
</SECTION>
-
+
<EXAMPLE><![CDATA[
l = list(1,["a" "b"])
l(0) = "foo"
lter = lstcat(l,lbis)
size(lter) - size(lbis) - size(l) // must be zero
]]></EXAMPLE>
-
+
<SEE_ALSO>
-
+
<SEE_ALSO_ITEM>
<LINK>null</LINK>
</SEE_ALSO_ITEM>
-
+
<SEE_ALSO_ITEM>
<LINK>lstcat</LINK>
</SEE_ALSO_ITEM>
-
+
<SEE_ALSO_ITEM>
<LINK>tlist</LINK>
</SEE_ALSO_ITEM>
-
+
<SEE_ALSO_ITEM>
<LINK>insertion</LINK>
</SEE_ALSO_ITEM>
-
+
<SEE_ALSO_ITEM>
<LINK>extraction</LINK>
</SEE_ALSO_ITEM>
-
+
<SEE_ALSO_ITEM>
<LINK>size</LINK>
</SEE_ALSO_ITEM>
-
+
<SEE_ALSO_ITEM>
<LINK>length</LINK>
</SEE_ALSO_ITEM>
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
<!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">
<MAN>
<LANGUAGE>eng</LANGUAGE>
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
<!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">
<MAN>
<LANGUAGE>eng</LANGUAGE>
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007-2008 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
<!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">
<MAN>
<LANGUAGE>eng</LANGUAGE>
<P>The overloading function for extraction syntax <VERB>b=a(i1,...,in)</VERB>
has the following calling sequence: <VERB>b=%<type_of_a>_e_(i1,...,in,a)</VERB> </P>
<P>and the syntax
- <VERB>[x1,..,xm]=a(i1,...,in)</VERB> has the following calling sequence:
+ <VERB>[x1,..,xm]=a(i1,...,in)</VERB> has the following calling sequence:
<VERB>[x1,..,xm]=%<type_of_a>_e_(i1,...,in,a)</VERB></P>
<P></P>
<P> The overloading function associated to the insertion syntax
- <VERB>a(i1,...,in)=b</VERB> has the following calling sequence:
+ <VERB>a(i1,...,in)=b</VERB> has the following calling sequence:
<VERB>a=%<type_of_b>_i_<type_of_a>(i1,...,in,b,a)</VERB>. </P>
<P></P>
<P>mlist fields must then be designed by their names. They can also be
r=mlist(['V','name','value'],M.name(varargin(1:$-1)),M.value(varargin(1:$-1)))
endfunction
M(2,:) // the second row of M
-M.value
+M.value
//define insertion operations
function M=%V_i_V(varargin)
-
+
]]></EXAMPLE>
<SEE_ALSO>
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
<!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">
<MAN>
<LANGUAGE>eng</LANGUAGE>
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
<!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">
<MAN>
<LANGUAGE>eng</LANGUAGE>
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
<!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">
<MAN>
<LANGUAGE>eng</LANGUAGE>
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
<!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">
<MAN>
<LANGUAGE>eng</LANGUAGE>
<P>
Standard Operations on <VERB>list</VERB> work similarly for <VERB>typed-list</VERB>:</P>
<P>
- extraction
- : <VERB>[x,y,z...]=l(v)</VERB> where <VERB>v</VERB> is a vector of indices;
+ extraction
+ : <VERB>[x,y,z...]=l(v)</VERB> where <VERB>v</VERB> is a vector of indices;
<VERB>[x,y,z]=l(:)</VERB> extracts all the elements.</P>
<P>
insertion
<P>
Linear systems are represented by specific <VERB>typed-list</VERB> e.g. a
linear system <VERB>[A,B,C,D]</VERB> is represented by the tlist
- <VERB>Sys=tlist(['lss';'A';'B';'C';'D';'X0';'dt'],A,B,C,D,x0,'c')</VERB>
+ <VERB>Sys=tlist(['lss';'A';'B';'C';'D';'X0';'dt'],A,B,C,D,x0,'c')</VERB>
and this specific list may be created by the function <VERB>syslin</VERB>.</P>
<P>
Sys(2), Sys('A') or Sys.A is the state-matrix and Sys('dt') or Sys.dt is the time domain</P>
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
/*--------------------------------------------------------------------------*/
-/* INRIA 2006 */
-/* Allan CORNET */
-/*--------------------------------------------------------------------------*/
#ifndef __GW_DATA_STRUCTURES1__
#define __GW_DATA_STRUCTURES1__
-/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
#include "machine.h"
-/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
int C2F(gwdatastructures1)(void);
/*--------------------------------------------------------------------------*/
int C2F(sci_glist) _PARAMS((char *fname,unsigned long fname_len));
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
/*--------------------------------------------------------------------------*/
-/* INRIA 2006 */
-/* Allan CORNET */
-/*--------------------------------------------------------------------------*/
#ifndef __GW_DATA_STRUCTURES2__
#define __GW_DATA_STRUCTURES2__
/*--------------------------------------------------------------------------*/
+rem Scilab ( http://mwww.scilab.org/ ) - This file is part of Scilab
+rem Copyright (C) ????-2008 - INRIA - Allan CORNET
+rem
+rem This file must be used under the terms of the CeCILL.
+rem This source file is licensed as described in the file COPYING, which
+rem you should have received as part of this distribution. The terms
+rem are also available at
+rem http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+
@..\..\..\bin\scilex -nwni -ns -e exec('buildmacros.sce');quit;
\ No newline at end of file
-//------------------------------------
-// Allan CORNET INRIA 2005
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2005-2008 - INRIA - Allan CORNET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+
//------------------------------------
if (isdef('genlib') == %f) then
exec(SCI+'/modules/functions/scripts/buildmacros/loadgenlib.sce');
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) ????-2008 - INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+
function c=cell(varargin)
-// Copyright INRIA - Scilab Project
dims=0;
val=list();
+rem Scilab ( http://mwww.scilab.org/ ) - This file is part of Scilab
+rem Copyright (C) ????-2008 - INRIA - Allan CORNET
+rem
+rem This file must be used under the terms of the CeCILL.
+rem This source file is licensed as described in the file COPYING, which
+rem you should have received as part of this distribution. The terms
+rem are also available at
+rem http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+
@del *.bin 2>NUL
@del lib 2>NUL
@del names 2>NUL
\ No newline at end of file
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) ????-2008 - INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+
function M=hypermat(dims,v)
-// Copyright INRIA
//initialize an hypermatrix whose dimensions are given in the vector dims
// all entries are set to 0
//
dims=double(dims)
if dims==[] then dims=[0 0],end
if size(dims,'*')==1 then dims=[1 dims],end
-
+
if argn(2)<2 then v=zeros(prod(dims),1),end
if size(v,'*')<> double(prod(dims)) then
error('hypermat: Number of entries does not match product of dimensions')
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) ????-2008 - INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+
function r=iscell(S)
r=typeof(S)=='ce'
endfunction
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) ????-2008 - INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+
function r=isfield(s,field)
if ~isstruct(s) then
r=0;return;end
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) ????-2008 - INRIA
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+
function r=isstruct(S)
r=typeof(S)=='st'
endfunction
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) ????-2008 - INRIA - Vincent COUVERT
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
+
function s=struct(varargin)
-// Copyright INRIA
// Equivalent for Matlab struct function
-// Author: V. Couvert
rhs=argn(2)
// No Matlab equivalent
s=mlist(fields,int32([0,0]))
return
-end
+end
if floor(rhs/2)*2<>rhs then
error("Wrong number of inputs");
-/*--------------------------------------------------------------------------*/
-/* INRIA 2006 */
-/* Allan CORNET */
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
/*--------------------------------------------------------------------------*/
#include <string.h>
#include "gw_data_structures1.h"
};
/*--------------------------------------------------------------------------*/
int C2F(gwdatastructures1)()
-{
+{
Rhs=Max(Rhs,0);
- if (Top - Rhs + Lhs + 1 >= Bot)
+ if (Top - Rhs + Lhs + 1 >= Bot)
{
static integer codeerror = 18;
Error(codeerror);
-/*--------------------------------------------------------------------------*/
-/* INRIA 2006 */
-/* Allan CORNET */
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007-2008 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
/*--------------------------------------------------------------------------*/
#include <string.h>
#include "gw_data_structures2.h"
};
/*--------------------------------------------------------------------------*/
int C2F(gwdatastructures2)(void)
-{
+{
Rhs=Max(Rhs,0);
- if (Top - Rhs + Lhs + 1 >= Bot)
+ if (Top - Rhs + Lhs + 1 >= Bot)
{
static integer codeerror = 18;
Error(codeerror);
-/*--------------------------------------------------------------------------*/
-/* INRIA 2006 */
-/* Allan CORNET */
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
/*--------------------------------------------------------------------------*/
#include "gw_data_structures1.h"
/*--------------------------------------------------------------------------*/
-/*--------------------------------------------------------------------------*/
-/* INRIA 2007 */
-/* Allan CORNET */
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007-2008 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
/*--------------------------------------------------------------------------*/
#include "machine.h"
-/*--------------------------------------------------------------------------*/
-/* INRIA 2006 */
-/* Allan CORNET */
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
/*--------------------------------------------------------------------------*/
#include "gw_data_structures1.h"
/*--------------------------------------------------------------------------*/
-/*--------------------------------------------------------------------------*/
-/* INRIA 2006 */
-/* Allan CORNET */
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
/*--------------------------------------------------------------------------*/
#include "gw_data_structures1.h"
/*--------------------------------------------------------------------------*/
-/*--------------------------------------------------------------------------*/
-/* INRIA 2006 */
-/* Allan CORNET */
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
/*--------------------------------------------------------------------------*/
#include "gw_data_structures1.h"
/*--------------------------------------------------------------------------*/
-/*--------------------------------------------------------------------------*/
-/* INRIA 2006 */
-/* Allan CORNET */
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
/*--------------------------------------------------------------------------*/
#include "gw_data_structures1.h"
/*--------------------------------------------------------------------------*/
-/*--------------------------------------------------------------------------*/
-/* INRIA 2006 */
-/* Allan CORNET */
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
/*--------------------------------------------------------------------------*/
#include "gw_data_structures1.h"
/*--------------------------------------------------------------------------*/
-/*--------------------------------------------------------------------------*/
-/* INRIA 2006 */
-/* Allan CORNET */
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
/*--------------------------------------------------------------------------*/
#include "gw_data_structures1.h"
/*--------------------------------------------------------------------------*/
-/*--------------------------------------------------------------------------*/
-/* INRIA 2006 */
-/* Allan CORNET */
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
/*--------------------------------------------------------------------------*/
#include "gw_data_structures1.h"
/*--------------------------------------------------------------------------*/
-/*--------------------------------------------------------------------------*/
-/* INRIA 2007 */
-/* Allan CORNET */
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007-2008 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
/*--------------------------------------------------------------------------*/
#include "machine.h"
-/*--------------------------------------------------------------------------*/
-/* INRIA 2006 */
-/* Allan CORNET */
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
/*--------------------------------------------------------------------------*/
#include "gw_data_structures1.h"
/*--------------------------------------------------------------------------*/
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007-2008 - INRIA - Sylvestre LEDRU
+ * Copyright (C) 2007-2008 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
<!DOCTYPE GATEWAY SYSTEM "../../functions/xml/gateway.dtd">
<GATEWAY name="data_structures">
primitiveName is the name of the Scilab function
- @author Allan CORNET
- @author Sylvestre LEDRU
- @date INRIA 2007
===================
Don't touch if you do not know what you are doing
-->
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
subroutine definedfields
c returns index of defined fields of a list
include 'stack.h'
il=iadr(lstk(top))
ilr=il
if(istk(il).lt.0) il=iadr(istk(il+1))
- if(istk(il).lt.15.or.istk(il).gt.17) then
+ if(istk(il).lt.15.or.istk(il).gt.17) then
err=1
call error(44)
return
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
subroutine intgetfield()
include 'stack.h'
endif
c
15 continue
-c
+c
if(istk(il1).ne.10) goto 20
c . arg2(arg1) with arg1 vector of strings
ilt=iadr(sadr(il2+istk(il2+1)+3))
nt=istk(ilt+1)*istk(ilt+2)
if(nt.ne.1) goto 17
c . Soft coded extraction
- buf='Soft coded field names not yet implemented'
+ buf='Soft coded field names not yet implemented'
call error(999)
return
call indxg(il1,m2,ili,n,mx,lw,1)
if(err.gt.0) return
endif
-c
+c
22 if(mx.gt.m2) then
call error(21)
return
endif
-c
+c
if(ilist.ge.nlist) goto 31
if(n.gt.1) then
call error(21)
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
subroutine scilist(fname)
-
+
character*(*) fname
include 'stack.h'
integer ltyp
integer iadr,sadr
-
+
c
iadr(l)=l+l-1
sadr(l)=(l/2)+1
endif
lstk(top+1)=l+lf-ld
goto 99
-
+
99 return
end
-
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
subroutine intlstcat
c catenate two or more lists
include 'stack.h'
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
subroutine intlstsize
c WARNING : argument of this interface may be passed by reference
include 'stack.h'
integer iadr,sadr
-c
+c
iadr(l)=l+l-1
sadr(l)=(l/2)+1
c
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
subroutine intsetfield()
include 'stack.h'
integer typs,topk
il3=iadr(istk(il3r+1))
if(typs.eq.17) then
c change type to tlist
- istk(il3r)=-16
+ istk(il3r)=-16
istk(il3)=16
endif
else
-/*--------------------------------------------------------------------------*/
-/* INRIA 2007 */
-/* Ledru Sylvestre */
-/*--------------------------------------------------------------------------*/
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007-2008 - INRIA - Sylvestre LEDRU
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
#ifndef __HMOPS_H__
#define __HMOPS_H__
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) ????-2008 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
#include <string.h>
#include "stack-c.h"
#include "stcreate.h"
/* create the mlist header */
il = iadr(l0);
Err = sadr(il+6) + n1 - *Lstk(Bot);
- if (Err > 0)
+ if (Err > 0)
{
Error(c17);
return 1;
-/*--------------------------------------------------------------------------*/
-/* INRIA 2007 */
-/* Ledru Sylvestre */
-/*--------------------------------------------------------------------------*/
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007-2008 - INRIA - Sylvestre LEDRU
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
#ifndef __STCREATE_H__
#define __STCREATE_H__
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
subroutine extractfields(illist,ind,n,lw)
-c Copyright INRIA
c
-c given a list beginning at istk(illist), a vector of n indexes ind
+c given a list beginning at istk(illist), a vector of n indexes ind
c extractfields creates n variables corresponding to the n fields
c
c if n==-1 all fieds are extracted
include 'stack.h'
integer ind(*)
-c
+c
integer vol2
integer iadr,sadr
c
iadr(l)=l+l-1
sadr(l)=(l/2)+1
-c
+c
if(n.eq.-1) then
c . L(:)
n=istk(illist+1)
52 continue
top=top-1
-c . preserve fields adress (newly created variables may
+c . preserve fields adress (newly created variables may
c . overwrite beginining of the given list)
ill=iadr(max(lw,lstk(top+1)))
lw=sadr(ill+n)
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
subroutine followpath(indtop,listtop,ilindi,voli,ilp,voll,ind,
$ count,info,lwork)
-c Copyright INRIA
c =============================================================
-c given
-c - a path stored in a "linear" index list ind stored in the
+c given
+c - a path stored in a "linear" index list ind stored in the
c variable number indtop
-c and
-c - a list L begining at position stored in the
+c and
+c - a list L begining at position stored in the
c variable number listtop
c - a current pointer on index list entries count
c returns:
c - the pointer ilp on the deapest sublist of L on the path indtop
c available just by following the list structure of L.
-c i.e. ilp is the pointer on the sublist of L pointed to by
+c i.e. ilp is the pointer on the sublist of L pointed to by
c the path indtop(1:count)
c - the vector of numerical indexes corresponding to indtop(1:count)
c 1 : unknown named field
c 2 : current index is a matrix index of an mlist
c 3 : current index is not a single number
-c 4 : current index points to a leaf of the L list
+c 4 : current index points to a leaf of the L list
c 5 : end of index list reached
c 6 : current index is 0 or greater than current sublist # of fields
c =============================================================
c
-c Copyright INRIA
include 'stack.h'
-c
+c
integer indtop,listtop,ind(*)
integer typi,count,oldcount,voll,voli
sadr(l)=(l/2)+1
c
oldcount=count
-c
+c
ilind=iadr(lstk(indtop))
if(istk(ilind).lt.0) then
itop=istk(ilind+2)
c . undefined field found
c info=7
c goto 50
-c
+c
c endif
if(istk(illisti).lt.0) then
kk=istk(illisti+2)
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
subroutine forcerhs(n,ierr)
c this routine allows to change the apparent lhs of a list
endif
return
end
-
\ No newline at end of file
+
-
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+
subroutine gratyp(ivt,job)
-c set the type
+c set the type
c ['graph','name','directed','node_number','tail','head','node_name',..
c 'node_type','node_x','node_y','node_color','node_diam','node_border',..
c 'node_font_size','node_demand','edge_name','edge_color','edge_width',..
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
subroutine insertfield(ilfrom,volfrom,iltos,ind,nind,lrn,lw,info)
c insert a field (from) in a sublist "to" of a list "tos"
c
c ind(1:nind) is the path of to in tos
c
c is the position of the result,if info<>0
-c info
+c info
c if 0 list has been updated "in place"
c if 1 list needs to be stored
include 'stack.h'
-c
+c
integer volfrom,voltos,volto,dvol,ind(*)
integer typfrom,typto
endif
if(iltos.ne.ilto) then
-c . copy the beginning of "tos" up to the beginning of the modified sub-list.
+c . copy the beginning of "tos" up to the beginning of the modified sub-list.
ltod=sadr(iltos)
ltto=sadr(ilto)
call unsfdcopy(ltto-ltod,stk(ltod),1,stk(lrn),1)
lr=lr+volto
dvol=(lr-lrn)-(lto+volto-sadr(ilto))
-c . update new data structure pointers recursively
+c . update new data structure pointers recursively
call updptr(iln,ind,nind-1,dvol)
c . copy the rest of data structure
if(nind.gt.1) then
endif
if(ilto.ne.iltos) then
-c . copy the beginning of "tos" up to the beginning of the modified sub-list.
+c . copy the beginning of "tos" up to the beginning of the modified sub-list.
ltod=sadr(iltos)
ltto=sadr(ilto)
err=lrn+ltto-ltod-lstk(bot)
lr=lr+volfrom
c
dvol=(lr-lrn)-(lto+volto-sadr(ilto))
-c . update new data structure pointers recursively
+c . update new data structure pointers recursively
call updptr(iln,ind,nind-1,dvol)
c . copy the rest of data structure
c??? ind(nind-1)=ind(nind-1)+n-mto
info=0
return
else
-c . get memory to install the resulting list
+c . get memory to install the resulting list
c . (May be improved to avoid copy when "to" list is at the
c . top of the stack).
iln=iadr(lw)
lto=lto+istk(ilto+2+n)-1
call unsfdcopy(ltol-lto,stk(lto),1,stk(lrn),1)
lrn=lrn+ltol-lto
-c . update new data structure pointers recursively
+c . update new data structure pointers recursively
call updptr(iln,ind,nind,dvol)
c . store result
lrn=lw
endif
else
c . suppress the specified entry
-c . get memory to install the resulting list
+c . get memory to install the resulting list
c . (May be improved to avoid copy when "to" list is at the
c . top of the stack).
lrn=lw
call error(17)
return
endif
-c . if necessary,copy the "to" list data structure up to the
+c . if necessary,copy the "to" list data structure up to the
c . beginning of the modified sub-list
if(ilto.ne.iltos) then
c . copy the beginning of "to" up to the modified sub-list
c . lrn points to the beginning of the new entry
lrn=lrn+ltto-ltod
endif
-c . update sub_list
+c . update sub_list
c . ---------------
il=iadr(lrn)
lfrom=lto-1+istk(ilto+2+n)
call unsfdcopy(istk(il+1+mto)-istk(il+1+n),stk(lfrom),1,
$ stk(l),1)
l=l+istk(il+1+mto)-istk(il+1+n)
-c . update new data structure pointers recursively
+c . update new data structure pointers recursively
call updptr(iln,ind,nind-1,dvol)
c . copy the rest of data structure
if(nind.gt.1) then
endif
return
end
-
\ No newline at end of file
+
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
subroutine intl_e()
c =============================================================
c extraction pour les list tlist, mlist
rhs1=rhs
top0=top
- fun=0
+ fun=0
if(rhs.gt.2) then
fin=-fin
return
lstk(top+2)=lw
if (istk(il1i).eq.15) then
c . more than one index
-c . transform index list(i,j,...) in the list in sequence of variables
+c . transform index list(i,j,...) in the list in sequence of variables
c . at the top of the stack
m1i=istk(il1i+1)
ll1=sadr(il1i+m1i+3)
rhs=1+m1i
m2i=istk(il2i+1)
else
-c . a matrix index
+c . a matrix index
if(m1.gt.icount.and.info.eq.4) then
c . arg2(...)(i,j,..)(...)
if(istk(il2i).ne.9) then
return
endif
endif
-c . arg2(...)(i,j,..) a matrix single index,
+c . arg2(...)(i,j,..) a matrix single index,
c . use standard extraction to finish the job
-c . copy index at the top of the stack
+c . copy index at the top of the stack
top=top2
call copyvar(il1ir,vol1)
rhs=2
ipos=strpos(istk(ilptr),nn-1,istk(lfn),istk(ilname),
$ nname)
if(ipos.le.0) then
-c . no such name in the field names
+c . no such name in the field names
if(icount.eq.1.and.m1.eq.1) then
c . syntax is arg2('xxx')
fin=-fin
endif
return
elseif(info.eq.5) then
-c . end of arg1 list (index list) reached
+c . end of arg1 list (index list) reached
c . copy the designed sublist at the top of the stack
top=top-1
call copyvar(il2ir,vol2)
c m1 > icount handle, ... case
c finish extraction using overloading
-c build new index list using the remaining entries of the
+c build new index list using the remaining entries of the
c original index list
ilind=iadr(lstk(top-2))
if(istk(ilind).lt.0) ilind=iadr(istk(ilind+1))
call copyvar(il1i,vol)
rhs=2
else
-c . transform index list(i,j,...) in the list in sequence of variables
+c . transform index list(i,j,...) in the list in sequence of variables
c . at the top of the stack
m1i=istk(il1i+1)
ll1=sadr(il1i+m1i+3)
vol=lstk(top+1)-lstk(top-lhs+1)
im=lstk(top-lhs+1)-lstk(top-lhs-1)
call unsfdcopy(vol,stk(lstk(top-lhs+1)),1,
- $ stk(lstk(top-lhs-1)),1)
+ $ stk(lstk(top-lhs-1)),1)
top=top-2
do 46 k=1,lhs
lstk(top-lhs+k+1)=lstk(top-lhs+k+3)-im
else
c . move result ajust after the index
ll2=lstk(top+1)-lstk(top)
- call unsfdcopy(ll2,stk(lstk(top)),1,stk(lstk(top-1)),1)
+ call unsfdcopy(ll2,stk(lstk(top)),1,stk(lstk(top-1)),1)
lstk(top)=lstk(top-1)+ll2
top=top-1
c . goto back to the standard list algorithm
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
subroutine intl_i
c =============================================================
c list insertions arg3(arg1)=arg2
05 lw=lstk(top+1)
c
if(rhs.ge.4) then
-c . l(i,j,..)
+c . l(i,j,..)
fin=-fin
return
endif
istk(ilrec+6)=vol3
if(info.eq.5.or.info.eq.6) then
-c . end of arg1 list reached
+c . end of arg1 list reached
c . replace designed sublist of arg3 by arg2
call insertfield(il2,vol2,il3,istk(ilind),icount,lrn,lw,info)
if(err.gt.0) return
c . matrix index (i,..) syntax
if(istk(il3i).eq.17.or.istk(il3i).eq.16) then
if(icount.eq.1.and.abs(m1).eq.1) then
-c . syntax is arg3('xxx')=arg2 or arg3(i)=arg2
+c . syntax is arg3('xxx')=arg2 or arg3(i)=arg2
fin=-2
top=top3
rhs=3
30 continue
c last index points on a matrix, use standard matrix insertion
-c to finish
+c to finish
top=top3
if (istk(il1i).eq.15) then
c . more than one index
call lst2vars(il1i,m1i)
if(err.gt.0) return
rhs=2+m1i
- else
-c . a matrix single index
+ else
+c . a matrix single index
if(m1.gt.icount) then
c . arg3(...)(i,j,..)(...)=arg2 :too many indices in index list
call error(21)
return
endif
-c . arg3(...)(i,j,..)=arg2: a matrix single index
+c . arg3(...)(i,j,..)=arg2: a matrix single index
c . copy it at the top of the stack (may be possible to put a pointer)
call copyvar(il1ir,vol1)
if(err.gt.0) return
if(err.gt.0) return
c create a pointer on the designed matrix (part of arg3)
- if(vol3.gt.0) then
+ if(vol3.gt.0) then
call createref(il3i,0,vol3)
if(err.gt.0) return
else
c call allops for standard insertion
fin=2
if (ptover(1,psiz)) return
-
+
icall=4
istk(ilrec)=1
if(err.gt.0) return
rhs=1+m1i
endif
-c - form the sublist Temp1=A3(i1)..(ik)
+c - form the sublist Temp1=A3(i1)..(ik)
call copyvar(il3i,vol3)
if(err.gt.0) return
c top of stack contains [A1, A2, A3,ik+1, (ik+2)..(in),&a2,ik+1,Temp1]
il1=iadr(lstk(top1))
if(istk(il1).lt.0) il1=iadr(istk(il1+1))
m1=istk(il1+1)
-c
+c
c re-enter intl_i to realize Temp2(ik+2)..(in)=A2 insertion
c top of stack contains : [A1, A2, A3,ik+1,(ik+2)..(in), &A2, Temp2]
-c
+c
c pt=pt-1
c if (ptover(1,psiz)) return
c save context for recursion
fin=2
if (istk(iadr(lstk(top))).eq.1) then
c . insertion in an empty matrix
-c . get the type of the inserted variable
+c . get the type of the inserted variable
ityp=abs(istk(iadr(lstk(top-1))))
if(ityp.ne.15.and.ityp.ne.16.and.ityp.ne.17) then
c . not a list, *call* allops
goto 90
endif
-c
+c
c realize insertion A3(i1)..(ik)=Temp1
ilv=iadr(lstk(top))
volv=lstk(top+1)-lstk(top)
82 continue
c change handle property
-c build new index list using the remaining entries of the
+c build new index list using the remaining entries of the
c original index list
ll=sadr(il1+3+m1)
90 continue
if(info.eq.0) then
-c . insertion has been done in place,
+c . insertion has been done in place,
top3=top1+2
if(rstk(pt).eq.407) then
il3=iadr(lstk(top3))
goto 01
else
c . set lstk pointers to the newly created variable
-
+
lt=lstk(top)
lstk(top)=lrn
il1=iadr(lrn)
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
subroutine lsstyp(ivt,job)
c set the type
integer ivt(*)
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
subroutine lstops
c ==================================
c elementary operations on lists
logical ishm
integer insert,extrac, toto, gettype
data insert/2/,extrac/3/
-
+
c handle recursion
if(rstk(pt).ge.403.and.rstk(pt).le.405) goto 10
c$$$ print *, ' type de top =', gettype(top), ' type de top-1 =', toto
if ( ishm() .and. toto.ne.10 .and. toto.ne.15) then
call intehm()
- else
+ else
call intl_e()
endif
return
c insertion
50 continue
toto = gettype(top-2) ! a priori
-c$$$ print *, ' type de top =', gettype(top),
+c$$$ print *, ' type de top =', gettype(top),
c$$$ $ ' type de top-1 =', gettype(top-1),
c$$$ $ ' type de top-2 =', toto
if ( ishm() .and. toto.ne.10 .and. toto.ne.15) then
call intihm()
- else
+ else
call intl_i()
endif
if(err.gt.0) return
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
subroutine mtlist(typdsc)
c create a tlist whose type description is given by external
c function typdsc
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
subroutine rattyp(ivt,job)
c set the type ['r','num','den','dt']
integer ivt(*)
+c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+c Copyright (C) ????-2008 - INRIA
+c
+c This file must be used under the terms of the CeCILL.
+c This source file is licensed as described in the file COPYING, which
+c you should have received as part of this distribution. The terms
+c are also available at
+c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
subroutine updptr(ilt,ind,nind,dvol)
c!purpose
integer ind(nind)
integer iadr,sadr
include 'stack.h'
-c
+c
iadr(l)=l+l-1
sadr(l)=(l/2)+1
c
20 continue
30 subptr=il
end
-
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007-2008 - INRIA - Sylvestre LEDRU
+ * Copyright (C) 2007-2008 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
<!DOCTYPE MODULE_VERSION SYSTEM "../core/xml/version.dtd">
<MODULE_VERSION name="data_structures">
Scilab
Defines the version of a module
- @author Allan CORNET
- @author Sylvestre LEDRU
- @date INRIA 2007
===================
-->