Package cds.healpix

# Class Range

java.lang.Object
cds.healpix.Range

public class Range extends Object
Defines an Hash Range at the deeper depth.

Author:
  F.-X. Pineau

## Field Summary

Fields
Modifier and Type
Field
Description
`final long`
`from`
Range lower bound (inclusive).
`long`
`to`
Range lower bound (exclusive).

## Constructor Summary

Constructors
Constructor
Description
`Range(long from, long to)`

## Method Summary

Modifier and Type
Method
Description
`void`
`toCells(CellSink sink)`
Transforms this range in a list of HEALPix cells that are added to the given `sink`.
`void`
`toCellsGeneralized(int dim, int absoluteDepthMax, CellSink sink)`
Transforms this range in a list of cells that are added to the given `sink`.
`void`
`toCellsWithKnowledge(CellSink sink, int depthMax, int twiceDD, long rangeLenMin, long mask)`
Same as `toCells` but with additional informations which are (see parameter list).

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### from

public final long from
Range lower bound (inclusive).

### to

public long to
Range lower bound (exclusive).

## Constructor Details

### Range

public Range(long from, long to)

## Method Details

### toCells

public void toCells(CellSink sink)
Transforms this range in a list of HEALPix cells that are added to the given `sink`. IMPORTANT: the order in which the cells are added follows the natural Z-order curve order!

Parameters:
  `sink` - object receiving each cell

### toCellsGeneralized

public void toCellsGeneralized(int dim, int absoluteDepthMax, CellSink sink)
Transforms this range in a list of cells that are added to the given `sink`. IMPORTANT: the order in which the cells are added follows the natural Z-order curve order!

Parameters:
  `dim` - the z-order curve dimension (2 for HEALPix, 1 for time, ...)
  `absoluteDepthMax` - max depth (29 for HEALPIX, ...)
  `sink` - object receiving each cell

### toCellsWithKnowledge

public void toCellsWithKnowledge(CellSink sink, int depthMax, int twiceDD, long rangeLenMin, long mask)
Same as `toCells` but with additional informations which are (see parameter list). This version may have better performances since a large part of the cells in a MOC are at the deepest MOC order.

Parameters:
  `sink` - object receiving each cell
  `depthMax` - the depth of the lower possible cell order in the Range (i.e. the MOC order)
  `twiceDD` - `(29 - depthMax) << 1`, provided not ot have to recompute it
  `rangeLenMin` - `1L << twiceDD`, provided not to have to recompute it
  `mask` - `3L << twiceDD`, provided not to have to recompute it