Package systole.processor.correlation

Examples of systole.processor.correlation.CorrelationResult


     */
    public List<CorrelationResult> qualify(Signal allSegments) {
        this.results = new ArrayList<CorrelationResult>();
        Iterator<Segment> itSegments = allSegments.getSegments().iterator();
        int pos = 0;
        CorrelationResult result;
        while (itSegments.hasNext()) {
            result = new CorrelationResult(pos, this.correlation.correlate(itSegments.next()));
            pos++;
            this.results.add(result);
        }
        Collections.sort(this.results);
        Collections.reverse(this.results);
View Full Code Here


     *
     */
    private void loadResults(List<CorrelationResult> segments) {
        if (segments != null) {
            Iterator<CorrelationResult> it = segments.iterator();
            CorrelationResult currentSegment;
            Segment segment;
            XYChart chart;
            int currentPos;
            String name;
            ChartPanel pnl;
            if ((x == 0) || (y == 0)) {
                x = this.jPnlResultCenter.getWidth() / 4;
                y = this.jPnlResultCenter.getHeight() - 15;
            }
            Dimension dim = new Dimension(x, y);
            DecimalFormat format = new DecimalFormat("####.00");
            while (it.hasNext()) {
                currentSegment = it.next();
                //currentPos = this.controller.getAnalysis().getAllSegments().getSegments().indexOf(currentSegment);
                segment = this.controller.getAnalysis().getAllSegments().getSegments().elementAt(currentSegment.getSegmentNumber());
                name = "Segmento: " + currentSegment.getSegmentNumber();
                chart = new XYChart(name);
                chart.addSeries(name, segment.toDoubleArray(), 1);
                chart.setShowLegend(false);
                chart.setShowTitle(false);
                pnl = chart.plot();
                pnl.setMouseZoomable(false);
                pnl.setPopupMenu(null);
                BigDecimal correlation = currentSegment.getCorrelation().multiply(new BigDecimal(100));
                String hint = "Grado de correlación: " + format.format(correlation);
                JPnlItemAutoSelection img = new JPnlItemAutoSelection(currentSegment.getSegmentNumber(), pnl, this, hint);
                img.setPreferredSize(dim);
                img.revalidate();
                this.jPnlResultCenter.add(img);
                this.items.add(img);
            }
View Full Code Here

TOP

Related Classes of systole.processor.correlation.CorrelationResult

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.