public GaussianDensityFunction(double[] mean,double[] variance){
  this.mean=mean;
  if (mean.length != variance.length) {
    log.warning("different lengths for mean and variance");
  }
  stdDev=new double[variance.length];
  for (int i=0; i < variance.length; i++) {
    if (variance[i] < 0) {
      log.warning("variance should not be negative, but is : " + variance);
    }
    stdDev[i]=Math.sqrt(variance[i]);
  }
  this.variance=variance;
}

public GaussianDensityFunction ( double [ ] mean , double [ ] variance ) { this . mean = mean ; if ( mean . length != variance . length ) { log . warning ( "different lengths for mean and variance" ) ; } stdDev = new double [ variance . length ] ; for ( int i = 0 ; i < variance . length ; i ++ ) { if ( variance [ i ] < 0 ) { log . warning ( "variance should not be negative, but is : " + variance ) ; } stdDev [ i ] = Math . sqrt ( variance [ i ] ) ; } this . variance = variance ; }
creates a new density function with the given mean and variance vector . only diagonal coveriance are currently supported
