|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object part6.SimpleRedundancy
A redundancy class that adds k
1-bits to an m
-bit integer.
Constructor Summary | |
SimpleRedundancy(int m,
int k)
Initialization parameters m and k . |
Method Summary | |
boolean |
ok(java.math.BigInteger x)
A method to test if the value x was produced by protect() . |
java.math.BigInteger |
protect(java.math.BigInteger x)
A method to add redundancy to a big integer x . |
java.math.BigInteger |
recover(java.math.BigInteger x)
A method to recover a big integer value from a redundant value x produced by protect() . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleRedundancy(int m, int k) throws java.lang.Exception
m
and k
.
java.lang.Exception
Method Detail |
public java.math.BigInteger protect(java.math.BigInteger x) throws java.lang.Exception
Redundancy
x
.
protect
in interface Redundancy
java.lang.Exception
public java.math.BigInteger recover(java.math.BigInteger x) throws java.lang.Exception
Redundancy
x
produced by protect()
.
recover
in interface Redundancy
java.lang.Exception
- if the value x
was not created by protect()
.public boolean ok(java.math.BigInteger x) throws java.lang.Exception
Redundancy
x
was produced by protect()
.
ok
in interface Redundancy
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |