CppADCodeGen
2.4.3
A C++ Algorithmic Differentiation Package with Source Code Generation
Loading...
Searching...
No Matches
operation_path_node.hpp
1
#ifndef CPPAD_CG_OPERATION_PATH_NODE_INCLUDED
2
#define CPPAD_CG_OPERATION_PATH_NODE_INCLUDED
3
/* --------------------------------------------------------------------------
4
* CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation:
5
* Copyright (C) 2016 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
namespace
CppAD
{
19
namespace
cg {
20
21
template
<
class
Base>
22
struct
OperationPathNode
{
26
OperationNode<Base>
*
node
;
30
size_t
argIndex
;
31
32
inline
OperationPathNode
() :
33
node
(
nullptr
),
34
argIndex
(0) {
35
}
36
37
inline
OperationPathNode
(
OperationNode<Base>
*
node
,
38
size_t
argIndex
) :
39
node
(
node
),
40
argIndex
(
argIndex
) {
41
}
42
43
inline
bool
operator<(
const
OperationPathNode<Base>
&
right
)
const
{
44
return
node
<
right
.node ||
argIndex
<
right
.argIndex;
45
}
46
47
};
48
49
template
<
class
Base>
50
inline
bool
operator==(
const
OperationPathNode<Base>
&
left
,
51
const
OperationPathNode<Base>
&
right
) {
52
return
left
.node ==
right
.node &&
left
.argIndex ==
right
.argIndex;
53
}
54
55
template
<
class
Base>
56
inline
bool
operator!=(
const
OperationPathNode<Base>
&
left
,
57
const
OperationPathNode<Base>
&
right
) {
58
return
left
.node !=
right
.node ||
left
.argIndex !=
right
.argIndex;
59
}
60
61
}
// END cg namespace
62
}
// END CppAD namespace
63
64
#endif
CppAD::cg::OperationNode
Definition
operation_node.hpp:28
CppAD
Definition
abstract_atomic_fun.hpp:19
CppAD::GreaterThanZero
bool GreaterThanZero(const cg::CG< Base > &x)
Definition
ordered.hpp:21
CppAD::cg::OperationPathNode
Definition
operation_path_node.hpp:22
CppAD::cg::OperationPathNode::node
OperationNode< Base > * node
Definition
operation_path_node.hpp:26
CppAD::cg::OperationPathNode::argIndex
size_t argIndex
Definition
operation_path_node.hpp:30
include
cppad
cg
operation_path_node.hpp
Generated on Tue Sep 10 2024 03:29:11 for CppADCodeGen by
1.10.0