Package com.mockturtlesolutions.snifflib.datatypes

Examples of com.mockturtlesolutions.snifflib.datatypes.DblParamSet


 
 
  public ComplexBufferPredictor()
  {
    this.defaultValue = new Double(0.9);
    this.fittingParams = new DblParamSet();
    this.bufferComponents = new HashMap();
    this.checksum = null;
  }
View Full Code Here


  public Vector getGeneratorParameters()
  {
    //System.out.println("Running getGeneratorParameters of DefaultComplexBufferPredictorGenerator");
    Vector outSet = new Vector();
   
    DblParamSet pars = null;
   
    String descriptor = "parameter";
   
    pars = this.currentEstimates;
    //pars.show("pars");
   
    String[] params = pars.parameterSet();
    //if (params.length == 0)
    //{
      //System.out.println("There are no parameters.");
    //}
   
    for (int j=0;j<params.length;j++)
    {
      DblMatrix val = pars.getParam(params[j]);
      outSet.add(new PersistentParameter(params[j],descriptor,val.getDoubleAt(0).toString()));
    }
   
    descriptor = "prior";
    pars = this.priorParameters;
    params = pars.parameterSet();
   
    for (int j=0;j<params.length;j++)
    {
      DblMatrix val = pars.getParam(params[j]);
      outSet.add(new PersistentParameter(params[j],descriptor,val.getDoubleAt(0).toString()));
    }
   
    descriptor = "mixing";
    pars = this.mixingParameters;
    params = pars.parameterSet();
   
    for (int j=0;j<params.length;j++)
    {
      DblMatrix val = pars.getParam(params[j]);
      outSet.add(new PersistentParameter(params[j],descriptor,val.getDoubleAt(0).toString()));
    }
   
    descriptor = "configuration";
    HashMap configmap = this.configurationMap;
View Full Code Here

            proposalEditor.setVisible(false);
             
          }
        });
   
    DblParamSet temp = new DblParamSet();
    temp.setParam("Hey",new DblMatrix(1.0));
    temp.setParam("There",new DblMatrix(2.0));
   
    this.priorEditor.setParamSet(temp);
       
    //this.parameterEditor 
   
View Full Code Here

//     priorEditor.setParamSet(actualGenerator.getPriorParameters());
//     proposalEditor.setParamSet(actualGenerator.getMixingParameters());
//    
   
   
    DblParamSet pars = null;
    DblParamSet pars2 = null;
    Vector persistentParams = null;
    String descriptor = null;
   
    descriptor = "configuration";
    persistentParams = backingBuffer.getGeneratorParametersForDescriptor(descriptor);
View Full Code Here

   
    //BufferStorage backingBuffer =  conn.getBuffer(repos,buffName);
   
   
    String[] pnames;
    DblParamSet pars = null;
    String descriptor = "parameter";
    pars = parameterEditor.getParamSet();
    pnames = pars.parameterSet();
    for (int j=0;j<pnames.length;j++)
    {
      backingBuffer.addGeneratorParameter(pnames[j],descriptor);
      //backingBuffer.setGeneratorParameterDescriptor(pnames[j],descriptor);
      backingBuffer.setGeneratorParameterValue(pnames[j],descriptor,pars.getParam(pnames[j]).getDoubleAt(0).toString());
     
    }
   
    descriptor = "prior";
    pars = priorEditor.getParamSet();
    pnames = pars.parameterSet();
    for (int j=0;j<pnames.length;j++)
    {
      backingBuffer.addGeneratorParameter(pnames[j],descriptor);
      //backingBuffer.setGeneratorParameterDescriptor(pnames[j],descriptor);
      backingBuffer.setGeneratorParameterValue(pnames[j],descriptor,pars.getParam(pnames[j]).getDoubleAt(0).toString());
     
    }
   
    descriptor = "mixing";
    pars = proposalEditor.getParamSet();
    pnames = pars.parameterSet();
    for (int j=0;j<pnames.length;j++)
    {
      backingBuffer.addGeneratorParameter(pnames[j],descriptor);
      //backingBuffer.setGeneratorParameterDescriptor(pnames[j],descriptor);
      backingBuffer.setGeneratorParameterValue(pnames[j],descriptor,pars.getParam(pnames[j]).getDoubleAt(0).toString());
     
    }
   
    descriptor = "configuration";
    Set pset = this.configurationMap.keySet();
