Package infosapient.opr

Source Code of infosapient.opr.FzyOprOR

package infosapient.opr;
/*
* Copyright (c) 2001, Workplace Performance Tools, All Rights Reserved.
*
* LICENSE TO USE THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE 0.5
* ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
* RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
* The license may be viewed at:
* http://www.opensource.org/licenses/cpl.html
*/
import infosapient.system.FzySet;
import java.rmi.server.ObjID;

/**
*
* Class FzyOprOR implements the Zadeh (standard fuzzy) OR: Math.max(value1, value2)
* @author: Michael McConnell
*
* @version $Revision: 1.1.1.1 $
*/
public class FzyOprOR extends FzyOperator
{
  static final long serialVersionUID = -47024793425171996L;
  double dom = 0.0;
  public FzyOprOR() {myID = new ObjID();}
  public void apply(double d0, double d1) throws infosapient.system.FzySystemException {
  if(Double.isNaN(d0)) throw new IllegalArgumentException(" Argument 1 is NaN");
  if(Double.isNaN(d1)) throw new IllegalArgumentException(" Argument 2 is NaN");
  if (DEBUG_[0]) System.err.println(this.getName() + ":, d0: " + d0 + ", d1: " + d1);
  dom = Math.max(d0, d1);
  setSolutionDOM(dom);
  }
  public String getName() {
  return("or");
  }
}
TOP

Related Classes of infosapient.opr.FzyOprOR

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.