|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthealpix.core.base.BitManipulation
public class BitManipulation
This module provides functions that permute bits of the binary representation of a number. Java bit manipulation class derived from Healpix fortran90 program.
| Field Summary | |
|---|---|
static long |
magic1
The magic1. |
static long |
magic2
The magic2. |
| Constructor Summary | |
|---|---|
BitManipulation()
default constructor |
|
| Method Summary | |
|---|---|
long |
invLSB(long i)
returns i with even bits (0,2,4,...) inverted |
long |
invMSB(long i)
returns i with odd bits (1,3,5,...) inverted |
long |
invswapLSBMSB(long i)
returns NOT i with even and odd bit positions interchanged |
double |
MODULO(double a,
double b)
simulates behaviour of fortran90 MODULO function |
long |
swapLSBMSB(long i)
swaps low and high bits in the word i |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static long magic1
public static long magic2
| Constructor Detail |
|---|
public BitManipulation()
| Method Detail |
|---|
public long swapLSBMSB(long i)
i - integer input word
public long invswapLSBMSB(long i)
i - int input word
public long invLSB(long i)
i - int input word
public long invMSB(long i)
i - int input word
public double MODULO(double a,
double b)
a - doubleb - double
|
"Built from revision exported" | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||