Package healpix.essentials
Class Moc
java.lang.Object
healpix.essentials.Moc
Support for MOC algorithms.
- Author:
- Martin Reinecke
- Copyright:
- 2014-2015 Max-Planck-Society
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddPixel(int order, long p) voidaddPixelRange(int order, long p1, long p2) Adds a range of pixels at a given HEALPix order to the Moc.Returns the complement of this Moc.booleandegradedToOrder(int order, boolean keepPartialCells) Returns a Moc with degraded resolution.booleanstatic MocfromCompressed(byte[] data) static MocfromUniq(long[] u) static MocfromUniqRS(RangeSet ru) Returns the internal range set.inthashCode()intersection(Moc other) Returns a new Moc that contains the intersection of this Moc and "other".intmaxOrder()Returns the maximum HEALPix order necessary to describe the Moc exactly.intnranges()booleansubtraction(Moc other) Returns a new Moc that contains all parts of this Moc that are not contained in "other".byte[]long[]toUniq()toUniqRS()Returns a new Moc that contains the union of this Moc and "other".
- 
Constructor Details- 
Mocpublic Moc()Creates a new, empty Moc.
- 
MocCreates a new Moc, which is identical to "other".
- 
MocCreates a new Moc from the range set of NESTED pixels at the given order.
 
- 
- 
Method Details- 
getRangeSetReturns the internal range set.
- 
maxOrderpublic int maxOrder()Returns the maximum HEALPix order necessary to describe the Moc exactly.
- 
degradedToOrderReturns a Moc with degraded resolution.- Parameters:
- order- the maximum HEALPix order used for the result
- keepPartialCells- if true, partially filled cells will be included in the output Moc; if false, they will be ignored.
 
- 
addPixelRangepublic void addPixelRange(int order, long p1, long p2) Adds a range of pixels at a given HEALPix order to the Moc.- Parameters:
- order- the HEALPix order of the added pixels
- p1- the first pixel of the range
- p2- the one-after-last pixel of the range
 
- 
addPixelpublic void addPixel(int order, long p) 
- 
unionReturns a new Moc that contains the union of this Moc and "other".
- 
intersectionReturns a new Moc that contains the intersection of this Moc and "other".
- 
subtractionReturns a new Moc that contains all parts of this Moc that are not contained in "other".
- 
complementReturns the complement of this Moc.
- 
contains- Returns:
- true, if "other" is a subset of this Moc, else false.
 
- 
overlaps- Returns:
- true, if the intersection of this Moc and "other" is not empty.
 
- 
toUniqRS- Returns:
- A RangeSet containing all HEALPix pixels (in NUNIQ order) covered by this Moc. The result is well-formed in the sense that every pixel is given at its lowest possible HEALPix order.
 
- 
toUniqpublic long[] toUniq()
- 
fromUniqRS- Returns:
- A Moc built from the RangeSet of NUNIQ HEALPix pixels given in "ru". "ru" need not be well-formed.
 
- 
fromUniq
- 
toCompressed- Returns:
- A compressed representation of the Moc obtained by interpolative coding.
- Throws:
- Exception
 
- 
fromCompressed- Returns:
- A Moc built from the compressed representation given in "data".
- Throws:
- Exception
 
- 
equals
- 
hashCodepublic int hashCode()
- 
nrangespublic int nranges()
 
-