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

org.lsmp.djep.xjep.function.Min Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.4.2
Show newest version
/* @author rich
 * Created on 18-Nov-2003
 */
package org.lsmp.djep.xjep.function;

import org.nfunk.jep.*;
import org.nfunk.jep.function.*;

/**
 * A min function Min(x^2,x,1,10) finds the min of x^2 with x running from 1 to 10.
 *
 * @author Rich Morris
 * Created on 10-Sept-2004
 */
public class Min extends SumType {

	static Comparative comp = new Comparative(Comparative.LE);

	public Min()
	{
		super("Min");
	}

		
	public Object evaluate(Object elements[]) throws ParseException
	{
		Object ret;
		ret = elements[0];
		for(int i=1;i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy