Package com.meapsoft

Examples of com.meapsoft.BasicHist


    public EDLFile compose()
    {
      // make a histogram of chunk lengths
      int bins = binsNum;
    int range = 25856;
      BasicHist hist = new BasicHist(bins,0,range);
   
        for (int i = 0; i < featFile.chunks.size(); i=i+1 ){
            //System.out.println(i);
            double len = Math.floor(((Chunk)featFile.chunks.get(i)).length * samplingRate);
      hist.add(Math.log(len)/Math.log(2));
      //System.out.println(i+" "+len+" "+((FeatChunk)featFile.chunks.get(i)).getFeatures()[0]);     
    }
   
   
    // find mode of histogram
    int currentValue = 0;
    int maxValue = 0;
    int maxValueBin =0;
    for (int i=0; i< bins; i++)
    {
      currentValue = hist.getValue(i);
      if (currentValue > maxValue)
      {
        maxValue = currentValue;
        maxValueBin = i;
      }
View Full Code Here


  public EDLFile compose()
  {
    // make a histogram of chunk lengths
    int bins = binsNum;
    int range = 25856;
    BasicHist hist = new BasicHist(bins, 0, range);

    for (int i = 0; i < featFile.chunks.size(); i = i + 1)
    {
      // System.out.println(i);
      double len = Math.floor(((Chunk) featFile.chunks.get(i)).length
          * samplingRate);
      hist.add(Math.log(len) / Math.log(2));
      // System.out.println(i+" "+len+"
      // "+((FeatChunk)featFile.chunks.get(i)).getFeatures()[0]);
    }

    // find mode of histogram
    int currentValue = 0;
    int maxValue = 0;
    int maxValueBin = 0;
    for (int i = 0; i < bins; i++)
    {
      currentValue = hist.getValue(i);
      if (currentValue > maxValue)
      {
        maxValue = currentValue;
        maxValueBin = i;
      }
View Full Code Here

TOP

Related Classes of com.meapsoft.BasicHist

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.