Package de.lmu.ifi.dbs.elki.utilities.exceptions

Examples of de.lmu.ifi.dbs.elki.utilities.exceptions.AbortException


  @Override
  public DBIDRange generateStaticDBIDRange(int size) {
    final int start = next.getAndAdd(size);
    if (start > next.get()) {
      throw new AbortException("DBID range allocation error - too many objects allocated!");
    }
    DBIDRange alloc = new IntegerDBIDRange(start, size);
    return alloc;
  }
View Full Code Here


      catch(FileNotFoundException e2) {
        try {
          stream = FileUtil.openSystemFile(DEFAULT_PROPERTIES_PATH + filename + DEFAULT_PROPERTIES_EXTENSION);
        }
        catch(FileNotFoundException e3) {
          throw new AbortException("Could not find style scheme file '" + filename + "' for scheme '" + name + "'!");
        }
      }
    }
    try {
      properties.load(stream);
    }
    catch(Exception e) {
      throw new AbortException("Error loading properties file " + filename + ".\n", e);
    }
  }
View Full Code Here

    if(lw == null) {
      try {
        lw = Double.parseDouble(getPropertyValue(key, LINE_WIDTH)) * SCALE;
      }
      catch(NullPointerException e) {
        throw new AbortException("Missing/invalid value in style library: " + key + "." + LINE_WIDTH);
      }
    }
    return lw;
  }
View Full Code Here

    if(lw == null) {
      try {
        lw = Double.parseDouble(getPropertyValue(key, TEXT_SIZE)) * SCALE;
      }
      catch(NullPointerException e) {
        throw new AbortException("Missing/invalid value in style library: " + key + "." + TEXT_SIZE);
      }
    }
    return lw;
  }
View Full Code Here

    if(lw == null) {
      try {
        lw = Double.parseDouble(getPropertyValue(key, GENERIC_SIZE)) * SCALE;
      }
      catch(NullPointerException e) {
        throw new AbortException("Missing/invalid value in style library: " + key + "." + GENERIC_SIZE);
      }
    }
    return lw;
  }
View Full Code Here

    if(lw == null) {
      try {
        lw = Double.parseDouble(getPropertyValue(key, OPACITY));
      }
      catch(NullPointerException e) {
        throw new AbortException("Missing/invalid value in style library: " + key + "." + OPACITY);
      }
    }
    return lw;
  }
View Full Code Here

   * @param db Database
   * @return Scales, indexed starting with 0 (like Vector, not database objects!)
   */
  public static <O extends NumberVector<?,? extends Number>> LinearScale[] calcScales(Relation<O> db) {
    if (db == null) {
      throw new AbortException("No database was given to Scales.calcScales.");
    }
    int dim = DatabaseUtil.dimensionality(db);
    DoubleMinMax minmax[] = DoubleMinMax.newArray(dim);
    LinearScale scales[] = new LinearScale[dim];
 
View Full Code Here

      this.mean = (this.wsum * this.mean + other.wsum * other.mean) / nwsum;
      this.nvar += ((MeanVariance) other).nvar + delta * this.wsum * rval;
      this.wsum = nwsum;
    }
    else {
      throw new AbortException("I cannot combine Mean and MeanVariance to a MeanVariance.");
    }
  }
View Full Code Here

    if(!(getDistanceFunction() instanceof SpatialPrimitiveDistanceFunction)) {
      throw new IllegalStateException("Distance Function must be an instance of " + SpatialPrimitiveDistanceFunction.class.getName());
    }
    Collection<SpatialIndexTree<N, E>> indexes = ResultUtil.filterResults(database, SpatialIndexTree.class);
    if(indexes.size() != 1) {
      throw new AbortException("KNNJoin found " + indexes.size() + " spatial indexes, expected exactly one.");
    }
    // FIXME: Ensure were looking at the right relation!
    SpatialIndexTree<N, E> index = indexes.iterator().next();
    SpatialPrimitiveDistanceFunction<V, D> distFunction = (SpatialPrimitiveDistanceFunction<V, D>) getDistanceFunction();
    DistanceQuery<V, D> distq = database.getDistanceQuery(relation, distFunction);
View Full Code Here

            z -= (popsize - j);
          }
        }
      }
      if(survivors.size() != popsize) {
        throw new AbortException("Selection step failed - implementation error?");
      }
      // Don't sort, to avoid biasing the crossover!
      // Collections.sort(survivors);
      return survivors;
    }
View Full Code Here

TOP

Related Classes of de.lmu.ifi.dbs.elki.utilities.exceptions.AbortException

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.