CppADCodeGen
2.4.3
A C++ Algorithmic Differentiation Package with Source Code Generation
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
23
namespace
CppAD
{
24
namespace
cg {
25
30
template
<
class
Base>
31
class
DaeIndexReduction
:
public
SimpleLogger
{
32
protected
:
36
ADFun<CG<Base>
>*
const
fun_
;
37
public
:
38
44
DaeIndexReduction
(
ADFun
<
CG<Base>
>& fun) :
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
CppAD::cg::DaeIndexReduction
Definition:
dae_index_reduction.hpp:31
CppAD::cg::DaeIndexReduction::DaeIndexReduction
DaeIndexReduction(ADFun< CG< Base > > &fun)
Definition:
dae_index_reduction.hpp:44
CppAD::cg::DaeIndexReduction::getOriginalModel
ADFun< CG< Base > > & getOriginalModel() const
Definition:
dae_index_reduction.hpp:55
CppAD::cg::DaeIndexReduction::fun_
ADFun< CG< Base > > *const fun_
Definition:
dae_index_reduction.hpp:36
CppAD
Definition:
abstract_atomic_fun.hpp:19
CppAD::cg::DaeIndexReduction::reduceIndex
virtual std::unique_ptr< ADFun< CG< Base > > > reduceIndex(std::vector< DaeVarInfo > &newVarInfo, std::vector< DaeEquationInfo > &equationInfo)=0
CppAD::cg::CG
Definition:
cg.hpp:29
CppAD::ADFun
Definition:
declare_cg.hpp:28
CppAD::cg::SimpleLogger
Definition:
simple_logger.hpp:24
include
cppad
cg
dae_index_reduction
dae_index_reduction.hpp
Generated on Tue Jan 23 2024 13:46:33 for CppADCodeGen by
1.8.17