All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lsmp.djep.jama.JamaUtil Maven / Gradle / Ivy

Go to download

JEP is a Java library for parsing and evaluating mathematical expressions.

The newest version!
/* @author rich
 * Created on 15-Feb-2005
 *
 * See LICENSE.txt for license information.
 */
package org.lsmp.djep.jama;
import org.lsmp.djep.vectorJep.values.*;
import org.nfunk.jep.*;
/**
 * Utility functions for adding Jama matrix functions.
 * To add these functions to a VectorJep or MatrixJep instance use
 * 
 * VectorJep j = new VectorJep();
 * j.addStandardFunctions();
 * ...
 * JamaUtil.addStandardFunctions(j);
 * 
* * @author Rich Morris * Created on 15-Feb-2005 * @see http://math.nist.gov/javanumerics/jama/ */ public final class JamaUtil { public static Jama.Matrix toJama(Matrix m) throws ParseException { int rows = m.getNumRows(); int cols = m.getNumCols(); Object data[][] = m.getEles(); double A[][] = new double[rows][cols]; for(int i=0;i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy