Package com.objectspace.jgl

Examples of com.objectspace.jgl.Array


   *
   * @param double the value to be compared
   * @return FzySet[] of all sets that this value is contained.
   */
  public com.objectspace.jgl.Array containsValue(double value){
    Array setArray = new Array(0);
    try {
      FzySet currentSet;
      for (int i = 0; i < sets.size(); i++) {
        currentSet = (FzySet)sets.elementAt(i);
        if (currentSet.doesContain(value)) {
          setArray.add((FzySet)sets.elementAt(i));
        }
      }
      if (setArray.size() > 1) {
        BinaryPredicate bp = (BinaryPredicate)
        new MembershipGreaterThan((ObservableImpl) this, value);
        com.objectspace.jgl.algorithms.Sorting.sort(setArray, bp);
      }
    } catch (Exception e) {
View Full Code Here


  public double getDOMForCollection(double value) throws IllegalArgumentException {
    if (Double.isNaN(value)) throw new IllegalArgumentException("value is Double.NaN!");
    double max = -1.0d;
    double tmax;
    try {
      Array cVector = containsValue(value);
      if (cVector.size() > 0) {
        for (Enumeration e = cVector.elements(); e.hasMoreElements();) {
          FzySet aSet = (FzySet) e.nextElement();
          tmax = aSet.getDOM(value);
          if (tmax > max) max = tmax;
        }
        return max;
View Full Code Here

TOP

Related Classes of com.objectspace.jgl.Array

Copyright © 2018 www.massapicom. 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.