Package de.lmu.ifi.dbs.elki.datasource.bundle

Examples of de.lmu.ifi.dbs.elki.datasource.bundle.MultipleObjectsBundle.appendColumn()


      // Get the replacement type informations
      VectorFieldTypeInformation<V> type1 = new VectorFieldTypeInformation<V>(type.getRestrictionClass(), type.getSerializer(), dims.length, dims.length);
      VectorFieldTypeInformation<V> type2 = new VectorFieldTypeInformation<V>(type.getRestrictionClass(), type.getSerializer(), vtype.dimensionality() - dims.length, vtype.dimensionality() - dims.length);
      final List<V> col1 = new ArrayList<V>(column.size());
      final List<V> col2 = new ArrayList<V>(column.size());
      bundle.appendColumn(type1, col1);
      bundle.appendColumn(type2, col2);

      // Build other dimensions array.
      int[] odims = new int[vtype.dimensionality() - dims.length];
      {
View Full Code Here


      VectorFieldTypeInformation<V> type1 = new VectorFieldTypeInformation<V>(type.getRestrictionClass(), type.getSerializer(), dims.length, dims.length);
      VectorFieldTypeInformation<V> type2 = new VectorFieldTypeInformation<V>(type.getRestrictionClass(), type.getSerializer(), vtype.dimensionality() - dims.length, vtype.dimensionality() - dims.length);
      final List<V> col1 = new ArrayList<V>(column.size());
      final List<V> col2 = new ArrayList<V>(column.size());
      bundle.appendColumn(type1, col1);
      bundle.appendColumn(type2, col2);

      // Build other dimensions array.
      int[] odims = new int[vtype.dimensionality() - dims.length];
      {
        int i = 0;
View Full Code Here

      List<?> in = objects.getColumn(j);
      List<Object> data = new ArrayList<Object>(size);
      for(int i = 0; i < size; i++) {
        data.add(in.get(offsets[i]));
      }
      bundle.appendColumn(objects.meta(j), data);
    }
    return bundle;
  }

  /**
 
View Full Code Here

      logger.debug("Filtering the data set");
    }

    MultipleObjectsBundle bundle = new MultipleObjectsBundle();
    for(int j = 0; j < objects.metaLength(); j++) {
      bundle.appendColumn(objects.meta(j), new ArrayList<Object>());
    }
    for(int i = 0; i < objects.dataLength(); i++) {
      boolean good = true;
      for(int j = 0; j < objects.metaLength(); j++) {
        if(objects.data(i, j) == null) {
View Full Code Here

    MultipleObjectsBundle bundle = new MultipleObjectsBundle();
    List<DBID> ids = new ArrayList<DBID>(objects.dataLength());
    for(int i = 0; i < objects.dataLength(); i++) {
      ids.add(DBIDUtil.importInteger(startid + i));
    }
    bundle.appendColumn(TypeUtil.DBID, ids);
    // copy other columns
    for(int j = 0; j < objects.metaLength(); j++) {
      bundle.appendColumn(objects.meta(j), objects.getColumn(j));
    }
    return bundle;
View Full Code Here

      ids.add(DBIDUtil.importInteger(startid + i));
    }
    bundle.appendColumn(TypeUtil.DBID, ids);
    // copy other columns
    for(int j = 0; j < objects.metaLength(); j++) {
      bundle.appendColumn(objects.meta(j), objects.getColumn(j));
    }
    return bundle;
  }

  /**
 
View Full Code Here

      List<?> in = objects.getColumn(j);
      List<Object> data = new ArrayList<Object>(size);
      for(int i = 0; i < size; i++) {
        data.add(in.get(offsets[i]));
      }
      bundle.appendColumn(objects.meta(j), data);
    }
    return bundle;
  }
}
View Full Code Here

    for(Relation<?> relation : relations) {
      ArrayList<Object> data = new ArrayList<Object>(ids.size());
      for(DBID id : ids) {
        data.add(relation.get(id));
      }
      bundle.appendColumn(relation.getDataTypeInformation(), data);
    }
    // remove from db
    for(DBID id : ids) {
      doDelete(id);
    }
View Full Code Here

      List<?> in = objects.getColumn(j);
      List<Object> data = new ArrayList<Object>(size);
      for(int i = 0; i < size; i++) {
        data.add(in.get(offsets[i]));
      }
      bundle.appendColumn(objects.meta(j), data);
    }
    return bundle;
  }

  /**
 
View Full Code Here

  }

  @Override
  public MultipleObjectsBundle loadData() {
    MultipleObjectsBundle objects = new MultipleObjectsBundle();
    objects.appendColumn(TypeUtil.STRING, new ArrayList<Object>());
    for(File file : files) {
      String filestr = file.getPath();
      try {
        InputStream inputStream = new FileInputStream(file);
        inputStream = FileUtil.tryGzipInput(inputStream);
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.