26 #ifndef CASADI_GRAPH_BUILDER_HPP
27 #define CASADI_GRAPH_BUILDER_HPP
29 #include "function.hpp"
33 class GraphBuilderInternal;
51 public SWIG_IF_ELSE(PrintableCommon, Printable<GraphBuilder>) {
54 std::string
type_name()
const {
return "GraphBuilder"; }
67 GraphBuilder(
const std::string& name,
const std::vector<uint8_t>& model_data,
68 const std::string& format,
const Dict& opts =
Dict());
72 const std::string& name()
const;
76 casadi_int n_in()
const;
77 casadi_int n_out()
const;
78 std::vector<std::string> name_in()
const;
79 std::vector<std::string> name_out()
const;
81 std::vector<casadi_int> dimension(
const std::string& name)
const;
83 std::string dtype(
const std::string& name)
const;
85 std::vector<std::string> dimension_param(
const std::string& name)
const;
87 std::vector<std::string> dynamic_params()
const;
93 void bind_dim(
const std::string& param, casadi_int value);
95 void bind_shape(
const std::string& input_name,
const std::vector<casadi_int>& shape);
97 void set(
const std::string& input_name,
const std::vector<double>& value);
99 void set(
const std::string& input_name,
double value);
111 Function create(
const std::string& name,
112 const std::vector<std::string>& name_in,
113 const std::vector<std::string>& name_out,
Internal class for GraphBuilder.
A mutable, format-neutral interface to a computational-graph model.
std::string type_name() const
Readable name of the class.
Function create() const
Freeze into an evaluable Function, default naming.
GenericShared implements a reference counting framework similar for efficient and.
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.
std::string filename(const std::string &path)