Skylark (Sketching Library)  0.1
/var/lib/jenkins/jobs/Skylark/workspace/sketch/FJLT.hpp
Go to the documentation of this file.
00001 #ifndef SKYLARK_FJLT_HPP
00002 #define SKYLARK_FJLT_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 { namespace sketch {
00009 
00010 template < typename InputMatrixType,
00011            typename OutputMatrixType = InputMatrixType >
00012 struct FJLT_t :
00013         public FJLT_data_t,
00014         virtual public sketch_transform_t<InputMatrixType, OutputMatrixType > {
00015 
00016     // To be specilized and derived. Just some guards here.
00017     typedef InputMatrixType matrix_type;
00018     typedef OutputMatrixType output_matrix_type;
00019 
00020     typedef FJLT_data_t data_type;
00021     typedef data_type::params_t params_t;
00022 
00023     FJLT_t(int N, int S, base::context_t& context) : data_type(N, S, context) {
00024         SKYLARK_THROW_EXCEPTION (
00025           base::sketch_exception()
00026               << base::error_msg(
00027                  "This combination has not yet been implemented for FJLT"));
00028     }
00029 
00030     FJLT_t(int N, int S, const params_t& params, base::context_t& context) 
00031         : data_type(N, S, params, context) {
00032         SKYLARK_THROW_EXCEPTION (
00033           base::sketch_exception()
00034               << base::error_msg(
00035                  "This combination has not yet been implemented for FJLT"));
00036     }
00037 
00038     FJLT_t(const data_type& other_data)
00039         : data_type(other_data) {
00040         SKYLARK_THROW_EXCEPTION (
00041           base::sketch_exception()
00042               << base::error_msg(
00043                  "This combination has not yet been implemented for FJLT"));
00044     }
00045 
00046     FJLT_t(const boost::property_tree::ptree &pt)
00047         : data_type(pt) {
00048         SKYLARK_THROW_EXCEPTION (
00049           base::sketch_exception()
00050               << base::error_msg(
00051                  "This combination has not yet been implemented for FJLT"));
00052     }
00053 
00054     void apply (const matrix_type& A,
00055                 output_matrix_type& sketch_of_A,
00056                 columnwise_tag dimension) const {
00057         SKYLARK_THROW_EXCEPTION (
00058           base::sketch_exception()
00059               << base::error_msg(
00060                  "This combination has not yet been implemented for FJLT"));
00061     }
00062 
00063     void apply (const matrix_type& A,
00064                 output_matrix_type& sketch_of_A,
00065                 rowwise_tag dimension) const {
00066         SKYLARK_THROW_EXCEPTION (
00067           base::sketch_exception()
00068               << base::error_msg(
00069                  "This combination has not yet been implemented for FJLT"));
00070     }
00071 
00072     int get_N() const { return this->_N; } 
00073     int get_S() const { return this->_S; } 
00075     const sketch_transform_data_t* get_data() const { return this; }
00076 };
00077 
00078 } } 
00080 #if SKYLARK_HAVE_ELEMENTAL && SKYLARK_HAVE_FFTW
00081 # include "FJLT_Elemental.hpp"
00082 #endif
00083 
00084 #endif // SKYLARK_FJLT_HPP