More simplification to erasure also add two more test functions

This commit is contained in:
Harshavardhana
2015-03-29 14:43:35 -07:00
parent 4c6677fd2c
commit b748cf359a
6 changed files with 83 additions and 52 deletions

View File

@@ -28,8 +28,8 @@
// 2. Create a new encoder
// 3. Decode data
//
// Encoder parameters contain three configurable elements:
// ParseEncoderParams(k, m, technique int) (EncoderParams, error)
// Erasure parameters contain three configurable elements:
// ValidateParams(k, m, technique int) (ErasureParams, error)
// k - Number of rows in matrix
// m - Number of colums in matrix
// technique - Matrix type, can be either Cauchy (recommended) or Vandermonde
@@ -53,15 +53,15 @@
//
// Creating and using an encoder
// var bytes []byte
// params := erasure.ParseEncoderParams(10, 5, erasure.Cauchy)
// encoder := erasure.NewEncoder(params)
// params := erasure.ValidateParams(10, 5, erasure.Cauchy)
// encoder := erasure.NewErasure(params)
// encodedData, length := encoder.Encode(bytes)
//
// Creating and using a decoder
// var encodedData [][]byte
// var length int
// params := erasure.ParseEncoderParams(10, 5, erasure.Cauchy)
// encoder := erasure.NewEncoder(params)
// params := erasure.ValidateParams(10, 5, erasure.Cauchy)
// encoder := erasure.NewErasure(params)
// originalData, err := encoder.Decode(encodedData, length)
//
package erasure