uk.ac.starlink.ttools.plot2.layer
Class Pixel1dPlotter.BinArray

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.layer.Pixel1dPlotter.BinArray
Enclosing class:
Pixel1dPlotter<S extends Style>

public static class Pixel1dPlotter.BinArray
extends Object

Data object storing counts per pixel.


Method Summary
 int getBinIndex(int gx)
          Returns the bin index (index into this object's bins_ array) for a given pixel index.
 double[] getBins()
          Returns the array of pixel-width bins containing the counts accumulated by this object.
 int getGraphicsCoord(int index)
          Returns the pixel index for a given bin index.
 double getLowerSum(boolean flip)
          Returns the sum of all the counts at one end of the axis not captured by this object's bins array.
 double getSum()
          Returns the total sum of values accumulated into this bin array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBins

public double[] getBins()
Returns the array of pixel-width bins containing the counts accumulated by this object.

Returns:
array of count values, one per pixel

getSum

public double getSum()
Returns the total sum of values accumulated into this bin array.

Returns:
running total

getLowerSum

public double getLowerSum(boolean flip)
Returns the sum of all the counts at one end of the axis not captured by this object's bins array.

Parameters:
flip - false for low-coordinate end, true for high-coordinate end

getBinIndex

public int getBinIndex(int gx)
Returns the bin index (index into this object's bins_ array) for a given pixel index.

Parameters:
gx - pixel index
Returns:
bin index

getGraphicsCoord

public int getGraphicsCoord(int index)
Returns the pixel index for a given bin index.

Parameters:
index - bin index
Returns:
pixel index


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.