/** * Constructs a sequence view with specified values f(x). * Uses default sampling of x = 0, 1, 2, .... * @param f array of sampled function values f(x). */ public SequenceView(float[] f) { set(f); }
/** * Sets the color used to paint the sequence. * The default color is the tile foreground color. * That default is used if the specified color is null. * @param color the color; null, for tile foreground color. */ public void setColor(Color color) { if (!equalColors(_color,color)) { _color = color; repaint(); } }
Projector bhp = getBestHorizontalProjector(); Projector bvp = getBestVerticalProjector(); Projector hp = getHorizontalProjector(); Projector vp = getVerticalProjector(); Transcaler ts = getTranscaler(); double rbx = ballRadiusX()*hp.getScaleRatio(bhp); double rby = ballRadiusY()*vp.getScaleRatio(bvp);
double rbx = ballRadiusX(); double rby = ballRadiusY(); Projector bhp = new Projector(xmin,xmax,rbx,1.0-rbx); Projector bvp = new Projector(fmax,fmin,rby,1.0-rby); setBestProjectors(bhp,bvp);
/** * Adds a sequence view with specified sampling and values f(x). * @param irow the tile row index. * @param icol the tile column index. * @param sx the sampling of the variable x. * @param f array of sampled function values f(x). * @return the sequence view. */ public SequenceView addSequence(int irow, int icol, Sampling sx, float[] f) { SequenceView sv = new SequenceView(sx,f); return addSequenceView(irow,icol,sv); }
/** * Adds a sequence view with specified values f(x). * Uses default sampling of x = 0, 1, 2, .... * @param irow the tile row index. * @param icol the tile column index. * @param f array of sampled function values f(x). * @return the sequence view. */ public SequenceView addSequence(int irow, int icol, float[] f) { SequenceView sv = new SequenceView(f); return addSequenceView(irow,icol,sv); }
/** * Constructs a sequence view with specified sampling and values f(x). * @param sx the sampling of the variable x. * @param f array of sampled function values f(x). */ public SequenceView(Sampling sx, float[] f) { set(sx,f); }
/** * Sets default sampling and specified function values f(x). * The default sampling is x = 0, 1, 2, .... * @param f array of sampled function values f(x). */ public void set(float[] f) { set(new Sampling(f.length),f); }
private void updateViews() { Real1 h = computeImpulseResponse(); Real1[] ap = computeAmplitudeAndPhaseResponses(); Real1 a = ap[0]; Real1 p = ap[1]; if (_hView==null) { _hView = _plotPanelH.addSequence(h.getSampling(),h.getValues()); _aView = _plotPanelAP.addPoints(0,0,a.getSampling(),a.getValues()); _pView = _plotPanelAP.addPoints(1,0,p.getSampling(),p.getValues()); } else { _hView.set(h.getSampling(),h.getValues()); _aView.set(a.getSampling(),a.getValues()); _pView.set(p.getSampling(),p.getValues()); } }