CppADCodeGen 2.4.3
A C++ Algorithmic Differentiation Package with Source Code Generation
Loading...
Searching...
No Matches
index_pattern.hpp
1#ifndef CPPAD_CG_INDEX_PATTERN_INCLUDED
2#define CPPAD_CG_INDEX_PATTERN_INCLUDED
3/* --------------------------------------------------------------------------
4 * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation:
5 * Copyright (C) 2013 Ciengis
6 *
7 * CppADCodeGen is distributed under multiple licenses:
8 *
9 * - Eclipse Public License Version 1.0 (EPL1), and
10 * - GNU General Public License Version 3 (GPL3).
11 *
12 * EPL1 terms and conditions can be found in the file "epl-v10.txt", while
13 * terms and conditions for the GPL3 can be found in the file "gpl3.txt".
14 * ----------------------------------------------------------------------------
15 * Author: Joao Leal
16 */
17
18namespace CppAD {
19namespace cg {
20
25public:
26
27 virtual IndexPatternType getType() const = 0;
28
29 virtual void getSubIndexes(std::set<IndexPattern*>& indexes) const = 0;
30
31 inline virtual ~IndexPattern() {
32 }
33
34 /***********************************************************************
35 * static methods
36 **********************************************************************/
44 template<class VectorSizeT>
45 static inline IndexPattern* detect(const VectorSizeT& x2y);
46
54 static inline IndexPattern* detect(const std::map<size_t, size_t>& x2y);
55
56 static inline bool isConstant(const IndexPattern& ip);
57};
58
59} // END cg namespace
60} // END CppAD namespace
61
62#endif
static IndexPattern * detect(const VectorSizeT &x2y)