adding sparse management via Eigen library 58/5858/3
Antoine ELIAS [Tue, 10 Jan 2012 10:45:54 +0000 (11:45 +0100)]
Change-Id: I56b648e83403359b1af52e9d350422a240dcb431

147 files changed:
scilab/Makefile.am
scilab/Makefile.in
scilab/libs/.gitignore
scilab/modules/api_scilab/src/cpp/api_common.cpp
scilab/modules/ast/Makefile.am
scilab/modules/ast/Makefile.in
scilab/modules/ast/ast.vcxproj
scilab/modules/ast/includes/run_AssignExp.hxx
scilab/modules/ast/includes/run_CallExp.hxx
scilab/modules/ast/includes/run_MatrixExp.hxx
scilab/modules/ast/includes/run_OpExp.hxx
scilab/modules/ast/includes/runvisitor.hxx
scilab/modules/ast/src/cpp/visitor_common.cpp
scilab/modules/core/Makefile.am
scilab/modules/core/Makefile.in
scilab/modules/core/core_yasp.vcxproj
scilab/modules/core/includes/runner.hxx
scilab/modules/core/src/c/core.vcxproj
scilab/modules/core/src/cpp/core_gw.vcxproj
scilab/modules/core/src/cpp/scilab.cpp
scilab/modules/elementary_functions/Makefile.am
scilab/modules/elementary_functions/Makefile.in
scilab/modules/elementary_functions/includes/elem_common.h
scilab/modules/elementary_functions/sci_gateway/cpp/elem_func_gw/elem_func_gw.vcxproj
scilab/modules/elementary_functions/sci_gateway/cpp/sci_eye.cpp
scilab/modules/elementary_functions/sci_gateway/cpp/sci_size.cpp
scilab/modules/elementary_functions/src/cpp/getmode.cpp
scilab/modules/fileio/Makefile.am
scilab/modules/fileio/Makefile.in
scilab/modules/fileio/sci_gateway/cpp/fileio_gw.vcxproj
scilab/modules/fileio/sci_gateway/cpp/sci_mfprintf.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_mput.cpp
scilab/modules/functions/Makefile.am
scilab/modules/functions/Makefile.in
scilab/modules/functions/sci_gateway/cpp/functions_gw.vcxproj
scilab/modules/functions/sci_gateway/cpp/sci_exec.cpp
scilab/modules/functions/sci_gateway/cpp/sci_execstr.cpp
scilab/modules/functions/sci_gateway/cpp/sci_whereis.cpp
scilab/modules/functions_manager/Makefile.am
scilab/modules/functions_manager/Makefile.in
scilab/modules/functions_manager/functions_manager.vcxproj
scilab/modules/linear_algebra/Makefile.am
scilab/modules/linear_algebra/Makefile.in
scilab/modules/linear_algebra/sci_gateway/cpp/linear_algebra_gw.vcxproj
scilab/modules/mexlib/Makefile.am
scilab/modules/mexlib/Makefile.in
scilab/modules/mexlib/src/cpp/mexlib.cpp
scilab/modules/mexlib/src/libmat/libmat.vcxproj
scilab/modules/mexlib/src/libmex/libmex.vcxproj
scilab/modules/mexlib/src/libmx/libmx.vcxproj
scilab/modules/operations/Makefile.am
scilab/modules/operations/Makefile.in
scilab/modules/operations/includes/types_addition.hxx
scilab/modules/operations/includes/types_comparison_eq.hxx [moved from scilab/modules/operations/includes/types_comparison_equal.hxx with 60% similarity]
scilab/modules/operations/includes/types_comparison_lt_le_gt_ge.hxx [new file with mode: 0644]
scilab/modules/operations/includes/types_comparison_ne.hxx [moved from scilab/modules/operations/includes/types_comparison_non_equal.hxx with 100% similarity]
scilab/modules/operations/includes/types_multiplication.hxx
scilab/modules/operations/includes/types_substraction.hxx
scilab/modules/operations/operations.vcxproj
scilab/modules/operations/operations.vcxproj.filters
scilab/modules/operations/src/cpp/types_addition.cpp
scilab/modules/operations/src/cpp/types_comparison_eq.cpp [moved from scilab/modules/operations/src/cpp/types_comparison_equal.cpp with 56% similarity]
scilab/modules/operations/src/cpp/types_comparison_lt_le_gt_ge.cpp [new file with mode: 0644]
scilab/modules/operations/src/cpp/types_comparison_ne.cpp [moved from scilab/modules/operations/src/cpp/types_comparison_non_equal.cpp with 53% similarity]
scilab/modules/operations/src/cpp/types_multiplication.cpp
scilab/modules/operations/src/cpp/types_substraction.cpp
scilab/modules/output_stream/Makefile.am
scilab/modules/output_stream/Makefile.in
scilab/modules/output_stream/sci_gateway/cpp/output_stream_gw/output_stream_gw.vcxproj
scilab/modules/output_stream/sci_gateway/cpp/sci_mprintf.cpp
scilab/modules/output_stream/sci_gateway/cpp/sci_msprintf.cpp
scilab/modules/output_stream/src/cpp/scilab_sprintf.cpp
scilab/modules/string/macros/sci2exp.sci
scilab/modules/string/sci_gateway/cpp/sci_length.cpp
scilab/modules/symbol/includes/scope.hxx
scilab/modules/types/Makefile.am
scilab/modules/types/Makefile.in
scilab/modules/types/includes/alltypes.hxx
scilab/modules/types/includes/anytype.hxx [deleted file]
scilab/modules/types/includes/arrayof.hxx
scilab/modules/types/includes/bool.hxx
scilab/modules/types/includes/callable.hxx
scilab/modules/types/includes/cell.hxx
scilab/modules/types/includes/container.hxx
scilab/modules/types/includes/double.hxx
scilab/modules/types/includes/float.hxx
scilab/modules/types/includes/function.hxx
scilab/modules/types/includes/implicitlist.hxx
scilab/modules/types/includes/int16.hxx
scilab/modules/types/includes/int32.hxx
scilab/modules/types/includes/int64.hxx
scilab/modules/types/includes/int8.hxx
scilab/modules/types/includes/internal.hxx
scilab/modules/types/includes/list.hxx
scilab/modules/types/includes/listdelete.hxx
scilab/modules/types/includes/listinsert.hxx
scilab/modules/types/includes/listoperation.hxx
scilab/modules/types/includes/listundefined.hxx
scilab/modules/types/includes/macro.hxx
scilab/modules/types/includes/macrofile.hxx
scilab/modules/types/includes/matrixiterator.hxx [new file with mode: 0644]
scilab/modules/types/includes/mlist.hxx
scilab/modules/types/includes/polynom.hxx
scilab/modules/types/includes/singlepoly.hxx
scilab/modules/types/includes/singlestruct.hxx
scilab/modules/types/includes/sparse.hxx [new file with mode: 0644]
scilab/modules/types/includes/sparseOp.hxx [new file with mode: 0644]
scilab/modules/types/includes/string.hxx
scilab/modules/types/includes/struct.hxx
scilab/modules/types/includes/threadId.hxx
scilab/modules/types/includes/tlist.hxx
scilab/modules/types/includes/types.hxx
scilab/modules/types/includes/types_gw.hxx
scilab/modules/types/includes/uint16.hxx
scilab/modules/types/includes/uint32.hxx
scilab/modules/types/includes/uint64.hxx
scilab/modules/types/includes/uint8.hxx
scilab/modules/types/sci_gateway/cpp/sci_adj2sp.cpp [new file with mode: 0644]
scilab/modules/types/sci_gateway/cpp/sci_full.cpp [new file with mode: 0644]
scilab/modules/types/sci_gateway/cpp/sci_nnz.cpp [new file with mode: 0644]
scilab/modules/types/sci_gateway/cpp/sci_sp2adj.cpp [new file with mode: 0644]
scilab/modules/types/sci_gateway/cpp/sci_sparse.cpp [new file with mode: 0644]
scilab/modules/types/sci_gateway/cpp/sci_spcompack.cpp [new file with mode: 0644]
scilab/modules/types/sci_gateway/cpp/sci_spget.cpp [new file with mode: 0644]
scilab/modules/types/sci_gateway/cpp/sci_spones.cpp [new file with mode: 0644]
scilab/modules/types/sci_gateway/cpp/types_gw.cpp
scilab/modules/types/sci_gateway/cpp/types_gw/types_gw.vcxproj
scilab/modules/types/sci_gateway/cpp/types_gw/types_gw.vcxproj.filters
scilab/modules/types/src/cpp/cell.cpp
scilab/modules/types/src/cpp/double.cpp
scilab/modules/types/src/cpp/float.cpp
scilab/modules/types/src/cpp/function.cpp
scilab/modules/types/src/cpp/list.cpp
scilab/modules/types/src/cpp/listdelete.cpp
scilab/modules/types/src/cpp/listinsert.cpp
scilab/modules/types/src/cpp/listoperation.cpp
scilab/modules/types/src/cpp/listundefined.cpp
scilab/modules/types/src/cpp/macro.cpp
scilab/modules/types/src/cpp/macrofile.cpp
scilab/modules/types/src/cpp/singlepoly.cpp
scilab/modules/types/src/cpp/sparse.cpp [new file with mode: 0644]
scilab/modules/types/src/cpp/threadId.cpp
scilab/modules/types/src/cpp/types_tools.cpp
scilab/modules/types/tests/unit_tests/sparse.dia.ref [new file with mode: 0644]
scilab/modules/types/tests/unit_tests/sparse.tst [new file with mode: 0644]
scilab/modules/types/types.vcxproj
scilab/modules/types/types.vcxproj.filters

index 8847f7b..2c0e8e5 100644 (file)
@@ -56,25 +56,29 @@ COMMON_LIBS = \
 SCILAB_LIB=$(top_builddir)/modules/libscilab.la
 SCILAB_CLI_LIB=$(top_builddir)/modules/libscilab-cli.la
 
-COMMON_CPPFLAGS = -I$(top_srcdir)/modules/console/includes/ \
-                                               -I$(top_srcdir)/modules/output_stream/includes/ \
-                                               -I$(top_srcdir)/modules/parse/includes/ \
-                                               -I$(top_srcdir)/modules/ast/includes/ \
-                                               -I$(top_srcdir)/modules/symbol/includes/ \
-                                               -I$(top_srcdir)/modules/functions_manager/includes/ \
-                                               -I$(top_srcdir)/modules/types/includes/ \
-                                               -I$(top_srcdir)/modules/system_env/includes/ \
-                                               -I$(top_srcdir)/modules/operations/includes/ \
-                                               -I$(top_srcdir)/modules/elementary_functions/includes/ \
-                                               -I$(top_srcdir)/modules/fileio/includes/ \
-                                               -I$(top_srcdir)/modules/string/includes/ \
-                                               -I$(top_srcdir)/modules/history_manager/includes/ \
-                                               -I$(top_srcdir)/modules/threads/includes/ \
-                                               -I$(top_srcdir)/modules/api_scilab/includes/ \
-                                               -I$(top_srcdir)/libs/dynamiclibrary/includes/
-
-scilab_bin_SOURCES             =       $(top_srcdir)/modules/core/src/cpp/scilab.cpp \
-                                                       $(top_srcdir)/modules/core/src/cpp/tasks.cpp
+COMMON_CPPFLAGS = \ 
+    -I$(top_srcdir)/modules/console/includes/ \
+       -I$(top_srcdir)/modules/output_stream/includes/ \
+    -I$(top_srcdir)/modules/parse/includes/ \
+    -I$(top_srcdir)/modules/ast/includes/ \
+    -I$(top_srcdir)/modules/symbol/includes/ \
+    -I$(top_srcdir)/modules/functions_manager/includes/ \
+    -I$(top_srcdir)/modules/types/includes/ \
+    -I$(top_srcdir)/modules/system_env/includes/ \
+    -I$(top_srcdir)/modules/operations/includes/ \
+    -I$(top_srcdir)/modules/elementary_functions/includes/ \
+    -I$(top_srcdir)/modules/fileio/includes/ \
+    -I$(top_srcdir)/modules/string/includes/ \
+    -I$(top_srcdir)/modules/history_manager/includes/ \
+    -I$(top_srcdir)/modules/threads/includes/ \
+    -I$(top_srcdir)/modules/api_scilab/includes/ \
+    -I$(top_srcdir)/libs/dynamiclibrary/includes/ \
+    $(EIGEN_CPPFLAGS)
+
+scilab_bin_SOURCES = \
+    $(top_srcdir)/modules/core/src/cpp/scilab.cpp \
+    $(top_srcdir)/modules/core/src/cpp/tasks.cpp
+
 if IS_MACOSX
 scilab_bin_SOURCES             +=  $(top_srcdir)/modules/core/src/c/initMacOSXEnv.c
 endif
index 15fd11f..8ca80b8 100644 (file)
@@ -639,22 +639,24 @@ COMMON_LIBS = \
 
 SCILAB_LIB = $(top_builddir)/modules/libscilab.la
 SCILAB_CLI_LIB = $(top_builddir)/modules/libscilab-cli.la
-COMMON_CPPFLAGS = -I$(top_srcdir)/modules/console/includes/ \
-                                               -I$(top_srcdir)/modules/output_stream/includes/ \
-                                               -I$(top_srcdir)/modules/parse/includes/ \
-                                               -I$(top_srcdir)/modules/ast/includes/ \
-                                               -I$(top_srcdir)/modules/symbol/includes/ \
-                                               -I$(top_srcdir)/modules/functions_manager/includes/ \
-                                               -I$(top_srcdir)/modules/types/includes/ \
-                                               -I$(top_srcdir)/modules/system_env/includes/ \
-                                               -I$(top_srcdir)/modules/operations/includes/ \
-                                               -I$(top_srcdir)/modules/elementary_functions/includes/ \
-                                               -I$(top_srcdir)/modules/fileio/includes/ \
-                                               -I$(top_srcdir)/modules/string/includes/ \
-                                               -I$(top_srcdir)/modules/history_manager/includes/ \
-                                               -I$(top_srcdir)/modules/threads/includes/ \
-                                               -I$(top_srcdir)/modules/api_scilab/includes/ \
-                                               -I$(top_srcdir)/libs/dynamiclibrary/includes/
+COMMON_CPPFLAGS = \
+    -I$(top_srcdir)/modules/console/includes/ \
+       -I$(top_srcdir)/modules/output_stream/includes/ \
+    -I$(top_srcdir)/modules/parse/includes/ \
+    -I$(top_srcdir)/modules/ast/includes/ \
+    -I$(top_srcdir)/modules/symbol/includes/ \
+    -I$(top_srcdir)/modules/functions_manager/includes/ \
+    -I$(top_srcdir)/modules/types/includes/ \
+    -I$(top_srcdir)/modules/system_env/includes/ \
+    -I$(top_srcdir)/modules/operations/includes/ \
+    -I$(top_srcdir)/modules/elementary_functions/includes/ \
+    -I$(top_srcdir)/modules/fileio/includes/ \
+    -I$(top_srcdir)/modules/string/includes/ \
+    -I$(top_srcdir)/modules/history_manager/includes/ \
+    -I$(top_srcdir)/modules/threads/includes/ \
+    -I$(top_srcdir)/modules/api_scilab/includes/ \
+    -I$(top_srcdir)/libs/dynamiclibrary/includes/ \
+    $(EIGEN_CPPFLAGS)
 
 scilab_bin_SOURCES = $(top_srcdir)/modules/core/src/cpp/scilab.cpp \
        $(top_srcdir)/modules/core/src/cpp/tasks.cpp $(am__append_3)
index 0b02962..ffa70da 100644 (file)
@@ -14,5 +14,6 @@ umfpack
 zlib
 hdf5
 gl2ps
+Eigen
 *.lib
 
