Package com.mockturtlesolutions.snifflib.datatypes

Examples of com.mockturtlesolutions.snifflib.datatypes.DblMatrix


        subsamples = this.data.getTitrationSubsamples(exp);
        for (int j=0;j<subsamples.size();j++)
        {
       
          ssid = (String)subsamples.get(j);
          this.declareParameter("Cxs_"+this.data.getNickname()+"_"+exp+"_"+ssid,new DblMatrix(1.0));
        }
       
        //Every experiment can have slightly different pKa/pKb.
        if (this.hasBuffferCoefficientData())
        {
          DblMatrix[] pKa = this.parseKa(this.data.getAveragepKa());
          DblMatrix[] pKb = this.parseKa(this.data.getAveragepKb());
          for (int ion=0;ion<pKa.size();ion++)
          {
            for (int m=0;m<pKa[ion].getN();m++)
            {
              this.declareParameter("pKax_"+this.data.getNickname()+"_"+exp+"_"+ion+"_"+m);
              this.declareParameter("pKbx_"+this.data.getNickname()+"_"+exp+"_"+ion+"_"+m);
            }
          }
        }
      }
    }
   
   
    BufferSolution everythingInThere = new BufferSolution();
    everythingInThere.initialize();
    String exp,ssid,obs,val;
   
    Vector expnames;
    Vector subsamples;
    Vector obsnums;

    expnames = this.data.getExperimentNames();
    for (int i=0;i<expnames.size();i++)
    {
      exp = (String)expnames.get(i);
     
      subsamples = this.data.getContainedSubsampleIDs(exp);
      for (int j=0;j<subsamples.size();j++)
      {
       
        ssid = (String)subsamples.get(j);
        obsnums = this.data.getContainedObservationNumbers(exp,ssid);
        for (int k=0;k<obsnums.size();k++)
        {
          obs = (String)obsnums.get(k);
          everythingInThere.add(this.data.getContainedNickname(exp,ssid,obs),new DblMatrix(1.0));
        }
      }
    }
  }
View Full Code Here


        {
          obs = (String)obsnums.get(j);
          if (this.LATENT_PH)
          {
            val = this.data.getpH(exp,ssid,obs);
            this.declareParameter("pHxso_"+exp+"_"+ssid+"_"+obs,new DblMatrix(new Double(val)));
          }
         
          if (this.LATENT_ALIQUOT_VOLUMES)
          {
            val = this.data.getVolumeAdded(exp,ssid,obs);
            this.declareParameter("vxso_"+exp+"_"+ssid+"_"+obs,new DblMatrix(new Double(val)));
          }
         
          //While we're at it record the titrants being added here.
          subsampleTitrants.add(this.data.getTitrant(exp,ssid,obs));
        }
       
       
        if (this.LATENT_TITRANT_CONCENTRATIONS)
        {
          //Since we assume each titrant stock is mixed for each subsample we allow
          //for a separate stock titrant concentration (relative to 1M)
          //on each subsample (but not on each observation).  This concentration is multiplied
          //by the recorded concentration.  As such it represents the proportion of a 1M
          //stock.
         
          Iterator iter = subsampleTitrants.iterator();
          String titrant;
          while (iter.hasNext())
          {
            titrant = (String)iter.next();
            this.declareParameter("cxs_"+titrant+"_"+exp+"_"+ssid,new DblMatrix(1.0));
          }
        }
      }
    }
  }
View Full Code Here

    //Iterator iter = bufs.iterator();
    String[] names = m.getComponents();
   
   
    String name;
    DblMatrix concentration;
    //while (iter.hasNext())
    for (int j=0;j<names.length;j++)
    {
      //name = (String)iter.next();
      name = names[j];
View Full Code Here

   
   
    if (this.fittingParams != null)
    { 
      //System.out.println("Here now");
      DblMatrix nextpKa;
   
      for (int i=0;i<saltType.length;i++)
      {
        //pKa[i].show("pKa["+i+"]");
        for (int k=0;k<pKa[i].getN();k++)
View Full Code Here

    {
      pKa = comp.getpKa();

      if (this.fittingParams != null)
      { 
        DblMatrix nextpKa;

        for (int i=0;i<saltType.length;i++)
        {

          for (int k=0;k<pKa[i].getN();k++)
View Full Code Here

    if (comp == null)
    {
      throw new RuntimeException("The component "+buffer+" is not contained in this buffer.");
    }
   
    DblMatrix OUT = comp.getConcentration();
   
    if (OUT == null)
    {
      throw new RuntimeException("The concentration of the component "+buffer+" is null.");
    }
View Full Code Here

  public HashMap Cb(DblMatrix pH)
  {
    int[] reps = new int[2];
    reps[0] = pH.getN();
    reps[1] = 1;
    DblMatrix val = DblMatrix.replicate(this.defaultValue,reps);
   
    HashMap out = new HashMap();
    out.put("total",val);
    return(out)
  }
View Full Code Here

  public HashMap Cb(DblMatrix pH,boolean partial)
  {
    int[] reps = new int[2];
    reps[0] = pH.getN();
    reps[1] = 1;
    DblMatrix val = DblMatrix.replicate(this.defaultValue,reps);
   
    HashMap out = new HashMap();
    out.put("total",val);
    return(out);
  }
View Full Code Here

  public HashMap buffCapEval(DblMatrix pH)
  {
    int[] reps = new int[2];
    reps[0] = pH.getN();
    reps[1] = 1;
    DblMatrix val = DblMatrix.replicate(this.defaultValue,reps);
   
    HashMap out = new HashMap();
    out.put("total",val);
    return(out);
  }
View Full Code Here

  public HashMap buffCapEval(DblMatrix pH,boolean partial)
  {
    int[] reps = new int[2];
    reps[0] = pH.getN();
    reps[1] = 1;
    DblMatrix val = DblMatrix.replicate(this.defaultValue,reps);
   
    HashMap out = new HashMap();
    out.put("total",val);
    return(out);
  }
View Full Code Here

TOP

Related Classes of com.mockturtlesolutions.snifflib.datatypes.DblMatrix

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.