From 5238ac0e5ff94a794a67489b6500312d1728b403 Mon Sep 17 00:00:00 2001
From: Simon Marchetto
Because in Scilab matrices exist for basic types only, a sequence container of pointers is mapped to a Scilab list. For other item types (double, int, string...) the sequence container is mapped to a Scilab matrix.
-This example shows how to create in Scilab a vector (of int), add some values in that vector, and pass it as an argument of a function. +This first example shows how to create in Scilab a vector (of int), add some values in that vector, and pass it as an argument of a function. It shows also (thanks to the typemaps) that we can also pass directly a matrix of values to the function:
@@ -1219,16 +1217,11 @@ double average(std::vector<int> v) { --A set is mapped from/to a Scilab list. +In this second example, a set of struct (Person) is wrapped. +A function performs a search in this set, and returns a subset. As one can see, the result in Scilab is a list of pointers:
--In the following example, a set of struct (Person>) is wrapped. -It is processed in a function, and as expected, the result is converted to a list of pointers in Scilab: -
%module example