(
&self,
g: &[G],
linear_form: &L,
)
| 356 | } |
| 357 | |
| 358 | fn check_sizes<L: LinearForm<G::ScalarField>>( |
| 359 | &self, |
| 360 | g: &[G], |
| 361 | linear_form: &L, |
| 362 | ) -> Result<(), CompSigmaError> { |
| 363 | if !(g.len() + 1).is_power_of_two() { |
| 364 | return Err(CompSigmaError::UncompressedNotPowerOf2); |
| 365 | } |
| 366 | if self.A.len() != self.B.len() { |
| 367 | return Err(CompSigmaError::VectorLenMismatch); |
| 368 | } |
| 369 | if (g.len() + 1) != (1 << (self.A.len() + 1)) { |
| 370 | return Err(CompSigmaError::WrongRecursionLevel); |
| 371 | } |
| 372 | if !linear_form.size().is_power_of_two() { |
| 373 | return Err(CompSigmaError::UncompressedNotPowerOf2); |
| 374 | } |
| 375 | Ok(()) |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | pub fn prepare_generators_and_linear_form_for_compression< |
no test coverage detected