Skip to content
Snippets Groups Projects

Added Latex support for doc

Merged HEME Clement requested to merge c.heme/komodo:main into main
All threads resolved!
1 file
+ 8
3
Compare changes
  • Side-by-side
  • Inline
+ 8
3
@@ -61,7 +61,6 @@ impl<F: PrimeField> Shard<F> {
size: self.size,
}
}
}
/// compute the linear combination between an arbitrary number of [`Shard`]s
@@ -105,7 +104,10 @@ pub fn recode_with_coeffs<F: PrimeField>(shards: &[Shard<F>], coeffs: &[F]) -> O
/// > **Note**
/// >
/// > this is a wrapper around [`recode_with_coeffs`].
pub fn recode_random<F: PrimeField>(shards: &[Shard<F>], rng: &mut impl RngCore) -> Result<Option<Shard<F>>, KomodoError> {
pub fn recode_random<F: PrimeField>(
shards: &[Shard<F>],
rng: &mut impl RngCore,
) -> Result<Option<Shard<F>>, KomodoError> {
for (i, (s1, s2)) in shards.iter().zip(shards.iter().skip(1)).enumerate() {
if s1.k != s2.k {
return Err(KomodoError::IncompatibleShards(format!(
@@ -142,7 +144,10 @@ pub fn recode_random<F: PrimeField>(shards: &[Shard<F>], rng: &mut impl RngCore)
/// matrix. (see [`algebra::split_data_into_field_elements`])
///
/// This is the inverse of [`decode`].
pub fn encode<F: PrimeField>(data: &[u8], encoding_mat: &Matrix<F>) -> Result<Vec<Shard<F>>, KomodoError> {
pub fn encode<F: PrimeField>(
data: &[u8],
encoding_mat: &Matrix<F>,
) -> Result<Vec<Shard<F>>, KomodoError> {
let hash = Sha256::hash(data).to_vec();
let k = encoding_mat.height;
Loading