package jasext.jhplotserver;


import jas2.hist.HasScatterPlotData;
import jas2.hist.HasStatistics;
import jas2.hist.ScatterEnumeration;
import jas2.hist.Statistics;
import jhplot.P1D;

public class CopyOfRefP1D_2Dhisto extends Rebinnable2DHistogramDataWithType implements HasStatistics, HasScatterPlotData, Statistics {

	protected double[] x;
	protected double[] y;
	protected double   npoints;

	private P1D h;
	final private String type = "scatter";

	public CopyOfRefP1D_2Dhisto(P1D h) {
		
		super();
		 
		this.h = h;

		
		
		npoints=h.size();
		x = new double[h.size()];
		y = new double[h.size()];
		for (int i = 0; i < h.size(); i++) {
			x[i] = h.getX(i);
			y[i] = h.getY(i);
		}

	}

	public int getSize() {
		return h.size();
	}

	public double[][][] rebin(int xbins, double p2, double p3, int ybins, double p6, double p7, boolean p4, boolean p5, boolean p8)
	   {
	      
		   int nn= h.size();
	       double[][] newHeights = new double[2][nn];
	       double[][] newErrors = new double[2][nn];
	      
	       for (int i = 0; i = xmin && x[n] < xmax && y[n] >= ymin
							&& y[n] < ymax) {
						d[0] = x[n];
						d[1] = y[n];
						n++;
						return true;
					}
					n++;
				}
				return false;
			} else {
				if (n == npoints)
					return false;
				d[0] = x[n];
				d[1] = y[n];
				n++;
				return true;
			}

		}

		public void resetEndPoint() {
			// ??
		}

		public void restart() {
			n = 0;
		}

		private int n = 0;
		private boolean limits;
		private double ymin, ymax, xmin, xmax;
	}

	
	@Override
	public int getXBins() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int getYBins() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public boolean hasScatterPlotData() {
		// TODO Auto-generated method stub
		return false;
	}

}

 

Ads help maintain this website.