use a hashmap to represent linear combination
Compare changes
Files
2+ 195
− 89
@@ -37,16 +118,14 @@ impl<E: Pairing> Shard<E> {
@@ -71,18 +150,28 @@ impl<E: Pairing> Shard<E> {
@@ -100,9 +189,15 @@ pub fn decode<F: GF, E: Pairing>(blocks: Vec<Shard<E>>) -> Result<Vec<u8>, Error
@@ -113,7 +208,12 @@ pub fn decode<F: GF, E: Pairing>(blocks: Vec<Shard<E>>) -> Result<Vec<u8>, Error
@@ -126,16 +226,19 @@ pub fn decode<F: GF, E: Pairing>(blocks: Vec<Shard<E>>) -> Result<Vec<u8>, Error
@@ -181,10 +284,10 @@ mod tests {
@@ -196,7 +299,7 @@ mod tests {
@@ -204,87 +307,90 @@ mod tests {