Percy++
A C++ implementation of Private Information Retrieval (PIR) protocols
Percy++
Readme
Server
Client
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Pages
subset.h
1
// Percy++ Copyright 2007,2012,2013,2014
2
// Ian Goldberg <iang@cs.uwaterloo.ca>,
3
// Casey Devet <cjdevet@uwaterloo.ca>,
4
// Ryan Henry <rhenry@cs.uwaterloo.ca>
5
//
6
// This program is free software; you can redistribute it and/or modify
7
// it under the terms of version 2 of the GNU General Public License as
8
// published by the Free Software Foundation.
9
//
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
14
//
15
// There is a copy of the GNU General Public License in the COPYING file
16
// packaged with this plugin; if you cannot find it, write to the Free
17
// Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18
// 02110-1301 USA
19
20
#ifndef __SUBSET_H__
21
#define __SUBSET_H__
22
23
// Operations on subsets of the set of servers. These subsets are
24
// stored as sorted vectors of nservers_t.
25
26
#include <vector>
27
#include "
percytypes.h
"
28
29
using namespace
std;
30
31
// Append k random elements of G[offset..end] to I
32
void
random_subset(
const
vector<nservers_t> &G,
33
vector<nservers_t> &I, nservers_t k, nservers_t offset = 0);
34
35
// Compute the intersection of the two *strictly sorted* vectors v1 and v2
36
vector<nservers_t> intersect(
const
vector<nservers_t> &v1,
37
const
vector<nservers_t> &v2);
38
39
#endif
percytypes.h
This header contains typedefs for seamless switching between 32- and 64-bit builds of Percy++...
Generated on Wed Dec 3 2014 12:13:26 for Percy++ by
1.8.7