public class ArithmeticMod
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
matMatModM(double[][] A,
double[][] B,
double[][] C,
double m)
Computes
A×B mod m
and puts the result in
C.
|
static void |
matMatModM(int[][] A,
int[][] B,
int[][] C,
int m)
Exactly like
matMatModM using double, but with int instead
of double. |
static void |
matMatModM(long[][] A,
long[][] B,
long[][] C,
long m)
Exactly like
matMatModM using double, but with long instead
of double. |
static void |
matPowModM(double[][] A,
double[][] B,
double m,
int c)
Computes
Ac mod m
and puts the result in B.
|
static void |
matPowModM(int[][] A,
int[][] B,
int m,
int c)
Exactly like
matPowModM using double, but with int instead
of double. |
static void |
matPowModM(long[][] A,
long[][] B,
long m,
int c)
Exactly like
matPowModM using double, but with long instead
of double. |
static void |
matTwoPowModM(double[][] A,
double[][] B,
double m,
int e)
Computes
A2e mod m and
puts the result in B.
|
static void |
matTwoPowModM(int[][] A,
int[][] B,
int m,
int e)
Exactly like
matTwoPowModM using double, but with int instead of
double. |
static void |
matTwoPowModM(long[][] A,
long[][] B,
long m,
int e)
Exactly like
matTwoPowModM using double, but with long instead of
double. |
static void |
matVecModM(double[][] A,
double[] s,
double[] v,
double m)
Computes the result of
A×s mod m and puts the
result in v.
|
static void |
matVecModM(int[][] A,
int[] s,
int[] v,
int m)
Exactly like
matVecModM using double, but with int instead
of double. |
static void |
matVecModM(long[][] A,
long[] s,
long[] v,
long m)
Exactly like
matVecModM using double, but with long instead
of double. |
static double |
multModM(double a,
double s,
double c,
double m)
Computes
(a×s + c) mod m.
|
static int |
multModM(int a,
int s,
int c,
int m)
Computes
(a×s + c) mod m.
|
static long |
multModM(long a,
long s,
long c,
long m)
Computes
(a×s + c) mod m.
|
public static double multModM(double a,
double s,
double c,
double m)
a - the first factor of the multiplications - the second factor of the multiplicationc - the second term of the additionm - the moduluspublic static void matVecModM(double[][] A,
double[] s,
double[] v,
double m)
A - the multiplication matrixs - the multiplied vectorv - the result of the multiplicationm - the moduluspublic static void matMatModM(double[][] A,
double[][] B,
double[][] C,
double m)
A - the first factor of the multiplicationB - the second factor of the multiplicationC - the result of the multiplicationm - the moduluspublic static void matTwoPowModM(double[][] A,
double[][] B,
double m,
int e)
A - the matrix to raise to a powerB - the result of exponentiationm - the moduluse - the log2 of the exponentpublic static void matPowModM(double[][] A,
double[][] B,
double m,
int c)
A - the matrix to raise to a powerB - the result of the exponentiationm - the modulusc - the exponentpublic static int multModM(int a,
int s,
int c,
int m)
a - the first factor of the multiplications - the second factor of the multiplicationc - the second term of the additionm - the moduluspublic static void matVecModM(int[][] A,
int[] s,
int[] v,
int m)
matVecModM using double, but with int instead
of double.A - the multiplication matrixs - the multiplied vectorv - the result of the multiplicationm - the moduluspublic static void matMatModM(int[][] A,
int[][] B,
int[][] C,
int m)
matMatModM using double, but with int instead
of double.A - the first factor of the multiplicationB - the second factor of the multiplicationC - the result of the multiplicationm - the moduluspublic static void matTwoPowModM(int[][] A,
int[][] B,
int m,
int e)
matTwoPowModM using double, but with int instead of
double.A - the matrix to raise to a powerB - the result of exponentiationm - the moduluse - the log2 of the exponentpublic static void matPowModM(int[][] A,
int[][] B,
int m,
int c)
matPowModM using double, but with int instead
of double.A - the matrix to raise to a powerB - the result of the exponentiationm - the modulusc - the exponentpublic static long multModM(long a,
long s,
long c,
long m)
a - the first factor of the multiplications - the second factor of the multiplicationc - the second term of the additionm - the moduluspublic static void matVecModM(long[][] A,
long[] s,
long[] v,
long m)
matVecModM using double, but with long instead
of double.A - the multiplication matrixs - the multiplied vectorv - the result of the multiplicationm - the moduluspublic static void matMatModM(long[][] A,
long[][] B,
long[][] C,
long m)
matMatModM using double, but with long instead
of double.A - the first factor of the multiplicationB - the second factor of the multiplicationC - the result of the multiplicationm - the moduluspublic static void matTwoPowModM(long[][] A,
long[][] B,
long m,
int e)
matTwoPowModM using double, but with long instead of
double.A - the matrix to raise to a powerB - the result of exponentiationm - the moduluse - the log2 of the exponentpublic static void matPowModM(long[][] A,
long[][] B,
long m,
int c)
matPowModM using double, but with long instead
of double.A - the matrix to raise to a powerB - the result of the exponentiationm - the modulusc - the exponentTo submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.