|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.examples.pi.math.Modular
public class Modular
Modular arithmetics
Constructor Summary | |
---|---|
Modular()
|
Method Summary | |
---|---|
static double |
addMod(double x,
double a)
Given x in [0,1) and a in (-1,1), return (x, a) mod 1.0. |
static long |
mod(long e,
long n)
Compute 2^e mod n |
static long |
modInverse(long x,
long y)
Given 0 < x < y, return x^(-1) mod y. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Modular()
Method Detail |
---|
public static long mod(long e, long n)
public static double addMod(double x, double a)
public static long modInverse(long x, long y)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |