Package infosapient.hdg

Source Code of infosapient.hdg.FzyHdgSLIGHTLY

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;

/**
* SLIGHTLY raises the value of the membership to the 2/3 power.
* Contrast to ROUGHLY.
* @version $Revision: 1.1.1.1 $
*/
public class FzyHdgSLIGHTLY extends FzyHedge {
  static final long serialVersionUID = 3587461895159932727L;
  public FzyHdgSLIGHTLY() {myID = new ObjID();}
  synchronized public FzySet apply(FzySet aSet) {
  int vLen = (aSet.getMemberArray()).length;
  m = new double[vLen];
  m = aSet.getMemberArray();
  for (int inx = 0; inx < vLen; inx ++) {
    double value = Math.pow(m[inx], (double)2.0/3.0);
    aSet.setMembership(value, inx);
  }
  return aSet;
  }
  public String getName() { return "slightly"; }
}
TOP

Related Classes of infosapient.hdg.FzyHdgSLIGHTLY

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.