1 8 package org.lsmp.djep.matrixJep; 9 import org.nfunk.jep.*; 10 import org.lsmp.djep.djep.*; 11 import org.lsmp.djep.vectorJep.*; 12 import org.lsmp.djep.vectorJep.values.*; 13 20 public class MatrixPartialDerivative extends PartialDerivative implements MatrixVariableI { 21 22 private MatrixValueI mvalue = null; 23 24 28 protected MatrixPartialDerivative(MatrixVariable var, String derivnames[],Node deriv) 29 { 30 super(var,derivnames,deriv); 31 setValidValue(false); 32 mvalue=Tensor.getInstance(var.getDimensions()); 33 } 34 35 public Dimensions getDimensions() 36 { 37 MatrixVariableI root = (MatrixVariableI) getRoot(); 38 return root.getDimensions(); 39 } 40 public void setDimensions(Dimensions dims) {} 41 public MatrixValueI getMValue() { return mvalue; } 42 43 public void setMValue(MatrixValueI val) { 44 if(this.isConstant()) return; 45 mvalue.setEles(val); 46 setValidValue(true); 47 setChanged(); 48 notifyObservers(); 49 } 50 } 53 | Popular Tags |