View Full Code Here

    this.actualGenerator.setMixingParameters(X);
  }
 
  public void removeGeneratorParameter(String parametername,String descriptor)
  {
    DblParamSet pars = null;
   
    if (descriptor.equals("parameter"))
    {
      pars = parameterEditor.getParamSet();
      pars.remove(parametername);
      pars = null;
     
      pars = currentEditor.getParamSet();
      pars.remove(parametername);
      pars = null;
    }
   
    if (descriptor.equals("prior"))
    {
      pars = priorEditor.getParamSet();
      pars.remove(parametername);
      pars = null;
    }
   
    if (descriptor.equals("mixing"))
    {
      pars = proposalEditor.getParamSet();
      pars.remove(parametername);
      pars = null;
    }
   
   
    if (descriptor.equals("configuration"))
View Full Code Here

  }
 
  public void addGeneratorParameter(String parametername,String descriptor)
  {
   
    DblParamSet pars = null;
   
    this.actualGenerator.addGeneratorParameter(parametername,descriptor);
   
    if (descriptor.equals("parameter"))
    {
      //System.out.println("Adding parameter "+parametername);
      pars = parameterEditor.getParamSet();
      pars.setParam(parametername,new DblMatrix(0.0));
      parameterEditor.setParamSet(pars);
     
      pars = currentEditor.getParamSet();
      pars.setParam(parametername,new DblMatrix(0.0));
      currentEditor.setParamSet(pars);
    }
    else if (descriptor.equals("prior"))
    {
      //System.out.println("Adding prior "+parametername);
      pars = priorEditor.getParamSet();
      pars.setParam(parametername,new DblMatrix(0.0));
      priorEditor.setParamSet(pars);
    }
    else if (descriptor.equals("mixing"))
    {
      //System.out.println("Adding mixing "+parametername);
      pars = proposalEditor.getParamSet();
      pars.setParam(parametername,new DblMatrix(0.0));
      proposalEditor.setParamSet(pars);
    }
    else if (descriptor.equals("configuration"))
    {
      //System.out.println("Adding configuration "+parametername);
View Full Code Here

    return(this.actualGenerator.getDescriptorOrdering());
  }
 
  public void setGeneratorParameterValue(String parametername,String descriptor,String val)
  {
    DblParamSet pars = null;
   
    this.actualGenerator.setGeneratorParameterValue(parametername,descriptor,val);
   
    if (descriptor.equals("parameter"))
    {
   
      System.out.println("Setting parameter "+parametername+" to "+val);
     
      pars = currentEditor.getParamSet();
      pars.setParam(parametername,new DblMatrix(new Double(val)));
      currentEditor.setParamSet(pars);
     
      pars = parameterEditor.getParamSet();
      pars.setParam(parametername,new DblMatrix(new Double(val)));
      parameterEditor.setParamSet(pars);
      //pars.show("Current parameter estimates 1");
     
     
      //pars.show("Current parameter estimates 2");
     
     
      currentEditor.repaint();
      parameterEditor.repaint();
     
      //parameterEditor.getParamSet().show("After setting "+parametername+" parameter Set is:");
     
    }
   
    if (descriptor.equals("prior"))
    {
      pars = priorEditor.getParamSet();
      pars.setParam(parametername,new DblMatrix(new Double(val)));
      priorEditor.setParamSet(pars);
     
      priorEditor.repaint();
    }
   
    if (descriptor.equals("mixing"))
    {
      pars = proposalEditor.getParamSet();
      pars.setParam(parametername,new DblMatrix(new Double(val)));
      proposalEditor.setParamSet(pars);
     
      proposalEditor.repaint();
     
    }
View Full Code Here

        public CbObjective(BufferSolution sol)
        {
                //System.out.println("Creating Objectibe");
                this.bufferSolution = sol;
                this.Params = new DblParamSet();
                this.Params.Dblput("pH",4.5);
        }
View Full Code Here

    this.repos = reposIn;
    this.AMatrix = A;
    this.BVector = B;
                //System.out.println("Creating Objectibe");
                this.bufferSolutions = buffsols;
    this.Params = new DblParamSet();
    this.pH = pHin;
    this.desiredIonicStr = desired_ionicStr;
   
   
    BufferSolution sol;
View Full Code Here

TOP

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

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.