Prev Next cpp_graph_vector

@(@\newcommand{\W}[1]{ \; #1 \; } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\B}[1]{ {\bf #1} } \newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} } \newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} } \newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} } \newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }@)@ This is cppad-20221105 documentation. Here is a link to its current documentation .
C++ AD Graph Vector Values

Syntax

Size
size = graph_obj.discrete_name_vec_size()
size = graph_obj.atomic_name_vec_size()
size = graph_obj.print_text_vec_size()
size = graph_obj.constant_vec_size()
size = graph_obj.operator_vec_size()
size = graph_obj.operator_arg_size()
size = graph_obj.dependent_vec_size()

Get
discrete_name = graph_obj.discrete_name_vec_get(index)
atomic_name   = graph_obj.atomic_name_vec_get(index)
print_text    = graph_obj.print_text_vec_get(index)
constant      = graph_obj.constant_vec_get(index)
op_enum       = graph_obj.operator_vec_get(index)
argument      = graph_obj.operator_arg_get(index)
node_index    = graph_obj.dependent_vec_get(index)

Push Back
graph_obj.discrete_name_vec_push_back(discrete_name)
graph_obj.atomic_name_vec_push_back(atomic_name)
graph_obj.print_text_vec_push_back(print_text)
graph_obj.constant_vec_push_back(constant)
graph_obj.operator_vec_push_back(op_enum)
graph_obj.operator_arg_push_back(argument)
graph_obj.dependent_vec_push_back(node_index)

Find
discrete_index = graph_obj.discrete_name_vec_find(discrete_name)
atomic_index   = graph_obj.atomic_name_vec_find(atomic_name)
print_index    = graph_obj.print_text_vec_find(print_text)

Arguments
All of the member function arguments are either call by value or const.

size
is a size_t value equal to the current size of the specified vector.

index
is a size_t value that must be less than the current size of the specified vector.

push_back
The arguments for all the push_back functions are const. The size of the specified vector before a push_back, is the index in the vector corresponding to the argument value. The size of the vector after the push_back is the size before plus one.

graph_obj
is an cpp_graph object. It is const for the size, get, and find functions and not const for the push_back functions.

discrete_name
is a std::string equal to the name of a discrete function.

atomic_name
is a std::string equal to the name of an atomic_three function.

print_text
is a std::string equal to the text to be printed.

constant
is a double equal to the constant with the corresponding index in constant_vec.

op_enum
is the graph_op_enum for corresponding operator.

argument
is the size_t value for corresponding operator argument.

node_index
is the node index for the corresponding dependent variable with the corresponding index in dependent_vec .

discrete_index
is the index such that
    
discrete_name == graph_obj.discrete_name_vec_get(discrete_index)
If there is no such index,
    
discrete_index == graph_obj.discrete_name_vec_size()

atomic_index
is the index such that
    
atomic_name == graph_obj.atomic_name_vec_get(atomic_index)
If there is no such index,
    
atomic_index == graph_obj.atomic_name_vec_size()

print_index
is the index such that
    
print_text == graph_obj.print_text_vec_get(print_index)
If there is no such index,
    
print_index == graph_obj.print_text_vec_size()

Input File: include/cppad/core/graph/cpp_graph.hpp