Package de.lmu.ifi.dbs.elki.database.datastore

Examples of de.lmu.ifi.dbs.elki.database.datastore.WritableDoubleDataStore.doubleValue()


      }
    }
    // compute maximum density
    double maxDensity = 0.0;
    for(DBID id : relation.iterDBIDs()) {
      double dens = rbod_score.doubleValue(id);
      if(dens > maxDensity) {
        maxDensity = dens;
      }
    }
    // compute ROS
View Full Code Here


        maxDensity = dens;
      }
    }
    // compute ROS
    for(DBID id : relation.iterDBIDs()) {
      double score = 1 - (rbod_score.doubleValue(id) / maxDensity);
      rbod_score.putDouble(id, score);
    }

    // adds reference points to the result. header information for the
    // visualizer to find the reference points in the result
View Full Code Here

      List<List<DistanceResultPair<D>>> reachDistRKNNs = lofResult.getRkNNReach().getRKNNForBulkDBIDs(lrd_ids, k);
      ArrayDBIDs affected_lrd_id_candidates = mergeIDs(reachDistRKNNs, lrd_ids);
      ArrayModifiableDBIDs affected_lrd_ids = DBIDUtil.newArray(affected_lrd_id_candidates.size());
      WritableDoubleDataStore new_lrds = computeLRDs(affected_lrd_id_candidates, lofResult.getKNNReach());
      for(DBID id : affected_lrd_id_candidates) {
        double new_lrd = new_lrds.doubleValue(id);
        double old_lrd = lofResult.getLrds().doubleValue(id);
        if(Double.isNaN(old_lrd) || old_lrd != new_lrd) {
          lofResult.getLrds().putDouble(id, new_lrd);
          affected_lrd_ids.add(id);
        }
View Full Code Here

      List<List<DistanceResultPair<D>>> reachDistRKNNs = lofResult.getRkNNReach().getRKNNForBulkDBIDs(lrd_ids, k);
      ArrayDBIDs affected_lrd_id_candidates = mergeIDs(reachDistRKNNs, lrd_ids);
      ArrayModifiableDBIDs affected_lrd_ids = DBIDUtil.newArray(affected_lrd_id_candidates.size());
      WritableDoubleDataStore new_lrds = computeLRDs(affected_lrd_id_candidates, lofResult.getKNNReach());
      for(DBID id : affected_lrd_id_candidates) {
        double new_lrd = new_lrds.doubleValue(id);
        double old_lrd = lofResult.getLrds().doubleValue(id);
        if(old_lrd != new_lrd) {
          lofResult.getLrds().putDouble(id, new_lrd);
          affected_lrd_ids.add(id);
        }
View Full Code Here

     */
    private void recomputeLOFs(DBIDs ids, LOFResult<O, D> lofResult) {
      Pair<WritableDoubleDataStore, DoubleMinMax> lofsAndMax = computeLOFs(ids, lofResult.getLrds(), lofResult.getKNNRefer());
      WritableDoubleDataStore new_lofs = lofsAndMax.getFirst();
      for(DBID id : ids) {
        lofResult.getLofs().putDouble(id, new_lofs.doubleValue(id));
      }
      // track the maximum value for normalization.
      DoubleMinMax new_lofminmax = lofsAndMax.getSecond();

      // Actualize meta info
View Full Code Here

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.