CppADCodeGen 2.4.3
A C++ Algorithmic Differentiation Package with Source Code Generation
Loading...
Searching...
No Matches
dae_index_reduction.hpp
1#ifndef CPPAD_CG_DAE_INDEX_REDUCTION_INCLUDED
2#define CPPAD_CG_DAE_INDEX_REDUCTION_INCLUDED
3/* --------------------------------------------------------------------------
4 * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation:
5 * Copyright (C) 2012 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
18#include <cppad/cg/cppadcg.hpp>
19#include <cppad/cg/dae_index_reduction/dae_var_info.hpp>
20#include <cppad/cg/dae_index_reduction/dae_equation_info.hpp>
21#include <cppad/cg/dae_index_reduction/simple_logger.hpp>
22
23namespace CppAD {
24namespace cg {
25
30template<class Base>
32protected:
37public:
38
45 fun_(&fun) {
46 }
47
48 inline virtual ~DaeIndexReduction() {
49 }
50
55 inline ADFun<CG<Base> >& getOriginalModel() const {
56 return *fun_;
57 }
58
67 virtual std::unique_ptr<ADFun<CG<Base>>> reduceIndex(std::vector<DaeVarInfo>& newVarInfo,
68 std::vector<DaeEquationInfo>& equationInfo) = 0;
69
70};
71
72} // END cg namespace
73} // END CppAD namespace
74
75#endif
76
DaeIndexReduction(ADFun< CG< Base > > &fun)
ADFun< CG< Base > > *const fun_
virtual std::unique_ptr< ADFun< CG< Base > > > reduceIndex(std::vector< DaeVarInfo > &newVarInfo, std::vector< DaeEquationInfo > &equationInfo)=0
ADFun< CG< Base > > & getOriginalModel() const