User Manual, Developers Guide and API Documentation

Operation.hpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002  * This file is part of openWNS (open Wireless Network Simulator)
00003  * _____________________________________________________________________________
00004  *
00005  * Copyright (C) 2004-2007
00006  * Chair of Communication Networks (ComNets)
00007  * Kopernikusstr. 16, D-52074 Aachen, Germany
00008  * phone: ++49-241-80-27910,
00009  * fax: ++49-241-80-22242
00010  * email: info@openwns.org
00011  * www: http://www.openwns.org
00012  * _____________________________________________________________________________
00013  *
00014  * openWNS is free software; you can redistribute it and/or modify it under the
00015  * terms of the GNU Lesser General Public License version 2 as published by the
00016  * Free Software Foundation;
00017  *
00018  * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY
00019  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
00020  * A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00021  * details.
00022  *
00023  * You should have received a copy of the GNU Lesser General Public License
00024  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00025  *
00026  ******************************************************************************/
00027 
00028 #ifndef WNS_DISTRIBUTION_OPERATION_HPP
00029 #define WNS_DISTRIBUTION_OPERATION_HPP
00030 
00031 #include <WNS/distribution/Distribution.hpp>
00032 #include <WNS/pyconfig/View.hpp>
00033 
00034 namespace wns { namespace distribution { namespace operation {
00035 
00036     class Binary :
00037         public Distribution,
00038         public IHasMean
00039     {
00040     public:
00041         Binary(const pyconfig::View& config);
00042         Binary(wns::rng::RNGen* rng, const pyconfig::View& config);
00043  
00044     protected:
00045         Distribution* first_;
00046         Distribution* second_;
00047         wns::pyconfig::View config_;
00048     
00049     private:
00050         void
00051         init();
00052 
00053     }; // Binary
00054 
00055     class ADD :
00056         public Binary
00057     {
00058     public:
00059         ADD(const pyconfig::View& config) :
00060             Binary(config)
00061         {}
00062 
00063         ADD(wns::rng::RNGen* rng, const pyconfig::View& config) :
00064             Binary(rng, config)
00065         {}
00066 
00067         virtual double
00068         operator()();
00069 
00070         virtual double
00071         getMean() const;
00072 
00073         virtual std::string
00074         paramString() const;
00075     }; // ADD
00076 
00077     class MUL :
00078         public Binary
00079     {
00080     public:
00081         MUL(const pyconfig::View& config) :
00082             Binary(config)
00083         {}
00084 
00085         MUL(wns::rng::RNGen* rng,const pyconfig::View& config) :
00086             Binary(rng, config)
00087         {}
00088  
00089         virtual double
00090         operator()();
00091 
00092         virtual double
00093         getMean() const;
00094 
00095         virtual std::string
00096         paramString() const;
00097     }; // MUL
00098 
00099     class SUB :
00100         public Binary
00101     {
00102     public:
00103         SUB(const pyconfig::View& config) :
00104             Binary(config)
00105         {}
00106 
00107         SUB(wns::rng::RNGen* rng, const pyconfig::View& config) :
00108             Binary(rng, config)
00109         {}
00110 
00111         virtual double
00112         operator()();
00113 
00114         virtual double
00115         getMean() const;
00116 
00117         virtual std::string
00118         paramString() const;
00119     };  // SUB
00120 
00121     class DIV :
00122         public Binary
00123     {
00124     public:
00125         DIV(const pyconfig::View& config) :
00126             Binary(config)
00127         {}
00128 
00129         DIV(wns::rng::RNGen* rng, const pyconfig::View& config) :
00130             Binary(rng, config)
00131         {}
00132 
00133         virtual double
00134         operator()();
00135 
00136         virtual double
00137         getMean() const;
00138 
00139         virtual std::string
00140         paramString() const;
00141     }; // DIV
00142 
00143     class DistributionAndFloat :
00144         public Distribution
00145     {
00146     public:
00147         DistributionAndFloat(const pyconfig::View& config);
00148         DistributionAndFloat(wns::rng::RNGen* rng, const pyconfig::View& config);
00149 
00150     protected:
00151         Distribution* subject_;
00152         double arg_;
00153         wns::pyconfig::View config_;
00154 
00155     private:
00156         void
00157         init();
00158 
00159     }; // DistributionAndFloat
00160 
00161     class Above :
00162         public DistributionAndFloat
00163     {
00164     public:
00165         Above(const pyconfig::View& config) :
00166             DistributionAndFloat(config)
00167         {}
00168 
00169         Above(wns::rng::RNGen* rng, const pyconfig::View& config) :
00170             DistributionAndFloat(rng, config)
00171         {}
00172 
00173         virtual double
00174         operator()();
00175 
00176         virtual std::string
00177         paramString() const;
00178     }; // Above
00179 
00180     class Below :
00181         public DistributionAndFloat
00182     {
00183     public:
00184         Below(const pyconfig::View& config) :
00185             DistributionAndFloat(config)
00186         {}
00187 
00188         Below(wns::rng::RNGen* rng, const pyconfig::View& config) :
00189             DistributionAndFloat(rng, config)
00190         {}
00191 
00192         virtual double
00193         operator()();
00194 
00195         virtual std::string
00196         paramString() const;
00197     }; // Below
00198 
00199 } // operation
00200 } // distribution
00201 } // wns
00202 
00203 
00204 #endif // NOT defined WNS_DISTRIBUTION_OPERATION_HPP
00205 
00206 /*
00207   Local Variables:
00208   mode: c++
00209   fill-column: 80
00210   c-basic-offset: 8
00211   c-comment-only-line-offset: 0
00212   c-tab-always-indent: t
00213   indent-tabs-mode: t
00214   tab-width: 8
00215   End:
00216 */
00217 

Generated on Fri May 25 03:31:38 2012 for openWNS by  doxygen 1.5.5