fn reveal>()

in protocol/src/cross_psi_xor/partner.rs [226:248]


    fn reveal<T: AsRef<Path>>(&self, path: T) {
        if let (Ok(indices), Ok(mut self_shares), Ok(mut additive_mask)) = (
            self.company_intersection_indices.clone().read(),
            self.self_shares.clone().write(),
            self.additive_mask.clone().write(),
        ) {
            let mut company_shares: Vec<u64> = Vec::with_capacity(indices.len());

            for index in indices.iter() {
                company_shares.push(additive_mask[*index]);
            }
            additive_mask.clear();

            let partner_shares = self_shares.remove(&0).unwrap();

            let mut out: Vec<Vec<u64>> =
                Vec::with_capacity(self.get_self_num_features() + self.get_company_num_features());
            out.push(partner_shares);
            out.push(company_shares);
            info!("revealing columns to output file");
            common::files::write_u64cols_to_file(&mut out, path).unwrap();
        }
    }