Reputation: 2508
I had some problems with understanding how function loadwave(...) exactly works. So i found a file with its description here: /usr/share/scilab/modules/sound/macros/loadwave.sci using find -name ... command.
Now i don't understand how optim(...) function works and so i also want to find its source file but i can't (i tried to use combinations of find and grep again). There are some demo files with examples of optim usage in /usr/share/scilab/modules/optimization/demos/optim directory but i still can not find any source code of optim(...) itself that as i understand should look somehow as follows:
function [...]=optim(...)
...
end function;
Could you give me a tip, please?
Update: for now I only managed to find this in file /usr/share/scilab/modules/optimization/sci_gateway/optimization_gateway.xml :
<!DOCTYPE GATEWAY SYSTEM "../../functions/xml/gateway.dtd">
<GATEWAY name="optimization">
<!-- =================== -->
<!--
Scilab
Interface description. In this file, we define the list of the function which
will be available into Scilab and the link to the "native" function.
gatewayId is the position in the hashtable 'Interfaces' defined in the
file SCI/modules/core/src/c/callinterf.h
primitiveId is the position in the hashtable '<module>Table Tab[]' defined
in the file modules/<module>/sci_gateway/c/gw_<module>.c
primitiveName is the name of the Scilab function
===================
Don't touch if you do not know what you are doing
-->
<!-- =================== -->
<PRIMITIVE gatewayId="11" primitiveId="1" primitiveName="optim" />
<PRIMITIVE gatewayId="11" primitiveId="2" primitiveName="semidef" />
<PRIMITIVE gatewayId="11" primitiveId="3" primitiveName="fsolve" />
<PRIMITIVE gatewayId="11" primitiveId="4" primitiveName="lsqrsolve" />
<PRIMITIVE gatewayId="11" primitiveId="5" primitiveName="qld" />
<PRIMITIVE gatewayId="11" primitiveId="6" primitiveName="qp_solve" />
<PRIMITIVE gatewayId="11" primitiveId="7" primitiveName="readmps" />
</GATEWAY>
So in the git repo of scilab the link to which has been kindly given to me by user1149326 below i have found the file scilab/modules/optimization/sci_gateway/c/sci_optim.c (http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/optimization/sci_gateway/c/sci_optim.c;h=608f7dabe822fc6cfecb456e847f3b7373014322;hb=HEAD)
Upvotes: 2
Views: 328
Reputation: 2955
You can check out all Scilab sources at their git repository. More specifically all optim
sources are in the optimization module. See the src
and macro
folder. You can read about how the module is organized on their wiki.
I think the sources are too complex to give you insight in how optim
works. Instead of looking at the sources, I would recommend a document by Scilab about the kinds of optimization , that may also give the information you're looking for.
Upvotes: 2