public class Moc extends Object
Constructor and Description |
---|
Moc()
Creates a new, empty Moc.
|
Moc(Moc other)
Creates a new Moc, which is identical to "other".
|
Moc(RangeSet rs2,
int order)
Creates a new Moc from the range set of NESTED pixels at the given order.
|
Modifier and Type | Method and Description |
---|---|
void |
addPixel(int order,
long p) |
void |
addPixelRange(int order,
long p1,
long p2)
Adds a range of pixels at a given HEALPix order to the Moc.
|
Moc |
complement()
Returns the complement of this Moc.
|
boolean |
contains(Moc other) |
Moc |
degradedToOrder(int order,
boolean keepPartialCells)
Returns a Moc with degraded resolution.
|
boolean |
equals(Object obj) |
static Moc |
fromCompressed(byte[] data) |
static Moc |
fromUniq(long[] u) |
static Moc |
fromUniqRS(RangeSet ru) |
RangeSet |
getRangeSet()
Returns the internal range set.
|
int |
hashCode() |
Moc |
intersection(Moc other)
Returns a new Moc that contains the intersection of this Moc and "other".
|
int |
maxOrder()
Returns the maximum HEALPix order necessary to describe the Moc exactly.
|
int |
nranges() |
boolean |
overlaps(Moc other) |
Moc |
subtraction(Moc other)
Returns a new Moc that contains all parts of this Moc that are not
contained in "other".
|
byte[] |
toCompressed() |
long[] |
toUniq() |
RangeSet |
toUniqRS() |
Moc |
union(Moc other)
Returns a new Moc that contains the union of this Moc and "other".
|
public Moc()
public Moc(Moc other)
public Moc(RangeSet rs2, int order)
public RangeSet getRangeSet()
public int maxOrder()
public Moc degradedToOrder(int order, boolean keepPartialCells)
order
- the maximum HEALPix order used for the resultkeepPartialCells
- if true, partially filled cells will be included
in the output Moc; if false, they will be ignored.public void addPixelRange(int order, long p1, long p2)
order
- the HEALPix order of the added pixelsp1
- the first pixel of the rangep2
- the one-after-last pixel of the rangepublic void addPixel(int order, long p)
public Moc union(Moc other)
public Moc intersection(Moc other)
public Moc subtraction(Moc other)
public Moc complement()
public boolean contains(Moc other)
public boolean overlaps(Moc other)
public RangeSet toUniqRS()
public long[] toUniq()
public static Moc fromUniqRS(RangeSet ru)
public static Moc fromUniq(long[] u)
public byte[] toCompressed() throws Exception
Exception
public static Moc fromCompressed(byte[] data) throws Exception
Exception
public int nranges()