Eurobot2012_Primary
Dependencies: mbed Eurobot_2012_Primary
tvmet/Functional.h@26:0995f61cb7b8, 2012-10-17 (annotated)
- Committer:
- narshu
- Date:
- Wed Oct 17 22:22:47 2012 +0000
- Revision:
- 26:0995f61cb7b8
- Parent:
- 25:143b19c1fb05
Eurobot 2012 Primary;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
narshu | 25:143b19c1fb05 | 1 | /* |
narshu | 25:143b19c1fb05 | 2 | * Tiny Vector Matrix Library |
narshu | 25:143b19c1fb05 | 3 | * Dense Vector Matrix Libary of Tiny size using Expression Templates |
narshu | 25:143b19c1fb05 | 4 | * |
narshu | 25:143b19c1fb05 | 5 | * Copyright (C) 2001 - 2007 Olaf Petzold <opetzold@users.sourceforge.net> |
narshu | 25:143b19c1fb05 | 6 | * |
narshu | 25:143b19c1fb05 | 7 | * This library is free software; you can redistribute it and/or |
narshu | 25:143b19c1fb05 | 8 | * modify it under the terms of the GNU Lesser General Public |
narshu | 25:143b19c1fb05 | 9 | * License as published by the Free Software Foundation; either |
narshu | 25:143b19c1fb05 | 10 | * version 2.1 of the License, or (at your option) any later version. |
narshu | 25:143b19c1fb05 | 11 | * |
narshu | 25:143b19c1fb05 | 12 | * This library is distributed in the hope that it will be useful, |
narshu | 25:143b19c1fb05 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
narshu | 25:143b19c1fb05 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
narshu | 25:143b19c1fb05 | 15 | * Lesser General Public License for more details. |
narshu | 25:143b19c1fb05 | 16 | * |
narshu | 25:143b19c1fb05 | 17 | * You should have received a copy of the GNU Lesser General Public |
narshu | 25:143b19c1fb05 | 18 | * License along with this library; if not, write to the Free Software |
narshu | 25:143b19c1fb05 | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
narshu | 25:143b19c1fb05 | 20 | * |
narshu | 25:143b19c1fb05 | 21 | * $Id: Functional.h,v 1.11 2007-06-23 15:58:58 opetzold Exp $ |
narshu | 25:143b19c1fb05 | 22 | */ |
narshu | 25:143b19c1fb05 | 23 | |
narshu | 25:143b19c1fb05 | 24 | #ifndef TVMET_FUNCTIONAL_H |
narshu | 25:143b19c1fb05 | 25 | #define TVMET_FUNCTIONAL_H |
narshu | 25:143b19c1fb05 | 26 | |
narshu | 25:143b19c1fb05 | 27 | #include <tvmet/TypePromotion.h> |
narshu | 25:143b19c1fb05 | 28 | |
narshu | 25:143b19c1fb05 | 29 | namespace tvmet { |
narshu | 25:143b19c1fb05 | 30 | |
narshu | 25:143b19c1fb05 | 31 | |
narshu | 25:143b19c1fb05 | 32 | /** |
narshu | 25:143b19c1fb05 | 33 | * \class Functional Functional.h "tvmet/Functional.h" |
narshu | 25:143b19c1fb05 | 34 | * \brief Base class for all binary und unary functionals. |
narshu | 25:143b19c1fb05 | 35 | * |
narshu | 25:143b19c1fb05 | 36 | * All functional operators and functions have a static apply |
narshu | 25:143b19c1fb05 | 37 | * member function for evaluating the expressions inside. |
narshu | 25:143b19c1fb05 | 38 | */ |
narshu | 25:143b19c1fb05 | 39 | struct Functional { }; |
narshu | 25:143b19c1fb05 | 40 | |
narshu | 25:143b19c1fb05 | 41 | |
narshu | 25:143b19c1fb05 | 42 | /** |
narshu | 25:143b19c1fb05 | 43 | * \class BinaryFunctional Functional.h "tvmet/Functional.h" |
narshu | 25:143b19c1fb05 | 44 | * \brief Base class for all binary functions. |
narshu | 25:143b19c1fb05 | 45 | * \note Used for collecting classes for doxygen. |
narshu | 25:143b19c1fb05 | 46 | */ |
narshu | 25:143b19c1fb05 | 47 | struct BinaryFunctional : public Functional { }; |
narshu | 25:143b19c1fb05 | 48 | |
narshu | 25:143b19c1fb05 | 49 | |
narshu | 25:143b19c1fb05 | 50 | /** |
narshu | 25:143b19c1fb05 | 51 | * \class UnaryFunctional Functional.h "tvmet/Functional.h" |
narshu | 25:143b19c1fb05 | 52 | * \brief Base class for all unary functions. |
narshu | 25:143b19c1fb05 | 53 | * \note Used for collecting classes for doxygen. |
narshu | 25:143b19c1fb05 | 54 | */ |
narshu | 25:143b19c1fb05 | 55 | struct UnaryFunctional : public Functional { }; |
narshu | 25:143b19c1fb05 | 56 | |
narshu | 25:143b19c1fb05 | 57 | |
narshu | 25:143b19c1fb05 | 58 | /* |
narshu | 25:143b19c1fb05 | 59 | * some macro magic need below |
narshu | 25:143b19c1fb05 | 60 | */ |
narshu | 25:143b19c1fb05 | 61 | |
narshu | 25:143b19c1fb05 | 62 | /** |
narshu | 25:143b19c1fb05 | 63 | * \def TVMET_STD_SCOPE(x) |
narshu | 25:143b19c1fb05 | 64 | * \brief Simple macro to allow using macros for namespace std functions. |
narshu | 25:143b19c1fb05 | 65 | */ |
narshu | 25:143b19c1fb05 | 66 | #define TVMET_STD_SCOPE(x) std::x |
narshu | 25:143b19c1fb05 | 67 | |
narshu | 25:143b19c1fb05 | 68 | |
narshu | 25:143b19c1fb05 | 69 | /** |
narshu | 25:143b19c1fb05 | 70 | * \def TVMET_GLOBAL_SCOPE(x) |
narshu | 25:143b19c1fb05 | 71 | * \brief Simple macro to allow using macros for global namespace functions. |
narshu | 25:143b19c1fb05 | 72 | */ |
narshu | 25:143b19c1fb05 | 73 | #define TVMET_GLOBAL_SCOPE(x) ::x |
narshu | 25:143b19c1fb05 | 74 | |
narshu | 25:143b19c1fb05 | 75 | |
narshu | 25:143b19c1fb05 | 76 | } // namespace tvmet |
narshu | 25:143b19c1fb05 | 77 | |
narshu | 25:143b19c1fb05 | 78 | |
narshu | 25:143b19c1fb05 | 79 | #include <tvmet/BinaryFunctionals.h> |
narshu | 25:143b19c1fb05 | 80 | #include <tvmet/UnaryFunctionals.h> |
narshu | 25:143b19c1fb05 | 81 | |
narshu | 25:143b19c1fb05 | 82 | |
narshu | 25:143b19c1fb05 | 83 | #endif // TVMET_FUNCTIONAL_H |
narshu | 25:143b19c1fb05 | 84 | |
narshu | 25:143b19c1fb05 | 85 | // Local Variables: |
narshu | 25:143b19c1fb05 | 86 | // mode:C++ |
narshu | 25:143b19c1fb05 | 87 | // tab-width:8 |
narshu | 25:143b19c1fb05 | 88 | // End: |