fn reveal>()

in protocol/src/cross_psi_xor/company.rs [319:343]


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

            for index in indices.iter() {
                company_shares.push(self_shares[&0][*index]);
            }
            self_shares.remove(&0);

            let partner_shares = additive_mask.clone();

            let mut out: Vec<Vec<u64>> =
                Vec::with_capacity(self.get_self_num_features() + self.get_partner_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();
        } else {
            panic!("Unable to reveal");
        }
    }