Package infosapient.hdg

Source Code of infosapient.hdg.FzyHdgDEFINITELY

package infosapient.hdg;
/*
* 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;

/**
* @author: Michael McConnell
* Class FzyHdgDEFINITELY assigns membership to 0.935.
* @version $Revision: 1.1.1.1 $
*/
public class FzyHdgDEFINITELY extends infosapient.hdg.FzyHedge {
  static final long serialVersionUID = 5484657216474319411L;
  public FzyHdgDEFINITELY() {myID = new ObjID();}
  public FzySet apply(FzySet aSet) {
  double half = 0.5d;
  m = aSet.getMemberArray();
  for (int inx = 0; inx < VECMAX; inx++) {
    if (m[inx] > half)
    results[inx] = Math.pow(m[inx], DEFINITELY_EXP);
    else {
    double t = 1.0 - ( 2.0d * Math.pow((1.0 - m[inx]), DEFINITELY_EXP));
    results[inx] =  Math.max((Math.min(t, 1.0)), 0.0);
    }
  }
  aSet.setMembershipArray(results);
  return aSet;
  }
  public String getName() { return "definitely"; }
}
TOP

Related Classes of infosapient.hdg.FzyHdgDEFINITELY

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.