1#ifndef CPPAD_CG_OPERATION_PATH_INCLUDED
2#define CPPAD_CG_OPERATION_PATH_INCLUDED
18#include <cppad/cg/operation_path_node.hpp>
19#include <cppad/cg/bidir_graph.hpp>
52 auto*
h =
root.getCodeHandler();
54 if(
h->isVisited(
root)) {
63 const auto&
args =
root.getArguments();
66 for(
size_t i = 0;
i <
args.size(); ++
i) {
68 if(
a.getOperation() !=
nullptr ) {
69 auto&
aNode = *
a.getOperation();
100 startNewOperationTreeVisit();
120 std::vector<std::vector<OperationPathNode<Base> > >
found;
122 startNewOperationTreeVisit();
125 std::vector<OperationPathNode<Base> >
path2node;
142 std::vector<SourceCodePath>&
found,
170 size_t size =
args.size();
171 for (
size_t i = 0;
i < size; ++
i) {
177 if (
found.size() == max) {
186inline std::vector<std::vector<OperationPathNode<Base> > > CodeHandler<Base>::findPathsFromNode(
const std::vector<SourceCodePath>
nodePaths,
193 size_t size =
path.size();
194 for (
size_t i = 0;
i < size - 1;
i++) {
196 if (
pnode.node == &node) {
std::vector< SourceCodePath > findPaths(Node &root, Node &target, size_t max)
const std::vector< Argument< Base > > & getArguments() const
bool GreaterThanZero(const cg::CG< Base > &x)