Skylark (Sketching Library)  0.1
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution > Struct Template Reference

#include <hash_transform_data.hpp>

Inheritance diagram for skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >:
Inheritance graph
[legend]
Collaboration diagram for skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef sketch_transform_data_t base_t
typedef IdxDistributionType
< size_t > 
idx_distribution_type
typedef ValueDistribution< double > value_distribution_type

Public Member Functions

 hash_transform_data_t (int N, int S, base::context_t &context)
virtual boost::property_tree::ptree to_ptree () const

Protected Member Functions

 hash_transform_data_t (int N, int S, const base::context_t &context, const std::string type)
base::context_t build ()
void finalPos (size_t &rowid, size_t &colid, columnwise_tag) const
void finalPos (size_t &rowid, size_t &colid, rowwise_tag) const
double getValue (size_t rowid, size_t colid, columnwise_tag) const
double getValue (size_t rowid, size_t colid, rowwise_tag) const
void get_res_size (int &rows, int &cols, columnwise_tag) const
void get_res_size (int &rows, int &cols, rowwise_tag) const

Protected Attributes

std::vector< size_t > row_idx
std::vector< double > row_value

Detailed Description

template<template< typename > class IdxDistributionType, template< typename > class ValueDistribution>
struct skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >

This is the base data class for all the hashing transforms. Essentially, it holds on to a context, and to some random numbers that it has generated both for the scaling factor and for the row/col indices.

Definition at line 21 of file hash_transform_data.hpp.


Member Typedef Documentation

template<template< typename > class IdxDistributionType, template< typename > class ValueDistribution>
typedef sketch_transform_data_t skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::base_t
template<template< typename > class IdxDistributionType, template< typename > class ValueDistribution>
typedef IdxDistributionType<size_t> skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::idx_distribution_type
template<template< typename > class IdxDistributionType, template< typename > class ValueDistribution>
typedef ValueDistribution<double> skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::value_distribution_type

Constructor & Destructor Documentation

template<template< typename > class IdxDistributionType, template< typename > class ValueDistribution>
skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::hash_transform_data_t ( int  N,
int  S,
base::context_t context 
) [inline]

Constructs the data for a hashing sketch.

Parameters:
N
S
context

Definition at line 33 of file hash_transform_data.hpp.

template<template< typename > class IdxDistributionType, template< typename > class ValueDistribution>
skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::hash_transform_data_t ( int  N,
int  S,
const base::context_t context,
const std::string  type 
) [inline, protected]

Definition at line 50 of file hash_transform_data.hpp.


Member Function Documentation

template<template< typename > class IdxDistributionType, template< typename > class ValueDistribution>
base::context_t skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::build ( ) [inline, protected]

random samples should only be drawn here, return context after random samples have been extracted.

Reimplemented from skylark::sketch::sketch_transform_data_t.

Definition at line 56 of file hash_transform_data.hpp.

Referenced by skylark::sketch::hash_transform_data_t< boost::random::uniform_int_distribution, skylark::utility::rademacher_distribution_t >::hash_transform_data_t().

template<template< typename > class IdxDistributionType, template< typename > class ValueDistribution>
void skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::finalPos ( size_t &  rowid,
size_t &  colid,
columnwise_tag   
) const [inline, protected]

Definition at line 73 of file hash_transform_data.hpp.

template<template< typename > class IdxDistributionType, template< typename > class ValueDistribution>
void skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::finalPos ( size_t &  rowid,
size_t &  colid,
rowwise_tag   
) const [inline, protected]

Definition at line 77 of file hash_transform_data.hpp.

template<template< typename > class IdxDistributionType, template< typename > class ValueDistribution>
void skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::get_res_size ( int &  rows,
int &  cols,
columnwise_tag   
) const [inline, protected]

Definition at line 89 of file hash_transform_data.hpp.

template<template< typename > class IdxDistributionType, template< typename > class ValueDistribution>
void skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::get_res_size ( int &  rows,
int &  cols,
rowwise_tag   
) const [inline, protected]

Definition at line 93 of file hash_transform_data.hpp.

template<template< typename > class IdxDistributionType, template< typename > class ValueDistribution>
double skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::getValue ( size_t  rowid,
size_t  colid,
columnwise_tag   
) const [inline, protected]

Definition at line 81 of file hash_transform_data.hpp.

template<template< typename > class IdxDistributionType, template< typename > class ValueDistribution>
double skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::getValue ( size_t  rowid,
size_t  colid,
rowwise_tag   
) const [inline, protected]

Definition at line 85 of file hash_transform_data.hpp.

template<template< typename > class IdxDistributionType, template< typename > class ValueDistribution>
virtual boost::property_tree::ptree skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::to_ptree ( ) const [inline, virtual]

Serializes a sketch to a property_tree

Implements skylark::sketch::sketch_transform_data_t.

Reimplemented in skylark::sketch::WZT_data_t, skylark::sketch::CWT_data_t, and skylark::sketch::MMT_data_t.

Definition at line 39 of file hash_transform_data.hpp.


Member Data Documentation

template<template< typename > class IdxDistributionType, template< typename > class ValueDistribution>
std::vector<size_t> skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::row_idx [protected]
template<template< typename > class IdxDistributionType, template< typename > class ValueDistribution>
std::vector<double> skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::row_value [protected]

The documentation for this struct was generated from the following file: