Package infosapient.hdg

Source Code of infosapient.hdg.FzyHdgDECREASE

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;
/**
*       
   * @author: Michael McConnell
* @version $Revision: 1.1.1.1 $
* Decreases the overall membership of the set by subracting 0.1 from each <code>m[i]</code>.
*/
import java.rmi.server.ObjID;

public class FzyHdgDECREASE extends FzyHedge {
  static final long serialVersionUID = -7355705354685689654L;
  public FzyHdgDECREASE() {myID = new ObjID();}
  public FzySet apply(FzySet aSet) {
  VECMAX = aSet.getMemberArray().length;
  results = new double[VECMAX];
  m = aSet.getMemberArray();
  for (int inx = 0; inx < VECMAX; inx++ )
    results[inx] = Math.max((m[inx] - INC_DEC_FACTOR), 0.0d);
  aSet.setMembershipArray(results);
  return aSet;
  }
  public String getName() { return "decrease"; }
}
TOP

Related Classes of infosapient.hdg.FzyHdgDECREASE

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.