rice.p2p.glacier
Class ErasureCodec
java.lang.Object
rice.p2p.glacier.ErasureCodec
-
public class ErasureCodec
- extends java.lang.Object
DESCRIBE THE CLASS
- Version:
- $Id: ErasureCodec.java 2808 2005-11-22 14:38:49Z jeffh $
- Author:
- ahae
Constructor Summary |
ErasureCodec(int _numFragments,
int _numSurvivors,
Environment env)
Constructor for ErasureCodec. |
Method Summary |
java.io.Serializable |
decode(Fragment[] frag)
|
protected void |
decodeChunk(int[] buffer,
int nExtra,
int[] RowInd,
boolean[] haveFragment,
long[][] InvMat,
int[] ColInd)
|
void |
dump(byte[] data)
|
Fragment[] |
encode(byte[] bytes,
boolean[] generateFragment)
|
protected void |
encodeChunk(int[] buffer)
Input: buffer of size ; first words contain message, rest is zeroes
Output: buffer contains fragments
|
Fragment[] |
encodeObject(java.io.Serializable obj,
boolean[] generateFragment)
|
protected void |
initElt()
|
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
numFragments
protected int numFragments
numSurvivors
protected int numSurvivors
ErasureCodec
public ErasureCodec(int _numFragments,
int _numSurvivors,
Environment env)
- Constructor for ErasureCodec.
- Parameters:
-
_numFragments
- DESCRIBE THE PARAMETER-
_numSurvivors
- DESCRIBE THE PARAMETER
dump
public void dump(byte[] data)
-
encodeObject
public Fragment[] encodeObject(java.io.Serializable obj,
boolean[] generateFragment)
-
encodeChunk
protected void encodeChunk(int[] buffer)
- Input: buffer of size ; first words contain message, rest is zeroes
Output: buffer contains fragments
-
encode
public Fragment[] encode(byte[] bytes,
boolean[] generateFragment)
-
decodeChunk
protected void decodeChunk(int[] buffer,
int nExtra,
int[] RowInd,
boolean[] haveFragment,
long[][] InvMat,
int[] ColInd)
-
decode
public java.io.Serializable decode(Fragment[] frag)
-
initElt
protected void initElt()
-
main
public static void main(java.lang.String[] args)
-
Copyright © 2001-2005 - Rice Pastry.