Examples of SampleData


Examples of com.spatial4j.core.io.sample.SampleData

  }

  protected List<Document> getDocuments(Iterator<SampleData> sampleData) {
    List<Document> documents = new ArrayList<Document>();
    while (sampleData.hasNext()) {
      SampleData data = sampleData.next();
      Document document = new Document();
      document.add(new StringField("id", data.id, Field.Store.YES));
      document.add(new StringField("name", data.name, Field.Store.YES));
      Shape shape = ctx.readShape(data.shape);
      shape = convertShapeFromGetDocuments(shape);
View Full Code Here

Examples of com.spatial4j.core.io.sample.SampleData

  }

  protected List<Document> getDocuments(Iterator<SampleData> sampleData) {
    List<Document> documents = new ArrayList<Document>();
    while (sampleData.hasNext()) {
      SampleData data = sampleData.next();
      Document document = new Document();
      document.add(new StringField("id", data.id, Field.Store.YES));
      document.add(new StringField("name", data.name, Field.Store.YES));
      Shape shape = ctx.readShape(data.shape);
      shape = convertShapeFromGetDocuments(shape);
View Full Code Here

Examples of org.open2jam.parsers.utils.SampleData

      else if (ext.equals(".ogg")) t = SampleData.Type.OGG;
      else if (ext.equals(".mp3")) t = SampleData.Type.MP3;
      else { //not a music file so continue
          continue;
      }
      samples.put(entry.getKey(), new SampleData(new FileInputStream(f), t, f.getName()));
        }
    }
      } catch (IOException ex) {
    Logger.global.log(Level.SEVERE, "{0}", ex);
      }
View Full Code Here

Examples of org.open2jam.parsers.utils.SampleData

    case 16: M30_xor(sample_data, mask_nami); break;
    case 32: M30_xor(sample_data, mask_0412); break;
    default: Logger.global.log(Level.WARNING, "Unknown encryption flag({0}) !", encryption_flag);
      }

            SampleData audioData = new SampleData(new ByteArrayInputStream(sample_data), SampleData.Type.OGG, sample_name);
            int value = ref;
            if(codec_code == 0){
                value = 1000 + ref;
            }
            else if(codec_code != 5){
View Full Code Here

Examples of org.open2jam.parsers.utils.SampleData

           buffer = ByteBuffer.allocateDirect(buf.length);
           buffer.put(buf);
           buffer.flip();

           SampleData audioData = new SampleData(new ByteBufferInputStream(buffer), header, sample_name);
           samples.put(sample_id, audioData);
           sample_id++;
       }
       sample_id = 1000; // ogg samples use id 1000~?
       while(file_offset < filesize) // OGG data
       {
           buffer = f.getChannel().map(java.nio.channels.FileChannel.MapMode.READ_ONLY, file_offset, 36);
           buffer.order(java.nio.ByteOrder.LITTLE_ENDIAN);
           file_offset += 36;

           byte[] byte_name = new byte[32];
           buffer.get(byte_name);
     String sample_name = ByteHelper.toString(byte_name);
     if(sample_name.lastIndexOf(".") < 0) sample_name += ".ogg";
    
           int sample_size = buffer.getInt();

           if(sample_size == 0){ sample_id++; continue; }

           buffer = f.getChannel().map(java.nio.channels.FileChannel.MapMode.READ_ONLY, file_offset, sample_size);
           buffer.order(java.nio.ByteOrder.LITTLE_ENDIAN);
           file_offset += sample_size;

           SampleData audioData = new SampleData(new ByteBufferInputStream(buffer), SampleData.Type.OGG, sample_name);
           samples.put(sample_id, audioData);
           sample_id++;
       }

       return samples;
View Full Code Here

Examples of org.open2jam.parsers.utils.SampleData

      else if (ext.equals(".ogg")) t = SampleData.Type.OGG;
      else if (ext.equals(".mp3")) t = SampleData.Type.MP3;
      else { //not a music file so continue
          continue;
      }
      samples.put(entry.getKey(), new SampleData(new FileInputStream(f), t, f.getName()));
      break;
        }
    }
      } catch (IOException ex) {
    Logger.global.log(Level.SEVERE, "{0}", ex);
View Full Code Here

Examples of org.open2jam.parsers.utils.SampleData

        // get the chart sound samples
  sounds = new HashMap<Integer, Sound>();
        for(Entry<Integer, SampleData> entry : chart.getSamples().entrySet())
        {
            SampleData sampleData = entry.getValue();
            try {
                Sound sound = soundSystem.load(sampleData);
                sounds.put(entry.getKey(), sound);
            } catch (SoundSystemException ex) {
                java.util.logging.Logger.getLogger(Render.class.getName()).log(Level.SEVERE, "{0}", ex);
View Full Code Here

Examples of statechum.analysis.learning.experiments.PairSelection.PairQualityLearner.SampleData

          int genScore = actualAutomaton.pairscores.computePairCompatibilityScore_general(null, constructPairsToMergeBasedOnSetsToMerge(actualAutomaton.transitionMatrix.keySet(),verticesToMergeBasedOnInitialPTA), verticesToMerge);
          assert genScore >= 0;
          actualAutomaton = MergeStates.mergeCollectionOfVertices(actualAutomaton, null, verticesToMerge);
        }     
       
        SampleData dataSample = new SampleData(null,null);
        //dataSample.difference = new DifferenceToReferenceDiff(0, 0);
        //dataSample.differenceForReferenceLearner = new DifferenceToReferenceDiff(0, 0);
        long inconsistencyActual = MarkovClassifier.computeInconsistency(actualAutomaton, m, checker,false);
       
        VertID rejectVertexID = null;
View Full Code Here

Examples of statechum.analysis.learning.experiments.PairSelection.PairQualityLearner.SampleData

          int genScore = actualAutomaton.pairscores.computePairCompatibilityScore_general(null, constructPairsToMergeBasedOnSetsToMerge(actualAutomaton.transitionMatrix.keySet(),verticesToMergeBasedOnInitialPTA), verticesToMerge);
          assert genScore >= 0;
          actualAutomaton = MergeStates.mergeCollectionOfVertices(actualAutomaton, null, verticesToMerge);
        }     
       
        SampleData dataSample = new SampleData(null,null);
        //dataSample.difference = new DifferenceToReferenceDiff(0, 0);
        //dataSample.differenceForReferenceLearner = new DifferenceToReferenceDiff(0, 0);
        long inconsistencyActual = MarkovClassifier.computeInconsistency(actualAutomaton, m, checker,false);
       
        VertID rejectVertexID = null;
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.