Skylark (Sketching Library)
0.1
|
#include <hash_transform_data.hpp>
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 |
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.
typedef sketch_transform_data_t skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::base_t |
Reimplemented in skylark::sketch::WZT_data_t, skylark::sketch::CWT_data_t, and skylark::sketch::MMT_data_t.
Definition at line 22 of file hash_transform_data.hpp.
typedef IdxDistributionType<size_t> skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::idx_distribution_type |
Reimplemented in skylark::sketch::hash_transform_t< elem::DistMatrix< ValueType, ColDist, RowDist >, elem::DistMatrix< ValueType, elem::STAR, elem::STAR >, IdxDistributionType, ValueDistribution >, skylark::sketch::hash_transform_t< elem::DistMatrix< ValueType, ColDist, RowDist >, elem::Matrix< ValueType >, IdxDistributionType, ValueDistribution >, skylark::sketch::hash_transform_t< base::sparse_matrix_t< ValueType >, elem::Matrix< ValueType >, IdxDistributionType, ValueDistribution >, skylark::sketch::hash_transform_t< elem::Matrix< ValueType >, elem::Matrix< ValueType >, IdxDistributionType, ValueDistribution >, and skylark::sketch::hash_transform_t< base::sparse_matrix_t< ValueType >, base::sparse_matrix_t< ValueType >, IdxDistributionType, ValueDistribution >.
Definition at line 24 of file hash_transform_data.hpp.
typedef ValueDistribution<double> skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::value_distribution_type |
Reimplemented in skylark::sketch::hash_transform_t< elem::DistMatrix< ValueType, ColDist, RowDist >, elem::DistMatrix< ValueType, elem::STAR, elem::STAR >, IdxDistributionType, ValueDistribution >, skylark::sketch::hash_transform_t< elem::DistMatrix< ValueType, ColDist, RowDist >, elem::Matrix< ValueType >, IdxDistributionType, ValueDistribution >, skylark::sketch::hash_transform_t< base::sparse_matrix_t< ValueType >, elem::Matrix< ValueType >, IdxDistributionType, ValueDistribution >, skylark::sketch::hash_transform_t< elem::Matrix< ValueType >, elem::Matrix< ValueType >, IdxDistributionType, ValueDistribution >, and skylark::sketch::hash_transform_t< base::sparse_matrix_t< ValueType >, base::sparse_matrix_t< ValueType >, IdxDistributionType, ValueDistribution >.
Definition at line 25 of file hash_transform_data.hpp.
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.
N | |
S | |
context |
Definition at line 33 of file hash_transform_data.hpp.
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.
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.
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.
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.
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.
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.
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.
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.
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.
std::vector<size_t> skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::row_idx [protected] |
precomputed row indices
Definition at line 70 of file hash_transform_data.hpp.
Referenced by skylark::sketch::hash_transform_data_t< boost::random::uniform_int_distribution, skylark::utility::rademacher_distribution_t >::build(), and skylark::sketch::hash_transform_data_t< boost::random::uniform_int_distribution, skylark::utility::rademacher_distribution_t >::finalPos().
std::vector<double> skylark::sketch::hash_transform_data_t< IdxDistributionType, ValueDistribution >::row_value [protected] |
precomputed scaling factors
Definition at line 71 of file hash_transform_data.hpp.
Referenced by skylark::sketch::hash_transform_data_t< boost::random::uniform_int_distribution, skylark::utility::rademacher_distribution_t >::build(), and skylark::sketch::hash_transform_data_t< boost::random::uniform_int_distribution, skylark::utility::rademacher_distribution_t >::getValue().