sdbf  3.3
 All Classes Functions Variables Friends
Public Member Functions | Public Attributes | Friends
sdbf_set Class Reference

sdbf_set class

#include <sdbf_set.h>

List of all members.

Public Member Functions

 sdbf_set ()
 creates blank sdbf_set
 sdbf_set (bloom_filter *index)
 creates blank sdbf_set with index
 sdbf_set (const char *fname)
 loads an sdbf_set from a file
 ~sdbf_set ()
 destructor
class sdbfat (uint32_t pos)
 accessor method for individual hashes
void add (class sdbf *hash)
 adds a single hash to this set
void add (sdbf_set *hashset)
 adds the items in another set to this set
uint64_t size ()
 Returns the number of sdbfs in this set.
uint64_t input_size ()
 Computes the data size of this set.
uint64_t filter_count ()
void compare_all (int32_t threshold)
 Compares all objects in a set to each other.
std::string compare_all_quiet (int32_t threshold, int32_t thread_count)
void compare_to (sdbf_set *other, int32_t threshold, uint32_t sample_size)
 queries one set for the contents of another
std::string compare_to_quiet (sdbf_set *other, int32_t threshold, uint32_t sample_size, int32_t thread_count)
std::string to_string () const
 return a string which contains the output-encoded sdbfs in this set
std::string index_results () const
 return a string which contains the results of this set's index seraching
int empty ()
 is this empty?
std::string name () const
 retrieve name of set
void set_name (std::string name)
 name this set.
void set_separator (char sep)
 change output separator
void vector_init ()
 setup bloom filter vector

Public Attributes

class bloom_filterindex
 index for this set
std::vector< class
bloom_filter * > * 
bf_vector
 giant bloom filter vector for this set

Friends

std::ostream & operator<< (std::ostream &os, const sdbf_set &s)
 output operator
std::ostream & operator<< (std::ostream &os, const sdbf_set *s)
 output operator

Constructor & Destructor Documentation

Creates empty sdbf_set

Creates empty sdbf_set with an index

Parameters:
indexto insert new items into
sdbf_set::sdbf_set ( const char *  fname)

Loads all sdbfs from a file into a new set

Parameters:
fnamename of sdbf file

Member Function Documentation

void sdbf_set::add ( class sdbf hash)

Adds a single hash to this set

Parameters:
hashan existing sdbf hash
void sdbf_set::add ( sdbf_set hashset)

Adds all items in another set to this set

Parameters:
hashsetsdbf_set* to be added
class sdbf * sdbf_set::at ( uint32_t  pos)

Accessor method for a single sdbf* in this set

Parameters:
posposition 0 to size()
Returns:
sdbf* or NULL if position not valid
void sdbf_set::compare_all ( int32_t  threshold)

Compares each sdbf object in target to every other sdbf object in target and prints the results to stdout

Parameters:
thresholdoutput threshold, defaults to 1
std::string sdbf_set::compare_all_quiet ( int32_t  threshold,
int32_t  thread_count 
)

Compares each sdbf object in target to every other sdbf object in target and returns the results as a list stored in a string

Parameters:
thresholdoutput threshold, defaults to 1
thread_countprocessor threads to use, 0 for all available
Returns:
std::string result listing
std::string sdbf_set::compare_to_quiet ( sdbf_set other,
int32_t  threshold,
uint32_t  sample_size,
int32_t  thread_count 
)

Compares each sdbf object in other to each object in this set, and returns the results as a list stored in a string.

Parameters:
otherset to compare to
thresholdoutput threshold, defaults to 1
sample_sizesize of bloom filter sample. send 0 for no sampling
thread_countprocessor threads to use, 0 for all available
Returns:
std::string result listing
int sdbf_set::empty ( )

Checks empty status of container

Returns:
int 1 if empty, 0 if non-empty
uint64_t sdbf_set::filter_count ( )

Returns the size of the set's own bloom_filter vector.

std::string sdbf_set::index_results ( ) const

Generates a string representing the indexing results of this set

uint64_t sdbf_set::input_size ( )

Computes the data size of this set, from the input_size() values of its' content sdbf hashes.

Returns:
uint64_t total of input sizes
std::string sdbf_set::name ( ) const

Retrieve name of this set

Returns:
string name
void sdbf_set::set_name ( std::string  name)

Change name of this set

Parameters:
nameof string
void sdbf_set::set_separator ( char  sep)

Change comparison output separator

Parameters:
sepcharactor separator for output
uint64_t sdbf_set::size ( )

Number of items in this set

Returns:
uint64_t number of items in this set
std::string sdbf_set::to_string ( ) const

Generates a string which contains the output-encoded sdbfs in this set

Returns:
std::string containing sdbfs.

Sets up bloom filter vector. Should also be called by server process when done hashing to a set


The documentation for this class was generated from the following files: