Examples of RangePartitioner


Examples of com.pcmsolutions.util.RangePartitioner

    public static boolean autoMapGroupKeyWin(PresetContext pc, Integer preset, Integer group) throws PresetEmptyException, NoSuchPresetException, NoSuchGroupException, NoSuchContextException {
        return autoMapVoiceKeyWin(pc, preset, pc.getVoiceIndexesInGroup(preset, group));
    }

    public static boolean autoMapZoneKeyWin(ContextEditablePreset.EditableVoice.EditableZone[] zones) throws PresetEmptyException, NoSuchPresetException {
        RangePartitioner rp = new RangePartitioner(0, 127);
        try {
            for (int i = 0; i < zones.length; i++)
                rp.addPoint(zones[i].getZoneParams(new Integer[]{ID.origKey})[0].intValue());
            RangePartitioner.Point[] points = rp.getPoints();
            for (int i = 0; i < zones.length; i++) {
                zones[i].setZonesParam(ID.keyLow, IntPool.get(0));
                zones[i].setZonesParam(ID.keyHigh, IntPool.get(127));
                zones[i].setZonesParam(ID.keyLow, IntPool.get(points[i].getLow()));
                zones[i].setZonesParam(ID.keyHigh, IntPool.get(points[i].getHigh()));
View Full Code Here

Examples of com.pcmsolutions.util.RangePartitioner

        }
        return false;
    }

    public static boolean autoMapVoiceKeyWin(ContextEditablePreset.EditableVoice[] voices) throws PresetEmptyException, NoSuchPresetException {
        RangePartitioner rp = new RangePartitioner(0, 127);
        try {
            for (int i = 0; i < voices.length; i++) {
                int nz = voices[i].numZones();
                if (nz > 0)
                    for (int z = 0; z < nz; z++)
                        rp.addPoint(voices[i].getEditableZone(IntPool.get(z)).getZoneParams(new Integer[]{ID.origKey})[0].intValue());
                else
                    rp.addPoint(voices[i].getVoiceParams(new Integer[]{ID.origKey})[0].intValue());
            }
            RangePartitioner.Point[] points = rp.getPoints();
            int rpi = 0;
            for (int i = 0; i < voices.length; i++) {
                voices[i].setVoicesParam(ID.keyLow, IntPool.get(0));
                voices[i].setVoicesParam(ID.keyHigh, IntPool.get(127));
View Full Code Here

Examples of com.pcmsolutions.util.RangePartitioner

        }
        return false;
    }

    public static boolean autoMapVoiceKeyWin(final PresetContext pc, final Integer preset, Integer[] voices) throws PresetEmptyException, NoSuchPresetException, NoSuchContextException {
        RangePartitioner rp = new RangePartitioner(0, 127);
        voices = (Integer[]) voices.clone();
        try {
            for (int i = 0; i < voices.length; i++) {
                int nz = pc.numZones(preset, voices[i]);
                if (nz > 0)
                    for (int z = 0; z < nz; z++)
                        rp.addPoint(pc.getZoneParams(preset, voices[i], IntPool.get(z), new Integer[]{ID.origKey})[0].intValue());
                else
                    rp.addPoint(pc.getVoiceParams(preset, voices[i], new Integer[]{ID.origKey})[0].intValue());
            }
            RangePartitioner.Point[] points = rp.getPoints();
            int rpi = 0;
            for (int i = 0; i < voices.length; i++) {
                pc.setVoicesParam(preset, new Integer[]{voices[i]}, ID.keyLow, new Integer[]{IntPool.get(0)});
                pc.setVoicesParam(preset, new Integer[]{voices[i]}, ID.keyHigh, new Integer[]{IntPool.get(127)});
                int nz = pc.numZones(preset, voices[i]);
View Full Code Here

Examples of org.apache.accumulo.core.client.mapreduce.lib.partition.RangePartitioner

  }
 
  private RangePartitioner prepPartitioner(int numSubBins) {
    JobContext job = new JobContext(new Configuration(), new JobID());
    RangePartitioner.setNumSubBins(job, numSubBins);
    RangePartitioner rp = new RangePartitioner();
    rp.setConf(job.getConfiguration());
    return rp;
  }
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.