index 715a288..980097a 100644 (file)
@@ -62,8 +62,8 @@ SciErr getVarDimension(void* _pvCtx, int* _piAddress, int* _piRows, int* _piCols
     SciErr sciErr; sciErr.iErr = 0; sciErr.iMsgCount = 0;
     if(_piAddress != NULL && isVarMatrixType(_pvCtx, _piAddress))
     {
-        *_piRows        = ((types::InternalType*)_piAddress)->getAsGenericType()->getRows();
-        *_piCols        = ((types::InternalType*)_piAddress)->getAsGenericType()->getCols();
+        *_piRows        = ((types::InternalType*)_piAddress)->getAs<GenericType>()->getRows();
+        *_piCols        = ((types::InternalType*)_piAddress)->getAs<GenericType>()->getCols();
     }
     else
     {
@@ -211,15 +211,15 @@ SciErr getVarType(void* _pvCtx, int* _piAddress, int* _piType)
     case types::GenericType::RealBool :
         *_piType = sci_boolean;
         break;
-        //case GenericType::RealSparse :
-        //    *_piType = sci_sparse;
-        //    break;
-        //case GenericType::RealBoolSparse :
-        //    *_piType = sci_boolean_sparse;
-        //    break;
-        //case GenericType::RealMatlabSparse :
-        //    *_piType = sci_matlab_sparse;
-        //    break;
+    case GenericType::RealSparse :
+        *_piType = sci_sparse;
+        break;
+    case GenericType::RealSparseBool :
+        *_piType = sci_boolean_sparse;
+        break;
+    //case GenericType::RealMatlabSparse :
+    //    *_piType = sci_matlab_sparse;
+    //    break;
     case GenericType::RealInt8 :
     case GenericType::RealUInt8 :
     case GenericType::RealInt16 :
index ecc4a64..a1d93a0 100644 (file)
@@ -35,7 +35,8 @@ libsciast_la_CXXFLAGS = \
        -I$(top_srcdir)/modules/api_scilab/includes \
        -I$(top_srcdir)/modules/string/includes \
        -I$(top_srcdir)/modules/threads/includes \
-    -I$(top_srcdir)/libs/dynamiclibrary/includes
+    -I$(top_srcdir)/libs/dynamiclibrary/includes \
+    $(EIGEN_CPPFLAGS)
 
 
 libsciast_la_includedir=$(pkgincludedir)/ast
index 05eea21..71c4aef 100644 (file)
@@ -419,7 +419,8 @@ libsciast_la_CXXFLAGS = \
        -I$(top_srcdir)/modules/api_scilab/includes \
        -I$(top_srcdir)/modules/string/includes \
        -I$(top_srcdir)/modules/threads/includes \
-    -I$(top_srcdir)/libs/dynamiclibrary/includes
+    -I$(top_srcdir)/libs/dynamiclibrary/includes \
+    $(EIGEN_CPPFLAGS)
 
 libsciast_la_includedir = $(pkgincludedir)/ast
 libsciast_la_include_HEADERS = 
index fdf6d38..d908069 100644 (file)
@@ -76,7 +76,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>includes;..\symbol\includes;..\types\includes;..\functions_manager\includes;../core/includes;..\elementary_functions\includes;../operations/includes;../localization/includes;../../libs/intl;../output_stream/includes;../system_env/includes;../string/includes;../api_scilab/includes;../threads/includes;../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;..\symbol\includes;..\types\includes;..\functions_manager\includes;../core/includes;..\elementary_functions\includes;../operations/includes;../localization/includes;../../libs/intl;../output_stream/includes;../system_env/includes;../string/includes;../api_scilab/includes;../threads/includes;../../libs/dynamiclibrary/includes;../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;AST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>includes;..\symbol\includes;..\types\includes;..\functions_manager\includes;../core/includes;..\elementary_functions\includes;../operations/includes;../localization/includes;../../libs/intl;../output_stream/includes;../system_env/includes;../string/includes;../api_scilab/includes;../threads/includes;../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;..\symbol\includes;..\types\includes;..\functions_manager\includes;../core/includes;..\elementary_functions\includes;../operations/includes;../localization/includes;../../libs/intl;../output_stream/includes;../system_env/includes;../string/includes;../api_scilab/includes;../threads/includes;../../libs/dynamiclibrary/includes;../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;AST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>includes;..\symbol\includes;..\types\includes;..\functions_manager\includes;../core/includes;..\elementary_functions\includes;../operations/includes;../localization/includes;../../libs/intl;../output_stream/includes;../system_env/includes;../string/includes;../api_scilab/includes;../threads/includes;../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;..\symbol\includes;..\types\includes;..\functions_manager\includes;../core/includes;..\elementary_functions\includes;../operations/includes;../localization/includes;../../libs/intl;../output_stream/includes;../system_env/includes;../string/includes;../api_scilab/includes;../threads/includes;../../libs/dynamiclibrary/includes;../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;AST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>includes;..\symbol\includes;..\types\includes;..\functions_manager\includes;../core/includes;..\elementary_functions\includes;../operations/includes;../localization/includes;../../libs/intl;../output_stream/includes;../system_env/includes;../string/includes;../api_scilab/includes;../threads/includes;../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;..\symbol\includes;..\types\includes;..\functions_manager\includes;../core/includes;..\elementary_functions\includes;../operations/includes;../localization/includes;../../libs/intl;../output_stream/includes;../system_env/includes;../string/includes;../api_scilab/includes;../threads/includes;../../libs/dynamiclibrary/includes;../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;AST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
index 5a705a2..48ba96b 100644 (file)
@@ -43,9 +43,9 @@ void visitprivate(const AssignExp  &e)
             result_set(NULL);
             if(pIT->isImplicitList())
             {
-                if(pIT->getAsImplicitList()->isComputable())
+                if(pIT->getAs<ImplicitList>()->isComputable())
                 {
-                    InternalType *pTemp = pIT->getAsImplicitList()->extractFullMatrix();
+                    InternalType *pTemp = pIT->getAs<ImplicitList>()->extractFullMatrix();
                     delete pIT;
                     pIT = pTemp;
                 }
@@ -129,7 +129,7 @@ void visitprivate(const AssignExp  &e)
             //fisrt extract implicit list
             if(pITR->isImplicitList())
             {
-                InternalType *pIL = pITR->getAsImplicitList()->extractFullMatrix();
+                InternalType *pIL = pITR->getAs<ImplicitList>()->extractFullMatrix();
                 pITR = pIL;
             }
             else if(pITR->isContainer() && pITR->isRef())
@@ -318,6 +318,10 @@ void visitprivate(const AssignExp  &e)
                 {
                     pRet = pIT->getAs<Bool>()->insert(pArgs, pInsert);
                 }
+                else if(pIT->isSparse() && pInsert->isDouble())
+                {
+                    pRet = pIT->getAs<Sparse>()->insert(pArgs, pInsert);
+                }
                 else if(pIT->isPoly() && pInsert->isPoly())
                 {
                     pRet = pIT->getAs<Polynom>()->insert(pArgs, pInsert);
@@ -356,7 +360,7 @@ void visitprivate(const AssignExp  &e)
                 }
                 else if(pIT->isList())
                 {
-                    pRet = pIT->getAsList()->insert(pArgs, pInsert);
+                    pRet = pIT->getAs<List>()->insert(pArgs, pInsert);
                 }
                 else if(pIT->isStruct())
                 {
@@ -589,7 +593,7 @@ void visitprivate(const AssignExp  &e)
             //fisrt extract implicit list
             if(result_get()->isImplicitList())
             {
-                InternalType *pIL = result_get()->getAsImplicitList()->extractFullMatrix();
+                InternalType *pIL = ((InternalType*)result_get())->getAs<ImplicitList>()->extractFullMatrix();
                 if(result_get()->isDeletable())
                 {
                     delete result_get();
@@ -716,9 +720,9 @@ void visitprivate(const AssignExp  &e)
             InternalType *pIT = result_get();
             if(pIT->isImplicitList())
             {
-                if(pIT->getAsImplicitList()->isComputable())
+                if(pIT->getAs<ImplicitList>()->isComputable())
                 {
-                    InternalType *pTemp = pIT->getAsImplicitList()->extractFullMatrix();
+                    InternalType *pTemp = pIT->getAs<ImplicitList>()->extractFullMatrix();
                     delete pIT;
                     result_set(NULL);
                     pIT = pTemp;
@@ -740,7 +744,7 @@ void visitprivate(const AssignExp  &e)
             }
             else if(pHead->isTList())
             {
-                TList* pT = pHead->getAsTList();
+                TList* pT = pHead->getAs<TList>();
                 if(pT->exists(pTail->name_get().name_get()))
                 {
                     pT->set(pTail->name_get().name_get(), pIT);
index f2d08c6..fc7d5a5 100644 (file)
@@ -263,7 +263,7 @@ void visitprivate(const CallExp &e)
             }
             else if(rtIndex  == InternalType::RealString)
             {
-                ResultList = pIT->getAsTList()->extractStrings(stFields);
+                ResultList = pIT->getAs<TList>()->extractStrings(stFields);
             }
 
             if(ResultList.size() == 1)
@@ -323,7 +323,7 @@ void visitprivate(const CallExp &e)
                 break;
             case InternalType::RealList :
                 {
-                    ResultList = pIT->getAsList()->extract(pArgs);
+                    ResultList = pIT->getAs<List>()->extract(pArgs);
 
                     switch(ResultList.size())
                     {
@@ -350,6 +350,12 @@ void visitprivate(const CallExp &e)
             case InternalType::RealCell :
                 pOut = pIT->getAs<Cell>()->extract(pArgs);
                 break;
+            case InternalType::RealSparse :
+                pOut = pIT->getAs<Sparse>()->extract(pArgs);
+                break;
+            case InternalType::RealSparseBool :
+                //pOut = pIT->getAs<SparseBool>()->extract(pArgs);
+                break;
             case InternalType::RealStruct :
                 {
                     Struct* pStr = pIT->getAs<Struct>();
index f097488..0bc0eea 100644 (file)
@@ -47,14 +47,22 @@ void visitprivate(const MatrixExp &e)
 
                 (*col)->accept(*this);
 
-                if(result_get()->isGenericType() == false)
+                InternalType *pIT = result_get();
+                if(pIT == NULL)
+                {
+                    continue;
+                }
+
+                //reset result but whitout delete the value
+                result_set(NULL);
+
+                if(pIT->isGenericType() == false)
                 {
                     std::wostringstream os;
                     os << L"unable to concatenate\n";
                     throw ScilabError(os.str(), 999, (*col)->location_get());
                 }
 
-                InternalType *pIT = result_get();
                 GenericType* pGT = pIT->getAs<GenericType>();
                 if(pGT->isDouble() && pGT->getAs<Double>()->isEmpty())
                 {
@@ -101,6 +109,11 @@ void visitprivate(const MatrixExp &e)
                 poRow = p;
             }
 
+            if(poRow == NULL)
+            {
+                continue;
+            }
+
             GenericType* pGT = poRow->getAs<GenericType>();
             if(poResult == NULL)
             {
index 51bf661..8cf66dd 100644 (file)
@@ -48,7 +48,7 @@ void visitprivate(const OpExp &e)
 
         if(TypeL == GenericType::RealImplicitList)
         {
-            ImplicitList* pIL = pITL->getAsImplicitList();
+            ImplicitList* pIL = pITL->getAs<ImplicitList>();
             if(pIL->isComputable())
             {
                 pITL = pIL->extractFullMatrix();
@@ -58,7 +58,7 @@ void visitprivate(const OpExp &e)
 
         if(TypeR == GenericType::RealImplicitList)
         {
-            ImplicitList* pIL = pITR->getAsImplicitList();
+            ImplicitList* pIL = pITR->getAs<ImplicitList>();
             if(pIL->isComputable())
             {
                 pITR = pIL->extractFullMatrix();
@@ -251,223 +251,82 @@ void visitprivate(const OpExp &e)
             }
         case OpExp::lt :
             {
-                if(TypeL == GenericType::RealDouble && TypeR == GenericType::RealDouble)
+              try
                 {
-                    Double *pL                 = pITL->getAs<Double>();
-                    Double *pR                 = pITR->getAs<Double>();
-
-                    if(pR->getSize() == 1)
-                    {
-                        pResult                                = new Bool(pL->getRows(), pL->getCols());
-                        double dblRef  = pR->getReal(0,0);
-                        for(int i = 0 ; i < pL->getRows() ; i++)
-                        {
-                            for(int j = 0 ; j < pL->getCols() ; j++)
-                            {
-                                pResult->getAs<types::Bool>()->set(i, j, pL->getReal(i, j) < dblRef);
-                            }
-                        }
-                    }
-                    else if(pL->getSize() == 1)
-                    {
-                        pResult                                = new Bool(pR->getRows(), pR->getCols());
-                        double dblRef  = pL->getReal(0,0);
-                        for(int i = 0 ; i < pR->getRows() ; i++)
-                        {
-                            for(int j = 0 ; j < pR->getCols() ; j++)
-                            {
-                                pResult->getAs<types::Bool>()->set(i, j, dblRef < pR->getReal(i, j));
-                            }
-                        }
-                    }
-                    else if(pR->getRows() == pL->getRows() && pR->getCols() == pL->getCols())
-                    {
-                        pResult                                = new Bool(pR->getRows(), pR->getCols());
-                        for(int i = 0 ; i < pR->getRows() ; i++)
-                        {
-                            for(int j = 0 ; j < pR->getCols() ; j++)
-                            {
-                                pResult->getAs<types::Bool>()->set(i, j, pL->getReal(i, j) < pR->getReal(i, j));
-                            }
-                        }
-                    }
-                    else
-                    {
-                        pResult = new Bool(false);
-                    }
-
-                    result_set(pResult);
+                    pResult = GenericLess(pITL, pITR);
                 }
-                else
+                catch (ScilabException *pSE)
+                {
+                    pSE->SetErrorLocation(e.right_get().location_get());
+                    throw pSE;
+                }
+
+                if (pResult == NULL)
                 {
-                    result_set(callOverload(e.oper_get(), pITL, pITR));
+                    // We did not have any algorithm matching, so we try to call OverLoad
+                    pResult = callOverload(e.oper_get(), pITL, pITR);
                 }
+                result_set(pResult);
                 break;
             }
         case OpExp::le :
             {
-                if(TypeL == GenericType::RealDouble && TypeR == GenericType::RealDouble)
+              try
                 {
-                    Double *pL                 = pITL->getAs<Double>();
-                    Double *pR                 = pITR->getAs<Double>();
-
-                    if(pR->getSize() == 1)
-                    {
-                        pResult                                = new Bool(pL->getRows(), pL->getCols());
-                        double dblRef  = pR->getReal(0,0);
-                        for(int i = 0 ; i < pL->getRows() ; i++)
-                        {
-                            for(int j = 0 ; j < pL->getCols() ; j++)
-                            {
-                                pResult->getAs<types::Bool>()->set(i, j, pL->getReal(i, j) <= dblRef);
-                            }
-                        }
-                    }
-                    else if(pL->getSize() == 1)
-                    {
-                        pResult                                = new Bool(pR->getRows(), pR->getCols());
-                        double dblRef  = pL->getReal(0,0);
-                        for(int i = 0 ; i < pR->getRows() ; i++)
-                        {
-                            for(int j = 0 ; j < pR->getCols() ; j++)
-                            {
-                                pResult->getAs<types::Bool>()->set(i, j, dblRef <= pR->getReal(i, j));
-                            }
-                        }
-                    }
-                    else if(pR->getRows() == pL->getRows() && pR->getCols() == pL->getCols())
-                    {
-                        pResult                                = new Bool(pR->getRows(), pR->getCols());
-                        for(int i = 0 ; i < pR->getRows() ; i++)
-                        {
-                            for(int j = 0 ; j < pR->getCols() ; j++)
-                            {
-                                pResult->getAs<types::Bool>()->set(i, j, pL->getReal(i, j) <= pR->getReal(i, j));
-                            }
-                        }
-                    }
-                    else
-                    {
-                        pResult = new Bool(false);
-                    }
-
-                    result_set(pResult);
+                    pResult = GenericLessEqual(pITL, pITR);
                 }
-                else
+                catch (ScilabException *pSE)
+                {
+                    pSE->SetErrorLocation(e.right_get().location_get());
+                    throw pSE;
+                }
+
+                if (pResult == NULL)
                 {
-                    result_set(callOverload(e.oper_get(), pITL, pITR));
+                    // We did not have any algorithm matching, so we try to call OverLoad
+                    pResult = callOverload(e.oper_get(), pITL, pITR);
                 }
+                result_set(pResult);
                 break;
             }
         case OpExp::gt :
             {
-                if(TypeL == GenericType::RealDouble && TypeR == GenericType::RealDouble)
+              try
                 {
-                    Double *pL                 = pITL->getAs<Double>();
-                    Double *pR                 = pITR->getAs<Double>();
-
-                    if(pR->getSize() == 1)
-                    {
-                        pResult                                = new Bool(pL->getRows(), pL->getCols());
-                        double dblRef  = pR->getReal(0,0);
-                        for(int i = 0 ; i < pL->getRows() ; i++)
-                        {
-                            for(int j = 0 ; j < pL->getCols() ; j++)
-                            {
-                                pResult->getAs<types::Bool>()->set(i, j, pL->getReal(i, j) > dblRef);
-                            }
-                        }
-                    }
-                    else if(pL->getSize() == 1)
-                    {
-                        pResult                                = new Bool(pR->getRows(), pR->getCols());
-                        double dblRef  = pL->getReal(0,0);
-                        for(int i = 0 ; i < pR->getRows() ; i++)
-                        {
-                            for(int j = 0 ; j < pR->getCols() ; j++)
-                            {
-                                pResult->getAs<types::Bool>()->set(i, j, dblRef > pR->getReal(i, j));
-                            }
-                        }
-                    }
-                    else if(pR->getRows() == pL->getRows() && pR->getCols() == pL->getCols())
-                    {
-                        pResult                                = new Bool(pR->getRows(), pR->getCols());
-
-                        for(int i = 0 ; i < pR->getRows() ; i++)
-                        {
-                            for(int j = 0 ; j < pR->getCols() ; j++)
-                            {
-                                pResult->getAs<types::Bool>()->set(i, j, pL->getReal(i, j) > pR->getReal(i, j));
-                            }
-                        }
-                    }
-                    else
-                    {
-                        pResult = new Bool(false);
-                    }
-
-                    result_set(pResult);
+                    pResult = GenericGreater(pITL, pITR);
                 }
-                else
+                catch (ScilabException *pSE)
+                {
+                    pSE->SetErrorLocation(e.right_get().location_get());
+                    throw pSE;
+                }
+
+                if (pResult == NULL)
                 {
-                    result_set(callOverload(e.oper_get(), pITL, pITR));
+                    // We did not have any algorithm matching, so we try to call OverLoad
+                    pResult = callOverload(e.oper_get(), pITL, pITR);
                 }
+                result_set(pResult);
                 break;
             }
         case OpExp::ge :
             {
-                if(TypeL == GenericType::RealDouble && TypeR == GenericType::RealDouble)
+              try
                 {
-                    Double *pL                 = pITL->getAs<Double>();
-                    Double *pR                 = pITR->getAs<Double>();
-
-                    if(pR->getSize() == 1)
-                    {
-                        pResult                                = new Bool(pL->getRows(), pL->getCols());
-                        double dblRef  = pR->getReal(0,0);
-                        for(int i = 0 ; i < pL->getRows() ; i++)
-                        {
-                            for(int j = 0 ; j < pL->getCols() ; j++)
-                            {
-                                pResult->getAs<types::Bool>()->set(i, j, pL->getReal(i, j) >= dblRef);
-                            }
-                        }
-                    }
-                    else if(pL->getSize() == 1)
-                    {
-                        pResult                                = new Bool(pR->getRows(), pR->getCols());
-                        double dblRef  = pL->getReal(0,0);
-                        for(int i = 0 ; i < pR->getRows() ; i++)
-                        {
-                            for(int j = 0 ; j < pR->getCols() ; j++)
-                            {
-                                pResult->getAs<types::Bool>()->set(i, j, dblRef >= pR->getReal(i, j));
-                            }
-                        }
-                    }
-                    else if(pR->getRows() == pL->getRows() && pR->getCols() == pL->getCols())
-                    {
-                        pResult                                = new Bool(pR->getRows(), pR->getCols());
-                        for(int i = 0 ; i < pR->getRows() ; i++)
-                        {
-                            for(int j = 0 ; j < pR->getCols() ; j++)
-                            {
-                                pResult->getAs<types::Bool>()->set(i, j, pL->getReal(i, j) >= pR->getReal(i, j));
-                            }
-                        }
-                    }
-                    else
-                    {
-                        pResult = new Bool(false);
-                    }
-
-                    result_set(pResult);
+                    pResult = GenericGreaterEqual(pITL, pITR);
                 }
-                else
+                catch (ScilabException *pSE)
+                {
+                    pSE->SetErrorLocation(e.right_get().location_get());
+                    throw pSE;
+                }
+
+                if (pResult == NULL)
                 {
-                    result_set(callOverload(e.oper_get(), pITL, pITR));
+                    // We did not have any algorithm matching, so we try to call OverLoad
+                    pResult = callOverload(e.oper_get(), pITL, pITR);
                 }
+                result_set(pResult);
                 break;
             }
         case OpExp::power :
index 80ec7da..addf58d 100644 (file)
@@ -37,8 +37,9 @@
 #include "types_substraction.hxx"
 #include "types_divide.hxx"
 #include "types_power.hxx"
-#include "types_comparison_equal.hxx"
-#include "types_comparison_non_equal.hxx"
+#include "types_comparison_eq.hxx"
+#include "types_comparison_ne.hxx"
+#include "types_comparison_lt_le_gt_ge.hxx"
 #include "configvariable.hxx"
 #include "overload.hxx"
 #include "scilabexception.hxx"
@@ -286,7 +287,7 @@ namespace ast
                     InternalType *pIT = result_get();
                     if(pIT->isImplicitList())
                     {
-                        pIT = pIT->getAsImplicitList()->extractFullMatrix();
+                        pIT = pIT->getAs<ImplicitList>()->extractFullMatrix();
                     }
 
                     pC->set(i,j, pIT);
@@ -370,7 +371,7 @@ namespace ast
             result_set(pI);
             if(pI != NULL)
             {
-                if(e.is_verbose() && pI->getAsCallable() == false)
+                if(e.is_verbose() && pI->isCallable() == false)
                 {
                     std::wostringstream ostr;
                     ostr << e.name_get().name_get() << L"  = " << L"(" << pI->getRef() << L")"<< std::endl;
@@ -496,7 +497,7 @@ namespace ast
                 SimpleVar *psvRightMember = dynamic_cast<SimpleVar *>(const_cast<Exp *>(e.tail_get()));
                 if(psvRightMember != NULL)
                 {
-                    TList* psValue = result_get()->getAsTList();
+                    TList* psValue = ((InternalType*)result_get())->getAs<TList>();
                     result_set(NULL);
                     if(psValue->exists(psvRightMember->name_get().name_get()))
                     {
@@ -541,6 +542,7 @@ namespace ast
             {//condition == true
                 if(e.is_breakable())
                 {
+                    const_cast<IfExp*>(&e)->break_reset();
                     const_cast<Exp*>(&e.then_get())->breakable_set();
                 }
 
@@ -552,6 +554,7 @@ namespace ast
 
                 if(e.is_returnable())
                 {
+                    const_cast<IfExp*>(&e)->return_reset();
                     const_cast<Exp*>(&e.then_get())->returnable_set();
                 }
 
@@ -700,7 +703,7 @@ namespace ast
             if(result_get()->isImplicitList())
             {
                 bool bNeedUpdate = false;
-                ImplicitList* pVar = result_get()->getAsImplicitList();
+                ImplicitList* pVar = ((InternalType*)result_get())->getAs<ImplicitList>();
 
                 InternalType *pIT = NULL;
                 pIT = pVar->extractValue(0);
@@ -1005,9 +1008,9 @@ namespace ast
                     if(result_get() != NULL)
                     {
                         bool bImplicitCall = false;
-                        if(result_get()->getAsCallable())//to manage call without ()
+                        if(result_get()->isCallable())//to manage call without ()
                         {
-                            Callable *pCall = result_get()->getAsCallable();
+                            Callable *pCall = ((InternalType*)result_get())->getAs<Callable>();
                             types::typed_list out;
                             types::typed_list in;
 
@@ -1135,7 +1138,7 @@ namespace ast
                             os << std::endl << std::endl;
                             if(ConfigVariable::getLastErrorFunction() == L"")
                             {
-                                ConfigVariable::setLastErrorFunction(result_get()->getAsCallable()->getName());
+                                ConfigVariable::setLastErrorFunction(((InternalType*)result_get())->getAs<Callable>()->getName());
                             }
                             throw ScilabMessage(os.str(), 0, (*itExp)->location_get());
                         }
@@ -1166,7 +1169,7 @@ namespace ast
                                 PrintVisitor printMe(os);
                                 pCall->accept(printMe);
                                 os << std::endl << std::endl;
-                                ConfigVariable::setLastErrorFunction(result_get()->getAsCallable()->getName());
+                                ConfigVariable::setLastErrorFunction(((InternalType*)result_get())->getAs<Callable>()->getName());
                                 scilabErrorW(se.GetErrorMessage().c_str());
                                 throw ScilabMessage(os.str(), 0, (*itExp)->location_get());
                             }
@@ -1266,7 +1269,7 @@ namespace ast
 
             if(result_get()->isImplicitList())
             {
-                InternalType *pIT = result_get()->getAsImplicitList()->extractFullMatrix();
+                InternalType *pIT = ((InternalType*)result_get())->getAs<ImplicitList>()->extractFullMatrix();
                 if(result_get()->isDeletable())
                 {
                     delete result_get();
index 5f921b8..d3cdd68 100644 (file)
@@ -398,31 +398,31 @@ types::InternalType* AddElementToVariable(types::InternalType* _poDest, types::I
                        break;
                case types::GenericType::RealImplicitList :
                        {
-                               if(_poSource->getAsImplicitList()->getStartType() == types::InternalType::RealPoly)
+                               if(_poSource->getAs<ImplicitList>()->getStartType() == types::InternalType::RealPoly)
                                {
-                                       poResult->getAsImplicitList()->setStart(_poSource->getAsImplicitList()->getStart());
+                                       poResult->getAs<ImplicitList>()->setStart(_poSource->getAs<ImplicitList>()->getStart());
                                }
                                else
                                {
-                                       poResult->getAsImplicitList()->setStart(_poSource->getAsImplicitList()->getStart());
+                                       poResult->getAs<ImplicitList>()->setStart(_poSource->getAs<ImplicitList>()->getStart());
                                }
 
-                               if(_poSource->getAsImplicitList()->getStepType() == types::InternalType::RealPoly)
+                               if(_poSource->getAs<ImplicitList>()->getStepType() == types::InternalType::RealPoly)
                                {
-                                       poResult->getAsImplicitList()->setStep(_poSource->getAsImplicitList()->getStep());
+                                       poResult->getAs<ImplicitList>()->setStep(_poSource->getAs<ImplicitList>()->getStep());
                                }
                                else
                                {
-                                       poResult->getAsImplicitList()->setStep(_poSource->getAsImplicitList()->getStep());
+                                       poResult->getAs<ImplicitList>()->setStep(_poSource->getAs<ImplicitList>()->getStep());
                                }
 
-                               if(_poSource->getAsImplicitList()->getEndType() == types::InternalType::RealPoly)
+                               if(_poSource->getAs<ImplicitList>()->getEndType() == types::InternalType::RealPoly)
                                {
-                                       poResult->getAsImplicitList()->setEnd(_poSource->getAsImplicitList()->getEnd());
+                                       poResult->getAs<ImplicitList>()->setEnd(_poSource->getAs<ImplicitList>()->getEnd());
                                }
                                else
                                {
-                                       poResult->getAsImplicitList()->setEnd(_poSource->getAsImplicitList()->getEnd());
+                                       poResult->getAs<ImplicitList>()->setEnd(_poSource->getAs<ImplicitList>()->getEnd());
                                }
                                break;
                        }
index cbe97d9..e752097 100644 (file)
@@ -76,7 +76,8 @@ CORE_C_SOURCES = \
     src/c/signal_mgmt.c
 
 if USE_DYNAMIC_STACK
-CORE_C_SOURCES += src/c/scimem64.c
+CORE_C_SOURCES += \
+    src/c/scimem64.c
 endif
 
 CORE_FORTRAN_SOURCES = \
@@ -175,56 +176,58 @@ CORE_CPP_SOURCES = \
        src/cpp/runner.cpp
 
 if USE_DYNAMIC_STACK
-CORE_FORTRAN_SOURCES += src/fortran/relocstack.f
+CORE_FORTRAN_SOURCES += \
+    src/fortran/relocstack.f
 endif
 
-GATEWAY_C_SOURCES = sci_gateway/c/sci_mtlb_mode.c \
-sci_gateway/c/sci_where.c \
-sci_gateway/c/sci_errcatch.c \
-sci_gateway/c/sci_format.c \
-sci_gateway/c/sci_getmemory.c \
-sci_gateway/c/sci_havewindow.c \
-sci_gateway/c/sci_delbpt.c \
-sci_gateway/c/sci_macr2lst.c \
-sci_gateway/c/sci_errclear.c \
-sci_gateway/c/sci_funcprot.c \
-sci_gateway/c/sci_newfun.c \
-sci_gateway/c/sci_dispbpt.c \
-sci_gateway/c/sci_intppty.c \
-sci_gateway/c/sci_ieee.c \
-sci_gateway/c/sci_gstacksize.c \
-sci_gateway/c/sci_funptr.c \
-sci_gateway/c/sci_return.c \
-sci_gateway/c/sci_clearfun.c \
-sci_gateway/c/sci_setbpt.c \
-sci_gateway/c/sci_what.c \
-sci_gateway/c/sci_predef.c \
-sci_gateway/c/sci_type.c \
-sci_gateway/c/sci_typename.c \
-sci_gateway/c/sci_mode.c \
-sci_gateway/c/sci_macr2tree.c \
-sci_gateway/c/sci_iserror.c \
-sci_gateway/c/sci_getdebuginfo.c \
-sci_gateway/c/sci_debug.c \
-sci_gateway/c/gw_core.c \
-sci_gateway/c/gw_user.c \
-sci_gateway/c/gw_user2.c \
-sci_gateway/c/sci_getvariablesonstack.c \
-sci_gateway/c/sci_readgateway.c \
-sci_gateway/c/sci_comp.c
+GATEWAY_C_SOURCES = \
+    sci_gateway/c/sci_mtlb_mode.c \
+    sci_gateway/c/sci_where.c \
+    sci_gateway/c/sci_errcatch.c \
+    sci_gateway/c/sci_format.c \
+    sci_gateway/c/sci_getmemory.c \
+    sci_gateway/c/sci_havewindow.c \
+    sci_gateway/c/sci_delbpt.c \
+    sci_gateway/c/sci_macr2lst.c \
+    sci_gateway/c/sci_errclear.c \
+    sci_gateway/c/sci_funcprot.c \
+    sci_gateway/c/sci_newfun.c \
+    sci_gateway/c/sci_dispbpt.c \
+    sci_gateway/c/sci_intppty.c \
+    sci_gateway/c/sci_ieee.c \
+    sci_gateway/c/sci_gstacksize.c \
+    sci_gateway/c/sci_funptr.c \
+    sci_gateway/c/sci_return.c \
+    sci_gateway/c/sci_clearfun.c \
+    sci_gateway/c/sci_setbpt.c \
+    sci_gateway/c/sci_what.c \
+    sci_gateway/c/sci_predef.c \
+    sci_gateway/c/sci_type.c \
+    sci_gateway/c/sci_typename.c \
+    sci_gateway/c/sci_mode.c \
+    sci_gateway/c/sci_macr2tree.c \
+    sci_gateway/c/sci_iserror.c \
+    sci_gateway/c/sci_getdebuginfo.c \
+    sci_gateway/c/sci_debug.c \
+    sci_gateway/c/gw_core.c \
+    sci_gateway/c/gw_user.c \
+    sci_gateway/c/gw_user2.c \
+    sci_gateway/c/sci_getvariablesonstack.c \
+    sci_gateway/c/sci_readgateway.c \
+    sci_gateway/c/sci_comp.c
 
 GATEWAY_FORTRAN_SOURCES =  \
-sci_gateway/fortran/sci_f_mtlb_mode.f \
-sci_gateway/fortran/sci_f_dispbpt.f \
-sci_gateway/fortran/sci_f_intppty.f \
-sci_gateway/fortran/sci_f_ieee.f \
-sci_gateway/fortran/sci_f_macrovar.f \
-sci_gateway/fortran/sci_f_errcatch.f \
-sci_gateway/fortran/sci_f_setbpt.f \
-sci_gateway/fortran/sci_f_delbpt.f \
-sci_gateway/fortran/where.f \
-sci_gateway/fortran/sci_f_iserror.f \
-sci_gateway/fortran/sci_f_debug.f
+    sci_gateway/fortran/sci_f_mtlb_mode.f \
+    sci_gateway/fortran/sci_f_dispbpt.f \
+    sci_gateway/fortran/sci_f_intppty.f \
+    sci_gateway/fortran/sci_f_ieee.f \
+    sci_gateway/fortran/sci_f_macrovar.f \
+    sci_gateway/fortran/sci_f_errcatch.f \
+    sci_gateway/fortran/sci_f_setbpt.f \
+    sci_gateway/fortran/sci_f_delbpt.f \
+    sci_gateway/fortran/where.f \
+    sci_gateway/fortran/sci_f_iserror.f \
+    sci_gateway/fortran/sci_f_debug.f
 
 GATEWAY_CPP_SOURCES =  \
        sci_gateway/cpp/sci_getmodules.cpp \
@@ -294,12 +297,14 @@ libscicore_la_CPPFLAGS = \
        -I$(top_srcdir)/libs/MALLOC/includes/ \
     -I$(top_srcdir)/modules/threads/includes \
     -I$(top_srcdir)/modules/fileio/includes \
-    -I$(top_srcdir)/libs/dynamiclibrary/includes
+    -I$(top_srcdir)/libs/dynamiclibrary/includes \
+    $(EIGEN_CPPFLAGS)
 
 # Used by sci_getdebuginfo:
 if TCLTK
-libscicore_la_CFLAGS +=   $(TCL_INC_PATH) \
-                                 $(TK_INC_PATH)
+libscicore_la_CFLAGS += \
+    $(TCL_INC_PATH) \
+    $(TK_INC_PATH)
 endif
 
 pkglib_LTLIBRARIES = libscicore.la
index 9771482..6f81d57 100644 (file)
@@ -61,12 +61,17 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-@USE_DYNAMIC_STACK_TRUE@am__append_1 = src/c/scimem64.c
-@USE_DYNAMIC_STACK_TRUE@am__append_2 = src/fortran/relocstack.f
+@USE_DYNAMIC_STACK_TRUE@am__append_1 = \
+@USE_DYNAMIC_STACK_TRUE@    src/c/scimem64.c
+
+@USE_DYNAMIC_STACK_TRUE@am__append_2 = \
+@USE_DYNAMIC_STACK_TRUE@    src/fortran/relocstack.f
+
 
 # Used by sci_getdebuginfo:
-@TCLTK_TRUE@am__append_3 = $(TCL_INC_PATH) \
-@TCLTK_TRUE@                             $(TK_INC_PATH)
+@TCLTK_TRUE@am__append_3 = \
+@TCLTK_TRUE@    $(TCL_INC_PATH) \
+@TCLTK_TRUE@    $(TK_INC_PATH)
 
 DIST_COMMON = $(libscicore_la_include_HEADERS) $(srcdir)/Makefile.am \
        $(srcdir)/Makefile.in $(top_srcdir)/Makefile.incl.am
@@ -667,53 +672,54 @@ CORE_CPP_SOURCES = \
        src/cpp/with_module.cpp \
        src/cpp/runner.cpp
 
-GATEWAY_C_SOURCES = sci_gateway/c/sci_mtlb_mode.c \
-sci_gateway/c/sci_where.c \
-sci_gateway/c/sci_errcatch.c \
-sci_gateway/c/sci_format.c \
-sci_gateway/c/sci_getmemory.c \
-sci_gateway/c/sci_havewindow.c \
-sci_gateway/c/sci_delbpt.c \
-sci_gateway/c/sci_macr2lst.c \
-sci_gateway/c/sci_errclear.c \
-sci_gateway/c/sci_funcprot.c \
-sci_gateway/c/sci_newfun.c \
-sci_gateway/c/sci_dispbpt.c \
-sci_gateway/c/sci_intppty.c \
-sci_gateway/c/sci_ieee.c \
-sci_gateway/c/sci_gstacksize.c \
-sci_gateway/c/sci_funptr.c \
-sci_gateway/c/sci_return.c \
-sci_gateway/c/sci_clearfun.c \
-sci_gateway/c/sci_setbpt.c \
-sci_gateway/c/sci_what.c \
-sci_gateway/c/sci_predef.c \
-sci_gateway/c/sci_type.c \
-sci_gateway/c/sci_typename.c \
-sci_gateway/c/sci_mode.c \
-sci_gateway/c/sci_macr2tree.c \
-sci_gateway/c/sci_iserror.c \
-sci_gateway/c/sci_getdebuginfo.c \
-sci_gateway/c/sci_debug.c \
-sci_gateway/c/gw_core.c \
-sci_gateway/c/gw_user.c \
-sci_gateway/c/gw_user2.c \
-sci_gateway/c/sci_getvariablesonstack.c \
-sci_gateway/c/sci_readgateway.c \
-sci_gateway/c/sci_comp.c
+GATEWAY_C_SOURCES = \
+    sci_gateway/c/sci_mtlb_mode.c \
+    sci_gateway/c/sci_where.c \
+    sci_gateway/c/sci_errcatch.c \
+    sci_gateway/c/sci_format.c \
+    sci_gateway/c/sci_getmemory.c \
+    sci_gateway/c/sci_havewindow.c \
+    sci_gateway/c/sci_delbpt.c \
+    sci_gateway/c/sci_macr2lst.c \
+    sci_gateway/c/sci_errclear.c \
+    sci_gateway/c/sci_funcprot.c \
+    sci_gateway/c/sci_newfun.c \
+    sci_gateway/c/sci_dispbpt.c \
+    sci_gateway/c/sci_intppty.c \
+    sci_gateway/c/sci_ieee.c \
+    sci_gateway/c/sci_gstacksize.c \
+    sci_gateway/c/sci_funptr.c \
+    sci_gateway/c/sci_return.c \
+    sci_gateway/c/sci_clearfun.c \
+    sci_gateway/c/sci_setbpt.c \
+    sci_gateway/c/sci_what.c \
+    sci_gateway/c/sci_predef.c \
+    sci_gateway/c/sci_type.c \
+    sci_gateway/c/sci_typename.c \
+    sci_gateway/c/sci_mode.c \
+    sci_gateway/c/sci_macr2tree.c \
+    sci_gateway/c/sci_iserror.c \
+    sci_gateway/c/sci_getdebuginfo.c \
+    sci_gateway/c/sci_debug.c \
+    sci_gateway/c/gw_core.c \
+    sci_gateway/c/gw_user.c \
+    sci_gateway/c/gw_user2.c \
+    sci_gateway/c/sci_getvariablesonstack.c \
+    sci_gateway/c/sci_readgateway.c \
+    sci_gateway/c/sci_comp.c
 
 GATEWAY_FORTRAN_SOURCES = \
-sci_gateway/fortran/sci_f_mtlb_mode.f \
-sci_gateway/fortran/sci_f_dispbpt.f \
-sci_gateway/fortran/sci_f_intppty.f \
-sci_gateway/fortran/sci_f_ieee.f \
-sci_gateway/fortran/sci_f_macrovar.f \
-sci_gateway/fortran/sci_f_errcatch.f \
-sci_gateway/fortran/sci_f_setbpt.f \
-sci_gateway/fortran/sci_f_delbpt.f \
-sci_gateway/fortran/where.f \
-sci_gateway/fortran/sci_f_iserror.f \
-sci_gateway/fortran/sci_f_debug.f
+    sci_gateway/fortran/sci_f_mtlb_mode.f \
+    sci_gateway/fortran/sci_f_dispbpt.f \
+    sci_gateway/fortran/sci_f_intppty.f \
+    sci_gateway/fortran/sci_f_ieee.f \
+    sci_gateway/fortran/sci_f_macrovar.f \
+    sci_gateway/fortran/sci_f_errcatch.f \
+    sci_gateway/fortran/sci_f_setbpt.f \
+    sci_gateway/fortran/sci_f_delbpt.f \
+    sci_gateway/fortran/where.f \
+    sci_gateway/fortran/sci_f_iserror.f \
+    sci_gateway/fortran/sci_f_debug.f
 
 GATEWAY_CPP_SOURCES = \
        sci_gateway/cpp/sci_getmodules.cpp \
@@ -780,7 +786,8 @@ libscicore_la_CPPFLAGS = \
        -I$(top_srcdir)/libs/MALLOC/includes/ \
     -I$(top_srcdir)/modules/threads/includes \
     -I$(top_srcdir)/modules/fileio/includes \
-    -I$(top_srcdir)/libs/dynamiclibrary/includes
+    -I$(top_srcdir)/libs/dynamiclibrary/includes \
+    $(EIGEN_CPPFLAGS)
 
 pkglib_LTLIBRARIES = libscicore.la
 noinst_LTLIBRARIES = libscicore-algo.la
index 1105697..0171f75 100644 (file)
@@ -80,7 +80,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>includes;..\parse\includes;..\ast\includes;..\symbol\includes;..\types\includes;..\functions_manager\includes;../console/includes;..\system_env\includes;..\elementary_functions\includes;../operations/includes;../localization/includes;..\windows_tools\includes;$(SolutionDir)libs\MALLOC\includes;../shell/includes;$(SolutionDir)libs\intl;../history_manager/includes;../fileio/includes;../output_stream/includes;../string/includes;../api_scilab/includes;../threads/includes;../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;..\parse\includes;..\ast\includes;..\symbol\includes;..\types\includes;..\functions_manager\includes;../console/includes;..\system_env\includes;..\elementary_functions\includes;../operations/includes;../localization/includes;..\windows_tools\includes;$(SolutionDir)libs\MALLOC\includes;../shell/includes;$(SolutionDir)libs\intl;../history_manager/includes;../fileio/includes;../output_stream/includes;../string/includes;../api_scilab/includes;../threads/includes;../../libs/dynamiclibrary/includes;../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;__CORE_YASP__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>includes;..\parse\includes;..\ast\includes;..\symbol\includes;..\types\includes;..\functions_manager\includes;../console/includes;..\system_env\includes;..\elementary_functions\includes;../operations/includes;../localization/includes;..\windows_tools\includes;$(SolutionDir)libs\MALLOC\includes;../shell/includes;$(SolutionDir)libs\intl;../history_manager/includes;../fileio/includes;../output_stream/includes;../string/includes;../api_scilab/includes;../threads/includes;../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;..\parse\includes;..\ast\includes;..\symbol\includes;..\types\includes;..\functions_manager\includes;../console/includes;..\system_env\includes;..\elementary_functions\includes;../operations/includes;../localization/includes;..\windows_tools\includes;$(SolutionDir)libs\MALLOC\includes;../shell/includes;$(SolutionDir)libs\intl;../history_manager/includes;../fileio/includes;../output_stream/includes;../string/includes;../api_scilab/includes;../threads/includes;../../libs/dynamiclibrary/includes;../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;__CORE_YASP__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>includes;..\parse\includes;..\ast\includes;..\symbol\includes;..\types\includes;..\functions_manager\includes;../console/includes;..\system_env\includes;..\elementary_functions\includes;../operations/includes;../localization/includes;..\windows_tools\includes;$(SolutionDir)libs\MALLOC\includes;../shell/includes;$(SolutionDir)libs\intl;../history_manager/includes;../fileio/includes;../output_stream/includes;../string/includes;../api_scilab/includes;../threads/includes;../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;..\parse\includes;..\ast\includes;..\symbol\includes;..\types\includes;..\functions_manager\includes;../console/includes;..\system_env\includes;..\elementary_functions\includes;../operations/includes;../localization/includes;..\windows_tools\includes;$(SolutionDir)libs\MALLOC\includes;../shell/includes;$(SolutionDir)libs\intl;../history_manager/includes;../fileio/includes;../output_stream/includes;../string/includes;../api_scilab/includes;../threads/includes;../../libs/dynamiclibrary/includes;../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;__CORE_YASP__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <PrecompiledHeader>
       <TargetEnvironment>X64</TargetEnvironment>
     </Midl>
     <ClCompile>
-      <AdditionalIncludeDirectories>includes;..\parse\includes;..\ast\includes;..\symbol\includes;..\types\includes;..\functions_manager\includes;../console/includes;..\system_env\includes;..\elementary_functions\includes;../operations/includes;../localization/includes;..\windows_tools\includes;$(SolutionDir)libs\MALLOC\includes;../shell/includes;$(SolutionDir)libs\intl;../history_manager/includes;../fileio/includes;../output_stream/includes;../string/includes;../api_scilab/includes;../threads/includes;../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;..\parse\includes;..\ast\includes;..\symbol\includes;..\types\includes;..\functions_manager\includes;../console/includes;..\system_env\includes;..\elementary_functions\includes;../operations/includes;../localization/includes;..\windows_tools\includes;$(SolutionDir)libs\MALLOC\includes;../shell/includes;$(SolutionDir)libs\intl;../history_manager/includes;../fileio/includes;../output_stream/includes;../string/includes;../api_scilab/includes;../threads/includes;../../libs/dynamiclibrary/includes;../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;__CORE_YASP__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <PrecompiledHeader>
index 3622616..1e4afa4 100644 (file)
@@ -14,6 +14,8 @@
 #define __RUNNER_HXX__
 
 #include <iostream>
+#include "exp.hxx"
+#include "execvisitor.hxx"
 
 extern "C"
 {
@@ -21,8 +23,6 @@ extern "C"
 #include "dynlib_core_gw.h"
 }
 
-#include "exp.hxx"
-#include "execvisitor.hxx"
 #include "threadId.hxx"
 
 class CORE_GW_IMPEXP Runner
index f10ecc4..d577176 100644 (file)
@@ -74,7 +74,7 @@
     <ClCompile>
       <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/dynamiclibrary/includes;../../../../libs/doublylinkedlist/includes;../../../../libs/MALLOC/includes;../../../mexlib/includes;../../../gui/src/c/wsci;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../pvm/includes;../../../console/includes;../../../../libs/intl;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../intersci/includes;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../operations/includes;../../../parse/includes;../../../ast/includes;../../../types/includes;../../../symbol/includes;../../../system_env/includes;../../../io/includes;../../../threads/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/dynamiclibrary/includes;../../../../libs/doublylinkedlist/includes;../../../../libs/MALLOC/includes;../../../mexlib/includes;../../../gui/src/c/wsci;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../pvm/includes;../../../console/includes;../../../../libs/intl;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../intersci/includes;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../operations/includes;../../../parse/includes;../../../ast/includes;../../../types/includes;../../../symbol/includes;../../../system_env/includes;../../../io/includes;../../../threads/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;WITH_TK;WITH_ATLAS;__STDC__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -114,7 +114,7 @@ cd.. &gt;nul
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/dynamiclibrary/includes;../../../../libs/doublylinkedlist/includes;../../../../libs/MALLOC/includes;../../../mexlib/includes;../../../gui/src/c/wsci;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../pvm/includes;../../../console/includes;../../../../libs/intl;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../intersci/includes;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../operations/includes;../../../parse/includes;../../../ast/includes;../../../types/includes;../../../symbol/includes;../../../system_env/includes;../../../io/includes;../../../threads/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/dynamiclibrary/includes;../../../../libs/doublylinkedlist/includes;../../../../libs/MALLOC/includes;../../../mexlib/includes;../../../gui/src/c/wsci;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../pvm/includes;../../../console/includes;../../../../libs/intl;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../intersci/includes;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../operations/includes;../../../parse/includes;../../../ast/includes;../../../types/includes;../../../symbol/includes;../../../system_env/includes;../../../io/includes;../../../threads/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;WITH_TK;WITH_ATLAS;__STDC__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -154,7 +154,7 @@ cd.. &gt;nul
       <Optimization>MaxSpeed</Optimization>
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/dynamiclibrary/includes;../../../../libs/doublylinkedlist/includes;../../../../libs/MALLOC/includes;../../../mexlib/includes;../../../gui/src/c/wsci;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../pvm/includes;../../../console/includes;../../../../libs/intl;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../intersci/includes;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../operations/includes;../../../parse/includes;../../../ast/includes;../../../types/includes;../../../symbol/includes;../../../system_env/includes;../../../io/includes;../../../threads/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/dynamiclibrary/includes;../../../../libs/doublylinkedlist/includes;../../../../libs/MALLOC/includes;../../../mexlib/includes;../../../gui/src/c/wsci;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../pvm/includes;../../../console/includes;../../../../libs/intl;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../intersci/includes;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../operations/includes;../../../parse/includes;../../../ast/includes;../../../types/includes;../../../symbol/includes;../../../system_env/includes;../../../io/includes;../../../threads/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;WITH_TK;WITH_ATLAS;__STDC__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -198,7 +198,7 @@ cd.. &gt;nul
       <Optimization>MaxSpeed</Optimization>
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/dynamiclibrary/includes;../../../../libs/doublylinkedlist/includes;../../../../libs/MALLOC/includes;../../../mexlib/includes;../../../gui/src/c/wsci;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../pvm/includes;../../../console/includes;../../../../libs/intl;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../intersci/includes;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../operations/includes;../../../parse/includes;../../../ast/includes;../../../types/includes;../../../symbol/includes;../../../system_env/includes;../../../io/includes;../../../threads/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/dynamiclibrary/includes;../../../../libs/doublylinkedlist/includes;../../../../libs/MALLOC/includes;../../../mexlib/includes;../../../gui/src/c/wsci;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../pvm/includes;../../../console/includes;../../../../libs/intl;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../intersci/includes;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../operations/includes;../../../parse/includes;../../../ast/includes;../../../types/includes;../../../symbol/includes;../../../system_env/includes;../../../io/includes;../../../threads/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;WITH_TK;WITH_ATLAS;__STDC__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
index 333c12d..777aaf3 100644 (file)
@@ -76,7 +76,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../includes;../../src/c;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../elementary_functions/includes;../../../operations/includes;../../../api_scilab/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../system_env/includes;../../../../libs/MALLOC/includes;../../../string/includes;../../../fileio/includes;../../../threads/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../includes;../../src/c;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../elementary_functions/includes;../../../operations/includes;../../../api_scilab/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../system_env/includes;../../../../libs/MALLOC/includes;../../../string/includes;../../../fileio/includes;../../../threads/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CORE_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../includes;../../src/c;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../elementary_functions/includes;../../../operations/includes;../../../api_scilab/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../system_env/includes;../../../../libs/MALLOC/includes;../../../string/includes;../../../fileio/includes;../../../threads/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../includes;../../src/c;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../elementary_functions/includes;../../../operations/includes;../../../api_scilab/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../system_env/includes;../../../../libs/MALLOC/includes;../../../string/includes;../../../fileio/includes;../../../threads/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CORE_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>../../includes;../../src/c;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../elementary_functions/includes;../../../operations/includes;../../../api_scilab/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../system_env/includes;../../../../libs/MALLOC/includes;../../../string/includes;../../../fileio/includes;../../../threads/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../includes;../../src/c;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../elementary_functions/includes;../../../operations/includes;../../../api_scilab/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../system_env/includes;../../../../libs/MALLOC/includes;../../../string/includes;../../../fileio/includes;../../../threads/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CORE_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>../../includes;../../src/c;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../elementary_functions/includes;../../../operations/includes;../../../api_scilab/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../system_env/includes;../../../../libs/MALLOC/includes;../../../string/includes;../../../fileio/includes;../../../threads/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../includes;../../src/c;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../elementary_functions/includes;../../../operations/includes;../../../api_scilab/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../system_env/includes;../../../../libs/MALLOC/includes;../../../string/includes;../../../fileio/includes;../../../threads/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CORE_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
index cd0de40..3414e17 100644 (file)
@@ -75,26 +75,20 @@ extern "C"
     extern char *TermReadAndProcess(void);
 }
 
+#include "string.hxx"
+#include "polynom.hxx"
+#include "double.hxx"
+
 #include "scilabWrite.hxx"
 #include "tasks.hxx"
-#include "exit_status.hxx"
 #include "parser.hxx"
 #include "context.hxx"
 #include "configvariable.hxx"
-#include "context.hxx"
 #include "setenvvar.hxx"
 #include "funcmanager.hxx"
-#include "configvariable.hxx"
 #include "filemanager.hxx"
-#include "scilabexception.hxx"
-
 #include "runner.hxx"
 
-#include "banner.hxx"
-
-#include "string.hxx"
-#include "polynom.hxx"
-
 #define INTERACTIVE     -1
 
 const wchar_t* prog_name;
index 382e81e..ddc63be 100644 (file)
@@ -424,7 +424,8 @@ libscielementary_functions_la_CPPFLAGS = \
        -I$(top_srcdir)/modules/system_env/includes \
        -I$(top_srcdir)/modules/string/includes \
        -I$(top_builddir)/modules/operations/includes \
-    -I$(top_srcdir)/libs/dynamiclibrary/includes
+    -I$(top_srcdir)/libs/dynamiclibrary/includes \
+    $(EIGEN_CPPFLAGS)
 
 # Includes need for the compilation
 libscielementary_functions_la_CFLAGS= \
index 304547a..947fb09 100644 (file)
@@ -1037,7 +1037,8 @@ libscielementary_functions_la_CPPFLAGS = \
        -I$(top_srcdir)/modules/system_env/includes \
        -I$(top_srcdir)/modules/string/includes \
        -I$(top_builddir)/modules/operations/includes \
-    -I$(top_srcdir)/libs/dynamiclibrary/includes
+    -I$(top_srcdir)/libs/dynamiclibrary/includes \
+    $(EIGEN_CPPFLAGS)
 
 
 # Includes need for the compilation
index bbc7228..123cb6a 100644 (file)
@@ -45,7 +45,7 @@
 
 #ifdef __cplusplus
 #define getRelativeMachinePrecision()          C2F(dlamch)(const_cast<char*>("e"), 1L)
-#define isZero(x)                                                      (fabs(static_cast<double>(x)) <= getRelativeMachinePrecision())
+#define isRealZero(x)                                          (fabs(static_cast<double>(x)) <= getRelativeMachinePrecision())
 #define ZeroIsZero(x)                                          (fabs(static_cast<double>(x)) <= getRelativeMachinePrecision() ? 0 : static_cast<double>(x))
 #else
 #define getRelativeMachinePrecision()          C2F(dlamch)((char*)"e", 1L)
index 0a72307..b8d6cd6 100644 (file)
@@ -76,7 +76,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\..\..\includes;..\..\..\..\functions_manager\includes;..\..\..\..\symbol\includes;..\..\..\..\types\includes;..\..\..\..\operations\includes;..\..\..\..\core\includes;../../../../ast/includes;../../../../api_scilab/includes;../../../../output_stream/includes;../../../../localization/includes;../../../../../libs/intl/;../../../../threads/includes;../../../../system_env/includes;../../../../string/includes;../../../../../libs/dynamiclibrary/includes;../../../../double/includes;..\..\..\src\c;../../../../../libs/MALLOC/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\..\includes;..\..\..\..\functions_manager\includes;..\..\..\..\symbol\includes;..\..\..\..\types\includes;..\..\..\..\operations\includes;..\..\..\..\core\includes;../../../../ast/includes;../../../../api_scilab/includes;../../../../output_stream/includes;../../../../localization/includes;../../../../../libs/intl/;../../../../threads/includes;../../../../system_env/includes;../../../../string/includes;../../../../../libs/dynamiclibrary/includes;../../../../double/includes;..\..\..\src\c;../../../../../libs/MALLOC/includes;../../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;ELEM_FUNC_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -110,7 +110,7 @@ lib /DEF:"$(ProjectDir)cacsd_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfor
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\..\..\includes;..\..\..\..\functions_manager\includes;..\..\..\..\symbol\includes;..\..\..\..\types\includes;..\..\..\..\operations\includes;..\..\..\..\core\includes;../../../../ast/includes;../../../../api_scilab/includes;../../../../output_stream/includes;../../../../localization/includes;../../../../../libs/intl/;../../../../threads/includes;../../../../system_env/includes;../../../../string/includes;../../../../../libs/dynamiclibrary/includes;../../../../double/includes;..\..\..\src\c;../../../../../libs/MALLOC/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\..\includes;..\..\..\..\functions_manager\includes;..\..\..\..\symbol\includes;..\..\..\..\types\includes;..\..\..\..\operations\includes;..\..\..\..\core\includes;../../../../ast/includes;../../../../api_scilab/includes;../../../../output_stream/includes;../../../../localization/includes;../../../../../libs/intl/;../../../../threads/includes;../../../../system_env/includes;../../../../string/includes;../../../../../libs/dynamiclibrary/includes;../../../../double/includes;..\..\..\src\c;../../../../../libs/MALLOC/includes;../../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;ELEM_FUNC_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -142,7 +142,7 @@ lib /DEF:"$(ProjectDir)cacsd_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfor
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>..\..\..\includes;..\..\..\..\functions_manager\includes;..\..\..\..\symbol\includes;..\..\..\..\types\includes;..\..\..\..\operations\includes;..\..\..\..\core\includes;../../../../ast/includes;../../../../api_scilab/includes;../../../../output_stream/includes;../../../../localization/includes;../../../../../libs/intl/;../../../../threads/includes;../../../../system_env/includes;../../../../string/includes;../../../../../libs/dynamiclibrary/includes;../../../../double/includes;..\..\..\src\c;../../../../../libs/MALLOC/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\..\includes;..\..\..\..\functions_manager\includes;..\..\..\..\symbol\includes;..\..\..\..\types\includes;..\..\..\..\operations\includes;..\..\..\..\core\includes;../../../../ast/includes;../../../../api_scilab/includes;../../../../output_stream/includes;../../../../localization/includes;../../../../../libs/intl/;../../../../threads/includes;../../../../system_env/includes;../../../../string/includes;../../../../../libs/dynamiclibrary/includes;../../../../double/includes;..\..\..\src\c;../../../../../libs/MALLOC/includes;../../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;ELEM_FUNC_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
@@ -179,7 +179,7 @@ lib /DEF:"$(ProjectDir)cacsd_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfor
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>..\..\..\includes;..\..\..\..\functions_manager\includes;..\..\..\..\symbol\includes;..\..\..\..\types\includes;..\..\..\..\operations\includes;..\..\..\..\core\includes;../../../../ast/includes;../../../../api_scilab/includes;../../../../output_stream/includes;../../../../localization/includes;../../../../../libs/intl/;../../../../threads/includes;../../../../system_env/includes;../../../../string/includes;../../../../../libs/dynamiclibrary/includes;../../../../double/includes;..\..\..\src\c;../../../../../libs/MALLOC/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\..\includes;..\..\..\..\functions_manager\includes;..\..\..\..\symbol\includes;..\..\..\..\types\includes;..\..\..\..\operations\includes;..\..\..\..\core\includes;../../../../ast/includes;../../../../api_scilab/includes;../../../../output_stream/includes;../../../../localization/includes;../../../../../libs/intl/;../../../../threads/includes;../../../../system_env/includes;../../../../string/includes;../../../../../libs/dynamiclibrary/includes;../../../../double/includes;..\..\..\src\c;../../../../../libs/MALLOC/includes;../../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;ELEM_FUNC_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
index 35fd858..dc36e90 100644 (file)
@@ -61,8 +61,8 @@ Function::ReturnValue sci_eye(types::typed_list &in, int _iRetCount, types::type
             return Function::Error;
         }
 
-        iRows = in[0]->getAsGenericType()->getRows();
-        iCols = in[0]->getAsGenericType()->getCols();
+        iRows = in[0]->getAs<GenericType>()->getRows();
+        iCols = in[0]->getAs<GenericType>()->getCols();
     }
 
     if(in.size() == 0)
index f3d9214..9418ada 100644 (file)
@@ -47,7 +47,7 @@ Function::ReturnValue sci_size(types::typed_list &in, int _iRetCount, types::typ
                 return Function::Error;
             }
 
-            Double* pD = new Double(in[0]->getAsContainer()->getSize());
+            Double* pD = new Double(in[0]->getAs<Container>()->getSize());
             out.push_back(pD);
             break;
         }
@@ -71,8 +71,8 @@ Function::ReturnValue sci_size(types::typed_list &in, int _iRetCount, types::typ
                 }
             }
 
-            int iDims   = in[0]->getAsGenericType()->getDims();
-            int* piDims = in[0]->getAsGenericType()->getDimsArray();
+            int iDims   = in[0]->getAs<GenericType>()->getDims();
+            int* piDims = in[0]->getAs<GenericType>()->getDimsArray();
 
             if(_iRetCount == 1)
             {
@@ -103,7 +103,7 @@ Function::ReturnValue sci_size(types::typed_list &in, int _iRetCount, types::typ
                     }
                     break;
                 case 0 : //"*"
-                    pdbl[0] = in[0]->getAsGenericType()->getSize();
+                    pdbl[0] = in[0]->getAs<GenericType>()->getSize();
                     break;
                 default : //"r"
                     if(iMode > iDims)
index 7f239ee..ad27462 100644 (file)
@@ -76,11 +76,11 @@ int getMode(typed_list &in, int _iProcess, int _iRef)
     if(iMode == -1)
     {
         iMode = 0;
-        if(in[_iRef]->getAsGenericType()->getRows() > 1)
+        if(in[_iRef]->getAs<GenericType>()->getRows() > 1)
         {
             iMode = 1;
         }
-        else if(in[_iRef]->getAsGenericType()->getCols() > 1)
+        else if(in[_iRef]->getAs<GenericType>()->getCols() > 1)
         {
             iMode = 2;
         }
index cbb3aa5..4ad343e 100644 (file)
@@ -4,56 +4,57 @@
 # This file is distributed under the same license as the Scilab package.
 
 
-FILEIO_C_SOURCES = src/c/FileExist.c \
-src/c/scanf_functions.c \
-src/c/do_xxscanf.c \
-src/c/findfiles.c \
-src/c/Status2Mode.c \
-src/c/addfile.c \
-src/c/delfile.c \
-src/c/filesmanagement.c \
-src/c/getfiledesc.c \
-src/c/getfileinfo.c \
-src/c/getfiletype.c \
-src/c/mgeti.c \
-src/c/mputi.c \
-src/c/readline.c \
-src/c/getdrives.c \
-src/c/deleteafile.c \
-src/c/getshortpathname.c \
-src/c/getlongpathname.c \
-src/c/FindFileExtension.c \
-src/c/URIFileToFilename.c \
-src/c/createdirectory.c \
-src/c/isdir.c \
-src/c/isDrive.c \
-src/c/removedir.c \
-src/c/cluni0.c \
-src/c/scicurdir.c \
-src/c/fullpath.c \
-src/c/fileinfo.c \
-src/c/getrelativefilename.c \
-src/c/splitpath.c \
-src/c/movefile.c \
-src/c/basename.c \
-src/c/pathconvert.c \
-src/c/copyfile_others.c \
-src/c/getFullFilename.c \
-src/c/os_wfopen.c \
-src/c/fscanfMat.c \
-src/c/fprintfMat.c \
-src/c/createtempfilename.c
+FILEIO_C_SOURCES = \
+    src/c/FileExist.c \
+    src/c/scanf_functions.c \
+    src/c/do_xxscanf.c \
+    src/c/findfiles.c \
+    src/c/Status2Mode.c \
+    src/c/addfile.c \
+    src/c/delfile.c \
+    src/c/filesmanagement.c \
+    src/c/getfiledesc.c \
+    src/c/getfileinfo.c \
+    src/c/getfiletype.c \
+    src/c/mgeti.c \
+    src/c/mputi.c \
+    src/c/readline.c \
+    src/c/getdrives.c \
+    src/c/deleteafile.c \
+    src/c/getshortpathname.c \
+    src/c/getlongpathname.c \
+    src/c/FindFileExtension.c \
+    src/c/URIFileToFilename.c \
+    src/c/createdirectory.c \
+    src/c/isdir.c \
+    src/c/isDrive.c \
+    src/c/removedir.c \
+    src/c/cluni0.c \
+    src/c/scicurdir.c \
+    src/c/fullpath.c \
+    src/c/fileinfo.c \
+    src/c/getrelativefilename.c \
+    src/c/splitpath.c \
+    src/c/movefile.c \
+    src/c/basename.c \
+    src/c/pathconvert.c \
+    src/c/copyfile_others.c \
+    src/c/getFullFilename.c \
+    src/c/os_wfopen.c \
+    src/c/fscanfMat.c \
+    src/c/fprintfMat.c \
+    src/c/createtempfilename.c
 
 
 GATEWAY_C_SOURCES = \
-sci_gateway/c/gw_fileio.c \
-sci_gateway/c/sci_fprintfMat.c \
-sci_gateway/c/sci_fscanfMat.c \
-sci_gateway/c/sci_chdir.c \
-sci_gateway/c/sci_pwd.c \
-sci_gateway/c/sci_copyfile.c \
-sci_gateway/c/sci_tempname.c \
-sci_gateway/c/sci_movefile.c
+    sci_gateway/c/gw_fileio.c \
+    sci_gateway/c/sci_fprintfMat.c \
+    sci_gateway/c/sci_fscanfMat.c \
+    sci_gateway/c/sci_chdir.c \
+    sci_gateway/c/sci_pwd.c \
+    sci_gateway/c/sci_copyfile.c \
+    sci_gateway/c/sci_tempname.c \
+    sci_gateway/c/sci_movefile.c
 
 GATEWAY_CPP_SOURCES = \
        sci_gateway/cpp/fileio_gw.cpp \
@@ -110,37 +111,42 @@ FILEIO_CPP_SOURCES = \
        src/cpp/newest.cpp \
        src/cpp/scilab_sscanf.cpp
 
-libscifileio_la_CPPFLAGS=      -I$(srcdir)/includes/ \
-                               -I$(srcdir)/src/c/ \
-                               -I$(srcdir)/src/cpp/ \
-                               -I$(top_srcdir)/libs/MALLOC/includes/ \
-                               -I$(top_srcdir)/modules/api_scilab/includes \
-                               -I$(top_srcdir)/modules/output_stream/includes \
-                               -I$(top_srcdir)/modules/operations/includes \
-                               -I$(top_srcdir)/modules/types/includes \
-                               -I$(top_srcdir)/modules/functions_manager/includes \
-                               -I$(top_srcdir)/modules/ast/includes \
-                               -I$(top_srcdir)/modules/symbol/includes \
-                               -I$(top_srcdir)/modules/string/includes \
-                               -I$(top_srcdir)/modules/system_env/includes \
-                               -I$(top_srcdir)/modules/io/includes \
-                               -I$(top_srcdir)/modules/shell/includes \
-                               -I$(top_srcdir)/modules/threads/includes \
-                               -I$(top_srcdir)/modules/console/includes \
-                -I$(top_srcdir)/libs/dynamiclibrary/includes \
-                               $(HDF5_CFLAGS)
-
-libscifileio_la_CFLAGS=                -I$(srcdir)/includes/ \
-                               -I$(srcdir)/src/c/ \
-                               -I$(top_srcdir)/libs/MALLOC/includes/ \
-                               -I$(top_srcdir)/modules/output_stream/includes \
-                               -I$(top_srcdir)/modules/io/includes \
-                               -I$(top_srcdir)/modules/api_scilab/includes \
-                               -I$(top_srcdir)/modules/string/includes \
-                               -I$(top_srcdir)/modules/system_env/includes \
-                               -I$(top_srcdir)/modules/localization/includes \
-                               -I$(top_srcdir)/modules/operations/includes \
-                               $(HDF5_CFLAGS)
+libscifileio_la_CPPFLAGS = \
+    -I$(srcdir)/includes/ \
+       -I$(srcdir)/src/c/ \
+       -I$(srcdir)/src/cpp/ \
+       -I$(top_srcdir)/libs/MALLOC/includes/ \
+       -I$(top_srcdir)/modules/api_scilab/includes \
+       -I$(top_srcdir)/modules/output_stream/includes \
+       -I$(top_srcdir)/modules/operations/includes \
+       -I$(top_srcdir)/modules/types/includes \
+       -I$(top_srcdir)/modules/functions_manager/includes \
+       -I$(top_srcdir)/modules/ast/includes \
+       -I$(top_srcdir)/modules/symbol/includes \
+       -I$(top_srcdir)/modules/string/includes \
+       -I$(top_srcdir)/modules/system_env/includes \
+       -I$(top_srcdir)/modules/io/includes \
+       -I$(top_srcdir)/modules/shell/includes \
+       -I$(top_srcdir)/modules/threads/includes \
+       -I$(top_srcdir)/modules/console/includes \
+    -I$(top_srcdir)/libs/dynamiclibrary/includes \
+       $(HDF5_CFLAGS) \
+    $(EIGEN_CPPFLAGS)
+
+
+libscifileio_la_CFLAGS = \
+    -I$(srcdir)/includes/ \
+       -I$(srcdir)/src/c/ \
+       -I$(top_srcdir)/libs/MALLOC/includes/ \
+    -I$(top_srcdir)/modules/output_stream/includes \
+       -I$(top_srcdir)/modules/io/includes \
+       -I$(top_srcdir)/modules/api_scilab/includes \
+       -I$(top_srcdir)/modules/string/includes \
+       -I$(top_srcdir)/modules/system_env/includes \
+       -I$(top_srcdir)/modules/localization/includes \
+       -I$(top_srcdir)/modules/operations/includes \
+       $(HDF5_CFLAGS)
+
 
 noinst_LTLIBRARIES = libscifileio-algo.la
 pkglib_LTLIBRARIES = libscifileio.la
index e153c7b..8616a89 100644 (file)
@@ -485,55 +485,56 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 yacc_present = @yacc_present@
-FILEIO_C_SOURCES = src/c/FileExist.c \
-src/c/scanf_functions.c \
-src/c/do_xxscanf.c \
-src/c/findfiles.c \
-src/c/Status2Mode.c \
-src/c/addfile.c \
-src/c/delfile.c \
-src/c/filesmanagement.c \
-src/c/getfiledesc.c \
-src/c/getfileinfo.c \
-src/c/getfiletype.c \
-src/c/mgeti.c \
-src/c/mputi.c \
-src/c/readline.c \
-src/c/getdrives.c \
-src/c/deleteafile.c \
-src/c/getshortpathname.c \
-src/c/getlongpathname.c \
-src/c/FindFileExtension.c \
-src/c/URIFileToFilename.c \
-src/c/createdirectory.c \
-src/c/isdir.c \
-src/c/isDrive.c \
-src/c/removedir.c \
-src/c/cluni0.c \
-src/c/scicurdir.c \
-src/c/fullpath.c \
-src/c/fileinfo.c \
-src/c/getrelativefilename.c \
-src/c/splitpath.c \
-src/c/movefile.c \
-src/c/basename.c \
-src/c/pathconvert.c \
-src/c/copyfile_others.c \
-src/c/getFullFilename.c \
-src/c/os_wfopen.c \
-src/c/fscanfMat.c \
-src/c/fprintfMat.c \
-src/c/createtempfilename.c
+FILEIO_C_SOURCES = \
+    src/c/FileExist.c \
+    src/c/scanf_functions.c \
+    src/c/do_xxscanf.c \
+    src/c/findfiles.c \
+    src/c/Status2Mode.c \
+    src/c/addfile.c \
+    src/c/delfile.c \
+    src/c/filesmanagement.c \
+    src/c/getfiledesc.c \
+    src/c/getfileinfo.c \
+    src/c/getfiletype.c \
+    src/c/mgeti.c \
+    src/c/mputi.c \
+    src/c/readline.c \
+    src/c/getdrives.c \
+    src/c/deleteafile.c \
+    src/c/getshortpathname.c \
+    src/c/getlongpathname.c \
+    src/c/FindFileExtension.c \
+    src/c/URIFileToFilename.c \
+    src/c/createdirectory.c \
+    src/c/isdir.c \
+    src/c/isDrive.c \
+    src/c/removedir.c \
+    src/c/cluni0.c \
+    src/c/scicurdir.c \
+    src/c/fullpath.c \
+    src/c/fileinfo.c \
+    src/c/getrelativefilename.c \
+    src/c/splitpath.c \
+    src/c/movefile.c \
+    src/c/basename.c \
+    src/c/pathconvert.c \
+    src/c/copyfile_others.c \
+    src/c/getFullFilename.c \
+    src/c/os_wfopen.c \
+    src/c/fscanfMat.c \
+    src/c/fprintfMat.c \
+    src/c/createtempfilename.c
 
 GATEWAY_C_SOURCES = \
-sci_gateway/c/gw_fileio.c \
-sci_gateway/c/sci_fprintfMat.c \
-sci_gateway/c/sci_fscanfMat.c \
-sci_gateway/c/sci_chdir.c \
-sci_gateway/c/sci_pwd.c \
-sci_gateway/c/sci_copyfile.c \
-sci_gateway/c/sci_tempname.c \
-sci_gateway/c/sci_movefile.c
+    sci_gateway/c/gw_fileio.c \
+    sci_gateway/c/sci_fprintfMat.c \
+    sci_gateway/c/sci_fscanfMat.c \
+    sci_gateway/c/sci_chdir.c \
+    sci_gateway/c/sci_pwd.c \
+    sci_gateway/c/sci_copyfile.c \
+    sci_gateway/c/sci_tempname.c \
+    sci_gateway/c/sci_movefile.c
 
 GATEWAY_CPP_SOURCES = \
        sci_gateway/cpp/fileio_gw.cpp \
@@ -590,37 +591,40 @@ FILEIO_CPP_SOURCES = \
        src/cpp/newest.cpp \
        src/cpp/scilab_sscanf.cpp
 
-libscifileio_la_CPPFLAGS = -I$(srcdir)/includes/ \
-                               -I$(srcdir)/src/c/ \
-                               -I$(srcdir)/src/cpp/ \
-                               -I$(top_srcdir)/libs/MALLOC/includes/ \
-                               -I$(top_srcdir)/modules/api_scilab/includes \
-                               -I$(top_srcdir)/modules/output_stream/includes \
-                               -I$(top_srcdir)/modules/operations/includes \
-                               -I$(top_srcdir)/modules/types/includes \
-                               -I$(top_srcdir)/modules/functions_manager/includes \
-                               -I$(top_srcdir)/modules/ast/includes \
-                               -I$(top_srcdir)/modules/symbol/includes \
-                               -I$(top_srcdir)/modules/string/includes \
-                               -I$(top_srcdir)/modules/system_env/includes \
-                               -I$(top_srcdir)/modules/io/includes \
-                               -I$(top_srcdir)/modules/shell/includes \
-                               -I$(top_srcdir)/modules/threads/includes \
-                               -I$(top_srcdir)/modules/console/includes \
-                -I$(top_srcdir)/libs/dynamiclibrary/includes \
-                               $(HDF5_CFLAGS)
-
-libscifileio_la_CFLAGS = -I$(srcdir)/includes/ \
-                               -I$(srcdir)/src/c/ \
-                               -I$(top_srcdir)/libs/MALLOC/includes/ \
-                               -I$(top_srcdir)/modules/output_stream/includes \
-                               -I$(top_srcdir)/modules/io/includes \
-                               -I$(top_srcdir)/modules/api_scilab/includes \
-                               -I$(top_srcdir)/modules/string/includes \
-                               -I$(top_srcdir)/modules/system_env/includes \
-                               -I$(top_srcdir)/modules/localization/includes \
-                               -I$(top_srcdir)/modules/operations/includes \
-                               $(HDF5_CFLAGS)
+libscifileio_la_CPPFLAGS = \
+    -I$(srcdir)/includes/ \
+       -I$(srcdir)/src/c/ \
+       -I$(srcdir)/src/cpp/ \
+       -I$(top_srcdir)/libs/MALLOC/includes/ \
+       -I$(top_srcdir)/modules/api_scilab/includes \
+       -I$(top_srcdir)/modules/output_stream/includes \
+       -I$(top_srcdir)/modules/operations/includes \
+       -I$(top_srcdir)/modules/types/includes \
+       -I$(top_srcdir)/modules/functions_manager/includes \
+       -I$(top_srcdir)/modules/ast/includes \
+       -I$(top_srcdir)/modules/symbol/includes \
+       -I$(top_srcdir)/modules/string/includes \
+       -I$(top_srcdir)/modules/system_env/includes \
+       -I$(top_srcdir)/modules/io/includes \
+       -I$(top_srcdir)/modules/shell/includes \
+       -I$(top_srcdir)/modules/threads/includes \
+       -I$(top_srcdir)/modules/console/includes \
+    -I$(top_srcdir)/libs/dynamiclibrary/includes \
+       $(HDF5_CFLAGS) \
+    $(EIGEN_CPPFLAGS)
+
+libscifileio_la_CFLAGS = \
+    -I$(srcdir)/includes/ \
+       -I$(srcdir)/src/c/ \
+       -I$(top_srcdir)/libs/MALLOC/includes/ \
+    -I$(top_srcdir)/modules/output_stream/includes \
+       -I$(top_srcdir)/modules/io/includes \
+       -I$(top_srcdir)/modules/api_scilab/includes \
+       -I$(top_srcdir)/modules/string/includes \
+       -I$(top_srcdir)/modules/system_env/includes \
+       -I$(top_srcdir)/modules/localization/includes \
+       -I$(top_srcdir)/modules/operations/includes \
+       $(HDF5_CFLAGS)
 
 noinst_LTLIBRARIES = libscifileio-algo.la
 pkglib_LTLIBRARIES = libscifileio.la
index ee941c6..ae5b459 100644 (file)
@@ -76,7 +76,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../includes;../../src/c;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../api_scilab/includes;../../../operations/includes;../../../localization/includes;../../../output_stream/includes;../../../../libs/intl;../../../../libs/MALLOC/includes;../../../system_env/includes;../../../string/includes;../../../windows_tools/includes;../../../threads/includes;../../../console/includes;../../../../libs/dynamiclibrary/includes;../../../io/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../includes;../../src/c;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../api_scilab/includes;../../../operations/includes;../../../localization/includes;../../../output_stream/includes;../../../../libs/intl;../../../../libs/MALLOC/includes;../../../system_env/includes;../../../string/includes;../../../windows_tools/includes;../../../threads/includes;../../../console/includes;../../../../libs/dynamiclibrary/includes;../../../io/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FILEIO_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../includes;../../src/c;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../api_scilab/includes;../../../operations/includes;../../../localization/includes;../../../output_stream/includes;../../../../libs/intl;../../../../libs/MALLOC/includes;../../../system_env/includes;../../../string/includes;../../../windows_tools/includes;../../../threads/includes;../../../console/includes;../../../../libs/dynamiclibrary/includes;../../../io/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../includes;../../src/c;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../api_scilab/includes;../../../operations/includes;../../../localization/includes;../../../output_stream/includes;../../../../libs/intl;../../../../libs/MALLOC/includes;../../../system_env/includes;../../../string/includes;../../../windows_tools/includes;../../../threads/includes;../../../console/includes;../../../../libs/dynamiclibrary/includes;../../../io/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FILEIO_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>../../includes;../../src/c;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../api_scilab/includes;../../../operations/includes;../../../localization/includes;../../../output_stream/includes;../../../../libs/intl;../../../../libs/MALLOC/includes;../../../system_env/includes;../../../string/includes;../../../windows_tools/includes;../../../threads/includes;../../../console/includes;../../../../libs/dynamiclibrary/includes;../../../io/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../includes;../../src/c;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../api_scilab/includes;../../../operations/includes;../../../localization/includes;../../../output_stream/includes;../../../../libs/intl;../../../../libs/MALLOC/includes;../../../system_env/includes;../../../string/includes;../../../windows_tools/includes;../../../threads/includes;../../../console/includes;../../../../libs/dynamiclibrary/includes;../../../io/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FILEIO_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>../../includes;../../src/c;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../api_scilab/includes;../../../operations/includes;../../../localization/includes;../../../output_stream/includes;../../../../libs/intl;../../../../libs/MALLOC/includes;../../../system_env/includes;../../../string/includes;../../../windows_tools/includes;../../../threads/includes;../../../console/includes;../../../../libs/dynamiclibrary/includes;../../../io/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../includes;../../src/c;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../api_scilab/includes;../../../operations/includes;../../../localization/includes;../../../output_stream/includes;../../../../libs/intl;../../../../libs/MALLOC/includes;../../../system_env/includes;../../../string/includes;../../../windows_tools/includes;../../../threads/includes;../../../console/includes;../../../../libs/dynamiclibrary/includes;../../../io/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FILEIO_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
index e5ada56..473282f 100644 (file)
@@ -161,17 +161,17 @@ Function::ReturnValue sci_mfprintf(types::typed_list &in, int _iRetCount, types:
 
     if( in.size() > 2 )
     {
-        int iRefRows = in[2]->getAsGenericType()->getRows();
+        int iRefRows = in[2]->getAs<GenericType>()->getRows();
         for(unsigned int i = 2 ; i < in.size() ; i++)
         {
             //all arguments must have the same numbers of rows !
-            if(iRefRows != in[i]->getAsGenericType()->getRows())
+            if(iRefRows != in[i]->getAs<GenericType>()->getRows())
             {
                 ScierrorW(999, _W("%ls: Wrong number of input arguments: data doesn't fit with format.\n"), L"mprintf");
                 return types::Function::Error;
             }
 
-            iNumberCols += in[i]->getAsGenericType()->getCols();
+            iNumberCols += in[i]->getAs<GenericType>()->getCols();
         }
     }
 
@@ -186,7 +186,7 @@ Function::ReturnValue sci_mfprintf(types::typed_list &in, int _iRetCount, types:
     int idx = 0;
     for(unsigned int i = 2 ; i < in.size() ; i++)
     {
-        for(int j = 0 ; j < in[i]->getAsGenericType()->getCols() ; j++)
+        for(int j = 0 ; j < in[i]->getAs<GenericType>()->getCols() ; j++)
         {
             pArgs[idx].iArg = i;
             pArgs[idx].iPos = j;
index 15ad16c..6692534 100644 (file)
@@ -48,7 +48,7 @@ Function::ReturnValue sci_mput(typed_list &in, int _iRetCount, typed_list &out)
         return Function::Error;
     }
 
-    iSize = in[0]->getAsGenericType()->getSize();
+    iSize = in[0]->getAs<GenericType>()->getSize();
 
     if(in[0]->isDouble())
     {
index 835d90e..9dc070a 100644 (file)
@@ -60,7 +60,8 @@ libscifunctions_la_CPPFLAGS= \
                                -I$(top_srcdir)/modules/types/includes/ \
                                -I$(top_srcdir)/modules/threads/includes/ \
                                -I$(top_srcdir)/modules/elementary_functions/includes/ \
-                -I$(top_srcdir)/libs/dynamiclibrary/includes
+                -I$(top_srcdir)/libs/dynamiclibrary/includes \
+                $(EIGEN_CPPFLAGS)
 
 pkglib_LTLIBRARIES = libscifunctions.la
 noinst_LTLIBRARIES = libscifunctions-algo.la
index 3dacec7..40df4ce 100644 (file)
@@ -487,7 +487,8 @@ libscifunctions_la_CPPFLAGS = \
                                -I$(top_srcdir)/modules/types/includes/ \
                                -I$(top_srcdir)/modules/threads/includes/ \
                                -I$(top_srcdir)/modules/elementary_functions/includes/ \
-                -I$(top_srcdir)/libs/dynamiclibrary/includes
+                -I$(top_srcdir)/libs/dynamiclibrary/includes \
+                $(EIGEN_CPPFLAGS)
 
 pkglib_LTLIBRARIES = libscifunctions.la
 noinst_LTLIBRARIES = libscifunctions-algo.la
index c109c6a..724988f 100644 (file)
@@ -76,7 +76,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../../../libs/MALLOC/includes;../../includes;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../elementary_functions/includes;../../../core/includes;../../../operations/includes;../../../api_scilab/includes;../../../../libs/libxml2;../../../fileio/includes;../../../system_env/includes;../../../parse/includes;../../../output_stream/includes;../../../console/includes;../../../localization/includes;../../../../libs/intl;../../../string/includes;../../../threads/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../../../libs/MALLOC/includes;../../includes;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../elementary_functions/includes;../../../core/includes;../../../operations/includes;../../../api_scilab/includes;../../../../libs/libxml2;../../../fileio/includes;../../../system_env/includes;../../../parse/includes;../../../output_stream/includes;../../../console/includes;../../../localization/includes;../../../../libs/intl;../../../string/includes;../../../threads/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FUNCTIONS_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../../../libs/MALLOC/includes;../../includes;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../elementary_functions/includes;../../../core/includes;../../../operations/includes;../../../api_scilab/includes;../../../../libs/libxml2;../../../fileio/includes;../../../system_env/includes;../../../parse/includes;../../../output_stream/includes;../../../console/includes;../../../localization/includes;../../../../libs/intl;../../../string/includes;../../../threads/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../../../libs/MALLOC/includes;../../includes;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../elementary_functions/includes;../../../core/includes;../../../operations/includes;../../../api_scilab/includes;../../../../libs/libxml2;../../../fileio/includes;../../../system_env/includes;../../../parse/includes;../../../output_stream/includes;../../../console/includes;../../../localization/includes;../../../../libs/intl;../../../string/includes;../../../threads/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FUNCTIONS_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>../../../../libs/MALLOC/includes;../../includes;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../elementary_functions/includes;../../../core/includes;../../../operations/includes;../../../api_scilab/includes;../../../../libs/libxml2;../../../fileio/includes;../../../system_env/includes;../../../parse/includes;../../../output_stream/includes;../../../console/includes;../../../localization/includes;../../../../libs/intl;../../../string/includes;../../../threads/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../../../libs/MALLOC/includes;../../includes;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../elementary_functions/includes;../../../core/includes;../../../operations/includes;../../../api_scilab/includes;../../../../libs/libxml2;../../../fileio/includes;../../../system_env/includes;../../../parse/includes;../../../output_stream/includes;../../../console/includes;../../../localization/includes;../../../../libs/intl;../../../string/includes;../../../threads/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FUNCTIONS_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>../../../../libs/MALLOC/includes;../../includes;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../elementary_functions/includes;../../../core/includes;../../../operations/includes;../../../api_scilab/includes;../../../../libs/libxml2;../../../fileio/includes;../../../system_env/includes;../../../parse/includes;../../../output_stream/includes;../../../console/includes;../../../localization/includes;../../../../libs/intl;../../../string/includes;../../../threads/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../../../libs/MALLOC/includes;../../includes;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../elementary_functions/includes;../../../core/includes;../../../operations/includes;../../../api_scilab/includes;../../../../libs/libxml2;../../../fileio/includes;../../../system_env/includes;../../../parse/includes;../../../output_stream/includes;../../../console/includes;../../../localization/includes;../../../../libs/intl;../../../string/includes;../../../threads/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FUNCTIONS_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
index dde30bb..69fa951 100644 (file)
@@ -135,17 +135,17 @@ Function::ReturnValue sci_exec(types::typed_list &in, int _iRetCount, types::typ
        }
        else if(in[0]->isMacro())
        {//1st argument is a macro name, execute it in the current environnement
-               pExp = in[0]->getAsMacro()->getBody();
+               pExp = in[0]->getAs<Macro>()->getBody();
        }
        else if(in[0]->isMacroFile())
        {//1st argument is a macro name, parse and execute it in the current environnement
-               if(in[0]->getAsMacroFile()->parse() == false)
+               if(in[0]->getAs<MacroFile>()->parse() == false)
                {
-            ScierrorW(999, _W("%ls: Unable to parse macro '%s'"), "exec", in[0]->getAsMacroFile()->getName().c_str());
+            ScierrorW(999, _W("%ls: Unable to parse macro '%s'"), "exec", in[0]->getAs<MacroFile>()->getName().c_str());
             mclose(iID);
                        return Function::Error;
                }
-               pExp = in[0]->getAsMacroFile()->getMacro()->getBody();
+               pExp = in[0]->getAs<MacroFile>()->getMacro()->getBody();
        }
        else
        {
@@ -212,9 +212,9 @@ Function::ReturnValue sci_exec(types::typed_list &in, int _iRetCount, types::typ
 
 
             //to manage call without ()
-            if(execMe.result_get() != NULL && execMe.result_get()->getAsCallable())
+            if(execMe.result_get() != NULL && execMe.result_get()->getAs<Callable>())
             {
-                Callable *pCall = execMe.result_get()->getAsCallable();
+                Callable *pCall = execMe.result_get()->getAs<Callable>();
                 types::typed_list out;
                 types::typed_list in;
 
@@ -338,7 +338,7 @@ Function::ReturnValue sci_exec(types::typed_list &in, int _iRetCount, types::typ
 
                     if(ConfigVariable::getLastErrorFunction() == L"")
                     {
-                        ConfigVariable::setLastErrorFunction(execFunc.result_get()->getAsCallable()->getName());
+                        ConfigVariable::setLastErrorFunction(execFunc.result_get()->getAs<Callable>()->getName());
                     }
 
 
index 2637112..7079bca 100644 (file)
@@ -163,9 +163,9 @@ Function::ReturnValue sci_execstr(types::typed_list &in, int _iRetCount, types::
             (*j)->accept(execMe);
 
             //to manage call without ()
-            if(execMe.result_get() != NULL && execMe.result_get()->getAsCallable())
+            if(execMe.result_get() != NULL && execMe.result_get()->getAs<Callable>())
             {
-                Callable *pCall = execMe.result_get()->getAsCallable();
+                Callable *pCall = execMe.result_get()->getAs<Callable>();
                 types::typed_list out;
                 types::typed_list in;
 
@@ -292,7 +292,7 @@ Function::ReturnValue sci_execstr(types::typed_list &in, int _iRetCount, types::
 
                         if(ConfigVariable::getLastErrorFunction() == L"")
                         {
-                            ConfigVariable::setLastErrorFunction(execFunc.result_get()->getAsCallable()->getName());
+                            ConfigVariable::setLastErrorFunction(execFunc.result_get()->getAs<Callable>()->getName());
                         }
 
                         //restore previous prompt mode
index 8f30482..c6d6760 100644 (file)
@@ -71,7 +71,7 @@ Function::ReturnValue sci_whereis(types::typed_list &in, int _iRetCount, types::
        case InternalType::RealFunction :
        case InternalType::RealMacro :
        case InternalType::RealMacroFile :
-               stModule = pIT->getAsCallable()->getModule();
+               stModule = pIT->getAs<Callable>()->getModule();
                break;
        default :
                out.push_back(types::Double::Empty());
index 3cdbfee..d88ed9b 100644 (file)
@@ -17,27 +17,30 @@ FUNCTION_MANAGER_CPP_SOURCES = \
 
 pkglib_LTLIBRARIES     = libscifunctions_manager.la
 
-libscifunctions_manager_la_SOURCES     = $(FUNCTION_MANAGER_CPP_SOURCES)
-
-libscifunctions_manager_la_CXXFLAGS    =       -I$(top_builddir)/modules/types/includes/ \
-                                               -I$(top_builddir)/modules/core/includes/ \
-                                               -I$(top_builddir)/modules/string/includes/ \
-                                               -I$(top_builddir)/modules/symbol/includes/ \
-                                               -I$(top_builddir)/modules/elementary_functions/includes/ \
-                                               -I$(top_builddir)/modules/operations/includes/ \
-                                               -I$(top_builddir)/modules/system_env/includes/ \
-                                               -I$(top_builddir)/modules/api_scilab/includes/ \
-                                               -I$(top_builddir)/modules/fileio/includes/ \
-                                               -I$(top_builddir)/modules/ast/includes/ \
-                                               -I$(top_builddir)/modules/parse/includes/ \
-                                               -I$(top_builddir)/modules/output_stream/includes/ \
-                                               -I$(top_builddir)/modules/threads/includes/ \
-                                               -I$(top_builddir)/modules/console/includes/ \
-                                               -I$(top_builddir)/modules/signal_processing/includes/ \
-                                               -I$(top_builddir)/modules/jvm/includes/ \
-                        -I$(top_srcdir)/libs/dynamiclibrary/includes \
-                                               -Iincludes/ \
-                                               $(XML_FLAGS)
+libscifunctions_manager_la_SOURCES     = \
+    $(FUNCTION_MANAGER_CPP_SOURCES)
+
+libscifunctions_manager_la_CXXFLAGS    = \
+    -I$(top_builddir)/modules/types/includes/ \
+    -I$(top_builddir)/modules/core/includes/ \
+       -I$(top_builddir)/modules/string/includes/ \
+       -I$(top_builddir)/modules/symbol/includes/ \
+       -I$(top_builddir)/modules/elementary_functions/includes/ \
+       -I$(top_builddir)/modules/operations/includes/ \
+       -I$(top_builddir)/modules/system_env/includes/ \
+       -I$(top_builddir)/modules/api_scilab/includes/ \
+       -I$(top_builddir)/modules/fileio/includes/ \
+       -I$(top_builddir)/modules/ast/includes/ \
+       -I$(top_builddir)/modules/parse/includes/ \
+       -I$(top_builddir)/modules/output_stream/includes/ \
+       -I$(top_builddir)/modules/threads/includes/ \
+       -I$(top_builddir)/modules/console/includes/ \
+    -I$(top_builddir)/modules/signal_processing/includes/ \
+       -I$(top_builddir)/modules/jvm/includes/ \
+    -I$(top_srcdir)/libs/dynamiclibrary/includes \
+    -Iincludes/ \
+       $(XML_FLAGS) \
+    $(EIGEN_CPPFLAGS)
 
 libscifunctions_manager_la_includedir=$(pkgincludedir)/Types
 
index e273393..598b064 100644 (file)
@@ -394,26 +394,30 @@ FUNCTION_MANAGER_CPP_SOURCES = \
     src/cpp/callDynamicGateway.cpp
 
 pkglib_LTLIBRARIES = libscifunctions_manager.la
-libscifunctions_manager_la_SOURCES = $(FUNCTION_MANAGER_CPP_SOURCES)
-libscifunctions_manager_la_CXXFLAGS = -I$(top_builddir)/modules/types/includes/ \
-                                               -I$(top_builddir)/modules/core/includes/ \
-                                               -I$(top_builddir)/modules/string/includes/ \
-                                               -I$(top_builddir)/modules/symbol/includes/ \
-                                               -I$(top_builddir)/modules/elementary_functions/includes/ \
-                                               -I$(top_builddir)/modules/operations/includes/ \
-                                               -I$(top_builddir)/modules/system_env/includes/ \
-                                               -I$(top_builddir)/modules/api_scilab/includes/ \
-                                               -I$(top_builddir)/modules/fileio/includes/ \
-                                               -I$(top_builddir)/modules/ast/includes/ \
-                                               -I$(top_builddir)/modules/parse/includes/ \
-                                               -I$(top_builddir)/modules/output_stream/includes/ \
-                                               -I$(top_builddir)/modules/threads/includes/ \
-                                               -I$(top_builddir)/modules/console/includes/ \
-                                               -I$(top_builddir)/modules/signal_processing/includes/ \
-                                               -I$(top_builddir)/modules/jvm/includes/ \
-                        -I$(top_srcdir)/libs/dynamiclibrary/includes \
-                                               -Iincludes/ \
-                                               $(XML_FLAGS)
+libscifunctions_manager_la_SOURCES = \
+    $(FUNCTION_MANAGER_CPP_SOURCES)
+
+libscifunctions_manager_la_CXXFLAGS = \
+    -I$(top_builddir)/modules/types/includes/ \
+    -I$(top_builddir)/modules/core/includes/ \
+       -I$(top_builddir)/modules/string/includes/ \
+       -I$(top_builddir)/modules/symbol/includes/ \
+       -I$(top_builddir)/modules/elementary_functions/includes/ \
+       -I$(top_builddir)/modules/operations/includes/ \
+       -I$(top_builddir)/modules/system_env/includes/ \
+       -I$(top_builddir)/modules/api_scilab/includes/ \
+       -I$(top_builddir)/modules/fileio/includes/ \
+       -I$(top_builddir)/modules/ast/includes/ \
+       -I$(top_builddir)/modules/parse/includes/ \
+       -I$(top_builddir)/modules/output_stream/includes/ \
+       -I$(top_builddir)/modules/threads/includes/ \
+       -I$(top_builddir)/modules/console/includes/ \
+    -I$(top_builddir)/modules/signal_processing/includes/ \
+       -I$(top_builddir)/modules/jvm/includes/ \
+    -I$(top_srcdir)/libs/dynamiclibrary/includes \
+    -Iincludes/ \
+       $(XML_FLAGS) \
+    $(EIGEN_CPPFLAGS)
 
 libscifunctions_manager_la_includedir = $(pkgincludedir)/Types
 libscifunctions_manager_la_include_HEADERS = 
index 64bfcd7..78e05e9 100644 (file)
@@ -72,7 +72,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>includes;../../libs/MALLOC/includes;../types/includes;../core/includes;../system_env/includes;../../libs/libxml2;../symbol/includes;../operations/includes;../ast/includes;../fileio/includes;../parse/includes;../localization/includes;../../libs/intl;../output_stream/includes;../string/includes;../api_scilab/includes;../threads/includes;../jvm/includes;../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;../../libs/MALLOC/includes;../types/includes;../core/includes;../system_env/includes;../../libs/libxml2;../symbol/includes;../operations/includes;../ast/includes;../fileio/includes;../parse/includes;../localization/includes;../../libs/intl;../output_stream/includes;../string/includes;../api_scilab/includes;../threads/includes;../jvm/includes;../../libs/dynamiclibrary/includes;../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FUNC_MAN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -95,7 +95,7 @@
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>includes;../../libs/MALLOC/includes;../types/includes;../core/includes;../system_env/includes;../../libs/libxml2;../symbol/includes;../operations/includes;../ast/includes;../fileio/includes;../parse/includes;../localization/includes;../../libs/intl;../output_stream/includes;../string/includes;../api_scilab/includes;../threads/includes;../jvm/includes;../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;../../libs/MALLOC/includes;../types/includes;../core/includes;../system_env/includes;../../libs/libxml2;../symbol/includes;../operations/includes;../ast/includes;../fileio/includes;../parse/includes;../localization/includes;../../libs/intl;../output_stream/includes;../string/includes;../api_scilab/includes;../threads/includes;../jvm/includes;../../libs/dynamiclibrary/includes;../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FUNC_MAN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>includes;../../libs/MALLOC/includes;../types/includes;../core/includes;../system_env/includes;../../libs/libxml2;../symbol/includes;../operations/includes;../ast/includes;../fileio/includes;../parse/includes;../localization/includes;../../libs/intl;../output_stream/includes;../string/includes;../api_scilab/includes;../threads/includes;../jvm/includes;../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;../../libs/MALLOC/includes;../types/includes;../core/includes;../system_env/includes;../../libs/libxml2;../symbol/includes;../operations/includes;../ast/includes;../fileio/includes;../parse/includes;../localization/includes;../../libs/intl;../output_stream/includes;../string/includes;../api_scilab/includes;../threads/includes;../jvm/includes;../../libs/dynamiclibrary/includes;../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FUNC_MAN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>includes;../../libs/MALLOC/includes;../types/includes;../core/includes;../system_env/includes;../../libs/libxml2;../symbol/includes;../operations/includes;../ast/includes;../fileio/includes;../parse/includes;../localization/includes;../../libs/intl;../output_stream/includes;../string/includes;../api_scilab/includes;../threads/includes;../jvm/includes;../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;../../libs/MALLOC/includes;../types/includes;../core/includes;../system_env/includes;../../libs/libxml2;../symbol/includes;../operations/includes;../ast/includes;../fileio/includes;../parse/includes;../localization/includes;../../libs/intl;../output_stream/includes;../string/includes;../api_scilab/includes;../threads/includes;../jvm/includes;../../libs/dynamiclibrary/includes;../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FUNC_MAN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
index 0bd493e..2dae422 100644 (file)
 #
 # This file is distributed under the same license as the Scilab package.
 
-LINEAR_ALGEBRA_CPP_SOURCES = src/cpp/scischur.cpp \
-src/cpp/schurSelect.cpp
-
-LINEAR_ALGEBRA_C_SOURCES = src/c/schurtable.c \
-src/c/invert_matrix.c \
-src/c/lu.c \
-src/c/qr.c \
-src/c/hess.c \
-src/c/eigen.c \
-src/c/balanc.c \
-src/c/chol.c \
-src/c/svd.c \
-src/c/rcond.c \
-src/c/det.c \
-src/c/lsq.c \
-src/c/issymmetric.c
-
-LINEAR_ALGEBRA_FORTRAN_SOURCES = src/fortran/intdggbal.f \
-src/fortran/intzgeqpf4.f \
-src/fortran/intzgehrd.f \
-src/fortran/intzgesvd1.f \
-src/fortran/intzgesvd2.f \
-src/fortran/intdgesv3.f \
-src/fortran/intdgesv4.f \
-src/fortran/DGELSY1.f \
-src/fortran/intdpotrf.f \
-src/fortran/intdoldsvd.f \
-src/fortran/intdgecon.f \
-src/fortran/zoldqr.f \
-src/fortran/intzgetrf.f \
-src/fortran/complexify.f \
-src/fortran/intzgebal.f \
-src/fortran/intzgetri.f \
-src/fortran/intzggbal.f \
-src/fortran/intddet.f \
-src/fortran/intzgesv3.f \
-src/fortran/intzgesv4.f \
-src/fortran/intzpotrf.f \
-src/fortran/intzgecon.f \
-src/fortran/intzoldsvd.f \
-src/fortran/intdgelsy.f \
-src/fortran/intdgeqpf3.f \
-src/fortran/intdgeqpf4.f \
-src/fortran/intdgesvd1.f \
-src/fortran/intdgehrd.f \
-src/fortran/intdgesvd2.f \
-src/fortran/intzdet.f \
-src/fortran/doldqr.f \
-src/fortran/intdgetrf.f \
-src/fortran/intzgelsy.f \
-src/fortran/intdgetri.f \
-src/fortran/intdgebal.f \
-src/fortran/intzgeqpf3.f \
-src/fortran/writebuf.f \
-src/fortran/intzschur.f
-
-GATEWAY_C_SOURCES = sci_gateway/c/sci_backslash.c \
-sci_gateway/c/sci_slash.c \
-sci_gateway/c/gw_linear_algebra2.c \
-sci_gateway/c/gw_linear_algebra.c \
-sci_gateway/c/assembleEigenvectors.c \
-sci_gateway/c/sci_dgeev.c \
-sci_gateway/c/sci_dggev.c \
-sci_gateway/c/sci_dsyev.c \
-sci_gateway/c/sci_zgeev.c \
-sci_gateway/c/sci_zggev.c \
-sci_gateway/c/sci_zheev.c
-
-GATEWAY_FORTRAN_SOURCES = sci_gateway/fortran/bschur.f
-
-GATEWAY_CPP_SOURCES = sci_gateway/cpp/linear_algebra_gw.cpp \
-sci_gateway/cpp/sci_chol.cpp \
-sci_gateway/cpp/sci_bdiag.cpp \
-sci_gateway/cpp/sci_inv.cpp \
-sci_gateway/cpp/sci_svd.cpp \
-sci_gateway/cpp/sci_rcond.cpp \
-sci_gateway/cpp/sci_qr.cpp \
-sci_gateway/cpp/sci_lu.cpp \
-sci_gateway/cpp/sci_lsq.cpp \
-sci_gateway/cpp/sci_hess.cpp \
-sci_gateway/cpp/sci_spec.cpp \
-sci_gateway/cpp/sci_det.cpp \
-sci_gateway/cpp/sci_balanc.cpp \
-sci_gateway/cpp/sci_schur.cpp
-
-
-libscilinear_algebra_la_CFLAGS=        -I$(srcdir)/includes/ \
--I$(srcdir)/src/c/ \
--I$(top_srcdir)/modules/output_stream/includes \
--I$(top_srcdir)/modules/dynamic_link/includes \
--I$(top_srcdir)/modules/operations/includes \
--I$(top_srcdir)/modules/elementary_functions/includes \
--I$(top_srcdir)/modules/api_scilab/includes
-
-libscilinear_algebra_la_CPPFLAGS=      -I$(srcdir)/includes/ \
--I$(srcdir)/src/cpp/ \
--I$(top_srcdir)/modules/symbol/includes \
--I$(top_srcdir)/modules/types/includes \
--I$(top_srcdir)/modules/ast/includes \
--I$(top_srcdir)/modules/output_stream/includes \
--I$(top_srcdir)/modules/api_scilab/includes \
--I$(top_srcdir)/modules/threads/includes \
--I$(top_srcdir)/modules/system_env/includes \
--I$(top_srcdir)/modules/string/includes \
--I$(top_srcdir)/modules/elementary_functions/includes \
--I$(top_srcdir)/modules/dynamic_link/includes \
--I$(top_srcdir)/modules/operations/includes \
--I$(top_srcdir)/libs/dynamiclibrary/includes
+LINEAR_ALGEBRA_CPP_SOURCES = \
+    src/cpp/scischur.cpp \
+    src/cpp/schurSelect.cpp
+
+LINEAR_ALGEBRA_C_SOURCES = \
+    src/c/schurtable.c \
+    src/c/invert_matrix.c \
+    src/c/lu.c \
+    src/c/qr.c \
+    src/c/hess.c \
+    src/c/eigen.c \
+    src/c/balanc.c \
+    src/c/chol.c \
+    src/c/svd.c \
+    src/c/rcond.c \
+    src/c/det.c \
+    src/c/lsq.c \
+    src/c/issymmetric.c
+
+LINEAR_ALGEBRA_FORTRAN_SOURCES = \
+    src/fortran/intdggbal.f \
+    src/fortran/intzgeqpf4.f \
+    src/fortran/intzgehrd.f \
+    src/fortran/intzgesvd1.f \
+    src/fortran/intzgesvd2.f \
+    src/fortran/intdgesv3.f \
+    src/fortran/intdgesv4.f \
+    src/fortran/DGELSY1.f \
+    src/fortran/intdpotrf.f \
+    src/fortran/intdoldsvd.f \
+    src/fortran/intdgecon.f \
+    src/fortran/zoldqr.f \
+    src/fortran/intzgetrf.f \
+    src/fortran/complexify.f \
+    src/fortran/intzgebal.f \
+    src/fortran/intzgetri.f \
+    src/fortran/intzggbal.f \
+    src/fortran/intddet.f \
+    src/fortran/intzgesv3.f \
+    src/fortran/intzgesv4.f \
+    src/fortran/intzpotrf.f \
+    src/fortran/intzgecon.f \
+    src/fortran/intzoldsvd.f \
+    src/fortran/intdgelsy.f \
+    src/fortran/intdgeqpf3.f \
+    src/fortran/intdgeqpf4.f \
+    src/fortran/intdgesvd1.f \
+    src/fortran/intdgehrd.f \
+    src/fortran/intdgesvd2.f \
+    src/fortran/intzdet.f \
+    src/fortran/doldqr.f \
+    src/fortran/intdgetrf.f \
+    src/fortran/intzgelsy.f \
+    src/fortran/intdgetri.f \
+    src/fortran/intdgebal.f \
+    src/fortran/intzgeqpf3.f \
+    src/fortran/writebuf.f \
+    src/fortran/intzschur.f
+
+GATEWAY_C_SOURCES = \
+    sci_gateway/c/sci_backslash.c \
+    sci_gateway/c/sci_slash.c \
+    sci_gateway/c/gw_linear_algebra2.c \
+    sci_gateway/c/gw_linear_algebra.c \
+    sci_gateway/c/assembleEigenvectors.c \
+    sci_gateway/c/sci_dgeev.c \
+    sci_gateway/c/sci_dggev.c \
+    sci_gateway/c/sci_dsyev.c \
+    sci_gateway/c/sci_zgeev.c \
+    sci_gateway/c/sci_zggev.c \
+    sci_gateway/c/sci_zheev.c
+
+GATEWAY_FORTRAN_SOURCES = \
+    sci_gateway/fortran/bschur.f
+
+GATEWAY_CPP_SOURCES = \
+    sci_gateway/cpp/linear_algebra_gw.cpp \
+    sci_gateway/cpp/sci_chol.cpp \
+    sci_gateway/cpp/sci_bdiag.cpp \
+    sci_gateway/cpp/sci_inv.cpp \
+    sci_gateway/cpp/sci_svd.cpp \
+    sci_gateway/cpp/sci_rcond.cpp \
+    sci_gateway/cpp/sci_qr.cpp \
+    sci_gateway/cpp/sci_lu.cpp \
+    sci_gateway/cpp/sci_lsq.cpp \
+    sci_gateway/cpp/sci_hess.cpp \
+    sci_gateway/cpp/sci_spec.cpp \
+    sci_gateway/cpp/sci_det.cpp \
+    sci_gateway/cpp/sci_balanc.cpp \
+    sci_gateway/cpp/sci_schur.cpp
+
+
+libscilinear_algebra_la_CFLAGS = \
+    -I$(srcdir)/includes/ \
+    -I$(srcdir)/src/c/ \
+    -I$(top_srcdir)/modules/output_stream/includes \
+    -I$(top_srcdir)/modules/dynamic_link/includes \
+    -I$(top_srcdir)/modules/operations/includes \
+    -I$(top_srcdir)/modules/elementary_functions/includes \
+    -I$(top_srcdir)/modules/api_scilab/includes
+
+libscilinear_algebra_la_CPPFLAGS= \
+    -I$(srcdir)/includes/ \
+    -I$(srcdir)/src/cpp/ \
+    -I$(top_srcdir)/modules/symbol/includes \
+    -I$(top_srcdir)/modules/types/includes \
+    -I$(top_srcdir)/modules/ast/includes \
+    -I$(top_srcdir)/modules/output_stream/includes \
+    -I$(top_srcdir)/modules/api_scilab/includes \
+    -I$(top_srcdir)/modules/threads/includes \
+    -I$(top_srcdir)/modules/system_env/includes \
+    -I$(top_srcdir)/modules/string/includes \
+    -I$(top_srcdir)/modules/elementary_functions/includes \
+    -I$(top_srcdir)/modules/dynamic_link/includes \
+    -I$(top_srcdir)/modules/operations/includes \
+    -I$(top_srcdir)/libs/dynamiclibrary/includes \
+    $(EIGEN_CPPFLAGS)
 
 pkglib_LTLIBRARIES = libscilinear_algebra.la
 noinst_LTLIBRARIES = libscilinear_algebra-algo.la
index 29a890f..6d96bc6 100644 (file)
@@ -467,112 +467,122 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 yacc_present = @yacc_present@
-LINEAR_ALGEBRA_CPP_SOURCES = src/cpp/scischur.cpp \
-src/cpp/schurSelect.cpp
-
-LINEAR_ALGEBRA_C_SOURCES = src/c/schurtable.c \
-src/c/invert_matrix.c \
-src/c/lu.c \
-src/c/qr.c \
-src/c/hess.c \
-src/c/eigen.c \
-src/c/balanc.c \
-src/c/chol.c \
-src/c/svd.c \
-src/c/rcond.c \
-src/c/det.c \
-src/c/lsq.c \
-src/c/issymmetric.c
-
-LINEAR_ALGEBRA_FORTRAN_SOURCES = src/fortran/intdggbal.f \
-src/fortran/intzgeqpf4.f \
-src/fortran/intzgehrd.f \
-src/fortran/intzgesvd1.f \
-src/fortran/intzgesvd2.f \
-src/fortran/intdgesv3.f \
-src/fortran/intdgesv4.f \
-src/fortran/DGELSY1.f \
-src/fortran/intdpotrf.f \
-src/fortran/intdoldsvd.f \
-src/fortran/intdgecon.f \
-src/fortran/zoldqr.f \
-src/fortran/intzgetrf.f \
-src/fortran/complexify.f \
-src/fortran/intzgebal.f \
-src/fortran/intzgetri.f \
-src/fortran/intzggbal.f \
-src/fortran/intddet.f \
-src/fortran/intzgesv3.f \
-src/fortran/intzgesv4.f \
-src/fortran/intzpotrf.f \
-src/fortran/intzgecon.f \
-src/fortran/intzoldsvd.f \
-src/fortran/intdgelsy.f \
-src/fortran/intdgeqpf3.f \
-src/fortran/intdgeqpf4.f \
-src/fortran/intdgesvd1.f \
-src/fortran/intdgehrd.f \
-src/fortran/intdgesvd2.f \
-src/fortran/intzdet.f \
-src/fortran/doldqr.f \
-src/fortran/intdgetrf.f \
-src/fortran/intzgelsy.f \
-src/fortran/intdgetri.f \
-src/fortran/intdgebal.f \
-src/fortran/intzgeqpf3.f \
-src/fortran/writebuf.f \
-src/fortran/intzschur.f
-
-GATEWAY_C_SOURCES = sci_gateway/c/sci_backslash.c \
-sci_gateway/c/sci_slash.c \
-sci_gateway/c/gw_linear_algebra2.c \
-sci_gateway/c/gw_linear_algebra.c \
-sci_gateway/c/assembleEigenvectors.c \
-sci_gateway/c/sci_dgeev.c \
-sci_gateway/c/sci_dggev.c \
-sci_gateway/c/sci_dsyev.c \
-sci_gateway/c/sci_zgeev.c \
-sci_gateway/c/sci_zggev.c \
-sci_gateway/c/sci_zheev.c
-
-GATEWAY_FORTRAN_SOURCES = sci_gateway/fortran/bschur.f
-GATEWAY_CPP_SOURCES = sci_gateway/cpp/linear_algebra_gw.cpp \
-sci_gateway/cpp/sci_chol.cpp \
-sci_gateway/cpp/sci_bdiag.cpp \
-sci_gateway/cpp/sci_inv.cpp \
-sci_gateway/cpp/sci_svd.cpp \
-sci_gateway/cpp/sci_rcond.cpp \
-sci_gateway/cpp/sci_qr.cpp \
-sci_gateway/cpp/sci_lu.cpp \
-sci_gateway/cpp/sci_lsq.cpp \
-sci_gateway/cpp/sci_hess.cpp \
-sci_gateway/cpp/sci_spec.cpp \
-sci_gateway/cpp/sci_det.cpp \
-sci_gateway/cpp/sci_balanc.cpp \
-sci_gateway/cpp/sci_schur.cpp
-
-libscilinear_algebra_la_CFLAGS = -I$(srcdir)/includes/ \
--I$(srcdir)/src/c/ \
--I$(top_srcdir)/modules/output_stream/includes \
--I$(top_srcdir)/modules/dynamic_link/includes \
--I$(top_srcdir)/modules/operations/includes \
--I$(top_srcdir)/modules/elementary_functions/includes \
--I$(top_srcdir)/modules/api_scilab/includes
-
-libscilinear_algebra_la_CPPFLAGS = -I$(srcdir)/includes/ \
--I$(srcdir)/src/cpp/ \
--I$(top_srcdir)/modules/symbol/includes \
--I$(top_srcdir)/modules/types/includes \
--I$(top_srcdir)/modules/ast/includes \
--I$(top_srcdir)/modules/output_stream/includes \
--I$(top_srcdir)/modules/api_scilab/includes \
--I$(top_srcdir)/modules/threads/includes \
--I$(top_srcdir)/modules/system_env/includes \
--I$(top_srcdir)/modules/string/includes \
--I$(top_srcdir)/modules/elementary_functions/includes \
--I$(top_srcdir)/modules/dynamic_link/includes \
--I$(top_srcdir)/modules/operations/includes \
--I$(top_srcdir)/libs/dynamiclibrary/includes
+LINEAR_ALGEBRA_CPP_SOURCES = \
+    src/cpp/scischur.cpp \
+    src/cpp/schurSelect.cpp
+
+LINEAR_ALGEBRA_C_SOURCES = \
+    src/c/schurtable.c \
+    src/c/invert_matrix.c \
+    src/c/lu.c \
+    src/c/qr.c \
+    src/c/hess.c \
+    src/c/eigen.c \
+    src/c/balanc.c \
+    src/c/chol.c \
+    src/c/svd.c \
+    src/c/rcond.c \
+    src/c/det.c \
+    src/c/lsq.c \
+    src/c/issymmetric.c
+
+LINEAR_ALGEBRA_FORTRAN_SOURCES = \
+    src/fortran/intdggbal.f \
+    src/fortran/intzgeqpf4.f \
+    src/fortran/intzgehrd.f \
+    src/fortran/intzgesvd1.f \
+    src/fortran/intzgesvd2.f \
+    src/fortran/intdgesv3.f \
+    src/fortran/intdgesv4.f \
+    src/fortran/DGELSY1.f \
+    src/fortran/intdpotrf.f \
+    src/fortran/intdoldsvd.f \
+    src/fortran/intdgecon.f \
+    src/fortran/zoldqr.f \
+    src/fortran/intzgetrf.f \
+    src/fortran/complexify.f \
+    src/fortran/intzgebal.f \
+    src/fortran/intzgetri.f \
+    src/fortran/intzggbal.f \
+    src/fortran/intddet.f \
+    src/fortran/intzgesv3.f \
+    src/fortran/intzgesv4.f \
+    src/fortran/intzpotrf.f \
+    src/fortran/intzgecon.f \
+    src/fortran/intzoldsvd.f \
+    src/fortran/intdgelsy.f \
+    src/fortran/intdgeqpf3.f \
+    src/fortran/intdgeqpf4.f \
+    src/fortran/intdgesvd1.f \
+    src/fortran/intdgehrd.f \
+    src/fortran/intdgesvd2.f \
+    src/fortran/intzdet.f \
+    src/fortran/doldqr.f \
+    src/fortran/intdgetrf.f \
+    src/fortran/intzgelsy.f \
+    src/fortran/intdgetri.f \
+    src/fortran/intdgebal.f \
+    src/fortran/intzgeqpf3.f \
+    src/fortran/writebuf.f \
+    src/fortran/intzschur.f
+
+GATEWAY_C_SOURCES = \
+    sci_gateway/c/sci_backslash.c \
+    sci_gateway/c/sci_slash.c \
+    sci_gateway/c/gw_linear_algebra2.c \
+    sci_gateway/c/gw_linear_algebra.c \
+    sci_gateway/c/assembleEigenvectors.c \
+    sci_gateway/c/sci_dgeev.c \
+    sci_gateway/c/sci_dggev.c \
+    sci_gateway/c/sci_dsyev.c \
+    sci_gateway/c/sci_zgeev.c \
+    sci_gateway/c/sci_zggev.c \
+    sci_gateway/c/sci_zheev.c
+
+GATEWAY_FORTRAN_SOURCES = \
+    sci_gateway/fortran/bschur.f
+
+GATEWAY_CPP_SOURCES = \
+    sci_gateway/cpp/linear_algebra_gw.cpp \
+    sci_gateway/cpp/sci_chol.cpp \
+    sci_gateway/cpp/sci_bdiag.cpp \
+    sci_gateway/cpp/sci_inv.cpp \
+    sci_gateway/cpp/sci_svd.cpp \
+    sci_gateway/cpp/sci_rcond.cpp \
+    sci_gateway/cpp/sci_qr.cpp \
+    sci_gateway/cpp/sci_lu.cpp \
+    sci_gateway/cpp/sci_lsq.cpp \
+    sci_gateway/cpp/sci_hess.cpp \
+    sci_gateway/cpp/sci_spec.cpp \
+    sci_gateway/cpp/sci_det.cpp \
+    sci_gateway/cpp/sci_balanc.cpp \
+    sci_gateway/cpp/sci_schur.cpp
+
+libscilinear_algebra_la_CFLAGS = \
+    -I$(srcdir)/includes/ \
+    -I$(srcdir)/src/c/ \
+    -I$(top_srcdir)/modules/output_stream/includes \
+    -I$(top_srcdir)/modules/dynamic_link/includes \
+    -I$(top_srcdir)/modules/operations/includes \
+    -I$(top_srcdir)/modules/elementary_functions/includes \
+    -I$(top_srcdir)/modules/api_scilab/includes
+
+libscilinear_algebra_la_CPPFLAGS = \
+    -I$(srcdir)/includes/ \
+    -I$(srcdir)/src/cpp/ \
+    -I$(top_srcdir)/modules/symbol/includes \
+    -I$(top_srcdir)/modules/types/includes \
+    -I$(top_srcdir)/modules/ast/includes \
+    -I$(top_srcdir)/modules/output_stream/includes \
+    -I$(top_srcdir)/modules/api_scilab/includes \
+    -I$(top_srcdir)/modules/threads/includes \
+    -I$(top_srcdir)/modules/system_env/includes \
+    -I$(top_srcdir)/modules/string/includes \
+    -I$(top_srcdir)/modules/elementary_functions/includes \
+    -I$(top_srcdir)/modules/dynamic_link/includes \
+    -I$(top_srcdir)/modules/operations/includes \
+    -I$(top_srcdir)/libs/dynamiclibrary/includes \
+    $(EIGEN_CPPFLAGS)
 
 pkglib_LTLIBRARIES = libscilinear_algebra.la
 noinst_LTLIBRARIES = libscilinear_algebra-algo.la
index f4022b4..8c258e7 100644 (file)
@@ -76,7 +76,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../includes;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../operations/includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../../libs/MALLOC/includes;../../../elementary_functions/includes;../../../api_scilab/includes;../../../threads/includes;../../../system_env/includes;../../../string/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../includes;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../operations/includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../../libs/MALLOC/includes;../../../elementary_functions/includes;../../../api_scilab/includes;../../../threads/includes;../../../system_env/includes;../../../string/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LINEAR_ALGEBRA_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../includes;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../operations/includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../../libs/MALLOC/includes;../../../elementary_functions/includes;../../../api_scilab/includes;../../../threads/includes;../../../system_env/includes;../../../string/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../includes;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../operations/includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../../libs/MALLOC/includes;../../../elementary_functions/includes;../../../api_scilab/includes;../../../threads/includes;../../../system_env/includes;../../../string/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LINEAR_ALGEBRA_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>../../includes;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../operations/includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../../libs/MALLOC/includes;../../../elementary_functions/includes;../../../api_scilab/includes;../../../threads/includes;../../../system_env/includes;../../../string/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../includes;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../operations/includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../../libs/MALLOC/includes;../../../elementary_functions/includes;../../../api_scilab/includes;../../../threads/includes;../../../system_env/includes;../../../string/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LINEAR_ALGEBRA_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>../../includes;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../operations/includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../../libs/MALLOC/includes;../../../elementary_functions/includes;../../../api_scilab/includes;../../../threads/includes;../../../system_env/includes;../../../string/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../includes;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../symbol/includes;../../../ast/includes;../../../operations/includes;../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../../libs/MALLOC/includes;../../../elementary_functions/includes;../../../api_scilab/includes;../../../threads/includes;../../../system_env/includes;../../../string/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LINEAR_ALGEBRA_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
index f8eabdf..07be852 100644 (file)
@@ -3,24 +3,26 @@
 #
 # This file is distributed under the same license as the Scilab package.
 
-MEXLIB_CPP_SOURCES = src/cpp/mexlib.cpp \
-src/cpp/sci_gateway.cpp
-
-
-MEXLIB_FLAGS =         -I$(srcdir)/includes/ \
-               -I$(top_srcdir)/modules/output_stream/includes/ \
-               -I$(top_srcdir)/modules/call_scilab/includes/ \
-               -I$(top_srcdir)/modules/elementary_functions/includes/ \
-               -I$(top_srcdir)/modules/operations/includes/ \
-               -I$(top_srcdir)/modules/string/includes \
-               -I$(top_srcdir)/modules/types/includes \
-               -I$(top_srcdir)/modules/symbol/includes \
-               -I$(top_srcdir)/modules/ast/includes \
-               -I$(top_srcdir)/modules/parse/includes \
-               -I$(top_srcdir)/modules/system_env/includes \
-               -I$(top_srcdir)/modules/threads/includes/ \
-               -I$(top_srcdir)/modules/api_scilab/includes/ \
-        -I$(top_srcdir)/libs/dynamiclibrary/includes
+MEXLIB_CPP_SOURCES = \
+    src/cpp/mexlib.cpp \
+    src/cpp/sci_gateway.cpp
+
+
+MEXLIB_FLAGS = \
+    -I$(srcdir)/includes/ \
+       -I$(top_srcdir)/modules/output_stream/includes/ \
+       -I$(top_srcdir)/modules/call_scilab/includes/ \
+       -I$(top_srcdir)/modules/elementary_functions/includes/ \
+       -I$(top_srcdir)/modules/operations/includes/ \
+       -I$(top_srcdir)/modules/string/includes \
+       -I$(top_srcdir)/modules/types/includes \
+       -I$(top_srcdir)/modules/symbol/includes \
+       -I$(top_srcdir)/modules/ast/includes \
+       -I$(top_srcdir)/modules/parse/includes \
+       -I$(top_srcdir)/modules/system_env/includes \
+       -I$(top_srcdir)/modules/threads/includes/ \
+       -I$(top_srcdir)/modules/api_scilab/includes/ \
+    -I$(top_srcdir)/libs/dynamiclibrary/includes
 
 pkglib_LTLIBRARIES = libmat.la libmex.la libmx.la
 
@@ -28,7 +30,9 @@ libmex_la_SOURCES = $(MEXLIB_CPP_SOURCES)
 
 libmex_la_LIBADD = $(MEXLIB_DEP)
 
-libmex_la_CPPFLAGS=  $(MEXLIB_FLAGS)
+libmex_la_CPPFLAGS =  \
+    $(MEXLIB_FLAGS) \
+    $(EIGEN_CPPFLAGS)
 
 libmex_la_LDFLAGS = -version-number $(SCILAB_LIBRARY_VERSION)
 
@@ -36,7 +40,9 @@ libmat_la_SOURCES = $(MEXLIB_CPP_SOURCES)
 
 libmat_la_LIBADD = $(MEXLIB_DEP)
 
-libmat_la_CPPFLAGS=  $(MEXLIB_FLAGS)
+libmat_la_CPPFLAGS = \
+    $(MEXLIB_FLAGS) \
+    $(EIGEN_CPPFLAGS)
 
 libmat_la_LDFLAGS = -version-number $(SCILAB_LIBRARY_VERSION)
 
@@ -44,7 +50,9 @@ libmx_la_SOURCES = $(MEXLIB_CPP_SOURCES)
 
 libmx_la_LIBADD = $(MEXLIB_DEP)
 
-libmx_la_CPPFLAGS=  $(MEXLIB_FLAGS)
+libmx_la_CPPFLAGS = \
+    $(MEXLIB_FLAGS) \
+    $(EIGEN_CPPFLAGS)
 
 libmx_la_LDFLAGS = -version-number $(SCILAB_LIBRARY_VERSION)
 
index 92623e1..d1407f8 100644 (file)
@@ -408,36 +408,47 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 yacc_present = @yacc_present@
-MEXLIB_CPP_SOURCES = src/cpp/mexlib.cpp \
-src/cpp/sci_gateway.cpp
-
-MEXLIB_FLAGS = -I$(srcdir)/includes/ \
-               -I$(top_srcdir)/modules/output_stream/includes/ \
-               -I$(top_srcdir)/modules/call_scilab/includes/ \
-               -I$(top_srcdir)/modules/elementary_functions/includes/ \
-               -I$(top_srcdir)/modules/operations/includes/ \
-               -I$(top_srcdir)/modules/string/includes \
-               -I$(top_srcdir)/modules/types/includes \
-               -I$(top_srcdir)/modules/symbol/includes \
-               -I$(top_srcdir)/modules/ast/includes \
-               -I$(top_srcdir)/modules/parse/includes \
-               -I$(top_srcdir)/modules/system_env/includes \
-               -I$(top_srcdir)/modules/threads/includes/ \
-               -I$(top_srcdir)/modules/api_scilab/includes/ \
-        -I$(top_srcdir)/libs/dynamiclibrary/includes
+MEXLIB_CPP_SOURCES = \
+    src/cpp/mexlib.cpp \
+    src/cpp/sci_gateway.cpp
+
+MEXLIB_FLAGS = \
+    -I$(srcdir)/includes/ \
+       -I$(top_srcdir)/modules/output_stream/includes/ \
+       -I$(top_srcdir)/modules/call_scilab/includes/ \
+       -I$(top_srcdir)/modules/elementary_functions/includes/ \
+       -I$(top_srcdir)/modules/operations/includes/ \
+       -I$(top_srcdir)/modules/string/includes \
+       -I$(top_srcdir)/modules/types/includes \
+       -I$(top_srcdir)/modules/symbol/includes \
+       -I$(top_srcdir)/modules/ast/includes \
+       -I$(top_srcdir)/modules/parse/includes \
+       -I$(top_srcdir)/modules/system_env/includes \
+       -I$(top_srcdir)/modules/threads/includes/ \
+       -I$(top_srcdir)/modules/api_scilab/includes/ \
+    -I$(top_srcdir)/libs/dynamiclibrary/includes
 
 pkglib_LTLIBRARIES = libmat.la libmex.la libmx.la
 libmex_la_SOURCES = $(MEXLIB_CPP_SOURCES)
 libmex_la_LIBADD = $(MEXLIB_DEP)
-libmex_la_CPPFLAGS = $(MEXLIB_FLAGS)
+libmex_la_CPPFLAGS = \
+    $(MEXLIB_FLAGS) \
+    $(EIGEN_CPPFLAGS)
+
 libmex_la_LDFLAGS = -version-number $(SCILAB_LIBRARY_VERSION)
 libmat_la_SOURCES = $(MEXLIB_CPP_SOURCES)
 libmat_la_LIBADD = $(MEXLIB_DEP)
-libmat_la_CPPFLAGS = $(MEXLIB_FLAGS)
+libmat_la_CPPFLAGS = \
+    $(MEXLIB_FLAGS) \
+    $(EIGEN_CPPFLAGS)
+
 libmat_la_LDFLAGS = -version-number $(SCILAB_LIBRARY_VERSION)
 libmx_la_SOURCES = $(MEXLIB_CPP_SOURCES)
 libmx_la_LIBADD = $(MEXLIB_DEP)
-libmx_la_CPPFLAGS = $(MEXLIB_FLAGS)
+libmx_la_CPPFLAGS = \
+    $(MEXLIB_FLAGS) \
+    $(EIGEN_CPPFLAGS)
+
 libmx_la_LDFLAGS = -version-number $(SCILAB_LIBRARY_VERSION)
 
 #### Target ######
index 0a20b93..e14064a 100644 (file)
@@ -1523,9 +1523,9 @@ int mexEvalString(const char *name)
             (*j)->accept(execMe);
 
             //to manage call without ()
-            if(execMe.result_get() != NULL && execMe.result_get()->getAsCallable())
+            if(execMe.result_get() != NULL && execMe.result_get()->getAs<Callable>())
             {
-                Callable *pCall = execMe.result_get()->getAsCallable();
+                Callable *pCall = execMe.result_get()->getAs<Callable>();
                 types::typed_list out;
                 types::typed_list in;
                 try
@@ -1643,7 +1643,7 @@ int mexEvalString(const char *name)
 
                         if(ConfigVariable::getLastErrorFunction() == L"")
                         {
-                            ConfigVariable::setLastErrorFunction(execFunc.result_get()->getAsCallable()->getName());
+                            ConfigVariable::setLastErrorFunction(execFunc.result_get()->getAs<Callable>()->getName());
                         }
 
                         //restore previous prompt mode
index 4aee8a2..6399c5b 100644 (file)
@@ -73,7 +73,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <AssemblerListingLocation>$(Configuration)/</AssemblerListingLocation>
@@ -111,7 +111,7 @@ cd ..
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <AssemblerListingLocation>$(Configuration)/</AssemblerListingLocation>
@@ -147,7 +147,7 @@ cd ..
     <ClCompile>
       <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <Optimization>MaxSpeed</Optimization>
-      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <ObjectFileName>$(Configuration)/</ObjectFileName>
@@ -186,7 +186,7 @@ cd ..
     </Midl>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
-      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <ObjectFileName>$(Configuration)/</ObjectFileName>
index 2ad49ce..336e1ca 100644 (file)
@@ -74,7 +74,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <AssemblerListingLocation>$(Configuration)/</AssemblerListingLocation>
@@ -112,7 +112,7 @@ cd ..
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <AssemblerListingLocation>$(Configuration)/</AssemblerListingLocation>
@@ -148,7 +148,7 @@ cd ..
     <ClCompile>
       <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <Optimization>MaxSpeed</Optimization>
-      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
@@ -186,7 +186,7 @@ cd ..
     </Midl>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
-      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
index 442857f..fa7a565 100644 (file)
@@ -74,7 +74,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <AssemblerListingLocation>$(Configuration)/</AssemblerListingLocation>
@@ -112,7 +112,7 @@ cd ..
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <AssemblerListingLocation>$(Configuration)/</AssemblerListingLocation>
@@ -148,7 +148,7 @@ cd ..
     <ClCompile>
       <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <Optimization>MaxSpeed</Optimization>
-      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <ObjectFileName>$(Configuration)/</ObjectFileName>
@@ -187,7 +187,7 @@ cd ..
     </Midl>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
-      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../../../core/includes;../../../string/includes;../../../elementary_functions/includes;../../../output_stream/includes;../../../call_scilab/includes;../../../localization/includes;../../includes;../../../../libs/MALLOC/includes;../../../../libs/intl;../../../types/includes;../../../ast/includes;../../../symbol/includes;../../../parse/includes;../../../system_env/includes;../../../api_scilab/includes;../../../threads/includes;../../../operations/includes;../../../../libs/dynamiclibrary/includes;../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>mexFunction=mex_libmx;mexfunction_=mexlibmx_;FORDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <ObjectFileName>$(Configuration)/</ObjectFileName>
index 4c2e9ac..0e7ca77 100644 (file)
@@ -19,8 +19,9 @@ OPERATIONS_CPP_SOURCES =  src/cpp/operations.cpp \
                        src/cpp/types_addition.cpp \
                        src/cpp/types_power.cpp \
                        src/cpp/types_finite.cpp \
-                       src/cpp/types_comparison_equal.cpp \
-                       src/cpp/types_comparison_non_equal.cpp
+                       src/cpp/types_comparison_eq.cpp \
+                       src/cpp/types_comparison_lt_le_gt_ge.cpp \
+                       src/cpp/types_comparison_ne.cpp
 
 pkglib_LTLIBRARIES = libscioperations.la
 
@@ -35,7 +36,9 @@ libscioperations_la_CXXFLAGS =        -I$(top_srcdir)/modules/operations/includes \
                                                -I$(top_srcdir)/modules/symbol/includes \
                                                -I$(top_srcdir)/modules/ast/includes \
                                                -I$(top_srcdir)/modules/core/includes \
-                                               -I$(top_srcdir)/modules/string/includes
+                                               -I$(top_srcdir)/modules/string/includes \
+                                               -I$(top_srcdir)/modules/elementary_functions/includes \
+                        $(EIGEN_CPPFLAGS)
 
 
 libscioperations_la_SOURCES = $(OPERATIONS_C_SOURCES) $(OPERATIONS_CPP_SOURCES)
index 9e6ffa0..700c261 100644 (file)
@@ -116,8 +116,9 @@ am__objects_2 = libscioperations_la-operations.lo \
        libscioperations_la-types_addition.lo \
        libscioperations_la-types_power.lo \
        libscioperations_la-types_finite.lo \
-       libscioperations_la-types_comparison_equal.lo \
-       libscioperations_la-types_comparison_non_equal.lo
+       libscioperations_la-types_comparison_eq.lo \
+       libscioperations_la-types_comparison_lt_le_gt_ge.lo \
+       libscioperations_la-types_comparison_ne.lo
 am_libscioperations_la_OBJECTS = $(am__objects_1) $(am__objects_2)
 libscioperations_la_OBJECTS = $(am_libscioperations_la_OBJECTS)
 libscioperations_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
@@ -425,8 +426,9 @@ OPERATIONS_CPP_SOURCES = src/cpp/operations.cpp \
                        src/cpp/types_addition.cpp \
                        src/cpp/types_power.cpp \
                        src/cpp/types_finite.cpp \
-                       src/cpp/types_comparison_equal.cpp \
-                       src/cpp/types_comparison_non_equal.cpp
+                       src/cpp/types_comparison_eq.cpp \
+                       src/cpp/types_comparison_lt_le_gt_ge.cpp \
+                       src/cpp/types_comparison_ne.cpp
 
 pkglib_LTLIBRARIES = libscioperations.la
 libscioperations_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION)
@@ -439,7 +441,9 @@ libscioperations_la_CXXFLAGS = -I$(top_srcdir)/modules/operations/includes \
                                                -I$(top_srcdir)/modules/symbol/includes \
                                                -I$(top_srcdir)/modules/ast/includes \
                                                -I$(top_srcdir)/modules/core/includes \
-                                               -I$(top_srcdir)/modules/string/includes
+                                               -I$(top_srcdir)/modules/string/includes \
+                                               -I$(top_srcdir)/modules/elementary_functions/includes \
+                        $(EIGEN_CPPFLAGS)
 
 libscioperations_la_SOURCES = $(OPERATIONS_C_SOURCES) $(OPERATIONS_CPP_SOURCES)
 libscioperations_la_LIBADD = 
@@ -593,8 +597,9 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscioperations_la-operations.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscioperations_la-operations_tools.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscioperations_la-types_addition.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscioperations_la-types_comparison_equal.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscioperations_la-types_comparison_non_equal.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscioperations_la-types_comparison_eq.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscioperations_la-types_comparison_lt_le_gt_ge.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscioperations_la-types_comparison_ne.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscioperations_la-types_divide.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscioperations_la-types_finite.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscioperations_la-types_multiplication.Plo@am__quote@
@@ -748,19 +753,26 @@ libscioperations_la-types_finite.lo: src/cpp/types_finite.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscioperations_la_CXXFLAGS) $(CXXFLAGS) -c -o libscioperations_la-types_finite.lo `test -f 'src/cpp/types_finite.cpp' || echo '$(srcdir)/'`src/cpp/types_finite.cpp
 
-libscioperations_la-types_comparison_equal.lo: src/cpp/types_comparison_equal.cpp
-@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscioperations_la_CXXFLAGS) $(CXXFLAGS) -MT libscioperations_la-types_comparison_equal.lo -MD -MP -MF $(DEPDIR)/libscioperations_la-types_comparison_equal.Tpo -c -o libscioperations_la-types_comparison_equal.lo `test -f 'src/cpp/types_comparison_equal.cpp' || echo '$(srcdir)/'`src/cpp/types_comparison_equal.cpp
-@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscioperations_la-types_comparison_equal.Tpo $(DEPDIR)/libscioperations_la-types_comparison_equal.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/cpp/types_comparison_equal.cpp' object='libscioperations_la-types_comparison_equal.lo' libtool=yes @AMDEPBACKSLASH@
+libscioperations_la-types_comparison_eq.lo: src/cpp/types_comparison_eq.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscioperations_la_CXXFLAGS) $(CXXFLAGS) -MT libscioperations_la-types_comparison_eq.lo -MD -MP -MF $(DEPDIR)/libscioperations_la-types_comparison_eq.Tpo -c -o libscioperations_la-types_comparison_eq.lo `test -f 'src/cpp/types_comparison_eq.cpp' || echo '$(srcdir)/'`src/cpp/types_comparison_eq.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscioperations_la-types_comparison_eq.Tpo $(DEPDIR)/libscioperations_la-types_comparison_eq.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/cpp/types_comparison_eq.cpp' object='libscioperations_la-types_comparison_eq.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscioperations_la_CXXFLAGS) $(CXXFLAGS) -c -o libscioperations_la-types_comparison_equal.lo `test -f 'src/cpp/types_comparison_equal.cpp' || echo '$(srcdir)/'`src/cpp/types_comparison_equal.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscioperations_la_CXXFLAGS) $(CXXFLAGS) -c -o libscioperations_la-types_comparison_eq.lo `test -f 'src/cpp/types_comparison_eq.cpp' || echo '$(srcdir)/'`src/cpp/types_comparison_eq.cpp
 
-libscioperations_la-types_comparison_non_equal.lo: src/cpp/types_comparison_non_equal.cpp
-@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscioperations_la_CXXFLAGS) $(CXXFLAGS) -MT libscioperations_la-types_comparison_non_equal.lo -MD -MP -MF $(DEPDIR)/libscioperations_la-types_comparison_non_equal.Tpo -c -o libscioperations_la-types_comparison_non_equal.lo `test -f 'src/cpp/types_comparison_non_equal.cpp' || echo '$(srcdir)/'`src/cpp/types_comparison_non_equal.cpp
-@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscioperations_la-types_comparison_non_equal.Tpo $(DEPDIR)/libscioperations_la-types_comparison_non_equal.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/cpp/types_comparison_non_equal.cpp' object='libscioperations_la-types_comparison_non_equal.lo' libtool=yes @AMDEPBACKSLASH@
+libscioperations_la-types_comparison_lt_le_gt_ge.lo: src/cpp/types_comparison_lt_le_gt_ge.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscioperations_la_CXXFLAGS) $(CXXFLAGS) -MT libscioperations_la-types_comparison_lt_le_gt_ge.lo -MD -MP -MF $(DEPDIR)/libscioperations_la-types_comparison_lt_le_gt_ge.Tpo -c -o libscioperations_la-types_comparison_lt_le_gt_ge.lo `test -f 'src/cpp/types_comparison_lt_le_gt_ge.cpp' || echo '$(srcdir)/'`src/cpp/types_comparison_lt_le_gt_ge.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscioperations_la-types_comparison_lt_le_gt_ge.Tpo $(DEPDIR)/libscioperations_la-types_comparison_lt_le_gt_ge.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/cpp/types_comparison_lt_le_gt_ge.cpp' object='libscioperations_la-types_comparison_lt_le_gt_ge.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscioperations_la_CXXFLAGS) $(CXXFLAGS) -c -o libscioperations_la-types_comparison_non_equal.lo `test -f 'src/cpp/types_comparison_non_equal.cpp' || echo '$(srcdir)/'`src/cpp/types_comparison_non_equal.cpp
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscioperations_la_CXXFLAGS) $(CXXFLAGS) -c -o libscioperations_la-types_comparison_lt_le_gt_ge.lo `test -f 'src/cpp/types_comparison_lt_le_gt_ge.cpp' || echo '$(srcdir)/'`src/cpp/types_comparison_lt_le_gt_ge.cpp
+
+libscioperations_la-types_comparison_ne.lo: src/cpp/types_comparison_ne.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscioperations_la_CXXFLAGS) $(CXXFLAGS) -MT libscioperations_la-types_comparison_ne.lo -MD -MP -MF $(DEPDIR)/libscioperations_la-types_comparison_ne.Tpo -c -o libscioperations_la-types_comparison_ne.lo `test -f 'src/cpp/types_comparison_ne.cpp' || echo '$(srcdir)/'`src/cpp/types_comparison_ne.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscioperations_la-types_comparison_ne.Tpo $(DEPDIR)/libscioperations_la-types_comparison_ne.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/cpp/types_comparison_ne.cpp' object='libscioperations_la-types_comparison_ne.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscioperations_la_CXXFLAGS) $(CXXFLAGS) -c -o libscioperations_la-types_comparison_ne.lo `test -f 'src/cpp/types_comparison_ne.cpp' || echo '$(srcdir)/'`src/cpp/types_comparison_ne.cpp
 
 mostlyclean-libtool:
        -rm -f *.lo
index a94c1e2..77887d3 100644 (file)
@@ -19,6 +19,7 @@
 #include "double.hxx"
 #include "string.hxx"
 #include "polynom.hxx"
+#include "sparse.hxx"
 
 /*
 ** Try to find a good algorithm to perform addition between those 2 datatypes.
 */
 EXTERN_OP types::InternalType* GenericPlus(types::InternalType *_pLeftOperand, types::InternalType *_pRightOperand);
 
+//Double
 int AddDoubleToDouble(types::Double *_pDouble1, types::Double *_pDouble2, types::Double** _pDoubleOut);
+
+//Poly
 int AddDoubleToPoly(types::Polynom *_pPoly, types::Double *_pDouble, types::Polynom ** _pPolyOut);
 int AddPolyToPoly(types::Polynom* pPoly1, types::Polynom* _pPoly2, types::Polynom ** _pPolyOut);
+
+//String
 int AddStringToString(types::String *_pString1, types::String *_pString2, types::String** _pStringOut);
 
+//Sparse
+int AddSparseToSparse(types::Sparse *_pSparse1, types::Sparse *_pSparse2, types::Sparse** _pSparseOut);
+int AddSparseToDouble(types::Sparse *_pSparse,  types::Double* _pDouble, types::GenericType** _pDoubleOut);
+int AddDoubleToSparse(types::Double* _pDouble, types::Sparse* _pSparse, types::GenericType** _pDoubleOut);
+
 #endif /* __TYPES_ADD_H__ */
@@ -15,6 +15,8 @@
 
 #include "dynlib_operations.hxx"
 #include "internal.hxx"
+#include "double.hxx"
+#include "sparse.hxx"
 
 /*
 ** Try to find a good algorithm to perform equal comparison between those 2 datatypes.
 */
 EXTERN_OP types::InternalType* GenericComparisonEqual(types::InternalType *_pLeftOperand, types::InternalType *_pRightOperand);
 
+int EqualToSparseAndSparse(types::Sparse* _pSparse1, types::Sparse* _pSarse2, types::GenericType** _pOut);
+int EqualToDoubleAndSparse(types::Double* _pDouble, types::Sparse* _pSarse, types::GenericType** _pOut);
+int EqualToSparseAndDouble(types::Sparse* _pSparse, types::Double* _pDouble, types::GenericType** _pOut);
+int EqualToSparseBoolAndSparseBool(types::SparseBool* _pSB1, types::SparseBool* _pSB2, types::GenericType** _pOut);
+int EqualToSparseBoolAndBool(types::SparseBool* _pSB1, types::Bool* _pB2, types::GenericType** _pOut);
+int EqualToBoolAndSparseBool(types::Bool* _pB1, types::SparseBool* _pSB2, types::GenericType** _pOut);
+
 #endif /* !__TYPES_COMPARISON_EQUAL_HXX__ */
diff --git a/scilab/modules/operations/includes/types_comparison_lt_le_gt_ge.hxx b/scilab/modules/operations/includes/types_comparison_lt_le_gt_ge.hxx
new file mode 100644 (file)
index 0000000..0d8c0e1
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+*  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+*  Copyright (C) 2012 - DIGITEO - Antoine ELIAS
+*
+*  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 __TYPES_COMPARAISON_LT_LE_HXX__
+#define __TYPES_COMPARAISON_LT_LE_HXX__
+
+#include "dynlib_operations.hxx"
+#include "double.hxx"
+#include "sparse.hxx"
+#include "bool.hxx"
+
+EXTERN_OP types::InternalType *GenericLess(types::InternalType *_pLeftOperand, types::InternalType *_pRightOperand);
+EXTERN_OP types::InternalType *GenericLessEqual(types::InternalType *_pLeftOperand, types::InternalType *_pRightOperand);
+EXTERN_OP types::InternalType *GenericGreater(types::InternalType *_pLeftOperand, types::InternalType *_pRightOperand);
+EXTERN_OP types::InternalType *GenericGreaterEqual(types::InternalType *_pLeftOperand, types::InternalType *_pRightOperand);
+
+int DoubleLessDouble(types::Double* _pDouble1, types::Double* _pDouble2, types::Bool** _pOut);
+int DoubleLessEqualDouble(types::Double* _pDouble1, types::Double* _pDouble2, types::Bool** _pOut);
+
+int DoubleLessSparse(types::Double* _pDouble, types::Sparse* _pSparse, types::SparseBool** _pOut);
+int DoubleLessEqualSparse(types::Double* _pDouble, types::Sparse* _pSparse, types::SparseBool** _pOut);
+int SparseLessDouble(types::Sparse* _pSparse, types::Double* _pDouble, types::SparseBool** _pOut);
+int SparseLessEqualDouble(types::Sparse* _pSparse, types::Double* _pDouble, types::SparseBool** _pOut);
+
+int SparseLessSparse(types::Sparse* _pSparse1, types::Sparse* _pSparse2, types::SparseBool** _pOut);
+int SparseLessEqualSparse(types::Sparse* _pSparse1, types::Sparse* _pSparse2, types::SparseBool** _pOut);
+
+#endif /* !__TYPES_COMPARAISON_LT_LE_HXX__ */
\ No newline at end of file
index 9262493..0009d53 100644 (file)
 #include "dynlib_operations.hxx"
 #include "double.hxx"
 #include "polynom.hxx"
+#include "sparse.hxx"
 
+using namespace types;
 
 EXTERN_OP types::InternalType *GenericDotTimes(types::InternalType *_pLeftOperand, types::InternalType *_pRightOperand);
 EXTERN_OP types::InternalType *GenericTimes(types::InternalType *_pLeftOperand, types::InternalType *_pRightOperand);
 
 int MultiplyDoubleByDouble(types::Double* _pDouble1, types::Double* _pDouble2, types::Double** _pDoubleOut);
-int MultiplyDoubleByDouble(types::Double* _pDouble1, types::Double* _pDouble2, types::Double** _pDoubleOut);
 int MultiplyDoubleByPoly(types::Double* _pDouble, types::Polynom* _pPoly, types::Polynom** _pPolyOut);
 int MultiplyPolyByDouble(types::Polynom* _pPoly, types::Double* _pDouble, types::Polynom **_pPolyOut);
 int MultiplyPolyByPoly(types::Polynom* _pPoly1, types::Polynom* _pPoly2, types::Polynom** _pPolyOut);
 
-int DotMultiplyDoubleByDouble(types::Double* _pDouble1, types::Double* _pDouble2, types::Double**       _pDoubleOut);
+int DotMultiplyDoubleByDouble(types::Double* _pDouble1, types::Double* _pDouble2, types::Double** _pDoubleOut);
+
+int MultiplySparseBySparse(Sparse* _pSparse1, Sparse* _pSparse2, Sparse** _pSparseOut);
+int MultiplyDoubleBySparse(Double* _pDouble, Sparse *_pSparse, GenericType** _pDoubleOut);
+int MultiplySparseByDouble(Sparse *_pSparse, Double*_pDouble, GenericType** _pDoubleOut);
 
+int DotMultiplySparseBySparse(Sparse* _pSparse1, Sparse* _pSparse2, Sparse** _pSparseOut);
+int DotMultiplyDoubleBySparse(Double* _pDouble1, Sparse* _pSparse2, GenericType**  _pSparseOut);
+int DotMultiplySparseByDouble(Sparse* _pSparse1, Double* _pDouble2, GenericType** _pSparseOut);
 #endif /* __TYPES_MULTIPLICATION_HXX__ */
index eb3cde9..faa8fdc 100644 (file)
@@ -17,6 +17,7 @@
 #include "dynlib_operations.hxx"
 #include "double.hxx"
 #include "polynom.hxx"
+#include "sparse.hxx"
 
 using namespace types;
 /*
@@ -34,4 +35,9 @@ int SubstractPolyToDouble(Double *_pDouble, Polynom *_pPoly, Polynom **_pPolyOut
 int SubstractDoubleToPoly(Polynom *_pPoly, Double *_pDouble, Polynom **_pPolyOut);
 int SubstractPolyToPoly(Polynom *_pPoly1, Polynom *_pPoly2, Polynom **_pPolyOut);
 
+//Sparse
+int SubstractSparseToSparse(Sparse* _pSparse1, Sparse* _pSparse2, GenericType **_pSparseOut);
+int SubstractSparseToDouble(Sparse* _pSparse, Double* _pDouble, GenericType **_pDoubleOut);
+int SubstractDoubleToSparse(Double* _pDouble, Sparse* _pSparse, GenericType **_pDoubleOut);
+
 #endif /* __TYPES_SUB_H__ */
index c6ff08a..944e069 100644 (file)
@@ -76,7 +76,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>includes;../elementary_functions/includes;../core/includes;../types/includes;../symbol/includes;../ast/includes;../localization/includes;../../libs/intl;../string/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;../elementary_functions/includes;../core/includes;../types/includes;../symbol/includes;../ast/includes;../localization/includes;../../libs/intl;../string/includes;../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;OPERATIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -110,7 +110,7 @@ lib /DEF:"$(ProjectDir)polynomials_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(P
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>includes;../elementary_functions/includes;../core/includes;../types/includes;../symbol/includes;../ast/includes;../localization/includes;../../libs/intl;../string/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;../elementary_functions/includes;../core/includes;../types/includes;../symbol/includes;../ast/includes;../localization/includes;../../libs/intl;../string/includes;../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;OPERATIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -142,7 +142,7 @@ lib /DEF:"$(ProjectDir)polynomials_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(P
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>includes;../elementary_functions/includes;../core/includes;../types/includes;../symbol/includes;../ast/includes;../localization/includes;../../libs/intl;../string/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;../elementary_functions/includes;../core/includes;../types/includes;../symbol/includes;../ast/includes;../localization/includes;../../libs/intl;../string/includes;../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;OPERATIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
@@ -179,7 +179,7 @@ lib /DEF:"$(ProjectDir)polynomials_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(P
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>includes;../elementary_functions/includes;../core/includes;../types/includes;../symbol/includes;../ast/includes;../localization/includes;../../libs/intl;../string/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;../elementary_functions/includes;../core/includes;../types/includes;../symbol/includes;../ast/includes;../localization/includes;../../libs/intl;../string/includes;../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;OPERATIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
@@ -210,8 +210,9 @@ lib /DEF:"$(ProjectDir)polynomials_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(P
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
-    <ClCompile Include="src\cpp\types_comparison_equal.cpp" />
-    <ClCompile Include="src\cpp\types_comparison_non_equal.cpp" />
+    <ClCompile Include="src\cpp\types_comparison_eq.cpp" />
+    <ClCompile Include="src\cpp\types_comparison_lt_le_gt_ge.cpp" />
+    <ClCompile Include="src\cpp\types_comparison_ne.cpp" />
     <ClCompile Include="src\c\doublecomplex.c" />
     <ClCompile Include="src\c\matrix_addition.c" />
     <ClCompile Include="src\c\matrix_division.c" />
@@ -241,8 +242,9 @@ lib /DEF:"$(ProjectDir)polynomials_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(P
     <ClInclude Include="includes\matrix_transpose.h" />
     <ClInclude Include="includes\operations_tools.h" />
     <ClInclude Include="includes\types_addition.hxx" />
-    <ClInclude Include="includes\types_comparison_equal.hxx" />
-    <ClInclude Include="includes\types_comparison_non_equal.hxx" />
+    <ClInclude Include="includes\types_comparison_eq.hxx" />
+    <ClInclude Include="includes\types_comparison_lt_le_gt_ge.hxx" />
+    <ClInclude Include="includes\types_comparison_ne.hxx" />
     <ClInclude Include="includes\types_divide.hxx" />
     <ClInclude Include="includes\types_finite.hxx" />
     <ClInclude Include="includes\types_multiplication.hxx" />
index 9f033de..6d36603 100644 (file)
     <ClCompile Include="src\cpp\types_substraction.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="src\cpp\types_comparison_equal.cpp">
+    <ClCompile Include="src\cpp\types_comparison_ne.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="src\cpp\types_comparison_non_equal.cpp">
+    <ClCompile Include="src\cpp\types_comparison_eq.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="src\cpp\types_comparison_lt_le_gt_ge.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>
     <ClInclude Include="includes\types_substraction.hxx">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="includes\types_comparison_equal.hxx">
+    <ClInclude Include="includes\types_comparison_eq.hxx">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="includes\types_comparison_ne.hxx">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="includes\types_comparison_non_equal.hxx">
+    <ClInclude Include="includes\types_comparison_lt_le_gt_ge.hxx">
       <Filter>Header Files</Filter>
     </ClInclude>
   </ItemGroup>
index 7a5c5ed..98512b7 100644 (file)
@@ -23,6 +23,7 @@ extern "C"
     #include "localization.h"
     #include "charEncoding.h"
     #include "os_swprintf.h"
+    #include "elem_common.h" //dset
 }
 
 using namespace types;
@@ -60,8 +61,8 @@ InternalType *GenericPlus(InternalType *_pLeftOperand, InternalType *_pRightOper
     */
     else if(_pLeftOperand->isString() && _pRightOperand->isString())
     {
-        String *pL = _pLeftOperand->getAs<types::String>();
-        String *pR = _pRightOperand->getAs<types::String>();
+        String *pL = _pLeftOperand->getAs<String>();
+        String *pR = _pRightOperand->getAs<String>();
 
         int iResult = AddStringToString(pL, pR, (String**)&pResult);
 
@@ -85,7 +86,7 @@ InternalType *GenericPlus(InternalType *_pLeftOperand, InternalType *_pRightOper
     else if(_pLeftOperand->isDouble() && _pRightOperand->isPoly())
     {
         Double *pL          = _pLeftOperand->getAs<Double>();
-        Polynom *pR      = _pRightOperand->getAs<types::Polynom>();
+        Polynom *pR      = _pRightOperand->getAs<Polynom>();
 
         int iResult = AddDoubleToPoly(pR, pL, (Polynom**)&pResult);
         if(iResult != 0)
@@ -103,7 +104,7 @@ InternalType *GenericPlus(InternalType *_pLeftOperand, InternalType *_pRightOper
     else if(_pLeftOperand->isPoly() && _pRightOperand->isDouble())
     {
         Double *pR             = _pRightOperand->getAs<Double>();
-        Polynom *pL      = _pLeftOperand->getAs<types::Polynom>();
+        Polynom *pL      = _pLeftOperand->getAs<Polynom>();
 
         int iResult = AddDoubleToPoly(pL, pR, (Polynom**)&pResult);
         if(iResult != 0)
@@ -120,8 +121,8 @@ InternalType *GenericPlus(InternalType *_pLeftOperand, InternalType *_pRightOper
     */
     else if(_pLeftOperand->isPoly() && _pRightOperand->isPoly())
     {
-        Polynom *pL    = _pLeftOperand->getAs<types::Polynom>();
-        Polynom *pR    = _pRightOperand->getAs<types::Polynom>();
+        Polynom *pL    = _pLeftOperand->getAs<Polynom>();
+        Polynom *pR    = _pRightOperand->getAs<Polynom>();
 
         int iResult = AddPolyToPoly(pL, pR, (Polynom**)&pResult);
         if(iResult != 0)
@@ -140,6 +141,58 @@ InternalType *GenericPlus(InternalType *_pLeftOperand, InternalType *_pRightOper
                 throw ast::ScilabError(os.str());
             }
         }
+
+        return pResult;
+    }
+
+    /*
+    ** SPARSE + SPARSE
+    */
+    else if(_pLeftOperand->isSparse() && _pRightOperand->isSparse())
+    {
+        Sparse *pL     = _pLeftOperand->getAs<Sparse>();
+        Sparse *pR     = _pRightOperand->getAs<Sparse>();
+
+        int iResult = AddSparseToSparse(pL, pR, (Sparse**)&pResult);
+        if(iResult != 0)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** SPARSE + DOUBLE
+    */
+    else if(_pLeftOperand->isSparse() && _pRightOperand->isDouble())
+    {
+        Sparse *pL     = _pLeftOperand->getAs<Sparse>();
+        Double *pR     = _pRightOperand->getAs<Double>();
+
+        int iResult = AddDoubleToSparse(pR, pL, (GenericType**)&pResult);
+        if(iResult != 0)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** DOUBLE + SPARSE
+    */
+    else if(_pLeftOperand->isDouble() && _pRightOperand->isSparse())
+    {
+        Double *pL     = _pLeftOperand->getAs<Double>();
+        Sparse *pR     = _pRightOperand->getAs<Sparse>();
+
+        int iResult = AddSparseToDouble(pR, pL, (GenericType**)&pResult);
+        if(iResult != 0)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
         return pResult;
     }
 
@@ -831,3 +884,229 @@ int AddStringToString(String *_pString1, String *_pString2, String **_pStringOut
 
 }
 
+int AddSparseToSparse(Sparse* sp1, Sparse* sp2, Sparse** pSpRes)
+{
+    //check scalar hidden in a sparse ;)
+    if(sp1->getRows() == 1 && sp1->getCols() == 1)
+    {//do scalar + sp
+        Double* pDbl = NULL;
+        if(sp1->isComplex())
+        {
+            std::complex<double> dbl = sp1->getImg(0,0);
+            pDbl = new Double(dbl.real(), dbl.imag());
+        }
+        else
+        {
+            pDbl = new Double(sp1->get(0,0));
+        }
+        
+        AddSparseToDouble(sp2, pDbl, (GenericType**)pSpRes);
+        delete pDbl;
+        return 0;
+    }
+
+    if(sp2->getRows() == 1 && sp2->getCols() == 1)
+    {//do sp + scalar
+        Double* pDbl = NULL;
+        if(sp2->isComplex())
+        {
+            std::complex<double> dbl = sp2->getImg(0,0);
+            pDbl = new Double(dbl.real(), dbl.imag());
+        }
+        else
+        {
+            pDbl = new Double(sp2->get(0,0));
+        }
+
+        AddSparseToDouble(sp1, pDbl, (GenericType**)pSpRes);
+        delete pDbl;
+        return 0;
+    }
+
+    if(sp1->getRows() != sp2->getRows() || sp1->getCols() != sp2->getCols())
+    {//dimensions not match
+        return 1;
+    }
+
+    if(sp1->nonZeros() == 0)
+    {//sp([]) + sp
+        *pSpRes = new Sparse(*sp2);
+        return 0;
+    }
+
+    if(sp2->nonZeros() == 0)
+    {//sp + sp([])
+        *pSpRes = new Sparse(*sp1);
+        return 0;
+    }
+
+    //copy sp1 in pSpRes
+    *pSpRes = sp1->add(*sp2);
+    return 0;
+}
+
+int AddSparseToDouble(Sparse* sp, Double* d, GenericType** pDRes)
+{
+    int iOne = 1; //fortran 
+    bool bComplex1 = sp->isComplex();
+    bool bComplex2 = d->isComplex();
+
+    if(d->isEmpty())
+    {//[] + SP
+        *pDRes = sp->clone();
+        return 0;
+    }
+
+    if(sp->isScalar() && d->isScalar())
+    {//sp + d
+        Double* pRes = d->clone()->getAs<Double>();
+        pRes->setComplex(bComplex1 | bComplex2);
+        if(bComplex1)
+        {
+            std::complex<double> dbl = sp->getImg(0, 0);
+            pRes->set(0, pRes->get(0) + dbl.real());
+            pRes->setImg(0, pRes->getImg(0) + dbl.imag());
+        }
+        else
+        {
+            pRes->set(0, pRes->get(0) + sp->get(0, 0));
+        }
+
+        *pDRes = pRes;
+        return 0;
+    }
+
+    if(d->isScalar())
+    {//SP + d
+        Double* pRes = new Double(sp->getRows(), sp->getCols(), bComplex1 | bComplex2);
+        int iSize = sp->getSize();
+        double dblVal = d->get(0);
+        C2F(dset)(&iSize, &dblVal, pRes->get(), &iOne);
+        if(bComplex2)
+        {
+            double dblValI = d->getImg(0);
+            C2F(dset)(&iSize, &dblValI, pRes->getImg(), &iOne);
+        }
+        else if(bComplex1)
+        {//initialize imag part at 0
+            double dblValI = 0;
+            C2F(dset)(&iSize, &dblValI, pRes->getImg(), &iOne);
+        }
+
+        int nonZeros = static_cast<int>(sp->nonZeros());
+        double* pRows = new double[nonZeros * 2];
+        sp->outputRowCol(pRows);
+        double* pCols = pRows + nonZeros;
+
+        double* pNonZeroR = new double[nonZeros];
+        double* pNonZeroI = new double[nonZeros];
+        sp->outputValues(pNonZeroR, pNonZeroI);
+
+        if(bComplex1)
+        {
+            for(int i = 0 ; i < nonZeros ; i++)
+            {
+                int iRow = static_cast<int>(pRows[i]) - 1;
+                int iCol = static_cast<int>(pCols[i]) - 1;
+                std::complex<double> dbl = sp->getImg(iRow, iCol);
+                pRes->set(iRow, iCol, pRes->get(iRow, iCol) + dbl.real());
+                pRes->setImg(iRow, iCol, pRes->getImg(iRow, iCol) + dbl.imag());
+            }
+        }
+        else
+        {
+            for(int i = 0 ; i < nonZeros ; i++)
+            {
+                int iRow = static_cast<int>(pRows[i]) - 1;
+                int iCol = static_cast<int>(pCols[i]) - 1;
+                pRes->set(iRow, iCol, pRes->get(iRow, iCol) + sp->get(iRow, iCol));
+            }
+        }
+        *pDRes = pRes;
+
+        //clear
+        delete[] pRows;
+        delete[] pNonZeroR;
+        delete[] pNonZeroI;
+
+        return 0;
+    }
+
+    if(sp->isScalar())
+    {//sp + D
+        Double* pRes = d->clone()->getAs<Double>();
+        pRes->setComplex(bComplex1 | bComplex2);
+
+        if(bComplex1)
+        {
+            double* pReal = pRes->get();
+            double* pImg = pRes->getImg();
+            for(int i = 0 ; i < pRes->getSize() ; i++)
+            {
+                std::complex<double> dbl = sp->getImg(0, 0);
+                pReal[i] += dbl.real();
+                pImg[i] += dbl.imag();
+            }
+        }
+        else
+        {
+            double* pReal = pRes->get();
+            for(int i = 0 ; i < pRes->getSize() ; i++)
+            {
+                pReal[i] += sp->get(0, 0);
+            }
+        }
+        *pDRes = pRes;
+        return 0;
+    }
+
+
+    if(sp->getRows() == d->getRows() && sp->getCols() == d->getCols())
+    {//SP + D
+        Double* pRes = d->clone()->getAs<Double>();
+        pRes->setComplex(bComplex1 | bComplex2);
+
+        int nonZeros = static_cast<int>(sp->nonZeros());
+        double* pRows = new double[nonZeros * 2];
+        sp->outputRowCol(pRows);
+        double* pCols = pRows + nonZeros;
+
+        double* pNonZeroR = new double[nonZeros];
+        double* pNonZeroI = new double[nonZeros];
+        sp->outputValues(pNonZeroR, pNonZeroI);
+
+        if(bComplex1)
+        {
+            for(int i = 0 ; i < nonZeros ; i++)
+            {
+                int iRow = static_cast<int>(pRows[i]) - 1;
+                int iCol = static_cast<int>(pCols[i]) - 1;
+                std::complex<double> dbl = sp->getImg(iRow, iCol);
+                pRes->set(iRow, iCol, pRes->get(iRow, iCol) + dbl.real());
+                pRes->setImg(iRow, iCol, pRes->getImg(iRow, iCol) + dbl.imag());
+            }
+        }
+        else
+        {
+            for(int i = 0 ; i < nonZeros ; i++)
+            {
+                int iRow = static_cast<int>(pRows[i]) - 1;
+                int iCol = static_cast<int>(pCols[i]) - 1;
+                pRes->set(iRow, iCol, pRes->get(iRow, iCol) + sp->get(iRow, iCol));
+            }
+        }
+
+        //clear
+        delete[] pRows;
+        delete[] pNonZeroR;
+        delete[] pNonZeroI;
+        *pDRes = pRes;
+        return 0;
+    }
+    return 1;
+}
+
+int AddDoubleToSparse(Double* d, Sparse* sp, GenericType** pDRes)
+{/* uses commutativity */
+    return AddSparseToDouble(sp, d, pDRes);
+}
  *
  */
 
-#include "types_comparison_equal.hxx"
+#include "types_comparison_eq.hxx"
 #include "bool.hxx"
 #include "double.hxx"
 #include "string.hxx"
 #include "list.hxx"
 #include "cell.hxx"
+#include "sparse.hxx"
 
 using namespace types;
 
@@ -291,6 +292,9 @@ InternalType *GenericComparisonEqual(InternalType *_pLeftOperand, InternalType *
         return pB;
     }
 
+    /*
+    ** CELL == CELL
+    */
     if(TypeL == GenericType::RealCell && TypeR == GenericType::RealCell)
     {
         Cell* pCL = _pLeftOperand->getAs<Cell>();
@@ -332,15 +336,117 @@ InternalType *GenericComparisonEqual(InternalType *_pLeftOperand, InternalType *
     */
     if(TypeL == GenericType::RealDouble && TypeR == GenericType::RealString)
     {
-        return new types::Bool(0);;
+        return new Bool(0);
     }
 
-   /*
+    /*
     ** STRING == DOUBLE
     */
     if(TypeL == GenericType::RealString && TypeR == GenericType::RealDouble)
     {
-        return new types::Bool(0);;
+        return new Bool(0);;
+    }
+
+    /*
+    ** SPARSE == SPARSE
+    */
+    if(TypeL == GenericType::RealSparse && TypeR == GenericType::RealSparse)
+    {
+        Sparse* pL = _pLeftOperand->getAs<Sparse>();
+        Sparse* pR = _pRightOperand->getAs<Sparse>();
+
+        int iResult = EqualToSparseAndSparse(pL, pR, (GenericType**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+        
+    /*
+    ** SPARSE == DOUBLE
+    */
+    if(TypeL == GenericType::RealSparse && TypeR == GenericType::RealDouble)
+    {
+        Sparse* pL = _pLeftOperand->getAs<Sparse>();
+        Double* pR = _pRightOperand->getAs<Double>();
+
+        int iResult = EqualToSparseAndDouble(pL, pR, (GenericType**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** DOUBLE == SPARSE
+    */
+    if(TypeL == GenericType::RealDouble && TypeR == GenericType::RealSparse)
+    {
+        Double* pL = _pLeftOperand->getAs<Double>();
+        Sparse* pR = _pRightOperand->getAs<Sparse>();
+
+        int iResult = EqualToDoubleAndSparse(pL, pR, (GenericType**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** SPARSE BOOL == SPARSE BOOL
+    */
+    if(TypeL == GenericType::RealSparseBool && TypeR == GenericType::RealSparseBool)
+    {
+        SparseBool* pL = _pLeftOperand->getAs<SparseBool>();
+        SparseBool* pR = _pRightOperand->getAs<SparseBool>();
+
+        int iResult = EqualToSparseBoolAndSparseBool(pL, pR, (GenericType**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** SPARSE BOOL == BOOL
+    */
+    if(TypeL == GenericType::RealSparseBool && TypeR == GenericType::RealBool)
+    {
+        SparseBool* pL = _pLeftOperand->getAs<SparseBool>();
+        Bool* pR = _pRightOperand->getAs<Bool>();
+
+        int iResult = EqualToSparseBoolAndBool(pL, pR, (GenericType**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** BOOL == SPARSE BOOL
+    */
+    if(TypeL == GenericType::RealBool && TypeR == GenericType::RealSparseBool)
+    {
+        Bool* pL = _pLeftOperand->getAs<Bool>();
+        SparseBool* pR = _pRightOperand->getAs<SparseBool>();
+
+        int iResult = EqualToBoolAndSparseBool(pL, pR, (GenericType**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
     }
 
     /*
@@ -348,3 +454,170 @@ InternalType *GenericComparisonEqual(InternalType *_pLeftOperand, InternalType *
     */
     return NULL;
 }
+
+int EqualToSparseBoolAndSparseBool(SparseBool* _pSB1, SparseBool* _pSB2, GenericType** _pOut)
+{
+    SparseBool* pOut = NULL;
+    if(_pSB1->isScalar())
+    {
+        pOut = new SparseBool(_pSB2->getRows(), _pSB2->getCols());
+        bool bVal = _pSB1->get(0, 0);
+        
+        for(int i = 0 ; i < pOut->getRows() ; i++)
+        {
+            for(int j = 0 ; j < pOut->getCols() ; j++)
+            {
+                pOut->set(i, j, bVal == _pSB2->get(i,j));
+            }
+        }
+
+        *_pOut = pOut;
+        return 0;
+    }
+
+    if(_pSB2->isScalar())
+    {
+        pOut = new SparseBool(_pSB1->getRows(), _pSB1->getCols());
+        bool bVal = _pSB2->get(0, 0);
+        
+        for(int i = 0 ; i < pOut->getRows() ; i++)
+        {
+            for(int j = 0 ; j < pOut->getCols() ; j++)
+            {
+                pOut->set(i, j, _pSB1->get(i,j) == bVal);
+            }
+        }
+
+        *_pOut = pOut;
+        return 0;
+    }
+
+    if(_pSB1->getRows() != _pSB2->getRows() || _pSB1->getCols() != _pSB2->getCols())
+    {
+        return 1;
+    }
+
+    pOut = new SparseBool(_pSB1->getRows(), _pSB1->getCols());
+
+    for(int i = 0 ; i < pOut->getRows() ; i++)
+    {
+        for(int j = 0 ; j < pOut->getCols() ; j++)
+        {
+            pOut->set(i, j, _pSB1->get(i,j) == _pSB2->get(i,j));
+        }
+    }
+
+    *_pOut = pOut;
+    return 0;
+}
+
+int EqualToSparseAndSparse(Sparse* _pSparse1, Sparse* _pSparse2, GenericType** _pOut)
+{
+    if(_pSparse1->isScalar())
+    {//sp == SP
+        SparseBool* pSB = new SparseBool(_pSparse2->getRows() , _pSparse2->getCols());
+
+        std::complex<double> dbl = _pSparse1->getImg(0, 0);
+        for(int i = 0 ; i < pSB->getRows() ; i++)
+        {
+            for(int j = 0 ; j < pSB->getCols() ; j++)
+            {
+                if(_pSparse2->getImg(i, j) == dbl)
+                {
+                    pSB->set(i, j, true);
+                }
+            }
+        }
+        
+        *_pOut = pSB;
+        return 0;
+    }
+
+    if(_pSparse2->isScalar())
+    {//SP == sp
+        SparseBool* pSB = new SparseBool(_pSparse1->getRows() , _pSparse1->getCols());
+        std::complex<double> dbl = _pSparse2->getImg(0, 0);
+
+        for(int i = 0 ; i < pSB->getRows() ; i++)
+        {
+            for(int j = 0 ; j < pSB->getCols() ; j++)
+            {
+                if(_pSparse1->getImg(i, j) == dbl)
+                {
+                    pSB->set(i, j, true);
+                }
+            }
+        }
+        
+        *_pOut = pSB;
+        return 0;
+    }
+
+    if(_pSparse1->getRows() != _pSparse2->getRows() || _pSparse1->getCols() != _pSparse2->getCols())
+    {
+        return 1;
+    }
+
+    *_pOut = _pSparse1->newEqualTo(*_pSparse2);
+    return 0;
+}
+
+int EqualToDoubleAndSparse(Double* _pDouble, Sparse* _pSparse, GenericType** _pOut)
+{
+    Sparse* pSparse = NULL;
+    if(_pDouble->isScalar())
+    {
+        pSparse = new Sparse(_pSparse->getRows(), _pSparse->getCols(), _pDouble->isComplex());
+        if(pSparse->isComplex())
+        {
+            std::complex<double> dbl(_pDouble->get(0), _pDouble->getImg(0));
+            for(int i = 0 ; i < pSparse->getRows() ; i++)
+            {
+                for(int j = 0 ; j < pSparse->getCols() ; j++)
+                {
+                    pSparse->set(i, j, dbl);
+                }
+            }
+        }
+        else
+        {
+            double dbl = _pDouble->get(0);
+            for(int i = 0 ; i < pSparse->getRows() ; i++)
+            {
+                for(int j = 0 ; j < pSparse->getCols() ; j++)
+                {
+                    pSparse->set(i, j, dbl);
+                }
+            }
+        }
+    }
+    else
+    {
+        pSparse = new Sparse(*_pDouble);
+    }
+
+    int iRet = EqualToSparseAndSparse(pSparse, _pSparse, _pOut);
+    delete pSparse;
+    return iRet;
+}
+
+int EqualToSparseAndDouble(Sparse* _pSparse, Double* _pDouble, GenericType** _pOut)
+{
+    return EqualToDoubleAndSparse(_pDouble, _pSparse, _pOut);
+}
+
+int EqualToSparseBoolAndBool(SparseBool* _pSB1, Bool* _pB2, GenericType** _pOut)
+{
+    SparseBool* pSB = new SparseBool(*_pB2);
+    int iRet = EqualToSparseBoolAndSparseBool(_pSB1, pSB, _pOut);
+    delete pSB;
+    return iRet;
+}
+
+int EqualToBoolAndSparseBool(Bool* _pB1, SparseBool* _pSB2, GenericType** _pOut)
+{
+    SparseBool* pSB = new SparseBool(*_pB1);
+    int iRet = EqualToSparseBoolAndSparseBool(pSB, _pSB2, _pOut);
+    delete pSB;
+    return iRet;
+}
diff --git a/scilab/modules/operations/src/cpp/types_comparison_lt_le_gt_ge.cpp b/scilab/modules/operations/src/cpp/types_comparison_lt_le_gt_ge.cpp
new file mode 100644 (file)
index 0000000..30cb8e8
--- /dev/null
@@ -0,0 +1,463 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2008-2008 - DIGITEO - Antoine ELIAS
+ *  Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET
+ *
+ *  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 "types_comparison_lt_le_gt_ge.hxx"
+#include "double.hxx"
+#include "sparse.hxx"
+
+#include "scilabexception.hxx"
+
+extern "C"
+{
+#include "localization.h"
+#include "charEncoding.h"
+}
+
+using namespace types;
+
+InternalType *GenericLess(InternalType *_pLeftOperand, InternalType *_pRightOperand)
+{
+    InternalType *pResult = NULL;
+
+    /*
+    ** DOUBLE < DOUBLE
+    */
+    if(_pLeftOperand->isDouble() && _pRightOperand->isDouble())
+    {
+        Double *pL = _pLeftOperand->getAs<Double>();
+        Double *pR = _pRightOperand->getAs<Double>();
+
+        int iResult = DoubleLessDouble(pL, pR, (Bool**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** SPARSE < SPARSE
+    */
+    if(_pLeftOperand->isSparse() && _pRightOperand->isSparse())
+    {
+        Sparse *pL = _pLeftOperand->getAs<Sparse>();
+        Sparse *pR = _pRightOperand->getAs<Sparse>();
+
+        int iResult = SparseLessSparse(pL, pR, (SparseBool**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** DOUBLE < SPARSE
+    */
+    if(_pLeftOperand->isDouble() && _pRightOperand->isSparse())
+    {
+        Double *pL = _pLeftOperand->getAs<Double>();
+        Sparse *pR = _pRightOperand->getAs<Sparse>();
+
+        int iResult = DoubleLessSparse(pL, pR, (SparseBool**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** SPARSE < DOUBLE
+    */
+    if(_pLeftOperand->isSparse() && _pRightOperand->isDouble())
+    {
+        Sparse *pL = _pLeftOperand->getAs<Sparse>();
+        Double *pR = _pRightOperand->getAs<Double>();
+
+        int iResult = SparseLessDouble(pL, pR, (SparseBool**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+    return NULL;
+}
+
+int DoubleLessDouble(Double* _pDouble1, Double* _pDouble2, Bool** _pOut)
+{
+    if(_pDouble1->isComplex() || _pDouble2->isComplex())
+    {//call overload for complex cases
+        return 0;
+    }
+
+    Bool* pB = NULL;
+    if(_pDouble1->isScalar())
+    {//d < D
+        pB = new Bool(_pDouble2->getDims(), _pDouble2->getDimsArray());
+        double dblRef  = _pDouble1->get(0);
+
+        for(int i = 0 ; i < pB->getSize() ; i++)
+        {
+            pB->set(i, dblRef < _pDouble2->get(i));
+        }
+
+        *_pOut = pB;
+        return 0;
+    }
+    else if(_pDouble2->isScalar())
+    {//D < d
+        pB = new Bool(_pDouble1->getDims(), _pDouble1->getDimsArray());
+        double dblRef  = _pDouble2->get(0);
+
+        for(int i = 0 ; i < pB->getSize() ; i++)
+        {
+            pB->set(i, _pDouble1->get(i) < dblRef);
+        }
+
+        *_pOut = pB;
+        return 0;
+    }
+
+    if(_pDouble1->getDims() != _pDouble2->getDims())
+    {
+        return 1;
+    }
+
+    //D < D
+    int* piDims1 = _pDouble1->getDimsArray();
+    int* piDims2 = _pDouble2->getDimsArray();
+
+    for(int i = 0 ; i < _pDouble1->getDims() ; i++)
+    {
+        if(piDims1[i] != piDims2[i])
+        {
+            return 1;
+        }
+    }
+
+    pB = new Bool(_pDouble1->getDims(), _pDouble1->getDimsArray());
+
+    for(int i = 0 ; i < pB->getSize() ; i++)
+    {
+        pB->set(i, _pDouble1->get(i) < _pDouble2->get(i));
+    }
+
+    *_pOut = pB;
+    return 0;
+}
+
+int SparseLessSparse(Sparse* _pSparse1, Sparse* _pSparse2, SparseBool** _pOut)
+{
+    if(_pSparse1->isComplex() || _pSparse2->isComplex())
+    {//call overload for complex cases
+        return 0;
+    }
+
+    SparseBool* pB = NULL;
+    if(_pSparse1->isScalar())
+    {//sp < SP
+        pB = new SparseBool(_pSparse2->getRows(), _pSparse2->getCols());
+        double dblRef = _pSparse1->get(0, 0);
+
+        for(int i = 0 ; i < pB->getRows() ; i++)
+        {
+            for(int j = 0 ; j < pB->getCols() ; j++)
+            {
+                pB->set(i, j, dblRef < _pSparse2->get(i, j));
+            }
+        }
+
+        *_pOut = pB;
+        return 0;
+    }
+    else if(_pSparse2->isScalar())
+    {//SP < sp
+        pB = new SparseBool(_pSparse1->getRows(), _pSparse1->getCols());
+        double dblRef = _pSparse2->get(0, 0);
+
+        for(int i = 0 ; i < pB->getRows() ; i++)
+        {
+            for(int j = 0 ; j < pB->getCols() ; j++)
+            {
+                pB->set(i, j, _pSparse1->get(i, j) < dblRef);
+            }
+        }
+
+        *_pOut = pB;
+        return 0;
+    }
+
+    if(_pSparse1->getRows() != _pSparse2->getRows() || _pSparse1->getCols() != _pSparse2->getCols())
+    {
+        return 1;
+    }
+
+    //SP < SP
+    pB = new SparseBool(_pSparse1->getRows(), _pSparse1->getCols());
+    for(int i = 0 ; i < pB->getRows() ; i++)
+    {
+        for(int j = 0 ; j < pB->getCols() ; j++)
+        {
+            pB->set(i, j, _pSparse1->get(i, j) < _pSparse2->get(i, j));
+        }
+    }
+
+    *_pOut = pB;
+    return 0;
+}
+
+int DoubleLessSparse(Double* _pDouble, Sparse* _pSparse, SparseBool** _pOut)
+{
+    Sparse* pSparse = new Sparse(*_pDouble);
+    int iRet = SparseLessSparse(pSparse, _pSparse, _pOut);
+    delete pSparse;
+    return iRet;
+}
+
+int SparseLessDouble(Sparse* _pSparse, Double* _pDouble, SparseBool** _pOut)
+{
+    Sparse* pSparse = new Sparse(*_pDouble);
+    int iRet = SparseLessSparse(_pSparse, pSparse, _pOut);
+    delete pSparse;
+    return iRet;
+}
+
+
+InternalType *GenericLessEqual(InternalType *_pLeftOperand, InternalType *_pRightOperand)
+{
+    InternalType *pResult = NULL;
+
+    /*
+    ** DOUBLE < DOUBLE
+    */
+    if(_pLeftOperand->isDouble() && _pRightOperand->isDouble())
+    {
+        Double *pL = _pLeftOperand->getAs<Double>();
+        Double *pR = _pRightOperand->getAs<Double>();
+
+        int iResult = DoubleLessEqualDouble(pL, pR, (Bool**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** SPARSE < SPARSE
+    */
+    if(_pLeftOperand->isSparse() && _pRightOperand->isSparse())
+    {
+        Sparse *pL = _pLeftOperand->getAs<Sparse>();
+        Sparse *pR = _pRightOperand->getAs<Sparse>();
+
+        int iResult = SparseLessEqualSparse(pL, pR, (SparseBool**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** DOUBLE < SPARSE
+    */
+    if(_pLeftOperand->isDouble() && _pRightOperand->isSparse())
+    {
+        Double *pL = _pLeftOperand->getAs<Double>();
+        Sparse *pR = _pRightOperand->getAs<Sparse>();
+
+        int iResult = DoubleLessEqualSparse(pL, pR, (SparseBool**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** SPARSE < DOUBLE
+    */
+    if(_pLeftOperand->isSparse() && _pRightOperand->isDouble())
+    {
+        Sparse *pL = _pLeftOperand->getAs<Sparse>();
+        Double *pR = _pRightOperand->getAs<Double>();
+
+        int iResult = SparseLessEqualDouble(pL, pR, (SparseBool**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+    return NULL;
+}
+
+int DoubleLessEqualDouble(Double* _pDouble1, Double* _pDouble2, Bool** _pOut)
+{
+    if(_pDouble1->isComplex() || _pDouble2->isComplex())
+    {//call overload for complex cases
+        return 0;
+    }
+
+    Bool* pB = NULL;
+    if(_pDouble1->isScalar())
+    {//d <= D
+        pB = new Bool(_pDouble2->getDims(), _pDouble2->getDimsArray());
+        double dblRef  = _pDouble1->get(0);
+
+        for(int i = 0 ; i < pB->getSize() ; i++)
+        {
+            pB->set(i, dblRef <= _pDouble2->get(i));
+        }
+
+        *_pOut = pB;
+        return 0;
+    }
+    else if(_pDouble2->isScalar())
+    {//D <= d
+        pB = new Bool(_pDouble1->getDims(), _pDouble1->getDimsArray());
+        double dblRef  = _pDouble2->get(0);
+
+        for(int i = 0 ; i < pB->getSize() ; i++)
+        {
+            pB->set(i, _pDouble1->get(i) <= dblRef);
+        }
+
+        *_pOut = pB;
+        return 0;
+    }
+
+    if(_pDouble1->getDims() != _pDouble2->getDims())
+    {
+        return 1;
+    }
+
+    //D <= D
+    int* piDims1 = _pDouble1->getDimsArray();
+    int* piDims2 = _pDouble2->getDimsArray();
+
+    for(int i = 0 ; i < _pDouble1->getDims() ; i++)
+    {
+        if(piDims1[i] != piDims2[i])
+        {
+            return 1;
+        }
+    }
+
+    pB = new Bool(_pDouble1->getDims(), _pDouble1->getDimsArray());
+
+    for(int i = 0 ; i < pB->getSize() ; i++)
+    {
+        pB->set(i, _pDouble1->get(i) <= _pDouble2->get(i));
+    }
+
+    *_pOut = pB;
+    return 0;
+}
+
+int SparseLessEqualSparse(Sparse* _pSparse1, Sparse* _pSparse2, SparseBool** _pOut)
+{
+    if(_pSparse1->isComplex() || _pSparse2->isComplex())
+    {//call overload for complex cases
+        return 0;
+    }
+
+    SparseBool* pB = NULL;
+    if(_pSparse1->isScalar())
+    {//sp <= SP
+        pB = new SparseBool(_pSparse2->getRows(), _pSparse2->getCols());
+        double dblRef = _pSparse1->get(0, 0);
+
+        for(int i = 0 ; i < pB->getRows() ; i++)
+        {
+            for(int j = 0 ; j < pB->getCols() ; j++)
+            {
+                pB->set(i, j, dblRef <= _pSparse2->get(i, j));
+            }
+        }
+
+        *_pOut = pB;
+        return 0;
+    }
+    else if(_pSparse2->isScalar())
+    {//SP <= sp
+        pB = new SparseBool(_pSparse1->getRows(), _pSparse1->getCols());
+        double dblRef = _pSparse2->get(0, 0);
+
+        for(int i = 0 ; i < pB->getRows() ; i++)
+        {
+            for(int j = 0 ; j < pB->getCols() ; j++)
+            {
+                pB->set(i, j, _pSparse1->get(i, j) <= dblRef);
+            }
+        }
+
+        *_pOut = pB;
+        return 0;
+    }
+
+    if(_pSparse1->getRows() != _pSparse2->getRows() || _pSparse1->getCols() != _pSparse2->getCols())
+    {
+        return 1;
+    }
+
+    //SP <= SP
+    pB = new SparseBool(_pSparse1->getRows(), _pSparse1->getCols());
+    for(int i = 0 ; i < pB->getRows() ; i++)
+    {
+        for(int j = 0 ; j < pB->getCols() ; j++)
+        {
+            pB->set(i, j, _pSparse1->get(i, j) <= _pSparse2->get(i, j));
+        }
+    }
+
+    *_pOut = pB;
+    return 0;
+}
+
+int DoubleLessEqualSparse(Double* _pDouble, Sparse* _pSparse, SparseBool** _pOut)
+{
+    Sparse* pSparse = new Sparse(*_pDouble);
+    int iRet = SparseLessEqualSparse(pSparse, _pSparse, _pOut);
+    delete pSparse;
+    return iRet;
+}
+
+int SparseLessEqualDouble(Sparse* _pSparse, Double* _pDouble, SparseBool** _pOut)
+{
+    Sparse* pSparse = new Sparse(*_pDouble);
+    int iRet = SparseLessEqualSparse(_pSparse, pSparse, _pOut);
+    delete pSparse;
+    return iRet;
+}
+
+InternalType *GenericGreater(InternalType *_pLeftOperand, InternalType *_pRightOperand)
+{
+    return GenericLess(_pRightOperand, _pLeftOperand);
+}
+
+InternalType *GenericGreaterEqual(InternalType *_pLeftOperand, InternalType *_pRightOperand)
+{
+    return GenericLessEqual(_pRightOperand, _pLeftOperand);
+}
@@ -10,8 +10,8 @@
  *
  */
 
-#include "types_comparison_non_equal.hxx"
-#include "types_comparison_equal.hxx"
+#include "types_comparison_ne.hxx"
+#include "types_comparison_eq.hxx"
 #include "bool.hxx"
 
 using namespace types;
@@ -24,15 +24,28 @@ InternalType *GenericComparisonNonEqual(InternalType *_pLeftOperand, InternalTyp
         return NULL;
     }
 
-    Bool *pB = pResult->getAs<Bool>();
-    if(pB == NULL)
-    {// Oo
-        return NULL;
+    if(pResult->isBool())
+    {
+        Bool *pB = pResult->getAs<Bool>();
+        for(int i = 0 ; i < pB->getSize() ; i++)
+        {
+            pB->set(i, pB->get(i) == 0);
+        }
+        return pB;
     }
-
-    for(int i = 0 ; i < pB->getSize() ; i++)
+    else if(pResult->isSparseBool())
     {
-        pB->set(i, pB->get(i) == 0);
+        SparseBool *pSB = pResult->getAs<SparseBool>();
+        for(int i = 0 ; i < pSB->getRows() ; i++)
+        {
+            for(int j = 0 ; j < pSB->getCols() ; j++)
+            {
+                bool b = !pSB->get(i, j);
+                pSB->set(i, j, !pSB->get(i, j));
+            }
+        }
+        return pSB;
     }
-    return pB;
+
+    return NULL;
 }
\ No newline at end of file
index 6a979ce..33be2e7 100644 (file)
@@ -31,18 +31,15 @@ using namespace types;
 InternalType *GenericDotTimes(InternalType *_pLeftOperand, InternalType *_pRightOperand)
 {
     InternalType *pResult = NULL;
-    GenericType::RealType TypeL = _pLeftOperand->getType();
-    GenericType::RealType TypeR = _pRightOperand->getType();
 
     /*
     ** DOUBLE .* DOUBLE
     */
-    if(TypeL == GenericType::RealDouble && TypeR == GenericType::RealDouble)
+    if(_pLeftOperand->isDouble() && _pRightOperand->isDouble())
     {
         Double *pL                     = _pLeftOperand->getAs<Double>();
         Double *pR                     = _pRightOperand->getAs<Double>();
 
-
         int iResult = DotMultiplyDoubleByDouble(pL, pR, (Double**)&pResult);
         if(iResult)
         {
@@ -53,6 +50,57 @@ InternalType *GenericDotTimes(InternalType *_pLeftOperand, InternalType *_pRight
     }
 
     /*
+    ** SPARSE .* SPARSE
+    */
+    if(_pLeftOperand->isSparse() && _pRightOperand->isSparse())
+    {
+        Sparse *pL                     = _pLeftOperand->getAs<Sparse>();
+        Sparse *pR                     = _pRightOperand->getAs<Sparse>();
+
+        int iResult = DotMultiplySparseBySparse(pL, pR, (Sparse**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** SPARSE .* DOUBLE
+    */
+    if(_pLeftOperand->isSparse() && _pRightOperand->isDouble())
+    {
+        Sparse *pL                     = _pLeftOperand->getAs<Sparse>();
+        Double *pR                     = _pRightOperand->getAs<Double>();
+
+        int iResult = DotMultiplySparseByDouble(pL, pR, (GenericType**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** DOUBLE .* SPARSE
+    */
+    if(_pLeftOperand->isDouble() && _pRightOperand->isSparse())
+    {
+        Double *pL                     = _pLeftOperand->getAs<Double>();
+        Sparse *pR                     = _pRightOperand->getAs<Sparse>();
+
+        int iResult = DotMultiplyDoubleBySparse(pL, pR, (GenericType**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
     ** Default case : Return NULL will Call Overloading.
     */
     return NULL;
@@ -91,7 +139,6 @@ InternalType *GenericTimes(InternalType *_pLeftOperand, InternalType *_pRightOpe
         Polynom *pR        = _pRightOperand->getAs<types::Polynom>();
 
         int iResult = MultiplyDoubleByPoly(pL, pR, (Polynom**)&pResult);
-
         if(iResult)
         {
             throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
@@ -109,7 +156,6 @@ InternalType *GenericTimes(InternalType *_pLeftOperand, InternalType *_pRightOpe
         Double *pR              = _pRightOperand->getAs<Double>();
 
         int iResult = MultiplyPolyByDouble(pL, pR, (Polynom**)&pResult);
-
         if(iResult)
         {
             throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
@@ -127,7 +173,57 @@ InternalType *GenericTimes(InternalType *_pLeftOperand, InternalType *_pRightOpe
         Polynom *pR          = _pRightOperand->getAs<types::Polynom>();
 
         int iResult = MultiplyPolyByPoly(pL, pR, (Polynom**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** SPARSE * SPARSE
+    */
+    if(TypeL == GenericType::RealSparse && TypeR == GenericType::RealSparse)
+    {
+        Sparse *pL                     = _pLeftOperand->getAs<Sparse>();
+        Sparse *pR                     = _pRightOperand->getAs<Sparse>();
+
+        int iResult = MultiplySparseBySparse(pL, pR, (Sparse**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** DOUBLE * SPARSE
+    */
+    if(TypeL == GenericType::RealDouble && TypeR == GenericType::RealSparse)
+    {
+        Double *pL                     = _pLeftOperand->getAs<Double>();
+        Sparse *pR                     = _pRightOperand->getAs<Sparse>();
 
+        int iResult = MultiplyDoubleBySparse(pL, pR, (GenericType**)&pResult);
+        if(iResult)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** SPARSE * DOUBLE
+    */
+    if(TypeL == GenericType::RealSparse && TypeR == GenericType::RealDouble)
+    {
+        Sparse *pL                     = _pLeftOperand->getAs<Sparse>();
+        Double *pR                     = _pRightOperand->getAs<Double>();
+
+        int iResult = MultiplySparseByDouble(pL, pR, (GenericType**)&pResult);
         if(iResult)
         {
             throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
@@ -145,13 +241,13 @@ InternalType *GenericTimes(InternalType *_pLeftOperand, InternalType *_pRightOpe
 
 int MultiplyDoubleByDouble(Double* _pDouble1, Double* _pDouble2, Double** _pDoubleOut)
 {
-    bool bComplex1             = _pDouble1->isComplex();
-    bool bComplex2             = _pDouble2->isComplex();
-    bool bScalar1                      = _pDouble1->getRows() == 1 && _pDouble1->getCols() == 1;
-    bool bScalar2                      = _pDouble2->getRows() == 1 && _pDouble2->getCols() == 1;
+    bool bComplex1  = _pDouble1->isComplex();
+    bool bComplex2  = _pDouble2->isComplex();
+    bool bScalar1   = _pDouble1->getRows() == 1 && _pDouble1->getCols() == 1;
+    bool bScalar2   = _pDouble2->getRows() == 1 && _pDouble2->getCols() == 1;
 
-    int iRowResult     = 0;
-    int iColResult     = 0;
+    int iRowResult  = 0;
+    int iColResult  = 0;
 
     if(bScalar1)
     {
@@ -174,11 +270,11 @@ int MultiplyDoubleByDouble(Double* _pDouble1, Double* _pDouble2, Double** _pDoub
     }
 
     //Output variables
-    bool bComplexOut   = bComplex1 || bComplex2;
-    (*_pDoubleOut) = new Double(iRowResult, iColResult, bComplexOut);
+    bool bComplexOut    = bComplex1 || bComplex2;
+    (*_pDoubleOut)      = new Double(iRowResult, iColResult, bComplexOut);
 
-    double *pReal                      = (*_pDoubleOut)->getReal();
-    double *pImg                       = (*_pDoubleOut)->getImg();
+    double *pReal       = (*_pDoubleOut)->getReal();
+    double *pImg        = (*_pDoubleOut)->getImg();
 
     if(bScalar1)
     {//cst*b
@@ -258,13 +354,13 @@ int MultiplyDoubleByDouble(Double* _pDouble1, Double* _pDouble2, Double** _pDoub
 
 int DotMultiplyDoubleByDouble(Double* _pDouble1, Double* _pDouble2, Double**    _pDoubleOut)
 {
-    bool bComplex1             = _pDouble1->isComplex();
-    bool bComplex2             = _pDouble2->isComplex();
-    bool bScalar1                      = _pDouble1->getRows() == 1 && _pDouble1->getCols() == 1;
-    bool bScalar2                      = _pDouble2->getRows() == 1 && _pDouble2->getCols() == 1;
+    bool bComplex1  = _pDouble1->isComplex();
+    bool bComplex2  = _pDouble2->isComplex();
+    bool bScalar1   = _pDouble1->getRows() == 1 && _pDouble1->getCols() == 1;
+    bool bScalar2   = _pDouble2->getRows() == 1 && _pDouble2->getCols() == 1;
 
-    int iRowResult     = 0;
-    int iColResult     = 0;
+    int iRowResult  = 0;
+    int iColResult  = 0;
 
     if(bScalar1)
     {
@@ -286,11 +382,11 @@ int DotMultiplyDoubleByDouble(Double* _pDouble1, Double* _pDouble2, Double**       _p
         return 1;
     }
 
-    bool bComplexOut   = bComplex1 || bComplex2;
-    (*_pDoubleOut) = new Double(iRowResult, iColResult, bComplexOut);
+    bool bComplexOut    = bComplex1 || bComplex2;
+    (*_pDoubleOut)      = new Double(iRowResult, iColResult, bComplexOut);
 
-    double *pReal                      = (*_pDoubleOut)->getReal();
-    double *pImg                       = (*_pDoubleOut)->getImg();
+    double *pReal       = (*_pDoubleOut)->getReal();
+    double *pImg        = (*_pDoubleOut)->getImg();
 
     if(bScalar1)
     {
@@ -354,14 +450,14 @@ int DotMultiplyDoubleByDouble(Double* _pDouble1, Double* _pDouble2, Double**       _p
 }
 int MultiplyDoubleByPoly(Double* _pDouble, Polynom* _pPoly, Polynom** _pPolyOut)
 {
-    bool bComplex1     = _pDouble->isComplex();
-    bool bComplex2     = _pPoly->isComplex();
-    bool bScalar1              = _pDouble->getRows() == 1 && _pDouble->getCols() == 1;
-    bool bScalar2              = _pPoly->getRows() == 1 && _pPoly->getCols() == 1;
+    bool bComplex1  = _pDouble->isComplex();
+    bool bComplex2  = _pPoly->isComplex();
+    bool bScalar1   = _pDouble->getRows() == 1 && _pDouble->getCols() == 1;
+    bool bScalar2   = _pPoly->getRows() == 1 && _pPoly->getCols() == 1;
 
-    int iRowResult     = 0;
-    int iColResult     = 0;
-    int *piRank                        = NULL;
+    int iRowResult  = 0;
+    int iColResult  = 0;
+    int *piRank     = NULL;
 
     if(bScalar1)
     {
@@ -411,13 +507,13 @@ int MultiplyDoubleByPoly(Double* _pDouble, Polynom* _pPoly, Polynom** _pPolyOut)
     {//cst * p
         for(int i = 0 ; i < _pPoly->getSize() ; i++)
         {
-            SinglePoly *pPolyIn                        = _pPoly->get(i);
-            double* pRealIn            = pPolyIn->getCoef()->getReal();
-            double* pImgIn             = pPolyIn->getCoef()->getImg();
+            SinglePoly *pPolyIn     = _pPoly->get(i);
+            double* pRealIn         = pPolyIn->getCoef()->getReal();
+            double* pImgIn          = pPolyIn->getCoef()->getImg();
 
-            SinglePoly *pPolyOut               = (*_pPolyOut)->get(i);
-            double* pRealOut   = pPolyOut->getCoef()->getReal();
-            double* pImgOut            = pPolyOut->getCoef()->getImg();
+            SinglePoly *pPolyOut    = (*_pPolyOut)->get(i);
+            double* pRealOut        = pPolyOut->getCoef()->getReal();
+            double* pImgOut         = pPolyOut->getCoef()->getImg();
 
             if(bComplex1 == false && bComplex2 == false)
             {
@@ -451,18 +547,18 @@ int MultiplyDoubleByPoly(Double* _pDouble, Polynom* _pPoly, Polynom** _pPolyOut)
     }
     else if(bScalar2)
     {
-        double *pDoubleR       = _pDouble->getReal();
-        double *pDoubleI       = _pDouble->getImg();
+        double *pDoubleR    = _pDouble->getReal();
+        double *pDoubleI    = _pDouble->getImg();
 
-        SinglePoly *pPolyIn                    = _pPoly->get(0);
-        double* pRealIn                = pPolyIn->getCoef()->getReal();
-        double* pImgIn         = pPolyIn->getCoef()->getImg();
+        SinglePoly *pPolyIn = _pPoly->get(0);
+        double* pRealIn     = pPolyIn->getCoef()->getReal();
+        double* pImgIn      = pPolyIn->getCoef()->getImg();
 
         for(int i = 0 ; i < _pDouble->getSize() ; i++)
         {
-            SinglePoly *pPolyOut               = (*_pPolyOut)->get(i);
-            double* pRealOut   = pPolyOut->getCoef()->getReal();
-            double* pImgOut            = pPolyOut->getCoef()->getImg();
+            SinglePoly *pPolyOut    = (*_pPolyOut)->get(i);
+            double* pRealOut        = pPolyOut->getCoef()->getReal();
+            double* pImgOut         = pPolyOut->getCoef()->getImg();
 
             if(bComplex1 == false && bComplex2 == false)
             {
@@ -496,8 +592,8 @@ int MultiplyDoubleByPoly(Double* _pDouble, Polynom* _pPoly, Polynom** _pPolyOut)
     }
     else if(_pDouble->getCols() == _pPoly->getRows())
     {
-        Double *pCoef  = _pPoly->getCoef();
-        Double *pTemp  = new Double(_pDouble->getRows(), pCoef->getCols(), bComplex1 || bComplex2);
+        Double *pCoef = _pPoly->getCoef();
+        Double *pTemp = new Double(_pDouble->getRows(), pCoef->getCols(), bComplex1 || bComplex2);
 
         if(bComplex1 == false && bComplex2 == false)
         {
@@ -505,7 +601,6 @@ int MultiplyDoubleByPoly(Double* _pDouble, Polynom* _pPoly, Polynom** _pPolyOut)
                 _pDouble->getReal(), _pDouble->getRows(), _pDouble->getCols(),
                 pCoef->getReal(), pCoef->getRows(), pCoef->getCols(),
                 pTemp->getReal());
-
         }
         else if(bComplex1 == false && bComplex2 == true)
         {
@@ -529,6 +624,7 @@ int MultiplyDoubleByPoly(Double* _pDouble, Polynom* _pPoly, Polynom** _pPolyOut)
                 pCoef->getReal(), pCoef->getImg(), pCoef->getRows(), pCoef->getCols(),
                 pTemp->getReal(), pTemp->getImg());
         }
+
         (*_pPolyOut)->setCoef(pTemp);
         delete pTemp;
     }
@@ -542,14 +638,14 @@ int MultiplyDoubleByPoly(Double* _pDouble, Polynom* _pPoly, Polynom** _pPolyOut)
 
 int MultiplyPolyByDouble(Polynom* _pPoly, Double* _pDouble, Polynom **_pPolyOut)
 {
-    bool bComplex1     = _pPoly->isComplex();
-    bool bComplex2     = _pDouble->isComplex();
-    bool bScalar1              = _pPoly->getRows() == 1 && _pPoly->getCols() == 1;
-    bool bScalar2              = _pDouble->getRows() == 1 && _pDouble->getCols() == 1;
+    bool bComplex1  = _pPoly->isComplex();
+    bool bComplex2  = _pDouble->isComplex();
+    bool bScalar1   = _pPoly->getRows() == 1 && _pPoly->getCols() == 1;
+    bool bScalar2   = _pDouble->getRows() == 1 && _pDouble->getCols() == 1;
 
-    int iRowResult     = 0;
-    int iColResult     = 0;
-    int *piRank                        = NULL;
+    int iRowResult  = 0;
+    int iColResult  = 0;
+    int *piRank     = NULL;
 
     if(bScalar1)
     {
@@ -596,22 +692,22 @@ int MultiplyPolyByDouble(Polynom* _pPoly, Double* _pDouble, Polynom **_pPolyOut)
     }
     //Output variables
     //Polynom *pResult = NULL;
-    bool bComplexOut           = bComplex1 || bComplex2;
+    bool bComplexOut = bComplex1 || bComplex2;
 
     if(bScalar1)
     {//p[1] * A
-        double *pDoubleR       = _pDouble->getReal();
-        double *pDoubleI       = _pDouble->getImg();
+        double *pDoubleR    = _pDouble->getReal();
+        double *pDoubleI    = _pDouble->getImg();
 
-        SinglePoly *pPolyIn                    = _pPoly->get(0);
-        double* pRealIn                = pPolyIn->getCoef()->getReal();
-        double* pImgIn         = pPolyIn->getCoef()->getImg();
+        SinglePoly *pPolyIn = _pPoly->get(0);
+        double* pRealIn     = pPolyIn->getCoef()->getReal();
+        double* pImgIn      = pPolyIn->getCoef()->getImg();
 
         for(int i = 0 ; i < _pDouble->getSize() ; i++)
         {
-            SinglePoly *pPolyOut               = (*_pPolyOut)->get(i);
-            double* pRealOut   = pPolyOut->getCoef()->getReal();
-            double* pImgOut            = pPolyOut->getCoef()->getImg();
+            SinglePoly *pPolyOut    = (*_pPolyOut)->get(i);
+            double* pRealOut        = pPolyOut->getCoef()->getReal();
+            double* pImgOut         = pPolyOut->getCoef()->getImg();
 
             if(bComplex1 == false && bComplex2 == false)
             {
@@ -647,13 +743,13 @@ int MultiplyPolyByDouble(Polynom* _pPoly, Double* _pDouble, Polynom **_pPolyOut)
     {//p * cst
         for(int i = 0 ; i < _pPoly->getSize() ; i++)
         {
-            SinglePoly *pPolyIn                        = _pPoly->get(i);
-            double* pRealIn            = pPolyIn->getCoef()->getReal();
-            double* pImgIn             = pPolyIn->getCoef()->getImg();
+            SinglePoly *pPolyIn = _pPoly->get(i);
+            double* pRealIn     = pPolyIn->getCoef()->getReal();
+            double* pImgIn      = pPolyIn->getCoef()->getImg();
 
-            SinglePoly *pPolyOut               = (*_pPolyOut)->get(i);
-            double* pRealOut   = pPolyOut->getCoef()->getReal();
-            double* pImgOut            = pPolyOut->getCoef()->getImg();
+            SinglePoly *pPolyOut    = (*_pPolyOut)->get(i);
+            double* pRealOut        = pPolyOut->getCoef()->getReal();
+            double* pImgOut         = pPolyOut->getCoef()->getImg();
 
             if(bComplex1 == false && bComplex2 == false)
             {
@@ -1143,3 +1239,434 @@ int MultiplyPolyByPoly(Polynom* _pPoly1, Polynom* _pPoly2, Polynom** _pPolyOut)
     }
     return 0; //No Error;
 }
+
+int MultiplySparseBySparse(Sparse* _pSparse1, Sparse* _pSparse2, Sparse** _pSparseOut)
+{
+    if(_pSparse1->getRows() == 1 && _pSparse1->getCols() == 1)
+    {//scalar * sp
+        Double* pDbl = NULL;
+        if(_pSparse1->isComplex())
+        {
+            std::complex<double> dbl = _pSparse1->getImg(0,0);
+            pDbl = new Double(dbl.real(), dbl.imag());
+        }
+        else
+        {
+            pDbl = new Double(_pSparse1->get(0,0));
+        }
+        
+        MultiplyDoubleBySparse(pDbl, _pSparse2, (GenericType**)_pSparseOut);
+        delete pDbl;
+        return 0;
+    }
+
+    if(_pSparse2->getRows() == 1 && _pSparse2->getCols() == 1)
+    {//sp * scalar
+        Double* pDbl = NULL;
+        if(_pSparse2->isComplex())
+        {
+            std::complex<double> dbl = _pSparse2->getImg(0,0);
+            pDbl = new Double(dbl.real(), dbl.imag());
+        }
+        else
+        {
+            pDbl = new Double(_pSparse2->get(0,0));
+        }
+        
+        MultiplySparseByDouble(_pSparse1, pDbl, (GenericType**)_pSparseOut);
+        delete pDbl;
+        return 0;
+    }
+
+    if(_pSparse1->getCols() != _pSparse2->getRows())
+    {
+        return 1;
+    }
+
+    *_pSparseOut = _pSparse1->multiply(*_pSparse2);
+    return 0;
+}
+
+int MultiplyDoubleBySparse(Double* _pDouble, Sparse *_pSparse, GenericType** _pOut)
+{//D * SP
+    if(_pDouble->isEmpty())
+    {
+        *_pOut = Double::Empty();
+        return 0;
+    }
+
+    if(_pDouble->isScalar())
+    {//d * SP -> SP
+        Sparse* pOut = NULL;
+        if(_pDouble->isComplex())
+        {
+            std::complex<double> dbl(_pDouble->get(0), _pDouble->getImg(0));
+            pOut = _pSparse->multiply(dbl);
+        }
+        else
+        {
+            pOut = _pSparse->multiply(_pDouble->get(0));
+        }
+        *_pOut = pOut;
+        return 0;
+    }
+
+    if(_pSparse->isScalar())
+    {//D * sp -> D .* d
+        Double* pD = NULL;
+        
+        if(_pSparse->isComplex())
+        {
+            std::complex<double> dbl(_pSparse->getImg(0, 0));
+            pD = new Double(dbl.real(), dbl.imag());
+        }
+        else
+        {
+            pD = new Double(_pSparse->get(0, 0));
+        }
+
+        InternalType* pIT = GenericDotTimes(_pDouble, pD);
+        *_pOut = pIT->getAs<GenericType>();
+        delete pD;
+        return 0;
+    }
+
+    if(_pDouble->getCols() != _pSparse->getRows())
+    {
+        return 1;
+    }
+
+    //try to be smart and only compute for non zero values
+
+    //get some information
+    int iNonZeros = static_cast<int>(_pSparse->nonZeros());
+    double* pRows = new double[iNonZeros * 2];
+    _pSparse->outputRowCol(pRows);
+    double* pCols = pRows + iNonZeros;
+    double* pValR = new double[iNonZeros];
+    double* pValI = new double[iNonZeros];
+    _pSparse->outputValues(pValR, pValI);
+
+    Double* pOut = new Double(_pDouble->getRows(), _pSparse->getCols(), _pDouble->isComplex() | _pSparse->isComplex());
+    pOut->setZeros();
+
+    if(_pDouble->isComplex() == false && _pSparse->isComplex() == false)
+    {
+        for(int i = 0 ; i < iNonZeros ; i++)
+        {
+            int iRow = static_cast<int>(pRows[i]) - 1;
+            int iCol = static_cast<int>(pCols[i]) - 1;
+            double dbl = pValR[i];
+
+            for(int j = 0 ; j < _pDouble->getRows() ; j++)
+            {
+                double dblVal = _pDouble->get(j, iRow) * dbl;
+                pOut->set(j, iCol, pOut->get(j, iCol) + dblVal);
+            }
+        }
+    }
+    else if(_pDouble->isComplex() == false && _pSparse->isComplex() == true)
+    {//a * (b ci) -> ab ac
+        for(int i = 0 ; i < iNonZeros ; i++)
+        {
+            int iRow = static_cast<int>(pRows[i]) - 1;
+            int iCol = static_cast<int>(pCols[i]) - 1;
+            double dblR = pValR[i];
+            double dblI = pValI[i];
+
+            for(int j = 0 ; j < _pDouble->getRows() ; j++)
+            {
+                double dblValR = _pDouble->get(j, iRow) * dblR;
+                double dblValI = _pDouble->get(j, iRow) * dblI;
+                pOut->set(j, iCol, pOut->get(j, iCol) + dblValR);
+                pOut->setImg(j, iCol, pOut->getImg(j, iCol) + dblValI);
+            }
+        }
+    }
+    else if(_pDouble->isComplex() == true && _pSparse->isComplex() == false)
+    {//(a bi) * c -> ac + bc
+        for(int i = 0 ; i < iNonZeros ; i++)
+        {
+            int iRow = static_cast<int>(pRows[i]) - 1;
+            int iCol = static_cast<int>(pCols[i]) - 1;
+            double dblR = pValR[i];
+
+            for(int j = 0 ; j < _pDouble->getRows() ; j++)
+            {
+                double dblValR = _pDouble->get(j, iRow) * dblR;
+                double dblValI = _pDouble->getImg(j, iRow) * dblR;
+                pOut->set(j, iCol, pOut->get(j, iCol) + dblValR);
+                pOut->setImg(j, iCol, pOut->getImg(j, iCol) + dblValI);
+            }
+        }
+    }
+    else if(_pDouble->isComplex() == true && _pSparse->isComplex() == true)
+    {
+        for(int i = 0 ; i < iNonZeros ; i++)
+        {
+            int iRow = static_cast<int>(pRows[i]) - 1;
+            int iCol = static_cast<int>(pCols[i]) - 1;
+            double dblR = pValR[i];
+            double dblI = pValI[i];
+
+            for(int j = 0 ; j < _pDouble->getRows() ; j++)
+            {
+                double dblValR = _pDouble->get(j, iRow) * dblR - _pDouble->getImg(j, iRow) * dblI;
+                double dblValI = _pDouble->get(j, iRow) * dblI + _pDouble->getImg(j, iRow) * dblR;
+                pOut->set(j, iCol, pOut->get(j, iCol) + dblValR);
+                pOut->setImg(j, iCol, pOut->getImg(j, iCol) + dblValI);
+            }
+        }
+    }
+    
+    *_pOut = pOut;
+    delete[] pRows;
+    delete[] pValR;
+    delete[] pValI;
+
+    return 0;
+}
+
+int MultiplySparseByDouble(Sparse *_pSparse, Double*_pDouble, GenericType** _pOut)
+{
+    if(_pDouble->isEmpty())
+    {//SP * [] -> []
+        *_pOut = Double::Empty();
+        return 0;
+    }
+
+    if(_pDouble->isScalar())
+    {//SP * d -> SP
+        Sparse* pOut = NULL;
+        if(_pDouble->isComplex())
+        {
+            std::complex<double> dbl(_pDouble->get(0), _pDouble->getImg(0));
+            pOut = _pSparse->multiply(dbl);
+        }
+        else
+        {
+            pOut = _pSparse->multiply(_pDouble->get(0));
+        }
+        *_pOut = pOut;
+        return 0;
+    }
+
+    if(_pSparse->isScalar())
+    {//D * sp -> D .* d
+        Double* pD = NULL;
+        
+        if(_pSparse->isComplex())
+        {
+            std::complex<double> dbl(_pSparse->getImg(0, 0));
+            pD = new Double(dbl.real(), dbl.imag());
+        }
+        else
+        {
+            pD = new Double(_pSparse->get(0, 0));
+        }
+
+        InternalType* pIT = GenericDotTimes(_pDouble, pD);
+        *_pOut = pIT->getAs<GenericType>();
+        delete pD;
+        return 0;
+    }
+
+    if(_pSparse->getCols() != _pDouble->getRows())
+    {
+        return 1;
+    }
+
+    //try to be smart and only compute for non zero values
+
+    //get some information
+    int iNonZeros = static_cast<int>(_pSparse->nonZeros());
+    double* pRows = new double[iNonZeros * 2];
+    _pSparse->outputRowCol(pRows);
+    double* pCols = pRows + iNonZeros;
+    double* pValR = new double[iNonZeros];
+    double* pValI = new double[iNonZeros];
+    _pSparse->outputValues(pValR, pValI);
+
+    Double* pOut = new Double(_pSparse->getRows(), _pDouble->getCols(), _pDouble->isComplex() | _pSparse->isComplex());
+    pOut->setZeros();
+
+    if(_pDouble->isComplex() == false && _pSparse->isComplex() == false)
+    {
+        for(int i = 0 ; i < iNonZeros ; i++)
+        {
+            int iRow    = static_cast<int>(pRows[i]) - 1;
+            int iCol    = static_cast<int>(pCols[i]) - 1;
+            double dbl  = pValR[i];
+
+            for(int j = 0 ; j < _pDouble->getCols() ; j++)
+            {
+                double dblVal = _pDouble->get(iCol, j) * dbl;
+                pOut->set(iRow, j, pOut->get(iRow, j) + dblVal);
+            }
+        }
+    }
+    else if(_pDouble->isComplex() == false && _pSparse->isComplex() == true)
+    {//a * (b ci) -> ab ac
+        for(int i = 0 ; i < iNonZeros ; i++)
+        {
+            int iRow = static_cast<int>(pRows[i]) - 1;
+            int iCol = static_cast<int>(pCols[i]) - 1;
+            double dblR = pValR[i];
+            double dblI = pValI[i];
+
+            for(int j = 0 ; j < _pDouble->getCols() ; j++)
+            {
+                double dblValR = _pDouble->get(iCol, j) * dblR;
+                double dblValI = _pDouble->get(iCol, j) * dblI;
+                pOut->set(iRow, j, pOut->get(iRow, j) + dblValR);
+                pOut->setImg(iRow, j, pOut->getImg(iRow, j) + dblValI);
+            }
+        }
+    }
+    else if(_pDouble->isComplex() == true && _pSparse->isComplex() == false)
+    {//(a bi) * c -> ac + bc
+        for(int i = 0 ; i < iNonZeros ; i++)
+        {
+            int iRow = static_cast<int>(pRows[i]) - 1;
+            int iCol = static_cast<int>(pCols[i]) - 1;
+            double dblR = pValR[i];
+
+            for(int j = 0 ; j < _pDouble->getCols() ; j++)
+            {
+                double dblValR = _pDouble->get(iCol, j) * dblR;
+                double dblValI = _pDouble->getImg(iCol, j) * dblR;
+                pOut->set(iRow, j, pOut->get(iRow, j) + dblValR);
+                pOut->setImg(iRow, j, pOut->getImg(iRow, j) + dblValI);
+            }
+        }
+    }
+    else if(_pDouble->isComplex() == true && _pSparse->isComplex() == true)
+    {
+        for(int i = 0 ; i < iNonZeros ; i++)
+        {
+            int iRow = static_cast<int>(pRows[i]) - 1;
+            int iCol = static_cast<int>(pCols[i]) - 1;
+            double dblR = pValR[i];
+            double dblI = pValI[i];
+
+            for(int j = 0 ; j < _pDouble->getCols() ; j++)
+            {
+                double dblValR = _pDouble->get(iCol, j) * dblR - _pDouble->getImg(iCol, j) * dblI;
+                double dblValI = _pDouble->get(iCol, j) * dblI + _pDouble->getImg(iCol, j) * dblR;
+                pOut->set(iRow, j, pOut->get(iRow, j) + dblValR);
+                pOut->setImg(iRow, j, pOut->getImg(iRow, j) + dblValI);
+            }
+        }
+    }
+    
+    *_pOut = pOut;
+    delete[] pRows;
+    delete[] pValR;
+    delete[] pValI;
+
+    return 0;
+}
+
+int DotMultiplySparseBySparse(Sparse* _pSparse1, Sparse* _pSparse2, Sparse** _pOut)
+{
+    if(_pSparse1->isScalar() || _pSparse2->isScalar())
+    {//SP .* sp or sp .* SP
+        return MultiplySparseBySparse(_pSparse1, _pSparse2, _pOut);
+    }
+
+    if(_pSparse1->getRows() != _pSparse2->getRows() || _pSparse1->getCols() != _pSparse2->getCols())
+    {
+        return 1;
+    }
+
+    *_pOut = _pSparse1->dotMultiply(*_pSparse2);
+
+    return 0;
+}
+
+int DotMultiplyDoubleBySparse(Double* _pDouble, Sparse* _pSparse, GenericType**  _pOut)
+{
+    if(_pDouble->isEmpty())
+    {
+        *_pOut = Double::Empty();
+        return 0;
+    }
+
+    if(_pDouble->isScalar())
+    {
+        return MultiplyDoubleBySparse(_pDouble, _pSparse, _pOut);
+    }
+
+    if(_pSparse->isScalar())
+    {
+        return MultiplyDoubleBySparse(_pDouble, _pSparse, _pOut);
+    }
+
+    if(_pSparse->getRows() != _pDouble->getRows() || _pSparse->getCols() != _pDouble->getCols())
+    {
+        return 1;
+    }
+
+    Sparse* pOut = new Sparse(_pDouble->getRows(), _pDouble->getCols(), _pSparse->isComplex() || _pDouble->isComplex());
+    //get some information
+    int iNonZeros = static_cast<int>(_pSparse->nonZeros());
+    double* pRows = new double[iNonZeros * 2];
+    _pSparse->outputRowCol(pRows);
+    double* pCols = pRows + iNonZeros;
+
+    if(_pDouble->isComplex() == false && _pSparse->isComplex() == false)
+    {
+        for(int i = 0 ; i < iNonZeros ; i++)
+        {
+            int iRow = static_cast<int>(pRows[i]) - 1;
+            int iCol = static_cast<int>(pCols[i]) - 1;
+            pOut->set(iRow, iCol, _pSparse->get(iRow, iCol) * _pDouble->get(iRow, iCol));
+        }
+    }
+    else if(_pDouble->isComplex() == false && _pSparse->isComplex() == true)
+    {
+        for(int i = 0 ; i < iNonZeros ; i++)
+        {
+            int iRow = static_cast<int>(pRows[i]) - 1;
+            int iCol = static_cast<int>(pCols[i]) - 1;
+            std::complex<double> dbl = _pSparse->getImg(iRow, iCol);
+            std::complex<double> newVal(dbl.real() * _pDouble->get(iRow, iCol), dbl.imag() * _pDouble->get(iRow, iCol));
+            pOut->set(iRow, iCol, newVal);
+        }
+    }
+    else if(_pDouble->isComplex() == true && _pSparse->isComplex() == false)
+    {
+        for(int i = 0 ; i < iNonZeros ; i++)
+        {
+            int iRow = static_cast<int>(pRows[i]) - 1;
+            int iCol = static_cast<int>(pCols[i]) - 1;
+            std::complex<double> dbl = _pSparse->getImg(iRow, iCol);
+            std::complex<double> newVal(dbl.real() * _pDouble->get(iRow, iCol), dbl.real() * _pDouble->getImg(iRow, iCol));
+            pOut->set(iRow, iCol, newVal);
+        }
+    }
+    else if(_pDouble->isComplex() == true && _pSparse->isComplex() == true)
+    {
+        for(int i = 0 ; i < iNonZeros ; i++)
+        {
+            int iRow = static_cast<int>(pRows[i]) - 1;
+            int iCol = static_cast<int>(pCols[i]) - 1;
+            std::complex<double> dbl = _pSparse->getImg(iRow, iCol);
+            double dblR = _pDouble->get(iRow, iCol) * dbl.real() - _pDouble->getImg(iRow, iCol) * dbl.imag();
+            double dblI = _pDouble->getImg(iRow, iCol) * dbl.real() + _pDouble->get(iRow, iCol) * dbl.imag();
+
+            std::complex<double> newVal(dblR, dblI);
+            pOut->set(iRow, iCol, newVal);
+        }
+    }
+    
+    *_pOut = pOut;
+    delete[] pRows;
+
+    return 0;
+}
+
+int DotMultiplySparseByDouble(Sparse* _pSparse, Double* _pDouble, GenericType** _pOut)
+{
+    return DotMultiplyDoubleBySparse(_pDouble, _pSparse, _pOut);
+}
index e66a6ec..f4de735 100644 (file)
 extern "C"
 {
        #include "matrix_substraction.h"
+    #include <stdio.h>
     #include "localization.h"
     #include "charEncoding.h"
+    #include "os_swprintf.h"
+    #include "elem_common.h" //dset
 }
 
 InternalType* GenericMinus(InternalType* _pLeftOperand, InternalType* _pRightOperand)
@@ -91,6 +94,56 @@ InternalType* GenericMinus(InternalType* _pLeftOperand, InternalType* _pRightOpe
     }
 
     /*
+    ** SPARSE - SPARSE
+    */
+    else if(_pLeftOperand->isSparse() && _pRightOperand->isSparse())
+    {
+        Sparse *pL     = _pLeftOperand->getAs<Sparse>();
+        Sparse *pR     = _pRightOperand->getAs<Sparse>();
+
+        int iResult = SubstractSparseToSparse(pR, pL, (GenericType**)&pResult);
+        if(iResult != 0)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** SPARSE - DOUBLE
+    */
+    else if(_pLeftOperand->isSparse() && _pRightOperand->isDouble())
+    {
+        Sparse *pL     = _pLeftOperand->getAs<Sparse>();
+        Double *pR     = _pRightOperand->getAs<Double>();
+
+        int iResult = SubstractDoubleToSparse(pR, pL, (GenericType**)&pResult);
+        if(iResult != 0)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+
+    /*
+    ** DOUBLE - SPARSE
+    */
+    else if(_pLeftOperand->isDouble() && _pRightOperand->isSparse())
+    {
+        Double *pL     = _pLeftOperand->getAs<Double>();
+        Sparse *pR     = _pRightOperand->getAs<Sparse>();
+
+        int iResult = SubstractSparseToDouble(pR, pL, (GenericType**)&pResult);
+        if(iResult != 0)
+        {
+            throw ast::ScilabError(_W("Inconsistent row/column dimensions.\n"));
+        }
+
+        return pResult;
+    }
+    /*
     ** Default case : Return NULL will Call Overloading.
     */
     return NULL;
@@ -821,3 +874,265 @@ int SubstractPolyToPoly(Polynom *_pPoly1, Polynom *_pPoly2, Polynom **_pPolyOut)
        return 0;
 }
 
+//_pSparse2 - _pSparse1
+int SubstractSparseToSparse(Sparse* _pSparse1, Sparse* _pSparse2, GenericType **_pSparseOut)
+{
+    //check scalar hidden in a sparse ;)
+    if(_pSparse1->getRows() == 1 && _pSparse1->getCols() == 1)
+    {//do scalar - sp
+        Double* pDbl = NULL;
+        if(_pSparse1->isComplex())
+        {
+            std::complex<double> dbl = _pSparse1->getImg(0,0);
+            pDbl = new Double(dbl.real(), dbl.imag());
+        }
+        else
+        {
+            pDbl = new Double(_pSparse1->get(0,0));
+        }
+        
+        SubstractSparseToDouble(_pSparse2, pDbl, (GenericType**)_pSparseOut);
+        delete pDbl;
+        return 0;
+    }
+
+    if(_pSparse2->getRows() == 1 && _pSparse2->getCols() == 1)
+    {//do sp - scalar
+        Double* pDbl = NULL;
+        if(_pSparse2->isComplex())
+        {
+            std::complex<double> dbl = _pSparse2->getImg(0,0);
+            pDbl = new Double(dbl.real(), dbl.imag());
+        }
+        else
+        {
+            pDbl = new Double(_pSparse2->get(0,0));
+        }
+
+        SubstractDoubleToSparse(pDbl, _pSparse1, (GenericType**)_pSparseOut);
+        delete pDbl;
+        return 0;
+    }
+
+    if(_pSparse1->getRows() != _pSparse2->getRows() || _pSparse1->getCols() != _pSparse2->getCols())
+    {//dimensions not match
+        return 1;
+    }
+
+    if(_pSparse1->nonZeros() == 0)
+    {//sp - sp([])
+        *_pSparseOut = new Sparse(*_pSparse2);
+        return 0;
+    }
+
+    if(_pSparse2->nonZeros() == 0)
+    {//sp([]) - sp
+        Sparse* pOut = new Sparse(*_pSparse1);
+        pOut->opposite();
+        *_pSparseOut = pOut;
+        return 0;
+    }
+
+    //copy _pSparse1 in _pSparseOut
+    *_pSparseOut = _pSparse2->substract(*_pSparse1);
+    return 0;
+}
+
+int SubstractSparseToDouble(Sparse* _pSparse, Double* _pDouble, GenericType **_pOut)
+{//D - SP
+    int iOne = 1; //fortran 
+    bool bComplex1 = _pSparse->isComplex();
+    bool bComplex2 = _pDouble->isComplex();
+
+    if(_pDouble->isEmpty())
+    {//[] - SP
+        Sparse* pS = _pSparse->clone();
+        pS->opposite();
+        *_pOut = pS;
+        return 0;
+    }
+
+    if(_pSparse->isScalar() && _pDouble->isScalar())
+    {//d - sp
+        Double* pRes = _pDouble->clone()->getAs<Double>();
+        pRes->setComplex(bComplex1 | bComplex2);
+        if(bComplex1)
+        {
+            std::complex<double> dbl = _pSparse->getImg(0, 0);
+            pRes->set(0, pRes->get(0) - dbl.real());
+            pRes->setImg(0, pRes->getImg(0) - dbl.imag());
+        }
+        else
+        {
+            pRes->set(0, pRes->get(0) - _pSparse->get(0, 0));
+        }
+
+        *_pOut = pRes;
+        return 0;
+    }
+
+    if(_pDouble->isScalar())
+    {//d - SP
+        Double* pRes = new Double(_pSparse->getRows(), _pSparse->getCols(), bComplex1 | bComplex2);
+        int iSize = _pSparse->getSize();
+        double dblVal = _pDouble->get(0);
+        C2F(dset)(&iSize, &dblVal, pRes->get(), &iOne);
+        if(bComplex2)
+        {
+            double dblValI = _pDouble->getImg(0);
+            C2F(dset)(&iSize, &dblValI, pRes->getImg(), &iOne);
+        }
+        else if(bComplex1)
+        {//initialize imag part at 0
+            double dblValI = 0;
+            C2F(dset)(&iSize, &dblValI, pRes->getImg(), &iOne);
+        }
+
+        int nonZeros = static_cast<int>(_pSparse->nonZeros());
+        double* pRows = new double[nonZeros * 2];
+        _pSparse->outputRowCol(pRows);
+        double* pCols = pRows + nonZeros;
+
+        double* pNonZeroR = new double[nonZeros];
+        double* pNonZeroI = new double[nonZeros];
+        _pSparse->outputValues(pNonZeroR, pNonZeroI);
+
+        if(bComplex1)
+        {
+            for(int i = 0 ; i < nonZeros ; i++)
+            {
+                int iRow = static_cast<int>(pRows[i]) - 1;
+                int iCol = static_cast<int>(pCols[i]) - 1;
+                std::complex<double> dbl = _pSparse->getImg(iRow, iCol);
+                pRes->set(iRow, iCol, pRes->get(iRow, iCol) - dbl.real());
+                pRes->setImg(iRow, iCol, pRes->getImg(iRow, iCol) - dbl.imag());
+            }
+        }
+        else
+        {
+            for(int i = 0 ; i < nonZeros ; i++)
+            {
+                int iRow = static_cast<int>(pRows[i]) - 1;
+                int iCol = static_cast<int>(pCols[i]) - 1;
+                pRes->set(iRow, iCol, pRes->get(iRow, iCol) - _pSparse->get(iRow, iCol));
+            }
+        }
+        *_pOut = pRes;
+
+        //clear
+        delete[] pRows;
+        delete[] pNonZeroR;
+        delete[] pNonZeroI;
+
+        return 0;
+    }
+
+    if(_pSparse->isScalar())
+    {//D - sp
+        Double* pRes = _pDouble->clone()->getAs<Double>();
+        pRes->setComplex(bComplex1 | bComplex2);
+
+        if(bComplex1)
+        {
+            double* pReal = pRes->get();
+            double* pImg = pRes->getImg();
+            for(int i = 0 ; i < pRes->getSize() ; i++)
+            {
+                std::complex<double> dbl = _pSparse->getImg(0, 0);
+                pReal[i] -= dbl.real();
+                pImg[i] -= dbl.imag();
+            }
+        }
+        else
+        {
+            double* pReal = pRes->get();
+            for(int i = 0 ; i < pRes->getSize() ; i++)
+            {
+                pReal[i] -= _pSparse->get(0, 0);
+            }
+        }
+        *_pOut = pRes;
+        return 0;
+    }
+
+
+    if(_pSparse->getRows() == _pDouble->getRows() && _pSparse->getCols() == _pDouble->getCols())
+    {//D - SP
+        Double* pRes = _pDouble->clone()->getAs<Double>();
+        pRes->setComplex(bComplex1 | bComplex2);
+
+        int nonZeros = static_cast<int>(_pSparse->nonZeros());
+        double* pRows = new double[nonZeros * 2];
+        _pSparse->outputRowCol(pRows);
+        double* pCols = pRows + nonZeros;
+
+        double* pNonZeroR = new double[nonZeros];
+        double* pNonZeroI = new double[nonZeros];
+        _pSparse->outputValues(pNonZeroR, pNonZeroI);
+
+        if(bComplex1)
+        {
+            for(int i = 0 ; i < nonZeros ; i++)
+            {
+                int iRow = static_cast<int>(pRows[i]) - 1; 
+                int iCol = static_cast<int>(pCols[i]) - 1;
+                std::complex<double> dbl = _pSparse->getImg(iRow, iCol);
+                pRes->set(iRow, iCol, pRes->get(iRow, iCol) - dbl.real());
+                pRes->setImg(iRow, iCol, pRes->getImg(iRow, iCol) - dbl.imag());
+            }
+        }
+        else
+        {
+            for(int i = 0 ; i < nonZeros ; i++)
+            {
+                int iRow = static_cast<int>(pRows[i]) - 1; 
+                int iCol = static_cast<int>(pCols[i]) - 1;
+                pRes->set(iRow, iCol, pRes->get(iRow, iCol) - _pSparse->get(iRow, iCol));
+            }
+        }
+
+        //clear
+        delete[] pRows;
+        delete[] pNonZeroR;
+        delete[] pNonZeroI;
+        *_pOut = pRes;
+        return 0;
+    }
+    return 1;
+}
+
+int SubstractDoubleToSparse(Double* _pDouble, Sparse* _pSparse, GenericType **_pOut)
+{//SP - D => -(D - SP)
+    int iRet = SubstractSparseToDouble(_pSparse, _pDouble, _pOut);
+    if(iRet)
+    {
+        return iRet;
+    }
+
+    //compute opposite of result
+    if((*_pOut)->isDouble())
+    {
+        Double* pD          = (*_pOut)->getAs<Double>();
+        int iSize           = pD->getSize();
+        double dblMinusOne  = -1;
+        int iOne            = 1;
+
+        C2F(dscal)(&iSize, &dblMinusOne, pD->get(), &iOne);
+        if(pD->isComplex())
+        {
+            C2F(dscal)(&iSize, &dblMinusOne, pD->getImg(), &iOne);
+        }
+    }
+    else if((*_pOut)->isSparse())
+    {
+        Sparse* pS = (*_pOut)->getAs<Sparse>();
+        pS->opposite();
+    }
+    else
+    {
+        return 1;
+    }
+    
+    return 0;
+}
+
index fcc543b..d0bcf28 100644 (file)
@@ -94,7 +94,8 @@ libscioutput_stream_la_CPPFLAGS=  \
        -I$(top_srcdir)/modules/system_env/includes \
        -I$(top_srcdir)/modules/threads/includes \
        -I$(top_srcdir)/modules/console/includes \
-    -I$(top_srcdir)/libs/dynamiclibrary/includes
+    -I$(top_srcdir)/libs/dynamiclibrary/includes \
+    $(EIGEN_CPPFLAGS)
 
 pkglib_LTLIBRARIES = libscioutput_stream.la
 noinst_LTLIBRARIES = libscioutput_stream-algo.la
index 0166ca7..16135a0 100644 (file)
@@ -537,7 +537,8 @@ libscioutput_stream_la_CPPFLAGS = \
        -I$(top_srcdir)/modules/system_env/includes \
        -I$(top_srcdir)/modules/threads/includes \
        -I$(top_srcdir)/modules/console/includes \
-    -I$(top_srcdir)/libs/dynamiclibrary/includes
+    -I$(top_srcdir)/libs/dynamiclibrary/includes \
+    $(EIGEN_CPPFLAGS)
 
 pkglib_LTLIBRARIES = libscioutput_stream.la
 noinst_LTLIBRARIES = libscioutput_stream-algo.la
index 373ec59..cd5be09 100644 (file)
@@ -76,7 +76,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\..\..\includes;..\..\..\..\functions_manager\includes;..\..\..\..\types\includes;..\..\..\..\core\includes;..\..\..\..\symbol\includes;..\..\..\..\ast\includes;../../../../system_env/includes;../../../../localization/includes;../../../../../libs/intl;../../../../../libs/MALLOC/includes;../../../../string/includes;../../../src/cpp;../../../../api_scilab/includes;../../../../operations/includes;../../../../threads/includes;../../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\..\includes;..\..\..\..\functions_manager\includes;..\..\..\..\types\includes;..\..\..\..\core\includes;..\..\..\..\symbol\includes;..\..\..\..\ast\includes;../../../../system_env/includes;../../../../localization/includes;../../../../../libs/intl;../../../../../libs/MALLOC/includes;../../../../string/includes;../../../src/cpp;../../../../api_scilab/includes;../../../../operations/includes;../../../../threads/includes;../../../../../libs/dynamiclibrary/includes;../../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;OUTPUT_STREAM_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\..\..\includes;..\..\..\..\functions_manager\includes;..\..\..\..\types\includes;..\..\..\..\core\includes;..\..\..\..\symbol\includes;..\..\..\..\ast\includes;../../../../system_env/includes;../../../../localization/includes;../../../../../libs/intl;../../../../../libs/MALLOC/includes;../../../../string/includes;../../../src/cpp;../../../../api_scilab/includes;../../../../operations/includes;../../../../threads/includes;../../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\..\includes;..\..\..\..\functions_manager\includes;..\..\..\..\types\includes;..\..\..\..\core\includes;..\..\..\..\symbol\includes;..\..\..\..\ast\includes;../../../../system_env/includes;../../../../localization/includes;../../../../../libs/intl;../../../../../libs/MALLOC/includes;../../../../string/includes;../../../src/cpp;../../../../api_scilab/includes;../../../../operations/includes;../../../../threads/includes;../../../../../libs/dynamiclibrary/includes;../../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;OUTPUT_STREAM_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>..\..\..\includes;..\..\..\..\functions_manager\includes;..\..\..\..\types\includes;..\..\..\..\core\includes;..\..\..\..\symbol\includes;..\..\..\..\ast\includes;../../../../system_env/includes;../../../../localization/includes;../../../../../libs/intl;../../../../../libs/MALLOC/includes;../../../../string/includes;../../../src/cpp;../../../../api_scilab/includes;../../../../operations/includes;../../../../threads/includes;../../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\..\includes;..\..\..\..\functions_manager\includes;..\..\..\..\types\includes;..\..\..\..\core\includes;..\..\..\..\symbol\includes;..\..\..\..\ast\includes;../../../../system_env/includes;../../../../localization/includes;../../../../../libs/intl;../../../../../libs/MALLOC/includes;../../../../string/includes;../../../src/cpp;../../../../api_scilab/includes;../../../../operations/includes;../../../../threads/includes;../../../../../libs/dynamiclibrary/includes;../../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;OUTPUT_STREAM_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>..\..\..\includes;..\..\..\..\functions_manager\includes;..\..\..\..\types\includes;..\..\..\..\core\includes;..\..\..\..\symbol\includes;..\..\..\..\ast\includes;../../../../system_env/includes;../../../../localization/includes;../../../../../libs/intl;../../../../../libs/MALLOC/includes;../../../../string/includes;../../../src/cpp;../../../../api_scilab/includes;../../../../operations/includes;../../../../threads/includes;../../../../../libs/dynamiclibrary/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\..\includes;..\..\..\..\functions_manager\includes;..\..\..\..\types\includes;..\..\..\..\core\includes;..\..\..\..\symbol\includes;..\..\..\..\ast\includes;../../../../system_env/includes;../../../../localization/includes;../../../../../libs/intl;../../../../../libs/MALLOC/includes;../../../../string/includes;../../../src/cpp;../../../../api_scilab/includes;../../../../operations/includes;../../../../threads/includes;../../../../../libs/dynamiclibrary/includes;../../../../../libs/Eigen/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;OUTPUT_STREAM_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
index 31c55c8..fac4409 100644 (file)
@@ -82,17 +82,17 @@ types::Callable::ReturnValue sci_mprintf(types::typed_list &in, int _iRetCount,
     int iNumberCols = 0;
     if( in.size() > 1 )
     {
-        int iRefRows = in[1]->getAsGenericType()->getRows();
+        int iRefRows = in[1]->getAs<GenericType>()->getRows();
         for(int i = 1 ; i < in.size() ; i++)
         {
             //all arguments must have the same numbers of rows !
-            if(iRefRows != in[i]->getAsGenericType()->getRows())
+            if(iRefRows != in[i]->getAs<GenericType>()->getRows())
             {
                 ScierrorW(999, _W("%ls: Wrong number of input arguments: data doesn't fit with format.\n"), L"mprintf");
                 return types::Function::Error;
             }
 
-            iNumberCols += in[i]->getAsGenericType()->getCols();
+            iNumberCols += in[i]->getAs<GenericType>()->getCols();
         }
     }
 
@@ -108,7 +108,7 @@ types::Callable::ReturnValue sci_mprintf(types::typed_list &in, int _iRetCount,
     int idx = 0;
     for(int i = 1 ; i < in.size() ; i++)
     {
-        for(int j = 0 ; j < in[i]->getAsGenericType()->getCols() ; j++)
+        for(int j = 0 ; j < in[i]->getAs<GenericType>()->getCols() ; j++)
         {
             pArgs[idx].iArg = i;
             pArgs[idx].iPos = j;
index 21e6fea..a9894ea 100644 (file)
@@ -80,17 +80,17 @@ types::Callable::ReturnValue sci_msprintf(types::typed_list &in, int _iRetCount,
     int iNumberCols = 0;
     if( in.size() > 1 )
     {
-        int iRefRows = in[1]->getAsGenericType()->getRows();
+        int iRefRows = in[1]->getAs<GenericType>()->getRows();
         for(int i = 1 ; i < in.size() ; i++)
         {
             //all arguments must have the same numbers of rows !
-            if(iRefRows != in[i]->getAsGenericType()->getRows())
+            if(iRefRows != in[i]->getAs<GenericType>()->getRows())
             {
                 ScierrorW(999, _W("%ls: Wrong number of input arguments: data doesn't fit with format.\n"), L"msprintf");
                 return types::Function::Error;
             }
 
-            iNumberCols += in[i]->getAsGenericType()->getCols();
+            iNumberCols += in[i]->getAs<GenericType>()->getCols();
         }
     }
 
@@ -106,7 +106,7 @@ types::Callable::ReturnValue sci_msprintf(types::typed_list &in, int _iRetCount,
     int idx = 0;
     for(int i = 1 ; i < in.size() ; i++)
     {
-        for(int j = 0 ; j < in[i]->getAsGenericType()->getCols() ; j++)
+        for(int j = 0 ; j < in[i]->getAs<GenericType>()->getCols() ; j++)
         {
             pArgs[idx].iArg = i;
             pArgs[idx].iPos = j;
index 45aba76..eecc05c 100644 (file)
@@ -192,10 +192,10 @@ wchar_t** scilab_sprintf(wchar_t* _pwstName, wchar_t* _pwstInput, typed_list &in
         int iLoop = 1;
         if(in.size() > 1)
         {
-            iLoop = in[1]->getAsGenericType()->getRows();
+            iLoop = in[1]->getAs<GenericType>()->getRows();
             for(int i = 2 ; i < in.size() ; i++)
             {
-                iLoop = Min(iLoop, in[i]->getAsGenericType()->getRows());
+                iLoop = Min(iLoop, in[i]->getAs<GenericType>()->getRows());
             }
         }
 
index 32301f6..9ad39b0 100644 (file)
@@ -21,15 +21,20 @@ function t=sci2exp(a,nom,lmax)
 //  a=[1 2;3 4]
 //  sci2exp(a,'aa')
 //!
+function x=String(a)
+    x=string(a)
+    x=strsubst(x,'Nan','%nan')
+       x=strsubst(x,'Inf','%inf')
+endfunction
 
-  deff('x=String(a)',['x=string(a)'
-                     'x=strsubst(x,''Nan'',''%nan'')'
-                     'x=strsubst(x,''Inf'',''%inf'')'
-                    ])
+//deff('x=String(a)',['x=string(a)'
+    //      'x=strsubst(x,''Nan'',''%nan'')'
+       //      'x=strsubst(x,''Inf'',''%inf'')'
+       //     ])
 
   
 [lhs,rhs]=argn(0)
-$ // import global variable $ in sci2exp context for efficiency
+//$ // import global variable $ in sci2exp context for efficiency
 select rhs
 case 1 then 
   named=%f
index dc1a289..99ccf41 100644 (file)
@@ -66,11 +66,11 @@ Function::ReturnValue sci_length(typed_list &in, int _iRetCount, typed_list &out
     }
     else if(in[0]->isGenericType())
     {
-        pOut = lengthMatrix(in[0]->getAsGenericType());
+        pOut = lengthMatrix(in[0]->getAs<GenericType>());
     }
     else if(in[0]->isList())
     {
-        pOut = lengthList(in[0]->getAsList());
+        pOut = lengthList(in[0]->getAs<List>());
     }
     //else if(in[0]->isSparse())
     //{
index bb75654..5024eff 100644 (file)
@@ -152,7 +152,7 @@ namespace symbol
             {
                 if(it_scope->second->isFunction() || it_scope->second->isMacro() || it_scope->second->isMacroFile())
                 {
-                    types::Callable* pC = it_scope->second->getAsCallable();
+                    types::Callable* pC = it_scope->second->getAs<types::Callable>();
                     if(_stModuleName == L""  || pC->getModule() == _stModuleName)
                     {
                         pNames->push_back(it_scope->first);
index 7953b60..aa80f68 100644 (file)
@@ -65,6 +65,7 @@ TYPES_CPP_SOURCES = \
                        src/cpp/uint32.cpp \
                        src/cpp/int64.cpp \
                        src/cpp/uint64.cpp \
+            src/cpp/sparse.cpp \
             src/cpp/types_tools.cpp
 
 if ENABLE_DEBUG
@@ -94,7 +95,18 @@ GATEWAY_CPP_SOURCES = \
        sci_gateway/cpp/sci_mlist.cpp \
        sci_gateway/cpp/sci_isfield.cpp \
        sci_gateway/cpp/sci_fieldnames.cpp \
-       sci_gateway/cpp/sci_getfield.cpp
+       sci_gateway/cpp/sci_getfield.cpp \
+       sci_gateway/cpp/sci_adj2sp.cpp \
+       sci_gateway/cpp/sci_full.cpp \
+       sci_gateway/cpp/sci_nnz.cpp \
+       sci_gateway/cpp/sci_sp2adj.cpp \
+       sci_gateway/cpp/sci_sparse.cpp \
+       sci_gateway/cpp/sci_spcompack.cpp \
+       sci_gateway/cpp/sci_spget.cpp \
+       sci_gateway/cpp/sci_spones.cpp
+
+
+
 
 if ENABLE_DEBUG
 GATEWAY_CPP_SOURCES += \
@@ -122,7 +134,8 @@ libscitypes_la_CPPFLAGS = \
        -I$(top_srcdir)/modules/string/includes \
        -I$(top_srcdir)/modules/threads/includes \
     -I$(top_srcdir)/libs/dynamiclibrary/includes \
-       -I src/cpp
+       -I src/cpp \
+    $(EIGEN_CPPFLAGS)
 
 libscitypes_algo_la_CPPFLAGS = $(libscitypes_la_CPPFLAGS)
 
index 5d78b3f..0878eae 100644 (file)
@@ -138,6 +138,11 @@ am__libscitypes_algo_la_SOURCES_DIST = sci_gateway/cpp/types_gw.cpp \
        sci_gateway/cpp/sci_mlist.cpp sci_gateway/cpp/sci_isfield.cpp \
        sci_gateway/cpp/sci_fieldnames.cpp \
        sci_gateway/cpp/sci_getfield.cpp \
+       sci_gateway/cpp/sci_adj2sp.cpp sci_gateway/cpp/sci_full.cpp \
+       sci_gateway/cpp/sci_nnz.cpp sci_gateway/cpp/sci_sp2adj.cpp \
+       sci_gateway/cpp/sci_sparse.cpp \
+       sci_gateway/cpp/sci_spcompack.cpp \
+       sci_gateway/cpp/sci_spget.cpp sci_gateway/cpp/sci_spones.cpp \
        sci_gateway/cpp/sci_inspectorDeleteUnreferencedItems.cpp \
        sci_gateway/cpp/sci_inspectorGetItem.cpp \
        sci_gateway/cpp/sci_inspectorGetItemCount.cpp \
@@ -165,7 +170,14 @@ am__objects_2 = libscitypes_algo_la-types_gw.lo \
        libscitypes_algo_la-sci_mlist.lo \
        libscitypes_algo_la-sci_isfield.lo \
        libscitypes_algo_la-sci_fieldnames.lo \
-       libscitypes_algo_la-sci_getfield.lo $(am__objects_1)
+       libscitypes_algo_la-sci_getfield.lo \
+       libscitypes_algo_la-sci_adj2sp.lo \
+       libscitypes_algo_la-sci_full.lo libscitypes_algo_la-sci_nnz.lo \
+       libscitypes_algo_la-sci_sp2adj.lo \
+       libscitypes_algo_la-sci_sparse.lo \
+       libscitypes_algo_la-sci_spcompack.lo \
+       libscitypes_algo_la-sci_spget.lo \
+       libscitypes_algo_la-sci_spones.lo $(am__objects_1)
 am_libscitypes_algo_la_OBJECTS = $(am__objects_2)
 libscitypes_algo_la_OBJECTS = $(am_libscitypes_algo_la_OBJECTS)
 libscitypes_la_DEPENDENCIES = libscitypes-algo.la
@@ -181,7 +193,7 @@ am__libscitypes_la_SOURCES_DIST = src/cpp/types.cpp src/cpp/string.cpp \
        src/cpp/threadId.cpp src/cpp/arrayof.cpp src/cpp/int8.cpp \
        src/cpp/uint8.cpp src/cpp/int16.cpp src/cpp/uint16.cpp \
        src/cpp/int32.cpp src/cpp/uint32.cpp src/cpp/int64.cpp \
-       src/cpp/uint64.cpp src/cpp/types_tools.cpp \
+       src/cpp/uint64.cpp src/cpp/sparse.cpp src/cpp/types_tools.cpp \
        src/cpp/inspector.cpp
 am__objects_3 =
 @ENABLE_DEBUG_TRUE@am__objects_4 = libscitypes_la-inspector.lo
@@ -201,8 +213,8 @@ am__objects_5 = libscitypes_la-types.lo libscitypes_la-string.lo \
        libscitypes_la-uint8.lo libscitypes_la-int16.lo \
        libscitypes_la-uint16.lo libscitypes_la-int32.lo \
        libscitypes_la-uint32.lo libscitypes_la-int64.lo \
-       libscitypes_la-uint64.lo libscitypes_la-types_tools.lo \
-       $(am__objects_4)
+       libscitypes_la-uint64.lo libscitypes_la-sparse.lo \
+       libscitypes_la-types_tools.lo $(am__objects_4)
 am_libscitypes_la_OBJECTS = $(am__objects_3) $(am__objects_3) \
        $(am__objects_5)
 libscitypes_la_OBJECTS = $(am_libscitypes_la_OBJECTS)
@@ -583,7 +595,8 @@ TYPES_CPP_SOURCES = src/cpp/types.cpp src/cpp/string.cpp \
        src/cpp/threadId.cpp src/cpp/arrayof.cpp src/cpp/int8.cpp \
        src/cpp/uint8.cpp src/cpp/int16.cpp src/cpp/uint16.cpp \
        src/cpp/int32.cpp src/cpp/uint32.cpp src/cpp/int64.cpp \
-       src/cpp/uint64.cpp src/cpp/types_tools.cpp $(am__append_2)
+       src/cpp/uint64.cpp src/cpp/sparse.cpp src/cpp/types_tools.cpp \
+       $(am__append_2)
 GIWS_WRAPPERS = 
 @GIWS_TRUE@BUILT_SOURCES = giws
 @SWIG_TRUE@BUILT_SOURCES = swig
@@ -597,7 +610,13 @@ GATEWAY_CPP_SOURCES = sci_gateway/cpp/types_gw.cpp \
        sci_gateway/cpp/sci_typeof.cpp sci_gateway/cpp/sci_tlist.cpp \
        sci_gateway/cpp/sci_mlist.cpp sci_gateway/cpp/sci_isfield.cpp \
        sci_gateway/cpp/sci_fieldnames.cpp \
-       sci_gateway/cpp/sci_getfield.cpp $(am__append_3)
+       sci_gateway/cpp/sci_getfield.cpp \
+       sci_gateway/cpp/sci_adj2sp.cpp sci_gateway/cpp/sci_full.cpp \
+       sci_gateway/cpp/sci_nnz.cpp sci_gateway/cpp/sci_sp2adj.cpp \
+       sci_gateway/cpp/sci_sparse.cpp \
+       sci_gateway/cpp/sci_spcompack.cpp \
+       sci_gateway/cpp/sci_spget.cpp sci_gateway/cpp/sci_spones.cpp \
+       $(am__append_3)
 libscitypes_la_CFLAGS = 
 libscitypes_la_CPPFLAGS = \
     -Iincludes/ \
@@ -612,7 +631,8 @@ libscitypes_la_CPPFLAGS = \
        -I$(top_srcdir)/modules/string/includes \
        -I$(top_srcdir)/modules/threads/includes \
     -I$(top_srcdir)/libs/dynamiclibrary/includes \
-       -I src/cpp
+       -I src/cpp \
+    $(EIGEN_CPPFLAGS)
 
 libscitypes_algo_la_CPPFLAGS = $(libscitypes_la_CPPFLAGS)
 pkglib_LTLIBRARIES = libscitypes.la
@@ -743,8 +763,10 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_adj2sp.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_cell.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_fieldnames.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_full.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_getfield.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_insert.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_inspectorDeleteUnreferencedItems.Plo@am__quote@
@@ -758,7 +780,13 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_list.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_makecell.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_mlist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_nnz.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_null.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_sp2adj.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_sparse.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_spcompack.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_spget.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_spones.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_struct.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_tlist.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_algo_la-sci_typeof.Plo@am__quote@
@@ -788,6 +816,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_la-polynom.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_la-singlepoly.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_la-singlestruct.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_la-sparse.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_la-string.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_la-struct.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscitypes_la-threadId.Plo@am__quote@
@@ -920,6 +949,62 @@ libscitypes_algo_la-sci_getfield.lo: sci_gateway/cpp/sci_getfield.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscitypes_algo_la-sci_getfield.lo `test -f 'sci_gateway/cpp/sci_getfield.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_getfield.cpp
 
+libscitypes_algo_la-sci_adj2sp.lo: sci_gateway/cpp/sci_adj2sp.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscitypes_algo_la-sci_adj2sp.lo -MD -MP -MF $(DEPDIR)/libscitypes_algo_la-sci_adj2sp.Tpo -c -o libscitypes_algo_la-sci_adj2sp.lo `test -f 'sci_gateway/cpp/sci_adj2sp.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_adj2sp.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscitypes_algo_la-sci_adj2sp.Tpo $(DEPDIR)/libscitypes_algo_la-sci_adj2sp.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/sci_adj2sp.cpp' object='libscitypes_algo_la-sci_adj2sp.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscitypes_algo_la-sci_adj2sp.lo `test -f 'sci_gateway/cpp/sci_adj2sp.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_adj2sp.cpp
+
+libscitypes_algo_la-sci_full.lo: sci_gateway/cpp/sci_full.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscitypes_algo_la-sci_full.lo -MD -MP -MF $(DEPDIR)/libscitypes_algo_la-sci_full.Tpo -c -o libscitypes_algo_la-sci_full.lo `test -f 'sci_gateway/cpp/sci_full.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_full.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscitypes_algo_la-sci_full.Tpo $(DEPDIR)/libscitypes_algo_la-sci_full.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/sci_full.cpp' object='libscitypes_algo_la-sci_full.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscitypes_algo_la-sci_full.lo `test -f 'sci_gateway/cpp/sci_full.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_full.cpp
+
+libscitypes_algo_la-sci_nnz.lo: sci_gateway/cpp/sci_nnz.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscitypes_algo_la-sci_nnz.lo -MD -MP -MF $(DEPDIR)/libscitypes_algo_la-sci_nnz.Tpo -c -o libscitypes_algo_la-sci_nnz.lo `test -f 'sci_gateway/cpp/sci_nnz.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_nnz.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscitypes_algo_la-sci_nnz.Tpo $(DEPDIR)/libscitypes_algo_la-sci_nnz.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/sci_nnz.cpp' object='libscitypes_algo_la-sci_nnz.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscitypes_algo_la-sci_nnz.lo `test -f 'sci_gateway/cpp/sci_nnz.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_nnz.cpp
+
+libscitypes_algo_la-sci_sp2adj.lo: sci_gateway/cpp/sci_sp2adj.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscitypes_algo_la-sci_sp2adj.lo -MD -MP -MF $(DEPDIR)/libscitypes_algo_la-sci_sp2adj.Tpo -c -o libscitypes_algo_la-sci_sp2adj.lo `test -f 'sci_gateway/cpp/sci_sp2adj.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_sp2adj.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscitypes_algo_la-sci_sp2adj.Tpo $(DEPDIR)/libscitypes_algo_la-sci_sp2adj.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/sci_sp2adj.cpp' object='libscitypes_algo_la-sci_sp2adj.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscitypes_algo_la-sci_sp2adj.lo `test -f 'sci_gateway/cpp/sci_sp2adj.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_sp2adj.cpp
+
+libscitypes_algo_la-sci_sparse.lo: sci_gateway/cpp/sci_sparse.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscitypes_algo_la-sci_sparse.lo -MD -MP -MF $(DEPDIR)/libscitypes_algo_la-sci_sparse.Tpo -c -o libscitypes_algo_la-sci_sparse.lo `test -f 'sci_gateway/cpp/sci_sparse.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_sparse.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscitypes_algo_la-sci_sparse.Tpo $(DEPDIR)/libscitypes_algo_la-sci_sparse.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/sci_sparse.cpp' object='libscitypes_algo_la-sci_sparse.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscitypes_algo_la-sci_sparse.lo `test -f 'sci_gateway/cpp/sci_sparse.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_sparse.cpp
+
+libscitypes_algo_la-sci_spcompack.lo: sci_gateway/cpp/sci_spcompack.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscitypes_algo_la-sci_spcompack.lo -MD -MP -MF $(DEPDIR)/libscitypes_algo_la-sci_spcompack.Tpo -c -o libscitypes_algo_la-sci_spcompack.lo `test -f 'sci_gateway/cpp/sci_spcompack.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_spcompack.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscitypes_algo_la-sci_spcompack.Tpo $(DEPDIR)/libscitypes_algo_la-sci_spcompack.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/sci_spcompack.cpp' object='libscitypes_algo_la-sci_spcompack.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscitypes_algo_la-sci_spcompack.lo `test -f 'sci_gateway/cpp/sci_spcompack.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_spcompack.cpp
+
+libscitypes_algo_la-sci_spget.lo: sci_gateway/cpp/sci_spget.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscitypes_algo_la-sci_spget.lo -MD -MP -MF $(DEPDIR)/libscitypes_algo_la-sci_spget.Tpo -c -o libscitypes_algo_la-sci_spget.lo `test -f 'sci_gateway/cpp/sci_spget.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_spget.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscitypes_algo_la-sci_spget.Tpo $(DEPDIR)/libscitypes_algo_la-sci_spget.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/sci_spget.cpp' object='libscitypes_algo_la-sci_spget.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscitypes_algo_la-sci_spget.lo `test -f 'sci_gateway/cpp/sci_spget.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_spget.cpp
+
+libscitypes_algo_la-sci_spones.lo: sci_gateway/cpp/sci_spones.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscitypes_algo_la-sci_spones.lo -MD -MP -MF $(DEPDIR)/libscitypes_algo_la-sci_spones.Tpo -c -o libscitypes_algo_la-sci_spones.lo `test -f 'sci_gateway/cpp/sci_spones.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_spones.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscitypes_algo_la-sci_spones.Tpo $(DEPDIR)/libscitypes_algo_la-sci_spones.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/sci_spones.cpp' object='libscitypes_algo_la-sci_spones.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscitypes_algo_la-sci_spones.lo `test -f 'sci_gateway/cpp/sci_spones.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_spones.cpp
+
 libscitypes_algo_la-sci_inspectorDeleteUnreferencedItems.lo: sci_gateway/cpp/sci_inspectorDeleteUnreferencedItems.cpp
 @am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscitypes_algo_la-sci_inspectorDeleteUnreferencedItems.lo -MD -MP -MF $(DEPDIR)/libscitypes_algo_la-sci_inspectorDeleteUnreferencedItems.Tpo -c -o libscitypes_algo_la-sci_inspectorDeleteUnreferencedItems.lo `test -f 'sci_gateway/cpp/sci_inspectorDeleteUnreferencedItems.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_inspectorDeleteUnreferencedItems.cpp
 @am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscitypes_algo_la-sci_inspectorDeleteUnreferencedItems.Tpo $(DEPDIR)/libscitypes_algo_la-sci_inspectorDeleteUnreferencedItems.Plo
@@ -1200,6 +1285,13 @@ libscitypes_la-uint64.lo: src/cpp/uint64.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscitypes_la-uint64.lo `test -f 'src/cpp/uint64.cpp' || echo '$(srcdir)/'`src/cpp/uint64.cpp
 
+libscitypes_la-sparse.lo: src/cpp/sparse.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscitypes_la-sparse.lo -MD -MP -MF $(DEPDIR)/libscitypes_la-sparse.Tpo -c -o libscitypes_la-sparse.lo `test -f 'src/cpp/sparse.cpp' || echo '$(srcdir)/'`src/cpp/sparse.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscitypes_la-sparse.Tpo $(DEPDIR)/libscitypes_la-sparse.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/cpp/sparse.cpp' object='libscitypes_la-sparse.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscitypes_la-sparse.lo `test -f 'src/cpp/sparse.cpp' || echo '$(srcdir)/'`src/cpp/sparse.cpp
+
 libscitypes_la-types_tools.lo: src/cpp/types_tools.cpp
 @am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscitypes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscitypes_la-types_tools.lo -MD -MP -MF $(DEPDIR)/libscitypes_la-types_tools.Tpo -c -o libscitypes_la-types_tools.lo `test -f 'src/cpp/types_tools.cpp' || echo '$(srcdir)/'`src/cpp/types_tools.cpp
 @am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscitypes_la-types_tools.Tpo $(DEPDIR)/libscitypes_la-types_tools.Plo
index 60613c3..8a03ef2 100644 (file)
@@ -55,5 +55,6 @@
 #include "cell.hxx"
 #include "colon.hxx"
 #include "dollar.hxx"
+#include "sparse.hxx"
 
 #endif /* !ALL_TYPES_HXX */
diff --git a/scilab/modules/types/includes/anytype.hxx b/scilab/modules/types/includes/anytype.hxx
deleted file mode 100644 (file)
index faa9080..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- *  Copyright (C) 2008-2010 - DIGITEO - Bruno JOFRET
- *
- *  This file must be used under the terms of the CeCILL.
- *  This source file is licensed as described in the file COPYING, which
- *  you shoul