fixes bug 2964 non-reg test: adding builder for the 'mul' option 15/15615/5
Sylvain GENIN [Mon, 1 Dec 2014 15:48:39 +0000 (16:48 +0100)]
test_run("randlib","bug_2964",["no_check_error_output" ]);

Change-Id: I0bb8fa6c4ece85c3b306167cdf600301dd08b636

scilab/modules/randlib/sci_gateway/cpp/sci_grand.cpp

index 65093d6..2f25375 100644 (file)
@@ -431,7 +431,17 @@ types::Function::ReturnValue sci_grand(types::typed_list &in, int _iRetCount, ty
     {
 
         types::Double* pDblIn = in[0]->getAs<types::Double>();
-        pDblOut = new types::Double(pDblIn->getDims(), pDblIn->getDimsArray());
+        if (meth == 14)//'mul'
+        {
+            int* iDimsArraytempo = new int[2];
+            iDimsArraytempo[0] = in[3]->getAs<types::Double>()->getSize() + 1;
+            iDimsArraytempo[1] = iNumIter;
+            pDblOut = new types::Double(pDblIn->getDims(), iDimsArraytempo);
+        }
+        else
+        {
+            pDblOut = new types::Double(pDblIn->getDims(), pDblIn->getDimsArray());
+        }
 
     }