26 #ifndef CASADI_GRAPH_BUILDER_HPP
27 #define CASADI_GRAPH_BUILDER_HPP
29 #include "function.hpp"
33 class GraphBuilderInternal;
53 public SWIG_IF_ELSE(PrintableCommon, Printable<GraphBuilder>) {
56 std::string
type_name()
const {
return "GraphBuilder"; }
69 GraphBuilder(
const std::string& name,
const std::vector<uint8_t>& model_data,
70 const std::string& format,
const Dict& opts =
Dict());
74 const std::string& name()
const;
78 casadi_int n_in()
const;
79 casadi_int n_out()
const;
80 std::vector<std::string> name_in()
const;
81 std::vector<std::string> name_out()
const;
83 std::vector<casadi_int> dimension(
const std::string& name)
const;
85 std::string dtype(
const std::string& name)
const;
87 std::vector<std::string> dimension_param(
const std::string& name)
const;
89 std::vector<std::string> dynamic_params()
const;
95 void bind_dim(
const std::string& param, casadi_int value);
97 void bind_shape(
const std::string& input_name,
const std::vector<casadi_int>& shape);
99 void set(
const std::string& input_name,
const std::vector<double>& value);
101 void set(
const std::string& input_name,
double value);
124 Function create(
const std::string& name,
125 const std::vector<std::string>& name_in,
126 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)