From 949598884634132259b6b4e3bae68c99c214318f Mon Sep 17 00:00:00 2001 From: villberg Date: Wed, 18 Jun 2014 06:27:17 +0000 Subject: [PATCH] refs #4960 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29641 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../sysdyn/solver/ElementwiseDivision.java | 15 ++++++++++++++- .../sysdyn/solver/ElementwiseProduct.java | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ElementwiseDivision.java b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ElementwiseDivision.java index 69688355..77362aa5 100644 --- a/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ElementwiseDivision.java +++ b/fi.semantum.sysdyn.solver/src/fi/semantum/sysdyn/solver/ElementwiseDivision.java @@ -48,7 +48,20 @@ public class ElementwiseDivision implements IExpression { result.addElement(ld/rd); } return result; - } else throw new UnsupportedOperationException(); + } else if(left instanceof Array && right instanceof Double) { + Array la = (Array)left; + double rd = (Double)right; + Collection lae = la.elements(); + Iterator li = lae.iterator(); + Array result = new Array(); + for(int i=0;i lae = la.elements(); + Iterator li = lae.iterator(); + Array result = new Array(); + for(int i=0;i