Skylark (Sketching Library)
0.1
|
00001 #ifndef SKYLARK_SKETCH_TRANSFORMS_HPP 00002 #define SKYLARK_SKETCH_TRANSFORMS_HPP 00003 00004 #ifndef SKYLARK_SKETCH_HPP 00005 #error "Include top-level sketch.hpp instead of including individuals headers" 00006 #endif 00007 00008 namespace skylark { 00009 namespace sketch { 00010 00014 template < typename InputMatrixType, 00015 typename OutputMatrixType = InputMatrixType > 00016 class sketch_transform_t { 00017 public: 00018 00019 virtual void apply (const InputMatrixType& A, 00020 OutputMatrixType& sketch_of_A, columnwise_tag dimension) const = 0; 00021 00022 virtual void apply (const InputMatrixType& A, 00023 OutputMatrixType& sketch_of_A, rowwise_tag dimension) const = 0; 00024 00025 virtual int get_N() const = 0; 00027 virtual int get_S() const = 0; 00029 virtual const sketch_transform_data_t* get_data() const = 0; 00030 00031 boost::property_tree::ptree to_ptree() const { 00032 return get_data()->to_ptree(); 00033 } 00034 00035 virtual ~sketch_transform_t() { 00036 00037 } 00038 00039 static 00040 sketch_transform_t* from_ptree(const boost::property_tree::ptree& pt); 00041 00042 }; 00043 00044 } } 00046 #endif // SKETCH_TRANSFORMS_HPP