Package tables

Examples of tables.DimensionMap


   * @param PARAM_detectionRateConstant
   */
  public void setParams(double PARAM_polymeraseOnRate_Transcription, double PARAM_transcriptionToReplicationRatio, double PARAM_genToAntiGenoRepRatio, double PARAM_detectableGenomeStoich, double PARAM_PLPol_rate, double PARAM_genomeMcondensationRate, double PARAM_detectionRateConstant, double PARAM_polymeraseNtPerSec_Transcription, double PARAM_polymeraseSpacing)
  {
    // Virus Parameters
    DimensionMap params = new DimensionMap();
    params.put(VSVModel.k_TRANSCRIPTION, "" + PARAM_polymeraseOnRate_Transcription);
    params.put(VSVModel.ratio_TRANSCRIPTION_2_REPLICATION, "" + PARAM_transcriptionToReplicationRatio);
    params.put(VSVModel.ratio_GENOME_2_ANTIGENOME, "" + PARAM_genToAntiGenoRepRatio);
    params.put(VSVModel.stoich_ERROR, "" + PARAM_detectableGenomeStoich);
    params.put(VSVModel.k_POL_FORMATION, "" + PARAM_PLPol_rate);
    params.put(VSVModel.k_CONDENSATION, "" + PARAM_genomeMcondensationRate);
    // params.put(VSVModel.pol_SPEED, "" + PARAM_polymeraseNtPerSec_Transcription);
    // params.put(VSVModel.pol_SPACING, "" + PARAM_polymeraseSpacing);
   
    // Cell Parameters
    params.put(VSVModel.k_DETECTION, "" + PARAM_detectionRateConstant);
   
    this.virus.setParams(params);
    this.cell.setParams(params);
   
    this.initializeRxns();
View Full Code Here


   * @questions What is the item.name and item.value?
   */
  public void addResults(double t, String poolName, SimplePool data)
  {
    String time = JEXTableWriter.doubleToString(t, 2);
    DimensionMap map;
    for (Item item : data.values())
    {
      map = new DimensionMap("Time=" + time + ",Pool=" + poolName + ",ItemName=" + item.name);
      this.results.put(map, item.value);
    }
  }
View Full Code Here

      double count = 0;
      double total = splitDim.size();
      displayPercentage = 0;
      for (String newDim : splitDim.dimValues)
      {
        DimTable subTable = reader.dimTable.getSubTable(new DimensionMap(splitDimName + "=" + newDim));
        JEXTableWriter writer = new JEXTableWriter(tableName, fileExtension);
        writer.writeHeader(subTable, reader.isNumeric());
        writers.put(newDim, writer);
       
        count++;
        currentPercentage = (int) (100.0 * count / total);
        if(currentPercentage != displayPercentage)
        {
          displayPercentage = currentPercentage;
          JEXStatics.statusBar.setStatusText("Preparing ARFF Files: " + displayPercentage + "%");
        }
      }
     
      // Write each datapoint to a file
      JEXStatics.statusBar.setStatusText("Splitting ARFFs: 0%");
      Instance instance;
      Pair<DimensionMap,E> pair;
      count = 0;
      total = reader.dimTable.mapCount();
      displayPercentage = 0;
      while ((instance = reader.loader.m_ArffReader.readInstance(reader.structure)) != null)
      {
        if(canceler.isCanceled())
        {
          // Exit gracefully
          for (String splitDimValue : splitDim.dimValues)
          {
            JEXTableWriter writer = writers.get(splitDimValue);
            writer.close();
          }
          return null;
        }
        pair = reader.getPair(instance);
        DimensionMap map = pair.p1;
        JEXTableWriter theWriter = writers.get(map.get(splitDimName));
        theWriter.writeData(map, pair.p2);
       
        count++;
        currentPercentage = (int) (100.0 * count / total);
        if(currentPercentage != displayPercentage)
        {
          displayPercentage = currentPercentage;
          JEXStatics.statusBar.setStatusText("Splitting ARFF: " + displayPercentage + "%");
        }
      }
     
      // Close the writers and return the filePaths
      TreeMap<DimensionMap,String> filePaths = new TreeMap<DimensionMap,String>();
      JEXStatics.statusBar.setStatusText("Defragging ARFFs: 0%");
      count = 0;
      total = splitDim.size();
      displayPercentage = 0;
      for (String splitDimValue : splitDim.dimValues)
      {
        JEXTableWriter writer = writers.get(splitDimValue);
        writer.close();
        String path = JEXTableWriter.defrag(writer.getPath());
        filePaths.put(new DimensionMap(splitDimName + "=" + splitDimValue), path);
       
        count++;
        currentPercentage = (int) (100.0 * count / total);
        if(currentPercentage != displayPercentage)
        {
View Full Code Here

  }
 
  @SuppressWarnings("unchecked")
  protected <E> Pair<DimensionMap,E> getPair(Instance instance)
  {
    DimensionMap map = new DimensionMap();
    E value = null;
    for (int i = 0; i < this.structure.numAttributes() - 1; i++)
    {
      map.put(this.structure.attribute(i).name(), instance.stringValue(i));
    }
    if(this.isNumeric())
    {
      double val = instance.value(this.structure.numAttributes() - 1);
      if(Double.isNaN(val))
View Full Code Here

TOP

Related Classes of tables.DimensionMap

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.