Skip to content

Commit

Permalink
fix histogram
Browse files Browse the repository at this point in the history
Signed-off-by: sagewe <wbwmat@gmail.com>
  • Loading branch information
sagewe committed Sep 7, 2023
1 parent 4cde2b9 commit fe44425
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion rust/fate_utils/crates/fixedpoint_paillier/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,13 @@ impl CiphertextVector {
}
}

pub fn shuffle(&self, indexes: Vec<usize>) -> Self {
let data = self.data.clone();
let mut result = CiphertextVector { data };
result.i_shuffle(indexes);
result
}

pub fn intervals_slice(&mut self, intervals: Vec<(usize, usize)>) -> Result<Self> {
let mut data = vec![];
for (start, end) in intervals {
Expand Down Expand Up @@ -772,7 +779,7 @@ impl CiphertextVector {
}

pub fn tolist(&self) -> Vec<CiphertextVector> {
self.data.iter().map(|x| CiphertextVector{ data: vec![x.clone()]}).collect()
self.data.iter().map(|x| CiphertextVector { data: vec![x.clone()] }).collect()
}

pub fn add(&self, pk: &PK, other: &CiphertextVector) -> CiphertextVector {
Expand Down

0 comments on commit fe44425

Please sign in to comment.