Examples of ConstantFunction


Examples of fork.lib.math.algebra.elementary.function.v1.polynomial.ConstantFunction

* @param sigma   standard deviation
* @return  
*/
public FunctionV1 kernelDensityEstimation(double sigma){
    try{
        FunctionV1 fn= new ConstantFunction(0);
        Iterator<Double> it= cs.keySet().iterator();
        while(it.hasNext()){
            Double v= it.next();
            Integer f= cs.get(v);
            double coeff= (double) f.intValue()/size();
            fn= fn.add( (new NormalDistribution( v.doubleValue(), sigma)).
                    multiply(new ConstantFunction(coeff)) );
        }
        return fn;
    }catch(FunctionException e){
        e.printStackTrace();
        return null;
View Full Code Here

Examples of fork.lib.math.algebra.elementary.function.v1.polynomial.ConstantFunction

* @param coeffs
* @return
* @throws FunctionException
*/
public static double logLikelihood(Distribution data, ArrayList<DistributionFunction> distrs, ArrayList<Double> coeffs) throws FunctionException{
    FunctionV1 fn= new ConstantFunction(0);
    for( int i=0; i<distrs.size(); i++ ){
        fn = fn.add( distrs.get(i).multiply(new ConstantFunction(coeffs.get(i))) );
    }
    return data.logLikelihood(fn);
}
View Full Code Here

Examples of org.teiid.query.function.aggregate.ConstantFunction

                        functions[i] = filter;
                  }
                    functions[i].setExpressionIndex(index);
                }
            } else {
                functions[i] = new ConstantFunction();
                functions[i].setExpressionIndex(this.collectedExpressions.indexOf(symbol));
            }
            functions[i].initialize(outputType, inputType);
        }
    }
View Full Code Here

Examples of util.ConstantFunction

        }
        arg=Arg.NONE;
      }
    }
    long seed=0L;
    ConstantFunction t=new ConstantFunction(temp);
    IsingDynamic d=new GlauberDynamic(t, seed);
    if (dynamic.toLowerCase().startsWith("k")){
      d=new KawasakiDynamic(t, seed);
    }else if (dynamic.toLowerCase().startsWith("g")){
      d=new GlauberDynamic(t, seed);
View Full Code Here

Examples of util.ConstantFunction

          System.exit(0);
        }
        arg=Arg.NONE;
      }
    }
    Function dt=new ConstantFunction(deltaT);
    if (!d3){
      Potential<XYVector> potential;
      if (pot.toLowerCase().startsWith("l")){
        potential=new LennardJonesPotential<XYVector>(particles);
      }else{
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.