@casadi/casadi-wasm
Version:
CasADi — symbolic framework for algorithmic differentiation and numerical optimization, compiled to WebAssembly. Runs in Node.js with on-demand solver plugins (ipopt, fatrop, sundials, ...).
26,394 lines • 1.19 MB
JavaScript
// Generated by SWIG -wasm-js (NO Embind). Do not edit.
//
// Compile <name>.cpp with em++:
// em++ -O3 -fwasm-exceptions <name>.cpp libfoo.a \
// -s MODULARIZE=1 -s EXPORT_NAME=createWasm \
// -s EXPORTED_RUNTIME_METHODS='["UTF8ToString"]' \
// -s EXPORTED_FUNCTIONS=@<name>.exports \
// -o <name>_wasm.js
const createWasm = require('./casadi_wasm.js');
const __path = require('path');
module.exports = async function createcasadi() {
/* Resolve .wasm / .data file lookups relative to THIS file rather
than process.cwd(), so the module is callable from any cwd.
Critical for the MAIN_MODULE build where --preload-file plugins
ship as a sibling .data file. */
const M = await createWasm({
locateFile: (p, prefix) => __path.join(__dirname, p),
});
/* Optional plugin registration entry point. Defined when the
module was linked with statically-bundled plugins. Absent in
the standard MAIN_MODULE build, which loads plugins via the
dlopen path against preloaded SIDE_MODULE .so files. */
if (typeof M._swig_wasm_load_plugins === 'function') M._swig_wasm_load_plugins();
const __PRIVATE_CTOR = Symbol('swig-private-ctor');
const __unwrap = a => M.__swig_take_handle(a);
const __from_handle = h => M.__swig_release_handle(h);
const __unwrap_args = (...args) => args.map(__unwrap);
// Error-readback wrapper. Every wasm call site is wrapped in
// __chk() so a typemap conversion failure on the C++ side (which
// gotos `fail:` and returns the zero sentinel) surfaces as a JS
// Error instead of silently propagating a bogus value.
const __chk = (v) => {
const c = M._swig_last_error_code();
if (c !== 0) {
const m = M.UTF8ToString(M._swig_last_error_msg());
throw new Error(`SWIG error (${c}): ${m || 'conversion failed'}`);
}
return v;
};
function __arr_to_vec(arr, VecClass) {
if (arr && arr.constructor && arr.constructor.name === VecClass.name) return arr;
const v = new VecClass();
if (arr) for (const x of arr) v.push_back(x);
return v;
}
function __vec_to_arr(vec) {
if (!vec) return [];
const n = Number(vec.size());
const out = new Array(n);
for (let i = 0; i < n; ++i) out[i] = vec.at(i);
if (vec.delete) vec.delete();
return out;
}
function __can(arg, ClassName) {
if (arg == null) return true;
return arg && typeof arg === 'object' && arg.constructor && arg.constructor.name === ClassName;
}
function __can_vec(arg, ElemClassName, VecClassName) {
if (arg == null) return true;
if (Array.isArray(arg)) { return arg.length === 0 || (arg[0] && arg[0].constructor && arg[0].constructor.name === ElemClassName); }
return arg.constructor && arg.constructor.name === VecClassName;
}
function __mixin(D, ...Bs) {
for (const B of Bs) {
if (!B) continue;
for (const k of Object.getOwnPropertyNames(B)) {
if (k === 'length' || k === 'name' || k === 'prototype') continue;
if (Object.prototype.hasOwnProperty.call(D, k)) continue;
Object.defineProperty(D, k, Object.getOwnPropertyDescriptor(B, k));
}
if (!B.prototype) continue;
for (const k of Object.getOwnPropertyNames(B.prototype)) {
if (k === 'constructor') continue;
if (Object.prototype.hasOwnProperty.call(D.prototype, k)) continue;
Object.defineProperty(D.prototype, k, Object.getOwnPropertyDescriptor(B.prototype, k));
}
}
}
const __fr_std_vector_std_string_ = new FinalizationRegistry(p => M._swig_std_vector_std_string__delete(p));
class StringVector {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_std_vector_std_string_.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_StringVector(__unwrap(args[0]))) { __ptr = __chk(M._swig_std_vector_std_string__new_1(__unwrap(__arr_to_vec(args[0], StringVector)))); break; }
throw new TypeError(`StringVector: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_std_vector_std_string__new_0()); break;
}
default: throw new Error(`StringVector: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_std_vector_std_string_.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_std_vector_std_string_.unregister(this);
M._swig_std_vector_std_string__delete(this._ptr);
this._ptr = 0;
}
empty() {
return (!!(__chk(M._swig_std_vector_std_string__empty_0(__unwrap(this)))));
}
at(a0) {
return (()=>{const __p=__chk(M._swig_std_vector_std_string__at_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
size() {
return __chk(M._swig_std_vector_std_string__size_0(__unwrap(this)));
}
push_back(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_std_vector_std_string__push_back_0(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
clear() {
return __chk(M._swig_std_vector_std_string__clear_0(__unwrap(this)));
}
}
StringVector.prototype._swig_type = '_p_std__vectorT_std__string_t';
if (!Object.prototype.hasOwnProperty.call(StringVector.prototype, 'toString'))
StringVector.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
StringVector.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_std_vector_casadi_Sparsity_ = new FinalizationRegistry(p => M._swig_std_vector_casadi_Sparsity__delete(p));
class SparsityVector {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_std_vector_casadi_Sparsity_.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_SparsityVector(__unwrap(args[0]))) { __ptr = __chk(M._swig_std_vector_casadi_Sparsity__new_1(__unwrap(__arr_to_vec(args[0], SparsityVector)))); break; }
throw new TypeError(`SparsityVector: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_std_vector_casadi_Sparsity__new_0()); break;
}
default: throw new Error(`SparsityVector: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_std_vector_casadi_Sparsity_.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_std_vector_casadi_Sparsity_.unregister(this);
M._swig_std_vector_casadi_Sparsity__delete(this._ptr);
this._ptr = 0;
}
clear() {
return __chk(M._swig_std_vector_casadi_Sparsity__clear_0(__unwrap(this)));
}
at(a0) {
return __from_handle(__chk(M._swig_std_vector_casadi_Sparsity__at_0(__unwrap(this), a0)));
}
empty() {
return (!!(__chk(M._swig_std_vector_casadi_Sparsity__empty_0(__unwrap(this)))));
}
push_back(a0) {
return __chk(M._swig_std_vector_casadi_Sparsity__push_back_0(__unwrap(this), __unwrap(a0)));
}
size() {
return __chk(M._swig_std_vector_casadi_Sparsity__size_0(__unwrap(this)));
}
}
SparsityVector.prototype._swig_type = '_p_std__vectorT_casadi__Sparsity_t';
if (!Object.prototype.hasOwnProperty.call(SparsityVector.prototype, 'toString'))
SparsityVector.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
SparsityVector.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_std_vector_casadi_int_ = new FinalizationRegistry(p => M._swig_std_vector_casadi_int__delete(p));
class IntVector {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_std_vector_casadi_int_.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_IntVector(__unwrap(args[0]))) { __ptr = __chk(M._swig_std_vector_casadi_int__new_1(__unwrap(__arr_to_vec(args[0], IntVector)))); break; }
throw new TypeError(`IntVector: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_std_vector_casadi_int__new_0()); break;
}
default: throw new Error(`IntVector: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_std_vector_casadi_int_.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_std_vector_casadi_int_.unregister(this);
M._swig_std_vector_casadi_int__delete(this._ptr);
this._ptr = 0;
}
push_back(a0) {
return __chk(M._swig_std_vector_casadi_int__push_back_0(__unwrap(this), BigInt(a0)));
}
at(a0) {
return __chk(M._swig_std_vector_casadi_int__at_0(__unwrap(this), a0));
}
clear() {
return __chk(M._swig_std_vector_casadi_int__clear_0(__unwrap(this)));
}
empty() {
return (!!(__chk(M._swig_std_vector_casadi_int__empty_0(__unwrap(this)))));
}
size() {
return __chk(M._swig_std_vector_casadi_int__size_0(__unwrap(this)));
}
}
IntVector.prototype._swig_type = '_p_std__vectorT_casadi_int_t';
if (!Object.prototype.hasOwnProperty.call(IntVector.prototype, 'toString'))
IntVector.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
IntVector.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_std_vector_double_ = new FinalizationRegistry(p => M._swig_std_vector_double__delete(p));
class DoubleVector {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_std_vector_double_.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_DoubleVector(__unwrap(args[0]))) { __ptr = __chk(M._swig_std_vector_double__new_1(__unwrap(__arr_to_vec(args[0], DoubleVector)))); break; }
throw new TypeError(`DoubleVector: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_std_vector_double__new_0()); break;
}
default: throw new Error(`DoubleVector: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_std_vector_double_.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_std_vector_double_.unregister(this);
M._swig_std_vector_double__delete(this._ptr);
this._ptr = 0;
}
size() {
return __chk(M._swig_std_vector_double__size_0(__unwrap(this)));
}
empty() {
return (!!(__chk(M._swig_std_vector_double__empty_0(__unwrap(this)))));
}
clear() {
return __chk(M._swig_std_vector_double__clear_0(__unwrap(this)));
}
at(a0) {
return __chk(M._swig_std_vector_double__at_0(__unwrap(this), a0));
}
push_back(a0) {
return __chk(M._swig_std_vector_double__push_back_0(__unwrap(this), a0));
}
}
DoubleVector.prototype._swig_type = '_p_std__vectorT_double_t';
if (!Object.prototype.hasOwnProperty.call(DoubleVector.prototype, 'toString'))
DoubleVector.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
DoubleVector.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_std_vector_casadi_Matrix_double__ = new FinalizationRegistry(p => M._swig_std_vector_casadi_Matrix_double___delete(p));
class DMVector {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_std_vector_casadi_Matrix_double__.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_DMVector(__unwrap(args[0]))) { __ptr = __chk(M._swig_std_vector_casadi_Matrix_double___new_1(__unwrap(__arr_to_vec(args[0], DMVector)))); break; }
throw new TypeError(`DMVector: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_std_vector_casadi_Matrix_double___new_0()); break;
}
default: throw new Error(`DMVector: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_std_vector_casadi_Matrix_double__.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_std_vector_casadi_Matrix_double__.unregister(this);
M._swig_std_vector_casadi_Matrix_double___delete(this._ptr);
this._ptr = 0;
}
push_back(a0) {
return __chk(M._swig_std_vector_casadi_Matrix_double___push_back_0(__unwrap(this), __unwrap(a0)));
}
size() {
return __chk(M._swig_std_vector_casadi_Matrix_double___size_0(__unwrap(this)));
}
empty() {
return (!!(__chk(M._swig_std_vector_casadi_Matrix_double___empty_0(__unwrap(this)))));
}
clear() {
return __chk(M._swig_std_vector_casadi_Matrix_double___clear_0(__unwrap(this)));
}
at(a0) {
return __from_handle(__chk(M._swig_std_vector_casadi_Matrix_double___at_0(__unwrap(this), a0)));
}
}
DMVector.prototype._swig_type = '_p_std__vectorT_casadi__MatrixT_double_t_t';
if (!Object.prototype.hasOwnProperty.call(DMVector.prototype, 'toString'))
DMVector.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
DMVector.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_std_vector_casadi_Matrix_casadi_SXElem__ = new FinalizationRegistry(p => M._swig_std_vector_casadi_Matrix_casadi_SXElem___delete(p));
class SXVector {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_std_vector_casadi_Matrix_casadi_SXElem__.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_SXVector(__unwrap(args[0]))) { __ptr = __chk(M._swig_std_vector_casadi_Matrix_casadi_SXElem___new_1(__unwrap(__arr_to_vec(args[0], SXVector)))); break; }
throw new TypeError(`SXVector: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_std_vector_casadi_Matrix_casadi_SXElem___new_0()); break;
}
default: throw new Error(`SXVector: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_std_vector_casadi_Matrix_casadi_SXElem__.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_std_vector_casadi_Matrix_casadi_SXElem__.unregister(this);
M._swig_std_vector_casadi_Matrix_casadi_SXElem___delete(this._ptr);
this._ptr = 0;
}
at(a0) {
return __from_handle(__chk(M._swig_std_vector_casadi_Matrix_casadi_SXElem___at_0(__unwrap(this), a0)));
}
empty() {
return (!!(__chk(M._swig_std_vector_casadi_Matrix_casadi_SXElem___empty_0(__unwrap(this)))));
}
clear() {
return __chk(M._swig_std_vector_casadi_Matrix_casadi_SXElem___clear_0(__unwrap(this)));
}
size() {
return __chk(M._swig_std_vector_casadi_Matrix_casadi_SXElem___size_0(__unwrap(this)));
}
push_back(a0) {
return __chk(M._swig_std_vector_casadi_Matrix_casadi_SXElem___push_back_0(__unwrap(this), __unwrap(a0)));
}
}
SXVector.prototype._swig_type = '_p_std__vectorT_casadi__MatrixT_casadi__SXElem_t_t';
if (!Object.prototype.hasOwnProperty.call(SXVector.prototype, 'toString'))
SXVector.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
SXVector.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_std_vector_casadi_MX_ = new FinalizationRegistry(p => M._swig_std_vector_casadi_MX__delete(p));
class MXVector {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_std_vector_casadi_MX_.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_MXVector(__unwrap(args[0]))) { __ptr = __chk(M._swig_std_vector_casadi_MX__new_1(__unwrap(__arr_to_vec(args[0], MXVector)))); break; }
throw new TypeError(`MXVector: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_std_vector_casadi_MX__new_0()); break;
}
default: throw new Error(`MXVector: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_std_vector_casadi_MX_.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_std_vector_casadi_MX_.unregister(this);
M._swig_std_vector_casadi_MX__delete(this._ptr);
this._ptr = 0;
}
clear() {
return __chk(M._swig_std_vector_casadi_MX__clear_0(__unwrap(this)));
}
empty() {
return (!!(__chk(M._swig_std_vector_casadi_MX__empty_0(__unwrap(this)))));
}
at(a0) {
return __from_handle(__chk(M._swig_std_vector_casadi_MX__at_0(__unwrap(this), a0)));
}
size() {
return __chk(M._swig_std_vector_casadi_MX__size_0(__unwrap(this)));
}
push_back(a0) {
return __chk(M._swig_std_vector_casadi_MX__push_back_0(__unwrap(this), __unwrap(a0)));
}
}
MXVector.prototype._swig_type = '_p_std__vectorT_casadi__MX_t';
if (!Object.prototype.hasOwnProperty.call(MXVector.prototype, 'toString'))
MXVector.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
MXVector.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_std_vector_casadi_Function_ = new FinalizationRegistry(p => M._swig_std_vector_casadi_Function__delete(p));
class FunctionVector {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_std_vector_casadi_Function_.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_FunctionVector(__unwrap(args[0]))) { __ptr = __chk(M._swig_std_vector_casadi_Function__new_1(__unwrap(__arr_to_vec(args[0], FunctionVector)))); break; }
throw new TypeError(`FunctionVector: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_std_vector_casadi_Function__new_0()); break;
}
default: throw new Error(`FunctionVector: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_std_vector_casadi_Function_.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_std_vector_casadi_Function_.unregister(this);
M._swig_std_vector_casadi_Function__delete(this._ptr);
this._ptr = 0;
}
at(a0) {
return __from_handle(__chk(M._swig_std_vector_casadi_Function__at_0(__unwrap(this), a0)));
}
empty() {
return (!!(__chk(M._swig_std_vector_casadi_Function__empty_0(__unwrap(this)))));
}
clear() {
return __chk(M._swig_std_vector_casadi_Function__clear_0(__unwrap(this)));
}
push_back(a0) {
return __chk(M._swig_std_vector_casadi_Function__push_back_0(__unwrap(this), __unwrap(a0)));
}
size() {
return __chk(M._swig_std_vector_casadi_Function__size_0(__unwrap(this)));
}
}
FunctionVector.prototype._swig_type = '_p_std__vectorT_casadi__Function_t';
if (!Object.prototype.hasOwnProperty.call(FunctionVector.prototype, 'toString'))
FunctionVector.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
FunctionVector.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_PrintableCommon = new FinalizationRegistry(p => M._swig_casadi_PrintableCommon_delete(p));
class PrintableCommon {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_casadi_PrintableCommon.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_PrintableCommon(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_PrintableCommon_new_1(__unwrap(args[0]))); break; }
throw new TypeError(`PrintableCommon: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_PrintableCommon_new_0()); break;
}
default: throw new Error(`PrintableCommon: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_casadi_PrintableCommon.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_PrintableCommon.unregister(this);
M._swig_casadi_PrintableCommon_delete(this._ptr);
this._ptr = 0;
}
}
PrintableCommon.prototype._swig_type = '_p_casadi__PrintableCommon';
if (!Object.prototype.hasOwnProperty.call(PrintableCommon.prototype, 'toString'))
PrintableCommon.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
PrintableCommon.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_GenericShared_casadi_SharedObject_casadi_SharedObjectInternal_ = new FinalizationRegistry(p => M._swig_casadi_GenericShared_casadi_SharedObject_casadi_SharedObjectInternal__delete(p));
class GenSharedObject {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_casadi_GenericShared_casadi_SharedObject_casadi_SharedObjectInternal_.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_GenSharedObject(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_GenericShared_casadi_SharedObject_casadi_SharedObjectInternal__new_1(__unwrap(args[0]))); break; }
throw new TypeError(`GenSharedObject: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_GenericShared_casadi_SharedObject_casadi_SharedObjectInternal__new_0()); break;
}
default: throw new Error(`GenSharedObject: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_casadi_GenericShared_casadi_SharedObject_casadi_SharedObjectInternal_.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_GenericShared_casadi_SharedObject_casadi_SharedObjectInternal_.unregister(this);
M._swig_casadi_GenericShared_casadi_SharedObject_casadi_SharedObjectInternal__delete(this._ptr);
this._ptr = 0;
}
debug_repr() {
return (()=>{const __p=__chk(M._swig_casadi_GenericShared_casadi_SharedObject_casadi_SharedObjectInternal__debug_repr_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
is_null() {
return (!!(__chk(M._swig_casadi_GenericShared_casadi_SharedObject_casadi_SharedObjectInternal__is_null_0(__unwrap(this)))));
}
__hash__() {
return __chk(M._swig_casadi_GenericShared_casadi_SharedObject_casadi_SharedObjectInternal____hash___0(__unwrap(this)));
}
}
GenSharedObject.prototype._swig_type = '_p_casadi__GenericSharedT_casadi__SharedObject_casadi__SharedObjectInternal_t';
if (!Object.prototype.hasOwnProperty.call(GenSharedObject.prototype, 'toString'))
GenSharedObject.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
GenSharedObject.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_GenericWeakRef_casadi_SharedObject_casadi_SharedObjectInternal_ = new FinalizationRegistry(p => M._swig_casadi_GenericWeakRef_casadi_SharedObject_casadi_SharedObjectInternal__delete(p));
class GenWeakRef extends GenSharedObject {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_GenericWeakRef_casadi_SharedObject_casadi_SharedObjectInternal_.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) { __ptr = __chk(M._swig_casadi_GenericWeakRef_casadi_SharedObject_casadi_SharedObjectInternal__new_0(args[0])); break; }
if (M._swig_can_SharedObject(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_GenericWeakRef_casadi_SharedObject_casadi_SharedObjectInternal__new_1(__unwrap(args[0]))); break; }
if (M._swig_can_GenWeakRef(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_GenericWeakRef_casadi_SharedObject_casadi_SharedObjectInternal__new_2(__unwrap(args[0]))); break; }
throw new TypeError(`GenWeakRef: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_GenericWeakRef_casadi_SharedObject_casadi_SharedObjectInternal__new_0(0n)); break;
}
default: throw new Error(`GenWeakRef: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_GenericWeakRef_casadi_SharedObject_casadi_SharedObjectInternal_.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_GenericWeakRef_casadi_SharedObject_casadi_SharedObjectInternal_.unregister(this);
M._swig_casadi_GenericWeakRef_casadi_SharedObject_casadi_SharedObjectInternal__delete(this._ptr);
this._ptr = 0;
}
is_null() {
return (!!(__chk(M._swig_casadi_GenericWeakRef_casadi_SharedObject_casadi_SharedObjectInternal__is_null_0(__unwrap(this)))));
}
alive() {
return (!!(__chk(M._swig_casadi_GenericWeakRef_casadi_SharedObject_casadi_SharedObjectInternal__alive_0(__unwrap(this)))));
}
shared() {
return __from_handle(__chk(M._swig_casadi_GenericWeakRef_casadi_SharedObject_casadi_SharedObjectInternal__shared_0(__unwrap(this))));
}
shared_if_alive(a0) {
return (!!(__chk(M._swig_casadi_GenericWeakRef_casadi_SharedObject_casadi_SharedObjectInternal__shared_if_alive_0(__unwrap(this), a0))));
}
}
GenWeakRef.prototype._swig_type = '_p_casadi__GenericWeakRefT_casadi__SharedObject_casadi__SharedObjectInternal_t';
if (!Object.prototype.hasOwnProperty.call(GenWeakRef.prototype, 'toString'))
GenWeakRef.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
GenWeakRef.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_SharedObject = new FinalizationRegistry(p => M._swig_casadi_SharedObject_delete(p));
class SharedObject extends GenSharedObject {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_SharedObject.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_SharedObject(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_SharedObject_new_1(__unwrap(args[0]))); break; }
throw new TypeError(`SharedObject: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_SharedObject_new_0()); break;
}
default: throw new Error(`SharedObject: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_SharedObject.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_SharedObject.unregister(this);
M._swig_casadi_SharedObject_delete(this._ptr);
this._ptr = 0;
}
str(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_SharedObject_get_str_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 0: {
const [] = args;
const a0 = false;
return (()=>{const __p=__chk(M._swig_casadi_SharedObject_get_str_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`SharedObject.str: no overload for ${args.length} args`);
}
}
class_name() {
return (()=>{const __p=__chk(M._swig_casadi_SharedObject_class_name_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
print_ptr() {
return __chk(M._swig_casadi_SharedObject_print_ptr_0(__unwrap(this)));
}
disp(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_SharedObject_disp_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = false;
return __chk(M._swig_casadi_SharedObject_disp_0(__unwrap(this), a0));
}
default: throw new Error(`SharedObject.disp: no overload for ${args.length} args`);
}
}
}
SharedObject.prototype._swig_type = '_p_casadi__SharedObject';
if (!Object.prototype.hasOwnProperty.call(SharedObject.prototype, 'toString'))
SharedObject.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
SharedObject.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_WeakRef = new FinalizationRegistry(p => M._swig_casadi_WeakRef_delete(p));
class WeakRef extends GenWeakRef {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_WeakRef.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) { __ptr = __chk(M._swig_casadi_WeakRef_new_0(args[0])); break; }
if (M._swig_can_SharedObject(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_WeakRef_new_1(__unwrap(args[0]))); break; }
if (M._swig_can_WeakRef(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_WeakRef_new_2(__unwrap(args[0]))); break; }
throw new TypeError(`WeakRef: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_WeakRef_new_0(0n)); break;
}
default: throw new Error(`WeakRef: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_WeakRef.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_WeakRef.unregister(this);
M._swig_casadi_WeakRef_delete(this._ptr);
this._ptr = 0;
}
}
WeakRef.prototype._swig_type = '_p_casadi__WeakRef';
if (!Object.prototype.hasOwnProperty.call(WeakRef.prototype, 'toString'))
WeakRef.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
WeakRef.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_StreamStateGuard = new FinalizationRegistry(p => M._swig_casadi_StreamStateGuard_delete(p));
class StreamStateGuard {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_casadi_StreamStateGuard.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_StreamStateGuard(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_StreamStateGuard_new_1(__unwrap(args[0]))); break; }
__ptr = __chk(M._swig_casadi_StreamStateGuard_new_0(args[0])); break;
}
default: throw new Error(`StreamStateGuard: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_casadi_StreamStateGuard.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_StreamStateGuard.unregister(this);
M._swig_casadi_StreamStateGuard_delete(this._ptr);
this._ptr = 0;
}
}
StreamStateGuard.prototype._swig_type = '_p_casadi__StreamStateGuard';
if (!Object.prototype.hasOwnProperty.call(StreamStateGuard.prototype, 'toString'))
StreamStateGuard.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
StreamStateGuard.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_GenericType = new FinalizationRegistry(p => M._swig_casadi_GenericType_delete(p));
class GenericType extends PrintableCommon {
static deserialize(a0) {
return __from_handle(__chk(M._swig_casadi_GenericType_static_deserialize_0(a0)));
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_GenericType.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_GenericType(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_GenericType_new_1(__unwrap(args[0]))); break; }
throw new TypeError(`GenericType: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_GenericType_new_0()); break;
}
default: throw new Error(`GenericType: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_GenericType.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_GenericType.unregister(this);
M._swig_casadi_GenericType_delete(this._ptr);
this._ptr = 0;
}
serialize(a0) {
return __chk(M._swig_casadi_GenericType_serialize_0(__unwrap(this), a0));
}
}
GenericType.prototype._swig_type = '_p_casadi__GenericType';
if (!Object.prototype.hasOwnProperty.call(GenericType.prototype, 'toString'))
GenericType.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
GenericType.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_SparsityInterfaceCommon = new FinalizationRegistry(p => M._swig_casadi_SparsityInterfaceCommon_delete(p));
class SparsityInterfaceCommon {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_casadi_SparsityInterfaceCommon.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_SparsityInterfaceCommon(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_SparsityInterfaceCommon_new_1(__unwrap(args[0]))); break; }
throw new TypeError(`SparsityInterfaceCommon: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_SparsityInterfaceCommon_new_0()); break;
}
default: throw new Error(`SparsityInterfaceCommon: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_casadi_SparsityInterfaceCommon.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_SparsityInterfaceCommon.unregister(this);
M._swig_casadi_SparsityInterfaceCommon_delete(this._ptr);
this._ptr = 0;
}
}
SparsityInterfaceCommon.prototype._swig_type = '_p_casadi__SparsityInterfaceCommon';
if (!Object.prototype.hasOwnProperty.call(SparsityInterfaceCommon.prototype, 'toString'))
SparsityInterfaceCommon.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
SparsityInterfaceCommon.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_Sparsity = new FinalizationRegistry(p => M._swig_casadi_Sparsity_delete(p));
class Sparsity extends SharedObject {
static test_cast(a0) {
return (!!(__chk(M._swig_casadi_Sparsity_static_test_cast_0(a0))));
}
static scalar(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Sparsity_static_scalar_0(a0)));
}
case 0: {
const [] = args;
const a0 = true;
return __from_handle(__chk(M._swig_casadi_Sparsity_static_scalar_0(a0)));
}
default: throw new Error(`Sparsity.scalar: no overload for ${args.length} args`);
}
}
static deserialize(...args) {
switch (args.length) {
case 1: {
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_static_deserialize_1(__ps1)));
M._free(__ps1);
return __r;
}
{
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Sparsity_static_deserialize_0(a0)));
}
}
default: throw new Error(`Sparsity.deserialize: no overload for ${args.length} args`);
}
}
static diag(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Sparsity_static_diag_0(BigInt(a0))));
}
if (M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Sparsity_static_diag_2(__unwrap(a0))));
}
throw new TypeError(`Sparsity.diag: no overload matches arg types at arity 1`);
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Sparsity_static_diag_1(BigInt(a0), BigInt(a1))));
}
default: throw new Error(`Sparsity.diag: no overload for ${args.length} args`);
}
}
static type_name() {
return (()=>{const __p=__chk(M._swig_casadi_Sparsity_static_type_name_0());const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
static permutation(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_static_permutation_0(__unwrap(__vp1), a1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
case 2: {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_static_permutation_0(__unwrap(__vp1), a1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
default: throw new Error(`Sparsity.permutation: no overload for ${args.length} args`);
}
}
static triplet(...args) {
switch (args.length) {
case 4: {
const [a0, a1, a2, a3] = args;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_static_triplet_1(BigInt(a0), BigInt(a1), __unwrap(__vp3), __unwrap(__vp4))));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
case 5: {
const [a0, a1, a2, a3, a4] = args;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_static_triplet_0(BigInt(a0), BigInt(a1), __unwrap(__vp3), __unwrap(__vp4), a4)));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
default: throw new Error(`Sparsity.triplet: no overload for ${args.length} args`);
}
}
static kkt(...args) {
switch (args.length) {
case 2: {
const [a0, a1] = args;
const a2 = true;
const a3 = true;
return __from_handle(__chk(M._swig_casadi_Sparsity_static_kkt_0(__unwrap(a0), __unwrap(a1), a2, a3)));
}
case 3: {
const [a0, a1, a2] = args;
const a3 = true;
return __from_handle(__chk(M._swig_casadi_Sparsity_static_kkt_0(__unwrap(a0), __unwrap(a1), a2, a3)));
}
case 4: {
const [a0, a1, a2, a3] = args;
return __from_handle(__chk(M._swig_casadi_Sparsity_static_kkt_0(__unwrap(a0), __unwrap(a1), a2, a3)));
}
default: throw new Error(`Sparsity.kkt: no overload for ${args.length} args`);
}
}
static nonzeros(...args) {
switch (args.length) {
case 3: {
const [a0, a1, a2] = args;
const a3 = false;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_static_nonzeros_0(BigInt(a0), BigInt(a1), __unwrap(__vp3), a3)));
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
case 4: {
const [a0, a1, a2, a3] = args;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_static_nonzeros_0(BigInt(a0), BigInt(a1), __unwrap(__vp3), a3)));
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
default: throw new Error(`Sparsity.nonzeros: no overload for ${args.length} args`);
}
}
static from_file(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = "";
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_static_from_file_0(__ps1, __ps2)));
M._free(__ps1);
M._free(__ps2);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_static_from_file_0(__ps1, __ps2)));
M._free(__ps1);
M._free(__ps2);
return __r;
}
default: throw new Error(`Sparsity.from_file: no overload for ${args.length} args`);
}
}
static compressed(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_static_compressed_0(__unwrap(__vp1), a1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
case 2: {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_static_compressed_0(__unwrap(__vp1), a1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
default: throw new Error(`Sparsity.compressed: no overload for ${args.length} args`);
}
}
static banded(a0, a1) {
return __from_handle(__chk(M._swig_casadi_Sparsity_static_banded_0(BigInt(a0), BigInt(a1))));
}
static unit(a0, a1) {
return __from_handle(__chk(M._swig_casadi_Sparsity_static_unit_0(BigInt(a0), BigInt(a1))));
}
static dense(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_Sparsity_static_dense_0(BigInt(a0), BigInt(a1))));
}
if (M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Sparsity_static_dense_1(__unwrap(a0))));
}
throw new TypeError(`Sparsity.dense: no overload matches arg types at arity 1`);
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Sparsity_static_dense_0(BigInt(a0), BigInt(a1))));
}
default: throw new Error(`Sparsity.dense: no overload for ${args.length} args`);
}
}
static lower(a0) {
return __from_handle(__chk(M._swig_casadi_Sparsity_static_lower_0(BigInt(a0))));
}
static rowcol(a0, a1, a2, a3) {
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_static_rowcol_0(__unwrap(__vp1), __unwrap(__vp2), BigInt(a2), BigInt(a3))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
static upper(a0) {
return __from_handle(__chk(M._swig_casadi_Sparsity_static_upper_0(BigInt(a0))));
}
static band(a0, a1) {
return __from_handle(__chk(M._swig_casadi_Sparsity_static_band_0(BigInt(a0), BigInt(a1))));
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_Sparsity.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) { __ptr = __chk(M._swig_casadi_Sparsity_new_0(BigInt(args[0]))); break; }
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) { __ptr = __chk(M._swig_casadi_Sparsity_new_3(args[0])); break; }
if (M._swig_can_Sparsity(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_Sparsity_new_4(__unwrap(args[0]))); break; }
throw new TypeError(`Sparsity: arg-type mismatch at length 1`);
}
case 2: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) { __ptr = __chk(M._swig_casadi_Sparsity_new_1(BigInt(args[0]), BigInt(args[1]))); break; }
throw new TypeError(`Sparsity: arg-type mismatch at length 2`);
}
case 4: {
if (M._swig_can_IntVector(__unwrap(args[2])) && M._swig_can_IntVector(__unwrap(args[3])) && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) { __ptr = __chk(M._swig_casadi_Sparsity_new_2(BigInt(args[0]), BigInt(args[1]), __unwrap(__arr_to_vec(args[2], IntVector)), __unwrap(__arr_to_vec(args[3], IntVector)), false)); break; }
throw new TypeError(`Sparsity: arg-type mismatch at length 4`);
}
case 5: {
if (M._swig_can_IntVector(__unwrap(args[2])) && M._swig_can_IntVector(__unwrap(args[3])) && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[4] === 'boolean')) { __ptr = __chk(M._swig_casadi_Sparsity_new_2(BigInt(args[0]), BigInt(args[1]), __unwrap(__arr_to_vec(args[2], IntVector)), __unwrap(__arr_to_vec(args[3], IntVector)), args[4])); break; }
throw new TypeError(`Sparsity: arg-type mismatch at length 5`);
}
case 0: {
__ptr = __chk(M._swig_casadi_Sparsity_new_0(0n)); break;
}
default: throw new Error(`Sparsity: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_Sparsity.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_Sparsity.unregister(this);
M._swig_casadi_Sparsity_delete(this._ptr);
this._ptr = 0;
}
resize(a0, a1) {
return __chk(M._swig_casadi_Sparsity_resize_0(__unwrap(this), BigInt(a0), BigInt(a1)));
}
add_nz(a0, a1) {
return __chk(M._swig_casadi_Sparsity_add_nz_0(__unwrap(this), BigInt(a0), BigInt(a1)));
}
is_diag() {
return (!!(__chk(M._swig_casadi_Sparsity_is_diag_0(__unwrap(this)))));
}
is_square() {
return (!!(__chk(M._swig_casadi_Sparsity_is_square_0(__unwrap(this)))));
}
combine(a0, a1, a2) {
return __from_handle(__chk(M._swig_casadi_Sparsity_combine_0(__unwrap(this), __unwrap(a0), a1, a2)));
}
pmult(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = true;
const a2 = true;
const a3 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_pmult_0(__unwrap(this), __unwrap(__vp1), a1, a2, a3)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
case 2: {
const [a0, a1] = args;
const a2 = true;
const a3 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_pmult_0(__unwrap(this), __unwrap(__vp1), a1, a2, a3)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
case 3: {
const [a0, a1, a2] = args;
const a3 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_pmult_0(__unwrap(this), __unwrap(__vp1), a1, a2, a3)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
case 4: {
const [a0, a1, a2, a3] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_pmult_0(__unwrap(this), __unwrap(__vp1), a1, a2, a3)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
default: throw new Error(`Sparsity.pmult: no overload for ${args.length} args`);
}
}
is_orthonormal_rows(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_Sparsity_is_orthonormal_rows_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = false;
return (!!(__chk(M._swig_casadi_Sparsity_is_orthonormal_rows_0(__unwrap(this), a0))));
}
default: throw new Error(`Sparsity.is_orthonormal_rows: no overload for ${args.length} args`);
}
}
rowsSequential(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_Sparsity_rowsSequential_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = true;
return (!!(__chk(M._swig_casadi_Sparsity_rowsSequential_0(__unwrap(this), a0))));
}
default: throw new Error(`Sparsity.rowsSequential: no overload for ${args.length} args`);
}
}
is_column() {
return (!!(__chk(M._swig_casadi_Sparsity_is_column_0(__unwrap(this)))));
}
uni_coloring(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = undefined;
return __from_handle(__chk(M._swig_casadi_Sparsity_uni_coloring_0(__unwrap(this), __unwrap(a0), BigInt(a1))));
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Sparsity_uni_coloring_0(__unwrap(this), __unwrap(a0), BigInt(a1))));
}
case 0: {
const [] = args;
const a0 = new Sparsity();
const a1 = undefined;
return __from_handle(__chk(M._swig_casadi_Sparsity_uni_coloring_0(__unwrap(this), __unwrap(a0), BigInt(a1))));
}
default: throw new Error(`Sparsity.uni_coloring: no overload for ${args.length} args`);
}
}
append(a0) {
return __chk(M._swig_casadi_Sparsity_append_0(__unwrap(this), __unwrap(a0)));
}
bw_lower() {
return __chk(M._swig_casadi_Sparsity_bw_lower_0(__unwrap(this)));
}
get_col() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_get_col_0(__unwrap(this)))));
}
enlargeColumns(...args) {
switch (args.length) {
case 2: {
const [a0, a1] = args;
const a2 = false;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_Sparsity_enlargeColumns_0(__unwrap(this), BigInt(a0), __unwrap(__vp2), a2));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
case 3: {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_Sparsity_enlargeColumns_0(__unwrap(this), BigInt(a0), __unwrap(__vp2), a2));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
default: throw new Error(`Sparsity.enlargeColumns: no overload for ${args.length} args`);
}
}
dfs(a0, a1, a2, a3, a4, a5) {
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new IntVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
const __r = __chk(M._swig_casadi_Sparsity_dfs_0(__unwrap(this), BigInt(a0), BigInt(a1), __unwrap(__vp3), __unwrap(__vp4), __unwrap(__vp5), a5));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
if (__vown5 && __vp5.delete) __vp5.delete();
return __r;
}
nnz_diag() {
return __chk(M._swig_casadi_Sparsity_nnz_diag_0(__unwrap(this)));
}
spy() {
return __chk(M._swig_casadi_Sparsity_spy_0(__unwrap(this)));
}
is_selection(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_Sparsity_is_selection_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = false;
return (!!(__chk(M._swig_casadi_Sparsity_is_selection_0(__unwrap(this), a0))));
}
default: throw new Error(`Sparsity.is_selection: no overload for ${args.length} args`);
}
}
to_file(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = "";
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_Sparsity_to_file_0(__unwrap(this), __ps1, __ps2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_Sparsity_to_file_0(__unwrap(this), __ps1, __ps2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
default: throw new Error(`Sparsity.to_file: no overload for ${args.length} args`);
}
}
enlarge(...args) {
switch (args.length) {
case 4: {
const [a0, a1, a2, a3] = args;
const a4 = false;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __chk(M._swig_casadi_Sparsity_enlarge_0(__unwrap(this), BigInt(a0), BigInt(a1), __unwrap(__vp3), __unwrap(__vp4), a4));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
case 5: {
const [a0, a1, a2, a3, a4] = args;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __chk(M._swig_casadi_Sparsity_enlarge_0(__unwrap(this), BigInt(a0), BigInt(a1), __unwrap(__vp3), __unwrap(__vp4), a4));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
default: throw new Error(`Sparsity.enlarge: no overload for ${args.length} args`);
}
}
serialize(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Sparsity_serialize_1(__unwrap(this), a0));
}
case 0: {
const [] = args;
return (()=>{const __p=__chk(M._swig_casadi_Sparsity_serialize_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`Sparsity.serialize: no overload for ${args.length} args`);
}
}
get_ccs() {
return __chk(M._swig_casadi_Sparsity_get_ccs_0(__unwrap(this)));
}
info() {
return M.__swig_release_handle(__chk(M._swig_casadi_Sparsity_info_0(__unwrap(this))));
}
is_symmetric() {
return (!!(__chk(M._swig_casadi_Sparsity_is_symmetric_0(__unwrap(this)))));
}
star_coloring2(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = undefined;
return __from_handle(__chk(M._swig_casadi_Sparsity_star_coloring2_0(__unwrap(this), BigInt(a0), BigInt(a1))));
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Sparsity_star_coloring2_0(__unwrap(this), BigInt(a0), BigInt(a1))));
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = undefined;
return __from_handle(__chk(M._swig_casadi_Sparsity_star_coloring2_0(__unwrap(this), BigInt(a0), BigInt(a1))));
}
default: throw new Error(`Sparsity.star_coloring2: no overload for ${args.length} args`);
}
}
get_upper() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_get_upper_0(__unwrap(this)))));
}
rows() {
return __chk(M._swig_casadi_Sparsity_rows_0(__unwrap(this)));
}
btf() {
return __chk(M._swig_casadi_Sparsity_btf_0(__unwrap(this)));
}
get_diag() {
return __from_handle(__chk(M._swig_casadi_Sparsity_get_diag_0(__unwrap(this))));
}
repr_el(a0) {
return (()=>{const __p=__chk(M._swig_casadi_Sparsity_repr_el_0(__unwrap(this), BigInt(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
transpose(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Sparsity_transpose_0(__unwrap(this), a0)));
}
case 0: {
const [] = args;
const a0 = false;
return __from_handle(__chk(M._swig_casadi_Sparsity_transpose_0(__unwrap(this), a0)));
}
default: throw new Error(`Sparsity.transpose: no overload for ${args.length} args`);
}
}
dim(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_Sparsity_dim_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 0: {
const [] = args;
const a0 = false;
return (()=>{const __p=__chk(M._swig_casadi_Sparsity_dim_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`Sparsity.dim: no overload for ${args.length} args`);
}
}
spy_matlab(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Sparsity_spy_matlab_0(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
density() {
return __chk(M._swig_casadi_Sparsity_density_0(__unwrap(this)));
}
erase(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_erase_1(__unwrap(this), __unwrap(__vp1), a1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
case 2: {
if (M._swig_can_IntVector(__unwrap(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_erase_0(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2), a2))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (M._swig_can_IntVector(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_erase_1(__unwrap(this), __unwrap(__vp1), a1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`Sparsity.erase: no overload matches arg types at arity 2`);
}
case 3: {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_erase_0(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2), a2))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
default: throw new Error(`Sparsity.erase: no overload for ${args.length} args`);
}
}
is_dense() {
return (!!(__chk(M._swig_casadi_Sparsity_is_dense_0(__unwrap(this)))));
}
get_nz(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_get_nz_2(__unwrap(this), __unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
case 2: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_Sparsity_get_nz_0(__unwrap(this), BigInt(a0), BigInt(a1)));
}
if (M._swig_can_IntVector(__unwrap(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_get_nz_1(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`Sparsity.get_nz: no overload matches arg types at arity 2`);
}
default: throw new Error(`Sparsity.get_nz: no overload for ${args.length} args`);
}
}
export_code(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Sparsity_export_code_0(__unwrap(this), __ps1, __unwrap(a1)));
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Sparsity_export_code_0(__unwrap(this), __ps1, __unwrap(a1)));
M._free(__ps1);
return __r;
}
default: throw new Error(`Sparsity.export_code: no overload for ${args.length} args`);
}
}
nnz() {
return __chk(M._swig_casadi_Sparsity_nnz_0(__unwrap(this)));
}
nnz_lower(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Sparsity_nnz_lower_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = false;
return __chk(M._swig_casadi_Sparsity_nnz_lower_0(__unwrap(this), a0));
}
default: throw new Error(`Sparsity.nnz_lower: no overload for ${args.length} args`);
}
}
is_empty(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_Sparsity_is_empty_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = false;
return (!!(__chk(M._swig_casadi_Sparsity_is_empty_0(__unwrap(this), a0))));
}
default: throw new Error(`Sparsity.is_empty: no overload for ${args.length} args`);
}
}
colind(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Sparsity_colind_0(__unwrap(this), BigInt(a0)));
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_get_colind_0(__unwrap(this)))));
}
default: throw new Error(`Sparsity.colind: no overload for ${args.length} args`);
}
}
is_row() {
return (!!(__chk(M._swig_casadi_Sparsity_is_row_0(__unwrap(this)))));
}
largest_first() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_largest_first_0(__unwrap(this)))));
}
bw_upper() {
return __chk(M._swig_casadi_Sparsity_bw_upper_0(__unwrap(this)));
}
is_reshape(a0) {
return (!!(__chk(M._swig_casadi_Sparsity_is_reshape_0(__unwrap(this), __unwrap(a0)))));
}
is_subset(a0) {
return (!!(__chk(M._swig_casadi_Sparsity_is_subset_0(__unwrap(this), __unwrap(a0)))));
}
scc() {
return __chk(M._swig_casadi_Sparsity_scc_0(__unwrap(this)));
}
hash() {
return __chk(M._swig_casadi_Sparsity_hash_0(__unwrap(this)));
}
get_crs() {
return __chk(M._swig_casadi_Sparsity_get_crs_0(__unwrap(this)));
}
ldl(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Sparsity_ldl_0(__unwrap(this), a0)));
}
case 0: {
const [] = args;
const a0 = true;
return __from_handle(__chk(M._swig_casadi_Sparsity_ldl_0(__unwrap(this), a0)));
}
default: throw new Error(`Sparsity.ldl: no overload for ${args.length} args`);
}
}
size(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Sparsity_size_1(__unwrap(this), BigInt(a0)));
}
case 0: {
const [] = args;
return __chk(M._swig_casadi_Sparsity_size_0(__unwrap(this)));
}
default: throw new Error(`Sparsity.size: no overload for ${args.length} args`);
}
}
is_scalar(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_Sparsity_is_scalar_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = false;
return (!!(__chk(M._swig_casadi_Sparsity_is_scalar_0(__unwrap(this), a0))));
}
default: throw new Error(`Sparsity.is_scalar: no overload for ${args.length} args`);
}
}
amd() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_amd_0(__unwrap(this)))));
}
has_nz(a0, a1) {
return (!!(__chk(M._swig_casadi_Sparsity_has_nz_0(__unwrap(this), BigInt(a0), BigInt(a1)))));
}
size1() {
return __chk(M._swig_casadi_Sparsity_size1_0(__unwrap(this)));
}
size2() {
return __chk(M._swig_casadi_Sparsity_size2_0(__unwrap(this)));
}
is_compactible() {
return (!!(__chk(M._swig_casadi_Sparsity_is_compactible_0(__unwrap(this)))));
}
removeDuplicates(a0) {
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_removeDuplicates_0(__unwrap(this), __unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
is_singular() {
return (!!(__chk(M._swig_casadi_Sparsity_is_singular_0(__unwrap(this)))));
}
is_permutation() {
return (!!(__chk(M._swig_casadi_Sparsity_is_permutation_0(__unwrap(this)))));
}
numel() {
return __chk(M._swig_casadi_Sparsity_numel_0(__unwrap(this)));
}
is_orthonormal_columns(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_Sparsity_is_orthonormal_columns_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = false;
return (!!(__chk(M._swig_casadi_Sparsity_is_orthonormal_columns_0(__unwrap(this), a0))));
}
default: throw new Error(`Sparsity.is_orthonormal_columns: no overload for ${args.length} args`);
}
}
etree(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_etree_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = false;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_etree_0(__unwrap(this), a0))));
}
default: throw new Error(`Sparsity.etree: no overload for ${args.length} args`);
}
}
postfix_dim() {
return (()=>{const __p=__chk(M._swig_casadi_Sparsity_postfix_dim_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
T() {
return __from_handle(__chk(M._swig_casadi_Sparsity_T_0(__unwrap(this))));
}
qr_sparse(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Sparsity_qr_sparse_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = true;
return __chk(M._swig_casadi_Sparsity_qr_sparse_0(__unwrap(this), a0));
}
default: throw new Error(`Sparsity.qr_sparse: no overload for ${args.length} args`);
}
}
is_orthonormal(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_Sparsity_is_orthonormal_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = false;
return (!!(__chk(M._swig_casadi_Sparsity_is_orthonormal_0(__unwrap(this), a0))));
}
default: throw new Error(`Sparsity.is_orthonormal: no overload for ${args.length} args`);
}
}
is_stacked(a0, a1) {
return (!!(__chk(M._swig_casadi_Sparsity_is_stacked_0(__unwrap(this), __unwrap(a0), BigInt(a1)))));
}
pattern_inverse() {
return __from_handle(__chk(M._swig_casadi_Sparsity_pattern_inverse_0(__unwrap(this))));
}
is_transpose(a0) {
return (!!(__chk(M._swig_casadi_Sparsity_is_transpose_0(__unwrap(this), __unwrap(a0)))));
}
intersect(a0) {
return __from_handle(__chk(M._swig_casadi_Sparsity_intersect_0(__unwrap(this), __unwrap(a0))));
}
star_coloring(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = undefined;
return __from_handle(__chk(M._swig_casadi_Sparsity_star_coloring_0(__unwrap(this), BigInt(a0), BigInt(a1))));
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Sparsity_star_coloring_0(__unwrap(this), BigInt(a0), BigInt(a1))));
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = undefined;
return __from_handle(__chk(M._swig_casadi_Sparsity_star_coloring_0(__unwrap(this), BigInt(a0), BigInt(a1))));
}
default: throw new Error(`Sparsity.star_coloring: no overload for ${args.length} args`);
}
}
permutation_vector(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_permutation_vector_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = false;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_permutation_vector_0(__unwrap(this), a0))));
}
default: throw new Error(`Sparsity.permutation_vector: no overload for ${args.length} args`);
}
}
nnz_upper(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Sparsity_nnz_upper_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = false;
return __chk(M._swig_casadi_Sparsity_nnz_upper_0(__unwrap(this), a0));
}
default: throw new Error(`Sparsity.nnz_upper: no overload for ${args.length} args`);
}
}
columns() {
return __chk(M._swig_casadi_Sparsity_columns_0(__unwrap(this)));
}
compress(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_compress_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = true;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_compress_0(__unwrap(this), a0))));
}
default: throw new Error(`Sparsity.compress: no overload for ${args.length} args`);
}
}
sparsity_cast_mod(a0, a1) {
return __from_handle(__chk(M._swig_casadi_Sparsity_sparsity_cast_mod_0(__unwrap(this), __unwrap(a0), __unwrap(a1))));
}
find(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_find_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = false;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_find_0(__unwrap(this), a0))));
}
default: throw new Error(`Sparsity.find: no overload for ${args.length} args`);
}
}
is_equal(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_Sparsity_is_equal_0(__unwrap(this), __unwrap(a0)))));
}
case 4: {
const [a0, a1, a2, a3] = args;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_Sparsity_is_equal_1(__unwrap(this), BigInt(a0), BigInt(a1), __unwrap(__vp3), __unwrap(__vp4)))));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
default: throw new Error(`Sparsity.is_equal: no overload for ${args.length} args`);
}
}
is_tril(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_Sparsity_is_tril_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = false;
return (!!(__chk(M._swig_casadi_Sparsity_is_tril_0(__unwrap(this), a0))));
}
default: throw new Error(`Sparsity.is_tril: no overload for ${args.length} args`);
}
}
get_triplet() {
return __chk(M._swig_casadi_Sparsity_get_triplet_0(__unwrap(this)));
}
enlargeRows(...args) {
switch (args.length) {
case 2: {
const [a0, a1] = args;
const a2 = false;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_Sparsity_enlargeRows_0(__unwrap(this), BigInt(a0), __unwrap(__vp2), a2));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
case 3: {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_Sparsity_enlargeRows_0(__unwrap(this), BigInt(a0), __unwrap(__vp2), a2));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
default: throw new Error(`Sparsity.enlargeRows: no overload for ${args.length} args`);
}
}
get_lower() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_get_lower_0(__unwrap(this)))));
}
makeDense() {
return __from_handle(__chk(M._swig_casadi_Sparsity_makeDense_0(__unwrap(this))));
}
appendColumns(a0) {
return __chk(M._swig_casadi_Sparsity_appendColumns_0(__unwrap(this), __unwrap(a0)));
}
is_vector() {
return (!!(__chk(M._swig_casadi_Sparsity_is_vector_0(__unwrap(this)))));
}
row(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Sparsity_row_0(__unwrap(this), BigInt(a0)));
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Sparsity_get_row_0(__unwrap(this)))));
}
default: throw new Error(`Sparsity.row: no overload for ${args.length} args`);
}
}
sub(...args) {
switch (args.length) {
case 2: {
if (M._swig_can_IntVector(__unwrap(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_sub_0(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2), a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (M._swig_can_IntVector(__unwrap(args[0])) && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_sub_1(__unwrap(this), __unwrap(__vp1), __unwrap(a1), a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`Sparsity.sub: no overload matches arg types at arity 2`);
}
case 3: {
if (M._swig_can_IntVector(__unwrap(args[0])) && M._swig_can_IntVector(__unwrap(args[1])) && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_sub_0(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2), a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (M._swig_can_IntVector(__unwrap(args[0])) && M._swig_can_Sparsity(__unwrap(args[1])) && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Sparsity_sub_1(__unwrap(this), __unwrap(__vp1), __unwrap(a1), a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`Sparsity.sub: no overload matches arg types at arity 3`);
}
default: throw new Error(`Sparsity.sub: no overload for ${args.length} args`);
}
}
unite(a0) {
return __from_handle(__chk(M._swig_casadi_Sparsity_unite_0(__unwrap(this), __unwrap(a0))));
}
is_triu(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_Sparsity_is_triu_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = false;
return (!!(__chk(M._swig_casadi_Sparsity_is_triu_0(__unwrap(this), a0))));
}
default: throw new Error(`Sparsity.is_triu: no overload for ${args.length} args`);
}
}
}
Sparsity.prototype._swig_type = '_p_casadi__Sparsity';
if (!Object.prototype.hasOwnProperty.call(Sparsity.prototype, 'toString'))
Sparsity.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
Sparsity.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
__mixin(Sparsity, SparsityInterfaceCommon, PrintableCommon);
const __fr_casadi_Slice = new FinalizationRegistry(p => M._swig_casadi_Slice_delete(p));
class Slice extends PrintableCommon {
static deserialize(a0) {
return __from_handle(__chk(M._swig_casadi_Slice_static_deserialize_0(a0)));
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_Slice.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) { __ptr = __chk(M._swig_casadi_Slice_new_1(BigInt(args[0]), false)); break; }
if (M._swig_can_Slice(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_Slice_new_6(__unwrap(args[0]))); break; }
throw new TypeError(`Slice: arg-type mismatch at length 1`);
}
case 2: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'boolean')) { __ptr = __chk(M._swig_casadi_Slice_new_1(BigInt(args[0]), args[1])); break; }
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) { __ptr = __chk(M._swig_casadi_Slice_new_2(BigInt(args[0]), BigInt(args[1]), 1n)); break; }
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) { __ptr = __chk(M._swig_casadi_Slice_new_3(args[0], args[1], 1n)); break; }
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) { __ptr = __chk(M._swig_casadi_Slice_new_4(args[0], BigInt(args[1]), 1n)); break; }
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) { __ptr = __chk(M._swig_casadi_Slice_new_5(BigInt(args[0]), args[1], 1n)); break; }
throw new TypeError(`Slice: arg-type mismatch at length 2`);
}
case 3: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) { __ptr = __chk(M._swig_casadi_Slice_new_2(BigInt(args[0]), BigInt(args[1]), BigInt(args[2]))); break; }
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) { __ptr = __chk(M._swig_casadi_Slice_new_3(args[0], args[1], args[2])); break; }
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) { __ptr = __chk(M._swig_casadi_Slice_new_4(args[0], BigInt(args[1]), args[2])); break; }
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) { __ptr = __chk(M._swig_casadi_Slice_new_5(BigInt(args[0]), args[1], args[2])); break; }
throw new TypeError(`Slice: arg-type mismatch at length 3`);
}
case 0: {
__ptr = __chk(M._swig_casadi_Slice_new_0()); break;
}
default: throw new Error(`Slice: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_Slice.register(this, __ptr, this);
}
get start() { return M._swig_casadi_Slice_start_get(this._ptr); }
set start(v) { M._swig_casadi_Slice_start_set(this._ptr, v); }
get stop() { return M._swig_casadi_Slice_stop_get(this._ptr); }
set stop(v) { M._swig_casadi_Slice_stop_set(this._ptr, v); }
get step() { return M._swig_casadi_Slice_step_get(this._ptr); }
set step(v) { M._swig_casadi_Slice_step_set(this._ptr, v); }
delete() {
if (this._ptr === 0) return;
__fr_casadi_Slice.unregister(this);
M._swig_casadi_Slice_delete(this._ptr);
this._ptr = 0;
}
disp(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Slice_disp_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = false;
return __chk(M._swig_casadi_Slice_disp_0(__unwrap(this), a0));
}
default: throw new Error(`Slice.disp: no overload for ${args.length} args`);
}
}
all(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = false;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Slice_all_1(__unwrap(this), BigInt(a0), a1))));
}
case 2: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Slice_all_1(__unwrap(this), BigInt(a0), a1))));
}
if (M._swig_can_Slice(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Slice_all_2(__unwrap(this), __unwrap(a0), BigInt(a1)))));
}
throw new TypeError(`Slice.all: no overload matches arg types at arity 2`);
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Slice_all_0(__unwrap(this)))));
}
default: throw new Error(`Slice.all: no overload for ${args.length} args`);
}
}
type_name() {
return (()=>{const __p=__chk(M._swig_casadi_Slice_type_name_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
apply(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = false;
return __from_handle(__chk(M._swig_casadi_Slice_apply_0(__unwrap(this), BigInt(a0), a1)));
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Slice_apply_0(__unwrap(this), BigInt(a0), a1)));
}
default: throw new Error(`Slice.apply: no overload for ${args.length} args`);
}
}
size() {
return __chk(M._swig_casadi_Slice_size_0(__unwrap(this)));
}
serialize(a0) {
return __chk(M._swig_casadi_Slice_serialize_0(__unwrap(this), a0));
}
scalar(a0) {
return __chk(M._swig_casadi_Slice_scalar_0(__unwrap(this), BigInt(a0)));
}
str(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_Slice_get_str_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 0: {
const [] = args;
const a0 = false;
return (()=>{const __p=__chk(M._swig_casadi_Slice_get_str_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`Slice.str: no overload for ${args.length} args`);
}
}
is_scalar(a0) {
return (!!(__chk(M._swig_casadi_Slice_is_scalar_0(__unwrap(this), BigInt(a0)))));
}
is_empty() {
return (!!(__chk(M._swig_casadi_Slice_is_empty_0(__unwrap(this)))));
}
info() {
return M.__swig_release_handle(__chk(M._swig_casadi_Slice_info_0(__unwrap(this))));
}
}
Slice.prototype._swig_type = '_p_casadi__Slice';
if (!Object.prototype.hasOwnProperty.call(Slice.prototype, 'toString'))
Slice.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
Slice.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_GenericMatrixCommon = new FinalizationRegistry(p => M._swig_casadi_GenericMatrixCommon_delete(p));
class GenericMatrixCommon {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_casadi_GenericMatrixCommon.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_GenericMatrixCommon(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_GenericMatrixCommon_new_1(__unwrap(args[0]))); break; }
throw new TypeError(`GenericMatrixCommon: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_GenericMatrixCommon_new_0()); break;
}
default: throw new Error(`GenericMatrixCommon: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_casadi_GenericMatrixCommon.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_GenericMatrixCommon.unregister(this);
M._swig_casadi_GenericMatrixCommon_delete(this._ptr);
this._ptr = 0;
}
}
GenericMatrixCommon.prototype._swig_type = '_p_casadi__GenericMatrixCommon';
if (!Object.prototype.hasOwnProperty.call(GenericMatrixCommon.prototype, 'toString'))
GenericMatrixCommon.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
GenericMatrixCommon.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_GenericMatrix_casadi_Matrix_double__ = new FinalizationRegistry(p => M._swig_casadi_GenericMatrix_casadi_Matrix_double___delete(p));
class GenDM extends GenericMatrixCommon {
static sym(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = 1n;
const a2 = 1n;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_sym_0(__ps1, BigInt(a1), BigInt(a2))));
M._free(__ps1);
return __r;
}
case 2: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = 1n;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_sym_0(__ps1, BigInt(a1), BigInt(a2))));
M._free(__ps1);
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[1]))) {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_sym_1(__ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_sym_2(__ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
throw new TypeError(`GenDM.sym: no overload matches arg types at arity 2`);
}
case 3: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_sym_0(__ps1, BigInt(a1), BigInt(a2))));
M._free(__ps1);
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_Sparsity(__unwrap(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_sym_3(__ps1, __unwrap(a1), BigInt(a2)))));
M._free(__ps1);
return __r;
}
throw new TypeError(`GenDM.sym: no overload matches arg types at arity 3`);
}
case 4: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && (typeof args[3] === 'number' || typeof args[3] === 'bigint')) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_sym_4(__ps1, BigInt(a1), BigInt(a2), BigInt(a3)))));
M._free(__ps1);
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_Sparsity(__unwrap(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && (typeof args[3] === 'number' || typeof args[3] === 'bigint')) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_sym_5(__ps1, __unwrap(a1), BigInt(a2), BigInt(a3)));
M._free(__ps1);
return __r;
}
throw new TypeError(`GenDM.sym: no overload matches arg types at arity 4`);
}
case 5: {
const [a0, a1, a2, a3, a4] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_sym_6(__ps1, BigInt(a1), BigInt(a2), BigInt(a3), BigInt(a4)));
M._free(__ps1);
return __r;
}
default: throw new Error(`GenDM.sym: no overload for ${args.length} args`);
}
}
static ones(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_ones_0(BigInt(a0), BigInt(a1))));
}
if (M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_ones_1(__unwrap(a0))));
}
if (M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_ones_2(__unwrap(a0))));
}
throw new TypeError(`GenDM.ones: no overload matches arg types at arity 1`);
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_ones_0(BigInt(a0), BigInt(a1))));
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_ones_0(BigInt(a0), BigInt(a1))));
}
default: throw new Error(`GenDM.ones: no overload for ${args.length} args`);
}
}
static zeros(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_zeros_0(BigInt(a0), BigInt(a1))));
}
if (M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_zeros_1(__unwrap(a0))));
}
if (M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_zeros_2(__unwrap(a0))));
}
throw new TypeError(`GenDM.zeros: no overload matches arg types at arity 1`);
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_zeros_0(BigInt(a0), BigInt(a1))));
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___static_zeros_0(BigInt(a0), BigInt(a1))));
}
default: throw new Error(`GenDM.zeros: no overload for ${args.length} args`);
}
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_GenericMatrix_casadi_Matrix_double__.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_GenDM(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___new_1(__unwrap(args[0]))); break; }
throw new TypeError(`GenDM: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___new_0()); break;
}
default: throw new Error(`GenDM: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_GenericMatrix_casadi_Matrix_double__.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_GenericMatrix_casadi_Matrix_double__.unregister(this);
M._swig_casadi_GenericMatrix_casadi_Matrix_double___delete(this._ptr);
this._ptr = 0;
}
is_row() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___is_row_0(__unwrap(this)))));
}
is_scalar(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___is_scalar_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = false;
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___is_scalar_0(__unwrap(this), a0))));
}
default: throw new Error(`GenDM.is_scalar: no overload for ${args.length} args`);
}
}
row(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___row_0(__unwrap(this), BigInt(a0)));
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___get_row_0(__unwrap(this)))));
}
default: throw new Error(`GenDM.row: no overload for ${args.length} args`);
}
}
columns() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___columns_0(__unwrap(this)));
}
nnz() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___nnz_0(__unwrap(this)));
}
dim(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___dim_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 0: {
const [] = args;
const a0 = false;
return (()=>{const __p=__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___dim_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`GenDM.dim: no overload for ${args.length} args`);
}
}
is_tril() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___is_tril_0(__unwrap(this)))));
}
is_triu() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___is_triu_0(__unwrap(this)))));
}
nnz_diag() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___nnz_diag_0(__unwrap(this)));
}
is_square() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___is_square_0(__unwrap(this)))));
}
size1() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___size1_0(__unwrap(this)));
}
size2() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___size2_0(__unwrap(this)));
}
colind(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___colind_0(__unwrap(this), BigInt(a0)));
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___get_colind_0(__unwrap(this)))));
}
default: throw new Error(`GenDM.colind: no overload for ${args.length} args`);
}
}
is_vector() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___is_vector_0(__unwrap(this)))));
}
sparsity() {
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___sparsity_0(__unwrap(this))));
}
nnz_lower() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___nnz_lower_0(__unwrap(this)));
}
nnz_upper() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___nnz_upper_0(__unwrap(this)));
}
size(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___size_1(__unwrap(this), BigInt(a0)));
}
case 0: {
const [] = args;
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___size_0(__unwrap(this)));
}
default: throw new Error(`GenDM.size: no overload for ${args.length} args`);
}
}
is_dense() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___is_dense_0(__unwrap(this)))));
}
is_column() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___is_column_0(__unwrap(this)))));
}
is_empty(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___is_empty_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = false;
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___is_empty_0(__unwrap(this), a0))));
}
default: throw new Error(`GenDM.is_empty: no overload for ${args.length} args`);
}
}
numel() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___numel_0(__unwrap(this)));
}
rows() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_double___rows_0(__unwrap(this)));
}
}
GenDM.prototype._swig_type = '_p_casadi__GenericMatrixT_casadi__MatrixT_double_t_t';
if (!Object.prototype.hasOwnProperty.call(GenDM.prototype, 'toString'))
GenDM.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
GenDM.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
__mixin(GenDM, SparsityInterfaceCommon);
const __fr_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem__ = new FinalizationRegistry(p => M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___delete(p));
class GenSX extends GenericMatrixCommon {
static ones(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_ones_0(BigInt(a0), BigInt(a1))));
}
if (M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_ones_1(__unwrap(a0))));
}
if (M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_ones_2(__unwrap(a0))));
}
throw new TypeError(`GenSX.ones: no overload matches arg types at arity 1`);
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_ones_0(BigInt(a0), BigInt(a1))));
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_ones_0(BigInt(a0), BigInt(a1))));
}
default: throw new Error(`GenSX.ones: no overload for ${args.length} args`);
}
}
static zeros(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_zeros_0(BigInt(a0), BigInt(a1))));
}
if (M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_zeros_1(__unwrap(a0))));
}
if (M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_zeros_2(__unwrap(a0))));
}
throw new TypeError(`GenSX.zeros: no overload matches arg types at arity 1`);
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_zeros_0(BigInt(a0), BigInt(a1))));
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_zeros_0(BigInt(a0), BigInt(a1))));
}
default: throw new Error(`GenSX.zeros: no overload for ${args.length} args`);
}
}
static sym(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = 1n;
const a2 = 1n;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_sym_0(__ps1, BigInt(a1), BigInt(a2))));
M._free(__ps1);
return __r;
}
case 2: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = 1n;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_sym_0(__ps1, BigInt(a1), BigInt(a2))));
M._free(__ps1);
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[1]))) {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_sym_1(__ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_sym_2(__ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
throw new TypeError(`GenSX.sym: no overload matches arg types at arity 2`);
}
case 3: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_sym_0(__ps1, BigInt(a1), BigInt(a2))));
M._free(__ps1);
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_Sparsity(__unwrap(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_sym_3(__ps1, __unwrap(a1), BigInt(a2)))));
M._free(__ps1);
return __r;
}
throw new TypeError(`GenSX.sym: no overload matches arg types at arity 3`);
}
case 4: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && (typeof args[3] === 'number' || typeof args[3] === 'bigint')) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_sym_4(__ps1, BigInt(a1), BigInt(a2), BigInt(a3)))));
M._free(__ps1);
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_Sparsity(__unwrap(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && (typeof args[3] === 'number' || typeof args[3] === 'bigint')) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_sym_5(__ps1, __unwrap(a1), BigInt(a2), BigInt(a3)));
M._free(__ps1);
return __r;
}
throw new TypeError(`GenSX.sym: no overload matches arg types at arity 4`);
}
case 5: {
const [a0, a1, a2, a3, a4] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___static_sym_6(__ps1, BigInt(a1), BigInt(a2), BigInt(a3), BigInt(a4)));
M._free(__ps1);
return __r;
}
default: throw new Error(`GenSX.sym: no overload for ${args.length} args`);
}
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem__.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_GenSX(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___new_1(__unwrap(args[0]))); break; }
throw new TypeError(`GenSX: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___new_0()); break;
}
default: throw new Error(`GenSX: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem__.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem__.unregister(this);
M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___delete(this._ptr);
this._ptr = 0;
}
dim(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___dim_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 0: {
const [] = args;
const a0 = false;
return (()=>{const __p=__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___dim_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`GenSX.dim: no overload for ${args.length} args`);
}
}
rows() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___rows_0(__unwrap(this)));
}
nnz_diag() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___nnz_diag_0(__unwrap(this)));
}
size1() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___size1_0(__unwrap(this)));
}
size2() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___size2_0(__unwrap(this)));
}
sparsity() {
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___sparsity_0(__unwrap(this))));
}
colind(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___colind_0(__unwrap(this), BigInt(a0)));
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___get_colind_0(__unwrap(this)))));
}
default: throw new Error(`GenSX.colind: no overload for ${args.length} args`);
}
}
is_square() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___is_square_0(__unwrap(this)))));
}
numel() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___numel_0(__unwrap(this)));
}
is_vector() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___is_vector_0(__unwrap(this)))));
}
nnz_lower() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___nnz_lower_0(__unwrap(this)));
}
nnz_upper() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___nnz_upper_0(__unwrap(this)));
}
columns() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___columns_0(__unwrap(this)));
}
is_row() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___is_row_0(__unwrap(this)))));
}
is_dense() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___is_dense_0(__unwrap(this)))));
}
is_empty(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___is_empty_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = false;
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___is_empty_0(__unwrap(this), a0))));
}
default: throw new Error(`GenSX.is_empty: no overload for ${args.length} args`);
}
}
row(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___row_0(__unwrap(this), BigInt(a0)));
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___get_row_0(__unwrap(this)))));
}
default: throw new Error(`GenSX.row: no overload for ${args.length} args`);
}
}
is_scalar(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___is_scalar_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = false;
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___is_scalar_0(__unwrap(this), a0))));
}
default: throw new Error(`GenSX.is_scalar: no overload for ${args.length} args`);
}
}
is_tril() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___is_tril_0(__unwrap(this)))));
}
nnz() {
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___nnz_0(__unwrap(this)));
}
is_triu() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___is_triu_0(__unwrap(this)))));
}
size(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___size_1(__unwrap(this), BigInt(a0)));
}
case 0: {
const [] = args;
return __chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___size_0(__unwrap(this)));
}
default: throw new Error(`GenSX.size: no overload for ${args.length} args`);
}
}
is_column() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_Matrix_casadi_SXElem___is_column_0(__unwrap(this)))));
}
}
GenSX.prototype._swig_type = '_p_casadi__GenericMatrixT_casadi__MatrixT_casadi__SXElem_t_t';
if (!Object.prototype.hasOwnProperty.call(GenSX.prototype, 'toString'))
GenSX.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
GenSX.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
__mixin(GenSX, SparsityInterfaceCommon);
const __fr_casadi_GenericMatrix_casadi_MX_ = new FinalizationRegistry(p => M._swig_casadi_GenericMatrix_casadi_MX__delete(p));
class GenMX extends GenericMatrixCommon {
static sym(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = 1n;
const a2 = 1n;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__static_sym_0(__ps1, BigInt(a1), BigInt(a2))));
M._free(__ps1);
return __r;
}
case 2: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = 1n;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__static_sym_0(__ps1, BigInt(a1), BigInt(a2))));
M._free(__ps1);
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[1]))) {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__static_sym_1(__ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__static_sym_2(__ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
throw new TypeError(`GenMX.sym: no overload matches arg types at arity 2`);
}
case 3: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__static_sym_0(__ps1, BigInt(a1), BigInt(a2))));
M._free(__ps1);
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_Sparsity(__unwrap(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__static_sym_3(__ps1, __unwrap(a1), BigInt(a2)))));
M._free(__ps1);
return __r;
}
throw new TypeError(`GenMX.sym: no overload matches arg types at arity 3`);
}
case 4: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && (typeof args[3] === 'number' || typeof args[3] === 'bigint')) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__static_sym_4(__ps1, BigInt(a1), BigInt(a2), BigInt(a3)))));
M._free(__ps1);
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_Sparsity(__unwrap(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && (typeof args[3] === 'number' || typeof args[3] === 'bigint')) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_GenericMatrix_casadi_MX__static_sym_5(__ps1, __unwrap(a1), BigInt(a2), BigInt(a3)));
M._free(__ps1);
return __r;
}
throw new TypeError(`GenMX.sym: no overload matches arg types at arity 4`);
}
case 5: {
const [a0, a1, a2, a3, a4] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_GenericMatrix_casadi_MX__static_sym_6(__ps1, BigInt(a1), BigInt(a2), BigInt(a3), BigInt(a4)));
M._free(__ps1);
return __r;
}
default: throw new Error(`GenMX.sym: no overload for ${args.length} args`);
}
}
static zeros(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__static_zeros_0(BigInt(a0), BigInt(a1))));
}
if (M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__static_zeros_1(__unwrap(a0))));
}
if (M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__static_zeros_2(__unwrap(a0))));
}
throw new TypeError(`GenMX.zeros: no overload matches arg types at arity 1`);
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__static_zeros_0(BigInt(a0), BigInt(a1))));
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__static_zeros_0(BigInt(a0), BigInt(a1))));
}
default: throw new Error(`GenMX.zeros: no overload for ${args.length} args`);
}
}
static ones(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__static_ones_0(BigInt(a0), BigInt(a1))));
}
if (M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__static_ones_1(__unwrap(a0))));
}
if (M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__static_ones_2(__unwrap(a0))));
}
throw new TypeError(`GenMX.ones: no overload matches arg types at arity 1`);
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__static_ones_0(BigInt(a0), BigInt(a1))));
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__static_ones_0(BigInt(a0), BigInt(a1))));
}
default: throw new Error(`GenMX.ones: no overload for ${args.length} args`);
}
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_GenericMatrix_casadi_MX_.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_GenMX(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_GenericMatrix_casadi_MX__new_1(__unwrap(args[0]))); break; }
throw new TypeError(`GenMX: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_GenericMatrix_casadi_MX__new_0()); break;
}
default: throw new Error(`GenMX: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_GenericMatrix_casadi_MX_.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_GenericMatrix_casadi_MX_.unregister(this);
M._swig_casadi_GenericMatrix_casadi_MX__delete(this._ptr);
this._ptr = 0;
}
is_scalar(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_MX__is_scalar_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = false;
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_MX__is_scalar_0(__unwrap(this), a0))));
}
default: throw new Error(`GenMX.is_scalar: no overload for ${args.length} args`);
}
}
colind(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_GenericMatrix_casadi_MX__colind_0(__unwrap(this), BigInt(a0)));
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__get_colind_0(__unwrap(this)))));
}
default: throw new Error(`GenMX.colind: no overload for ${args.length} args`);
}
}
size1() {
return __chk(M._swig_casadi_GenericMatrix_casadi_MX__size1_0(__unwrap(this)));
}
size2() {
return __chk(M._swig_casadi_GenericMatrix_casadi_MX__size2_0(__unwrap(this)));
}
size(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_GenericMatrix_casadi_MX__size_1(__unwrap(this), BigInt(a0)));
}
case 0: {
const [] = args;
return __chk(M._swig_casadi_GenericMatrix_casadi_MX__size_0(__unwrap(this)));
}
default: throw new Error(`GenMX.size: no overload for ${args.length} args`);
}
}
is_row() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_MX__is_row_0(__unwrap(this)))));
}
rows() {
return __chk(M._swig_casadi_GenericMatrix_casadi_MX__rows_0(__unwrap(this)));
}
nnz_diag() {
return __chk(M._swig_casadi_GenericMatrix_casadi_MX__nnz_diag_0(__unwrap(this)));
}
numel() {
return __chk(M._swig_casadi_GenericMatrix_casadi_MX__numel_0(__unwrap(this)));
}
row(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_GenericMatrix_casadi_MX__row_0(__unwrap(this), BigInt(a0)));
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__get_row_0(__unwrap(this)))));
}
default: throw new Error(`GenMX.row: no overload for ${args.length} args`);
}
}
columns() {
return __chk(M._swig_casadi_GenericMatrix_casadi_MX__columns_0(__unwrap(this)));
}
nnz() {
return __chk(M._swig_casadi_GenericMatrix_casadi_MX__nnz_0(__unwrap(this)));
}
sparsity() {
return __from_handle(__chk(M._swig_casadi_GenericMatrix_casadi_MX__sparsity_0(__unwrap(this))));
}
is_square() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_MX__is_square_0(__unwrap(this)))));
}
dim(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_GenericMatrix_casadi_MX__dim_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 0: {
const [] = args;
const a0 = false;
return (()=>{const __p=__chk(M._swig_casadi_GenericMatrix_casadi_MX__dim_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`GenMX.dim: no overload for ${args.length} args`);
}
}
is_dense() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_MX__is_dense_0(__unwrap(this)))));
}
is_empty(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_MX__is_empty_0(__unwrap(this), a0))));
}
case 0: {
const [] = args;
const a0 = false;
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_MX__is_empty_0(__unwrap(this), a0))));
}
default: throw new Error(`GenMX.is_empty: no overload for ${args.length} args`);
}
}
is_vector() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_MX__is_vector_0(__unwrap(this)))));
}
is_tril() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_MX__is_tril_0(__unwrap(this)))));
}
nnz_lower() {
return __chk(M._swig_casadi_GenericMatrix_casadi_MX__nnz_lower_0(__unwrap(this)));
}
nnz_upper() {
return __chk(M._swig_casadi_GenericMatrix_casadi_MX__nnz_upper_0(__unwrap(this)));
}
is_triu() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_MX__is_triu_0(__unwrap(this)))));
}
is_column() {
return (!!(__chk(M._swig_casadi_GenericMatrix_casadi_MX__is_column_0(__unwrap(this)))));
}
}
GenMX.prototype._swig_type = '_p_casadi__GenericMatrixT_casadi__MX_t';
if (!Object.prototype.hasOwnProperty.call(GenMX.prototype, 'toString'))
GenMX.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
GenMX.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
__mixin(GenMX, SparsityInterfaceCommon);
const __fr_casadi_GenericExpressionCommon = new FinalizationRegistry(p => M._swig_casadi_GenericExpressionCommon_delete(p));
class GenericExpressionCommon {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_casadi_GenericExpressionCommon.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_GenericExpressionCommon(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_GenericExpressionCommon_new_1(__unwrap(args[0]))); break; }
throw new TypeError(`GenericExpressionCommon: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_GenericExpressionCommon_new_0()); break;
}
default: throw new Error(`GenericExpressionCommon: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_casadi_GenericExpressionCommon.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_GenericExpressionCommon.unregister(this);
M._swig_casadi_GenericExpressionCommon_delete(this._ptr);
this._ptr = 0;
}
}
GenericExpressionCommon.prototype._swig_type = '_p_casadi__GenericExpressionCommon';
if (!Object.prototype.hasOwnProperty.call(GenericExpressionCommon.prototype, 'toString'))
GenericExpressionCommon.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
GenericExpressionCommon.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_MatrixCommon = new FinalizationRegistry(p => M._swig_casadi_MatrixCommon_delete(p));
class MatrixCommon {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_casadi_MatrixCommon.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_MatrixCommon(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_MatrixCommon_new_1(__unwrap(args[0]))); break; }
throw new TypeError(`MatrixCommon: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_MatrixCommon_new_0()); break;
}
default: throw new Error(`MatrixCommon: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_casadi_MatrixCommon.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_MatrixCommon.unregister(this);
M._swig_casadi_MatrixCommon_delete(this._ptr);
this._ptr = 0;
}
}
MatrixCommon.prototype._swig_type = '_p_casadi__MatrixCommon';
if (!Object.prototype.hasOwnProperty.call(MatrixCommon.prototype, 'toString'))
MatrixCommon.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
MatrixCommon.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_Matrix_double_ = new FinalizationRegistry(p => M._swig_casadi_Matrix_double__delete(p));
class DM extends MatrixCommon {
static inf(...args) {
switch (args.length) {
case 1: {
if (M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_inf_0(__unwrap(a0))));
}
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_inf_1(BigInt(a0), BigInt(a1))));
}
if (M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_inf_2(__unwrap(a0))));
}
throw new TypeError(`DM.inf: no overload matches arg types at arity 1`);
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_inf_1(BigInt(a0), BigInt(a1))));
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_inf_1(BigInt(a0), BigInt(a1))));
}
default: throw new Error(`DM.inf: no overload for ${args.length} args`);
}
}
static get_precision() {
return __chk(M._swig_casadi_Matrix_double__static_get_precision_0());
}
static eye(a0) {
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_eye_0(BigInt(a0))));
}
static type_name() {
return (()=>{const __p=__chk(M._swig_casadi_Matrix_double__static_type_name_0());const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
static set_max_depth(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Matrix_double__static_set_max_depth_0(BigInt(a0)));
}
case 0: {
const [] = args;
const a0 = 1n;
return __chk(M._swig_casadi_Matrix_double__static_set_max_depth_0(BigInt(a0)));
}
default: throw new Error(`DM.set_max_depth: no overload for ${args.length} args`);
}
}
static unary(a0, a1) {
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_unary_0(BigInt(a0), __unwrap(__coerce(a1, DM)))));
}
static get_max_depth() {
return __chk(M._swig_casadi_Matrix_double__static_get_max_depth_0());
}
static matrix_scalar(a0, a1, a2) {
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_matrix_scalar_0(BigInt(a0), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)))));
}
static triplet(...args) {
switch (args.length) {
case 3: {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Matrix_double__static_triplet_0(__unwrap(__vp1), __unwrap(__vp2), __unwrap(__coerce(a2, DM)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
case 4: {
const [a0, a1, a2, a3] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Matrix_double__static_triplet_2(__unwrap(__vp1), __unwrap(__vp2), __unwrap(__coerce(a2, DM)), __unwrap(a3))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
case 5: {
const [a0, a1, a2, a3, a4] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Matrix_double__static_triplet_1(__unwrap(__vp1), __unwrap(__vp2), __unwrap(__coerce(a2, DM)), BigInt(a3), BigInt(a4))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
default: throw new Error(`DM.triplet: no overload for ${args.length} args`);
}
}
static set_precision(a0) {
return __chk(M._swig_casadi_Matrix_double__static_set_precision_0(BigInt(a0)));
}
static get_input(a0) {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Matrix_double__static_get_input_0(__unwrap(a0)))));
}
static rand(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_rand_0(BigInt(a0), BigInt(a1))));
}
if (M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_rand_1(__unwrap(a0))));
}
if (M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_rand_2(__unwrap(a0))));
}
throw new TypeError(`DM.rand: no overload matches arg types at arity 1`);
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_rand_0(BigInt(a0), BigInt(a1))));
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_rand_0(BigInt(a0), BigInt(a1))));
}
default: throw new Error(`DM.rand: no overload for ${args.length} args`);
}
}
static set_width(a0) {
return __chk(M._swig_casadi_Matrix_double__static_set_width_0(BigInt(a0)));
}
static get_width() {
return __chk(M._swig_casadi_Matrix_double__static_get_width_0());
}
static matrix_matrix(a0, a1, a2) {
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_matrix_matrix_0(BigInt(a0), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)))));
}
static binary(a0, a1, a2) {
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_binary_0(BigInt(a0), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)))));
}
static set_scientific(a0) {
return __chk(M._swig_casadi_Matrix_double__static_set_scientific_0(a0));
}
static deserialize(...args) {
switch (args.length) {
case 1: {
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Matrix_double__static_deserialize_1(__ps1)));
M._free(__ps1);
return __r;
}
{
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_deserialize_0(a0)));
}
}
default: throw new Error(`DM.deserialize: no overload for ${args.length} args`);
}
}
static get_scientific() {
return (!!(__chk(M._swig_casadi_Matrix_double__static_get_scientific_0())));
}
static from_file(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = "";
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Matrix_double__static_from_file_0(__ps1, __ps2)));
M._free(__ps1);
M._free(__ps2);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Matrix_double__static_from_file_0(__ps1, __ps2)));
M._free(__ps1);
M._free(__ps2);
return __r;
}
default: throw new Error(`DM.from_file: no overload for ${args.length} args`);
}
}
static nan(...args) {
switch (args.length) {
case 1: {
if (M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_nan_0(__unwrap(a0))));
}
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_nan_1(BigInt(a0), BigInt(a1))));
}
if (M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_nan_2(__unwrap(a0))));
}
throw new TypeError(`DM.nan: no overload matches arg types at arity 1`);
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_nan_1(BigInt(a0), BigInt(a1))));
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_nan_1(BigInt(a0), BigInt(a1))));
}
default: throw new Error(`DM.nan: no overload for ${args.length} args`);
}
}
static get_free(a0) {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Matrix_double__static_get_free_0(__unwrap(a0)))));
}
static rng(a0) {
return __chk(M._swig_casadi_Matrix_double__static_rng_0(BigInt(a0)));
}
static scalar_matrix(a0, a1, a2) {
return __from_handle(__chk(M._swig_casadi_Matrix_double__static_scalar_matrix_0(BigInt(a0), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)))));
}
static call(...args) {
switch (args.length) {
case 2: {
if (M._swig_can_Function(__unwrap(args[0])) && M._swig_can_DMVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Matrix_double__static_call_0(__unwrap(a0), __unwrap(__vp2)))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (M._swig_can_Function(__unwrap(args[0])) && M._swig_can_DoubleVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DoubleVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Matrix_double__static_call_1(__unwrap(a0), __unwrap(__vp2)))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`DM.call: no overload matches arg types at arity 2`);
}
default: throw new Error(`DM.call: no overload for ${args.length} args`);
}
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_Matrix_double_.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_DM(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_Matrix_double__new_1(__unwrap(args[0]))); break; }
if (M._swig_can_Sparsity(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_Matrix_double__new_3(__unwrap(args[0]))); break; }
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) { __ptr = __chk(M._swig_casadi_Matrix_double__new_5(args[0])); break; }
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) { __ptr = __chk(M._swig_casadi_Matrix_double__new_6(args[0])); break; }
if (M._swig_can_SX(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_Matrix_double__new_8(__unwrap(args[0]))); break; }
__ptr = __chk(M._swig_casadi_Matrix_double__new_7(args[0])); break;
}
case 2: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) { __ptr = __chk(M._swig_casadi_Matrix_double__new_2(BigInt(args[0]), BigInt(args[1]))); break; }
if (M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_DM(__unwrap(args[1]))) { __ptr = __chk(M._swig_casadi_Matrix_double__new_4(__unwrap(args[0]), __unwrap(args[1]))); break; }
throw new TypeError(`DM: arg-type mismatch at length 2`);
}
case 0: {
__ptr = __chk(M._swig_casadi_Matrix_double__new_0()); break;
}
default: throw new Error(`DM: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_Matrix_double_.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_Matrix_double_.unregister(this);
M._swig_casadi_Matrix_double__delete(this._ptr);
this._ptr = 0;
}
n_dep() {
return __chk(M._swig_casadi_Matrix_double__n_dep_0(__unwrap(this)));
}
nonzeros() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Matrix_double__get_nonzeros_0(__unwrap(this)))));
}
print_vector(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Matrix_double__print_vector_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = true;
return __chk(M._swig_casadi_Matrix_double__print_vector_0(__unwrap(this), a0));
}
default: throw new Error(`DM.print_vector: no overload for ${args.length} args`);
}
}
serialize(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Matrix_double__serialize_1(__unwrap(this), a0));
}
case 0: {
const [] = args;
return (()=>{const __p=__chk(M._swig_casadi_Matrix_double__serialize_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`DM.serialize: no overload for ${args.length} args`);
}
}
which_function() {
return __from_handle(__chk(M._swig_casadi_Matrix_double__which_function_0(__unwrap(this))));
}
is_eye() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_eye_0(__unwrap(this)))));
}
is_leaf() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_leaf_0(__unwrap(this)))));
}
set(...args) {
switch (args.length) {
case 3: {
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_Matrix_double__set_0(__unwrap(this), __unwrap(__coerce(a0, DM)), a1, __unwrap(a2)));
}
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_Matrix_double__set_1(__unwrap(this), __unwrap(__coerce(a0, DM)), a1, __unwrap(a2)));
}
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Sparsity(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_Matrix_double__set_2(__unwrap(this), __unwrap(__coerce(a0, DM)), a1, __unwrap(a2)));
}
throw new TypeError(`DM.set: no overload matches arg types at arity 3`);
}
case 4: {
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Slice(__unwrap(args[2])) && M._swig_can_Slice(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
return __chk(M._swig_casadi_Matrix_double__set_3(__unwrap(this), __unwrap(__coerce(a0, DM)), a1, __unwrap(a2), __unwrap(a3)));
}
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2, a3] = args;
return __chk(M._swig_casadi_Matrix_double__set_4(__unwrap(this), __unwrap(__coerce(a0, DM)), a1, __unwrap(a2), __unwrap(a3)));
}
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Slice(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
return __chk(M._swig_casadi_Matrix_double__set_5(__unwrap(this), __unwrap(__coerce(a0, DM)), a1, __unwrap(a2), __unwrap(a3)));
}
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1, a2, a3] = args;
return __chk(M._swig_casadi_Matrix_double__set_6(__unwrap(this), __unwrap(__coerce(a0, DM)), a1, __unwrap(a2), __unwrap(a3)));
}
throw new TypeError(`DM.set: no overload matches arg types at arity 4`);
}
default: throw new Error(`DM.set: no overload for ${args.length} args`);
}
}
resize(a0, a1) {
return __chk(M._swig_casadi_Matrix_double__resize_0(__unwrap(this), BigInt(a0), BigInt(a1)));
}
has_duplicates() {
return (!!(__chk(M._swig_casadi_Matrix_double__has_duplicates_0(__unwrap(this)))));
}
is_op(a0) {
return (!!(__chk(M._swig_casadi_Matrix_double__is_op_0(__unwrap(this), BigInt(a0)))));
}
str(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_Matrix_double__get_str_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 0: {
const [] = args;
const a0 = false;
return (()=>{const __p=__chk(M._swig_casadi_Matrix_double__get_str_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`DM.str: no overload for ${args.length} args`);
}
}
reset_input() {
return __chk(M._swig_casadi_Matrix_double__reset_input_0(__unwrap(this)));
}
T() {
return __from_handle(__chk(M._swig_casadi_Matrix_double__T_0(__unwrap(this))));
}
has_zeros() {
return (!!(__chk(M._swig_casadi_Matrix_double__has_zeros_0(__unwrap(this)))));
}
element_hash() {
return __chk(M._swig_casadi_Matrix_double__element_hash_0(__unwrap(this)));
}
is_zero() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_zero_0(__unwrap(this)))));
}
export_code(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Matrix_double__export_code_0(__unwrap(this), __ps1, __unwrap(a1)));
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Matrix_double__export_code_0(__unwrap(this), __ps1, __unwrap(a1)));
M._free(__ps1);
return __r;
}
default: throw new Error(`DM.export_code: no overload for ${args.length} args`);
}
}
print_dense(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Matrix_double__print_dense_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = true;
return __chk(M._swig_casadi_Matrix_double__print_dense_0(__unwrap(this), a0));
}
default: throw new Error(`DM.print_dense: no overload for ${args.length} args`);
}
}
has_nz(a0, a1) {
return (!!(__chk(M._swig_casadi_Matrix_double__has_nz_0(__unwrap(this), BigInt(a0), BigInt(a1)))));
}
print_scalar() {
return __chk(M._swig_casadi_Matrix_double__print_scalar_0(__unwrap(this)));
}
has_output() {
return (!!(__chk(M._swig_casadi_Matrix_double__has_output_0(__unwrap(this)))));
}
is_integer() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_integer_0(__unwrap(this)))));
}
is_commutative() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_commutative_0(__unwrap(this)))));
}
is_call() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_call_0(__unwrap(this)))));
}
erase(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_Matrix_double__erase_1(__unwrap(this), __unwrap(__vp1), a1));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
case 2: {
if (M._swig_can_IntVector(__unwrap(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_Matrix_double__erase_0(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2), a2));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (M._swig_can_IntVector(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_Matrix_double__erase_1(__unwrap(this), __unwrap(__vp1), a1));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`DM.erase: no overload matches arg types at arity 2`);
}
case 3: {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_Matrix_double__erase_0(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2), a2));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
default: throw new Error(`DM.erase: no overload for ${args.length} args`);
}
}
reserve(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Matrix_double__reserve_0(__unwrap(this), BigInt(a0)));
}
case 2: {
const [a0, a1] = args;
return __chk(M._swig_casadi_Matrix_double__reserve_1(__unwrap(this), BigInt(a0), BigInt(a1)));
}
default: throw new Error(`DM.reserve: no overload for ${args.length} args`);
}
}
is_smooth() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_smooth_0(__unwrap(this)))));
}
name() {
return (()=>{const __p=__chk(M._swig_casadi_Matrix_double__name_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
disp(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Matrix_double__disp_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = false;
return __chk(M._swig_casadi_Matrix_double__disp_0(__unwrap(this), a0));
}
default: throw new Error(`DM.disp: no overload for ${args.length} args`);
}
}
is_symbolic() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_symbolic_0(__unwrap(this)))));
}
is_minus_inf() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_minus_inf_0(__unwrap(this)))));
}
printme(a0) {
return __from_handle(__chk(M._swig_casadi_Matrix_double__printme_0(__unwrap(this), __unwrap(__coerce(a0, DM)))));
}
clear() {
return __chk(M._swig_casadi_Matrix_double__clear_0(__unwrap(this)));
}
remove(a0, a1) {
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_Matrix_double__remove_0(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
is_inf() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_inf_0(__unwrap(this)))));
}
is_minus_one() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_minus_one_0(__unwrap(this)))));
}
which_output() {
return __chk(M._swig_casadi_Matrix_double__which_output_0(__unwrap(this)));
}
print_sparse(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Matrix_double__print_sparse_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = true;
return __chk(M._swig_casadi_Matrix_double__print_sparse_0(__unwrap(this), a0));
}
default: throw new Error(`DM.print_sparse: no overload for ${args.length} args`);
}
}
info() {
return M.__swig_release_handle(__chk(M._swig_casadi_Matrix_double__info_0(__unwrap(this))));
}
sparsity() {
return __from_handle(__chk(M._swig_casadi_Matrix_double__get_sparsity_0(__unwrap(this))));
}
__nonzero__() {
return (!!(__chk(M._swig_casadi_Matrix_double____nonzero___0(__unwrap(this)))));
}
get_output(a0) {
return __from_handle(__chk(M._swig_casadi_Matrix_double__get_output_0(__unwrap(this), BigInt(a0))));
}
is_one() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_one_0(__unwrap(this)))));
}
elements() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Matrix_double__get_elements_0(__unwrap(this)))));
}
get_nz(...args) {
switch (args.length) {
case 2: {
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__get_nz_0(__unwrap(this), a0, __unwrap(a1))));
}
if ((typeof args[0] === 'boolean')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__get_nz_1(__unwrap(this), a0, __unwrap(a1))));
}
throw new TypeError(`DM.get_nz: no overload matches arg types at arity 2`);
}
default: throw new Error(`DM.get_nz: no overload for ${args.length} args`);
}
}
op() {
return __chk(M._swig_casadi_Matrix_double__op_0(__unwrap(this)));
}
is_half() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_half_0(__unwrap(this)))));
}
is_output() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_output_0(__unwrap(this)))));
}
to_file(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = "";
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_Matrix_double__to_file_0(__unwrap(this), __ps1, __ps2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_Matrix_double__to_file_0(__unwrap(this), __ps1, __ps2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
default: throw new Error(`DM.to_file: no overload for ${args.length} args`);
}
}
is_regular() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_regular_0(__unwrap(this)))));
}
is_value(a0) {
return (!!(__chk(M._swig_casadi_Matrix_double__is_value_0(__unwrap(this), a0))));
}
is_valid_input() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_valid_input_0(__unwrap(this)))));
}
enlarge(...args) {
switch (args.length) {
case 4: {
const [a0, a1, a2, a3] = args;
const a4 = false;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __chk(M._swig_casadi_Matrix_double__enlarge_0(__unwrap(this), BigInt(a0), BigInt(a1), __unwrap(__vp3), __unwrap(__vp4), a4));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
case 5: {
const [a0, a1, a2, a3, a4] = args;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __chk(M._swig_casadi_Matrix_double__enlarge_0(__unwrap(this), BigInt(a0), BigInt(a1), __unwrap(__vp3), __unwrap(__vp4), a4));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
default: throw new Error(`DM.enlarge: no overload for ${args.length} args`);
}
}
is_nonnegative() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_nonnegative_0(__unwrap(this)))));
}
dep(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__dep_0(__unwrap(this), BigInt(a0))));
}
case 0: {
const [] = args;
const a0 = 0n;
return __from_handle(__chk(M._swig_casadi_Matrix_double__dep_0(__unwrap(this), BigInt(a0))));
}
default: throw new Error(`DM.dep: no overload for ${args.length} args`);
}
}
set_nz(...args) {
switch (args.length) {
case 3: {
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_Matrix_double__set_nz_0(__unwrap(this), __unwrap(__coerce(a0, DM)), a1, __unwrap(a2)));
}
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_Matrix_double__set_nz_1(__unwrap(this), __unwrap(__coerce(a0, DM)), a1, __unwrap(a2)));
}
throw new TypeError(`DM.set_nz: no overload matches arg types at arity 3`);
}
default: throw new Error(`DM.set_nz: no overload for ${args.length} args`);
}
}
get(...args) {
switch (args.length) {
case 2: {
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__get_0(__unwrap(this), a0, __unwrap(a1))));
}
if ((typeof args[0] === 'boolean')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__get_1(__unwrap(this), a0, __unwrap(a1))));
}
if ((typeof args[0] === 'boolean') && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__get_2(__unwrap(this), a0, __unwrap(a1))));
}
throw new TypeError(`DM.get: no overload matches arg types at arity 2`);
}
case 3: {
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[1])) && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__get_3(__unwrap(this), a0, __unwrap(a1), __unwrap(a2))));
}
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[1]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__get_4(__unwrap(this), a0, __unwrap(a1), __unwrap(a2))));
}
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__get_5(__unwrap(this), a0, __unwrap(a1), __unwrap(a2))));
}
if ((typeof args[0] === 'boolean')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_double__get_6(__unwrap(this), a0, __unwrap(a1), __unwrap(a2))));
}
throw new TypeError(`DM.get: no overload matches arg types at arity 3`);
}
default: throw new Error(`DM.get: no overload for ${args.length} args`);
}
}
print_split() {
return __chk(M._swig_casadi_Matrix_double__print_split_0(__unwrap(this)));
}
is_constant() {
return (!!(__chk(M._swig_casadi_Matrix_double__is_constant_0(__unwrap(this)))));
}
}
DM.prototype._swig_type = '_p_casadi__MatrixT_double_t';
if (!Object.prototype.hasOwnProperty.call(DM.prototype, 'toString'))
DM.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
DM.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
__mixin(DM, GenericExpressionCommon, GenDM, PrintableCommon);
const __fr_casadi_SXElem = new FinalizationRegistry(p => M._swig_casadi_SXElem_delete(p));
class SXElem {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_casadi_SXElem.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_SXElem(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_SXElem_new_1(__unwrap(args[0]))); break; }
throw new TypeError(`SXElem: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_SXElem_new_0()); break;
}
default: throw new Error(`SXElem: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_casadi_SXElem.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_SXElem.unregister(this);
M._swig_casadi_SXElem_delete(this._ptr);
this._ptr = 0;
}
}
SXElem.prototype._swig_type = '_p_casadi__SXElem';
if (!Object.prototype.hasOwnProperty.call(SXElem.prototype, 'toString'))
SXElem.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
SXElem.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_Matrix_casadi_SXElem_ = new FinalizationRegistry(p => M._swig_casadi_Matrix_casadi_SXElem__delete(p));
class SX extends MatrixCommon {
static unary(a0, a1) {
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_unary_0(BigInt(a0), __unwrap(__coerce(a1, SX)))));
}
static deserialize(...args) {
switch (args.length) {
case 1: {
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_deserialize_1(__ps1)));
M._free(__ps1);
return __r;
}
{
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_deserialize_0(a0)));
}
}
default: throw new Error(`SX.deserialize: no overload for ${args.length} args`);
}
}
static triplet(...args) {
switch (args.length) {
case 3: {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_triplet_0(__unwrap(__vp1), __unwrap(__vp2), __unwrap(__coerce(a2, SX)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
case 4: {
const [a0, a1, a2, a3] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_triplet_2(__unwrap(__vp1), __unwrap(__vp2), __unwrap(__coerce(a2, SX)), __unwrap(a3))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
case 5: {
const [a0, a1, a2, a3, a4] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_triplet_1(__unwrap(__vp1), __unwrap(__vp2), __unwrap(__coerce(a2, SX)), BigInt(a3), BigInt(a4))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
default: throw new Error(`SX.triplet: no overload for ${args.length} args`);
}
}
static binary(a0, a1, a2) {
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_binary_0(BigInt(a0), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)))));
}
static nan(...args) {
switch (args.length) {
case 1: {
if (M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_nan_0(__unwrap(a0))));
}
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_nan_1(BigInt(a0), BigInt(a1))));
}
if (M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_nan_2(__unwrap(a0))));
}
throw new TypeError(`SX.nan: no overload matches arg types at arity 1`);
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_nan_1(BigInt(a0), BigInt(a1))));
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_nan_1(BigInt(a0), BigInt(a1))));
}
default: throw new Error(`SX.nan: no overload for ${args.length} args`);
}
}
static get_width() {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__static_get_width_0());
}
static from_file(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = "";
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_from_file_0(__ps1, __ps2)));
M._free(__ps1);
M._free(__ps2);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_from_file_0(__ps1, __ps2)));
M._free(__ps1);
M._free(__ps2);
return __r;
}
default: throw new Error(`SX.from_file: no overload for ${args.length} args`);
}
}
static matrix_scalar(a0, a1, a2) {
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_matrix_scalar_0(BigInt(a0), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)))));
}
static get_max_depth() {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__static_get_max_depth_0());
}
static get_precision() {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__static_get_precision_0());
}
static type_name() {
return (()=>{const __p=__chk(M._swig_casadi_Matrix_casadi_SXElem__static_type_name_0());const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
static scalar_matrix(a0, a1, a2) {
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_scalar_matrix_0(BigInt(a0), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)))));
}
static get_input(a0) {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_get_input_0(__unwrap(a0)))));
}
static get_free(a0) {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_get_free_0(__unwrap(a0)))));
}
static get_scientific() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_get_scientific_0())));
}
static inf(...args) {
switch (args.length) {
case 1: {
if (M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_inf_0(__unwrap(a0))));
}
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_inf_1(BigInt(a0), BigInt(a1))));
}
if (M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_inf_2(__unwrap(a0))));
}
throw new TypeError(`SX.inf: no overload matches arg types at arity 1`);
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_inf_1(BigInt(a0), BigInt(a1))));
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_inf_1(BigInt(a0), BigInt(a1))));
}
default: throw new Error(`SX.inf: no overload for ${args.length} args`);
}
}
static call(...args) {
switch (args.length) {
case 2: {
if (M._swig_can_Function(__unwrap(args[0])) && M._swig_can_SXVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new SXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_call_0(__unwrap(a0), __unwrap(__vp2)))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (M._swig_can_Function(__unwrap(args[0])) && M._swig_can_std__vectorT_casadi__SXElem_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__static_call_1(__unwrap(a0), __unwrap(a1)));
}
throw new TypeError(`SX.call: no overload matches arg types at arity 2`);
}
default: throw new Error(`SX.call: no overload for ${args.length} args`);
}
}
static set_scientific(a0) {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__static_set_scientific_0(a0));
}
static set_max_depth(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__static_set_max_depth_0(BigInt(a0)));
}
case 0: {
const [] = args;
const a0 = 1n;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__static_set_max_depth_0(BigInt(a0)));
}
default: throw new Error(`SX.set_max_depth: no overload for ${args.length} args`);
}
}
static rng(a0) {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__static_rng_0(BigInt(a0)));
}
static set_precision(a0) {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__static_set_precision_0(BigInt(a0)));
}
static matrix_matrix(a0, a1, a2) {
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_matrix_matrix_0(BigInt(a0), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)))));
}
static rand(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_rand_0(BigInt(a0), BigInt(a1))));
}
if (M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_rand_1(__unwrap(a0))));
}
if (M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_rand_2(__unwrap(a0))));
}
throw new TypeError(`SX.rand: no overload matches arg types at arity 1`);
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_rand_0(BigInt(a0), BigInt(a1))));
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_rand_0(BigInt(a0), BigInt(a1))));
}
default: throw new Error(`SX.rand: no overload for ${args.length} args`);
}
}
static set_width(a0) {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__static_set_width_0(BigInt(a0)));
}
static eye(a0) {
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__static_eye_0(BigInt(a0))));
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_Matrix_casadi_SXElem_.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_SX(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_Matrix_casadi_SXElem__new_1(__unwrap(args[0]))); break; }
if (M._swig_can_Sparsity(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_Matrix_casadi_SXElem__new_3(__unwrap(args[0]))); break; }
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) { __ptr = __chk(M._swig_casadi_Matrix_casadi_SXElem__new_5(args[0])); break; }
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) { __ptr = __chk(M._swig_casadi_Matrix_casadi_SXElem__new_6(args[0])); break; }
if (M._swig_can_DoubleVector(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_Matrix_casadi_SXElem__new_7(__unwrap(__arr_to_vec(args[0], DoubleVector)))); break; }
if (M._swig_can_DM(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_Matrix_casadi_SXElem__new_8(__unwrap(args[0]))); break; }
throw new TypeError(`SX: arg-type mismatch at length 1`);
}
case 2: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) { __ptr = __chk(M._swig_casadi_Matrix_casadi_SXElem__new_2(BigInt(args[0]), BigInt(args[1]))); break; }
if (M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_SX(__unwrap(args[1]))) { __ptr = __chk(M._swig_casadi_Matrix_casadi_SXElem__new_4(__unwrap(args[0]), __unwrap(args[1]))); break; }
throw new TypeError(`SX: arg-type mismatch at length 2`);
}
case 0: {
__ptr = __chk(M._swig_casadi_Matrix_casadi_SXElem__new_0()); break;
}
default: throw new Error(`SX: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_Matrix_casadi_SXElem_.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_Matrix_casadi_SXElem_.unregister(this);
M._swig_casadi_Matrix_casadi_SXElem__delete(this._ptr);
this._ptr = 0;
}
is_leaf() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_leaf_0(__unwrap(this)))));
}
get(...args) {
switch (args.length) {
case 2: {
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__get_0(__unwrap(this), a0, __unwrap(a1))));
}
if ((typeof args[0] === 'boolean')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__get_1(__unwrap(this), a0, __unwrap(a1))));
}
if ((typeof args[0] === 'boolean') && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__get_2(__unwrap(this), a0, __unwrap(a1))));
}
throw new TypeError(`SX.get: no overload matches arg types at arity 2`);
}
case 3: {
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[1])) && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__get_3(__unwrap(this), a0, __unwrap(a1), __unwrap(a2))));
}
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[1]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__get_4(__unwrap(this), a0, __unwrap(a1), __unwrap(a2))));
}
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__get_5(__unwrap(this), a0, __unwrap(a1), __unwrap(a2))));
}
if ((typeof args[0] === 'boolean')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__get_6(__unwrap(this), a0, __unwrap(a1), __unwrap(a2))));
}
throw new TypeError(`SX.get: no overload matches arg types at arity 3`);
}
default: throw new Error(`SX.get: no overload for ${args.length} args`);
}
}
elements() {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__get_elements_0(__unwrap(this)));
}
is_value(a0) {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_value_0(__unwrap(this), a0))));
}
T() {
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__T_0(__unwrap(this))));
}
resize(a0, a1) {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__resize_0(__unwrap(this), BigInt(a0), BigInt(a1)));
}
is_integer() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_integer_0(__unwrap(this)))));
}
dep(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__dep_0(__unwrap(this), BigInt(a0))));
}
case 0: {
const [] = args;
const a0 = 0n;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__dep_0(__unwrap(this), BigInt(a0))));
}
default: throw new Error(`SX.dep: no overload for ${args.length} args`);
}
}
serialize(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__serialize_1(__unwrap(this), a0));
}
case 0: {
const [] = args;
return (()=>{const __p=__chk(M._swig_casadi_Matrix_casadi_SXElem__serialize_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`SX.serialize: no overload for ${args.length} args`);
}
}
is_valid_input() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_valid_input_0(__unwrap(this)))));
}
has_duplicates() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__has_duplicates_0(__unwrap(this)))));
}
is_output() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_output_0(__unwrap(this)))));
}
op() {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__op_0(__unwrap(this)));
}
is_regular() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_regular_0(__unwrap(this)))));
}
element_hash() {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__element_hash_0(__unwrap(this)));
}
enlarge(...args) {
switch (args.length) {
case 4: {
const [a0, a1, a2, a3] = args;
const a4 = false;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __chk(M._swig_casadi_Matrix_casadi_SXElem__enlarge_0(__unwrap(this), BigInt(a0), BigInt(a1), __unwrap(__vp3), __unwrap(__vp4), a4));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
case 5: {
const [a0, a1, a2, a3, a4] = args;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __chk(M._swig_casadi_Matrix_casadi_SXElem__enlarge_0(__unwrap(this), BigInt(a0), BigInt(a1), __unwrap(__vp3), __unwrap(__vp4), a4));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
default: throw new Error(`SX.enlarge: no overload for ${args.length} args`);
}
}
has_output() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__has_output_0(__unwrap(this)))));
}
which_output() {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__which_output_0(__unwrap(this)));
}
is_symbolic() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_symbolic_0(__unwrap(this)))));
}
print_dense(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__print_dense_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = true;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__print_dense_0(__unwrap(this), a0));
}
default: throw new Error(`SX.print_dense: no overload for ${args.length} args`);
}
}
is_smooth() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_smooth_0(__unwrap(this)))));
}
get_output(a0) {
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__get_output_0(__unwrap(this), BigInt(a0))));
}
is_minus_one() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_minus_one_0(__unwrap(this)))));
}
has_zeros() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__has_zeros_0(__unwrap(this)))));
}
nonzeros() {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__get_nonzeros_0(__unwrap(this)));
}
set_nz(...args) {
switch (args.length) {
case 3: {
if ((M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__set_nz_0(__unwrap(this), __unwrap(__coerce(a0, SX)), a1, __unwrap(a2)));
}
if ((M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__set_nz_1(__unwrap(this), __unwrap(__coerce(a0, SX)), a1, __unwrap(a2)));
}
throw new TypeError(`SX.set_nz: no overload matches arg types at arity 3`);
}
default: throw new Error(`SX.set_nz: no overload for ${args.length} args`);
}
}
name() {
return (()=>{const __p=__chk(M._swig_casadi_Matrix_casadi_SXElem__name_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
is_nonnegative() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_nonnegative_0(__unwrap(this)))));
}
is_commutative() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_commutative_0(__unwrap(this)))));
}
print_vector(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__print_vector_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = true;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__print_vector_0(__unwrap(this), a0));
}
default: throw new Error(`SX.print_vector: no overload for ${args.length} args`);
}
}
print_scalar() {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__print_scalar_0(__unwrap(this)));
}
set(...args) {
switch (args.length) {
case 3: {
if ((M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__set_0(__unwrap(this), __unwrap(__coerce(a0, SX)), a1, __unwrap(a2)));
}
if ((M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__set_1(__unwrap(this), __unwrap(__coerce(a0, SX)), a1, __unwrap(a2)));
}
if ((M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Sparsity(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__set_2(__unwrap(this), __unwrap(__coerce(a0, SX)), a1, __unwrap(a2)));
}
throw new TypeError(`SX.set: no overload matches arg types at arity 3`);
}
case 4: {
if ((M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Slice(__unwrap(args[2])) && M._swig_can_Slice(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__set_3(__unwrap(this), __unwrap(__coerce(a0, SX)), a1, __unwrap(a2), __unwrap(a3)));
}
if ((M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2, a3] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__set_4(__unwrap(this), __unwrap(__coerce(a0, SX)), a1, __unwrap(a2), __unwrap(a3)));
}
if ((M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Slice(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__set_5(__unwrap(this), __unwrap(__coerce(a0, SX)), a1, __unwrap(a2), __unwrap(a3)));
}
if ((M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1, a2, a3] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__set_6(__unwrap(this), __unwrap(__coerce(a0, SX)), a1, __unwrap(a2), __unwrap(a3)));
}
throw new TypeError(`SX.set: no overload matches arg types at arity 4`);
}
default: throw new Error(`SX.set: no overload for ${args.length} args`);
}
}
has_nz(a0, a1) {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__has_nz_0(__unwrap(this), BigInt(a0), BigInt(a1)))));
}
reserve(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__reserve_0(__unwrap(this), BigInt(a0)));
}
case 2: {
const [a0, a1] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__reserve_1(__unwrap(this), BigInt(a0), BigInt(a1)));
}
default: throw new Error(`SX.reserve: no overload for ${args.length} args`);
}
}
__nonzero__() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem____nonzero___0(__unwrap(this)))));
}
is_constant() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_constant_0(__unwrap(this)))));
}
to_file(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = "";
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_Matrix_casadi_SXElem__to_file_0(__unwrap(this), __ps1, __ps2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_Matrix_casadi_SXElem__to_file_0(__unwrap(this), __ps1, __ps2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
default: throw new Error(`SX.to_file: no overload for ${args.length} args`);
}
}
get_nz(...args) {
switch (args.length) {
case 2: {
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__get_nz_0(__unwrap(this), a0, __unwrap(a1))));
}
if ((typeof args[0] === 'boolean')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__get_nz_1(__unwrap(this), a0, __unwrap(a1))));
}
throw new TypeError(`SX.get_nz: no overload matches arg types at arity 2`);
}
default: throw new Error(`SX.get_nz: no overload for ${args.length} args`);
}
}
is_one() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_one_0(__unwrap(this)))));
}
is_half() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_half_0(__unwrap(this)))));
}
is_op(a0) {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_op_0(__unwrap(this), BigInt(a0)))));
}
erase(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_Matrix_casadi_SXElem__erase_1(__unwrap(this), __unwrap(__vp1), a1));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
case 2: {
if (M._swig_can_IntVector(__unwrap(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_Matrix_casadi_SXElem__erase_0(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2), a2));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (M._swig_can_IntVector(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_Matrix_casadi_SXElem__erase_1(__unwrap(this), __unwrap(__vp1), a1));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`SX.erase: no overload matches arg types at arity 2`);
}
case 3: {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_Matrix_casadi_SXElem__erase_0(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2), a2));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
default: throw new Error(`SX.erase: no overload for ${args.length} args`);
}
}
disp(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__disp_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = false;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__disp_0(__unwrap(this), a0));
}
default: throw new Error(`SX.disp: no overload for ${args.length} args`);
}
}
is_minus_inf() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_minus_inf_0(__unwrap(this)))));
}
info() {
return M.__swig_release_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__info_0(__unwrap(this))));
}
printme(a0) {
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__printme_0(__unwrap(this), __unwrap(__coerce(a0, SX)))));
}
is_zero() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_zero_0(__unwrap(this)))));
}
print_split() {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__print_split_0(__unwrap(this)));
}
reset_input() {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__reset_input_0(__unwrap(this)));
}
is_call() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_call_0(__unwrap(this)))));
}
sparsity() {
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__get_sparsity_0(__unwrap(this))));
}
is_eye() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_eye_0(__unwrap(this)))));
}
which_function() {
return __from_handle(__chk(M._swig_casadi_Matrix_casadi_SXElem__which_function_0(__unwrap(this))));
}
n_dep() {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__n_dep_0(__unwrap(this)));
}
is_inf() {
return (!!(__chk(M._swig_casadi_Matrix_casadi_SXElem__is_inf_0(__unwrap(this)))));
}
print_sparse(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__print_sparse_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = true;
return __chk(M._swig_casadi_Matrix_casadi_SXElem__print_sparse_0(__unwrap(this), a0));
}
default: throw new Error(`SX.print_sparse: no overload for ${args.length} args`);
}
}
export_code(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Matrix_casadi_SXElem__export_code_0(__unwrap(this), __ps1, __unwrap(a1)));
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Matrix_casadi_SXElem__export_code_0(__unwrap(this), __ps1, __unwrap(a1)));
M._free(__ps1);
return __r;
}
default: throw new Error(`SX.export_code: no overload for ${args.length} args`);
}
}
clear() {
return __chk(M._swig_casadi_Matrix_casadi_SXElem__clear_0(__unwrap(this)));
}
str(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_Matrix_casadi_SXElem__get_str_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 0: {
const [] = args;
const a0 = false;
return (()=>{const __p=__chk(M._swig_casadi_Matrix_casadi_SXElem__get_str_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`SX.str: no overload for ${args.length} args`);
}
}
remove(a0, a1) {
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_Matrix_casadi_SXElem__remove_0(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
}
SX.prototype._swig_type = '_p_casadi__MatrixT_casadi__SXElem_t';
if (!Object.prototype.hasOwnProperty.call(SX.prototype, 'toString'))
SX.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
SX.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
__mixin(SX, GenericExpressionCommon, GenSX, PrintableCommon);
const __fr_casadi_MX = new FinalizationRegistry(p => M._swig_casadi_MX_delete(p));
class MX extends GenericExpressionCommon {
static interpn_linear(...args) {
switch (args.length) {
case 3: {
const [a0, a1, a2] = args;
const a3 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new MXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_MX_static_interpn_linear_0(__unwrap(__vp1), __unwrap(__coerce(a1, MX)), __unwrap(__vp3), __unwrap(a3))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
case 4: {
const [a0, a1, a2, a3] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new MXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_MX_static_interpn_linear_0(__unwrap(__vp1), __unwrap(__coerce(a1, MX)), __unwrap(__vp3), __unwrap(a3))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
default: throw new Error(`MX.interpn_linear: no overload for ${args.length} args`);
}
}
static type_name() {
return (()=>{const __p=__chk(M._swig_casadi_MX_static_type_name_0());const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
static get_input(a0) {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_MX_static_get_input_0(__unwrap(a0)))));
}
static set_max_depth(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_MX_static_set_max_depth_0(BigInt(a0)));
}
case 0: {
const [] = args;
const a0 = 1n;
return __chk(M._swig_casadi_MX_static_set_max_depth_0(BigInt(a0)));
}
default: throw new Error(`MX.set_max_depth: no overload for ${args.length} args`);
}
}
static eye(a0) {
return __from_handle(__chk(M._swig_casadi_MX_static_eye_0(BigInt(a0))));
}
static get_free(a0) {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_MX_static_get_free_0(__unwrap(a0)))));
}
static test_cast(a0) {
return (!!(__chk(M._swig_casadi_MX_static_test_cast_0(a0))));
}
static binary(...args) {
switch (args.length) {
case 3: {
const [a0, a1, a2] = args;
const a3 = false;
const a4 = false;
return __from_handle(__chk(M._swig_casadi_MX_static_binary_0(BigInt(a0), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)), a3, a4)));
}
case 4: {
const [a0, a1, a2, a3] = args;
const a4 = false;
return __from_handle(__chk(M._swig_casadi_MX_static_binary_0(BigInt(a0), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)), a3, a4)));
}
case 5: {
const [a0, a1, a2, a3, a4] = args;
return __from_handle(__chk(M._swig_casadi_MX_static_binary_0(BigInt(a0), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)), a3, a4)));
}
default: throw new Error(`MX.binary: no overload for ${args.length} args`);
}
}
static bspline_dual(...args) {
switch (args.length) {
case 3: {
const [a0, a1, a2] = args;
const a3 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_MX_static_bspline_dual_0(__unwrap(__vp1), __unwrap(a1), __unwrap(__vp3), __unwrap(a3))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
case 4: {
const [a0, a1, a2, a3] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_MX_static_bspline_dual_0(__unwrap(__vp1), __unwrap(a1), __unwrap(__vp3), __unwrap(a3))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
default: throw new Error(`MX.bspline_dual: no overload for ${args.length} args`);
}
}
static get_max_depth() {
return __chk(M._swig_casadi_MX_static_get_max_depth_0());
}
static simplify_combine_terms(...args) {
switch (args.length) {
case 2: {
const [a0, a1] = args;
const a2 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_MX_static_simplify_combine_terms_0(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
case 3: {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_MX_static_simplify_combine_terms_0(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
default: throw new Error(`MX.simplify_combine_terms: no overload for ${args.length} args`);
}
}
static nan(...args) {
switch (args.length) {
case 1: {
if (M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_MX_static_nan_0(__unwrap(a0))));
}
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_MX_static_nan_1(BigInt(a0), BigInt(a1))));
}
if (M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_MX_static_nan_2(__unwrap(a0))));
}
throw new TypeError(`MX.nan: no overload matches arg types at arity 1`);
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_MX_static_nan_1(BigInt(a0), BigInt(a1))));
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_MX_static_nan_1(BigInt(a0), BigInt(a1))));
}
default: throw new Error(`MX.nan: no overload for ${args.length} args`);
}
}
static simplify_ref_count(...args) {
switch (args.length) {
case 2: {
const [a0, a1] = args;
const a2 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_MX_static_simplify_ref_count_0(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
case 3: {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_MX_static_simplify_ref_count_0(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
default: throw new Error(`MX.simplify_ref_count: no overload for ${args.length} args`);
}
}
static einstein(...args) {
switch (args.length) {
case 8: {
const [a0, a1, a2, a3, a4, a5, a6, a7] = args;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new IntVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
let __vp6 = a5;
let __vown6 = false;
if (Array.isArray(a5)) {
__vp6 = new IntVector();
__vown6 = true;
for (const __x of a5) __vp6.push_back(__x);
}
let __vp7 = a6;
let __vown7 = false;
if (Array.isArray(a6)) {
__vp7 = new IntVector();
__vown7 = true;
for (const __x of a6) __vp7.push_back(__x);
}
let __vp8 = a7;
let __vown8 = false;
if (Array.isArray(a7)) {
__vp8 = new IntVector();
__vown8 = true;
for (const __x of a7) __vp8.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_MX_static_einstein_1(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__vp3), __unwrap(__vp4), __unwrap(__vp5), __unwrap(__vp6), __unwrap(__vp7), __unwrap(__vp8))));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
if (__vown5 && __vp5.delete) __vp5.delete();
if (__vown6 && __vp6.delete) __vp6.delete();
if (__vown7 && __vp7.delete) __vp7.delete();
if (__vown8 && __vp8.delete) __vp8.delete();
return __r;
}
case 9: {
const [a0, a1, a2, a3, a4, a5, a6, a7, a8] = args;
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new IntVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
let __vp6 = a5;
let __vown6 = false;
if (Array.isArray(a5)) {
__vp6 = new IntVector();
__vown6 = true;
for (const __x of a5) __vp6.push_back(__x);
}
let __vp7 = a6;
let __vown7 = false;
if (Array.isArray(a6)) {
__vp7 = new IntVector();
__vown7 = true;
for (const __x of a6) __vp7.push_back(__x);
}
let __vp8 = a7;
let __vown8 = false;
if (Array.isArray(a7)) {
__vp8 = new IntVector();
__vown8 = true;
for (const __x of a7) __vp8.push_back(__x);
}
let __vp9 = a8;
let __vown9 = false;
if (Array.isArray(a8)) {
__vp9 = new IntVector();
__vown9 = true;
for (const __x of a8) __vp9.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_MX_static_einstein_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)), __unwrap(__vp4), __unwrap(__vp5), __unwrap(__vp6), __unwrap(__vp7), __unwrap(__vp8), __unwrap(__vp9))));
if (__vown4 && __vp4.delete) __vp4.delete();
if (__vown5 && __vp5.delete) __vp5.delete();
if (__vown6 && __vp6.delete) __vp6.delete();
if (__vown7 && __vp7.delete) __vp7.delete();
if (__vown8 && __vp8.delete) __vp8.delete();
if (__vown9 && __vp9.delete) __vp9.delete();
return __r;
}
default: throw new Error(`MX.einstein: no overload for ${args.length} args`);
}
}
static deserialize(a0) {
return __from_handle(__chk(M._swig_casadi_MX_static_deserialize_0(a0)));
}
static inf(...args) {
switch (args.length) {
case 1: {
if (M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_MX_static_inf_0(__unwrap(a0))));
}
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_MX_static_inf_1(BigInt(a0), BigInt(a1))));
}
if (M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_MX_static_inf_2(__unwrap(a0))));
}
throw new TypeError(`MX.inf: no overload matches arg types at arity 1`);
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_MX_static_inf_1(BigInt(a0), BigInt(a1))));
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = 1n;
return __from_handle(__chk(M._swig_casadi_MX_static_inf_1(BigInt(a0), BigInt(a1))));
}
default: throw new Error(`MX.inf: no overload for ${args.length} args`);
}
}
static simplify_const_folding(...args) {
switch (args.length) {
case 2: {
const [a0, a1] = args;
const a2 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_MX_static_simplify_const_folding_0(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
case 3: {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_MX_static_simplify_const_folding_0(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
default: throw new Error(`MX.simplify_const_folding: no overload for ${args.length} args`);
}
}
static unary(...args) {
switch (args.length) {
case 2: {
const [a0, a1] = args;
const a2 = false;
return __from_handle(__chk(M._swig_casadi_MX_static_unary_0(BigInt(a0), __unwrap(__coerce(a1, MX)), a2)));
}
case 3: {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_MX_static_unary_0(BigInt(a0), __unwrap(__coerce(a1, MX)), a2)));
}
default: throw new Error(`MX.unary: no overload for ${args.length} args`);
}
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_MX.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_Sparsity(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_MX_new_2(__unwrap(args[0]))); break; }
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) { __ptr = __chk(M._swig_casadi_MX_new_6(args[0])); break; }
if (M._swig_can_DM(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_MX_new_7(__unwrap(args[0]))); break; }
if (M._swig_can_MX(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_MX_new_8(__unwrap(args[0]))); break; }
throw new TypeError(`MX: arg-type mismatch at length 1`);
}
case 2: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) { __ptr = __chk(M._swig_casadi_MX_new_1(BigInt(args[0]), BigInt(args[1]))); break; }
if (M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_MX(__unwrap(args[1]))) { __ptr = __chk(M._swig_casadi_MX_new_3(__unwrap(args[0]), __unwrap(args[1]))); break; }
if (M._swig_can_Sparsity(__unwrap(args[0])) && (typeof args[1] === 'string')) {
const __nps1 = M.lengthBytesUTF8(args[1]);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(args[1], __ps1, __nps1 + 1);
__ptr = __chk(M._swig_casadi_MX_new_4(__unwrap(args[0]), __ps1));
M._free(__ps1);
break;
}
if (M._swig_can_DM(__unwrap(args[0])) && (typeof args[1] === 'string')) {
const __nps1 = M.lengthBytesUTF8(args[1]);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(args[1], __ps1, __nps1 + 1);
__ptr = __chk(M._swig_casadi_MX_new_5(__unwrap(args[0]), __ps1));
M._free(__ps1);
break;
}
throw new TypeError(`MX: arg-type mismatch at length 2`);
}
case 0: {
__ptr = __chk(M._swig_casadi_MX_new_0()); break;
}
default: throw new Error(`MX: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_MX.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_MX.unregister(this);
M._swig_casadi_MX_delete(this._ptr);
this._ptr = 0;
}
inv() {
return __from_handle(__chk(M._swig_casadi_MX_inv_0(__unwrap(this))));
}
T() {
return __from_handle(__chk(M._swig_casadi_MX_T_0(__unwrap(this))));
}
is_value(a0) {
return (!!(__chk(M._swig_casadi_MX_is_value_0(__unwrap(this), a0))));
}
nzref(a0, a1) {
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_MX_nzref_0(__unwrap(this), __unwrap(a0), __unwrap(__vp2))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
reset_dump_count() {
return __chk(M._swig_casadi_MX_reset_dump_count_0(__unwrap(this)));
}
split_primitives(...args) {
switch (args.length) {
case 1: {
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_MX_split_primitives_0(__unwrap(this), __unwrap(__coerce(a0, MX))))));
}
if ((M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_MX_split_primitives_1(__unwrap(this), __unwrap(__coerce(a0, SX))))));
}
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_MX_split_primitives_2(__unwrap(this), __unwrap(__coerce(a0, DM))))));
}
throw new TypeError(`MX.split_primitives: no overload matches arg types at arity 1`);
}
default: throw new Error(`MX.split_primitives: no overload for ${args.length} args`);
}
}
attachAssert(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = "";
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_MX_attachAssert_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __ps2)));
M._free(__ps2);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_MX_attachAssert_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __ps2)));
M._free(__ps2);
return __r;
}
default: throw new Error(`MX.attachAssert: no overload for ${args.length} args`);
}
}
is_unary() {
return (!!(__chk(M._swig_casadi_MX_is_unary_0(__unwrap(this)))));
}
is_minus_inf() {
return (!!(__chk(M._swig_casadi_MX_is_minus_inf_0(__unwrap(this)))));
}
which_function() {
return __from_handle(__chk(M._swig_casadi_MX_which_function_0(__unwrap(this))));
}
is_half() {
return (!!(__chk(M._swig_casadi_MX_is_half_0(__unwrap(this)))));
}
name() {
return (()=>{const __p=__chk(M._swig_casadi_MX_name_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
op() {
return __chk(M._swig_casadi_MX_op_0(__unwrap(this)));
}
printme(a0) {
return __from_handle(__chk(M._swig_casadi_MX_printme_0(__unwrap(this), __unwrap(__coerce(a0, MX)))));
}
is_zero() {
return (!!(__chk(M._swig_casadi_MX_is_zero_0(__unwrap(this)))));
}
join_primitives(...args) {
switch (args.length) {
case 1: {
if (M._swig_can_MXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_MX_join_primitives_0(__unwrap(this), __unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_SXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_MX_join_primitives_1(__unwrap(this), __unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_DMVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_MX_join_primitives_2(__unwrap(this), __unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`MX.join_primitives: no overload matches arg types at arity 1`);
}
default: throw new Error(`MX.join_primitives: no overload for ${args.length} args`);
}
}
is_doubled() {
return (!!(__chk(M._swig_casadi_MX_is_doubled_0(__unwrap(this)))));
}
is_op(a0) {
return (!!(__chk(M._swig_casadi_MX_is_op_0(__unwrap(this), BigInt(a0)))));
}
erase(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_MX_erase_1(__unwrap(this), __unwrap(__vp1), a1));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
case 2: {
if (M._swig_can_IntVector(__unwrap(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_MX_erase_0(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2), a2));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (M._swig_can_IntVector(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_MX_erase_1(__unwrap(this), __unwrap(__vp1), a1));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`MX.erase: no overload matches arg types at arity 2`);
}
case 3: {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_MX_erase_0(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2), a2));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
default: throw new Error(`MX.erase: no overload for ${args.length} args`);
}
}
is_norm() {
return (!!(__chk(M._swig_casadi_MX_is_norm_0(__unwrap(this)))));
}
nonzeros() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_MX_get_nonzeros_0(__unwrap(this)))));
}
n_out() {
return __chk(M._swig_casadi_MX_n_out_0(__unwrap(this)));
}
dump(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_MX_dump_0(__unwrap(this), __ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_MX_dump_0(__unwrap(this), __ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
default: throw new Error(`MX.dump: no overload for ${args.length} args`);
}
}
set_nz(...args) {
switch (args.length) {
case 3: {
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_MX_set_nz_0(__unwrap(this), __unwrap(__coerce(a0, MX)), a1, __unwrap(a2)));
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_MX_set_nz_1(__unwrap(this), __unwrap(__coerce(a0, MX)), a1, __unwrap(a2)));
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_MX_set_nz_2(__unwrap(this), __unwrap(__coerce(a0, MX)), a1, __unwrap(__coerce(a2, MX))));
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_MX_set_nz_3(__unwrap(this), __unwrap(__coerce(a0, MX)), a1, BigInt(a2)));
}
throw new TypeError(`MX.set_nz: no overload matches arg types at arity 3`);
}
default: throw new Error(`MX.set_nz: no overload for ${args.length} args`);
}
}
is_call() {
return (!!(__chk(M._swig_casadi_MX_is_call_0(__unwrap(this)))));
}
primitives() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_MX_primitives_0(__unwrap(this)))));
}
is_symbolic() {
return (!!(__chk(M._swig_casadi_MX_is_symbolic_0(__unwrap(this)))));
}
is_valid_input() {
return (!!(__chk(M._swig_casadi_MX_is_valid_input_0(__unwrap(this)))));
}
has_duplicates() {
return (!!(__chk(M._swig_casadi_MX_has_duplicates_0(__unwrap(this)))));
}
is_multiplication() {
return (!!(__chk(M._swig_casadi_MX_is_multiplication_0(__unwrap(this)))));
}
get(...args) {
switch (args.length) {
case 2: {
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_0(__unwrap(this), a0, __unwrap(a1))));
}
if ((typeof args[0] === 'boolean')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_1(__unwrap(this), a0, __unwrap(a1))));
}
if ((typeof args[0] === 'boolean') && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_2(__unwrap(this), a0, __unwrap(a1))));
}
if ((typeof args[0] === 'boolean') && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_3(__unwrap(this), a0, __unwrap(__coerce(a1, MX)))));
}
if ((typeof args[0] === 'boolean') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_4(__unwrap(this), a0, BigInt(a1))));
}
throw new TypeError(`MX.get: no overload matches arg types at arity 2`);
}
case 3: {
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[1])) && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_5(__unwrap(this), a0, __unwrap(a1), __unwrap(a2))));
}
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[1]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_6(__unwrap(this), a0, __unwrap(a1), __unwrap(a2))));
}
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_7(__unwrap(this), a0, __unwrap(a1), BigInt(a2))));
}
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_8(__unwrap(this), a0, __unwrap(a1), __unwrap(a2))));
}
if ((typeof args[0] === 'boolean') && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_9(__unwrap(this), a0, BigInt(a1), __unwrap(a2))));
}
if ((typeof args[0] === 'boolean')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_10(__unwrap(this), a0, __unwrap(a1), __unwrap(a2))));
}
if ((typeof args[0] === 'boolean') && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_11(__unwrap(this), a0, BigInt(a1), BigInt(a2))));
}
if ((typeof args[0] === 'boolean') && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_12(__unwrap(this), a0, __unwrap(__coerce(a1, MX)), __unwrap(a2))));
}
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_13(__unwrap(this), a0, __unwrap(a1), __unwrap(__coerce(a2, MX)))));
}
if ((typeof args[0] === 'boolean') && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_14(__unwrap(this), a0, __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)))));
}
throw new TypeError(`MX.get: no overload matches arg types at arity 3`);
}
default: throw new Error(`MX.get: no overload for ${args.length} args`);
}
}
info() {
return M.__swig_release_handle(__chk(M._swig_casadi_MX_info_0(__unwrap(this))));
}
is_integer() {
return (!!(__chk(M._swig_casadi_MX_is_integer_0(__unwrap(this)))));
}
n_primitives() {
return __chk(M._swig_casadi_MX_n_primitives_0(__unwrap(this)));
}
eval_mx(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = [];
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_MX_eval_mx_0(__unwrap(this), __unwrap(__vp1), a1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
case 2: {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_MX_eval_mx_0(__unwrap(this), __unwrap(__vp1), a1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
default: throw new Error(`MX.eval_mx: no overload for ${args.length} args`);
}
}
n_dep() {
return __chk(M._swig_casadi_MX_n_dep_0(__unwrap(this)));
}
dep(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_MX_dep_0(__unwrap(this), BigInt(a0))));
}
case 0: {
const [] = args;
const a0 = 0n;
return __from_handle(__chk(M._swig_casadi_MX_dep_0(__unwrap(this), BigInt(a0))));
}
default: throw new Error(`MX.dep: no overload for ${args.length} args`);
}
}
get_nz(...args) {
switch (args.length) {
case 2: {
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_nz_0(__unwrap(this), a0, __unwrap(a1))));
}
if ((typeof args[0] === 'boolean')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_nz_1(__unwrap(this), a0, __unwrap(a1))));
}
if ((typeof args[0] === 'boolean') && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_nz_2(__unwrap(this), a0, __unwrap(__coerce(a1, MX)))));
}
if ((typeof args[0] === 'boolean') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_nz_3(__unwrap(this), a0, BigInt(a1))));
}
throw new TypeError(`MX.get_nz: no overload matches arg types at arity 2`);
}
case 3: {
if ((typeof args[0] === 'boolean') && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_nz_4(__unwrap(this), a0, __unwrap(__coerce(a1, MX)), __unwrap(a2))));
}
if ((typeof args[0] === 'boolean') && M._swig_can_Slice(__unwrap(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_nz_5(__unwrap(this), a0, __unwrap(a1), __unwrap(__coerce(a2, MX)))));
}
if ((typeof args[0] === 'boolean') && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_MX_get_nz_6(__unwrap(this), a0, __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)))));
}
throw new TypeError(`MX.get_nz: no overload matches arg types at arity 3`);
}
default: throw new Error(`MX.get_nz: no overload for ${args.length} args`);
}
}
get_temp() {
return __chk(M._swig_casadi_MX_get_temp_0(__unwrap(this)));
}
is_one() {
return (!!(__chk(M._swig_casadi_MX_is_one_0(__unwrap(this)))));
}
__nonzero__() {
return (!!(__chk(M._swig_casadi_MX___nonzero___0(__unwrap(this)))));
}
is_constant() {
return (!!(__chk(M._swig_casadi_MX_is_constant_0(__unwrap(this)))));
}
serialize(a0) {
return __chk(M._swig_casadi_MX_serialize_0(__unwrap(this), a0));
}
mapping() {
return __chk(M._swig_casadi_MX_mapping_0(__unwrap(this)));
}
is_output() {
return (!!(__chk(M._swig_casadi_MX_is_output_0(__unwrap(this)))));
}
is_transpose() {
return (!!(__chk(M._swig_casadi_MX_is_transpose_0(__unwrap(this)))));
}
is_regular() {
return (!!(__chk(M._swig_casadi_MX_is_regular_0(__unwrap(this)))));
}
monitor(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_MX_monitor_0(__unwrap(this), __ps1)));
M._free(__ps1);
return __r;
}
is_nonnegative() {
return (!!(__chk(M._swig_casadi_MX_is_nonnegative_0(__unwrap(this)))));
}
is_commutative() {
return (!!(__chk(M._swig_casadi_MX_is_commutative_0(__unwrap(this)))));
}
sparsity() {
return __from_handle(__chk(M._swig_casadi_MX_get_sparsity_0(__unwrap(this))));
}
has_output() {
return (!!(__chk(M._swig_casadi_MX_has_output_0(__unwrap(this)))));
}
is_eye() {
return (!!(__chk(M._swig_casadi_MX_is_eye_0(__unwrap(this)))));
}
get_output(a0) {
return __from_handle(__chk(M._swig_casadi_MX_get_output_0(__unwrap(this), BigInt(a0))));
}
which_output() {
return __chk(M._swig_casadi_MX_which_output_0(__unwrap(this)));
}
reset_input() {
return __chk(M._swig_casadi_MX_reset_input_0(__unwrap(this)));
}
set_temp(a0) {
return __chk(M._swig_casadi_MX_set_temp_0(__unwrap(this), BigInt(a0)));
}
is_binary() {
return (!!(__chk(M._swig_casadi_MX_is_binary_0(__unwrap(this)))));
}
is_inf() {
return (!!(__chk(M._swig_casadi_MX_is_inf_0(__unwrap(this)))));
}
enlarge(...args) {
switch (args.length) {
case 4: {
const [a0, a1, a2, a3] = args;
const a4 = false;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __chk(M._swig_casadi_MX_enlarge_0(__unwrap(this), BigInt(a0), BigInt(a1), __unwrap(__vp3), __unwrap(__vp4), a4));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
case 5: {
const [a0, a1, a2, a3, a4] = args;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __chk(M._swig_casadi_MX_enlarge_0(__unwrap(this), BigInt(a0), BigInt(a1), __unwrap(__vp3), __unwrap(__vp4), a4));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
default: throw new Error(`MX.enlarge: no overload for ${args.length} args`);
}
}
is_minus_one() {
return (!!(__chk(M._swig_casadi_MX_is_minus_one_0(__unwrap(this)))));
}
set(...args) {
switch (args.length) {
case 3: {
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_MX_set_0(__unwrap(this), __unwrap(__coerce(a0, MX)), a1, __unwrap(a2)));
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_MX_set_1(__unwrap(this), __unwrap(__coerce(a0, MX)), a1, __unwrap(a2)));
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Sparsity(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_MX_set_2(__unwrap(this), __unwrap(__coerce(a0, MX)), a1, __unwrap(a2)));
}
throw new TypeError(`MX.set: no overload matches arg types at arity 3`);
}
case 4: {
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Slice(__unwrap(args[2])) && M._swig_can_Slice(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
return __chk(M._swig_casadi_MX_set_3(__unwrap(this), __unwrap(__coerce(a0, MX)), a1, __unwrap(a2), __unwrap(a3)));
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Slice(__unwrap(args[2]))) {
const [a0, a1, a2, a3] = args;
return __chk(M._swig_casadi_MX_set_4(__unwrap(this), __unwrap(__coerce(a0, MX)), a1, __unwrap(a2), __unwrap(a3)));
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean') && M._swig_can_Slice(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
return __chk(M._swig_casadi_MX_set_5(__unwrap(this), __unwrap(__coerce(a0, MX)), a1, __unwrap(a2), __unwrap(a3)));
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1, a2, a3] = args;
return __chk(M._swig_casadi_MX_set_6(__unwrap(this), __unwrap(__coerce(a0, MX)), a1, __unwrap(a2), __unwrap(a3)));
}
throw new TypeError(`MX.set: no overload matches arg types at arity 4`);
}
default: throw new Error(`MX.set: no overload for ${args.length} args`);
}
}
}
MX.prototype._swig_type = '_p_casadi__MX';
if (!Object.prototype.hasOwnProperty.call(MX.prototype, 'toString'))
MX.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
MX.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
__mixin(MX, PrintableCommon, GenMX, SharedObject);
const __fr_casadi_Function = new FinalizationRegistry(p => M._swig_casadi_Function_delete(p));
class Function extends SharedObject {
static conditional(...args) {
switch (args.length) {
case 2: {
const [a0, a1] = args;
const a2 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_static_conditional_1(__ps1, __unwrap(a1), __unwrap(a2))));
M._free(__ps1);
return __r;
}
case 3: {
if (typeof args[0] === 'string' && M._swig_can_FunctionVector(__unwrap(args[1])) && M._swig_can_Function(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new FunctionVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_static_conditional_0(__ps1, __unwrap(__vp2), __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_Function(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_static_conditional_1(__ps1, __unwrap(a1), __unwrap(a2))));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.conditional: no overload matches arg types at arity 3`);
}
case 4: {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new FunctionVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_static_conditional_0(__ps1, __unwrap(__vp2), __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
default: throw new Error(`Function.conditional: no overload for ${args.length} args`);
}
}
static load(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_static_load_0(__ps1)));
M._free(__ps1);
return __r;
}
static if_else(...args) {
switch (args.length) {
case 3: {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_static_if_else_0(__ps1, __unwrap(a1), __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
return __r;
}
case 4: {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_static_if_else_0(__ps1, __unwrap(a1), __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
return __r;
}
default: throw new Error(`Function.if_else: no overload for ${args.length} args`);
}
}
static jit(...args) {
switch (args.length) {
case 4: {
const [a0, a1, a2, a3] = args;
const a4 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new StringVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_static_jit_0(__ps1, __ps2, __unwrap(__vp3), __unwrap(__vp4), __unwrap(a4))));
M._free(__ps1);
M._free(__ps2);
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
case 5: {
const [a0, a1, a2, a3, a4] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new StringVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_static_jit_0(__ps1, __ps2, __unwrap(__vp3), __unwrap(__vp4), __unwrap(a4))));
M._free(__ps1);
M._free(__ps2);
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
case 6: {
const [a0, a1, a2, a3, a4, a5] = args;
const a6 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new StringVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new SparsityVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
let __vp6 = a5;
let __vown6 = false;
if (Array.isArray(a5)) {
__vp6 = new SparsityVector();
__vown6 = true;
for (const __x of a5) __vp6.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_static_jit_1(__ps1, __ps2, __unwrap(__vp3), __unwrap(__vp4), __unwrap(__vp5), __unwrap(__vp6), __unwrap(a6))));
M._free(__ps1);
M._free(__ps2);
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
if (__vown5 && __vp5.delete) __vp5.delete();
if (__vown6 && __vp6.delete) __vp6.delete();
return __r;
}
case 7: {
const [a0, a1, a2, a3, a4, a5, a6] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new StringVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new SparsityVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
let __vp6 = a5;
let __vown6 = false;
if (Array.isArray(a5)) {
__vp6 = new SparsityVector();
__vown6 = true;
for (const __x of a5) __vp6.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_static_jit_1(__ps1, __ps2, __unwrap(__vp3), __unwrap(__vp4), __unwrap(__vp5), __unwrap(__vp6), __unwrap(a6))));
M._free(__ps1);
M._free(__ps2);
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
if (__vown5 && __vp5.delete) __vp5.delete();
if (__vown6 && __vp6.delete) __vp6.delete();
return __r;
}
default: throw new Error(`Function.jit: no overload for ${args.length} args`);
}
}
static bspline(...args) {
switch (args.length) {
case 4: {
const [a0, a1, a2, a3] = args;
const a4 = 1n;
const a5 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new DoubleVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_static_bspline_0(__ps1, __unwrap(a1), __unwrap(__vp3), __unwrap(__vp4), BigInt(a4), __unwrap(a5))));
M._free(__ps1);
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
case 5: {
const [a0, a1, a2, a3, a4] = args;
const a5 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new DoubleVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_static_bspline_0(__ps1, __unwrap(a1), __unwrap(__vp3), __unwrap(__vp4), BigInt(a4), __unwrap(a5))));
M._free(__ps1);
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
case 6: {
const [a0, a1, a2, a3, a4, a5] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new DoubleVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_static_bspline_0(__ps1, __unwrap(a1), __unwrap(__vp3), __unwrap(__vp4), BigInt(a4), __unwrap(a5))));
M._free(__ps1);
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
default: throw new Error(`Function.bspline: no overload for ${args.length} args`);
}
}
static check_name(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_Function_static_check_name_0(__ps1))));
M._free(__ps1);
return __r;
}
static fix_name(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_Function_static_fix_name_0(__ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
static deserialize(...args) {
switch (args.length) {
case 1: {
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_static_deserialize_1(__ps1)));
M._free(__ps1);
return __r;
}
{
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Function_static_deserialize_0(a0)));
}
}
default: throw new Error(`Function.deserialize: no overload for ${args.length} args`);
}
}
static type_name() {
return (()=>{const __p=__chk(M._swig_casadi_Function_static_type_name_0());const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_Function.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if ((typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_Function_new_1(__ps0));
M._free(__ps0);
break;
}
if (M._swig_can_Function(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_Function_new_8(__unwrap(args[0]))); break; }
throw new TypeError(`Function: arg-type mismatch at length 1`);
}
case 3: {
if (M._swig_can_SXVector(__unwrap(args[1])) && M._swig_can_SXVector(__unwrap(args[2])) && (typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_Function_new_2(__ps0, __unwrap(__arr_to_vec(args[1], SXVector)), __unwrap(__arr_to_vec(args[2], SXVector)), undefined));
M._free(__ps0);
break;
}
if (M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_MXVector(__unwrap(args[2])) && (typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_Function_new_5(__ps0, __unwrap(__arr_to_vec(args[1], MXVector)), __unwrap(__arr_to_vec(args[2], MXVector)), undefined));
M._free(__ps0);
break;
}
throw new TypeError(`Function: arg-type mismatch at length 3`);
}
case 4: {
if (M._swig_can_SXVector(__unwrap(args[1])) && M._swig_can_SXVector(__unwrap(args[2])) && (typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_Function_new_2(__ps0, __unwrap(__arr_to_vec(args[1], SXVector)), __unwrap(__arr_to_vec(args[2], SXVector)), args[3]));
M._free(__ps0);
break;
}
if (M._swig_can_StringVector(__unwrap(args[2])) && M._swig_can_StringVector(__unwrap(args[3])) && (typeof args[0] === 'string') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_Function_new_4(__ps0, args[1], __unwrap(__arr_to_vec(args[2], StringVector)), __unwrap(__arr_to_vec(args[3], StringVector)), undefined));
M._free(__ps0);
break;
}
if (M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_MXVector(__unwrap(args[2])) && (typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_Function_new_5(__ps0, __unwrap(__arr_to_vec(args[1], MXVector)), __unwrap(__arr_to_vec(args[2], MXVector)), args[3]));
M._free(__ps0);
break;
}
if (M._swig_can_StringVector(__unwrap(args[2])) && M._swig_can_StringVector(__unwrap(args[3])) && (typeof args[0] === 'string') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_Function_new_7(__ps0, args[1], __unwrap(__arr_to_vec(args[2], StringVector)), __unwrap(__arr_to_vec(args[3], StringVector)), undefined));
M._free(__ps0);
break;
}
throw new TypeError(`Function: arg-type mismatch at length 4`);
}
case 5: {
if (M._swig_can_SXVector(__unwrap(args[1])) && M._swig_can_SXVector(__unwrap(args[2])) && M._swig_can_StringVector(__unwrap(args[3])) && M._swig_can_StringVector(__unwrap(args[4])) && (typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_Function_new_3(__ps0, __unwrap(__arr_to_vec(args[1], SXVector)), __unwrap(__arr_to_vec(args[2], SXVector)), __unwrap(__arr_to_vec(args[3], StringVector)), __unwrap(__arr_to_vec(args[4], StringVector)), undefined));
M._free(__ps0);
break;
}
if (M._swig_can_StringVector(__unwrap(args[2])) && M._swig_can_StringVector(__unwrap(args[3])) && (typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_Function_new_4(__ps0, args[1], __unwrap(__arr_to_vec(args[2], StringVector)), __unwrap(__arr_to_vec(args[3], StringVector)), args[4]));
M._free(__ps0);
break;
}
if (M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_MXVector(__unwrap(args[2])) && M._swig_can_StringVector(__unwrap(args[3])) && M._swig_can_StringVector(__unwrap(args[4])) && (typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_Function_new_6(__ps0, __unwrap(__arr_to_vec(args[1], MXVector)), __unwrap(__arr_to_vec(args[2], MXVector)), __unwrap(__arr_to_vec(args[3], StringVector)), __unwrap(__arr_to_vec(args[4], StringVector)), undefined));
M._free(__ps0);
break;
}
if (M._swig_can_StringVector(__unwrap(args[2])) && M._swig_can_StringVector(__unwrap(args[3])) && (typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_Function_new_7(__ps0, args[1], __unwrap(__arr_to_vec(args[2], StringVector)), __unwrap(__arr_to_vec(args[3], StringVector)), args[4]));
M._free(__ps0);
break;
}
throw new TypeError(`Function: arg-type mismatch at length 5`);
}
case 6: {
if (M._swig_can_SXVector(__unwrap(args[1])) && M._swig_can_SXVector(__unwrap(args[2])) && M._swig_can_StringVector(__unwrap(args[3])) && M._swig_can_StringVector(__unwrap(args[4])) && (typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_Function_new_3(__ps0, __unwrap(__arr_to_vec(args[1], SXVector)), __unwrap(__arr_to_vec(args[2], SXVector)), __unwrap(__arr_to_vec(args[3], StringVector)), __unwrap(__arr_to_vec(args[4], StringVector)), args[5]));
M._free(__ps0);
break;
}
if (M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_MXVector(__unwrap(args[2])) && M._swig_can_StringVector(__unwrap(args[3])) && M._swig_can_StringVector(__unwrap(args[4])) && (typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_Function_new_6(__ps0, __unwrap(__arr_to_vec(args[1], MXVector)), __unwrap(__arr_to_vec(args[2], MXVector)), __unwrap(__arr_to_vec(args[3], StringVector)), __unwrap(__arr_to_vec(args[4], StringVector)), args[5]));
M._free(__ps0);
break;
}
throw new TypeError(`Function: arg-type mismatch at length 6`);
}
case 0: {
__ptr = __chk(M._swig_casadi_Function_new_0()); break;
}
default: throw new Error(`Function: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_Function.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_Function.unregister(this);
M._swig_casadi_Function_delete(this._ptr);
this._ptr = 0;
}
wrap_as_needed(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Function_wrap_as_needed_0(__unwrap(this), __unwrap(a0))));
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_wrap_as_needed_1(__unwrap(this), __ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
default: throw new Error(`Function.wrap_as_needed: no overload for ${args.length} args`);
}
}
generate_lifted() {
return __chk(M._swig_casadi_Function_generate_lifted_0(__unwrap(this)));
}
change_option(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Function_change_option_0(__unwrap(this), __ps1, __unwrap(a1)));
M._free(__ps1);
return __r;
}
generate_dependencies(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_Function_generate_dependencies_0(__unwrap(this), __ps1, __unwrap(a1)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_Function_generate_dependencies_0(__unwrap(this), __ps1, __unwrap(a1)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
default: throw new Error(`Function.generate_dependencies: no overload for ${args.length} args`);
}
}
n_instructions() {
return __chk(M._swig_casadi_Function_n_instructions_0(__unwrap(this)));
}
mx_in(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Function_mx_in_0(__unwrap(this), BigInt(a0))));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_mx_in_1(__unwrap(this), __ps1)));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.mx_in: no overload matches arg types at arity 1`);
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_mx_in_2(__unwrap(this)))));
}
default: throw new Error(`Function.mx_in: no overload for ${args.length} args`);
}
}
instructions_sx() {
return __from_handle(__chk(M._swig_casadi_Function_instructions_sx_0(__unwrap(this))));
}
assert_sparsity_out(...args) {
switch (args.length) {
case 2: {
const [a0, a1] = args;
const a2 = 1n;
const a3 = true;
return __chk(M._swig_casadi_Function_assert_sparsity_out_0(__unwrap(this), BigInt(a0), __unwrap(a1), BigInt(a2), a3));
}
case 3: {
const [a0, a1, a2] = args;
const a3 = true;
return __chk(M._swig_casadi_Function_assert_sparsity_out_0(__unwrap(this), BigInt(a0), __unwrap(a1), BigInt(a2), a3));
}
case 4: {
const [a0, a1, a2, a3] = args;
return __chk(M._swig_casadi_Function_assert_sparsity_out_0(__unwrap(this), BigInt(a0), __unwrap(a1), BigInt(a2), a3));
}
default: throw new Error(`Function.assert_sparsity_out: no overload for ${args.length} args`);
}
}
sz_res() {
return __chk(M._swig_casadi_Function_sz_res_0(__unwrap(this)));
}
info() {
return M.__swig_release_handle(__chk(M._swig_casadi_Function_info_0(__unwrap(this))));
}
get_free() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_get_free_0(__unwrap(this)))));
}
sx_out(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Function_sx_out_0(__unwrap(this), BigInt(a0))));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_sx_out_1(__unwrap(this), __ps1)));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.sx_out: no overload matches arg types at arity 1`);
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_sx_out_2(__unwrap(this)))));
}
default: throw new Error(`Function.sx_out: no overload for ${args.length} args`);
}
}
transform(...args) {
switch (args.length) {
case 1: {
if (M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Function_transform_0(__unwrap(this), __unwrap(a0))));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const a1 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_transform_1(__unwrap(this), __ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
if (M._swig_can_std__vectorT_std__vectorT_casadi__GenericType_t_t(__unwrap(args[0]))) {
const [a0] = args;
const a1 = {};
return __from_handle(__chk(M._swig_casadi_Function_transform_2(__unwrap(this), __unwrap(a0), __unwrap(a1))));
}
throw new TypeError(`Function.transform: no overload matches arg types at arity 1`);
}
case 2: {
if (typeof args[0] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_transform_1(__unwrap(this), __ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
if (M._swig_can_std__vectorT_std__vectorT_casadi__GenericType_t_t(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Function_transform_2(__unwrap(this), __unwrap(a0), __unwrap(a1))));
}
if (typeof args[0] === 'string' && M._swig_can_std__vectorT_std__vectorT_casadi__GenericType_t_t(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_transform_3(__unwrap(this), __ps1, __unwrap(a1), __unwrap(a2))));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.transform: no overload matches arg types at arity 2`);
}
case 3: {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_transform_3(__unwrap(this), __ps1, __unwrap(a1), __unwrap(a2))));
M._free(__ps1);
return __r;
}
case 0: {
const [] = args;
const a0 = {};
return __from_handle(__chk(M._swig_casadi_Function_transform_0(__unwrap(this), __unwrap(a0))));
}
default: throw new Error(`Function.transform: no overload for ${args.length} args`);
}
}
sx_in(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Function_sx_in_0(__unwrap(this), BigInt(a0))));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_sx_in_1(__unwrap(this), __ps1)));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.sx_in: no overload matches arg types at arity 1`);
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_sx_in_2(__unwrap(this)))));
}
default: throw new Error(`Function.sx_in: no overload for ${args.length} args`);
}
}
factory(...args) {
switch (args.length) {
case 3: {
const [a0, a1, a2] = args;
const a3 = {};
const a4 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_factory_0(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3), __unwrap(a3), __unwrap(a4))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
case 4: {
const [a0, a1, a2, a3] = args;
const a4 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_factory_0(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3), __unwrap(a3), __unwrap(a4))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
case 5: {
const [a0, a1, a2, a3, a4] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_factory_0(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3), __unwrap(a3), __unwrap(a4))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
default: throw new Error(`Function.factory: no overload for ${args.length} args`);
}
}
map(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = "serial";
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_map_0(__unwrap(this), BigInt(a0), __ps2)));
M._free(__ps2);
return __r;
}
case 2: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && typeof args[1] === 'string') {
const [a0, a1] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_map_0(__unwrap(this), BigInt(a0), __ps2)));
M._free(__ps2);
return __r;
}
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && M._swig_can_std__vectorT_bool_t(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = [];
const a3 = {};
return __from_handle(__chk(M._swig_casadi_Function_map_4(__unwrap(this), BigInt(a0), a1, a2, __unwrap(a3))));
}
throw new TypeError(`Function.map: no overload matches arg types at arity 2`);
}
case 3: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && typeof args[1] === 'string' && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_map_1(__unwrap(this), BigInt(a0), __ps2, BigInt(a2))));
M._free(__ps2);
return __r;
}
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && M._swig_can_std__vectorT_bool_t(__unwrap(args[1])) && M._swig_can_std__vectorT_bool_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
return __from_handle(__chk(M._swig_casadi_Function_map_4(__unwrap(this), BigInt(a0), a1, a2, __unwrap(a3))));
}
throw new TypeError(`Function.map: no overload matches arg types at arity 3`);
}
case 4: {
const [a0, a1, a2, a3] = args;
return __from_handle(__chk(M._swig_casadi_Function_map_4(__unwrap(this), BigInt(a0), a1, a2, __unwrap(a3))));
}
case 5: {
if (typeof args[0] === 'string' && typeof args[1] === 'string' && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && M._swig_can_IntVector(__unwrap(args[3])) && M._swig_can_IntVector(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
const a5 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new IntVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_map_2(__unwrap(this), __ps1, __ps2, BigInt(a2), __unwrap(__vp4), __unwrap(__vp5), __unwrap(a5))));
M._free(__ps1);
M._free(__ps2);
if (__vown4 && __vp4.delete) __vp4.delete();
if (__vown5 && __vp5.delete) __vp5.delete();
return __r;
}
if (typeof args[0] === 'string' && typeof args[1] === 'string' && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && M._swig_can_StringVector(__unwrap(args[3])) && M._swig_can_StringVector(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
const a5 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new StringVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new StringVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_map_3(__unwrap(this), __ps1, __ps2, BigInt(a2), __unwrap(__vp4), __unwrap(__vp5), __unwrap(a5))));
M._free(__ps1);
M._free(__ps2);
if (__vown4 && __vp4.delete) __vp4.delete();
if (__vown5 && __vp5.delete) __vp5.delete();
return __r;
}
throw new TypeError(`Function.map: no overload matches arg types at arity 5`);
}
case 6: {
if (typeof args[0] === 'string' && typeof args[1] === 'string' && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && M._swig_can_IntVector(__unwrap(args[3])) && M._swig_can_IntVector(__unwrap(args[4])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[5]))) {
const [a0, a1, a2, a3, a4, a5] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new IntVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_map_2(__unwrap(this), __ps1, __ps2, BigInt(a2), __unwrap(__vp4), __unwrap(__vp5), __unwrap(a5))));
M._free(__ps1);
M._free(__ps2);
if (__vown4 && __vp4.delete) __vp4.delete();
if (__vown5 && __vp5.delete) __vp5.delete();
return __r;
}
if (typeof args[0] === 'string' && typeof args[1] === 'string' && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && M._swig_can_StringVector(__unwrap(args[3])) && M._swig_can_StringVector(__unwrap(args[4])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[5]))) {
const [a0, a1, a2, a3, a4, a5] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new StringVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new StringVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_map_3(__unwrap(this), __ps1, __ps2, BigInt(a2), __unwrap(__vp4), __unwrap(__vp5), __unwrap(a5))));
M._free(__ps1);
M._free(__ps2);
if (__vown4 && __vp4.delete) __vp4.delete();
if (__vown5 && __vp5.delete) __vp5.delete();
return __r;
}
throw new TypeError(`Function.map: no overload matches arg types at arity 6`);
}
default: throw new Error(`Function.map: no overload for ${args.length} args`);
}
}
jac_sparsity(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_jac_sparsity_0(__unwrap(this), a0))));
}
case 2: {
const [a0, a1] = args;
const a2 = false;
return __from_handle(__chk(M._swig_casadi_Function_jac_sparsity_1(__unwrap(this), BigInt(a0), BigInt(a1), a2)));
}
case 3: {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_Function_jac_sparsity_1(__unwrap(this), BigInt(a0), BigInt(a1), a2)));
}
case 0: {
const [] = args;
const a0 = false;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_jac_sparsity_0(__unwrap(this), a0))));
}
default: throw new Error(`Function.jac_sparsity: no overload for ${args.length} args`);
}
}
uses_output() {
return (!!(__chk(M._swig_casadi_Function_uses_output_0(__unwrap(this)))));
}
nnz_in(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_Function_nnz_in_1(__unwrap(this), BigInt(a0)));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Function_nnz_in_2(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.nnz_in: no overload matches arg types at arity 1`);
}
case 0: {
const [] = args;
return __chk(M._swig_casadi_Function_nnz_in_0(__unwrap(this)));
}
default: throw new Error(`Function.nnz_in: no overload for ${args.length} args`);
}
}
nominal_out(a0) {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_nominal_out_0(__unwrap(this), BigInt(a0)))));
}
has_spfwd() {
return (!!(__chk(M._swig_casadi_Function_has_spfwd_0(__unwrap(this)))));
}
size2_in(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_Function_size2_in_0(__unwrap(this), BigInt(a0)));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Function_size2_in_1(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.size2_in: no overload matches arg types at arity 1`);
}
default: throw new Error(`Function.size2_in: no overload for ${args.length} args`);
}
}
mx_out(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Function_mx_out_0(__unwrap(this), BigInt(a0))));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_mx_out_1(__unwrap(this), __ps1)));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.mx_out: no overload matches arg types at arity 1`);
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_mx_out_2(__unwrap(this)))));
}
default: throw new Error(`Function.mx_out: no overload for ${args.length} args`);
}
}
has_function(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_Function_has_function_0(__unwrap(this), __ps1))));
M._free(__ps1);
return __r;
}
is_diff_out(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_Function_is_diff_out_0(__unwrap(this), BigInt(a0)))));
}
case 0: {
const [] = args;
return __chk(M._swig_casadi_Function_is_diff_out_1(__unwrap(this)));
}
default: throw new Error(`Function.is_diff_out: no overload for ${args.length} args`);
}
}
serialize(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_Function_serialize_0(__unwrap(this), __unwrap(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 0: {
const [] = args;
const a0 = {};
return (()=>{const __p=__chk(M._swig_casadi_Function_serialize_0(__unwrap(this), __unwrap(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`Function.serialize: no overload for ${args.length} args`);
}
}
fold(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
return __from_handle(__chk(M._swig_casadi_Function_fold_0(__unwrap(this), BigInt(a0), __unwrap(a1))));
}
case 2: {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Function_fold_0(__unwrap(this), BigInt(a0), __unwrap(a1))));
}
default: throw new Error(`Function.fold: no overload for ${args.length} args`);
}
}
nz_to_in(a0) {
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_nz_to_in_0(__unwrap(this), __unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
max_in(a0) {
return __chk(M._swig_casadi_Function_max_in_0(__unwrap(this), BigInt(a0)));
}
find_functions(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_find_functions_0(__unwrap(this), BigInt(a0)))));
}
case 0: {
const [] = args;
const a0 = -1n;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_find_functions_0(__unwrap(this), BigInt(a0)))));
}
default: throw new Error(`Function.find_functions: no overload for ${args.length} args`);
}
}
size2_out(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_Function_size2_out_0(__unwrap(this), BigInt(a0)));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Function_size2_out_1(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.size2_out: no overload matches arg types at arity 1`);
}
default: throw new Error(`Function.size2_out: no overload for ${args.length} args`);
}
}
instruction_id(a0) {
return __chk(M._swig_casadi_Function_instruction_id_0(__unwrap(this), BigInt(a0)));
}
min_in(a0) {
return __chk(M._swig_casadi_Function_min_in_0(__unwrap(this), BigInt(a0)));
}
sz_iw() {
return __chk(M._swig_casadi_Function_sz_iw_0(__unwrap(this)));
}
get_function(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_get_function_1(__unwrap(this), __ps1)));
M._free(__ps1);
return __r;
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_get_function_0(__unwrap(this)))));
}
default: throw new Error(`Function.get_function: no overload for ${args.length} args`);
}
}
is_diff_in(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (!!(__chk(M._swig_casadi_Function_is_diff_in_0(__unwrap(this), BigInt(a0)))));
}
case 0: {
const [] = args;
return __chk(M._swig_casadi_Function_is_diff_in_1(__unwrap(this)));
}
default: throw new Error(`Function.is_diff_in: no overload for ${args.length} args`);
}
}
has_in(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_Function_has_in_0(__unwrap(this), __ps1))));
M._free(__ps1);
return __r;
}
reset_dump_count() {
return __chk(M._swig_casadi_Function_reset_dump_count_0(__unwrap(this)));
}
jacobian() {
return __from_handle(__chk(M._swig_casadi_Function_jacobian_0(__unwrap(this))));
}
assert_size_out(a0, a1, a2) {
return __chk(M._swig_casadi_Function_assert_size_out_0(__unwrap(this), BigInt(a0), BigInt(a1), BigInt(a2)));
}
convert_out(...args) {
switch (args.length) {
case 1: {
if (M._swig_can_DMVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = M.__swig_release_handle(__chk(M._swig_casadi_Function_convert_out_0(__unwrap(this), __unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_std__mapT_std__string_casadi__MatrixT_double_t_t(__unwrap(args[0]))) {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_convert_out_1(__unwrap(this), __unwrap(a0)))));
}
if (M._swig_can_SXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = M.__swig_release_handle(__chk(M._swig_casadi_Function_convert_out_2(__unwrap(this), __unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[0]))) {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_convert_out_3(__unwrap(this), __unwrap(a0)))));
}
if (M._swig_can_MXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = M.__swig_release_handle(__chk(M._swig_casadi_Function_convert_out_4(__unwrap(this), __unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[0]))) {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_convert_out_5(__unwrap(this), __unwrap(a0)))));
}
throw new TypeError(`Function.convert_out: no overload matches arg types at arity 1`);
}
default: throw new Error(`Function.convert_out: no overload for ${args.length} args`);
}
}
generate_in(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_generate_in_1(__unwrap(this), __ps1))));
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_Function_generate_in_0(__unwrap(this), __ps1, __unwrap(__vp2)));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
default: throw new Error(`Function.generate_in: no overload for ${args.length} args`);
}
}
nz_to_out(a0) {
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_nz_to_out_0(__unwrap(this), __unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
release(a0) {
return __chk(M._swig_casadi_Function_release_0(__unwrap(this), a0));
}
sz_arg() {
return __chk(M._swig_casadi_Function_sz_arg_0(__unwrap(this)));
}
size1_out(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_Function_size1_out_0(__unwrap(this), BigInt(a0)));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Function_size1_out_1(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.size1_out: no overload matches arg types at arity 1`);
}
default: throw new Error(`Function.size1_out: no overload for ${args.length} args`);
}
}
instruction_MX(a0) {
return __from_handle(__chk(M._swig_casadi_Function_instruction_MX_0(__unwrap(this), BigInt(a0))));
}
numel_out(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_Function_numel_out_1(__unwrap(this), BigInt(a0)));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Function_numel_out_2(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.numel_out: no overload matches arg types at arity 1`);
}
case 0: {
const [] = args;
return __chk(M._swig_casadi_Function_numel_out_0(__unwrap(this)));
}
default: throw new Error(`Function.numel_out: no overload for ${args.length} args`);
}
}
print_options() {
return __chk(M._swig_casadi_Function_print_options_0(__unwrap(this)));
}
call(...args) {
switch (args.length) {
case 1: {
if (M._swig_can_DMVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = false;
const a2 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_call_0(__unwrap(this), __unwrap(__vp1), a1, a2))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_SXVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = false;
const a2 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_call_1(__unwrap(this), __unwrap(__vp1), a1, a2))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_MXVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = false;
const a2 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_call_2(__unwrap(this), __unwrap(__vp1), a1, a2))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_std__mapT_std__string_casadi__MatrixT_double_t_t(__unwrap(args[0]))) {
const [a0] = args;
const a1 = false;
const a2 = false;
return M.__swig_release_handle(__chk(M._swig_casadi_Function_call_3(__unwrap(this), __unwrap(a0), a1, a2)));
}
if (M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[0]))) {
const [a0] = args;
const a1 = false;
const a2 = false;
return M.__swig_release_handle(__chk(M._swig_casadi_Function_call_4(__unwrap(this), __unwrap(a0), a1, a2)));
}
if (M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[0]))) {
const [a0] = args;
const a1 = false;
const a2 = false;
return M.__swig_release_handle(__chk(M._swig_casadi_Function_call_5(__unwrap(this), __unwrap(a0), a1, a2)));
}
throw new TypeError(`Function.call: no overload matches arg types at arity 1`);
}
case 2: {
if (M._swig_can_DMVector(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
const a2 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_call_0(__unwrap(this), __unwrap(__vp1), a1, a2))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_SXVector(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
const a2 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_call_1(__unwrap(this), __unwrap(__vp1), a1, a2))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_MXVector(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
const a2 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_call_2(__unwrap(this), __unwrap(__vp1), a1, a2))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_std__mapT_std__string_casadi__MatrixT_double_t_t(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
const a2 = false;
return M.__swig_release_handle(__chk(M._swig_casadi_Function_call_3(__unwrap(this), __unwrap(a0), a1, a2)));
}
if (M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
const a2 = false;
return M.__swig_release_handle(__chk(M._swig_casadi_Function_call_4(__unwrap(this), __unwrap(a0), a1, a2)));
}
if (M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
const a2 = false;
return M.__swig_release_handle(__chk(M._swig_casadi_Function_call_5(__unwrap(this), __unwrap(a0), a1, a2)));
}
throw new TypeError(`Function.call: no overload matches arg types at arity 2`);
}
case 3: {
if (M._swig_can_DMVector(__unwrap(args[0])) && (typeof args[1] === 'boolean') && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_call_0(__unwrap(this), __unwrap(__vp1), a1, a2))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_SXVector(__unwrap(args[0])) && (typeof args[1] === 'boolean') && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_call_1(__unwrap(this), __unwrap(__vp1), a1, a2))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_MXVector(__unwrap(args[0])) && (typeof args[1] === 'boolean') && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_call_2(__unwrap(this), __unwrap(__vp1), a1, a2))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_std__mapT_std__string_casadi__MatrixT_double_t_t(__unwrap(args[0])) && (typeof args[1] === 'boolean') && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
return M.__swig_release_handle(__chk(M._swig_casadi_Function_call_3(__unwrap(this), __unwrap(a0), a1, a2)));
}
if (M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[0])) && (typeof args[1] === 'boolean') && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
return M.__swig_release_handle(__chk(M._swig_casadi_Function_call_4(__unwrap(this), __unwrap(a0), a1, a2)));
}
if (M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[0])) && (typeof args[1] === 'boolean') && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
return M.__swig_release_handle(__chk(M._swig_casadi_Function_call_5(__unwrap(this), __unwrap(a0), a1, a2)));
}
throw new TypeError(`Function.call: no overload matches arg types at arity 3`);
}
default: throw new Error(`Function.call: no overload for ${args.length} args`);
}
}
n_out() {
return __chk(M._swig_casadi_Function_n_out_0(__unwrap(this)));
}
generate_out(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_generate_out_1(__unwrap(this), __ps1))));
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_Function_generate_out_0(__unwrap(this), __ps1, __unwrap(__vp2)));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
default: throw new Error(`Function.generate_out: no overload for ${args.length} args`);
}
}
instruction_output(a0) {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_instruction_output_0(__unwrap(this), BigInt(a0)))));
}
has_option(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_Function_has_option_0(__unwrap(this), __ps1))));
M._free(__ps1);
return __r;
}
sparsity_out(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Function_sparsity_out_0(__unwrap(this), BigInt(a0))));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_sparsity_out_1(__unwrap(this), __ps1)));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.sparsity_out: no overload matches arg types at arity 1`);
}
default: throw new Error(`Function.sparsity_out: no overload for ${args.length} args`);
}
}
oracle() {
return __from_handle(__chk(M._swig_casadi_Function_oracle_0(__unwrap(this))));
}
nz_from_out(a0) {
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_nz_from_out_0(__unwrap(this), __unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
instruction_constant(a0) {
return __chk(M._swig_casadi_Function_instruction_constant_0(__unwrap(this), BigInt(a0)));
}
nz_from_in(a0) {
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_nz_from_in_0(__unwrap(this), __unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
stats(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return M.__swig_release_handle(__chk(M._swig_casadi_Function_stats_0(__unwrap(this), a0)));
}
case 0: {
const [] = args;
const a0 = 0;
return M.__swig_release_handle(__chk(M._swig_casadi_Function_stats_0(__unwrap(this), a0)));
}
default: throw new Error(`Function.stats: no overload for ${args.length} args`);
}
}
cache() {
return M.__swig_release_handle(__chk(M._swig_casadi_Function_cache_0(__unwrap(this))));
}
print_dimensions() {
return __chk(M._swig_casadi_Function_print_dimensions_0(__unwrap(this)));
}
mapaccum(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
return __from_handle(__chk(M._swig_casadi_Function_mapaccum_4(__unwrap(this), BigInt(a0), __unwrap(a1))));
}
case 2: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_mapaccum_0(__unwrap(this), __ps1, BigInt(a1), __unwrap(a2))));
M._free(__ps1);
return __r;
}
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_Function_mapaccum_4(__unwrap(this), BigInt(a0), __unwrap(a1))));
}
throw new TypeError(`Function.mapaccum: no overload matches arg types at arity 2`);
}
case 3: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_mapaccum_0(__unwrap(this), __ps1, BigInt(a1), __unwrap(a2))));
M._free(__ps1);
return __r;
}
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_mapaccum_1(__unwrap(this), __ps1, BigInt(a1), BigInt(a2), __unwrap(a3))));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.mapaccum: no overload matches arg types at arity 3`);
}
case 4: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_mapaccum_1(__unwrap(this), __ps1, BigInt(a1), BigInt(a2), __unwrap(a3))));
M._free(__ps1);
return __r;
}
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && M._swig_can_IntVector(__unwrap(args[2])) && M._swig_can_IntVector(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const a4 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_mapaccum_2(__unwrap(this), __ps1, BigInt(a1), __unwrap(__vp3), __unwrap(__vp4), __unwrap(a4))));
M._free(__ps1);
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && M._swig_can_StringVector(__unwrap(args[2])) && M._swig_can_StringVector(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const a4 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new StringVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_mapaccum_3(__unwrap(this), __ps1, BigInt(a1), __unwrap(__vp3), __unwrap(__vp4), __unwrap(a4))));
M._free(__ps1);
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
throw new TypeError(`Function.mapaccum: no overload matches arg types at arity 4`);
}
case 5: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && M._swig_can_IntVector(__unwrap(args[2])) && M._swig_can_IntVector(__unwrap(args[3])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_mapaccum_2(__unwrap(this), __ps1, BigInt(a1), __unwrap(__vp3), __unwrap(__vp4), __unwrap(a4))));
M._free(__ps1);
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && M._swig_can_StringVector(__unwrap(args[2])) && M._swig_can_StringVector(__unwrap(args[3])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new StringVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_mapaccum_3(__unwrap(this), __ps1, BigInt(a1), __unwrap(__vp3), __unwrap(__vp4), __unwrap(a4))));
M._free(__ps1);
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
throw new TypeError(`Function.mapaccum: no overload matches arg types at arity 5`);
}
default: throw new Error(`Function.mapaccum: no overload for ${args.length} args`);
}
}
slice(...args) {
switch (args.length) {
case 3: {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_slice_0(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3), __unwrap(a3))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
case 4: {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Function_slice_0(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3), __unwrap(a3))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
default: throw new Error(`Function.slice: no overload for ${args.length} args`);
}
}
free_sx() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_free_sx_0(__unwrap(this)))));
}
save(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Function_save_0(__unwrap(this), __ps1, __unwrap(a1)));
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Function_save_0(__unwrap(this), __ps1, __unwrap(a1)));
M._free(__ps1);
return __r;
}
default: throw new Error(`Function.save: no overload for ${args.length} args`);
}
}
expand(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_expand_1(__unwrap(this), __ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_expand_1(__unwrap(this), __ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
case 0: {
const [] = args;
return __from_handle(__chk(M._swig_casadi_Function_expand_0(__unwrap(this))));
}
default: throw new Error(`Function.expand: no overload for ${args.length} args`);
}
}
export_code(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_Function_export_code_1(__unwrap(this), __ps1, __unwrap(a1)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
case 2: {
if (typeof args[0] === 'string' && typeof args[1] === 'string') {
const [a0, a1] = args;
const a2 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_Function_export_code_0(__unwrap(this), __ps1, __ps2, __unwrap(a2)));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_Function_export_code_1(__unwrap(this), __ps1, __unwrap(a1)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.export_code: no overload matches arg types at arity 2`);
}
case 3: {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_Function_export_code_0(__unwrap(this), __ps1, __ps2, __unwrap(a2)));
M._free(__ps1);
M._free(__ps2);
return __r;
}
default: throw new Error(`Function.export_code: no overload for ${args.length} args`);
}
}
sz_w() {
return __chk(M._swig_casadi_Function_sz_w_0(__unwrap(this)));
}
size1_in(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_Function_size1_in_0(__unwrap(this), BigInt(a0)));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Function_size1_in_1(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.size1_in: no overload matches arg types at arity 1`);
}
default: throw new Error(`Function.size1_in: no overload for ${args.length} args`);
}
}
sparsity_in(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Function_sparsity_in_0(__unwrap(this), BigInt(a0))));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_sparsity_in_1(__unwrap(this), __ps1)));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.sparsity_in: no overload matches arg types at arity 1`);
}
default: throw new Error(`Function.sparsity_in: no overload for ${args.length} args`);
}
}
convert_in(...args) {
switch (args.length) {
case 1: {
if (M._swig_can_DMVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = M.__swig_release_handle(__chk(M._swig_casadi_Function_convert_in_0(__unwrap(this), __unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_std__mapT_std__string_casadi__MatrixT_double_t_t(__unwrap(args[0]))) {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_convert_in_1(__unwrap(this), __unwrap(a0)))));
}
if (M._swig_can_SXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = M.__swig_release_handle(__chk(M._swig_casadi_Function_convert_in_2(__unwrap(this), __unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[0]))) {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_convert_in_3(__unwrap(this), __unwrap(a0)))));
}
if (M._swig_can_MXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = M.__swig_release_handle(__chk(M._swig_casadi_Function_convert_in_4(__unwrap(this), __unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[0]))) {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_convert_in_5(__unwrap(this), __unwrap(a0)))));
}
throw new TypeError(`Function.convert_in: no overload matches arg types at arity 1`);
}
default: throw new Error(`Function.convert_in: no overload for ${args.length} args`);
}
}
activity(a0) {
return __chk(M._swig_casadi_Function_activity_0(__unwrap(this), a0));
}
generate(...args) {
switch (args.length) {
case 1: {
if (typeof args[0] === 'string') {
const [a0] = args;
const a1 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_Function_generate_0(__unwrap(this), __ps1, __unwrap(a1)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
if (M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[0]))) {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_Function_generate_1(__unwrap(this), __unwrap(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
throw new TypeError(`Function.generate: no overload matches arg types at arity 1`);
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_Function_generate_0(__unwrap(this), __ps1, __unwrap(a1)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
case 0: {
const [] = args;
const a0 = {};
return (()=>{const __p=__chk(M._swig_casadi_Function_generate_1(__unwrap(this), __unwrap(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`Function.generate: no overload for ${args.length} args`);
}
}
assert_size_in(a0, a1, a2) {
return __chk(M._swig_casadi_Function_assert_size_in_0(__unwrap(this), BigInt(a0), BigInt(a1), BigInt(a2)));
}
mapsum(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = "serial";
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_mapsum_0(__unwrap(this), __unwrap(__vp1), __ps2))));
if (__vown1 && __vp1.delete) __vp1.delete();
M._free(__ps2);
return __r;
}
case 2: {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_mapsum_0(__unwrap(this), __unwrap(__vp1), __ps2))));
if (__vown1 && __vp1.delete) __vp1.delete();
M._free(__ps2);
return __r;
}
default: throw new Error(`Function.mapsum: no overload for ${args.length} args`);
}
}
size_out(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_Function_size_out_0(__unwrap(this), BigInt(a0)));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Function_size_out_1(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.size_out: no overload matches arg types at arity 1`);
}
default: throw new Error(`Function.size_out: no overload for ${args.length} args`);
}
}
numel_in(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_Function_numel_in_1(__unwrap(this), BigInt(a0)));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Function_numel_in_2(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.numel_in: no overload matches arg types at arity 1`);
}
case 0: {
const [] = args;
return __chk(M._swig_casadi_Function_numel_in_0(__unwrap(this)));
}
default: throw new Error(`Function.numel_in: no overload for ${args.length} args`);
}
}
reverse(a0) {
return __from_handle(__chk(M._swig_casadi_Function_reverse_0(__unwrap(this), BigInt(a0))));
}
n_nodes() {
return __chk(M._swig_casadi_Function_n_nodes_0(__unwrap(this)));
}
nnz_out(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_Function_nnz_out_1(__unwrap(this), BigInt(a0)));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Function_nnz_out_2(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.nnz_out: no overload matches arg types at arity 1`);
}
case 0: {
const [] = args;
return __chk(M._swig_casadi_Function_nnz_out_0(__unwrap(this)));
}
default: throw new Error(`Function.nnz_out: no overload for ${args.length} args`);
}
}
has_out(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_Function_has_out_0(__unwrap(this), __ps1))));
M._free(__ps1);
return __r;
}
find_function(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = -1n;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_find_function_0(__unwrap(this), __ps1, BigInt(a1))));
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_find_function_0(__unwrap(this), __ps1, BigInt(a1))));
M._free(__ps1);
return __r;
}
default: throw new Error(`Function.find_function: no overload for ${args.length} args`);
}
}
wrap(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Function_wrap_1(__unwrap(this), __ps1)));
M._free(__ps1);
return __r;
}
case 0: {
const [] = args;
return __from_handle(__chk(M._swig_casadi_Function_wrap_0(__unwrap(this))));
}
default: throw new Error(`Function.wrap: no overload for ${args.length} args`);
}
}
name_in(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_Function_name_in_1(__unwrap(this), BigInt(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_name_in_0(__unwrap(this)))));
}
default: throw new Error(`Function.name_in: no overload for ${args.length} args`);
}
}
default_in(a0) {
return __chk(M._swig_casadi_Function_default_in_0(__unwrap(this), BigInt(a0)));
}
forward(a0) {
return __from_handle(__chk(M._swig_casadi_Function_forward_0(__unwrap(this), BigInt(a0))));
}
is_a(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = true;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_Function_is_a_0(__unwrap(this), __ps1, a1))));
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_Function_is_a_0(__unwrap(this), __ps1, a1))));
M._free(__ps1);
return __r;
}
default: throw new Error(`Function.is_a: no overload for ${args.length} args`);
}
}
has_free() {
return (!!(__chk(M._swig_casadi_Function_has_free_0(__unwrap(this)))));
}
size_in(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_Function_size_in_0(__unwrap(this), BigInt(a0)));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Function_size_in_1(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
throw new TypeError(`Function.size_in: no overload matches arg types at arity 1`);
}
default: throw new Error(`Function.size_in: no overload for ${args.length} args`);
}
}
name() {
return (()=>{const __p=__chk(M._swig_casadi_Function_name_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
checkout() {
return __chk(M._swig_casadi_Function_checkout_0(__unwrap(this)));
}
name_out(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_Function_name_out_1(__unwrap(this), BigInt(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_name_out_0(__unwrap(this)))));
}
default: throw new Error(`Function.name_out: no overload for ${args.length} args`);
}
}
n_in() {
return __chk(M._swig_casadi_Function_n_in_0(__unwrap(this)));
}
index_in(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Function_index_in_0(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
instruction_input(a0) {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_instruction_input_0(__unwrap(this), BigInt(a0)))));
}
has_sprev() {
return (!!(__chk(M._swig_casadi_Function_has_sprev_0(__unwrap(this)))));
}
print_option(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Function_print_option_0(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
nominal_in(a0) {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_nominal_in_0(__unwrap(this), BigInt(a0)))));
}
index_out(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Function_index_out_0(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
which_depends(...args) {
switch (args.length) {
case 2: {
const [a0, a1] = args;
const a2 = 1n;
const a3 = false;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_Function_which_depends_0(__unwrap(this), __ps1, __unwrap(__vp2), BigInt(a2), a3));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
case 3: {
const [a0, a1, a2] = args;
const a3 = false;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_Function_which_depends_0(__unwrap(this), __ps1, __unwrap(__vp2), BigInt(a2), a3));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
case 4: {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_Function_which_depends_0(__unwrap(this), __ps1, __unwrap(__vp2), BigInt(a2), a3));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
default: throw new Error(`Function.which_depends: no overload for ${args.length} args`);
}
}
free_mx() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Function_free_mx_0(__unwrap(this)))));
}
}
Function.prototype._swig_type = '_p_casadi__Function';
if (!Object.prototype.hasOwnProperty.call(Function.prototype, 'toString'))
Function.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
Function.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
__mixin(Function, PrintableCommon);
const __fr_casadi_Linsol = new FinalizationRegistry(p => M._swig_casadi_Linsol_delete(p));
class Linsol extends SharedObject {
static doc(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_Linsol_static_doc_0(__ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
static type_name() {
return (()=>{const __p=__chk(M._swig_casadi_Linsol_static_type_name_0());const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
static has_plugin(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_Linsol_static_has_plugin_0(__ps1))));
M._free(__ps1);
return __r;
}
static load_plugin(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Linsol_static_load_plugin_0(__ps1));
M._free(__ps1);
return __r;
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_Linsol.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_Linsol(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_Linsol_new_2(__unwrap(args[0]))); break; }
throw new TypeError(`Linsol: arg-type mismatch at length 1`);
}
case 3: {
if (M._swig_can_Sparsity(__unwrap(args[2])) && (typeof args[0] === 'string') && (typeof args[1] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
const __nps1 = M.lengthBytesUTF8(args[1]);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(args[1], __ps1, __nps1 + 1);
__ptr = __chk(M._swig_casadi_Linsol_new_1(__ps0, __ps1, __unwrap(args[2]), undefined));
M._free(__ps0);
M._free(__ps1);
break;
}
throw new TypeError(`Linsol: arg-type mismatch at length 3`);
}
case 4: {
if (M._swig_can_Sparsity(__unwrap(args[2])) && (typeof args[0] === 'string') && (typeof args[1] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
const __nps1 = M.lengthBytesUTF8(args[1]);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(args[1], __ps1, __nps1 + 1);
__ptr = __chk(M._swig_casadi_Linsol_new_1(__ps0, __ps1, __unwrap(args[2]), args[3]));
M._free(__ps0);
M._free(__ps1);
break;
}
throw new TypeError(`Linsol: arg-type mismatch at length 4`);
}
case 0: {
__ptr = __chk(M._swig_casadi_Linsol_new_0()); break;
}
default: throw new Error(`Linsol: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_Linsol.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_Linsol.unregister(this);
M._swig_casadi_Linsol_delete(this._ptr);
this._ptr = 0;
}
sfact(a0) {
return __chk(M._swig_casadi_Linsol_sfact_0(__unwrap(this), __unwrap(__coerce(a0, DM))));
}
solve(...args) {
switch (args.length) {
case 2: {
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = false;
return __from_handle(__chk(M._swig_casadi_Linsol_solve_0(__unwrap(this), __unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), a2)));
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = false;
return __from_handle(__chk(M._swig_casadi_Linsol_solve_1(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), a2)));
}
throw new TypeError(`Linsol.solve: no overload matches arg types at arity 2`);
}
case 3: {
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_Linsol_solve_0(__unwrap(this), __unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), a2)));
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_Linsol_solve_1(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), a2)));
}
throw new TypeError(`Linsol.solve: no overload matches arg types at arity 3`);
}
default: throw new Error(`Linsol.solve: no overload for ${args.length} args`);
}
}
sparsity() {
return __from_handle(__chk(M._swig_casadi_Linsol_sparsity_0(__unwrap(this))));
}
rank(a0) {
return __chk(M._swig_casadi_Linsol_rank_0(__unwrap(this), __unwrap(__coerce(a0, DM))));
}
det(...args) {
switch (args.length) {
case 1: {
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_Linsol_det_0(__unwrap(this), __unwrap(__coerce(a0, DM))));
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_Linsol_det_1(__unwrap(this), __unwrap(__coerce(a0, MX)))));
}
throw new TypeError(`Linsol.det: no overload matches arg types at arity 1`);
}
default: throw new Error(`Linsol.det: no overload for ${args.length} args`);
}
}
stats(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return M.__swig_release_handle(__chk(M._swig_casadi_Linsol_stats_0(__unwrap(this), a0)));
}
case 0: {
const [] = args;
const a0 = 1;
return M.__swig_release_handle(__chk(M._swig_casadi_Linsol_stats_0(__unwrap(this), a0)));
}
default: throw new Error(`Linsol.stats: no overload for ${args.length} args`);
}
}
nfact(a0) {
return __chk(M._swig_casadi_Linsol_nfact_0(__unwrap(this), __unwrap(__coerce(a0, DM))));
}
neig(a0) {
return __chk(M._swig_casadi_Linsol_neig_0(__unwrap(this), __unwrap(__coerce(a0, DM))));
}
plugin_name() {
return (()=>{const __p=__chk(M._swig_casadi_Linsol_plugin_name_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
}
Linsol.prototype._swig_type = '_p_casadi__Linsol';
if (!Object.prototype.hasOwnProperty.call(Linsol.prototype, 'toString'))
Linsol.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
Linsol.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
__mixin(Linsol, PrintableCommon);
const __fr_casadi_CodeGenerator = new FinalizationRegistry(p => M._swig_casadi_CodeGenerator_delete(p));
class CodeGenerator {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_casadi_CodeGenerator.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if ((typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_CodeGenerator_new_0(__ps0, undefined));
M._free(__ps0);
break;
}
throw new TypeError(`CodeGenerator: arg-type mismatch at length 1`);
}
case 2: {
if ((typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_CodeGenerator_new_0(__ps0, args[1]));
M._free(__ps0);
break;
}
throw new TypeError(`CodeGenerator: arg-type mismatch at length 2`);
}
default: throw new Error(`CodeGenerator: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_casadi_CodeGenerator.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_CodeGenerator.unregister(this);
M._swig_casadi_CodeGenerator_delete(this._ptr);
this._ptr = 0;
}
add_include(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = false;
const a2 = undefined;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __chk(M._swig_casadi_CodeGenerator_add_include_0(__unwrap(this), __ps1, a1, __ps3));
M._free(__ps1);
M._free(__ps3);
return __r;
}
case 2: {
const [a0, a1] = args;
const a2 = undefined;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __chk(M._swig_casadi_CodeGenerator_add_include_0(__unwrap(this), __ps1, a1, __ps3));
M._free(__ps1);
M._free(__ps3);
return __r;
}
case 3: {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __chk(M._swig_casadi_CodeGenerator_add_include_0(__unwrap(this), __ps1, a1, __ps3));
M._free(__ps1);
M._free(__ps3);
return __r;
}
default: throw new Error(`CodeGenerator.add_include: no overload for ${args.length} args`);
}
}
generate(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_CodeGenerator_generate_0(__unwrap(this), __ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
case 0: {
const [] = args;
const a0 = "";
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_CodeGenerator_generate_0(__unwrap(this), __ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
default: throw new Error(`CodeGenerator.generate: no overload for ${args.length} args`);
}
}
add(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = false;
return __chk(M._swig_casadi_CodeGenerator_add_0(__unwrap(this), __unwrap(a0), a1));
}
case 2: {
const [a0, a1] = args;
return __chk(M._swig_casadi_CodeGenerator_add_0(__unwrap(this), __unwrap(a0), a1));
}
default: throw new Error(`CodeGenerator.add: no overload for ${args.length} args`);
}
}
dump() {
return (()=>{const __p=__chk(M._swig_casadi_CodeGenerator_dump_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
}
CodeGenerator.prototype._swig_type = '_p_casadi__CodeGenerator';
if (!Object.prototype.hasOwnProperty.call(CodeGenerator.prototype, 'toString'))
CodeGenerator.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
CodeGenerator.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_Importer = new FinalizationRegistry(p => M._swig_casadi_Importer_delete(p));
class Importer extends SharedObject {
static load_plugin(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Importer_static_load_plugin_0(__ps1));
M._free(__ps1);
return __r;
}
static test_cast(a0) {
return (!!(__chk(M._swig_casadi_Importer_static_test_cast_0(a0))));
}
static doc(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_Importer_static_doc_0(__ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
static deserialize(a0) {
return __from_handle(__chk(M._swig_casadi_Importer_static_deserialize_0(a0)));
}
static type_name() {
return (()=>{const __p=__chk(M._swig_casadi_Importer_static_type_name_0());const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
static has_plugin(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_Importer_static_has_plugin_0(__ps1))));
M._free(__ps1);
return __r;
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_Importer.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_Importer(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_Importer_new_2(__unwrap(args[0]))); break; }
throw new TypeError(`Importer: arg-type mismatch at length 1`);
}
case 2: {
if ((typeof args[0] === 'string') && (typeof args[1] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
const __nps1 = M.lengthBytesUTF8(args[1]);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(args[1], __ps1, __nps1 + 1);
__ptr = __chk(M._swig_casadi_Importer_new_1(__ps0, __ps1, undefined));
M._free(__ps0);
M._free(__ps1);
break;
}
throw new TypeError(`Importer: arg-type mismatch at length 2`);
}
case 3: {
if ((typeof args[0] === 'string') && (typeof args[1] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
const __nps1 = M.lengthBytesUTF8(args[1]);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(args[1], __ps1, __nps1 + 1);
__ptr = __chk(M._swig_casadi_Importer_new_1(__ps0, __ps1, args[2]));
M._free(__ps0);
M._free(__ps1);
break;
}
throw new TypeError(`Importer: arg-type mismatch at length 3`);
}
case 0: {
__ptr = __chk(M._swig_casadi_Importer_new_0()); break;
}
default: throw new Error(`Importer: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_Importer.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_Importer.unregister(this);
M._swig_casadi_Importer_delete(this._ptr);
this._ptr = 0;
}
body(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_Importer_body_0(__unwrap(this), __ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
has_meta(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = -1n;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_Importer_has_meta_0(__unwrap(this), __ps1, BigInt(a1)))));
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_Importer_has_meta_0(__unwrap(this), __ps1, BigInt(a1)))));
M._free(__ps1);
return __r;
}
default: throw new Error(`Importer.has_meta: no overload for ${args.length} args`);
}
}
has_function(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_Importer_has_function_0(__unwrap(this), __ps1))));
M._free(__ps1);
return __r;
}
get_meta(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = -1n;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_Importer_get_meta_0(__unwrap(this), __ps1, BigInt(a1)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_Importer_get_meta_0(__unwrap(this), __ps1, BigInt(a1)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
default: throw new Error(`Importer.get_meta: no overload for ${args.length} args`);
}
}
plugin_name() {
return (()=>{const __p=__chk(M._swig_casadi_Importer_plugin_name_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
library() {
return (()=>{const __p=__chk(M._swig_casadi_Importer_library_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
inlined(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_Importer_inlined_0(__unwrap(this), __ps1))));
M._free(__ps1);
return __r;
}
serialize(a0) {
return __chk(M._swig_casadi_Importer_serialize_0(__unwrap(this), a0));
}
}
Importer.prototype._swig_type = '_p_casadi__Importer';
if (!Object.prototype.hasOwnProperty.call(Importer.prototype, 'toString'))
Importer.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
Importer.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
__mixin(Importer, PrintableCommon);
const __fr_casadi_Callback = new FinalizationRegistry(p => M._swig_casadi_Callback_delete(p));
class Callback extends Function {
static type_name() {
return (()=>{const __p=__chk(M._swig_casadi_Callback_static_type_name_0());const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_Callback.register(this, args[1], this); return; }
if (new.target !== Callback) {
super(__PRIVATE_CTOR, 0);
const __h = M.__swig_take_handle(this);
const __dptr = M._swig_new_SwigDirector_Callback(__h);
this._ptr = __dptr;
__fr_casadi_Callback.register(this, __dptr, this);
return;
}
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_Callback(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_Callback_new_1(__unwrap(args[0]))); break; }
throw new TypeError(`Callback: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_Callback_new_0()); break;
}
default: throw new Error(`Callback: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_Callback.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_Callback.unregister(this);
M._swig_casadi_Callback_delete(this._ptr);
this._ptr = 0;
}
get_forward(a0, a1, a2, a3, a4) {
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new StringVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Callback_get_forward_0(__unwrap(this), BigInt(a0), __ps2, __unwrap(__vp3), __unwrap(__vp4), __unwrap(a4))));
M._free(__ps2);
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
get_jac_sparsity(a0, a1, a2) {
return __from_handle(__chk(M._swig_casadi_Callback_get_jac_sparsity_0(__unwrap(this), BigInt(a0), BigInt(a1), a2)));
}
uses_output() {
return (!!(__chk(M._swig_casadi_Callback_uses_output_0(__unwrap(this)))));
}
construct(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Callback_construct_0(__unwrap(this), __ps1, __unwrap(a1)));
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Callback_construct_0(__unwrap(this), __ps1, __unwrap(a1)));
M._free(__ps1);
return __r;
}
default: throw new Error(`Callback.construct: no overload for ${args.length} args`);
}
}
has_jacobian() {
return (!!(__chk(M._swig_casadi_Callback_has_jacobian_0(__unwrap(this)))));
}
get_jacobian(a0, a1, a2, a3) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Callback_get_jacobian_0(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3), __unwrap(a3))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
has_jac_sparsity(a0, a1) {
return (!!(__chk(M._swig_casadi_Callback_has_jac_sparsity_0(__unwrap(this), BigInt(a0), BigInt(a1)))));
}
finalize() {
return __chk(M._swig_casadi_Callback_finalize_0(__unwrap(this)));
}
get_factory(a0, a1, a2, a3, a4) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Callback_get_factory_0(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3), __unwrap(a3), __unwrap(a4))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
get_sparsity_out(a0) {
return __from_handle(__chk(M._swig_casadi_Callback_get_sparsity_out_0(__unwrap(this), BigInt(a0))));
}
get_sparsity_in(a0) {
return __from_handle(__chk(M._swig_casadi_Callback_get_sparsity_in_0(__unwrap(this), BigInt(a0))));
}
get_n_out() {
return __chk(M._swig_casadi_Callback_get_n_out_0(__unwrap(this)));
}
has_eval_buffer() {
return (!!(__chk(M._swig_casadi_Callback_has_eval_buffer_0(__unwrap(this)))));
}
init() {
return __chk(M._swig_casadi_Callback_init_0(__unwrap(this)));
}
eval_buffer(a0, a1, a2, a3) {
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __chk(M._swig_casadi_Callback_eval_buffer_0(__unwrap(this), a0, __unwrap(__vp2), a2, __unwrap(__vp4)));
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
has_reverse(a0) {
return (!!(__chk(M._swig_casadi_Callback_has_reverse_0(__unwrap(this), BigInt(a0)))));
}
get_n_in() {
return __chk(M._swig_casadi_Callback_get_n_in_0(__unwrap(this)));
}
has_forward(a0) {
return (!!(__chk(M._swig_casadi_Callback_has_forward_0(__unwrap(this), BigInt(a0)))));
}
eval(a0) {
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Callback_eval_0(__unwrap(this), __unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
get_name_out(a0) {
return (()=>{const __p=__chk(M._swig_casadi_Callback_get_name_out_0(__unwrap(this), BigInt(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
get_reverse(a0, a1, a2, a3, a4) {
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new StringVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Callback_get_reverse_0(__unwrap(this), BigInt(a0), __ps2, __unwrap(__vp3), __unwrap(__vp4), __unwrap(a4))));
M._free(__ps2);
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
get_name_in(a0) {
return (()=>{const __p=__chk(M._swig_casadi_Callback_get_name_in_0(__unwrap(this), BigInt(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
}
Callback.prototype._swig_type = '_p_casadi__Callback';
if (!Object.prototype.hasOwnProperty.call(Callback.prototype, 'toString'))
Callback.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
Callback.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_GlobalOptions = new FinalizationRegistry(p => M._swig_casadi_GlobalOptions_delete(p));
class GlobalOptions {
static setCasadiPath(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_GlobalOptions_static_setCasadiPath_0(__ps1));
M._free(__ps1);
return __r;
}
static setSimplificationOnTheFly(a0) {
return __chk(M._swig_casadi_GlobalOptions_static_setSimplificationOnTheFly_0(a0));
}
static getCopyElisionMinSize() {
return __chk(M._swig_casadi_GlobalOptions_static_getCopyElisionMinSize_0());
}
static getSimplificationOnTheFly() {
return (!!(__chk(M._swig_casadi_GlobalOptions_static_getSimplificationOnTheFly_0())));
}
static getHierarchicalSparsity() {
return (!!(__chk(M._swig_casadi_GlobalOptions_static_getHierarchicalSparsity_0())));
}
static setNumpyMode(a0) {
return __chk(M._swig_casadi_GlobalOptions_static_setNumpyMode_0(a0));
}
static setMaxNumDir(a0) {
return __chk(M._swig_casadi_GlobalOptions_static_setMaxNumDir_0(BigInt(a0)));
}
static getCasadiIncludePath() {
return (()=>{const __p=__chk(M._swig_casadi_GlobalOptions_static_getCasadiIncludePath_0());const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
static setCopyElisionMinSize(a0) {
return __chk(M._swig_casadi_GlobalOptions_static_setCopyElisionMinSize_0(BigInt(a0)));
}
static getNumpyMode() {
return __chk(M._swig_casadi_GlobalOptions_static_getNumpyMode_0());
}
static getMaxNumDir() {
return __chk(M._swig_casadi_GlobalOptions_static_getMaxNumDir_0());
}
static getCasadiPath() {
return (()=>{const __p=__chk(M._swig_casadi_GlobalOptions_static_getCasadiPath_0());const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
static setCasadiIncludePath(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_GlobalOptions_static_setCasadiIncludePath_0(__ps1));
M._free(__ps1);
return __r;
}
static setHierarchicalSparsity(a0) {
return __chk(M._swig_casadi_GlobalOptions_static_setHierarchicalSparsity_0(a0));
}
static getTempWorkDir() {
return (()=>{const __p=__chk(M._swig_casadi_GlobalOptions_static_getTempWorkDir_0());const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
static setTempWorkDir(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_GlobalOptions_static_setTempWorkDir_0(__ps1));
M._free(__ps1);
return __r;
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_casadi_GlobalOptions.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_GlobalOptions(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_GlobalOptions_new_0(__unwrap(args[0]))); break; }
throw new TypeError(`GlobalOptions: arg-type mismatch at length 1`);
}
default: throw new Error(`GlobalOptions: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_casadi_GlobalOptions.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_GlobalOptions.unregister(this);
M._swig_casadi_GlobalOptions_delete(this._ptr);
this._ptr = 0;
}
}
GlobalOptions.prototype._swig_type = '_p_casadi__GlobalOptions';
if (!Object.prototype.hasOwnProperty.call(GlobalOptions.prototype, 'toString'))
GlobalOptions.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
GlobalOptions.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_CasadiMeta = new FinalizationRegistry(p => M._swig_casadi_CasadiMeta_delete(p));
class CasadiMeta {
static object_file_suffix() {
return __chk(M._swig_casadi_CasadiMeta_static_object_file_suffix_0());
}
static compiler() {
return __chk(M._swig_casadi_CasadiMeta_static_compiler_0());
}
static git_revision() {
return __chk(M._swig_casadi_CasadiMeta_static_git_revision_0());
}
static version() {
return __chk(M._swig_casadi_CasadiMeta_static_version_0());
}
static install_prefix() {
return __chk(M._swig_casadi_CasadiMeta_static_install_prefix_0());
}
static git_describe() {
return __chk(M._swig_casadi_CasadiMeta_static_git_describe_0());
}
static lapack_libraries() {
return __chk(M._swig_casadi_CasadiMeta_static_lapack_libraries_0());
}
static plugins() {
return __chk(M._swig_casadi_CasadiMeta_static_plugins_0());
}
static modules() {
return __chk(M._swig_casadi_CasadiMeta_static_modules_0());
}
static build_type() {
return __chk(M._swig_casadi_CasadiMeta_static_build_type_0());
}
static compiler_id() {
return __chk(M._swig_casadi_CasadiMeta_static_compiler_id_0());
}
static compiler_flags() {
return __chk(M._swig_casadi_CasadiMeta_static_compiler_flags_0());
}
static shared_library_prefix() {
return __chk(M._swig_casadi_CasadiMeta_static_shared_library_prefix_0());
}
static shared_library_suffix() {
return __chk(M._swig_casadi_CasadiMeta_static_shared_library_suffix_0());
}
static feature_list() {
return __chk(M._swig_casadi_CasadiMeta_static_feature_list_0());
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_casadi_CasadiMeta.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_CasadiMeta(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_CasadiMeta_new_0(__unwrap(args[0]))); break; }
throw new TypeError(`CasadiMeta: arg-type mismatch at length 1`);
}
default: throw new Error(`CasadiMeta: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_casadi_CasadiMeta.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_CasadiMeta.unregister(this);
M._swig_casadi_CasadiMeta_delete(this._ptr);
this._ptr = 0;
}
}
CasadiMeta.prototype._swig_type = '_p_casadi__CasadiMeta';
if (!Object.prototype.hasOwnProperty.call(CasadiMeta.prototype, 'toString'))
CasadiMeta.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
CasadiMeta.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_NlpBuilder = new FinalizationRegistry(p => M._swig_casadi_NlpBuilder_delete(p));
class NlpBuilder extends PrintableCommon {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_NlpBuilder.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_NlpBuilder(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_NlpBuilder_new_1(__unwrap(args[0]))); break; }
throw new TypeError(`NlpBuilder: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_NlpBuilder_new_0()); break;
}
default: throw new Error(`NlpBuilder: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_NlpBuilder.register(this, __ptr, this);
}
get x() { return M._swig_casadi_NlpBuilder_x_get(this._ptr); }
set x(v) { M._swig_casadi_NlpBuilder_x_set(this._ptr, v); }
get f() { return M._swig_casadi_NlpBuilder_f_get(this._ptr); }
set f(v) { M._swig_casadi_NlpBuilder_f_set(this._ptr, v); }
get g() { return M._swig_casadi_NlpBuilder_g_get(this._ptr); }
set g(v) { M._swig_casadi_NlpBuilder_g_set(this._ptr, v); }
get x_lb() { return M._swig_casadi_NlpBuilder_x_lb_get(this._ptr); }
set x_lb(v) { M._swig_casadi_NlpBuilder_x_lb_set(this._ptr, v); }
get x_ub() { return M._swig_casadi_NlpBuilder_x_ub_get(this._ptr); }
set x_ub(v) { M._swig_casadi_NlpBuilder_x_ub_set(this._ptr, v); }
get g_lb() { return M._swig_casadi_NlpBuilder_g_lb_get(this._ptr); }
set g_lb(v) { M._swig_casadi_NlpBuilder_g_lb_set(this._ptr, v); }
get g_ub() { return M._swig_casadi_NlpBuilder_g_ub_get(this._ptr); }
set g_ub(v) { M._swig_casadi_NlpBuilder_g_ub_set(this._ptr, v); }
get x_init() { return M._swig_casadi_NlpBuilder_x_init_get(this._ptr); }
set x_init(v) { M._swig_casadi_NlpBuilder_x_init_set(this._ptr, v); }
get lambda_init() { return M._swig_casadi_NlpBuilder_lambda_init_get(this._ptr); }
set lambda_init(v) { M._swig_casadi_NlpBuilder_lambda_init_set(this._ptr, v); }
get discrete() { return M._swig_casadi_NlpBuilder_discrete_get(this._ptr); }
set discrete(v) { M._swig_casadi_NlpBuilder_discrete_set(this._ptr, v); }
delete() {
if (this._ptr === 0) return;
__fr_casadi_NlpBuilder.unregister(this);
M._swig_casadi_NlpBuilder_delete(this._ptr);
this._ptr = 0;
}
type_name() {
return (()=>{const __p=__chk(M._swig_casadi_NlpBuilder_type_name_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
disp(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_NlpBuilder_disp_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = false;
return __chk(M._swig_casadi_NlpBuilder_disp_0(__unwrap(this), a0));
}
default: throw new Error(`NlpBuilder.disp: no overload for ${args.length} args`);
}
}
str(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_NlpBuilder_get_str_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 0: {
const [] = args;
const a0 = false;
return (()=>{const __p=__chk(M._swig_casadi_NlpBuilder_get_str_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`NlpBuilder.str: no overload for ${args.length} args`);
}
}
import_nl(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_NlpBuilder_import_nl_0(__unwrap(this), __ps1, __unwrap(a1)));
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_NlpBuilder_import_nl_0(__unwrap(this), __ps1, __unwrap(a1)));
M._free(__ps1);
return __r;
}
default: throw new Error(`NlpBuilder.import_nl: no overload for ${args.length} args`);
}
}
}
NlpBuilder.prototype._swig_type = '_p_casadi__NlpBuilder';
if (!Object.prototype.hasOwnProperty.call(NlpBuilder.prototype, 'toString'))
NlpBuilder.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
NlpBuilder.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_DaeBuilder = new FinalizationRegistry(p => M._swig_casadi_DaeBuilder_delete(p));
class DaeBuilder extends SharedObject {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_DaeBuilder.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if ((typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
const __nps1 = M.lengthBytesUTF8("");
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8("", __ps1, __nps1 + 1);
__ptr = __chk(M._swig_casadi_DaeBuilder_new_1(__ps0, __ps1, undefined));
M._free(__ps0);
M._free(__ps1);
break;
}
if (M._swig_can_DaeBuilder(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_DaeBuilder_new_2(__unwrap(args[0]))); break; }
throw new TypeError(`DaeBuilder: arg-type mismatch at length 1`);
}
case 2: {
if ((typeof args[0] === 'string') && (typeof args[1] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
const __nps1 = M.lengthBytesUTF8(args[1]);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(args[1], __ps1, __nps1 + 1);
__ptr = __chk(M._swig_casadi_DaeBuilder_new_1(__ps0, __ps1, undefined));
M._free(__ps0);
M._free(__ps1);
break;
}
throw new TypeError(`DaeBuilder: arg-type mismatch at length 2`);
}
case 3: {
if ((typeof args[0] === 'string') && (typeof args[1] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
const __nps1 = M.lengthBytesUTF8(args[1]);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(args[1], __ps1, __nps1 + 1);
__ptr = __chk(M._swig_casadi_DaeBuilder_new_1(__ps0, __ps1, args[2]));
M._free(__ps0);
M._free(__ps1);
break;
}
throw new TypeError(`DaeBuilder: arg-type mismatch at length 3`);
}
case 0: {
__ptr = __chk(M._swig_casadi_DaeBuilder_new_0()); break;
}
default: throw new Error(`DaeBuilder: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_DaeBuilder.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_DaeBuilder.unregister(this);
M._swig_casadi_DaeBuilder_delete(this._ptr);
this._ptr = 0;
}
causality(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_DaeBuilder_causality_0(__unwrap(this), __ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
has_t() {
return (!!(__chk(M._swig_casadi_DaeBuilder_has_t_0(__unwrap(this)))));
}
inputs(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_inputs_0(__unwrap(this), __ps1))));
M._free(__ps1);
return __r;
}
reinit(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_DaeBuilder_reinit_0(__unwrap(this), __ps1, __unwrap(__coerce(a1, MX))));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
oracle(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = false;
const a2 = false;
return __from_handle(__chk(M._swig_casadi_DaeBuilder_oracle_0(__unwrap(this), a0, a1, a2)));
}
case 2: {
const [a0, a1] = args;
const a2 = false;
return __from_handle(__chk(M._swig_casadi_DaeBuilder_oracle_0(__unwrap(this), a0, a1, a2)));
}
case 3: {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_DaeBuilder_oracle_0(__unwrap(this), a0, a1, a2)));
}
case 0: {
const [] = args;
const a0 = false;
const a1 = false;
const a2 = false;
return __from_handle(__chk(M._swig_casadi_DaeBuilder_oracle_0(__unwrap(this), a0, a1, a2)));
}
default: throw new Error(`DaeBuilder.oracle: no overload for ${args.length} args`);
}
}
set_init(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_set_init_0(__unwrap(this), __ps1, __unwrap(__coerce(a1, MX))));
M._free(__ps1);
return __r;
}
set_category(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_set_category_0(__unwrap(this), __ps1, __ps2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
c() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_c_0(__unwrap(this)))));
}
d() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_d_0(__unwrap(this)))));
}
set(...args) {
switch (args.length) {
case 2: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_set_0(__unwrap(this), __ps1, a1));
M._free(__ps1);
return __r;
}
if (typeof args[0] === 'string' && typeof args[1] === 'string') {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_set_1(__unwrap(this), __ps1, __ps2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (M._swig_can_StringVector(__unwrap(args[0])) && M._swig_can_DoubleVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new StringVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DoubleVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_DaeBuilder_set_2(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (M._swig_can_StringVector(__unwrap(args[0])) && M._swig_can_StringVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new StringVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_DaeBuilder_set_3(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`DaeBuilder.set: no overload matches arg types at arity 2`);
}
default: throw new Error(`DaeBuilder.set: no overload for ${args.length} args`);
}
}
gather_fun(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_DaeBuilder_gather_fun_0(__unwrap(this), BigInt(a0)));
}
case 0: {
const [] = args;
const a0 = -1n;
return __chk(M._swig_casadi_DaeBuilder_gather_fun_0(__unwrap(this), BigInt(a0)));
}
default: throw new Error(`DaeBuilder.gather_fun: no overload for ${args.length} args`);
}
}
has(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_DaeBuilder_has_0(__unwrap(this), __ps1))));
M._free(__ps1);
return __r;
}
nzero() {
return __chk(M._swig_casadi_DaeBuilder_nzero_0(__unwrap(this)));
}
p() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_p_0(__unwrap(this)))));
}
q() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_q_0(__unwrap(this)))));
}
u() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_u_0(__unwrap(this)))));
}
w() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_w_0(__unwrap(this)))));
}
x() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_x_0(__unwrap(this)))));
}
set_start_time(a0) {
return __chk(M._swig_casadi_DaeBuilder_set_start_time_0(__unwrap(this), a0));
}
y() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_y_0(__unwrap(this)))));
}
z() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_z_0(__unwrap(this)))));
}
category(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_DaeBuilder_category_0(__unwrap(this), __ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
set_description(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_set_description_0(__unwrap(this), __ps1, __ps2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
categories(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_categories_0(__unwrap(this), __ps1))));
M._free(__ps1);
return __r;
}
t_new() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_t_new_0(__unwrap(this)))));
}
tear() {
return __chk(M._swig_casadi_DaeBuilder_tear_0(__unwrap(this)));
}
eq(...args) {
switch (args.length) {
case 2: {
const [a0, a1] = args;
const a2 = {};
return __chk(M._swig_casadi_DaeBuilder_eq_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(a2)));
}
case 3: {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_DaeBuilder_eq_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(a2)));
}
default: throw new Error(`DaeBuilder.eq: no overload for ${args.length} args`);
}
}
reorder(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_DaeBuilder_reorder_0(__unwrap(this), __ps1, __unwrap(__vp2)));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
has_fun(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_DaeBuilder_has_fun_0(__unwrap(this), __ps1))));
M._free(__ps1);
return __r;
}
sanity_check() {
return __chk(M._swig_casadi_DaeBuilder_sanity_check_0(__unwrap(this)));
}
time() {
return __from_handle(__chk(M._swig_casadi_DaeBuilder_time_0(__unwrap(this))));
}
max(...args) {
switch (args.length) {
case 1: {
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_max_0(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
if (M._swig_can_StringVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new StringVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_max_1(__unwrap(this), __unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`DaeBuilder.max: no overload matches arg types at arity 1`);
}
default: throw new Error(`DaeBuilder.max: no overload for ${args.length} args`);
}
}
provides_directional_derivative() {
return (!!(__chk(M._swig_casadi_DaeBuilder_provides_directional_derivative_0(__unwrap(this)))));
}
set_initial(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_set_initial_0(__unwrap(this), __ps1, __ps2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
add_fun(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_DaeBuilder_add_fun_1(__unwrap(this), __unwrap(a0))));
}
case 2: {
const [a0, a1] = args;
const a2 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_add_fun_2(__unwrap(this), __ps1, a1, __unwrap(a2))));
M._free(__ps1);
return __r;
}
case 3: {
if (typeof args[0] === 'string' && M._swig_can_StringVector(__unwrap(args[1])) && M._swig_can_StringVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_add_fun_0(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3), __unwrap(a3))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_Importer(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_add_fun_2(__unwrap(this), __ps1, a1, __unwrap(a2))));
M._free(__ps1);
return __r;
}
throw new TypeError(`DaeBuilder.add_fun: no overload matches arg types at arity 3`);
}
case 4: {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_add_fun_0(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3), __unwrap(a3))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
default: throw new Error(`DaeBuilder.add_fun: no overload for ${args.length} args`);
}
}
type(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = 3n;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_DaeBuilder_type_0(__unwrap(this), __ps1, BigInt(a1)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_DaeBuilder_type_0(__unwrap(this), __ps1, BigInt(a1)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
default: throw new Error(`DaeBuilder.type: no overload for ${args.length} args`);
}
}
initial_unknowns() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_initial_unknowns_0(__unwrap(this)))));
}
jac_sparsity(a0, a1) {
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new StringVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_jac_sparsity_0(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
parse_fmi(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_parse_fmi_0(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
dimension(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_dimension_0(__unwrap(this), __ps1))));
M._free(__ps1);
return __r;
}
all(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_all_1(__unwrap(this), __ps1))));
M._free(__ps1);
return __r;
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_all_0(__unwrap(this)))));
}
default: throw new Error(`DaeBuilder.all: no overload for ${args.length} args`);
}
}
dependent_fun(a0, a1, a2) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_dependent_fun_0(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
set_nominal(...args) {
switch (args.length) {
case 2: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_set_nominal_0(__unwrap(this), __ps1, a1));
M._free(__ps1);
return __r;
}
if (M._swig_can_StringVector(__unwrap(args[0])) && M._swig_can_DoubleVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new StringVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DoubleVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_DaeBuilder_set_nominal_1(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`DaeBuilder.set_nominal: no overload matches arg types at arity 2`);
}
default: throw new Error(`DaeBuilder.set_nominal: no overload for ${args.length} args`);
}
}
compile_fmu(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
return M.__swig_release_handle(__chk(M._swig_casadi_DaeBuilder_compile_fmu_0(__unwrap(this), __unwrap(a0), __unwrap(a1))));
}
case 2: {
const [a0, a1] = args;
return M.__swig_release_handle(__chk(M._swig_casadi_DaeBuilder_compile_fmu_0(__unwrap(this), __unwrap(a0), __unwrap(a1))));
}
default: throw new Error(`DaeBuilder.compile_fmu: no overload for ${args.length} args`);
}
}
reset() {
return __chk(M._swig_casadi_DaeBuilder_reset_0(__unwrap(this)));
}
ddef() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_ddef_0(__unwrap(this)))));
}
export_fmu(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return M.__swig_release_handle(__chk(M._swig_casadi_DaeBuilder_export_fmu_0(__unwrap(this), __unwrap(a0))));
}
case 0: {
const [] = args;
const a0 = {};
return M.__swig_release_handle(__chk(M._swig_casadi_DaeBuilder_export_fmu_0(__unwrap(this), __unwrap(a0))));
}
default: throw new Error(`DaeBuilder.export_fmu: no overload for ${args.length} args`);
}
}
display_unit(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_DaeBuilder_display_unit_0(__unwrap(this), __ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
set_causality(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_set_causality_0(__unwrap(this), __ps1, __ps2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
when(...args) {
switch (args.length) {
case 2: {
const [a0, a1] = args;
const a2 = {};
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_DaeBuilder_when_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(__vp2), __unwrap(a2)));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
case 3: {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_DaeBuilder_when_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(__vp2), __unwrap(a2)));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
default: throw new Error(`DaeBuilder.when: no overload for ${args.length} args`);
}
}
start_time() {
return __chk(M._swig_casadi_DaeBuilder_start_time_0(__unwrap(this)));
}
numel(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_numel_0(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
step_size() {
return __chk(M._swig_casadi_DaeBuilder_step_size_0(__unwrap(this)));
}
description(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_DaeBuilder_description_0(__unwrap(this), __ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
initial(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_DaeBuilder_initial_0(__unwrap(this), __ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
set_variability(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_set_variability_0(__unwrap(this), __ps1, __ps2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
tolerance() {
return __chk(M._swig_casadi_DaeBuilder_tolerance_0(__unwrap(this)));
}
outputs(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_outputs_0(__unwrap(this), __ps1))));
M._free(__ps1);
return __r;
}
unit(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_DaeBuilder_unit_0(__unwrap(this), __ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
stop_time() {
return __chk(M._swig_casadi_DaeBuilder_stop_time_0(__unwrap(this)));
}
set_start(...args) {
switch (args.length) {
case 2: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_set_start_0(__unwrap(this), __ps1, a1));
M._free(__ps1);
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_DoubleVector(__unwrap(args[1]))) {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DoubleVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_DaeBuilder_set_start_1(__unwrap(this), __ps1, __unwrap(__vp2)));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (M._swig_can_StringVector(__unwrap(args[0])) && M._swig_can_DoubleVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new StringVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DoubleVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_DaeBuilder_set_start_2(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`DaeBuilder.set_start: no overload matches arg types at arity 2`);
}
default: throw new Error(`DaeBuilder.set_start: no overload for ${args.length} args`);
}
}
load_fmi_description(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_load_fmi_description_0(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
set_type(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_set_type_0(__unwrap(this), __ps1, __ps2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
min(...args) {
switch (args.length) {
case 1: {
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_min_0(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
if (M._swig_can_StringVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new StringVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_min_1(__unwrap(this), __unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`DaeBuilder.min: no overload matches arg types at arity 1`);
}
default: throw new Error(`DaeBuilder.min: no overload for ${args.length} args`);
}
}
add_lc(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_DaeBuilder_add_lc_0(__unwrap(this), __ps1, __unwrap(__vp2)));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
nc() {
return __chk(M._swig_casadi_DaeBuilder_nc_0(__unwrap(this)));
}
nd() {
return __chk(M._swig_casadi_DaeBuilder_nd_0(__unwrap(this)));
}
nominal(...args) {
switch (args.length) {
case 1: {
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_nominal_0(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
if (M._swig_can_StringVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new StringVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_nominal_1(__unwrap(this), __unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`DaeBuilder.nominal: no overload matches arg types at arity 1`);
}
default: throw new Error(`DaeBuilder.nominal: no overload for ${args.length} args`);
}
}
beq(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_beq_0(__unwrap(this), __ps1)));
M._free(__ps1);
return __r;
}
eliminate(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_eliminate_0(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
set_max(...args) {
switch (args.length) {
case 2: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_set_max_0(__unwrap(this), __ps1, a1));
M._free(__ps1);
return __r;
}
if (M._swig_can_StringVector(__unwrap(args[0])) && M._swig_can_DoubleVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new StringVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DoubleVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_DaeBuilder_set_max_1(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`DaeBuilder.set_max: no overload matches arg types at arity 2`);
}
default: throw new Error(`DaeBuilder.set_max: no overload for ${args.length} args`);
}
}
np() {
return __chk(M._swig_casadi_DaeBuilder_np_0(__unwrap(this)));
}
nq() {
return __chk(M._swig_casadi_DaeBuilder_nq_0(__unwrap(this)));
}
nu() {
return __chk(M._swig_casadi_DaeBuilder_nu_0(__unwrap(this)));
}
nw() {
return __chk(M._swig_casadi_DaeBuilder_nw_0(__unwrap(this)));
}
nx() {
return __chk(M._swig_casadi_DaeBuilder_nx_0(__unwrap(this)));
}
ny() {
return __chk(M._swig_casadi_DaeBuilder_ny_0(__unwrap(this)));
}
nz() {
return __chk(M._swig_casadi_DaeBuilder_nz_0(__unwrap(this)));
}
assign(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_DaeBuilder_assign_0(__unwrap(this), __ps1, __unwrap(__coerce(a1, MX))));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
value_reference(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_value_reference_0(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
provides_directional_derivatives() {
return (!!(__chk(M._swig_casadi_DaeBuilder_provides_directional_derivatives_0(__unwrap(this)))));
}
pack_fmu(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
return (()=>{const __p=__chk(M._swig_casadi_DaeBuilder_pack_fmu_0(__unwrap(this), __unwrap(a0), __unwrap(a1)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 2: {
const [a0, a1] = args;
return (()=>{const __p=__chk(M._swig_casadi_DaeBuilder_pack_fmu_0(__unwrap(this), __unwrap(a0), __unwrap(a1)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`DaeBuilder.pack_fmu: no overload for ${args.length} args`);
}
}
set_tolerance(a0) {
return __chk(M._swig_casadi_DaeBuilder_set_tolerance_0(__unwrap(this), a0));
}
attribute(...args) {
switch (args.length) {
case 2: {
if (typeof args[0] === 'string' && typeof args[1] === 'string') {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_attribute_0(__unwrap(this), __ps1, __ps2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_StringVector(__unwrap(args[1]))) {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_attribute_1(__unwrap(this), __ps1, __unwrap(__vp2)))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`DaeBuilder.attribute: no overload matches arg types at arity 2`);
}
default: throw new Error(`DaeBuilder.attribute: no overload for ${args.length} args`);
}
}
get(...args) {
switch (args.length) {
case 1: {
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_get_0(__unwrap(this), __ps1)));
M._free(__ps1);
return __r;
}
if (M._swig_can_StringVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new StringVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_DaeBuilder_get_1(__unwrap(this), __unwrap(__vp1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`DaeBuilder.get: no overload matches arg types at arity 1`);
}
default: throw new Error(`DaeBuilder.get: no overload for ${args.length} args`);
}
}
lift(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = true;
return __chk(M._swig_casadi_DaeBuilder_lift_0(__unwrap(this), a0, a1));
}
case 2: {
const [a0, a1] = args;
return __chk(M._swig_casadi_DaeBuilder_lift_0(__unwrap(this), a0, a1));
}
case 0: {
const [] = args;
const a0 = true;
const a1 = true;
return __chk(M._swig_casadi_DaeBuilder_lift_0(__unwrap(this), a0, a1));
}
default: throw new Error(`DaeBuilder.lift: no overload for ${args.length} args`);
}
}
set_all(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_DaeBuilder_set_all_0(__unwrap(this), __ps1, __unwrap(__vp2)));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
init_rhs() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_init_rhs_0(__unwrap(this)))));
}
set_value_reference(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_set_value_reference_0(__unwrap(this), __ps1, BigInt(a1)));
M._free(__ps1);
return __r;
}
symbolic() {
return (!!(__chk(M._swig_casadi_DaeBuilder_symbolic_0(__unwrap(this)))));
}
var(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_var_0(__unwrap(this), __ps1)));
M._free(__ps1);
return __r;
}
set_display_unit(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_set_display_unit_0(__unwrap(this), __ps1, __ps2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
sort(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_sort_0(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
set_step_size(a0) {
return __chk(M._swig_casadi_DaeBuilder_set_step_size_0(__unwrap(this), a0));
}
der(...args) {
switch (args.length) {
case 1: {
if (M._swig_can_StringVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new StringVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_der_1(__unwrap(this), __unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_DaeBuilder_der_2(__unwrap(this), __unwrap(__coerce(a0, MX)))));
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_DaeBuilder_der_3(__unwrap(this), __unwrap(__coerce(a0, MX)))));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_DaeBuilder_der_4(__unwrap(this), __ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
throw new TypeError(`DaeBuilder.der: no overload matches arg types at arity 1`);
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_der_0(__unwrap(this)))));
}
default: throw new Error(`DaeBuilder.der: no overload for ${args.length} args`);
}
}
set_unit(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_set_unit_0(__unwrap(this), __ps1, __ps2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
fun(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_fun_0(__unwrap(this), __ps1)));
M._free(__ps1);
return __r;
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_fun_1(__unwrap(this)))));
}
default: throw new Error(`DaeBuilder.fun: no overload for ${args.length} args`);
}
}
set_attribute(...args) {
switch (args.length) {
case 3: {
if (typeof args[0] === 'string' && typeof args[1] === 'string' && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_set_attribute_0(__unwrap(this), __ps1, __ps2, a2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_StringVector(__unwrap(args[1])) && M._swig_can_DoubleVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new DoubleVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __chk(M._swig_casadi_DaeBuilder_set_attribute_1(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3)));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
throw new TypeError(`DaeBuilder.set_attribute: no overload matches arg types at arity 3`);
}
default: throw new Error(`DaeBuilder.set_attribute: no overload for ${args.length} args`);
}
}
pre(...args) {
switch (args.length) {
case 1: {
if (M._swig_can_StringVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new StringVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_pre_0(__unwrap(this), __unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_DaeBuilder_pre_1(__unwrap(this), __unwrap(__coerce(a0, MX)))));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_DaeBuilder_pre_2(__unwrap(this), __ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
throw new TypeError(`DaeBuilder.pre: no overload matches arg types at arity 1`);
}
default: throw new Error(`DaeBuilder.pre: no overload for ${args.length} args`);
}
}
type_name() {
return (()=>{const __p=__chk(M._swig_casadi_DaeBuilder_type_name_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
name() {
return (()=>{const __p=__chk(M._swig_casadi_DaeBuilder_name_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
prune(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = true;
return __chk(M._swig_casadi_DaeBuilder_prune_0(__unwrap(this), a0, a1));
}
case 2: {
const [a0, a1] = args;
return __chk(M._swig_casadi_DaeBuilder_prune_0(__unwrap(this), a0, a1));
}
case 0: {
const [] = args;
const a0 = true;
const a1 = true;
return __chk(M._swig_casadi_DaeBuilder_prune_0(__unwrap(this), a0, a1));
}
default: throw new Error(`DaeBuilder.prune: no overload for ${args.length} args`);
}
}
add(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_add_2(__unwrap(this), __ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
case 2: {
if (typeof args[0] === 'string' && typeof args[1] === 'string') {
const [a0, a1] = args;
const a2 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_add_1(__unwrap(this), __ps1, __ps2, __unwrap(a2))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_add_2(__unwrap(this), __ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
throw new TypeError(`DaeBuilder.add: no overload matches arg types at arity 2`);
}
case 3: {
if (typeof args[0] === 'string' && typeof args[1] === 'string' && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_add_0(__unwrap(this), __ps1, __ps2, __ps3, __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
M._free(__ps3);
return __r;
}
if (typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_add_1(__unwrap(this), __ps1, __ps2, __unwrap(a2))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
throw new TypeError(`DaeBuilder.add: no overload matches arg types at arity 3`);
}
case 4: {
if (typeof args[0] === 'string' && typeof args[1] === 'string' && typeof args[2] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_add_0(__unwrap(this), __ps1, __ps2, __ps3, __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
M._free(__ps3);
return __r;
}
if (typeof args[0] === 'string' && typeof args[1] === 'string' && typeof args[2] === 'string' && (M._swig_can_MX(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3]))) {
const [a0, a1, a2, a3] = args;
const a4 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_add_3(__unwrap(this), __ps1, __ps2, __ps3, __unwrap(__coerce(a3, MX)), __unwrap(a4)));
M._free(__ps1);
M._free(__ps2);
M._free(__ps3);
return __r;
}
throw new TypeError(`DaeBuilder.add: no overload matches arg types at arity 4`);
}
case 5: {
const [a0, a1, a2, a3, a4] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_add_3(__unwrap(this), __ps1, __ps2, __ps3, __unwrap(__coerce(a3, MX)), __unwrap(a4)));
M._free(__ps1);
M._free(__ps2);
M._free(__ps3);
return __r;
}
default: throw new Error(`DaeBuilder.add: no overload for ${args.length} args`);
}
}
create(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_create_2(__unwrap(this), __ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_create_2(__unwrap(this), __ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
case 3: {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_create_1(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3), __unwrap(a3))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
case 4: {
if (typeof args[0] === 'string' && M._swig_can_StringVector(__unwrap(args[1])) && M._swig_can_StringVector(__unwrap(args[2])) && (typeof args[3] === 'boolean')) {
const [a0, a1, a2, a3] = args;
const a4 = false;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_create_0(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3), a3, a4)));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_StringVector(__unwrap(args[1])) && M._swig_can_StringVector(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_create_1(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3), __unwrap(a3))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
throw new TypeError(`DaeBuilder.create: no overload matches arg types at arity 4`);
}
case 5: {
const [a0, a1, a2, a3, a4] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new StringVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_create_0(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3), a3, a4)));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
case 0: {
const [] = args;
return __from_handle(__chk(M._swig_casadi_DaeBuilder_create_3(__unwrap(this))));
}
default: throw new Error(`DaeBuilder.create: no overload for ${args.length} args`);
}
}
wdef() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_wdef_0(__unwrap(this)))));
}
set_stop_time(a0) {
return __chk(M._swig_casadi_DaeBuilder_set_stop_time_0(__unwrap(this), a0));
}
has_beq(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_DaeBuilder_has_beq_0(__unwrap(this), __ps1))));
M._free(__ps1);
return __r;
}
cdef() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_cdef_0(__unwrap(this)))));
}
start(...args) {
switch (args.length) {
case 1: {
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_start_0(__unwrap(this), __ps1))));
M._free(__ps1);
return __r;
}
if (M._swig_can_StringVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new StringVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_start_1(__unwrap(this), __unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`DaeBuilder.start: no overload matches arg types at arity 1`);
}
default: throw new Error(`DaeBuilder.start: no overload for ${args.length} args`);
}
}
variability(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_DaeBuilder_variability_0(__unwrap(this), __ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
set_min(...args) {
switch (args.length) {
case 2: {
if (typeof args[0] === 'string' && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_DaeBuilder_set_min_0(__unwrap(this), __ps1, a1));
M._free(__ps1);
return __r;
}
if (M._swig_can_StringVector(__unwrap(args[0])) && M._swig_can_DoubleVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new StringVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DoubleVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_DaeBuilder_set_min_1(__unwrap(this), __unwrap(__vp1), __unwrap(__vp2)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`DaeBuilder.set_min: no overload matches arg types at arity 2`);
}
default: throw new Error(`DaeBuilder.set_min: no overload for ${args.length} args`);
}
}
init_lhs() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DaeBuilder_init_lhs_0(__unwrap(this)))));
}
transition(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_transition_1(__unwrap(this), __ps1)));
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_DaeBuilder_transition_0(__unwrap(this), __ps1, BigInt(a1))));
M._free(__ps1);
return __r;
}
case 0: {
const [] = args;
return __from_handle(__chk(M._swig_casadi_DaeBuilder_transition_2(__unwrap(this))));
}
default: throw new Error(`DaeBuilder.transition: no overload for ${args.length} args`);
}
}
}
DaeBuilder.prototype._swig_type = '_p_casadi__DaeBuilder';
if (!Object.prototype.hasOwnProperty.call(DaeBuilder.prototype, 'toString'))
DaeBuilder.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
DaeBuilder.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
__mixin(DaeBuilder, PrintableCommon);
const __fr_casadi_XmlFile = new FinalizationRegistry(p => M._swig_casadi_XmlFile_delete(p));
class XmlFile extends SharedObject {
static type_name() {
return (()=>{const __p=__chk(M._swig_casadi_XmlFile_static_type_name_0());const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
static load_plugin(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_XmlFile_static_load_plugin_0(__ps1));
M._free(__ps1);
return __r;
}
static doc(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_XmlFile_static_doc_0(__ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_XmlFile.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if ((typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_XmlFile_new_1(__ps0));
M._free(__ps0);
break;
}
if (M._swig_can_XmlFile(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_XmlFile_new_2(__unwrap(args[0]))); break; }
throw new TypeError(`XmlFile: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_XmlFile_new_0()); break;
}
default: throw new Error(`XmlFile: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_XmlFile.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_XmlFile.unregister(this);
M._swig_casadi_XmlFile_delete(this._ptr);
this._ptr = 0;
}
}
XmlFile.prototype._swig_type = '_p_casadi__XmlFile';
if (!Object.prototype.hasOwnProperty.call(XmlFile.prototype, 'toString'))
XmlFile.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
XmlFile.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
__mixin(XmlFile, PrintableCommon);
const __fr_casadi_Options = new FinalizationRegistry(p => M._swig_casadi_Options_delete(p));
class Options {
static sanitize(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = true;
return M.__swig_release_handle(__chk(M._swig_casadi_Options_static_sanitize_0(__unwrap(a0), a1)));
}
case 2: {
const [a0, a1] = args;
return M.__swig_release_handle(__chk(M._swig_casadi_Options_static_sanitize_0(__unwrap(a0), a1)));
}
default: throw new Error(`Options.sanitize: no overload for ${args.length} args`);
}
}
static is_sane(a0) {
return (!!(__chk(M._swig_casadi_Options_static_is_sane_0(__unwrap(a0)))));
}
static has_null(a0) {
return (!!(__chk(M._swig_casadi_Options_static_has_null_0(__unwrap(a0)))));
}
static word_distance(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_Options_static_word_distance_0(__ps1, __ps2));
M._free(__ps1);
M._free(__ps2);
return __r;
}
static has_dot(a0) {
return (!!(__chk(M._swig_casadi_Options_static_has_dot_0(__unwrap(a0)))));
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_casadi_Options.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_Options(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_Options_new_1(__unwrap(args[0]))); break; }
throw new TypeError(`Options: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_Options_new_0()); break;
}
default: throw new Error(`Options: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_casadi_Options.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_Options.unregister(this);
M._swig_casadi_Options_delete(this._ptr);
this._ptr = 0;
}
best_matches(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Options_best_matches_0(__unwrap(this), __ps1, a1));
M._free(__ps1);
return __r;
}
type(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_Options_type_0(__unwrap(this), __ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
all() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Options_all_0(__unwrap(this)))));
}
print_one(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Options_print_one_0(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
print_all() {
return __chk(M._swig_casadi_Options_print_all_0(__unwrap(this)));
}
info(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_Options_info_0(__unwrap(this), __ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
}
suggestions(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = 5n;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Options_suggestions_0(__unwrap(this), __ps1, BigInt(a1)))));
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_Options_suggestions_0(__unwrap(this), __ps1, BigInt(a1)))));
M._free(__ps1);
return __r;
}
default: throw new Error(`Options.suggestions: no overload for ${args.length} args`);
}
}
check(a0) {
return __chk(M._swig_casadi_Options_check_0(__unwrap(this), __unwrap(a0)));
}
}
Options.prototype._swig_type = '_p_casadi__Options';
if (!Object.prototype.hasOwnProperty.call(Options.prototype, 'toString'))
Options.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
Options.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_SerializerBase = new FinalizationRegistry(p => M._swig_casadi_SerializerBase_delete(p));
class SerializerBase {
static type_to_string(a0) {
return (()=>{const __p=__chk(M._swig_casadi_SerializerBase_static_type_to_string_0(a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_SerializerBase.unregister(this);
M._swig_casadi_SerializerBase_delete(this._ptr);
this._ptr = 0;
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) {
this._ptr = args[1];
if (args[2]) __fr_casadi_SerializerBase.register(this, args[1], this);
return;
}
throw new Error(`SerializerBase: abstract base, no public constructor`);
}
connect(a0) {
return __chk(M._swig_casadi_SerializerBase_connect_0(__unwrap(this), a0));
}
pack(...args) {
switch (args.length) {
case 1: {
if (M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_SerializerBase_pack_0(__unwrap(this), __unwrap(a0)));
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_SerializerBase_pack_1(__unwrap(this), __unwrap(__coerce(a0, MX))));
}
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_SerializerBase_pack_2(__unwrap(this), __unwrap(__coerce(a0, DM))));
}
if ((M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_SerializerBase_pack_3(__unwrap(this), __unwrap(__coerce(a0, SX))));
}
if (M._swig_can_Linsol(__unwrap(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_SerializerBase_pack_4(__unwrap(this), a0));
}
if (M._swig_can_Function(__unwrap(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_SerializerBase_pack_5(__unwrap(this), __unwrap(a0)));
}
if (M._swig_can_GenericType(__unwrap(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_SerializerBase_pack_6(__unwrap(this), __unwrap(a0)));
}
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_SerializerBase_pack_7(__unwrap(this), BigInt(a0)));
}
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_SerializerBase_pack_8(__unwrap(this), a0));
}
if (typeof args[0] === 'string') {
const [a0] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_SerializerBase_pack_9(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
if (M._swig_can_SparsityVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SparsityVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_SerializerBase_pack_10(__unwrap(this), __unwrap(__vp1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_MXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_SerializerBase_pack_11(__unwrap(this), __unwrap(__vp1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_DMVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_SerializerBase_pack_12(__unwrap(this), __unwrap(__vp1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_SXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_SerializerBase_pack_13(__unwrap(this), __unwrap(__vp1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_std__vectorT_casadi__Linsol_t(__unwrap(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_SerializerBase_pack_14(__unwrap(this), a0));
}
if (M._swig_can_FunctionVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new FunctionVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_SerializerBase_pack_15(__unwrap(this), __unwrap(__vp1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_std__vectorT_casadi__GenericType_t(__unwrap(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_SerializerBase_pack_16(__unwrap(this), __unwrap(a0)));
}
if (M._swig_can_IntVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_SerializerBase_pack_17(__unwrap(this), __unwrap(__vp1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_DoubleVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_SerializerBase_pack_18(__unwrap(this), __unwrap(__vp1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (M._swig_can_StringVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new StringVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_SerializerBase_pack_19(__unwrap(this), __unwrap(__vp1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`SerializerBase.pack: no overload matches arg types at arity 1`);
}
default: throw new Error(`SerializerBase.pack: no overload for ${args.length} args`);
}
}
reset() {
return __chk(M._swig_casadi_SerializerBase_reset_0(__unwrap(this)));
}
}
SerializerBase.prototype._swig_type = '_p_casadi__SerializerBase';
if (!Object.prototype.hasOwnProperty.call(SerializerBase.prototype, 'toString'))
SerializerBase.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
SerializerBase.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_DeserializerBase = new FinalizationRegistry(p => M._swig_casadi_DeserializerBase_delete(p));
class DeserializerBase {
delete() {
if (this._ptr === 0) return;
__fr_casadi_DeserializerBase.unregister(this);
M._swig_casadi_DeserializerBase_delete(this._ptr);
this._ptr = 0;
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) {
this._ptr = args[1];
if (args[2]) __fr_casadi_DeserializerBase.register(this, args[1], this);
return;
}
throw new Error(`DeserializerBase: abstract base, no public constructor`);
}
blind_unpack_sx_v1() {
return __from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_sx_v1_0(__unwrap(this))));
}
blind_unpack_function_vector() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_function_vector_0(__unwrap(this)))));
}
unpack_generictype_vector() {
return __chk(M._swig_casadi_DeserializerBase_unpack_generictype_vector_0(__unwrap(this)));
}
unpack_double_vector() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_unpack_double_vector_0(__unwrap(this)))));
}
blind_unpack_linsol_vector() {
return __chk(M._swig_casadi_DeserializerBase_blind_unpack_linsol_vector_0(__unwrap(this)));
}
unpack_generictype() {
return __from_handle(__chk(M._swig_casadi_DeserializerBase_unpack_generictype_0(__unwrap(this))));
}
unpack_int() {
return __chk(M._swig_casadi_DeserializerBase_unpack_int_0(__unwrap(this)));
}
unpack_sx_vector() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_unpack_sx_vector_0(__unwrap(this)))));
}
unpack_int_vector() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_unpack_int_vector_0(__unwrap(this)))));
}
blind_unpack_string_vector() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_string_vector_0(__unwrap(this)))));
}
blind_unpack_generictype_vector() {
return __chk(M._swig_casadi_DeserializerBase_blind_unpack_generictype_vector_0(__unwrap(this)));
}
blind_unpack_dm() {
return __from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_dm_0(__unwrap(this))));
}
blind_unpack_sx_vector() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_sx_vector_0(__unwrap(this)))));
}
blind_unpack_mx_v1() {
return __from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_mx_v1_0(__unwrap(this))));
}
unpack_mx_vector() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_unpack_mx_vector_0(__unwrap(this)))));
}
unpack_sx() {
return __from_handle(__chk(M._swig_casadi_DeserializerBase_unpack_sx_0(__unwrap(this))));
}
unpack_string() {
return (()=>{const __p=__chk(M._swig_casadi_DeserializerBase_unpack_string_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
blind_unpack_mx_vector_v1() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_mx_vector_v1_0(__unwrap(this)))));
}
blind_unpack_mx_vector() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_mx_vector_0(__unwrap(this)))));
}
blind_unpack_double_vector() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_double_vector_0(__unwrap(this)))));
}
unpack_sparsity_vector() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_unpack_sparsity_vector_0(__unwrap(this)))));
}
blind_unpack_string() {
return (()=>{const __p=__chk(M._swig_casadi_DeserializerBase_blind_unpack_string_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
connect(a0) {
return __chk(M._swig_casadi_DeserializerBase_connect_0(__unwrap(this), a0));
}
blind_unpack_sparsity_vector() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_sparsity_vector_0(__unwrap(this)))));
}
unpack_double() {
return __chk(M._swig_casadi_DeserializerBase_unpack_double_0(__unwrap(this)));
}
unpack_function() {
return __from_handle(__chk(M._swig_casadi_DeserializerBase_unpack_function_0(__unwrap(this))));
}
unpack_dm() {
return __from_handle(__chk(M._swig_casadi_DeserializerBase_unpack_dm_0(__unwrap(this))));
}
blind_unpack_double() {
return __chk(M._swig_casadi_DeserializerBase_blind_unpack_double_0(__unwrap(this)));
}
unpack_sparsity() {
return __from_handle(__chk(M._swig_casadi_DeserializerBase_unpack_sparsity_0(__unwrap(this))));
}
blind_unpack_sparsity() {
return __from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_sparsity_0(__unwrap(this))));
}
blind_unpack_generictype() {
return __from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_generictype_0(__unwrap(this))));
}
blind_unpack_mx() {
return __from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_mx_0(__unwrap(this))));
}
blind_unpack_function() {
return __from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_function_0(__unwrap(this))));
}
pop_type() {
return __chk(M._swig_casadi_DeserializerBase_pop_type_0(__unwrap(this)));
}
unpack_linsol() {
return __from_handle(__chk(M._swig_casadi_DeserializerBase_unpack_linsol_0(__unwrap(this))));
}
unpack_linsol_vector() {
return __chk(M._swig_casadi_DeserializerBase_unpack_linsol_vector_0(__unwrap(this)));
}
blind_unpack_sx_vector_v1() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_sx_vector_v1_0(__unwrap(this)))));
}
blind_unpack_int_vector() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_int_vector_0(__unwrap(this)))));
}
unpack_string_vector() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_unpack_string_vector_0(__unwrap(this)))));
}
blind_unpack_linsol() {
return __from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_linsol_0(__unwrap(this))));
}
reset() {
return __chk(M._swig_casadi_DeserializerBase_reset_0(__unwrap(this)));
}
unpack_mx() {
return __from_handle(__chk(M._swig_casadi_DeserializerBase_unpack_mx_0(__unwrap(this))));
}
unpack_dm_vector() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_unpack_dm_vector_0(__unwrap(this)))));
}
blind_unpack_sx() {
return __from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_sx_0(__unwrap(this))));
}
blind_unpack_int() {
return __chk(M._swig_casadi_DeserializerBase_blind_unpack_int_0(__unwrap(this)));
}
blind_unpack_dm_vector() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_blind_unpack_dm_vector_0(__unwrap(this)))));
}
unpack_function_vector() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_DeserializerBase_unpack_function_vector_0(__unwrap(this)))));
}
}
DeserializerBase.prototype._swig_type = '_p_casadi__DeserializerBase';
if (!Object.prototype.hasOwnProperty.call(DeserializerBase.prototype, 'toString'))
DeserializerBase.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
DeserializerBase.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_StringSerializer = new FinalizationRegistry(p => M._swig_casadi_StringSerializer_delete(p));
class StringSerializer extends SerializerBase {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_StringSerializer.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
__ptr = __chk(M._swig_casadi_StringSerializer_new_0(args[0])); break;
}
case 0: {
__ptr = __chk(M._swig_casadi_StringSerializer_new_0(undefined)); break;
}
default: throw new Error(`StringSerializer: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_StringSerializer.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_StringSerializer.unregister(this);
M._swig_casadi_StringSerializer_delete(this._ptr);
this._ptr = 0;
}
encode() {
return (()=>{const __p=__chk(M._swig_casadi_StringSerializer_encode_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
}
StringSerializer.prototype._swig_type = '_p_casadi__StringSerializer';
if (!Object.prototype.hasOwnProperty.call(StringSerializer.prototype, 'toString'))
StringSerializer.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
StringSerializer.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_FileSerializer = new FinalizationRegistry(p => M._swig_casadi_FileSerializer_delete(p));
class FileSerializer extends SerializerBase {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_FileSerializer.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if ((typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_FileSerializer_new_0(__ps0, undefined));
M._free(__ps0);
break;
}
throw new TypeError(`FileSerializer: arg-type mismatch at length 1`);
}
case 2: {
if ((typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_FileSerializer_new_0(__ps0, args[1]));
M._free(__ps0);
break;
}
throw new TypeError(`FileSerializer: arg-type mismatch at length 2`);
}
default: throw new Error(`FileSerializer: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_FileSerializer.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_FileSerializer.unregister(this);
M._swig_casadi_FileSerializer_delete(this._ptr);
this._ptr = 0;
}
}
FileSerializer.prototype._swig_type = '_p_casadi__FileSerializer';
if (!Object.prototype.hasOwnProperty.call(FileSerializer.prototype, 'toString'))
FileSerializer.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
FileSerializer.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_StringDeserializer = new FinalizationRegistry(p => M._swig_casadi_StringDeserializer_delete(p));
class StringDeserializer extends DeserializerBase {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_StringDeserializer.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if ((typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_StringDeserializer_new_0(__ps0));
M._free(__ps0);
break;
}
throw new TypeError(`StringDeserializer: arg-type mismatch at length 1`);
}
case 0: {
const __nps0 = M.lengthBytesUTF8("");
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8("", __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_StringDeserializer_new_0(__ps0));
M._free(__ps0);
break;
}
default: throw new Error(`StringDeserializer: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_StringDeserializer.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_StringDeserializer.unregister(this);
M._swig_casadi_StringDeserializer_delete(this._ptr);
this._ptr = 0;
}
decode(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_StringDeserializer_decode_0(__unwrap(this), __ps1));
M._free(__ps1);
return __r;
}
}
StringDeserializer.prototype._swig_type = '_p_casadi__StringDeserializer';
if (!Object.prototype.hasOwnProperty.call(StringDeserializer.prototype, 'toString'))
StringDeserializer.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
StringDeserializer.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_FileDeserializer = new FinalizationRegistry(p => M._swig_casadi_FileDeserializer_delete(p));
class FileDeserializer extends DeserializerBase {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_FileDeserializer.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if ((typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_FileDeserializer_new_0(__ps0));
M._free(__ps0);
break;
}
throw new TypeError(`FileDeserializer: arg-type mismatch at length 1`);
}
default: throw new Error(`FileDeserializer: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_FileDeserializer.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_FileDeserializer.unregister(this);
M._swig_casadi_FileDeserializer_delete(this._ptr);
this._ptr = 0;
}
}
FileDeserializer.prototype._swig_type = '_p_casadi__FileDeserializer';
if (!Object.prototype.hasOwnProperty.call(FileDeserializer.prototype, 'toString'))
FileDeserializer.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
FileDeserializer.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_Opti = new FinalizationRegistry(p => M._swig_casadi_Opti_delete(p));
class Opti extends PrintableCommon {
static bounded(a0, a1, a2) {
return __from_handle(__chk(M._swig_casadi_Opti_static_bounded_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)))));
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_Opti.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if ((typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_Opti_new_0(__ps0));
M._free(__ps0);
break;
}
if (M._swig_can_Opti(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_Opti_new_1(__unwrap(args[0]))); break; }
throw new TypeError(`Opti: arg-type mismatch at length 1`);
}
case 0: {
const __nps0 = M.lengthBytesUTF8("nlp");
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8("nlp", __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_Opti_new_0(__ps0));
M._free(__ps0);
break;
}
default: throw new Error(`Opti: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_Opti.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_Opti.unregister(this);
M._swig_casadi_Opti_delete(this._ptr);
this._ptr = 0;
}
solve() {
return __from_handle(__chk(M._swig_casadi_Opti_solve_0(__unwrap(this))));
}
str(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_Opti_get_str_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 0: {
const [] = args;
const a0 = false;
return (()=>{const __p=__chk(M._swig_casadi_Opti_get_str_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`Opti.str: no overload for ${args.length} args`);
}
}
return_status() {
return (()=>{const __p=__chk(M._swig_casadi_Opti_return_status_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
solve_limited() {
return __from_handle(__chk(M._swig_casadi_Opti_solve_limited_0(__unwrap(this))));
}
disp(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Opti_disp_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = false;
return __chk(M._swig_casadi_Opti_disp_0(__unwrap(this), a0));
}
default: throw new Error(`Opti.disp: no overload for ${args.length} args`);
}
}
stats() {
return M.__swig_release_handle(__chk(M._swig_casadi_Opti_stats_0(__unwrap(this))));
}
f() {
return __from_handle(__chk(M._swig_casadi_Opti_f_0(__unwrap(this))));
}
g() {
return __from_handle(__chk(M._swig_casadi_Opti_g_0(__unwrap(this))));
}
minimize(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = 1;
return __chk(M._swig_casadi_Opti_minimize_0(__unwrap(this), __unwrap(__coerce(a0, MX)), a1));
}
case 2: {
const [a0, a1] = args;
return __chk(M._swig_casadi_Opti_minimize_0(__unwrap(this), __unwrap(__coerce(a0, MX)), a1));
}
default: throw new Error(`Opti.minimize: no overload for ${args.length} args`);
}
}
p() {
return __from_handle(__chk(M._swig_casadi_Opti_p_0(__unwrap(this))));
}
x() {
return __from_handle(__chk(M._swig_casadi_Opti_x_0(__unwrap(this))));
}
subject_to(...args) {
switch (args.length) {
case 1: {
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = {};
return __chk(M._swig_casadi_Opti_subject_to_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(a1)));
}
if (M._swig_can_MXVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_Opti_subject_to_1(__unwrap(this), __unwrap(__vp1), __unwrap(a1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`Opti.subject_to: no overload matches arg types at arity 1`);
}
case 2: {
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return __chk(M._swig_casadi_Opti_subject_to_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(a1)));
}
if (M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_Opti_subject_to_1(__unwrap(this), __unwrap(__vp1), __unwrap(a1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __chk(M._swig_casadi_Opti_subject_to_2(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, DM)), __unwrap(a2)));
}
if (M._swig_can_MXVector(__unwrap(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_Opti_subject_to_3(__unwrap(this), __unwrap(__vp1), __unwrap(__coerce(a1, DM)), __unwrap(a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`Opti.subject_to: no overload matches arg types at arity 2`);
}
case 3: {
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_Opti_subject_to_2(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, DM)), __unwrap(a2)));
}
if (M._swig_can_MXVector(__unwrap(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_Opti_subject_to_3(__unwrap(this), __unwrap(__vp1), __unwrap(__coerce(a1, DM)), __unwrap(a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`Opti.subject_to: no overload matches arg types at arity 3`);
}
case 0: {
const [] = args;
return __chk(M._swig_casadi_Opti_subject_to_4(__unwrap(this)));
}
default: throw new Error(`Opti.subject_to: no overload for ${args.length} args`);
}
}
type_name() {
return (()=>{const __p=__chk(M._swig_casadi_Opti_type_name_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
copy() {
return __from_handle(__chk(M._swig_casadi_Opti_copy_0(__unwrap(this))));
}
set_domain(a0, a1) {
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_Opti_set_domain_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __ps2));
M._free(__ps2);
return __r;
}
user_dict(a0) {
return M.__swig_release_handle(__chk(M._swig_casadi_Opti_user_dict_0(__unwrap(this), __unwrap(__coerce(a0, MX)))));
}
x_linear_scale_offset() {
return __from_handle(__chk(M._swig_casadi_Opti_x_linear_scale_offset_0(__unwrap(this))));
}
set_linear_scale(...args) {
switch (args.length) {
case 2: {
const [a0, a1] = args;
const a2 = 0;
return __chk(M._swig_casadi_Opti_set_linear_scale_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM))));
}
case 3: {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_Opti_set_linear_scale_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM))));
}
default: throw new Error(`Opti.set_linear_scale: no overload for ${args.length} args`);
}
}
ubg() {
return __from_handle(__chk(M._swig_casadi_Opti_ubg_0(__unwrap(this))));
}
to_function(...args) {
switch (args.length) {
case 3: {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new MXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Opti_to_function_0(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3), __unwrap(a3))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
case 4: {
if (typeof args[0] === 'string' && M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_MXVector(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new MXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Opti_to_function_0(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3), __unwrap(a3))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[1])) && M._swig_can_StringVector(__unwrap(args[2])) && M._swig_can_StringVector(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const a4 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new StringVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Opti_to_function_2(__unwrap(this), __ps1, __unwrap(a1), __unwrap(__vp3), __unwrap(__vp4), __unwrap(a4))));
M._free(__ps1);
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
throw new TypeError(`Opti.to_function: no overload matches arg types at arity 4`);
}
case 5: {
if (typeof args[0] === 'string' && M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_MXVector(__unwrap(args[2])) && M._swig_can_StringVector(__unwrap(args[3])) && M._swig_can_StringVector(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
const a5 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new MXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new StringVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new StringVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Opti_to_function_1(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3), __unwrap(__vp4), __unwrap(__vp5), __unwrap(a5))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
if (__vown5 && __vp5.delete) __vp5.delete();
return __r;
}
if (typeof args[0] === 'string' && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[1])) && M._swig_can_StringVector(__unwrap(args[2])) && M._swig_can_StringVector(__unwrap(args[3])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new StringVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new StringVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Opti_to_function_2(__unwrap(this), __ps1, __unwrap(a1), __unwrap(__vp3), __unwrap(__vp4), __unwrap(a4))));
M._free(__ps1);
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
throw new TypeError(`Opti.to_function: no overload matches arg types at arity 5`);
}
case 6: {
const [a0, a1, a2, a3, a4, a5] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new MXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new StringVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new StringVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Opti_to_function_1(__unwrap(this), __ps1, __unwrap(__vp2), __unwrap(__vp3), __unwrap(__vp4), __unwrap(__vp5), __unwrap(a5))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
if (__vown5 && __vp5.delete) __vp5.delete();
return __r;
}
default: throw new Error(`Opti.to_function: no overload for ${args.length} args`);
}
}
initial() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Opti_initial_0(__unwrap(this)))));
}
scale_helper(a0) {
return __from_handle(__chk(M._swig_casadi_Opti_scale_helper_0(__unwrap(this), __unwrap(a0))));
}
ng() {
return __chk(M._swig_casadi_Opti_ng_0(__unwrap(this)));
}
advanced() {
return __from_handle(__chk(M._swig_casadi_Opti_advanced_0(__unwrap(this))));
}
np() {
return __chk(M._swig_casadi_Opti_np_0(__unwrap(this)));
}
nx() {
return __chk(M._swig_casadi_Opti_nx_0(__unwrap(this)));
}
parameter(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = 1n;
const a2 = "full";
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Opti_parameter_0(__unwrap(this), BigInt(a0), BigInt(a1), __ps3)));
M._free(__ps3);
return __r;
}
if (M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
const a1 = "full";
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Opti_parameter_1(__unwrap(this), __unwrap(a0), __ps2)));
M._free(__ps2);
return __r;
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = "full";
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Opti_parameter_2(__unwrap(this), __unwrap(__coerce(a0, MX)), __ps2)));
M._free(__ps2);
return __r;
}
throw new TypeError(`Opti.parameter: no overload matches arg types at arity 1`);
}
case 2: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = "full";
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Opti_parameter_0(__unwrap(this), BigInt(a0), BigInt(a1), __ps3)));
M._free(__ps3);
return __r;
}
if (M._swig_can_Sparsity(__unwrap(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Opti_parameter_1(__unwrap(this), __unwrap(a0), __ps2)));
M._free(__ps2);
return __r;
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Opti_parameter_2(__unwrap(this), __unwrap(__coerce(a0, MX)), __ps2)));
M._free(__ps2);
return __r;
}
throw new TypeError(`Opti.parameter: no overload matches arg types at arity 2`);
}
case 3: {
const [a0, a1, a2] = args;
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Opti_parameter_0(__unwrap(this), BigInt(a0), BigInt(a1), __ps3)));
M._free(__ps3);
return __r;
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = 1n;
const a2 = "full";
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Opti_parameter_0(__unwrap(this), BigInt(a0), BigInt(a1), __ps3)));
M._free(__ps3);
return __r;
}
default: throw new Error(`Opti.parameter: no overload for ${args.length} args`);
}
}
dual(a0) {
return __from_handle(__chk(M._swig_casadi_Opti_dual_0(__unwrap(this), __unwrap(__coerce(a0, MX)))));
}
f_linear_scale() {
return __chk(M._swig_casadi_Opti_f_linear_scale_0(__unwrap(this)));
}
update_user_dict(...args) {
switch (args.length) {
case 2: {
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return __chk(M._swig_casadi_Opti_update_user_dict_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(a1)));
}
if (M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_Opti_update_user_dict_1(__unwrap(this), __unwrap(__vp1), __unwrap(a1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`Opti.update_user_dict: no overload matches arg types at arity 2`);
}
default: throw new Error(`Opti.update_user_dict: no overload for ${args.length} args`);
}
}
set_value(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_Opti_set_value_1(__unwrap(this), __unwrap(__vp1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
case 2: {
const [a0, a1] = args;
return __chk(M._swig_casadi_Opti_set_value_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, DM))));
}
default: throw new Error(`Opti.set_value: no overload for ${args.length} args`);
}
}
debug() {
return __from_handle(__chk(M._swig_casadi_Opti_debug_0(__unwrap(this))));
}
x_linear_scale() {
return __from_handle(__chk(M._swig_casadi_Opti_x_linear_scale_0(__unwrap(this))));
}
solver(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
const a2 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Opti_solver_0(__unwrap(this), __ps1, __unwrap(a1), __unwrap(a2)));
M._free(__ps1);
return __r;
}
case 2: {
const [a0, a1] = args;
const a2 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Opti_solver_0(__unwrap(this), __ps1, __unwrap(a1), __unwrap(a2)));
M._free(__ps1);
return __r;
}
case 3: {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Opti_solver_0(__unwrap(this), __ps1, __unwrap(a1), __unwrap(a2)));
M._free(__ps1);
return __r;
}
default: throw new Error(`Opti.solver: no overload for ${args.length} args`);
}
}
g_linear_scale() {
return __from_handle(__chk(M._swig_casadi_Opti_g_linear_scale_0(__unwrap(this))));
}
variable(...args) {
switch (args.length) {
case 1: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = 1n;
const a2 = "full";
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Opti_variable_0(__unwrap(this), BigInt(a0), BigInt(a1), __ps3)));
M._free(__ps3);
return __r;
}
if (M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
const a1 = "full";
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Opti_variable_1(__unwrap(this), __unwrap(a0), __ps2)));
M._free(__ps2);
return __r;
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = "full";
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Opti_variable_2(__unwrap(this), __unwrap(__coerce(a0, MX)), __ps2)));
M._free(__ps2);
return __r;
}
throw new TypeError(`Opti.variable: no overload matches arg types at arity 1`);
}
case 2: {
if ((typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = "full";
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Opti_variable_0(__unwrap(this), BigInt(a0), BigInt(a1), __ps3)));
M._free(__ps3);
return __r;
}
if (M._swig_can_Sparsity(__unwrap(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Opti_variable_1(__unwrap(this), __unwrap(a0), __ps2)));
M._free(__ps2);
return __r;
}
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Opti_variable_2(__unwrap(this), __unwrap(__coerce(a0, MX)), __ps2)));
M._free(__ps2);
return __r;
}
throw new TypeError(`Opti.variable: no overload matches arg types at arity 2`);
}
case 3: {
const [a0, a1, a2] = args;
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Opti_variable_0(__unwrap(this), BigInt(a0), BigInt(a1), __ps3)));
M._free(__ps3);
return __r;
}
case 0: {
const [] = args;
const a0 = 1n;
const a1 = 1n;
const a2 = "full";
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_Opti_variable_0(__unwrap(this), BigInt(a0), BigInt(a1), __ps3)));
M._free(__ps3);
return __r;
}
default: throw new Error(`Opti.variable: no overload for ${args.length} args`);
}
}
value(...args) {
switch (args.length) {
case 1: {
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = [];
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Opti_value_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(__vp2))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = [];
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Opti_value_1(__unwrap(this), __unwrap(__coerce(a0, DM)), __unwrap(__vp2))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if ((M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = [];
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Opti_value_2(__unwrap(this), __unwrap(__coerce(a0, SX)), __unwrap(__vp2))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`Opti.value: no overload matches arg types at arity 1`);
}
case 2: {
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_MXVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Opti_value_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(__vp2))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_MXVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Opti_value_1(__unwrap(this), __unwrap(__coerce(a0, DM)), __unwrap(__vp2))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if ((M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_MXVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_Opti_value_2(__unwrap(this), __unwrap(__coerce(a0, SX)), __unwrap(__vp2))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`Opti.value: no overload matches arg types at arity 2`);
}
default: throw new Error(`Opti.value: no overload for ${args.length} args`);
}
}
lbg() {
return __from_handle(__chk(M._swig_casadi_Opti_lbg_0(__unwrap(this))));
}
value_variables() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Opti_value_variables_0(__unwrap(this)))));
}
lam_g() {
return __from_handle(__chk(M._swig_casadi_Opti_lam_g_0(__unwrap(this))));
}
callback_class(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_Opti_callback_class_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
return __chk(M._swig_casadi_Opti_callback_class_1(__unwrap(this)));
}
default: throw new Error(`Opti.callback_class: no overload for ${args.length} args`);
}
}
value_parameters() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_Opti_value_parameters_0(__unwrap(this)))));
}
set_initial(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_Opti_set_initial_1(__unwrap(this), __unwrap(__vp1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
case 2: {
const [a0, a1] = args;
return __chk(M._swig_casadi_Opti_set_initial_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, DM))));
}
default: throw new Error(`Opti.set_initial: no overload for ${args.length} args`);
}
}
}
Opti.prototype._swig_type = '_p_casadi__Opti';
if (!Object.prototype.hasOwnProperty.call(Opti.prototype, 'toString'))
Opti.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
Opti.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
__mixin(Opti, SharedObject);
const __fr_casadi_IndexAbstraction = new FinalizationRegistry(p => M._swig_casadi_IndexAbstraction_delete(p));
class IndexAbstraction {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_casadi_IndexAbstraction.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_IndexAbstraction(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_IndexAbstraction_new_1(__unwrap(args[0]))); break; }
throw new TypeError(`IndexAbstraction: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_IndexAbstraction_new_0()); break;
}
default: throw new Error(`IndexAbstraction: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_casadi_IndexAbstraction.register(this, __ptr, this);
}
get start() { return M._swig_casadi_IndexAbstraction_start_get(this._ptr); }
set start(v) { M._swig_casadi_IndexAbstraction_start_set(this._ptr, v); }
get stop() { return M._swig_casadi_IndexAbstraction_stop_get(this._ptr); }
set stop(v) { M._swig_casadi_IndexAbstraction_stop_set(this._ptr, v); }
delete() {
if (this._ptr === 0) return;
__fr_casadi_IndexAbstraction.unregister(this);
M._swig_casadi_IndexAbstraction_delete(this._ptr);
this._ptr = 0;
}
}
IndexAbstraction.prototype._swig_type = '_p_casadi__IndexAbstraction';
if (!Object.prototype.hasOwnProperty.call(IndexAbstraction.prototype, 'toString'))
IndexAbstraction.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
IndexAbstraction.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_MetaCon = new FinalizationRegistry(p => M._swig_casadi_MetaCon_delete(p));
class MetaCon extends IndexAbstraction {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_MetaCon.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_MetaCon(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_MetaCon_new_1(__unwrap(args[0]))); break; }
throw new TypeError(`MetaCon: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_MetaCon_new_0()); break;
}
default: throw new Error(`MetaCon: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_MetaCon.register(this, __ptr, this);
}
get original() { return M._swig_casadi_MetaCon_original_get(this._ptr); }
set original(v) { M._swig_casadi_MetaCon_original_set(this._ptr, v); }
get canon() { return M._swig_casadi_MetaCon_canon_get(this._ptr); }
set canon(v) { M._swig_casadi_MetaCon_canon_set(this._ptr, v); }
get type() { return M._swig_casadi_MetaCon_type_get(this._ptr); }
set type(v) { M._swig_casadi_MetaCon_type_set(this._ptr, v); }
get lb() { return M._swig_casadi_MetaCon_lb_get(this._ptr); }
set lb(v) { M._swig_casadi_MetaCon_lb_set(this._ptr, v); }
get ub() { return M._swig_casadi_MetaCon_ub_get(this._ptr); }
set ub(v) { M._swig_casadi_MetaCon_ub_set(this._ptr, v); }
get n() { return M._swig_casadi_MetaCon_n_get(this._ptr); }
set n(v) { M._swig_casadi_MetaCon_n_set(this._ptr, v); }
get flipped() { return M._swig_casadi_MetaCon_flipped_get(this._ptr); }
set flipped(v) { M._swig_casadi_MetaCon_flipped_set(this._ptr, v); }
get dual_canon() { return M._swig_casadi_MetaCon_dual_canon_get(this._ptr); }
set dual_canon(v) { M._swig_casadi_MetaCon_dual_canon_set(this._ptr, v); }
get dual() { return M._swig_casadi_MetaCon_dual_get(this._ptr); }
set dual(v) { M._swig_casadi_MetaCon_dual_set(this._ptr, v); }
get extra() { return M._swig_casadi_MetaCon_extra_get(this._ptr); }
set extra(v) { M._swig_casadi_MetaCon_extra_set(this._ptr, v); }
get linear_scale() { return M._swig_casadi_MetaCon_linear_scale_get(this._ptr); }
set linear_scale(v) { M._swig_casadi_MetaCon_linear_scale_set(this._ptr, v); }
delete() {
if (this._ptr === 0) return;
__fr_casadi_MetaCon.unregister(this);
M._swig_casadi_MetaCon_delete(this._ptr);
this._ptr = 0;
}
}
MetaCon.prototype._swig_type = '_p_casadi__MetaCon';
if (!Object.prototype.hasOwnProperty.call(MetaCon.prototype, 'toString'))
MetaCon.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
MetaCon.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_MetaVar = new FinalizationRegistry(p => M._swig_casadi_MetaVar_delete(p));
class MetaVar extends IndexAbstraction {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_MetaVar.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_MetaVar(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_MetaVar_new_1(__unwrap(args[0]))); break; }
throw new TypeError(`MetaVar: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_MetaVar_new_0()); break;
}
default: throw new Error(`MetaVar: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_MetaVar.register(this, __ptr, this);
}
get attribute() { const __p=M._swig_casadi_MetaVar_attribute_get(this._ptr); const __s=M.UTF8ToString(__p); M._free(__p); return __s; }
set attribute(v) {
const __n = M.lengthBytesUTF8(v); const __p = M._malloc(__n+1);
M.stringToUTF8(v, __p, __n+1); M._swig_casadi_MetaVar_attribute_set(this._ptr, __p); M._free(__p);
}
get n() { return M._swig_casadi_MetaVar_n_get(this._ptr); }
set n(v) { M._swig_casadi_MetaVar_n_set(this._ptr, v); }
get m() { return M._swig_casadi_MetaVar_m_get(this._ptr); }
set m(v) { M._swig_casadi_MetaVar_m_set(this._ptr, v); }
get type() { return M._swig_casadi_MetaVar_type_get(this._ptr); }
set type(v) { M._swig_casadi_MetaVar_type_set(this._ptr, v); }
get domain() { return M._swig_casadi_MetaVar_domain_get(this._ptr); }
set domain(v) { M._swig_casadi_MetaVar_domain_set(this._ptr, v); }
get count() { return M._swig_casadi_MetaVar_count_get(this._ptr); }
set count(v) { M._swig_casadi_MetaVar_count_set(this._ptr, v); }
get i() { return M._swig_casadi_MetaVar_i_get(this._ptr); }
set i(v) { M._swig_casadi_MetaVar_i_set(this._ptr, v); }
get active_i() { return M._swig_casadi_MetaVar_active_i_get(this._ptr); }
set active_i(v) { M._swig_casadi_MetaVar_active_i_set(this._ptr, v); }
get extra() { return M._swig_casadi_MetaVar_extra_get(this._ptr); }
set extra(v) { M._swig_casadi_MetaVar_extra_set(this._ptr, v); }
delete() {
if (this._ptr === 0) return;
__fr_casadi_MetaVar.unregister(this);
M._swig_casadi_MetaVar_delete(this._ptr);
this._ptr = 0;
}
}
MetaVar.prototype._swig_type = '_p_casadi__MetaVar';
if (!Object.prototype.hasOwnProperty.call(MetaVar.prototype, 'toString'))
MetaVar.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
MetaVar.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_OptiCallback = new FinalizationRegistry(p => M._swig_casadi_OptiCallback_delete(p));
class OptiCallback {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { this._ptr = args[1]; if (args[2]) __fr_casadi_OptiCallback.register(this, args[1], this); return; }
if (new.target !== OptiCallback) {
const __h = M.__swig_take_handle(this);
const __dptr = M._swig_new_SwigDirector_OptiCallback(__h);
this._ptr = __dptr;
__fr_casadi_OptiCallback.register(this, __dptr, this);
return;
}
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_OptiCallback(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_OptiCallback_new_1(__unwrap(args[0]))); break; }
throw new TypeError(`OptiCallback: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_OptiCallback_new_0()); break;
}
default: throw new Error(`OptiCallback: no ctor for ${args.length} args`);
}
this._ptr = __ptr;
__fr_casadi_OptiCallback.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_OptiCallback.unregister(this);
M._swig_casadi_OptiCallback_delete(this._ptr);
this._ptr = 0;
}
call(a0) {
return __chk(M._swig_casadi_OptiCallback_call_0(__unwrap(this), BigInt(a0)));
}
}
OptiCallback.prototype._swig_type = '_p_casadi__OptiCallback';
if (!Object.prototype.hasOwnProperty.call(OptiCallback.prototype, 'toString'))
OptiCallback.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
OptiCallback.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_OptiAdvanced = new FinalizationRegistry(p => M._swig_casadi_OptiAdvanced_delete(p));
class OptiAdvanced extends Opti {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_OptiAdvanced.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_Opti(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_OptiAdvanced_new_0(__unwrap(args[0]))); break; }
if (M._swig_can_OptiAdvanced(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_OptiAdvanced_new_1(__unwrap(args[0]))); break; }
throw new TypeError(`OptiAdvanced: arg-type mismatch at length 1`);
}
default: throw new Error(`OptiAdvanced: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_OptiAdvanced.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_OptiAdvanced.unregister(this);
M._swig_casadi_OptiAdvanced_delete(this._ptr);
this._ptr = 0;
}
get problem_dirty_() { return M._swig_casadi_OptiAdvanced_problem_dirty__get(this._ptr); }
set problem_dirty_(v) { M._swig_casadi_OptiAdvanced_problem_dirty__set(this._ptr, v); }
get solver_dirty_() { return M._swig_casadi_OptiAdvanced_solver_dirty__get(this._ptr); }
set solver_dirty_(v) { M._swig_casadi_OptiAdvanced_solver_dirty__set(this._ptr, v); }
get solved_() { return M._swig_casadi_OptiAdvanced_solved__get(this._ptr); }
set solved_(v) { M._swig_casadi_OptiAdvanced_solved__set(this._ptr, v); }
get_meta(a0) {
return __from_handle(__chk(M._swig_casadi_OptiAdvanced_get_meta_0(__unwrap(this), __unwrap(__coerce(a0, MX)))));
}
assert_empty() {
return __chk(M._swig_casadi_OptiAdvanced_assert_empty_0(__unwrap(this)));
}
solver_dirty() {
return (!!(__chk(M._swig_casadi_OptiAdvanced_solver_dirty_0(__unwrap(this)))));
}
g_describe(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
return (()=>{const __p=__chk(M._swig_casadi_OptiAdvanced_g_describe_0(__unwrap(this), BigInt(a0), __unwrap(a1)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 2: {
const [a0, a1] = args;
return (()=>{const __p=__chk(M._swig_casadi_OptiAdvanced_g_describe_0(__unwrap(this), BigInt(a0), __unwrap(a1)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`OptiAdvanced.g_describe: no overload for ${args.length} args`);
}
}
mark_problem_dirty(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_OptiAdvanced_mark_problem_dirty_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = true;
return __chk(M._swig_casadi_OptiAdvanced_mark_problem_dirty_0(__unwrap(this), a0));
}
default: throw new Error(`OptiAdvanced.mark_problem_dirty: no overload for ${args.length} args`);
}
}
g_index_reduce_g(a0) {
return __chk(M._swig_casadi_OptiAdvanced_g_index_reduce_g_0(__unwrap(this), BigInt(a0)));
}
instance_number() {
return __chk(M._swig_casadi_OptiAdvanced_instance_number_0(__unwrap(this)));
}
solve_prepare() {
return __chk(M._swig_casadi_OptiAdvanced_solve_prepare_0(__unwrap(this)));
}
g_index_reduce_x(a0) {
return __chk(M._swig_casadi_OptiAdvanced_g_index_reduce_x_0(__unwrap(this), BigInt(a0)));
}
res(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_OptiAdvanced_res_0(__unwrap(this), __unwrap(a0)));
}
case 0: {
const [] = args;
return M.__swig_release_handle(__chk(M._swig_casadi_OptiAdvanced_res_1(__unwrap(this))));
}
default: throw new Error(`OptiAdvanced.res: no overload for ${args.length} args`);
}
}
baked_copy() {
return __from_handle(__chk(M._swig_casadi_OptiAdvanced_baked_copy_0(__unwrap(this))));
}
set_meta(a0, a1) {
return __chk(M._swig_casadi_OptiAdvanced_set_meta_0(__unwrap(this), __unwrap(__coerce(a0, MX)), a1));
}
show_infeasibilities(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
return __chk(M._swig_casadi_OptiAdvanced_show_infeasibilities_0(__unwrap(this), a0, __unwrap(a1)));
}
case 2: {
const [a0, a1] = args;
return __chk(M._swig_casadi_OptiAdvanced_show_infeasibilities_0(__unwrap(this), a0, __unwrap(a1)));
}
case 0: {
const [] = args;
const a0 = 0;
const a1 = {};
return __chk(M._swig_casadi_OptiAdvanced_show_infeasibilities_0(__unwrap(this), a0, __unwrap(a1)));
}
default: throw new Error(`OptiAdvanced.show_infeasibilities: no overload for ${args.length} args`);
}
}
assert_solved() {
return __chk(M._swig_casadi_OptiAdvanced_assert_solved_0(__unwrap(this)));
}
bake() {
return __chk(M._swig_casadi_OptiAdvanced_bake_0(__unwrap(this)));
}
assert_active_symbol(a0) {
return __chk(M._swig_casadi_OptiAdvanced_assert_active_symbol_0(__unwrap(this), __unwrap(__coerce(a0, MX))));
}
solved() {
return (!!(__chk(M._swig_casadi_OptiAdvanced_solved_0(__unwrap(this)))));
}
arg() {
return M.__swig_release_handle(__chk(M._swig_casadi_OptiAdvanced_arg_0(__unwrap(this))));
}
solver() {
return __from_handle(__chk(M._swig_casadi_OptiAdvanced_casadi_solver_0(__unwrap(this))));
}
g_index_unreduce_g(a0) {
return __chk(M._swig_casadi_OptiAdvanced_g_index_unreduce_g_0(__unwrap(this), BigInt(a0)));
}
mark_solver_dirty(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_OptiAdvanced_mark_solver_dirty_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = true;
return __chk(M._swig_casadi_OptiAdvanced_mark_solver_dirty_0(__unwrap(this), a0));
}
default: throw new Error(`OptiAdvanced.mark_solver_dirty: no overload for ${args.length} args`);
}
}
canon_expr(a0) {
return __from_handle(__chk(M._swig_casadi_OptiAdvanced_canon_expr_0(__unwrap(this), __unwrap(__coerce(a0, MX)))));
}
is_parametric(a0) {
return (!!(__chk(M._swig_casadi_OptiAdvanced_is_parametric_0(__unwrap(this), __unwrap(__coerce(a0, MX))))));
}
mark_solved(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_OptiAdvanced_mark_solved_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = true;
return __chk(M._swig_casadi_OptiAdvanced_mark_solved_0(__unwrap(this), a0));
}
default: throw new Error(`OptiAdvanced.mark_solved: no overload for ${args.length} args`);
}
}
g_lookup(a0) {
return __from_handle(__chk(M._swig_casadi_OptiAdvanced_g_lookup_0(__unwrap(this), BigInt(a0))));
}
get_meta_con(a0) {
return __from_handle(__chk(M._swig_casadi_OptiAdvanced_get_meta_con_0(__unwrap(this), __unwrap(__coerce(a0, MX)))));
}
set_meta_con(a0, a1) {
return __chk(M._swig_casadi_OptiAdvanced_set_meta_con_0(__unwrap(this), __unwrap(__coerce(a0, MX)), a1));
}
describe(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = 0n;
const a2 = {};
return (()=>{const __p=__chk(M._swig_casadi_OptiAdvanced_describe_0(__unwrap(this), __unwrap(__coerce(a0, MX)), BigInt(a1), __unwrap(a2)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 2: {
const [a0, a1] = args;
const a2 = {};
return (()=>{const __p=__chk(M._swig_casadi_OptiAdvanced_describe_0(__unwrap(this), __unwrap(__coerce(a0, MX)), BigInt(a1), __unwrap(a2)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 3: {
const [a0, a1, a2] = args;
return (()=>{const __p=__chk(M._swig_casadi_OptiAdvanced_describe_0(__unwrap(this), __unwrap(__coerce(a0, MX)), BigInt(a1), __unwrap(a2)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`OptiAdvanced.describe: no overload for ${args.length} args`);
}
}
objective() {
return __from_handle(__chk(M._swig_casadi_OptiAdvanced_objective_0(__unwrap(this))));
}
problem_dirty() {
return (!!(__chk(M._swig_casadi_OptiAdvanced_problem_dirty_0(__unwrap(this)))));
}
solve_actual(a0) {
return M.__swig_release_handle(__chk(M._swig_casadi_OptiAdvanced_solve_actual_0(__unwrap(this), __unwrap(a0))));
}
x_lookup(a0) {
return __from_handle(__chk(M._swig_casadi_OptiAdvanced_x_lookup_0(__unwrap(this), BigInt(a0))));
}
active_values(a0) {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_OptiAdvanced_active_values_0(__unwrap(this), a0))));
}
constraints() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_OptiAdvanced_constraints_0(__unwrap(this)))));
}
x_describe(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
const a1 = {};
return (()=>{const __p=__chk(M._swig_casadi_OptiAdvanced_x_describe_0(__unwrap(this), BigInt(a0), __unwrap(a1)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 2: {
const [a0, a1] = args;
return (()=>{const __p=__chk(M._swig_casadi_OptiAdvanced_x_describe_0(__unwrap(this), BigInt(a0), __unwrap(a1)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`OptiAdvanced.x_describe: no overload for ${args.length} args`);
}
}
symvar(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_OptiAdvanced_symvar_1(__unwrap(this), __unwrap(__coerce(a0, MX))))));
}
case 2: {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_OptiAdvanced_symvar_2(__unwrap(this), __unwrap(__coerce(a0, MX)), a1))));
}
case 0: {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_OptiAdvanced_symvar_0(__unwrap(this)))));
}
default: throw new Error(`OptiAdvanced.symvar: no overload for ${args.length} args`);
}
}
assert_baked() {
return __chk(M._swig_casadi_OptiAdvanced_assert_baked_0(__unwrap(this)));
}
active_symvar(a0) {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_OptiAdvanced_active_symvar_0(__unwrap(this), a0))));
}
}
OptiAdvanced.prototype._swig_type = '_p_casadi__OptiAdvanced';
if (!Object.prototype.hasOwnProperty.call(OptiAdvanced.prototype, 'toString'))
OptiAdvanced.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
OptiAdvanced.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_OptiSol = new FinalizationRegistry(p => M._swig_casadi_OptiSol_delete(p));
class OptiSol extends PrintableCommon {
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_OptiSol.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if (M._swig_can_OptiSol(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_OptiSol_new_0(__unwrap(args[0]))); break; }
throw new TypeError(`OptiSol: arg-type mismatch at length 1`);
}
default: throw new Error(`OptiSol: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_OptiSol.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_OptiSol.unregister(this);
M._swig_casadi_OptiSol_delete(this._ptr);
this._ptr = 0;
}
stats() {
return M.__swig_release_handle(__chk(M._swig_casadi_OptiSol_stats_0(__unwrap(this))));
}
str(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_OptiSol_get_str_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
case 0: {
const [] = args;
const a0 = false;
return (()=>{const __p=__chk(M._swig_casadi_OptiSol_get_str_0(__unwrap(this), a0));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
default: throw new Error(`OptiSol.str: no overload for ${args.length} args`);
}
}
type_name() {
return (()=>{const __p=__chk(M._swig_casadi_OptiSol_type_name_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
value_variables() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_OptiSol_value_variables_0(__unwrap(this)))));
}
opti() {
return __from_handle(__chk(M._swig_casadi_OptiSol_opti_0(__unwrap(this))));
}
value_parameters() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_OptiSol_value_parameters_0(__unwrap(this)))));
}
disp(...args) {
switch (args.length) {
case 1: {
const [a0] = args;
return __chk(M._swig_casadi_OptiSol_disp_0(__unwrap(this), a0));
}
case 0: {
const [] = args;
const a0 = false;
return __chk(M._swig_casadi_OptiSol_disp_0(__unwrap(this), a0));
}
default: throw new Error(`OptiSol.disp: no overload for ${args.length} args`);
}
}
value(...args) {
switch (args.length) {
case 1: {
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = [];
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_OptiSol_value_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(__vp2))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = [];
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_OptiSol_value_1(__unwrap(this), __unwrap(__coerce(a0, DM)), __unwrap(__vp2))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if ((M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = [];
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_OptiSol_value_2(__unwrap(this), __unwrap(__coerce(a0, SX)), __unwrap(__vp2))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`OptiSol.value: no overload matches arg types at arity 1`);
}
case 2: {
if ((M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_MXVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_OptiSol_value_0(__unwrap(this), __unwrap(__coerce(a0, MX)), __unwrap(__vp2))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if ((M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_MXVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_OptiSol_value_1(__unwrap(this), __unwrap(__coerce(a0, DM)), __unwrap(__vp2))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if ((M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_MXVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_OptiSol_value_2(__unwrap(this), __unwrap(__coerce(a0, SX)), __unwrap(__vp2))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`OptiSol.value: no overload matches arg types at arity 2`);
}
default: throw new Error(`OptiSol.value: no overload for ${args.length} args`);
}
}
}
OptiSol.prototype._swig_type = '_p_casadi__OptiSol';
if (!Object.prototype.hasOwnProperty.call(OptiSol.prototype, 'toString'))
OptiSol.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
OptiSol.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
const __fr_casadi_Resource = new FinalizationRegistry(p => M._swig_casadi_Resource_delete(p));
class Resource extends SharedObject {
static deserialize(a0) {
return __from_handle(__chk(M._swig_casadi_Resource_static_deserialize_0(a0)));
}
static test_cast(a0) {
return (!!(__chk(M._swig_casadi_Resource_static_test_cast_0(a0))));
}
static type_name() {
return (()=>{const __p=__chk(M._swig_casadi_Resource_static_type_name_0());const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
constructor(...args) {
if (args[0] === __PRIVATE_CTOR) { super(__PRIVATE_CTOR, args[1], 0); if (args[2]) __fr_casadi_Resource.register(this, args[1], this); return; }
let __ptr;
switch (args.length) {
case 1: {
if ((typeof args[0] === 'string')) {
const __nps0 = M.lengthBytesUTF8(args[0]);
const __ps0 = M._malloc(__nps0 + 1);
M.stringToUTF8(args[0], __ps0, __nps0 + 1);
__ptr = __chk(M._swig_casadi_Resource_new_0(__ps0));
M._free(__ps0);
break;
}
if (M._swig_can_Resource(__unwrap(args[0]))) { __ptr = __chk(M._swig_casadi_Resource_new_2(__unwrap(args[0]))); break; }
throw new TypeError(`Resource: arg-type mismatch at length 1`);
}
case 0: {
__ptr = __chk(M._swig_casadi_Resource_new_1()); break;
}
default: throw new Error(`Resource: no ctor for ${args.length} args`);
}
super(__PRIVATE_CTOR, __ptr);
__fr_casadi_Resource.register(this, __ptr, this);
}
delete() {
if (this._ptr === 0) return;
__fr_casadi_Resource.unregister(this);
M._swig_casadi_Resource_delete(this._ptr);
this._ptr = 0;
}
serialize(a0) {
return __chk(M._swig_casadi_Resource_serialize_0(__unwrap(this), a0));
}
change_option(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_Resource_change_option_0(__unwrap(this), __ps1, __unwrap(a1)));
M._free(__ps1);
return __r;
}
path() {
return (()=>{const __p=__chk(M._swig_casadi_Resource_path_0(__unwrap(this)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
}
Resource.prototype._swig_type = '_p_casadi__Resource';
if (!Object.prototype.hasOwnProperty.call(Resource.prototype, 'toString'))
Resource.prototype.toString = function () { return (typeof this.str === 'function') ? this.str() : Object.prototype.toString.call(this); };
Resource.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () { return this.toString(); };
__mixin(Resource, PrintableCommon);
M.__base_proto_Callback = Callback.prototype;
M.__base_proto_OptiCallback = OptiCallback.prototype;
M.__wrap_FileSerializer = (p, owns) => new FileSerializer(__PRIVATE_CTOR, p, owns);
M.__wrap_OptiCallback = (p, owns) => new OptiCallback(__PRIVATE_CTOR, p, owns);
M.__wrap_StringSerializer = (p, owns) => new StringSerializer(__PRIVATE_CTOR, p, owns);
M.__wrap_MetaVar = (p, owns) => new MetaVar(__PRIVATE_CTOR, p, owns);
M.__wrap_XmlFile = (p, owns) => new XmlFile(__PRIVATE_CTOR, p, owns);
M.__wrap_CasadiMeta = (p, owns) => new CasadiMeta(__PRIVATE_CTOR, p, owns);
M.__wrap_SXElem = (p, owns) => new SXElem(__PRIVATE_CTOR, p, owns);
M.__wrap_MatrixCommon = (p, owns) => new MatrixCommon(__PRIVATE_CTOR, p, owns);
M.__wrap_DaeBuilder = (p, owns) => new DaeBuilder(__PRIVATE_CTOR, p, owns);
M.__wrap_OptiAdvanced = (p, owns) => new OptiAdvanced(__PRIVATE_CTOR, p, owns);
M.__wrap_PrintableCommon = (p, owns) => new PrintableCommon(__PRIVATE_CTOR, p, owns);
M.__wrap_WeakRef = (p, owns) => new WeakRef(__PRIVATE_CTOR, p, owns);
M.__wrap_GenericMatrixCommon = (p, owns) => new GenericMatrixCommon(__PRIVATE_CTOR, p, owns);
M.__wrap_GenericType = (p, owns) => new GenericType(__PRIVATE_CTOR, p, owns);
M.__wrap_Importer = (p, owns) => new Importer(__PRIVATE_CTOR, p, owns);
M.__wrap_SparsityInterfaceCommon = (p, owns) => new SparsityInterfaceCommon(__PRIVATE_CTOR, p, owns);
M.__wrap_GenSharedObject = (p, owns) => new GenSharedObject(__PRIVATE_CTOR, p, owns);
M.__wrap_Function = (p, owns) => new Function(__PRIVATE_CTOR, p, owns);
M.__wrap_FileSerializer = (p, owns) => new FileSerializer(__PRIVATE_CTOR, p, owns);
M.__wrap_DeserializerBase = (p, owns) => new DeserializerBase(__PRIVATE_CTOR, p, owns);
M.__wrap_GenDM = (p, owns) => new GenDM(__PRIVATE_CTOR, p, owns);
M.__wrap_IndexAbstraction = (p, owns) => new IndexAbstraction(__PRIVATE_CTOR, p, owns);
M.__wrap_DaeBuilder = (p, owns) => new DaeBuilder(__PRIVATE_CTOR, p, owns);
M.__wrap_CasadiMeta = (p, owns) => new CasadiMeta(__PRIVATE_CTOR, p, owns);
M.__wrap_StringDeserializer = (p, owns) => new StringDeserializer(__PRIVATE_CTOR, p, owns);
M.__wrap_SparsityInterfaceCommon = (p, owns) => new SparsityInterfaceCommon(__PRIVATE_CTOR, p, owns);
M.__wrap_MX = (p, owns) => __mkIndex(new MX(__PRIVATE_CTOR, p, owns));
M.__wrap_GenSX = (p, owns) => new GenSX(__PRIVATE_CTOR, p, owns);
M.__wrap_FileDeserializer = (p, owns) => new FileDeserializer(__PRIVATE_CTOR, p, owns);
M.__wrap_OptiSol = (p, owns) => new OptiSol(__PRIVATE_CTOR, p, owns);
M.__wrap_Opti = (p, owns) => new Opti(__PRIVATE_CTOR, p, owns);
M.__wrap_MetaCon = (p, owns) => new MetaCon(__PRIVATE_CTOR, p, owns);
M.__wrap_Sparsity = (p, owns) => new Sparsity(__PRIVATE_CTOR, p, owns);
M.__wrap_NlpBuilder = (p, owns) => new NlpBuilder(__PRIVATE_CTOR, p, owns);
M.__wrap_SXVector = (p, owns) => new SXVector(__PRIVATE_CTOR, p, owns);
M.__wrap_FunctionVector = (p, owns) => new FunctionVector(__PRIVATE_CTOR, p, owns);
M.__wrap_GenSX = (p, owns) => new GenSX(__PRIVATE_CTOR, p, owns);
M.__wrap_GenMX = (p, owns) => new GenMX(__PRIVATE_CTOR, p, owns);
M.__wrap_SerializerBase = (p, owns) => new SerializerBase(__PRIVATE_CTOR, p, owns);
M.__wrap_StringVector = (p, owns) => new StringVector(__PRIVATE_CTOR, p, owns);
M.__wrap_OptiCallback = (p, owns) => new OptiCallback(__PRIVATE_CTOR, p, owns);
M.__wrap_SharedObject = (p, owns) => new SharedObject(__PRIVATE_CTOR, p, owns);
M.__wrap_GenericType = (p, owns) => new GenericType(__PRIVATE_CTOR, p, owns);
M.__wrap_MetaVar = (p, owns) => new MetaVar(__PRIVATE_CTOR, p, owns);
M.__wrap_Linsol = (p, owns) => new Linsol(__PRIVATE_CTOR, p, owns);
M.__wrap_GenWeakRef = (p, owns) => new GenWeakRef(__PRIVATE_CTOR, p, owns);
M.__wrap_GlobalOptions = (p, owns) => new GlobalOptions(__PRIVATE_CTOR, p, owns);
M.__wrap_StringDeserializer = (p, owns) => new StringDeserializer(__PRIVATE_CTOR, p, owns);
M.__wrap_DM = (p, owns) => __mkIndex(new DM(__PRIVATE_CTOR, p, owns));
M.__wrap_Resource = (p, owns) => new Resource(__PRIVATE_CTOR, p, owns);
M.__wrap_PrintableCommon = (p, owns) => new PrintableCommon(__PRIVATE_CTOR, p, owns);
M.__wrap_StringSerializer = (p, owns) => new StringSerializer(__PRIVATE_CTOR, p, owns);
M.__wrap_OptiAdvanced = (p, owns) => new OptiAdvanced(__PRIVATE_CTOR, p, owns);
M.__wrap_WeakRef = (p, owns) => new WeakRef(__PRIVATE_CTOR, p, owns);
M.__wrap_Options = (p, owns) => new Options(__PRIVATE_CTOR, p, owns);
M.__wrap_GenDM = (p, owns) => new GenDM(__PRIVATE_CTOR, p, owns);
M.__wrap_NlpBuilder = (p, owns) => new NlpBuilder(__PRIVATE_CTOR, p, owns);
M.__wrap_Callback = (p, owns) => new Callback(__PRIVATE_CTOR, p, owns);
M.__wrap_Importer = (p, owns) => new Importer(__PRIVATE_CTOR, p, owns);
M.__wrap_GlobalOptions = (p, owns) => new GlobalOptions(__PRIVATE_CTOR, p, owns);
M.__wrap_SX = (p, owns) => __mkIndex(new SX(__PRIVATE_CTOR, p, owns));
M.__wrap_IntVector = (p, owns) => new IntVector(__PRIVATE_CTOR, p, owns);
M.__wrap_MX = (p, owns) => __mkIndex(new MX(__PRIVATE_CTOR, p, owns));
M.__wrap_SerializerBase = (p, owns) => new SerializerBase(__PRIVATE_CTOR, p, owns);
M.__wrap_XmlFile = (p, owns) => new XmlFile(__PRIVATE_CTOR, p, owns);
M.__wrap_MXVector = (p, owns) => new MXVector(__PRIVATE_CTOR, p, owns);
M.__wrap_MatrixCommon = (p, owns) => new MatrixCommon(__PRIVATE_CTOR, p, owns);
M.__wrap_Opti = (p, owns) => new Opti(__PRIVATE_CTOR, p, owns);
M.__wrap_DeserializerBase = (p, owns) => new DeserializerBase(__PRIVATE_CTOR, p, owns);
M.__wrap_IndexAbstraction = (p, owns) => new IndexAbstraction(__PRIVATE_CTOR, p, owns);
M.__wrap_Linsol = (p, owns) => new Linsol(__PRIVATE_CTOR, p, owns);
M.__wrap_Slice = (p, owns) => new Slice(__PRIVATE_CTOR, p, owns);
M.__wrap_SharedObject = (p, owns) => new SharedObject(__PRIVATE_CTOR, p, owns);
M.__wrap_GenWeakRef = (p, owns) => new GenWeakRef(__PRIVATE_CTOR, p, owns);
M.__wrap_CodeGenerator = (p, owns) => new CodeGenerator(__PRIVATE_CTOR, p, owns);
M.__wrap_StreamStateGuard = (p, owns) => new StreamStateGuard(__PRIVATE_CTOR, p, owns);
M.__wrap_GenMX = (p, owns) => new GenMX(__PRIVATE_CTOR, p, owns);
M.__wrap_Function = (p, owns) => new Function(__PRIVATE_CTOR, p, owns);
M.__wrap_FileDeserializer = (p, owns) => new FileDeserializer(__PRIVATE_CTOR, p, owns);
M.__wrap_SparsityVector = (p, owns) => new SparsityVector(__PRIVATE_CTOR, p, owns);
M.__wrap_Slice = (p, owns) => new Slice(__PRIVATE_CTOR, p, owns);
M.__wrap_GenSharedObject = (p, owns) => new GenSharedObject(__PRIVATE_CTOR, p, owns);
M.__wrap_GenericExpressionCommon = (p, owns) => new GenericExpressionCommon(__PRIVATE_CTOR, p, owns);
M.__wrap_Sparsity = (p, owns) => new Sparsity(__PRIVATE_CTOR, p, owns);
M.__wrap_Callback = (p, owns) => new Callback(__PRIVATE_CTOR, p, owns);
M.__wrap_SXElem = (p, owns) => new SXElem(__PRIVATE_CTOR, p, owns);
M.__wrap_GenericMatrixCommon = (p, owns) => new GenericMatrixCommon(__PRIVATE_CTOR, p, owns);
M.__wrap_CodeGenerator = (p, owns) => new CodeGenerator(__PRIVATE_CTOR, p, owns);
M.__wrap_DoubleVector = (p, owns) => new DoubleVector(__PRIVATE_CTOR, p, owns);
M.__wrap_DMVector = (p, owns) => new DMVector(__PRIVATE_CTOR, p, owns);
M.__wrap_OptiSol = (p, owns) => new OptiSol(__PRIVATE_CTOR, p, owns);
M.__wrap_GenericExpressionCommon = (p, owns) => new GenericExpressionCommon(__PRIVATE_CTOR, p, owns);
M.__wrap_Resource = (p, owns) => new Resource(__PRIVATE_CTOR, p, owns);
M.__wrap_MetaCon = (p, owns) => new MetaCon(__PRIVATE_CTOR, p, owns);
M.__wrap_Options = (p, owns) => new Options(__PRIVATE_CTOR, p, owns);
M.__wrap_StreamStateGuard = (p, owns) => new StreamStateGuard(__PRIVATE_CTOR, p, owns);
M.__wrap_DM = (p, owns) => __mkIndex(new DM(__PRIVATE_CTOR, p, owns));
M.__wrap_SX = (p, owns) => __mkIndex(new SX(__PRIVATE_CTOR, p, owns));
const __m = {
UnifiedReturnStatus: {
SOLVER_RET_SUCCESS: M._swig_enum_casadi_UnifiedReturnStatus_SOLVER_RET_SUCCESS(),
SOLVER_RET_UNKNOWN: M._swig_enum_casadi_UnifiedReturnStatus_SOLVER_RET_UNKNOWN(),
SOLVER_RET_LIMITED: M._swig_enum_casadi_UnifiedReturnStatus_SOLVER_RET_LIMITED(),
SOLVER_RET_NAN: M._swig_enum_casadi_UnifiedReturnStatus_SOLVER_RET_NAN(),
SOLVER_RET_INFEASIBLE: M._swig_enum_casadi_UnifiedReturnStatus_SOLVER_RET_INFEASIBLE(),
SOLVER_RET_EXCEPTION: M._swig_enum_casadi_UnifiedReturnStatus_SOLVER_RET_EXCEPTION(),
},
StringVector: new Proxy(StringVector, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
SparsityVector: new Proxy(SparsityVector, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
IntVector: new Proxy(IntVector, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
DoubleVector: new Proxy(DoubleVector, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
DMVector: new Proxy(DMVector, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
SXVector: new Proxy(SXVector, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
MXVector: new Proxy(MXVector, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
FunctionVector: new Proxy(FunctionVector, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
PrintableCommon: new Proxy(PrintableCommon, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
GenSharedObject: new Proxy(GenSharedObject, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
GenWeakRef: new Proxy(GenWeakRef, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
SharedObject: new Proxy(SharedObject, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
WeakRef: new Proxy(WeakRef, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
StreamStateGuard: new Proxy(StreamStateGuard, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
GenericType: new Proxy(GenericType, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
Operation: {
OP_ASSIGN: M._swig_enum_casadi_Operation_OP_ASSIGN(),
OP_ADD: M._swig_enum_casadi_Operation_OP_ADD(),
OP_SUB: M._swig_enum_casadi_Operation_OP_SUB(),
OP_MUL: M._swig_enum_casadi_Operation_OP_MUL(),
OP_DIV: M._swig_enum_casadi_Operation_OP_DIV(),
OP_NEG: M._swig_enum_casadi_Operation_OP_NEG(),
OP_EXP: M._swig_enum_casadi_Operation_OP_EXP(),
OP_LOG: M._swig_enum_casadi_Operation_OP_LOG(),
OP_POW: M._swig_enum_casadi_Operation_OP_POW(),
OP_CONSTPOW: M._swig_enum_casadi_Operation_OP_CONSTPOW(),
OP_SQRT: M._swig_enum_casadi_Operation_OP_SQRT(),
OP_SQ: M._swig_enum_casadi_Operation_OP_SQ(),
OP_TWICE: M._swig_enum_casadi_Operation_OP_TWICE(),
OP_SIN: M._swig_enum_casadi_Operation_OP_SIN(),
OP_COS: M._swig_enum_casadi_Operation_OP_COS(),
OP_TAN: M._swig_enum_casadi_Operation_OP_TAN(),
OP_ASIN: M._swig_enum_casadi_Operation_OP_ASIN(),
OP_ACOS: M._swig_enum_casadi_Operation_OP_ACOS(),
OP_ATAN: M._swig_enum_casadi_Operation_OP_ATAN(),
OP_LT: M._swig_enum_casadi_Operation_OP_LT(),
OP_LE: M._swig_enum_casadi_Operation_OP_LE(),
OP_EQ: M._swig_enum_casadi_Operation_OP_EQ(),
OP_NE: M._swig_enum_casadi_Operation_OP_NE(),
OP_NOT: M._swig_enum_casadi_Operation_OP_NOT(),
OP_AND: M._swig_enum_casadi_Operation_OP_AND(),
OP_OR: M._swig_enum_casadi_Operation_OP_OR(),
OP_FLOOR: M._swig_enum_casadi_Operation_OP_FLOOR(),
OP_CEIL: M._swig_enum_casadi_Operation_OP_CEIL(),
OP_FMOD: M._swig_enum_casadi_Operation_OP_FMOD(),
OP_FABS: M._swig_enum_casadi_Operation_OP_FABS(),
OP_SIGN: M._swig_enum_casadi_Operation_OP_SIGN(),
OP_COPYSIGN: M._swig_enum_casadi_Operation_OP_COPYSIGN(),
OP_IF_ELSE_ZERO: M._swig_enum_casadi_Operation_OP_IF_ELSE_ZERO(),
OP_ERF: M._swig_enum_casadi_Operation_OP_ERF(),
OP_FMIN: M._swig_enum_casadi_Operation_OP_FMIN(),
OP_FMAX: M._swig_enum_casadi_Operation_OP_FMAX(),
OP_INV: M._swig_enum_casadi_Operation_OP_INV(),
OP_SINH: M._swig_enum_casadi_Operation_OP_SINH(),
OP_COSH: M._swig_enum_casadi_Operation_OP_COSH(),
OP_TANH: M._swig_enum_casadi_Operation_OP_TANH(),
OP_ASINH: M._swig_enum_casadi_Operation_OP_ASINH(),
OP_ACOSH: M._swig_enum_casadi_Operation_OP_ACOSH(),
OP_ATANH: M._swig_enum_casadi_Operation_OP_ATANH(),
OP_ATAN2: M._swig_enum_casadi_Operation_OP_ATAN2(),
OP_CONST: M._swig_enum_casadi_Operation_OP_CONST(),
OP_INPUT: M._swig_enum_casadi_Operation_OP_INPUT(),
OP_OUTPUT: M._swig_enum_casadi_Operation_OP_OUTPUT(),
OP_PARAMETER: M._swig_enum_casadi_Operation_OP_PARAMETER(),
OP_CALL: M._swig_enum_casadi_Operation_OP_CALL(),
OP_FIND: M._swig_enum_casadi_Operation_OP_FIND(),
OP_LOW: M._swig_enum_casadi_Operation_OP_LOW(),
OP_MAP: M._swig_enum_casadi_Operation_OP_MAP(),
OP_MTIMES: M._swig_enum_casadi_Operation_OP_MTIMES(),
OP_SOLVE: M._swig_enum_casadi_Operation_OP_SOLVE(),
OP_TRANSPOSE: M._swig_enum_casadi_Operation_OP_TRANSPOSE(),
OP_DETERMINANT: M._swig_enum_casadi_Operation_OP_DETERMINANT(),
OP_INVERSE: M._swig_enum_casadi_Operation_OP_INVERSE(),
OP_DOT: M._swig_enum_casadi_Operation_OP_DOT(),
OP_BILIN: M._swig_enum_casadi_Operation_OP_BILIN(),
OP_RANK1: M._swig_enum_casadi_Operation_OP_RANK1(),
OP_HORZCAT: M._swig_enum_casadi_Operation_OP_HORZCAT(),
OP_VERTCAT: M._swig_enum_casadi_Operation_OP_VERTCAT(),
OP_DIAGCAT: M._swig_enum_casadi_Operation_OP_DIAGCAT(),
OP_HORZSPLIT: M._swig_enum_casadi_Operation_OP_HORZSPLIT(),
OP_VERTSPLIT: M._swig_enum_casadi_Operation_OP_VERTSPLIT(),
OP_DIAGSPLIT: M._swig_enum_casadi_Operation_OP_DIAGSPLIT(),
OP_RESHAPE: M._swig_enum_casadi_Operation_OP_RESHAPE(),
OP_SUBREF: M._swig_enum_casadi_Operation_OP_SUBREF(),
OP_SUBASSIGN: M._swig_enum_casadi_Operation_OP_SUBASSIGN(),
OP_GETNONZEROS: M._swig_enum_casadi_Operation_OP_GETNONZEROS(),
OP_GETNONZEROS_PARAM: M._swig_enum_casadi_Operation_OP_GETNONZEROS_PARAM(),
OP_ADDNONZEROS: M._swig_enum_casadi_Operation_OP_ADDNONZEROS(),
OP_ADDNONZEROS_PARAM: M._swig_enum_casadi_Operation_OP_ADDNONZEROS_PARAM(),
OP_SETNONZEROS: M._swig_enum_casadi_Operation_OP_SETNONZEROS(),
OP_SETNONZEROS_PARAM: M._swig_enum_casadi_Operation_OP_SETNONZEROS_PARAM(),
OP_PROJECT: M._swig_enum_casadi_Operation_OP_PROJECT(),
OP_ASSERTION: M._swig_enum_casadi_Operation_OP_ASSERTION(),
OP_MONITOR: M._swig_enum_casadi_Operation_OP_MONITOR(),
OP_NORM2: M._swig_enum_casadi_Operation_OP_NORM2(),
OP_NORM1: M._swig_enum_casadi_Operation_OP_NORM1(),
OP_NORMINF: M._swig_enum_casadi_Operation_OP_NORMINF(),
OP_NORMF: M._swig_enum_casadi_Operation_OP_NORMF(),
OP_MMIN: M._swig_enum_casadi_Operation_OP_MMIN(),
OP_MMAX: M._swig_enum_casadi_Operation_OP_MMAX(),
OP_HORZREPMAT: M._swig_enum_casadi_Operation_OP_HORZREPMAT(),
OP_HORZREPSUM: M._swig_enum_casadi_Operation_OP_HORZREPSUM(),
OP_ERFINV: M._swig_enum_casadi_Operation_OP_ERFINV(),
OP_PRINTME: M._swig_enum_casadi_Operation_OP_PRINTME(),
OP_LIFT: M._swig_enum_casadi_Operation_OP_LIFT(),
OP_EINSTEIN: M._swig_enum_casadi_Operation_OP_EINSTEIN(),
OP_BSPLINE: M._swig_enum_casadi_Operation_OP_BSPLINE(),
OP_CONVEXIFY: M._swig_enum_casadi_Operation_OP_CONVEXIFY(),
OP_SPARSITY_CAST: M._swig_enum_casadi_Operation_OP_SPARSITY_CAST(),
OP_LOG1P: M._swig_enum_casadi_Operation_OP_LOG1P(),
OP_EXPM1: M._swig_enum_casadi_Operation_OP_EXPM1(),
OP_HYPOT: M._swig_enum_casadi_Operation_OP_HYPOT(),
OP_LOGSUMEXP: M._swig_enum_casadi_Operation_OP_LOGSUMEXP(),
OP_REMAINDER: M._swig_enum_casadi_Operation_OP_REMAINDER(),
OP_DUMP: M._swig_enum_casadi_Operation_OP_DUMP(),
OP_KRON: M._swig_enum_casadi_Operation_OP_KRON(),
OP_KRON_CONTRACT: M._swig_enum_casadi_Operation_OP_KRON_CONTRACT(),
},
SparsityInterfaceCommon: new Proxy(SparsityInterfaceCommon, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
Sparsity: new Proxy(Sparsity, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
Slice: new Proxy(Slice, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
GenericMatrixCommon: new Proxy(GenericMatrixCommon, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
GenDM: new Proxy(GenDM, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
GenSX: new Proxy(GenSX, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
GenMX: new Proxy(GenMX, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
GenericExpressionCommon: new Proxy(GenericExpressionCommon, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
MatrixCommon: new Proxy(MatrixCommon, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
DM: new Proxy(DM, { apply(t,_s,a){ return __mkIndex(Reflect.construct(t,a)); }, construct(t,a){ return __mkIndex(Reflect.construct(t,a)); } }),
SXElem: new Proxy(SXElem, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
SX: new Proxy(SX, { apply(t,_s,a){ return __mkIndex(Reflect.construct(t,a)); }, construct(t,a){ return __mkIndex(Reflect.construct(t,a)); } }),
MX: new Proxy(MX, { apply(t,_s,a){ return __mkIndex(Reflect.construct(t,a)); }, construct(t,a){ return __mkIndex(Reflect.construct(t,a)); } }),
Function: new Proxy(Function, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
Linsol: new Proxy(Linsol, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
CodeGenerator: new Proxy(CodeGenerator, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
Importer: new Proxy(Importer, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
Callback: new Proxy(Callback, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
GlobalOptions: new Proxy(GlobalOptions, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
CasadiMeta: new Proxy(CasadiMeta, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
CollocationPoints: {
LEGENDRE: M._swig_enum_casadi_CollocationPoints_LEGENDRE(),
RADAU: M._swig_enum_casadi_CollocationPoints_RADAU(),
},
NlpBuilder: new Proxy(NlpBuilder, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
DaeBuilder: new Proxy(DaeBuilder, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
XmlFile: new Proxy(XmlFile, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
Options: new Proxy(Options, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
SerializationType: {
SERIALIZED_SPARSITY: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_SPARSITY(),
SERIALIZED_MX_v1: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_MX_v1(),
SERIALIZED_DM: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_DM(),
SERIALIZED_SX_v1: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_SX_v1(),
SERIALIZED_LINSOL: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_LINSOL(),
SERIALIZED_FUNCTION: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_FUNCTION(),
SERIALIZED_GENERICTYPE: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_GENERICTYPE(),
SERIALIZED_INT: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_INT(),
SERIALIZED_DOUBLE: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_DOUBLE(),
SERIALIZED_STRING: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_STRING(),
SERIALIZED_SPARSITY_VECTOR: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_SPARSITY_VECTOR(),
SERIALIZED_MX_VECTOR_v1: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_MX_VECTOR_v1(),
SERIALIZED_DM_VECTOR: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_DM_VECTOR(),
SERIALIZED_SX_VECTOR_v1: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_SX_VECTOR_v1(),
SERIALIZED_LINSOL_VECTOR: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_LINSOL_VECTOR(),
SERIALIZED_FUNCTION_VECTOR: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_FUNCTION_VECTOR(),
SERIALIZED_GENERICTYPE_VECTOR: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_GENERICTYPE_VECTOR(),
SERIALIZED_INT_VECTOR: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_INT_VECTOR(),
SERIALIZED_DOUBLE_VECTOR: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_DOUBLE_VECTOR(),
SERIALIZED_STRING_VECTOR: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_STRING_VECTOR(),
SERIALIZED_MX: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_MX(),
SERIALIZED_SX: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_SX(),
SERIALIZED_MX_VECTOR: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_MX_VECTOR(),
SERIALIZED_SX_VECTOR: M._swig_enum_casadi_SerializerBase_SerializationType_SERIALIZED_SX_VECTOR(),
},
SerializerBase: new Proxy(SerializerBase, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
DeserializerBase: new Proxy(DeserializerBase, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
StringSerializer: new Proxy(StringSerializer, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
FileSerializer: new Proxy(FileSerializer, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
StringDeserializer: new Proxy(StringDeserializer, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
FileDeserializer: new Proxy(FileDeserializer, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
Opti: new Proxy(Opti, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
ConstraintType: {
OPTI_GENERIC_EQUALITY: M._swig_enum_casadi_ConstraintType_OPTI_GENERIC_EQUALITY(),
OPTI_GENERIC_INEQUALITY: M._swig_enum_casadi_ConstraintType_OPTI_GENERIC_INEQUALITY(),
OPTI_EQUALITY: M._swig_enum_casadi_ConstraintType_OPTI_EQUALITY(),
OPTI_INEQUALITY: M._swig_enum_casadi_ConstraintType_OPTI_INEQUALITY(),
OPTI_DOUBLE_INEQUALITY: M._swig_enum_casadi_ConstraintType_OPTI_DOUBLE_INEQUALITY(),
OPTI_PSD: M._swig_enum_casadi_ConstraintType_OPTI_PSD(),
OPTI_UNKNOWN: M._swig_enum_casadi_ConstraintType_OPTI_UNKNOWN(),
},
VariableType: {
OPTI_VAR: M._swig_enum_casadi_VariableType_OPTI_VAR(),
OPTI_PAR: M._swig_enum_casadi_VariableType_OPTI_PAR(),
OPTI_DUAL_G: M._swig_enum_casadi_VariableType_OPTI_DUAL_G(),
},
DomainType: {
OPTI_DOMAIN_REAL: M._swig_enum_casadi_DomainType_OPTI_DOMAIN_REAL(),
OPTI_DOMAIN_INTEGER: M._swig_enum_casadi_DomainType_OPTI_DOMAIN_INTEGER(),
},
IndexAbstraction: new Proxy(IndexAbstraction, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
MetaCon: new Proxy(MetaCon, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
MetaVar: new Proxy(MetaVar, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
OptiCallback: new Proxy(OptiCallback, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
OptiAdvanced: new Proxy(OptiAdvanced, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
OptiSol: new Proxy(OptiSol, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
Resource: new Proxy(Resource, { apply(t, _self, a) { return Reflect.construct(t, a); } }),
doc_conic(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_doc_conic_0(__ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
},
transform(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = {};
return __from_handle(__chk(M._swig_casadi_casadi_transform_0(__unwrap(__coerce(a0, MX)), __unwrap(a1))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_transform_0(__unwrap(__coerce(a0, MX)), __unwrap(a1))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__vectorT_std__vectorT_casadi__GenericType_t_t(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __from_handle(__chk(M._swig_casadi_casadi_transform_1(__unwrap(__coerce(a0, MX)), __unwrap(a1), __unwrap(a2))));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__vectorT_std__vectorT_casadi__GenericType_t_t(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_transform_1(__unwrap(__coerce(a0, MX)), __unwrap(a1), __unwrap(a2))));
}
if (args.length === 1 && M._swig_can_MXVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_transform_2(__unwrap(__vp1), __unwrap(a1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_transform_2(__unwrap(__vp1), __unwrap(a1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_std__vectorT_std__vectorT_casadi__GenericType_t_t(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_transform_3(__unwrap(__vp1), __unwrap(a1), __unwrap(a2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 3 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_std__vectorT_std__vectorT_casadi__GenericType_t_t(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_transform_3(__unwrap(__vp1), __unwrap(a1), __unwrap(a2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = {};
return __from_handle(__chk(M._swig_casadi_casadi_transform_4(__unwrap(__coerce(a0, DM)), __unwrap(a1))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_transform_4(__unwrap(__coerce(a0, DM)), __unwrap(a1))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__vectorT_std__vectorT_casadi__GenericType_t_t(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __from_handle(__chk(M._swig_casadi_casadi_transform_5(__unwrap(__coerce(a0, DM)), __unwrap(a1), __unwrap(a2))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__vectorT_std__vectorT_casadi__GenericType_t_t(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_transform_5(__unwrap(__coerce(a0, DM)), __unwrap(a1), __unwrap(a2))));
}
if (args.length === 1 && M._swig_can_DMVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_transform_6(__unwrap(__vp1), __unwrap(a1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_DMVector(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_transform_6(__unwrap(__vp1), __unwrap(a1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_DMVector(__unwrap(args[0])) && M._swig_can_std__vectorT_std__vectorT_casadi__GenericType_t_t(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_transform_7(__unwrap(__vp1), __unwrap(a1), __unwrap(a2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 3 && M._swig_can_DMVector(__unwrap(args[0])) && M._swig_can_std__vectorT_std__vectorT_casadi__GenericType_t_t(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_transform_7(__unwrap(__vp1), __unwrap(a1), __unwrap(a2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = {};
return __from_handle(__chk(M._swig_casadi_casadi_transform_8(__unwrap(__coerce(a0, SX)), __unwrap(a1))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_transform_8(__unwrap(__coerce(a0, SX)), __unwrap(a1))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__vectorT_std__vectorT_casadi__GenericType_t_t(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __from_handle(__chk(M._swig_casadi_casadi_transform_9(__unwrap(__coerce(a0, SX)), __unwrap(a1), __unwrap(a2))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__vectorT_std__vectorT_casadi__GenericType_t_t(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_transform_9(__unwrap(__coerce(a0, SX)), __unwrap(a1), __unwrap(a2))));
}
if (args.length === 1 && M._swig_can_SXVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_transform_10(__unwrap(__vp1), __unwrap(a1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_SXVector(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_transform_10(__unwrap(__vp1), __unwrap(a1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_SXVector(__unwrap(args[0])) && M._swig_can_std__vectorT_std__vectorT_casadi__GenericType_t_t(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_transform_11(__unwrap(__vp1), __unwrap(a1), __unwrap(a2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 3 && M._swig_can_SXVector(__unwrap(args[0])) && M._swig_can_std__vectorT_std__vectorT_casadi__GenericType_t_t(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_transform_11(__unwrap(__vp1), __unwrap(a1), __unwrap(a2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`transform: no overload matches arg types`);
},
extract_parametric(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __chk(M._swig_casadi_casadi_extract_parametric_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(a2)));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_casadi_extract_parametric_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(a2)));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_MXVector(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_1(__unwrap(__coerce(a0, MX)), __unwrap(__vp2), __unwrap(a2)));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_1(__unwrap(__coerce(a0, MX)), __unwrap(__vp2), __unwrap(a2)));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 2 && M._swig_can_MXVector(__unwrap(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_2(__unwrap(__vp1), __unwrap(__coerce(a1, MX)), __unwrap(a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 3 && M._swig_can_MXVector(__unwrap(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_2(__unwrap(__vp1), __unwrap(__coerce(a1, MX)), __unwrap(a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_MXVector(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_3(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 3 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_3(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __chk(M._swig_casadi_casadi_extract_parametric_4(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(a2)));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_casadi_extract_parametric_4(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(a2)));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_DMVector(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_5(__unwrap(__coerce(a0, DM)), __unwrap(__vp2), __unwrap(a2)));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_DMVector(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_5(__unwrap(__coerce(a0, DM)), __unwrap(__vp2), __unwrap(a2)));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 2 && M._swig_can_DMVector(__unwrap(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_6(__unwrap(__vp1), __unwrap(__coerce(a1, DM)), __unwrap(a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 3 && M._swig_can_DMVector(__unwrap(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_6(__unwrap(__vp1), __unwrap(__coerce(a1, DM)), __unwrap(a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_DMVector(__unwrap(args[0])) && M._swig_can_DMVector(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_7(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 3 && M._swig_can_DMVector(__unwrap(args[0])) && M._swig_can_DMVector(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_7(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __chk(M._swig_casadi_casadi_extract_parametric_8(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(a2)));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_casadi_extract_parametric_8(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(a2)));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_SXVector(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new SXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_9(__unwrap(__coerce(a0, SX)), __unwrap(__vp2), __unwrap(a2)));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_SXVector(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new SXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_9(__unwrap(__coerce(a0, SX)), __unwrap(__vp2), __unwrap(a2)));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 2 && M._swig_can_SXVector(__unwrap(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_10(__unwrap(__vp1), __unwrap(__coerce(a1, SX)), __unwrap(a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 3 && M._swig_can_SXVector(__unwrap(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_10(__unwrap(__vp1), __unwrap(__coerce(a1, SX)), __unwrap(a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_SXVector(__unwrap(args[0])) && M._swig_can_SXVector(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new SXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_11(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 3 && M._swig_can_SXVector(__unwrap(args[0])) && M._swig_can_SXVector(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new SXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_parametric_11(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`extract_parametric: no overload matches arg types`);
},
repmat(...args) {
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = 1n;
return __from_handle(__chk(M._swig_casadi_casadi_repmat_0(__unwrap(a0), BigInt(a1), BigInt(a2))));
}
if (args.length === 3 && M._swig_can_Sparsity(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_repmat_0(__unwrap(a0), BigInt(a1), BigInt(a2))));
}
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_repmat_1(__unwrap(a0), __unwrap(a1))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = 1n;
return __from_handle(__chk(M._swig_casadi_casadi_repmat_2(__unwrap(__coerce(a0, MX)), BigInt(a1), BigInt(a2))));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_repmat_2(__unwrap(__coerce(a0, MX)), BigInt(a1), BigInt(a2))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_repmat_3(__unwrap(__coerce(a0, MX)), __unwrap(a1))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = 1n;
return __from_handle(__chk(M._swig_casadi_casadi_repmat_4(__unwrap(__coerce(a0, DM)), BigInt(a1), BigInt(a2))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_repmat_4(__unwrap(__coerce(a0, DM)), BigInt(a1), BigInt(a2))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_repmat_5(__unwrap(__coerce(a0, DM)), __unwrap(a1))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = 1n;
return __from_handle(__chk(M._swig_casadi_casadi_repmat_6(__unwrap(__coerce(a0, SX)), BigInt(a1), BigInt(a2))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_repmat_6(__unwrap(__coerce(a0, SX)), BigInt(a1), BigInt(a2))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_repmat_7(__unwrap(__coerce(a0, SX)), __unwrap(a1))));
}
throw new TypeError(`repmat: no overload matches arg types`);
},
diag(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_diag_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_diag_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_diag_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`diag: no overload matches arg types`);
},
gauss_quadrature(...args) {
if (args.length === 4 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_DM(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3]))) {
const [a0, a1, a2, a3] = args;
const a4 = 5n;
return __from_handle(__chk(M._swig_casadi_casadi_gauss_quadrature_0(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), __unwrap(__coerce(a3, DM)), BigInt(a4))));
}
if (args.length === 5 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_DM(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3])) && (typeof args[4] === 'number' || typeof args[4] === 'bigint')) {
const [a0, a1, a2, a3, a4] = args;
return __from_handle(__chk(M._swig_casadi_casadi_gauss_quadrature_0(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), __unwrap(__coerce(a3, DM)), BigInt(a4))));
}
if (args.length === 6 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_DM(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3])) && (typeof args[4] === 'number' || typeof args[4] === 'bigint') && (M._swig_can_DM(__unwrap(args[5])) || typeof args[5] === 'number' || typeof args[5] === 'bigint' || Array.isArray(args[5]))) {
const [a0, a1, a2, a3, a4, a5] = args;
return __from_handle(__chk(M._swig_casadi_casadi_gauss_quadrature_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), __unwrap(__coerce(a3, DM)), BigInt(a4), __unwrap(__coerce(a5, DM)))));
}
if (args.length === 4 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_SX(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3]))) {
const [a0, a1, a2, a3] = args;
const a4 = 5n;
return __from_handle(__chk(M._swig_casadi_casadi_gauss_quadrature_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), __unwrap(__coerce(a3, SX)), BigInt(a4))));
}
if (args.length === 5 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_SX(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3])) && (typeof args[4] === 'number' || typeof args[4] === 'bigint')) {
const [a0, a1, a2, a3, a4] = args;
return __from_handle(__chk(M._swig_casadi_casadi_gauss_quadrature_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), __unwrap(__coerce(a3, SX)), BigInt(a4))));
}
if (args.length === 6 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_SX(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3])) && (typeof args[4] === 'number' || typeof args[4] === 'bigint') && (M._swig_can_SX(__unwrap(args[5])) || typeof args[5] === 'number' || typeof args[5] === 'bigint' || Array.isArray(args[5]))) {
const [a0, a1, a2, a3, a4, a5] = args;
return __from_handle(__chk(M._swig_casadi_casadi_gauss_quadrature_3(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), __unwrap(__coerce(a3, SX)), BigInt(a4), __unwrap(__coerce(a5, SX)))));
}
throw new TypeError(`gauss_quadrature: no overload matches arg types`);
},
poly_coeff(...args) {
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_poly_coeff_0(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_poly_coeff_1(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
throw new TypeError(`poly_coeff: no overload matches arg types`);
},
doc_blas(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_doc_blas_0(__ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
},
diff(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = 1n;
const a2 = -1n;
return __from_handle(__chk(M._swig_casadi_casadi_diff_0(__unwrap(__coerce(a0, MX)), BigInt(a1), BigInt(a2))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = -1n;
return __from_handle(__chk(M._swig_casadi_casadi_diff_0(__unwrap(__coerce(a0, MX)), BigInt(a1), BigInt(a2))));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_diff_0(__unwrap(__coerce(a0, MX)), BigInt(a1), BigInt(a2))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = 1n;
const a2 = -1n;
return __from_handle(__chk(M._swig_casadi_casadi_diff_1(__unwrap(__coerce(a0, DM)), BigInt(a1), BigInt(a2))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = -1n;
return __from_handle(__chk(M._swig_casadi_casadi_diff_1(__unwrap(__coerce(a0, DM)), BigInt(a1), BigInt(a2))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_diff_1(__unwrap(__coerce(a0, DM)), BigInt(a1), BigInt(a2))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = 1n;
const a2 = -1n;
return __from_handle(__chk(M._swig_casadi_casadi_diff_2(__unwrap(__coerce(a0, SX)), BigInt(a1), BigInt(a2))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = -1n;
return __from_handle(__chk(M._swig_casadi_casadi_diff_2(__unwrap(__coerce(a0, SX)), BigInt(a1), BigInt(a2))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_diff_2(__unwrap(__coerce(a0, SX)), BigInt(a1), BigInt(a2))));
}
throw new TypeError(`diff: no overload matches arg types`);
},
integrator_in(...args) {
if (args.length === 0) {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_integrator_in_0())));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_integrator_in_1(BigInt(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
throw new TypeError(`integrator_in: no overload matches arg types`);
},
linspace(...args) {
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_linspace_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), BigInt(a2))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_linspace_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), BigInt(a2))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_linspace_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), BigInt(a2))));
}
throw new TypeError(`linspace: no overload matches arg types`);
},
extract(...args) {
if (args.length === 1 && M._swig_can_MXVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_0(__unwrap(__vp1), __unwrap(a1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_0(__unwrap(__vp1), __unwrap(a1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_DMVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_1(__unwrap(__vp1), __unwrap(a1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_DMVector(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_1(__unwrap(__vp1), __unwrap(a1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_SXVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_2(__unwrap(__vp1), __unwrap(a1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_SXVector(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_extract_2(__unwrap(__vp1), __unwrap(a1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`extract: no overload matches arg types`);
},
cofactor(...args) {
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_cofactor_0(__unwrap(__coerce(a0, DM)), BigInt(a1), BigInt(a2))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_cofactor_1(__unwrap(__coerce(a0, SX)), BigInt(a1), BigInt(a2))));
}
throw new TypeError(`cofactor: no overload matches arg types`);
},
asin(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_asin_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_asin_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_asin_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_asin_3(a0));
}
throw new TypeError(`asin: no overload matches arg types`);
},
sqrt(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sqrt_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sqrt_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sqrt_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_sqrt_3(a0));
}
throw new TypeError(`sqrt: no overload matches arg types`);
},
any(...args) {
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_any_0(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_any_1(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`any: no overload matches arg types`);
},
contains(...args) {
if (args.length === 2 && M._swig_can_MXVector(__unwrap(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_casadi_contains_0(__unwrap(__vp1), __unwrap(__coerce(a1, MX))))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_DMVector(__unwrap(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_casadi_contains_1(__unwrap(__vp1), __unwrap(__coerce(a1, DM))))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_SXVector(__unwrap(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_casadi_contains_2(__unwrap(__vp1), __unwrap(__coerce(a1, SX))))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`contains: no overload matches arg types`);
},
triangle(...args) {
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_triangle_0(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_triangle_1(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`triangle: no overload matches arg types`);
},
event_out() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_event_out_0())));
},
tangent(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __from_handle(__chk(M._swig_casadi_casadi_tangent_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(a2))));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_tangent_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(a2))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __from_handle(__chk(M._swig_casadi_casadi_tangent_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(a2))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_tangent_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(a2))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __from_handle(__chk(M._swig_casadi_casadi_tangent_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(a2))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_tangent_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(a2))));
}
throw new TypeError(`tangent: no overload matches arg types`);
},
separate_linear(...args) {
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_casadi_separate_linear_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX))));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_MXVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new MXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_separate_linear_1(__unwrap(__coerce(a0, MX)), __unwrap(__vp2), __unwrap(__vp3)));
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_casadi_separate_linear_2(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_DMVector(__unwrap(args[1])) && M._swig_can_DMVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new DMVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_separate_linear_3(__unwrap(__coerce(a0, DM)), __unwrap(__vp2), __unwrap(__vp3)));
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_casadi_separate_linear_4(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_SXVector(__unwrap(args[1])) && M._swig_can_SXVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new SXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new SXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_separate_linear_5(__unwrap(__coerce(a0, SX)), __unwrap(__vp2), __unwrap(__vp3)));
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
throw new TypeError(`separate_linear: no overload matches arg types`);
},
diagsplit(...args) {
if (args.length === 3 && M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_IntVector(__unwrap(args[1])) && M._swig_can_IntVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_0(__unwrap(a0), __unwrap(__vp2), __unwrap(__vp3)))));
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_1(__unwrap(a0), __unwrap(__vp2)))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 1 && M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
const a1 = 1n;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_2(__unwrap(a0), BigInt(a1)))));
}
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_2(__unwrap(a0), BigInt(a1)))));
}
if (args.length === 3 && M._swig_can_Sparsity(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_3(__unwrap(a0), BigInt(a1), BigInt(a2)))));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_IntVector(__unwrap(args[1])) && M._swig_can_IntVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_4(__unwrap(__coerce(a0, MX)), __unwrap(__vp2), __unwrap(__vp3)))));
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_5(__unwrap(__coerce(a0, MX)), __unwrap(__vp2)))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = 1n;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_6(__unwrap(__coerce(a0, MX)), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_6(__unwrap(__coerce(a0, MX)), BigInt(a1)))));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_7(__unwrap(__coerce(a0, MX)), BigInt(a1), BigInt(a2)))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_IntVector(__unwrap(args[1])) && M._swig_can_IntVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_8(__unwrap(__coerce(a0, DM)), __unwrap(__vp2), __unwrap(__vp3)))));
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_9(__unwrap(__coerce(a0, DM)), __unwrap(__vp2)))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = 1n;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_10(__unwrap(__coerce(a0, DM)), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_10(__unwrap(__coerce(a0, DM)), BigInt(a1)))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_11(__unwrap(__coerce(a0, DM)), BigInt(a1), BigInt(a2)))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_IntVector(__unwrap(args[1])) && M._swig_can_IntVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_12(__unwrap(__coerce(a0, SX)), __unwrap(__vp2), __unwrap(__vp3)))));
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_13(__unwrap(__coerce(a0, SX)), __unwrap(__vp2)))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = 1n;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_14(__unwrap(__coerce(a0, SX)), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_14(__unwrap(__coerce(a0, SX)), BigInt(a1)))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_diagsplit_15(__unwrap(__coerce(a0, SX)), BigInt(a1), BigInt(a2)))));
}
throw new TypeError(`diagsplit: no overload matches arg types`);
},
has_conic(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_has_conic_0(__ps1))));
M._free(__ps1);
return __r;
},
not(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_not_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_not_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_not_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_not_3(a0));
}
throw new TypeError(`not: no overload matches arg types`);
},
mmax(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mmax_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mmax_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mmax_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`mmax: no overload matches arg types`);
},
minus(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_minus_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_minus_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_minus_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_minus_3(a0, a1));
}
throw new TypeError(`minus: no overload matches arg types`);
},
dyn_in(...args) {
if (args.length === 0) {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_dyn_in_0())));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_dyn_in_1(BigInt(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
throw new TypeError(`dyn_in: no overload matches arg types`);
},
repsum(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = 1n;
return __from_handle(__chk(M._swig_casadi_casadi_repsum_0(__unwrap(__coerce(a0, MX)), BigInt(a1), BigInt(a2))));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_repsum_0(__unwrap(__coerce(a0, MX)), BigInt(a1), BigInt(a2))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = 1n;
return __from_handle(__chk(M._swig_casadi_casadi_repsum_1(__unwrap(__coerce(a0, DM)), BigInt(a1), BigInt(a2))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_repsum_1(__unwrap(__coerce(a0, DM)), BigInt(a1), BigInt(a2))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = 1n;
return __from_handle(__chk(M._swig_casadi_casadi_repsum_2(__unwrap(__coerce(a0, SX)), BigInt(a1), BigInt(a2))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_repsum_2(__unwrap(__coerce(a0, SX)), BigInt(a1), BigInt(a2))));
}
throw new TypeError(`repsum: no overload matches arg types`);
},
einstein(...args) {
if (args.length === 9 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && M._swig_can_IntVector(__unwrap(args[3])) && M._swig_can_IntVector(__unwrap(args[4])) && M._swig_can_IntVector(__unwrap(args[5])) && M._swig_can_IntVector(__unwrap(args[6])) && M._swig_can_IntVector(__unwrap(args[7])) && M._swig_can_IntVector(__unwrap(args[8]))) {
const [a0, a1, a2, a3, a4, a5, a6, a7, a8] = args;
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new IntVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
let __vp6 = a5;
let __vown6 = false;
if (Array.isArray(a5)) {
__vp6 = new IntVector();
__vown6 = true;
for (const __x of a5) __vp6.push_back(__x);
}
let __vp7 = a6;
let __vown7 = false;
if (Array.isArray(a6)) {
__vp7 = new IntVector();
__vown7 = true;
for (const __x of a6) __vp7.push_back(__x);
}
let __vp8 = a7;
let __vown8 = false;
if (Array.isArray(a7)) {
__vp8 = new IntVector();
__vown8 = true;
for (const __x of a7) __vp8.push_back(__x);
}
let __vp9 = a8;
let __vown9 = false;
if (Array.isArray(a8)) {
__vp9 = new IntVector();
__vown9 = true;
for (const __x of a8) __vp9.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_einstein_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)), __unwrap(__vp4), __unwrap(__vp5), __unwrap(__vp6), __unwrap(__vp7), __unwrap(__vp8), __unwrap(__vp9))));
if (__vown4 && __vp4.delete) __vp4.delete();
if (__vown5 && __vp5.delete) __vp5.delete();
if (__vown6 && __vp6.delete) __vp6.delete();
if (__vown7 && __vp7.delete) __vp7.delete();
if (__vown8 && __vp8.delete) __vp8.delete();
if (__vown9 && __vp9.delete) __vp9.delete();
return __r;
}
if (args.length === 8 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_IntVector(__unwrap(args[2])) && M._swig_can_IntVector(__unwrap(args[3])) && M._swig_can_IntVector(__unwrap(args[4])) && M._swig_can_IntVector(__unwrap(args[5])) && M._swig_can_IntVector(__unwrap(args[6])) && M._swig_can_IntVector(__unwrap(args[7]))) {
const [a0, a1, a2, a3, a4, a5, a6, a7] = args;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new IntVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
let __vp6 = a5;
let __vown6 = false;
if (Array.isArray(a5)) {
__vp6 = new IntVector();
__vown6 = true;
for (const __x of a5) __vp6.push_back(__x);
}
let __vp7 = a6;
let __vown7 = false;
if (Array.isArray(a6)) {
__vp7 = new IntVector();
__vown7 = true;
for (const __x of a6) __vp7.push_back(__x);
}
let __vp8 = a7;
let __vown8 = false;
if (Array.isArray(a7)) {
__vp8 = new IntVector();
__vown8 = true;
for (const __x of a7) __vp8.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_einstein_1(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__vp3), __unwrap(__vp4), __unwrap(__vp5), __unwrap(__vp6), __unwrap(__vp7), __unwrap(__vp8))));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
if (__vown5 && __vp5.delete) __vp5.delete();
if (__vown6 && __vp6.delete) __vp6.delete();
if (__vown7 && __vp7.delete) __vp7.delete();
if (__vown8 && __vp8.delete) __vp8.delete();
return __r;
}
if (args.length === 9 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && M._swig_can_IntVector(__unwrap(args[3])) && M._swig_can_IntVector(__unwrap(args[4])) && M._swig_can_IntVector(__unwrap(args[5])) && M._swig_can_IntVector(__unwrap(args[6])) && M._swig_can_IntVector(__unwrap(args[7])) && M._swig_can_IntVector(__unwrap(args[8]))) {
const [a0, a1, a2, a3, a4, a5, a6, a7, a8] = args;
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new IntVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
let __vp6 = a5;
let __vown6 = false;
if (Array.isArray(a5)) {
__vp6 = new IntVector();
__vown6 = true;
for (const __x of a5) __vp6.push_back(__x);
}
let __vp7 = a6;
let __vown7 = false;
if (Array.isArray(a6)) {
__vp7 = new IntVector();
__vown7 = true;
for (const __x of a6) __vp7.push_back(__x);
}
let __vp8 = a7;
let __vown8 = false;
if (Array.isArray(a7)) {
__vp8 = new IntVector();
__vown8 = true;
for (const __x of a7) __vp8.push_back(__x);
}
let __vp9 = a8;
let __vown9 = false;
if (Array.isArray(a8)) {
__vp9 = new IntVector();
__vown9 = true;
for (const __x of a8) __vp9.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_einstein_2(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), __unwrap(__vp4), __unwrap(__vp5), __unwrap(__vp6), __unwrap(__vp7), __unwrap(__vp8), __unwrap(__vp9))));
if (__vown4 && __vp4.delete) __vp4.delete();
if (__vown5 && __vp5.delete) __vp5.delete();
if (__vown6 && __vp6.delete) __vp6.delete();
if (__vown7 && __vp7.delete) __vp7.delete();
if (__vown8 && __vp8.delete) __vp8.delete();
if (__vown9 && __vp9.delete) __vp9.delete();
return __r;
}
if (args.length === 8 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_IntVector(__unwrap(args[2])) && M._swig_can_IntVector(__unwrap(args[3])) && M._swig_can_IntVector(__unwrap(args[4])) && M._swig_can_IntVector(__unwrap(args[5])) && M._swig_can_IntVector(__unwrap(args[6])) && M._swig_can_IntVector(__unwrap(args[7]))) {
const [a0, a1, a2, a3, a4, a5, a6, a7] = args;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new IntVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
let __vp6 = a5;
let __vown6 = false;
if (Array.isArray(a5)) {
__vp6 = new IntVector();
__vown6 = true;
for (const __x of a5) __vp6.push_back(__x);
}
let __vp7 = a6;
let __vown7 = false;
if (Array.isArray(a6)) {
__vp7 = new IntVector();
__vown7 = true;
for (const __x of a6) __vp7.push_back(__x);
}
let __vp8 = a7;
let __vown8 = false;
if (Array.isArray(a7)) {
__vp8 = new IntVector();
__vown8 = true;
for (const __x of a7) __vp8.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_einstein_3(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__vp3), __unwrap(__vp4), __unwrap(__vp5), __unwrap(__vp6), __unwrap(__vp7), __unwrap(__vp8))));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
if (__vown5 && __vp5.delete) __vp5.delete();
if (__vown6 && __vp6.delete) __vp6.delete();
if (__vown7 && __vp7.delete) __vp7.delete();
if (__vown8 && __vp8.delete) __vp8.delete();
return __r;
}
if (args.length === 9 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && M._swig_can_IntVector(__unwrap(args[3])) && M._swig_can_IntVector(__unwrap(args[4])) && M._swig_can_IntVector(__unwrap(args[5])) && M._swig_can_IntVector(__unwrap(args[6])) && M._swig_can_IntVector(__unwrap(args[7])) && M._swig_can_IntVector(__unwrap(args[8]))) {
const [a0, a1, a2, a3, a4, a5, a6, a7, a8] = args;
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new IntVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
let __vp6 = a5;
let __vown6 = false;
if (Array.isArray(a5)) {
__vp6 = new IntVector();
__vown6 = true;
for (const __x of a5) __vp6.push_back(__x);
}
let __vp7 = a6;
let __vown7 = false;
if (Array.isArray(a6)) {
__vp7 = new IntVector();
__vown7 = true;
for (const __x of a6) __vp7.push_back(__x);
}
let __vp8 = a7;
let __vown8 = false;
if (Array.isArray(a7)) {
__vp8 = new IntVector();
__vown8 = true;
for (const __x of a7) __vp8.push_back(__x);
}
let __vp9 = a8;
let __vown9 = false;
if (Array.isArray(a8)) {
__vp9 = new IntVector();
__vown9 = true;
for (const __x of a8) __vp9.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_einstein_4(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), __unwrap(__vp4), __unwrap(__vp5), __unwrap(__vp6), __unwrap(__vp7), __unwrap(__vp8), __unwrap(__vp9))));
if (__vown4 && __vp4.delete) __vp4.delete();
if (__vown5 && __vp5.delete) __vp5.delete();
if (__vown6 && __vp6.delete) __vp6.delete();
if (__vown7 && __vp7.delete) __vp7.delete();
if (__vown8 && __vp8.delete) __vp8.delete();
if (__vown9 && __vp9.delete) __vp9.delete();
return __r;
}
if (args.length === 8 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_IntVector(__unwrap(args[2])) && M._swig_can_IntVector(__unwrap(args[3])) && M._swig_can_IntVector(__unwrap(args[4])) && M._swig_can_IntVector(__unwrap(args[5])) && M._swig_can_IntVector(__unwrap(args[6])) && M._swig_can_IntVector(__unwrap(args[7]))) {
const [a0, a1, a2, a3, a4, a5, a6, a7] = args;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new IntVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
let __vp6 = a5;
let __vown6 = false;
if (Array.isArray(a5)) {
__vp6 = new IntVector();
__vown6 = true;
for (const __x of a5) __vp6.push_back(__x);
}
let __vp7 = a6;
let __vown7 = false;
if (Array.isArray(a6)) {
__vp7 = new IntVector();
__vown7 = true;
for (const __x of a6) __vp7.push_back(__x);
}
let __vp8 = a7;
let __vown8 = false;
if (Array.isArray(a7)) {
__vp8 = new IntVector();
__vown8 = true;
for (const __x of a7) __vp8.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_einstein_5(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__vp3), __unwrap(__vp4), __unwrap(__vp5), __unwrap(__vp6), __unwrap(__vp7), __unwrap(__vp8))));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
if (__vown5 && __vp5.delete) __vp5.delete();
if (__vown6 && __vp6.delete) __vp6.delete();
if (__vown7 && __vp7.delete) __vp7.delete();
if (__vown8 && __vp8.delete) __vp8.delete();
return __r;
}
throw new TypeError(`einstein: no overload matches arg types`);
},
has_rootfinder(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_has_rootfinder_0(__ps1))));
M._free(__ps1);
return __r;
},
dyn_n_in() {
return __chk(M._swig_casadi_dyn_n_in_0());
},
atan(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_atan_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_atan_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_atan_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_atan_3(a0));
}
throw new TypeError(`atan: no overload matches arg types`);
},
dple_in(...args) {
if (args.length === 0) {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_dple_in_0())));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_dple_in_1(BigInt(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
throw new TypeError(`dple_in: no overload matches arg types`);
},
load_interpolant(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_load_interpolant_0(__ps1));
M._free(__ps1);
return __r;
},
nullspace(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_nullspace_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_nullspace_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_nullspace_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`nullspace: no overload matches arg types`);
},
eq(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_eq_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_eq_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_eq_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_eq_3(a0, a1));
}
throw new TypeError(`eq: no overload matches arg types`);
},
no_grad(a0) {
return __from_handle(__chk(M._swig_casadi_casadi_no_grad_0(__unwrap(__coerce(a0, MX)))));
},
hessian(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __from_handle(__chk(M._swig_casadi_casadi_hessian_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(a2))));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_hessian_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(a2))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __from_handle(__chk(M._swig_casadi_casadi_hessian_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(a2))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_hessian_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(a2))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __from_handle(__chk(M._swig_casadi_casadi_hessian_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(a2))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_hessian_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(a2))));
}
throw new TypeError(`hessian: no overload matches arg types`);
},
nlpsol_options(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_nlpsol_options_0(__ps1))));
M._free(__ps1);
return __r;
},
mtimes(...args) {
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = "reference";
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtimes_0(__unwrap(a0), __unwrap(a1), __ps3)));
M._free(__ps3);
return __r;
}
if (args.length === 3 && M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_Sparsity(__unwrap(args[1])) && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtimes_0(__unwrap(a0), __unwrap(a1), __ps3)));
M._free(__ps3);
return __r;
}
if (args.length === 1 && M._swig_can_SparsityVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SparsityVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtimes_1(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_SparsityVector(__unwrap(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SparsityVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtimes_2(__unwrap(__vp1), __ps2)));
if (__vown1 && __vp1.delete) __vp1.delete();
M._free(__ps2);
return __r;
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = "reference";
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtimes_3(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __ps3)));
M._free(__ps3);
return __r;
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtimes_3(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __ps3)));
M._free(__ps3);
return __r;
}
if (args.length === 1 && M._swig_can_MXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtimes_4(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_MXVector(__unwrap(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtimes_5(__unwrap(__vp1), __ps2)));
if (__vown1 && __vp1.delete) __vp1.delete();
M._free(__ps2);
return __r;
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = "reference";
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtimes_6(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __ps3)));
M._free(__ps3);
return __r;
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtimes_6(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __ps3)));
M._free(__ps3);
return __r;
}
if (args.length === 1 && M._swig_can_DMVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtimes_7(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_DMVector(__unwrap(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtimes_8(__unwrap(__vp1), __ps2)));
if (__vown1 && __vp1.delete) __vp1.delete();
M._free(__ps2);
return __r;
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = "reference";
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtimes_9(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __ps3)));
M._free(__ps3);
return __r;
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtimes_9(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __ps3)));
M._free(__ps3);
return __r;
}
if (args.length === 1 && M._swig_can_SXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtimes_10(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_SXVector(__unwrap(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtimes_11(__unwrap(__vp1), __ps2)));
if (__vown1 && __vp1.delete) __vp1.delete();
M._free(__ps2);
return __r;
}
throw new TypeError(`mtimes: no overload matches arg types`);
},
integrator_n_in() {
return __chk(M._swig_casadi_integrator_n_in_0());
},
jtimes(...args) {
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
const a3 = false;
const a4 = {};
return __from_handle(__chk(M._swig_casadi_casadi_jtimes_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)), a3, __unwrap(a4))));
}
if (args.length === 4 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'boolean')) {
const [a0, a1, a2, a3] = args;
const a4 = {};
return __from_handle(__chk(M._swig_casadi_casadi_jtimes_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)), a3, __unwrap(a4))));
}
if (args.length === 5 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'boolean') && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
return __from_handle(__chk(M._swig_casadi_casadi_jtimes_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)), a3, __unwrap(a4))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
const a3 = false;
const a4 = {};
return __from_handle(__chk(M._swig_casadi_casadi_jtimes_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), a3, __unwrap(a4))));
}
if (args.length === 4 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'boolean')) {
const [a0, a1, a2, a3] = args;
const a4 = {};
return __from_handle(__chk(M._swig_casadi_casadi_jtimes_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), a3, __unwrap(a4))));
}
if (args.length === 5 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'boolean') && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
return __from_handle(__chk(M._swig_casadi_casadi_jtimes_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), a3, __unwrap(a4))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
const a3 = false;
const a4 = {};
return __from_handle(__chk(M._swig_casadi_casadi_jtimes_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), a3, __unwrap(a4))));
}
if (args.length === 4 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'boolean')) {
const [a0, a1, a2, a3] = args;
const a4 = {};
return __from_handle(__chk(M._swig_casadi_casadi_jtimes_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), a3, __unwrap(a4))));
}
if (args.length === 5 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'boolean') && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
return __from_handle(__chk(M._swig_casadi_casadi_jtimes_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), a3, __unwrap(a4))));
}
throw new TypeError(`jtimes: no overload matches arg types`);
},
or(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_or_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_or_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_or_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_or_3(a0, a1));
}
throw new TypeError(`or: no overload matches arg types`);
},
has_dple(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_has_dple_0(__ps1))));
M._free(__ps1);
return __r;
},
triu2symm(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_triu2symm_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_triu2symm_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_triu2symm_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`triu2symm: no overload matches arg types`);
},
dae_reduce_index(...args) {
if (args.length === 1 && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[0]))) {
const [a0] = args;
const a1 = undefined;
return M.__swig_release_handle(__chk(M._swig_casadi_dae_reduce_index_0(__unwrap(a0), __unwrap(a1))));
}
if (args.length === 2 && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return M.__swig_release_handle(__chk(M._swig_casadi_dae_reduce_index_0(__unwrap(a0), __unwrap(a1))));
}
if (args.length === 1 && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[0]))) {
const [a0] = args;
const a1 = undefined;
return M.__swig_release_handle(__chk(M._swig_casadi_dae_reduce_index_1(__unwrap(a0), __unwrap(a1))));
}
if (args.length === 2 && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return M.__swig_release_handle(__chk(M._swig_casadi_dae_reduce_index_1(__unwrap(a0), __unwrap(a1))));
}
throw new TypeError(`dae_reduce_index: no overload matches arg types`);
},
horzcat(...args) {
if (args.length === 1 && M._swig_can_SparsityVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SparsityVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_horzcat_0(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_MXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_horzcat_1(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_DMVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_horzcat_2(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_SXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_horzcat_3(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`horzcat: no overload matches arg types`);
},
vertsplit_n(...args) {
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_vertsplit_n_0(__unwrap(a0), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_vertsplit_n_1(__unwrap(__coerce(a0, MX)), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_vertsplit_n_2(__unwrap(__coerce(a0, DM)), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_vertsplit_n_3(__unwrap(__coerce(a0, SX)), BigInt(a1)))));
}
throw new TypeError(`vertsplit_n: no overload matches arg types`);
},
has_linsol(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_has_linsol_0(__ps1))));
M._free(__ps1);
return __r;
},
stop_diff(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_stop_diff_0(__unwrap(__coerce(a0, MX)), BigInt(a1))));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_stop_diff_1(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), BigInt(a2))));
}
throw new TypeError(`stop_diff: no overload matches arg types`);
},
logsumexp(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_logsumexp_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_logsumexp_1(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_logsumexp_2(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_logsumexp_3(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_logsumexp_4(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_logsumexp_5(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
throw new TypeError(`logsumexp: no overload matches arg types`);
},
dae_map_semi_expl(...args) {
if (args.length === 2 && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return M.__swig_release_handle(__chk(M._swig_casadi_dae_map_semi_expl_0(__unwrap(a0), __unwrap(a1))));
}
if (args.length === 2 && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return M.__swig_release_handle(__chk(M._swig_casadi_dae_map_semi_expl_1(__unwrap(a0), __unwrap(a1))));
}
throw new TypeError(`dae_map_semi_expl: no overload matches arg types`);
},
normalized_in(a0, a1) {
return __chk(M._swig_casadi_normalized_in_0(a0, a1));
},
expand(...args) {
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_expand_0(__unwrap(__coerce(a0, DM))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_expand_1(__unwrap(__coerce(a0, SX))));
}
throw new TypeError(`expand: no overload matches arg types`);
},
load_expm(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_load_expm_0(__ps1));
M._free(__ps1);
return __r;
},
has_integrator(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_has_integrator_0(__ps1))));
M._free(__ps1);
return __r;
},
conic_n_in() {
return __chk(M._swig_casadi_conic_n_in_0());
},
solve(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_solve_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
const a3 = {};
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_solve_1(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __ps3, __unwrap(a3))));
M._free(__ps3);
return __r;
}
if (args.length === 4 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && typeof args[2] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_solve_1(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __ps3, __unwrap(a3))));
M._free(__ps3);
return __r;
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_solve_2(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
const a3 = {};
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_solve_3(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __ps3, __unwrap(a3))));
M._free(__ps3);
return __r;
}
if (args.length === 4 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && typeof args[2] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_solve_3(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __ps3, __unwrap(a3))));
M._free(__ps3);
return __r;
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_solve_4(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
const a3 = {};
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_solve_5(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __ps3, __unwrap(a3))));
M._free(__ps3);
return __r;
}
if (args.length === 4 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && typeof args[2] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_solve_5(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __ps3, __unwrap(a3))));
M._free(__ps3);
return __r;
}
throw new TypeError(`solve: no overload matches arg types`);
},
to_slice2(a0) {
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_to_slice2_0(__unwrap(__vp1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
},
interpolant(...args) {
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__vectorT_std__vectorT_double_t_t(__unwrap(args[2])) && M._swig_can_DoubleVector(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const a4 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new DoubleVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_interpolant_0(__ps1, __ps2, __unwrap(a2), __unwrap(__vp4), __unwrap(a4))));
M._free(__ps1);
M._free(__ps2);
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
if (args.length === 5 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__vectorT_std__vectorT_double_t_t(__unwrap(args[2])) && M._swig_can_DoubleVector(__unwrap(args[3])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new DoubleVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_interpolant_0(__ps1, __ps2, __unwrap(a2), __unwrap(__vp4), __unwrap(a4))));
M._free(__ps1);
M._free(__ps2);
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__vectorT_std__vectorT_double_t_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = 1n;
const a4 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_interpolant_1(__ps1, __ps2, __unwrap(a2), BigInt(a3), __unwrap(a4))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__vectorT_std__vectorT_double_t_t(__unwrap(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint')) {
const [a0, a1, a2, a3] = args;
const a4 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_interpolant_1(__ps1, __ps2, __unwrap(a2), BigInt(a3), __unwrap(a4))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 5 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__vectorT_std__vectorT_double_t_t(__unwrap(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint') && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_interpolant_1(__ps1, __ps2, __unwrap(a2), BigInt(a3), __unwrap(a4))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_IntVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = 1n;
const a4 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_interpolant_2(__ps1, __ps2, __unwrap(__vp3), BigInt(a3), __unwrap(a4))));
M._free(__ps1);
M._free(__ps2);
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_IntVector(__unwrap(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint')) {
const [a0, a1, a2, a3] = args;
const a4 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_interpolant_2(__ps1, __ps2, __unwrap(__vp3), BigInt(a3), __unwrap(a4))));
M._free(__ps1);
M._free(__ps2);
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 5 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_IntVector(__unwrap(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint') && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_interpolant_2(__ps1, __ps2, __unwrap(__vp3), BigInt(a3), __unwrap(a4))));
M._free(__ps1);
M._free(__ps2);
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_IntVector(__unwrap(args[2])) && M._swig_can_DoubleVector(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const a4 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new DoubleVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_interpolant_3(__ps1, __ps2, __unwrap(__vp3), __unwrap(__vp4), __unwrap(a4))));
M._free(__ps1);
M._free(__ps2);
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
if (args.length === 5 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_IntVector(__unwrap(args[2])) && M._swig_can_DoubleVector(__unwrap(args[3])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new DoubleVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_interpolant_3(__ps1, __ps2, __unwrap(__vp3), __unwrap(__vp4), __unwrap(a4))));
M._free(__ps1);
M._free(__ps2);
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
throw new TypeError(`interpolant: no overload matches arg types`);
},
linear_coeff(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = true;
return __chk(M._swig_casadi_casadi_linear_coeff_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), a2));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_casadi_linear_coeff_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), a2));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = true;
return __chk(M._swig_casadi_casadi_linear_coeff_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), a2));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_casadi_linear_coeff_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), a2));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = true;
return __chk(M._swig_casadi_casadi_linear_coeff_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), a2));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_casadi_linear_coeff_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), a2));
}
throw new TypeError(`linear_coeff: no overload matches arg types`);
},
is_equal(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = 0n;
return (!!(__chk(M._swig_casadi_casadi_is_equal_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), BigInt(a2)))));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return (!!(__chk(M._swig_casadi_casadi_is_equal_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), BigInt(a2)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = 0n;
return (!!(__chk(M._swig_casadi_casadi_is_equal_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), BigInt(a2)))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return (!!(__chk(M._swig_casadi_casadi_is_equal_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), BigInt(a2)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = 0n;
return (!!(__chk(M._swig_casadi_casadi_is_equal_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), BigInt(a2)))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return (!!(__chk(M._swig_casadi_casadi_is_equal_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), BigInt(a2)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = 0n;
return (!!(__chk(M._swig_casadi_casadi_is_equal_3(a0, a1, BigInt(a2)))));
}
if (args.length === 3 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return (!!(__chk(M._swig_casadi_casadi_is_equal_3(a0, a1, BigInt(a2)))));
}
throw new TypeError(`is_equal: no overload matches arg types`);
},
collocation_interpolators(a0) {
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_collocation_interpolators_0(__unwrap(__vp1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
},
doc_filesystem(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_doc_filesystem_0(__ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
},
sin(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sin_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sin_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sin_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_sin_3(a0));
}
throw new TypeError(`sin: no overload matches arg types`);
},
shared(...args) {
if (args.length === 1 && M._swig_can_MXVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = "v_";
const a2 = "";
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __nps5 = M.lengthBytesUTF8(a1);
const __ps5 = M._malloc(__nps5 + 1);
M.stringToUTF8(a1, __ps5, __nps5 + 1);
const __nps6 = M.lengthBytesUTF8(a2);
const __ps6 = M._malloc(__nps6 + 1);
M.stringToUTF8(a2, __ps6, __nps6 + 1);
const __r = __chk(M._swig_casadi_casadi_shared_0(__unwrap(__vp1), __ps5, __ps6));
if (__vown1 && __vp1.delete) __vp1.delete();
M._free(__ps5);
M._free(__ps6);
return __r;
}
if (args.length === 2 && M._swig_can_MXVector(__unwrap(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const a2 = "";
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __nps5 = M.lengthBytesUTF8(a1);
const __ps5 = M._malloc(__nps5 + 1);
M.stringToUTF8(a1, __ps5, __nps5 + 1);
const __nps6 = M.lengthBytesUTF8(a2);
const __ps6 = M._malloc(__nps6 + 1);
M.stringToUTF8(a2, __ps6, __nps6 + 1);
const __r = __chk(M._swig_casadi_casadi_shared_0(__unwrap(__vp1), __ps5, __ps6));
if (__vown1 && __vp1.delete) __vp1.delete();
M._free(__ps5);
M._free(__ps6);
return __r;
}
if (args.length === 3 && M._swig_can_MXVector(__unwrap(args[0])) && typeof args[1] === 'string' && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __nps5 = M.lengthBytesUTF8(a1);
const __ps5 = M._malloc(__nps5 + 1);
M.stringToUTF8(a1, __ps5, __nps5 + 1);
const __nps6 = M.lengthBytesUTF8(a2);
const __ps6 = M._malloc(__nps6 + 1);
M.stringToUTF8(a2, __ps6, __nps6 + 1);
const __r = __chk(M._swig_casadi_casadi_shared_0(__unwrap(__vp1), __ps5, __ps6));
if (__vown1 && __vp1.delete) __vp1.delete();
M._free(__ps5);
M._free(__ps6);
return __r;
}
if (args.length === 1 && M._swig_can_DMVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = "v_";
const a2 = "";
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __nps5 = M.lengthBytesUTF8(a1);
const __ps5 = M._malloc(__nps5 + 1);
M.stringToUTF8(a1, __ps5, __nps5 + 1);
const __nps6 = M.lengthBytesUTF8(a2);
const __ps6 = M._malloc(__nps6 + 1);
M.stringToUTF8(a2, __ps6, __nps6 + 1);
const __r = __chk(M._swig_casadi_casadi_shared_1(__unwrap(__vp1), __ps5, __ps6));
if (__vown1 && __vp1.delete) __vp1.delete();
M._free(__ps5);
M._free(__ps6);
return __r;
}
if (args.length === 2 && M._swig_can_DMVector(__unwrap(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const a2 = "";
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __nps5 = M.lengthBytesUTF8(a1);
const __ps5 = M._malloc(__nps5 + 1);
M.stringToUTF8(a1, __ps5, __nps5 + 1);
const __nps6 = M.lengthBytesUTF8(a2);
const __ps6 = M._malloc(__nps6 + 1);
M.stringToUTF8(a2, __ps6, __nps6 + 1);
const __r = __chk(M._swig_casadi_casadi_shared_1(__unwrap(__vp1), __ps5, __ps6));
if (__vown1 && __vp1.delete) __vp1.delete();
M._free(__ps5);
M._free(__ps6);
return __r;
}
if (args.length === 3 && M._swig_can_DMVector(__unwrap(args[0])) && typeof args[1] === 'string' && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __nps5 = M.lengthBytesUTF8(a1);
const __ps5 = M._malloc(__nps5 + 1);
M.stringToUTF8(a1, __ps5, __nps5 + 1);
const __nps6 = M.lengthBytesUTF8(a2);
const __ps6 = M._malloc(__nps6 + 1);
M.stringToUTF8(a2, __ps6, __nps6 + 1);
const __r = __chk(M._swig_casadi_casadi_shared_1(__unwrap(__vp1), __ps5, __ps6));
if (__vown1 && __vp1.delete) __vp1.delete();
M._free(__ps5);
M._free(__ps6);
return __r;
}
if (args.length === 1 && M._swig_can_SXVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = "v_";
const a2 = "";
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __nps5 = M.lengthBytesUTF8(a1);
const __ps5 = M._malloc(__nps5 + 1);
M.stringToUTF8(a1, __ps5, __nps5 + 1);
const __nps6 = M.lengthBytesUTF8(a2);
const __ps6 = M._malloc(__nps6 + 1);
M.stringToUTF8(a2, __ps6, __nps6 + 1);
const __r = __chk(M._swig_casadi_casadi_shared_2(__unwrap(__vp1), __ps5, __ps6));
if (__vown1 && __vp1.delete) __vp1.delete();
M._free(__ps5);
M._free(__ps6);
return __r;
}
if (args.length === 2 && M._swig_can_SXVector(__unwrap(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const a2 = "";
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __nps5 = M.lengthBytesUTF8(a1);
const __ps5 = M._malloc(__nps5 + 1);
M.stringToUTF8(a1, __ps5, __nps5 + 1);
const __nps6 = M.lengthBytesUTF8(a2);
const __ps6 = M._malloc(__nps6 + 1);
M.stringToUTF8(a2, __ps6, __nps6 + 1);
const __r = __chk(M._swig_casadi_casadi_shared_2(__unwrap(__vp1), __ps5, __ps6));
if (__vown1 && __vp1.delete) __vp1.delete();
M._free(__ps5);
M._free(__ps6);
return __r;
}
if (args.length === 3 && M._swig_can_SXVector(__unwrap(args[0])) && typeof args[1] === 'string' && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __nps5 = M.lengthBytesUTF8(a1);
const __ps5 = M._malloc(__nps5 + 1);
M.stringToUTF8(a1, __ps5, __nps5 + 1);
const __nps6 = M.lengthBytesUTF8(a2);
const __ps6 = M._malloc(__nps6 + 1);
M.stringToUTF8(a2, __ps6, __nps6 + 1);
const __r = __chk(M._swig_casadi_casadi_shared_2(__unwrap(__vp1), __ps5, __ps6));
if (__vown1 && __vp1.delete) __vp1.delete();
M._free(__ps5);
M._free(__ps6);
return __r;
}
throw new TypeError(`shared: no overload matches arg types`);
},
tril2symm(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_tril2symm_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_tril2symm_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_tril2symm_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`tril2symm: no overload matches arg types`);
},
depends_on(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return (!!(__chk(M._swig_casadi_casadi_depends_on_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX))))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return (!!(__chk(M._swig_casadi_casadi_depends_on_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM))))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return (!!(__chk(M._swig_casadi_casadi_depends_on_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX))))));
}
throw new TypeError(`depends_on: no overload matches arg types`);
},
det(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_det_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const a2 = {};
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_det_1(__unwrap(__coerce(a0, MX)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_det_1(__unwrap(__coerce(a0, MX)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_det_2(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const a2 = {};
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_det_3(__unwrap(__coerce(a0, DM)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_det_3(__unwrap(__coerce(a0, DM)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_det_4(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const a2 = {};
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_det_5(__unwrap(__coerce(a0, SX)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_det_5(__unwrap(__coerce(a0, SX)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
throw new TypeError(`det: no overload matches arg types`);
},
norm_inf_mul(...args) {
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_norm_inf_mul_0(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_norm_inf_mul_1(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
throw new TypeError(`norm_inf_mul: no overload matches arg types`);
},
nlpsol(...args) {
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_nlpsol_0(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_nlpsol_0(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_nlpsol_1(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_nlpsol_1(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_nlpsol_2(__ps1, __ps2, __ps3, __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
M._free(__ps3);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && typeof args[2] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_nlpsol_2(__ps1, __ps2, __ps3, __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
M._free(__ps3);
return __r;
}
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_Importer(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_nlpsol_3(__ps1, __ps2, a2, __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_Importer(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_nlpsol_3(__ps1, __ps2, a2, __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_NlpBuilder(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_nlpsol_4(__ps1, __ps2, a2, __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_NlpBuilder(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_nlpsol_4(__ps1, __ps2, a2, __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_Function(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_nlpsol_5(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_Function(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_nlpsol_5(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
throw new TypeError(`nlpsol: no overload matches arg types`);
},
jacobian_sparsity(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_jacobian_sparsity_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_jacobian_sparsity_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_jacobian_sparsity_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
throw new TypeError(`jacobian_sparsity: no overload matches arg types`);
},
sprank(...args) {
if (args.length === 1 && M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_sprank_0(__unwrap(a0)));
}
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_sprank_1(__unwrap(__coerce(a0, MX))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_sprank_2(__unwrap(__coerce(a0, DM))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_sprank_3(__unwrap(__coerce(a0, SX))));
}
throw new TypeError(`sprank: no overload matches arg types`);
},
cosh(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_cosh_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_cosh_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_cosh_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_cosh_3(a0));
}
throw new TypeError(`cosh: no overload matches arg types`);
},
dot(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_dot_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_dot_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_dot_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
throw new TypeError(`dot: no overload matches arg types`);
},
blocksplit(...args) {
if (args.length === 3 && M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_IntVector(__unwrap(args[1])) && M._swig_can_IntVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_blocksplit_0(__unwrap(a0), __unwrap(__vp2), __unwrap(__vp3)));
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 1 && M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
const a1 = 1n;
const a2 = 1n;
return __chk(M._swig_casadi_casadi_blocksplit_1(__unwrap(a0), BigInt(a1), BigInt(a2)));
}
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = 1n;
return __chk(M._swig_casadi_casadi_blocksplit_1(__unwrap(a0), BigInt(a1), BigInt(a2)));
}
if (args.length === 3 && M._swig_can_Sparsity(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_casadi_blocksplit_1(__unwrap(a0), BigInt(a1), BigInt(a2)));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_IntVector(__unwrap(args[1])) && M._swig_can_IntVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_blocksplit_2(__unwrap(__coerce(a0, MX)), __unwrap(__vp2), __unwrap(__vp3)));
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = 1n;
const a2 = 1n;
return __chk(M._swig_casadi_casadi_blocksplit_3(__unwrap(__coerce(a0, MX)), BigInt(a1), BigInt(a2)));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = 1n;
return __chk(M._swig_casadi_casadi_blocksplit_3(__unwrap(__coerce(a0, MX)), BigInt(a1), BigInt(a2)));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_casadi_blocksplit_3(__unwrap(__coerce(a0, MX)), BigInt(a1), BigInt(a2)));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_IntVector(__unwrap(args[1])) && M._swig_can_IntVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_blocksplit_4(__unwrap(__coerce(a0, DM)), __unwrap(__vp2), __unwrap(__vp3)));
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = 1n;
const a2 = 1n;
return __chk(M._swig_casadi_casadi_blocksplit_5(__unwrap(__coerce(a0, DM)), BigInt(a1), BigInt(a2)));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = 1n;
return __chk(M._swig_casadi_casadi_blocksplit_5(__unwrap(__coerce(a0, DM)), BigInt(a1), BigInt(a2)));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_casadi_blocksplit_5(__unwrap(__coerce(a0, DM)), BigInt(a1), BigInt(a2)));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_IntVector(__unwrap(args[1])) && M._swig_can_IntVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_blocksplit_6(__unwrap(__coerce(a0, SX)), __unwrap(__vp2), __unwrap(__vp3)));
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = 1n;
const a2 = 1n;
return __chk(M._swig_casadi_casadi_blocksplit_7(__unwrap(__coerce(a0, SX)), BigInt(a1), BigInt(a2)));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = 1n;
return __chk(M._swig_casadi_casadi_blocksplit_7(__unwrap(__coerce(a0, SX)), BigInt(a1), BigInt(a2)));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_casadi_blocksplit_7(__unwrap(__coerce(a0, SX)), BigInt(a1), BigInt(a2)));
}
throw new TypeError(`blocksplit: no overload matches arg types`);
},
norm_1(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_norm_1_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_norm_1_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_norm_1_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`norm_1: no overload matches arg types`);
},
norm_2(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_norm_2_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_norm_2_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_norm_2_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`norm_2: no overload matches arg types`);
},
doc_archiver(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_doc_archiver_0(__ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
},
times(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_times_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_times_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_times_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_times_3(a0, a1));
}
throw new TypeError(`times: no overload matches arg types`);
},
forward(...args) {
if (args.length === 3 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_std__vectorT_std__vectorT_casadi__MX_t_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_forward_0(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2), __unwrap(a3)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 4 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_std__vectorT_std__vectorT_casadi__MX_t_t(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_forward_0(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2), __unwrap(a3)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 3 && M._swig_can_DMVector(__unwrap(args[0])) && M._swig_can_DMVector(__unwrap(args[1])) && M._swig_can_std__vectorT_std__vectorT_casadi__MatrixT_double_t_t_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_forward_1(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2), __unwrap(a3)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 4 && M._swig_can_DMVector(__unwrap(args[0])) && M._swig_can_DMVector(__unwrap(args[1])) && M._swig_can_std__vectorT_std__vectorT_casadi__MatrixT_double_t_t_t(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_forward_1(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2), __unwrap(a3)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 3 && M._swig_can_SXVector(__unwrap(args[0])) && M._swig_can_SXVector(__unwrap(args[1])) && M._swig_can_std__vectorT_std__vectorT_casadi__MatrixT_casadi__SXElem_t_t_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new SXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_forward_2(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2), __unwrap(a3)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 4 && M._swig_can_SXVector(__unwrap(args[0])) && M._swig_can_SXVector(__unwrap(args[1])) && M._swig_can_std__vectorT_std__vectorT_casadi__MatrixT_casadi__SXElem_t_t_t(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new SXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_forward_2(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2), __unwrap(a3)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`forward: no overload matches arg types`);
},
tan(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_tan_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_tan_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_tan_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_tan_3(a0));
}
throw new TypeError(`tan: no overload matches arg types`);
},
is_quadratic(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return (!!(__chk(M._swig_casadi_casadi_is_quadratic_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX))))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return (!!(__chk(M._swig_casadi_casadi_is_quadratic_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM))))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return (!!(__chk(M._swig_casadi_casadi_is_quadratic_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX))))));
}
throw new TypeError(`is_quadratic: no overload matches arg types`);
},
is_slice(...args) {
if (args.length === 1 && M._swig_can_IntVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_is_slice_0(__unwrap(__vp1), a1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_IntVector(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_is_slice_0(__unwrap(__vp1), a1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`is_slice: no overload matches arg types`);
},
mod(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mod_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mod_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mod_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_mod_3(a0, a1));
}
throw new TypeError(`mod: no overload matches arg types`);
},
mrdivide(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mrdivide_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mrdivide_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mrdivide_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
throw new TypeError(`mrdivide: no overload matches arg types`);
},
cse(...args) {
if (args.length === 1 && M._swig_can_MXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_cse_0(__unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_cse_1(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && M._swig_can_DMVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_cse_2(__unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_cse_3(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && M._swig_can_SXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_cse_4(__unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_cse_5(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`cse: no overload matches arg types`);
},
kron(...args) {
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_kron_0(__unwrap(a0), __unwrap(a1))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_kron_1(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_kron_2(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_kron_3(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
throw new TypeError(`kron: no overload matches arg types`);
},
integrator_out(...args) {
if (args.length === 0) {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_integrator_out_0())));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_integrator_out_1(BigInt(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
throw new TypeError(`integrator_out: no overload matches arg types`);
},
contains_all(...args) {
if (args.length === 2 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_MXVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_casadi_contains_all_0(__unwrap(__vp1), __unwrap(__vp2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 2 && M._swig_can_DMVector(__unwrap(args[0])) && M._swig_can_DMVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_casadi_contains_all_1(__unwrap(__vp1), __unwrap(__vp2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 2 && M._swig_can_SXVector(__unwrap(args[0])) && M._swig_can_SXVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new SXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_casadi_contains_all_2(__unwrap(__vp1), __unwrap(__vp2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`contains_all: no overload matches arg types`);
},
matrix_expand(...args) {
if (args.length === 1 && M._swig_can_MXVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = [];
const a2 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_matrix_expand_0(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 2 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_MXVector(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_matrix_expand_0(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 3 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_matrix_expand_0(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = [];
const a2 = {};
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_matrix_expand_1(__unwrap(__coerce(a0, MX)), __unwrap(__vp2), __unwrap(a2))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_MXVector(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_matrix_expand_1(__unwrap(__coerce(a0, MX)), __unwrap(__vp2), __unwrap(a2))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_matrix_expand_1(__unwrap(__coerce(a0, MX)), __unwrap(__vp2), __unwrap(a2))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`matrix_expand: no overload matches arg types`);
},
fmin(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_fmin_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_fmin_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_fmin_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_fmin_3(a0, a1));
}
throw new TypeError(`fmin: no overload matches arg types`);
},
doc_linsol(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_doc_linsol_0(__ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
},
tril(...args) {
if (args.length === 1 && M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
const a1 = true;
return __from_handle(__chk(M._swig_casadi_casadi_tril_0(__unwrap(a0), a1)));
}
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_tril_0(__unwrap(a0), a1)));
}
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = true;
return __from_handle(__chk(M._swig_casadi_casadi_tril_1(__unwrap(__coerce(a0, MX)), a1)));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_tril_1(__unwrap(__coerce(a0, MX)), a1)));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = true;
return __from_handle(__chk(M._swig_casadi_casadi_tril_2(__unwrap(__coerce(a0, DM)), a1)));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_tril_2(__unwrap(__coerce(a0, DM)), a1)));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = true;
return __from_handle(__chk(M._swig_casadi_casadi_tril_3(__unwrap(__coerce(a0, SX)), a1)));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_tril_3(__unwrap(__coerce(a0, SX)), a1)));
}
throw new TypeError(`tril: no overload matches arg types`);
},
rootfinder_option_type(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_rootfinder_option_type_0(__ps1, __ps2));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
M._free(__ps2);
return __r;
},
sign(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sign_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sign_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sign_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_sign_3(a0));
}
throw new TypeError(`sign: no overload matches arg types`);
},
has_blas(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_has_blas_0(__ps1))));
M._free(__ps1);
return __r;
},
conic_out(...args) {
if (args.length === 0) {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_conic_out_0())));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_conic_out_1(BigInt(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
throw new TypeError(`conic_out: no overload matches arg types`);
},
sum1(...args) {
if (args.length === 1 && M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sum1_0(__unwrap(a0))));
}
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sum1_1(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sum1_2(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sum1_3(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`sum1: no overload matches arg types`);
},
skew(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_skew_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_skew_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_skew_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`skew: no overload matches arg types`);
},
sum2(...args) {
if (args.length === 1 && M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sum2_0(__unwrap(a0))));
}
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sum2_1(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sum2_2(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sum2_3(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`sum2: no overload matches arg types`);
},
project(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = false;
return __from_handle(__chk(M._swig_casadi_casadi_project_0(__unwrap(__coerce(a0, MX)), __unwrap(a1), a2)));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_Sparsity(__unwrap(args[1])) && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_project_0(__unwrap(__coerce(a0, MX)), __unwrap(a1), a2)));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = false;
return __from_handle(__chk(M._swig_casadi_casadi_project_1(__unwrap(__coerce(a0, DM)), __unwrap(a1), a2)));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_Sparsity(__unwrap(args[1])) && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_project_1(__unwrap(__coerce(a0, DM)), __unwrap(a1), a2)));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = false;
return __from_handle(__chk(M._swig_casadi_casadi_project_2(__unwrap(__coerce(a0, SX)), __unwrap(a1), a2)));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_Sparsity(__unwrap(args[1])) && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_project_2(__unwrap(__coerce(a0, SX)), __unwrap(a1), a2)));
}
throw new TypeError(`project: no overload matches arg types`);
},
reshape(...args) {
if (args.length === 3 && M._swig_can_Sparsity(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_reshape_0(__unwrap(a0), BigInt(a1), BigInt(a2))));
}
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_reshape_1(__unwrap(a0), __unwrap(a1))));
}
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_reshape_2(__unwrap(a0), __unwrap(a1))));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_reshape_3(__unwrap(__coerce(a0, MX)), BigInt(a1), BigInt(a2))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_reshape_4(__unwrap(__coerce(a0, MX)), __unwrap(a1))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_reshape_5(__unwrap(__coerce(a0, MX)), __unwrap(a1))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_reshape_6(__unwrap(__coerce(a0, DM)), BigInt(a1), BigInt(a2))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_reshape_7(__unwrap(__coerce(a0, DM)), __unwrap(a1))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_reshape_8(__unwrap(__coerce(a0, DM)), __unwrap(a1))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_reshape_9(__unwrap(__coerce(a0, SX)), BigInt(a1), BigInt(a2))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__pairT_casadi_int_casadi_int_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_reshape_10(__unwrap(__coerce(a0, SX)), __unwrap(a1))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_reshape_11(__unwrap(__coerce(a0, SX)), __unwrap(a1))));
}
throw new TypeError(`reshape: no overload matches arg types`);
},
soc(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_soc_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_soc_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_soc_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
throw new TypeError(`soc: no overload matches arg types`);
},
log10(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_log10_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_log10_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_log10_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_log10_3(a0));
}
throw new TypeError(`log10: no overload matches arg types`);
},
to_slice(...args) {
if (args.length === 1 && M._swig_can_IntVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_to_slice_0(__unwrap(__vp1), a1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_IntVector(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_to_slice_0(__unwrap(__vp1), a1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`to_slice: no overload matches arg types`);
},
acosh(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_acosh_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_acosh_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_acosh_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_acosh_3(a0));
}
throw new TypeError(`acosh: no overload matches arg types`);
},
triu(...args) {
if (args.length === 1 && M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
const a1 = true;
return __from_handle(__chk(M._swig_casadi_casadi_triu_0(__unwrap(a0), a1)));
}
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_triu_0(__unwrap(a0), a1)));
}
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = true;
return __from_handle(__chk(M._swig_casadi_casadi_triu_1(__unwrap(__coerce(a0, MX)), a1)));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_triu_1(__unwrap(__coerce(a0, MX)), a1)));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = true;
return __from_handle(__chk(M._swig_casadi_casadi_triu_2(__unwrap(__coerce(a0, DM)), a1)));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_triu_2(__unwrap(__coerce(a0, DM)), a1)));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = true;
return __from_handle(__chk(M._swig_casadi_casadi_triu_3(__unwrap(__coerce(a0, SX)), a1)));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_triu_3(__unwrap(__coerce(a0, SX)), a1)));
}
throw new TypeError(`triu: no overload matches arg types`);
},
densify(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_densify_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_densify_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_densify_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`densify: no overload matches arg types`);
},
pinv(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_pinv_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const a2 = {};
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_pinv_1(__unwrap(__coerce(a0, MX)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_pinv_1(__unwrap(__coerce(a0, MX)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_pinv_2(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const a2 = {};
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_pinv_3(__unwrap(__coerce(a0, DM)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_pinv_3(__unwrap(__coerce(a0, DM)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_pinv_4(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const a2 = {};
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_pinv_5(__unwrap(__coerce(a0, SX)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_pinv_5(__unwrap(__coerce(a0, SX)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
throw new TypeError(`pinv: no overload matches arg types`);
},
vec(...args) {
if (args.length === 1 && M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_vec_0(__unwrap(a0))));
}
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_vec_1(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_vec_2(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_vec_3(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`vec: no overload matches arg types`);
},
load_conic(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_load_conic_0(__ps1));
M._free(__ps1);
return __r;
},
quadratic_coeff(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = true;
return __chk(M._swig_casadi_casadi_quadratic_coeff_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), a2));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_casadi_quadratic_coeff_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), a2));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = true;
return __chk(M._swig_casadi_casadi_quadratic_coeff_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), a2));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_casadi_quadratic_coeff_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), a2));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = true;
return __chk(M._swig_casadi_casadi_quadratic_coeff_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), a2));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
return __chk(M._swig_casadi_casadi_quadratic_coeff_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), a2));
}
throw new TypeError(`quadratic_coeff: no overload matches arg types`);
},
acos(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_acos_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_acos_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_acos_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_acos_3(a0));
}
throw new TypeError(`acos: no overload matches arg types`);
},
nlpsol_option_type(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_nlpsol_option_type_0(__ps1, __ps2));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
M._free(__ps2);
return __r;
},
interp1d(...args) {
if (args.length === 3 && M._swig_can_DoubleVector(__unwrap(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_DoubleVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = "linear";
const a4 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new DoubleVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_interp1d_0(__unwrap(__vp1), __unwrap(__coerce(a1, MX)), __unwrap(__vp3), __ps4, a4)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
M._free(__ps4);
return __r;
}
if (args.length === 4 && M._swig_can_DoubleVector(__unwrap(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_DoubleVector(__unwrap(args[2])) && typeof args[3] === 'string') {
const [a0, a1, a2, a3] = args;
const a4 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new DoubleVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_interp1d_0(__unwrap(__vp1), __unwrap(__coerce(a1, MX)), __unwrap(__vp3), __ps4, a4)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
M._free(__ps4);
return __r;
}
if (args.length === 5 && M._swig_can_DoubleVector(__unwrap(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_DoubleVector(__unwrap(args[2])) && typeof args[3] === 'string' && (typeof args[4] === 'boolean')) {
const [a0, a1, a2, a3, a4] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new DoubleVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_interp1d_0(__unwrap(__vp1), __unwrap(__coerce(a1, MX)), __unwrap(__vp3), __ps4, a4)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
M._free(__ps4);
return __r;
}
if (args.length === 3 && M._swig_can_DoubleVector(__unwrap(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_DoubleVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = "linear";
const a4 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new DoubleVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_interp1d_1(__unwrap(__vp1), __unwrap(__coerce(a1, DM)), __unwrap(__vp3), __ps4, a4)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
M._free(__ps4);
return __r;
}
if (args.length === 4 && M._swig_can_DoubleVector(__unwrap(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_DoubleVector(__unwrap(args[2])) && typeof args[3] === 'string') {
const [a0, a1, a2, a3] = args;
const a4 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new DoubleVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_interp1d_1(__unwrap(__vp1), __unwrap(__coerce(a1, DM)), __unwrap(__vp3), __ps4, a4)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
M._free(__ps4);
return __r;
}
if (args.length === 5 && M._swig_can_DoubleVector(__unwrap(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_DoubleVector(__unwrap(args[2])) && typeof args[3] === 'string' && (typeof args[4] === 'boolean')) {
const [a0, a1, a2, a3, a4] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new DoubleVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_interp1d_1(__unwrap(__vp1), __unwrap(__coerce(a1, DM)), __unwrap(__vp3), __ps4, a4)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
M._free(__ps4);
return __r;
}
if (args.length === 3 && M._swig_can_DoubleVector(__unwrap(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_DoubleVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = "linear";
const a4 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new DoubleVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_interp1d_2(__unwrap(__vp1), __unwrap(__coerce(a1, SX)), __unwrap(__vp3), __ps4, a4)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
M._free(__ps4);
return __r;
}
if (args.length === 4 && M._swig_can_DoubleVector(__unwrap(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_DoubleVector(__unwrap(args[2])) && typeof args[3] === 'string') {
const [a0, a1, a2, a3] = args;
const a4 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new DoubleVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_interp1d_2(__unwrap(__vp1), __unwrap(__coerce(a1, SX)), __unwrap(__vp3), __ps4, a4)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
M._free(__ps4);
return __r;
}
if (args.length === 5 && M._swig_can_DoubleVector(__unwrap(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_DoubleVector(__unwrap(args[2])) && typeof args[3] === 'string' && (typeof args[4] === 'boolean')) {
const [a0, a1, a2, a3, a4] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new DoubleVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_interp1d_2(__unwrap(__vp1), __unwrap(__coerce(a1, SX)), __unwrap(__vp3), __ps4, a4)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
M._free(__ps4);
return __r;
}
throw new TypeError(`interp1d: no overload matches arg types`);
},
pw_const(...args) {
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_pw_const_0(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_pw_const_1(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)))));
}
throw new TypeError(`pw_const: no overload matches arg types`);
},
bspline(...args) {
if (args.length === 5 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__vectorT_std__vectorT_double_t_t(__unwrap(args[2])) && M._swig_can_IntVector(__unwrap(args[3])) && (typeof args[4] === 'number' || typeof args[4] === 'bigint')) {
const [a0, a1, a2, a3, a4] = args;
const a5 = {};
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_bspline_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, DM)), __unwrap(a2), __unwrap(__vp4), BigInt(a4), __unwrap(a5))));
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
if (args.length === 6 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__vectorT_std__vectorT_double_t_t(__unwrap(args[2])) && M._swig_can_IntVector(__unwrap(args[3])) && (typeof args[4] === 'number' || typeof args[4] === 'bigint') && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[5]))) {
const [a0, a1, a2, a3, a4, a5] = args;
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_bspline_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, DM)), __unwrap(a2), __unwrap(__vp4), BigInt(a4), __unwrap(a5))));
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
if (args.length === 5 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__vectorT_std__vectorT_double_t_t(__unwrap(args[2])) && M._swig_can_IntVector(__unwrap(args[3])) && (typeof args[4] === 'number' || typeof args[4] === 'bigint')) {
const [a0, a1, a2, a3, a4] = args;
const a5 = {};
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_bspline_1(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(a2), __unwrap(__vp4), BigInt(a4), __unwrap(a5))));
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
if (args.length === 6 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__vectorT_std__vectorT_double_t_t(__unwrap(args[2])) && M._swig_can_IntVector(__unwrap(args[3])) && (typeof args[4] === 'number' || typeof args[4] === 'bigint') && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[5]))) {
const [a0, a1, a2, a3, a4, a5] = args;
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_bspline_1(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(a2), __unwrap(__vp4), BigInt(a4), __unwrap(a5))));
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
if (args.length === 5 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_MXVector(__unwrap(args[2])) && M._swig_can_IntVector(__unwrap(args[3])) && (typeof args[4] === 'number' || typeof args[4] === 'bigint')) {
const [a0, a1, a2, a3, a4] = args;
const a5 = {};
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new MXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_bspline_2(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__vp3), __unwrap(__vp4), BigInt(a4), __unwrap(a5))));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
if (args.length === 6 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_MXVector(__unwrap(args[2])) && M._swig_can_IntVector(__unwrap(args[3])) && (typeof args[4] === 'number' || typeof args[4] === 'bigint') && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[5]))) {
const [a0, a1, a2, a3, a4, a5] = args;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new MXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_bspline_2(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__vp3), __unwrap(__vp4), BigInt(a4), __unwrap(a5))));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
throw new TypeError(`bspline: no overload matches arg types`);
},
dae_init_gen(...args) {
if (args.length === 3 && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[1])) && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
const a3 = {};
const a4 = {};
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_dae_init_gen_0(__unwrap(a0), __unwrap(a1), __ps3, __unwrap(a3), __unwrap(a4))));
M._free(__ps3);
return __r;
}
if (args.length === 4 && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[1])) && typeof args[2] === 'string' && M._swig_can_std__mapT_std__string_casadi__MatrixT_double_t_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const a4 = {};
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_dae_init_gen_0(__unwrap(a0), __unwrap(a1), __ps3, __unwrap(a3), __unwrap(a4))));
M._free(__ps3);
return __r;
}
if (args.length === 5 && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[1])) && typeof args[2] === 'string' && M._swig_can_std__mapT_std__string_casadi__MatrixT_double_t_t(__unwrap(args[3])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_dae_init_gen_0(__unwrap(a0), __unwrap(a1), __ps3, __unwrap(a3), __unwrap(a4))));
M._free(__ps3);
return __r;
}
if (args.length === 3 && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[1])) && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
const a3 = {};
const a4 = {};
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_dae_init_gen_1(__unwrap(a0), __unwrap(a1), __ps3, __unwrap(a3), __unwrap(a4))));
M._free(__ps3);
return __r;
}
if (args.length === 4 && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[1])) && typeof args[2] === 'string' && M._swig_can_std__mapT_std__string_casadi__MatrixT_double_t_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const a4 = {};
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_dae_init_gen_1(__unwrap(a0), __unwrap(a1), __ps3, __unwrap(a3), __unwrap(a4))));
M._free(__ps3);
return __r;
}
if (args.length === 5 && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[0])) && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[1])) && typeof args[2] === 'string' && M._swig_can_std__mapT_std__string_casadi__MatrixT_double_t_t(__unwrap(args[3])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_dae_init_gen_1(__unwrap(a0), __unwrap(a1), __ps3, __unwrap(a3), __unwrap(a4))));
M._free(__ps3);
return __r;
}
throw new TypeError(`dae_init_gen: no overload matches arg types`);
},
load_dple(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_load_dple_0(__ps1));
M._free(__ps1);
return __r;
},
rootfinder_n_in() {
return __chk(M._swig_casadi_rootfinder_n_in_0());
},
conic_option_type(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_conic_option_type_0(__ps1, __ps2));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
M._free(__ps2);
return __r;
},
load_nlpsol(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_load_nlpsol_0(__ps1));
M._free(__ps1);
return __r;
},
mpower(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mpower_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mpower_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mpower_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
throw new TypeError(`mpower: no overload matches arg types`);
},
norm_0_mul(...args) {
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_norm_0_mul_0(__unwrap(a0), __unwrap(a1)));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_norm_0_mul_1(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_norm_0_mul_2(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_norm_0_mul_3(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX))));
}
throw new TypeError(`norm_0_mul: no overload matches arg types`);
},
constpow(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_constpow_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_constpow_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_constpow_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_constpow_3(a0, a1));
}
throw new TypeError(`constpow: no overload matches arg types`);
},
ldl(...args) {
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = true;
return __chk(M._swig_casadi_casadi_ldl_0(__unwrap(__coerce(a0, DM)), a1));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_ldl_0(__unwrap(__coerce(a0, DM)), a1));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = true;
return __chk(M._swig_casadi_casadi_ldl_1(__unwrap(__coerce(a0, SX)), a1));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_ldl_1(__unwrap(__coerce(a0, SX)), a1));
}
throw new TypeError(`ldl: no overload matches arg types`);
},
doc_interpolant(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_doc_interpolant_0(__ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
},
ceil(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_ceil_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_ceil_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_ceil_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_ceil_3(a0));
}
throw new TypeError(`ceil: no overload matches arg types`);
},
has_nlpsol(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_has_nlpsol_0(__ps1))));
M._free(__ps1);
return __r;
},
offset(...args) {
if (args.length === 1 && M._swig_can_SparsityVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = true;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SparsityVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_offset_0(__unwrap(__vp1), a1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_SparsityVector(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SparsityVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_offset_0(__unwrap(__vp1), a1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_MXVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = true;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_offset_1(__unwrap(__vp1), a1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_MXVector(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_offset_1(__unwrap(__vp1), a1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_DMVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = true;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_offset_2(__unwrap(__vp1), a1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_DMVector(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_offset_2(__unwrap(__vp1), a1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_SXVector(__unwrap(args[0]))) {
const [a0] = args;
const a1 = true;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_offset_3(__unwrap(__vp1), a1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 2 && M._swig_can_SXVector(__unwrap(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_offset_3(__unwrap(__vp1), a1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`offset: no overload matches arg types`);
},
norm_fro(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_norm_fro_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_norm_fro_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_norm_fro_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`norm_fro: no overload matches arg types`);
},
n_nodes(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_n_nodes_0(__unwrap(__coerce(a0, MX))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_n_nodes_1(__unwrap(__coerce(a0, DM))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_n_nodes_2(__unwrap(__coerce(a0, SX))));
}
throw new TypeError(`n_nodes: no overload matches arg types`);
},
normalized_setup(...args) {
if (args.length === 1) {
const [a0] = args;
return __chk(M._swig_casadi_normalized_setup_0(a0));
}
if (args.length === 0) {
const [] = args;
return __chk(M._swig_casadi_normalized_setup_1());
}
throw new TypeError(`normalized_setup: no overload matches arg types`);
},
mac(...args) {
if (args.length === 3 && M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_Sparsity(__unwrap(args[1])) && M._swig_can_Sparsity(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = "reference";
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mac_0(__unwrap(a0), __unwrap(a1), __unwrap(a2), __ps4)));
M._free(__ps4);
return __r;
}
if (args.length === 4 && M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_Sparsity(__unwrap(args[1])) && M._swig_can_Sparsity(__unwrap(args[2])) && typeof args[3] === 'string') {
const [a0, a1, a2, a3] = args;
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mac_0(__unwrap(a0), __unwrap(a1), __unwrap(a2), __ps4)));
M._free(__ps4);
return __r;
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
const a3 = "reference";
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mac_1(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)), __ps4)));
M._free(__ps4);
return __r;
}
if (args.length === 4 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && typeof args[3] === 'string') {
const [a0, a1, a2, a3] = args;
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mac_1(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)), __ps4)));
M._free(__ps4);
return __r;
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
const a3 = "reference";
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mac_2(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), __ps4)));
M._free(__ps4);
return __r;
}
if (args.length === 4 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && typeof args[3] === 'string') {
const [a0, a1, a2, a3] = args;
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mac_2(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), __ps4)));
M._free(__ps4);
return __r;
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
const a3 = "reference";
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mac_3(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), __ps4)));
M._free(__ps4);
return __r;
}
if (args.length === 4 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && typeof args[3] === 'string') {
const [a0, a1, a2, a3] = args;
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_mac_3(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), __ps4)));
M._free(__ps4);
return __r;
}
throw new TypeError(`mac: no overload matches arg types`);
},
ge(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_ge_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_ge_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_ge_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_ge_3(a0, a1));
}
throw new TypeError(`ge: no overload matches arg types`);
},
nlpsol_n_out() {
return __chk(M._swig_casadi_nlpsol_n_out_0());
},
inv_skew(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_inv_skew_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_inv_skew_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_inv_skew_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`inv_skew: no overload matches arg types`);
},
unite(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_unite_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_unite_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_unite_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
throw new TypeError(`unite: no overload matches arg types`);
},
jacobian(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __from_handle(__chk(M._swig_casadi_casadi_jacobian_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(a2))));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_jacobian_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(a2))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __from_handle(__chk(M._swig_casadi_casadi_jacobian_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(a2))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_jacobian_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(a2))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __from_handle(__chk(M._swig_casadi_casadi_jacobian_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(a2))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_jacobian_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(a2))));
}
throw new TypeError(`jacobian: no overload matches arg types`);
},
le(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_le_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_le_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_le_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_le_3(a0, a1));
}
throw new TypeError(`le: no overload matches arg types`);
},
erf(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_erf_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_erf_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_erf_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_erf_3(a0));
}
throw new TypeError(`erf: no overload matches arg types`);
},
has_filesystem(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_has_filesystem_0(__ps1))));
M._free(__ps1);
return __r;
},
index_interp1d(...args) {
if (args.length === 2 && M._swig_can_DoubleVector(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_index_interp1d_0(__unwrap(__vp1), a1, a2));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 3 && M._swig_can_DoubleVector(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'boolean')) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_index_interp1d_0(__unwrap(__vp1), a1, a2));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`index_interp1d: no overload matches arg types`);
},
nlpsol_in(...args) {
if (args.length === 0) {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_nlpsol_in_0())));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_nlpsol_in_1(BigInt(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
throw new TypeError(`nlpsol_in: no overload matches arg types`);
},
sparsity_cast(...args) {
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sparsity_cast_0(__unwrap(a0), __unwrap(a1))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sparsity_cast_1(__unwrap(__coerce(a0, MX)), __unwrap(a1))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sparsity_cast_2(__unwrap(__coerce(a0, DM)), __unwrap(a1))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_Sparsity(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sparsity_cast_3(__unwrap(__coerce(a0, SX)), __unwrap(a1))));
}
throw new TypeError(`sparsity_cast: no overload matches arg types`);
},
fmod(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_fmod_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_fmod_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_fmod_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_fmod_3(a0, a1));
}
throw new TypeError(`fmod: no overload matches arg types`);
},
inv(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_inv_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const a2 = {};
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_inv_1(__unwrap(__coerce(a0, MX)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_inv_1(__unwrap(__coerce(a0, MX)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_inv_2(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const a2 = {};
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_inv_3(__unwrap(__coerce(a0, DM)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_inv_3(__unwrap(__coerce(a0, DM)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_inv_4(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const a2 = {};
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_inv_5(__unwrap(__coerce(a0, SX)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_casadi_inv_5(__unwrap(__coerce(a0, SX)), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
throw new TypeError(`inv: no overload matches arg types`);
},
no_hess(a0) {
return __from_handle(__chk(M._swig_casadi_casadi_no_hess_0(__unwrap(__coerce(a0, MX)))));
},
erfinv(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_erfinv_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_erfinv_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_erfinv_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_erfinv_3(a0));
}
throw new TypeError(`erfinv: no overload matches arg types`);
},
complement(a0, a1) {
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_complement_0(__unwrap(__vp1), BigInt(a1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
},
conic(...args) {
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__Sparsity_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_conic_0(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__Sparsity_t(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_conic_0(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
throw new TypeError(`conic: no overload matches arg types`);
},
expm_const(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_expm_const_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_expm_const_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_expm_const_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
throw new TypeError(`expm_const: no overload matches arg types`);
},
dple_out(...args) {
if (args.length === 0) {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_dple_out_0())));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_dple_out_1(BigInt(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
throw new TypeError(`dple_out: no overload matches arg types`);
},
expm_n_out() {
return __chk(M._swig_casadi_expm_n_out_0());
},
polyval(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_polyval_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_polyval_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_polyval_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
throw new TypeError(`polyval: no overload matches arg types`);
},
external_transform(...args) {
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_Function(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_external_transform_0(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_Function(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_external_transform_0(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
throw new TypeError(`external_transform: no overload matches arg types`);
},
has_archiver(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_has_archiver_0(__ps1))));
M._free(__ps1);
return __r;
},
inv_node(a0) {
return __from_handle(__chk(M._swig_casadi_casadi_inv_node_0(__unwrap(__coerce(a0, MX)))));
},
load_rootfinder(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_load_rootfinder_0(__ps1));
M._free(__ps1);
return __r;
},
linearize(...args) {
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_linearize_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_linearize_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_linearize_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)))));
}
throw new TypeError(`linearize: no overload matches arg types`);
},
detect_simple_bounds(...args) {
if (args.length === 5 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_SX(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3])) && (M._swig_can_SX(__unwrap(args[4])) || typeof args[4] === 'number' || typeof args[4] === 'bigint' || Array.isArray(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
return __chk(M._swig_casadi_detect_simple_bounds_0(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), __unwrap(__coerce(a3, SX)), __unwrap(__coerce(a4, SX))));
}
if (args.length === 5 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_MX(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3])) && (M._swig_can_MX(__unwrap(args[4])) || typeof args[4] === 'number' || typeof args[4] === 'bigint' || Array.isArray(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
return __chk(M._swig_casadi_detect_simple_bounds_1(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)), __unwrap(__coerce(a3, MX)), __unwrap(__coerce(a4, MX))));
}
throw new TypeError(`detect_simple_bounds: no overload matches arg types`);
},
doc_rootfinder(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_doc_rootfinder_0(__ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
},
atan2(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_atan2_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_atan2_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_atan2_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_atan2_3(a0, a1));
}
throw new TypeError(`atan2: no overload matches arg types`);
},
collocation_coeff(a0) {
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DoubleVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __chk(M._swig_casadi_collocation_coeff_0(__unwrap(__vp1)));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
},
event_in() {
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_event_in_0())));
},
gt(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_gt_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_gt_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_gt_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_gt_3(a0, a1));
}
throw new TypeError(`gt: no overload matches arg types`);
},
rootfinder_n_out() {
return __chk(M._swig_casadi_rootfinder_n_out_0());
},
nlpsol_default_in(...args) {
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_nlpsol_default_in_0(BigInt(a0)));
}
if (args.length === 0) {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_nlpsol_default_in_1())));
}
throw new TypeError(`nlpsol_default_in: no overload matches arg types`);
},
blazing_spline(...args) {
if (args.length === 2 && typeof args[0] === 'string' && M._swig_can_std__vectorT_std__vectorT_double_t_t(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_blazing_spline_0(__ps1, __unwrap(a1), __unwrap(a2))));
M._free(__ps1);
return __r;
}
if (args.length === 3 && typeof args[0] === 'string' && M._swig_can_std__vectorT_std__vectorT_double_t_t(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_blazing_spline_0(__ps1, __unwrap(a1), __unwrap(a2))));
M._free(__ps1);
return __r;
}
if (args.length === 2 && typeof args[0] === 'string' && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_blazing_spline_1(__ps1, __unwrap(__vp2), __unwrap(a2))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 3 && typeof args[0] === 'string' && M._swig_can_IntVector(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_blazing_spline_1(__ps1, __unwrap(__vp2), __unwrap(a2))));
M._free(__ps1);
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`blazing_spline: no overload matches arg types`);
},
dple_n_out() {
return __chk(M._swig_casadi_dple_n_out_0());
},
poly_roots(...args) {
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_poly_roots_0(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_poly_roots_1(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`poly_roots: no overload matches arg types`);
},
find(a0) {
return __from_handle(__chk(M._swig_casadi_casadi_find_0(__unwrap(__coerce(a0, MX)))));
},
lt(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_lt_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_lt_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_lt_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_lt_3(a0, a1));
}
throw new TypeError(`lt: no overload matches arg types`);
},
qr(...args) {
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_qr_0(__unwrap(__coerce(a0, DM))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_qr_1(__unwrap(__coerce(a0, SX))));
}
throw new TypeError(`qr: no overload matches arg types`);
},
qr_solve(...args) {
if (args.length === 6 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_DM(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3])) && M._swig_can_IntVector(__unwrap(args[4])) && M._swig_can_IntVector(__unwrap(args[5]))) {
const [a0, a1, a2, a3, a4, a5] = args;
const a6 = false;
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new IntVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
let __vp6 = a5;
let __vown6 = false;
if (Array.isArray(a5)) {
__vp6 = new IntVector();
__vown6 = true;
for (const __x of a5) __vp6.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_qr_solve_0(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), __unwrap(__coerce(a3, DM)), __unwrap(__vp5), __unwrap(__vp6), a6)));
if (__vown5 && __vp5.delete) __vp5.delete();
if (__vown6 && __vp6.delete) __vp6.delete();
return __r;
}
if (args.length === 7 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_DM(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3])) && M._swig_can_IntVector(__unwrap(args[4])) && M._swig_can_IntVector(__unwrap(args[5])) && (typeof args[6] === 'boolean')) {
const [a0, a1, a2, a3, a4, a5, a6] = args;
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new IntVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
let __vp6 = a5;
let __vown6 = false;
if (Array.isArray(a5)) {
__vp6 = new IntVector();
__vown6 = true;
for (const __x of a5) __vp6.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_qr_solve_0(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), __unwrap(__coerce(a3, DM)), __unwrap(__vp5), __unwrap(__vp6), a6)));
if (__vown5 && __vp5.delete) __vp5.delete();
if (__vown6 && __vp6.delete) __vp6.delete();
return __r;
}
if (args.length === 6 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_SX(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3])) && M._swig_can_IntVector(__unwrap(args[4])) && M._swig_can_IntVector(__unwrap(args[5]))) {
const [a0, a1, a2, a3, a4, a5] = args;
const a6 = false;
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new IntVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
let __vp6 = a5;
let __vown6 = false;
if (Array.isArray(a5)) {
__vp6 = new IntVector();
__vown6 = true;
for (const __x of a5) __vp6.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_qr_solve_1(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), __unwrap(__coerce(a3, SX)), __unwrap(__vp5), __unwrap(__vp6), a6)));
if (__vown5 && __vp5.delete) __vp5.delete();
if (__vown6 && __vp6.delete) __vp6.delete();
return __r;
}
if (args.length === 7 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_SX(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3])) && M._swig_can_IntVector(__unwrap(args[4])) && M._swig_can_IntVector(__unwrap(args[5])) && (typeof args[6] === 'boolean')) {
const [a0, a1, a2, a3, a4, a5, a6] = args;
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new IntVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
let __vp6 = a5;
let __vown6 = false;
if (Array.isArray(a5)) {
__vp6 = new IntVector();
__vown6 = true;
for (const __x of a5) __vp6.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_qr_solve_1(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), __unwrap(__coerce(a3, SX)), __unwrap(__vp5), __unwrap(__vp6), a6)));
if (__vown5 && __vp5.delete) __vp5.delete();
if (__vown6 && __vp6.delete) __vp6.delete();
return __r;
}
throw new TypeError(`qr_solve: no overload matches arg types`);
},
sparsify(...args) {
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = 0;
return __from_handle(__chk(M._swig_casadi_casadi_sparsify_0(__unwrap(__coerce(a0, DM)), a1)));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sparsify_0(__unwrap(__coerce(a0, DM)), a1)));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = 0;
return __from_handle(__chk(M._swig_casadi_casadi_sparsify_1(__unwrap(__coerce(a0, SX)), a1)));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sparsify_1(__unwrap(__coerce(a0, SX)), a1)));
}
throw new TypeError(`sparsify: no overload matches arg types`);
},
power(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_power_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_power_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_power_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_power_3(a0, a1));
}
throw new TypeError(`power: no overload matches arg types`);
},
all(...args) {
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_all_0(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_all_1(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`all: no overload matches arg types`);
},
conditional(...args) {
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
const a3 = false;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_conditional_0(__unwrap(__coerce(a0, MX)), __unwrap(__vp2), __unwrap(__coerce(a2, MX)), a3)));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 4 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'boolean')) {
const [a0, a1, a2, a3] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_conditional_0(__unwrap(__coerce(a0, MX)), __unwrap(__vp2), __unwrap(__coerce(a2, MX)), a3)));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_DMVector(__unwrap(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
const a3 = false;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_conditional_1(__unwrap(__coerce(a0, DM)), __unwrap(__vp2), __unwrap(__coerce(a2, DM)), a3)));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 4 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_DMVector(__unwrap(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'boolean')) {
const [a0, a1, a2, a3] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_conditional_1(__unwrap(__coerce(a0, DM)), __unwrap(__vp2), __unwrap(__coerce(a2, DM)), a3)));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_SXVector(__unwrap(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
const a3 = false;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new SXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_conditional_2(__unwrap(__coerce(a0, SX)), __unwrap(__vp2), __unwrap(__coerce(a2, SX)), a3)));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 4 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_SXVector(__unwrap(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'boolean')) {
const [a0, a1, a2, a3] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new SXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_conditional_2(__unwrap(__coerce(a0, SX)), __unwrap(__vp2), __unwrap(__coerce(a2, SX)), a3)));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`conditional: no overload matches arg types`);
},
eig_symbolic(...args) {
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_eig_symbolic_0(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_eig_symbolic_1(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`eig_symbolic: no overload matches arg types`);
},
cos(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_cos_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_cos_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_cos_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_cos_3(a0));
}
throw new TypeError(`cos: no overload matches arg types`);
},
doc_expm(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_doc_expm_0(__ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
},
abs(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_abs_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_abs_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_abs_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_abs_3(a0));
}
throw new TypeError(`abs: no overload matches arg types`);
},
pw_lin(...args) {
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_pw_lin_0(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_pw_lin_1(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)))));
}
throw new TypeError(`pw_lin: no overload matches arg types`);
},
heaviside(...args) {
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_heaviside_0(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_heaviside_1(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`heaviside: no overload matches arg types`);
},
load_blas(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_load_blas_0(__ps1));
M._free(__ps1);
return __r;
},
load_integrator(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_load_integrator_0(__ps1));
M._free(__ps1);
return __r;
},
norm_inf(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_norm_inf_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_norm_inf_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_norm_inf_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`norm_inf: no overload matches arg types`);
},
vertsplit(...args) {
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_vertsplit_0(__unwrap(a0), __unwrap(__vp2)))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 1 && M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
const a1 = 1n;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_vertsplit_1(__unwrap(a0), BigInt(a1)))));
}
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_vertsplit_1(__unwrap(a0), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_vertsplit_2(__unwrap(__coerce(a0, MX)), __unwrap(__vp2)))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = 1n;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_vertsplit_3(__unwrap(__coerce(a0, MX)), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_vertsplit_3(__unwrap(__coerce(a0, MX)), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_vertsplit_4(__unwrap(__coerce(a0, DM)), __unwrap(__vp2)))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = 1n;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_vertsplit_5(__unwrap(__coerce(a0, DM)), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_vertsplit_5(__unwrap(__coerce(a0, DM)), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_vertsplit_6(__unwrap(__coerce(a0, SX)), __unwrap(__vp2)))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = 1n;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_vertsplit_7(__unwrap(__coerce(a0, SX)), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_vertsplit_7(__unwrap(__coerce(a0, SX)), BigInt(a1)))));
}
throw new TypeError(`vertsplit: no overload matches arg types`);
},
log(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_log_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_log_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_log_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_log_3(a0));
}
throw new TypeError(`log: no overload matches arg types`);
},
mmin(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mmin_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mmin_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mmin_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`mmin: no overload matches arg types`);
},
ramp(...args) {
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_ramp_0(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_ramp_1(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`ramp: no overload matches arg types`);
},
sum(...args) {
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sum_0(__unwrap(a0), BigInt(a1))));
}
if (args.length === 1 && M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sum_1(__unwrap(a0))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sum_2(__unwrap(__coerce(a0, MX)), BigInt(a1))));
}
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sum_3(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sum_4(__unwrap(__coerce(a0, DM)), BigInt(a1))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sum_5(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sum_6(__unwrap(__coerce(a0, SX)), BigInt(a1))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sum_7(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`sum: no overload matches arg types`);
},
doc_integrator(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_doc_integrator_0(__ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
},
ldivide(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_ldivide_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_ldivide_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_ldivide_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_ldivide_3(a0, a1));
}
throw new TypeError(`ldivide: no overload matches arg types`);
},
conic_in(...args) {
if (args.length === 0) {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_conic_in_0())));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_conic_in_1(BigInt(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
throw new TypeError(`conic_in: no overload matches arg types`);
},
diagcat(...args) {
if (args.length === 1 && M._swig_can_SparsityVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SparsityVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_diagcat_0(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_MXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_diagcat_1(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_DMVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_diagcat_2(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_SXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_diagcat_3(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`diagcat: no overload matches arg types`);
},
dple_n_in() {
return __chk(M._swig_casadi_dple_n_in_0());
},
rdivide(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_rdivide_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_rdivide_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_rdivide_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_rdivide_3(a0, a1));
}
throw new TypeError(`rdivide: no overload matches arg types`);
},
nlpsol_n_in() {
return __chk(M._swig_casadi_nlpsol_n_in_0());
},
horzsplit_n(...args) {
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_horzsplit_n_0(__unwrap(a0), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_horzsplit_n_1(__unwrap(__coerce(a0, MX)), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_horzsplit_n_2(__unwrap(__coerce(a0, DM)), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_horzsplit_n_3(__unwrap(__coerce(a0, SX)), BigInt(a1)))));
}
throw new TypeError(`horzsplit_n: no overload matches arg types`);
},
expm_n_in() {
return __chk(M._swig_casadi_expm_n_in_0());
},
rootfinder_option_info(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_rootfinder_option_info_0(__ps1, __ps2));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
M._free(__ps2);
return __r;
},
temporary_file(...args) {
if (args.length === 2 && typeof args[0] === 'string' && typeof args[1] === 'string') {
const [a0, a1] = args;
const a2 = "";
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_temporary_file_0(__ps1, __ps2, __ps3));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
M._free(__ps2);
M._free(__ps3);
return __r;
}
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_temporary_file_0(__ps1, __ps2, __ps3));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
M._free(__ps2);
M._free(__ps3);
return __r;
}
throw new TypeError(`temporary_file: no overload matches arg types`);
},
gradient(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __from_handle(__chk(M._swig_casadi_casadi_gradient_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(a2))));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_gradient_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(a2))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __from_handle(__chk(M._swig_casadi_casadi_gradient_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(a2))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_gradient_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(a2))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __from_handle(__chk(M._swig_casadi_casadi_gradient_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(a2))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_gradient_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(a2))));
}
throw new TypeError(`gradient: no overload matches arg types`);
},
chol(...args) {
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_chol_0(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_chol_1(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`chol: no overload matches arg types`);
},
horzsplit(...args) {
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_horzsplit_0(__unwrap(a0), __unwrap(__vp2)))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 1 && M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
const a1 = 1n;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_horzsplit_1(__unwrap(a0), BigInt(a1)))));
}
if (args.length === 2 && M._swig_can_Sparsity(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_horzsplit_1(__unwrap(a0), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_horzsplit_2(__unwrap(__coerce(a0, MX)), __unwrap(__vp2)))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = 1n;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_horzsplit_3(__unwrap(__coerce(a0, MX)), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_horzsplit_3(__unwrap(__coerce(a0, MX)), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_horzsplit_4(__unwrap(__coerce(a0, DM)), __unwrap(__vp2)))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = 1n;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_horzsplit_5(__unwrap(__coerce(a0, DM)), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_horzsplit_5(__unwrap(__coerce(a0, DM)), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_IntVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new IntVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_horzsplit_6(__unwrap(__coerce(a0, SX)), __unwrap(__vp2)))));
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = 1n;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_horzsplit_7(__unwrap(__coerce(a0, SX)), BigInt(a1)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_horzsplit_7(__unwrap(__coerce(a0, SX)), BigInt(a1)))));
}
throw new TypeError(`horzsplit: no overload matches arg types`);
},
sinh(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sinh_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sinh_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sinh_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_sinh_3(a0));
}
throw new TypeError(`sinh: no overload matches arg types`);
},
cross(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = -1n;
return __from_handle(__chk(M._swig_casadi_casadi_cross_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), BigInt(a2))));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_cross_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), BigInt(a2))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = -1n;
return __from_handle(__chk(M._swig_casadi_casadi_cross_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), BigInt(a2))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_cross_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), BigInt(a2))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = -1n;
return __from_handle(__chk(M._swig_casadi_casadi_cross_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), BigInt(a2))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_cross_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), BigInt(a2))));
}
throw new TypeError(`cross: no overload matches arg types`);
},
rootfinder_in(...args) {
if (args.length === 0) {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_rootfinder_in_0())));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_rootfinder_in_1(BigInt(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
throw new TypeError(`rootfinder_in: no overload matches arg types`);
},
rootfinder(...args) {
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_rootfinder_0(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_rootfinder_0(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_rootfinder_1(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_rootfinder_1(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_Function(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_rootfinder_2(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_Function(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_rootfinder_2(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
throw new TypeError(`rootfinder: no overload matches arg types`);
},
low(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = {};
return __from_handle(__chk(M._swig_casadi_casadi_low_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(a2))));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_low_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(a2))));
}
throw new TypeError(`low: no overload matches arg types`);
},
conic_options(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_conic_options_0(__ps1))));
M._free(__ps1);
return __r;
},
dyn_out(...args) {
if (args.length === 0) {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_dyn_out_0())));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_dyn_out_1(BigInt(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
throw new TypeError(`dyn_out: no overload matches arg types`);
},
exp(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_exp_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_exp_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_exp_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_exp_3(a0));
}
throw new TypeError(`exp: no overload matches arg types`);
},
tanh(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_tanh_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_tanh_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_tanh_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_tanh_3(a0));
}
throw new TypeError(`tanh: no overload matches arg types`);
},
is_linear(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return (!!(__chk(M._swig_casadi_casadi_is_linear_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX))))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return (!!(__chk(M._swig_casadi_casadi_is_linear_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM))))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return (!!(__chk(M._swig_casadi_casadi_is_linear_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX))))));
}
throw new TypeError(`is_linear: no overload matches arg types`);
},
sumsqr(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sumsqr_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sumsqr_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_sumsqr_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`sumsqr: no overload matches arg types`);
},
lookupvector(...args) {
if (args.length === 2 && M._swig_can_IntVector(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_lookupvector_0(__unwrap(__vp1), BigInt(a1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_IntVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_lookupvector_1(__unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`lookupvector: no overload matches arg types`);
},
vertcat(...args) {
if (args.length === 1 && M._swig_can_SparsityVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SparsityVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_vertcat_0(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_MXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_vertcat_1(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_DMVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_vertcat_2(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_SXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_vertcat_3(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`vertcat: no overload matches arg types`);
},
nlpsol_option_info(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_nlpsol_option_info_0(__ps1, __ps2));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
M._free(__ps2);
return __r;
},
expm(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_expm_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_expm_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_expm_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`expm: no overload matches arg types`);
},
evalf(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_evalf_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_evalf_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_evalf_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`evalf: no overload matches arg types`);
},
mtaylor(...args) {
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
const a3 = 1n;
return __from_handle(__chk(M._swig_casadi_casadi_mtaylor_0(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), BigInt(a3))));
}
if (args.length === 4 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint')) {
const [a0, a1, a2, a3] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mtaylor_0(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), BigInt(a3))));
}
if (args.length === 5 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint') && M._swig_can_IntVector(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new IntVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtaylor_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), BigInt(a3), __unwrap(__vp5))));
if (__vown5 && __vp5.delete) __vp5.delete();
return __r;
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
const a3 = 1n;
return __from_handle(__chk(M._swig_casadi_casadi_mtaylor_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), BigInt(a3))));
}
if (args.length === 4 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint')) {
const [a0, a1, a2, a3] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mtaylor_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), BigInt(a3))));
}
if (args.length === 5 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint') && M._swig_can_IntVector(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new IntVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_mtaylor_3(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), BigInt(a3), __unwrap(__vp5))));
if (__vown5 && __vp5.delete) __vp5.delete();
return __r;
}
throw new TypeError(`mtaylor: no overload matches arg types`);
},
which_depends(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = 1n;
const a3 = false;
return __chk(M._swig_casadi_casadi_which_depends_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), BigInt(a2), a3));
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
const a3 = false;
return __chk(M._swig_casadi_casadi_which_depends_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), BigInt(a2), a3));
}
if (args.length === 4 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && (typeof args[3] === 'boolean')) {
const [a0, a1, a2, a3] = args;
return __chk(M._swig_casadi_casadi_which_depends_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), BigInt(a2), a3));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = 1n;
const a3 = false;
return __chk(M._swig_casadi_casadi_which_depends_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), BigInt(a2), a3));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
const a3 = false;
return __chk(M._swig_casadi_casadi_which_depends_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), BigInt(a2), a3));
}
if (args.length === 4 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && (typeof args[3] === 'boolean')) {
const [a0, a1, a2, a3] = args;
return __chk(M._swig_casadi_casadi_which_depends_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), BigInt(a2), a3));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = 1n;
const a3 = false;
return __chk(M._swig_casadi_casadi_which_depends_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), BigInt(a2), a3));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
const a3 = false;
return __chk(M._swig_casadi_casadi_which_depends_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), BigInt(a2), a3));
}
if (args.length === 4 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && (typeof args[3] === 'boolean')) {
const [a0, a1, a2, a3] = args;
return __chk(M._swig_casadi_casadi_which_depends_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), BigInt(a2), a3));
}
throw new TypeError(`which_depends: no overload matches arg types`);
},
fmax(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_fmax_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_fmax_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_fmax_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_fmax_3(a0, a1));
}
throw new TypeError(`fmax: no overload matches arg types`);
},
blockcat(...args) {
if (args.length === 4 && M._swig_can_Sparsity(__unwrap(args[0])) && M._swig_can_Sparsity(__unwrap(args[1])) && M._swig_can_Sparsity(__unwrap(args[2])) && M._swig_can_Sparsity(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
return __from_handle(__chk(M._swig_casadi_casadi_blockcat_0(__unwrap(a0), __unwrap(a1), __unwrap(a2), __unwrap(a3))));
}
if (args.length === 4 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_MX(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3]))) {
const [a0, a1, a2, a3] = args;
return __from_handle(__chk(M._swig_casadi_casadi_blockcat_1(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)), __unwrap(__coerce(a3, MX)))));
}
if (args.length === 4 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_DM(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3]))) {
const [a0, a1, a2, a3] = args;
return __from_handle(__chk(M._swig_casadi_casadi_blockcat_2(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), __unwrap(__coerce(a3, DM)))));
}
if (args.length === 4 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_SX(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3]))) {
const [a0, a1, a2, a3] = args;
return __from_handle(__chk(M._swig_casadi_casadi_blockcat_3(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), __unwrap(__coerce(a3, SX)))));
}
if (args.length === 1 && M._swig_can_std__vectorT_std__vectorT_casadi__MX_t_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_blockcat_4(__unwrap(a0))));
}
if (args.length === 1 && M._swig_can_std__vectorT_std__vectorT_casadi__MatrixT_double_t_t_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_blockcat_5(__unwrap(a0))));
}
if (args.length === 1 && M._swig_can_std__vectorT_std__vectorT_casadi__MatrixT_casadi__SXElem_t_t_t(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_blockcat_6(__unwrap(a0))));
}
throw new TypeError(`blockcat: no overload matches arg types`);
},
difference(a0, a1) {
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_difference_0(__unwrap(__vp1), __unwrap(__vp2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
},
conic_option_info(a0, a1) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_conic_option_info_0(__ps1, __ps2));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
M._free(__ps2);
return __r;
},
rootfinder_out(...args) {
if (args.length === 0) {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_rootfinder_out_0())));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_rootfinder_out_1(BigInt(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
throw new TypeError(`rootfinder_out: no overload matches arg types`);
},
log1p(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_log1p_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_log1p_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_log1p_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_log1p_3(a0));
}
throw new TypeError(`log1p: no overload matches arg types`);
},
bilin(...args) {
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_bilin_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_bilin_1(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_bilin_2(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_bilin_3(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_bilin_4(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_bilin_5(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
throw new TypeError(`bilin: no overload matches arg types`);
},
veccat(...args) {
if (args.length === 1 && M._swig_can_SparsityVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SparsityVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_veccat_0(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_MXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_veccat_1(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_DMVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_veccat_2(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
if (args.length === 1 && M._swig_can_SXVector(__unwrap(args[0]))) {
const [a0] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_veccat_3(__unwrap(__vp1))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
}
throw new TypeError(`veccat: no overload matches arg types`);
},
expm1(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_expm1_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_expm1_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_expm1_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_expm1_3(a0));
}
throw new TypeError(`expm1: no overload matches arg types`);
},
kron_contract(a0, a1, a2) {
return __from_handle(__chk(M._swig_casadi_kron_contract_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), a2)));
},
contains_any(...args) {
if (args.length === 2 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_MXVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_casadi_contains_any_0(__unwrap(__vp1), __unwrap(__vp2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 2 && M._swig_can_DMVector(__unwrap(args[0])) && M._swig_can_DMVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_casadi_contains_any_1(__unwrap(__vp1), __unwrap(__vp2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 2 && M._swig_can_SXVector(__unwrap(args[0])) && M._swig_can_SXVector(__unwrap(args[1]))) {
const [a0, a1] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new SXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_casadi_contains_any_2(__unwrap(__vp1), __unwrap(__vp2)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`contains_any: no overload matches arg types`);
},
doc_dple(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_doc_dple_0(__ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
},
substitute(...args) {
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_substitute_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)))));
}
if (args.length === 3 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_MXVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new MXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_substitute_1(__unwrap(__vp1), __unwrap(__vp2), __unwrap(__vp3)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_substitute_2(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)))));
}
if (args.length === 3 && M._swig_can_DMVector(__unwrap(args[0])) && M._swig_can_DMVector(__unwrap(args[1])) && M._swig_can_DMVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new DMVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_substitute_3(__unwrap(__vp1), __unwrap(__vp2), __unwrap(__vp3)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_substitute_4(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)))));
}
if (args.length === 3 && M._swig_can_SXVector(__unwrap(args[0])) && M._swig_can_SXVector(__unwrap(args[1])) && M._swig_can_SXVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new SXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new SXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_substitute_5(__unwrap(__vp1), __unwrap(__vp2), __unwrap(__vp3)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
throw new TypeError(`substitute: no overload matches arg types`);
},
rank1(...args) {
if (args.length === 4 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_MX(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3]))) {
const [a0, a1, a2, a3] = args;
return __from_handle(__chk(M._swig_casadi_casadi_rank1_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)), __unwrap(__coerce(a3, MX)))));
}
if (args.length === 4 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_DM(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3]))) {
const [a0, a1, a2, a3] = args;
return __from_handle(__chk(M._swig_casadi_casadi_rank1_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), __unwrap(__coerce(a3, DM)))));
}
if (args.length === 4 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (M._swig_can_SX(__unwrap(args[3])) || typeof args[3] === 'number' || typeof args[3] === 'bigint' || Array.isArray(args[3]))) {
const [a0, a1, a2, a3] = args;
return __from_handle(__chk(M._swig_casadi_casadi_rank1_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), __unwrap(__coerce(a3, SX)))));
}
throw new TypeError(`rank1: no overload matches arg types`);
},
ldl_solve(...args) {
if (args.length === 4 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && M._swig_can_IntVector(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_ldl_solve_0(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), __unwrap(__vp4))));
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
if (args.length === 4 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && M._swig_can_IntVector(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_ldl_solve_1(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), __unwrap(__vp4))));
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
throw new TypeError(`ldl_solve: no overload matches arg types`);
},
remainder(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_remainder_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_remainder_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_remainder_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_remainder_3(a0, a1));
}
throw new TypeError(`remainder: no overload matches arg types`);
},
plus(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_plus_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_plus_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_plus_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_plus_3(a0, a1));
}
throw new TypeError(`plus: no overload matches arg types`);
},
load_archiver(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_load_archiver_0(__ps1));
M._free(__ps1);
return __r;
},
integrator(...args) {
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_integrator_0(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_integrator_0(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_integrator_1(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_integrator_1(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_Function(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_integrator_2(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_Function(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_integrator_2(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 5 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint') && M._swig_can_DoubleVector(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
const a5 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new DoubleVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_integrator_3(__ps1, __ps2, __unwrap(a2), a3, __unwrap(__vp5), __unwrap(a5))));
M._free(__ps1);
M._free(__ps2);
if (__vown5 && __vp5.delete) __vp5.delete();
return __r;
}
if (args.length === 6 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint') && M._swig_can_DoubleVector(__unwrap(args[4])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[5]))) {
const [a0, a1, a2, a3, a4, a5] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new DoubleVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_integrator_3(__ps1, __ps2, __unwrap(a2), a3, __unwrap(__vp5), __unwrap(a5))));
M._free(__ps1);
M._free(__ps2);
if (__vown5 && __vp5.delete) __vp5.delete();
return __r;
}
if (args.length === 5 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint') && M._swig_can_DoubleVector(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
const a5 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new DoubleVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_integrator_4(__ps1, __ps2, __unwrap(a2), a3, __unwrap(__vp5), __unwrap(a5))));
M._free(__ps1);
M._free(__ps2);
if (__vown5 && __vp5.delete) __vp5.delete();
return __r;
}
if (args.length === 6 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint') && M._swig_can_DoubleVector(__unwrap(args[4])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[5]))) {
const [a0, a1, a2, a3, a4, a5] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new DoubleVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_integrator_4(__ps1, __ps2, __unwrap(a2), a3, __unwrap(__vp5), __unwrap(a5))));
M._free(__ps1);
M._free(__ps2);
if (__vown5 && __vp5.delete) __vp5.delete();
return __r;
}
if (args.length === 5 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_Function(__unwrap(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint') && M._swig_can_DoubleVector(__unwrap(args[4]))) {
const [a0, a1, a2, a3, a4] = args;
const a5 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new DoubleVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_integrator_5(__ps1, __ps2, __unwrap(a2), a3, __unwrap(__vp5), __unwrap(a5))));
M._free(__ps1);
M._free(__ps2);
if (__vown5 && __vp5.delete) __vp5.delete();
return __r;
}
if (args.length === 6 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_Function(__unwrap(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint') && M._swig_can_DoubleVector(__unwrap(args[4])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[5]))) {
const [a0, a1, a2, a3, a4, a5] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
let __vp5 = a4;
let __vown5 = false;
if (Array.isArray(a4)) {
__vp5 = new DoubleVector();
__vown5 = true;
for (const __x of a4) __vp5.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_integrator_5(__ps1, __ps2, __unwrap(a2), a3, __unwrap(__vp5), __unwrap(a5))));
M._free(__ps1);
M._free(__ps2);
if (__vown5 && __vp5.delete) __vp5.delete();
return __r;
}
if (args.length === 5 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint') && (typeof args[4] === 'number' || typeof args[4] === 'bigint')) {
const [a0, a1, a2, a3, a4] = args;
const a5 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_integrator_6(__ps1, __ps2, __unwrap(a2), a3, a4, __unwrap(a5))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 6 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint') && (typeof args[4] === 'number' || typeof args[4] === 'bigint') && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[5]))) {
const [a0, a1, a2, a3, a4, a5] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_integrator_6(__ps1, __ps2, __unwrap(a2), a3, a4, __unwrap(a5))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 5 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint') && (typeof args[4] === 'number' || typeof args[4] === 'bigint')) {
const [a0, a1, a2, a3, a4] = args;
const a5 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_integrator_7(__ps1, __ps2, __unwrap(a2), a3, a4, __unwrap(a5))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 6 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint') && (typeof args[4] === 'number' || typeof args[4] === 'bigint') && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[5]))) {
const [a0, a1, a2, a3, a4, a5] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_integrator_7(__ps1, __ps2, __unwrap(a2), a3, a4, __unwrap(a5))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 5 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_Function(__unwrap(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint') && (typeof args[4] === 'number' || typeof args[4] === 'bigint')) {
const [a0, a1, a2, a3, a4] = args;
const a5 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_integrator_8(__ps1, __ps2, __unwrap(a2), a3, a4, __unwrap(a5))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 6 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_Function(__unwrap(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint') && (typeof args[4] === 'number' || typeof args[4] === 'bigint') && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[5]))) {
const [a0, a1, a2, a3, a4, a5] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_integrator_8(__ps1, __ps2, __unwrap(a2), a3, a4, __unwrap(a5))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
throw new TypeError(`integrator: no overload matches arg types`);
},
integrator_n_out() {
return __chk(M._swig_casadi_integrator_n_out_0());
},
floor(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_floor_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_floor_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_floor_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_floor_3(a0));
}
throw new TypeError(`floor: no overload matches arg types`);
},
simpleIntegrator(...args) {
if (args.length === 1 && M._swig_can_Function(__unwrap(args[0]))) {
const [a0] = args;
const a1 = "cvodes";
const a2 = {};
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_simpleIntegrator_0(__unwrap(a0), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
if (args.length === 2 && M._swig_can_Function(__unwrap(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const a2 = {};
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_simpleIntegrator_0(__unwrap(a0), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
if (args.length === 3 && M._swig_can_Function(__unwrap(args[0])) && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_simpleIntegrator_0(__unwrap(a0), __ps2, __unwrap(a2))));
M._free(__ps2);
return __r;
}
throw new TypeError(`simpleIntegrator: no overload matches arg types`);
},
asinh(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_asinh_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_asinh_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_asinh_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_asinh_3(a0));
}
throw new TypeError(`asinh: no overload matches arg types`);
},
load_linsol(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_load_linsol_0(__ps1));
M._free(__ps1);
return __r;
},
hypot(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_hypot_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_hypot_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_hypot_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_hypot_3(a0, a1));
}
throw new TypeError(`hypot: no overload matches arg types`);
},
dyn_n_out() {
return __chk(M._swig_casadi_dyn_n_out_0());
},
simpleRK(...args) {
if (args.length === 1 && M._swig_can_Function(__unwrap(args[0]))) {
const [a0] = args;
const a1 = 10n;
const a2 = 4n;
return __from_handle(__chk(M._swig_casadi_simpleRK_0(__unwrap(a0), BigInt(a1), BigInt(a2))));
}
if (args.length === 2 && M._swig_can_Function(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = 4n;
return __from_handle(__chk(M._swig_casadi_simpleRK_0(__unwrap(a0), BigInt(a1), BigInt(a2))));
}
if (args.length === 3 && M._swig_can_Function(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_simpleRK_0(__unwrap(a0), BigInt(a1), BigInt(a2))));
}
throw new TypeError(`simpleRK: no overload matches arg types`);
},
external(...args) {
if (args.length === 1 && typeof args[0] === 'string') {
const [a0] = args;
const a1 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_external_0(__ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
if (args.length === 2 && typeof args[0] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_external_0(__ps1, __unwrap(a1))));
M._free(__ps1);
return __r;
}
if (args.length === 2 && typeof args[0] === 'string' && typeof args[1] === 'string') {
const [a0, a1] = args;
const a2 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_external_1(__ps1, __ps2, __unwrap(a2))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_external_1(__ps1, __ps2, __unwrap(a2))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 2 && typeof args[0] === 'string' && M._swig_can_Importer(__unwrap(args[1]))) {
const [a0, a1] = args;
const a2 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_external_2(__ps1, a1, __unwrap(a2))));
M._free(__ps1);
return __r;
}
if (args.length === 3 && typeof args[0] === 'string' && M._swig_can_Importer(__unwrap(args[1])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __from_handle(__chk(M._swig_casadi_external_2(__ps1, a1, __unwrap(a2))));
M._free(__ps1);
return __r;
}
throw new TypeError(`external: no overload matches arg types`);
},
rootfinder_options(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_rootfinder_options_0(__ps1))));
M._free(__ps1);
return __r;
},
minor(...args) {
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_minor_0(__unwrap(__coerce(a0, DM)), BigInt(a1), BigInt(a2))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
return __from_handle(__chk(M._swig_casadi_casadi_minor_1(__unwrap(__coerce(a0, SX)), BigInt(a1), BigInt(a2))));
}
throw new TypeError(`minor: no overload matches arg types`);
},
transpose(...args) {
if (args.length === 1 && M._swig_can_Sparsity(__unwrap(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_transpose_0(__unwrap(a0))));
}
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_transpose_1(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_transpose_2(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_transpose_3(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`transpose: no overload matches arg types`);
},
cumsum(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = -1n;
return __from_handle(__chk(M._swig_casadi_casadi_cumsum_0(__unwrap(__coerce(a0, MX)), BigInt(a1))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_cumsum_0(__unwrap(__coerce(a0, MX)), BigInt(a1))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = -1n;
return __from_handle(__chk(M._swig_casadi_casadi_cumsum_1(__unwrap(__coerce(a0, DM)), BigInt(a1))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_cumsum_1(__unwrap(__coerce(a0, DM)), BigInt(a1))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = -1n;
return __from_handle(__chk(M._swig_casadi_casadi_cumsum_2(__unwrap(__coerce(a0, SX)), BigInt(a1))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_cumsum_2(__unwrap(__coerce(a0, SX)), BigInt(a1))));
}
throw new TypeError(`cumsum: no overload matches arg types`);
},
rectangle(...args) {
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_rectangle_0(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_rectangle_1(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`rectangle: no overload matches arg types`);
},
atanh(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_atanh_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_atanh_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_atanh_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_atanh_3(a0));
}
throw new TypeError(`atanh: no overload matches arg types`);
},
ne(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_ne_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_ne_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_ne_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_ne_3(a0, a1));
}
throw new TypeError(`ne: no overload matches arg types`);
},
trace(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_trace_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_trace_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_trace_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`trace: no overload matches arg types`);
},
normalized_out(a0) {
return __chk(M._swig_casadi_normalized_out_0(a0));
},
if_else(...args) {
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
const a3 = false;
return __from_handle(__chk(M._swig_casadi_casadi_if_else_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)), a3)));
}
if (args.length === 4 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_MX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'boolean')) {
const [a0, a1, a2, a3] = args;
return __from_handle(__chk(M._swig_casadi_casadi_if_else_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __unwrap(__coerce(a2, MX)), a3)));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
const a3 = false;
return __from_handle(__chk(M._swig_casadi_casadi_if_else_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), a3)));
}
if (args.length === 4 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'boolean')) {
const [a0, a1, a2, a3] = args;
return __from_handle(__chk(M._swig_casadi_casadi_if_else_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), a3)));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
const a3 = false;
return __from_handle(__chk(M._swig_casadi_casadi_if_else_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), a3)));
}
if (args.length === 4 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'boolean')) {
const [a0, a1, a2, a3] = args;
return __from_handle(__chk(M._swig_casadi_casadi_if_else_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), a3)));
}
throw new TypeError(`if_else: no overload matches arg types`);
},
simpleIRK(...args) {
if (args.length === 1 && M._swig_can_Function(__unwrap(args[0]))) {
const [a0] = args;
const a1 = 10n;
const a2 = 4n;
const a3 = "radau";
const a4 = "newton";
const a5 = {};
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __nps5 = M.lengthBytesUTF8(a4);
const __ps5 = M._malloc(__nps5 + 1);
M.stringToUTF8(a4, __ps5, __nps5 + 1);
const __r = __from_handle(__chk(M._swig_casadi_simpleIRK_0(__unwrap(a0), BigInt(a1), BigInt(a2), __ps4, __ps5, __unwrap(a5))));
M._free(__ps4);
M._free(__ps5);
return __r;
}
if (args.length === 2 && M._swig_can_Function(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
const a2 = 4n;
const a3 = "radau";
const a4 = "newton";
const a5 = {};
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __nps5 = M.lengthBytesUTF8(a4);
const __ps5 = M._malloc(__nps5 + 1);
M.stringToUTF8(a4, __ps5, __nps5 + 1);
const __r = __from_handle(__chk(M._swig_casadi_simpleIRK_0(__unwrap(a0), BigInt(a1), BigInt(a2), __ps4, __ps5, __unwrap(a5))));
M._free(__ps4);
M._free(__ps5);
return __r;
}
if (args.length === 3 && M._swig_can_Function(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint')) {
const [a0, a1, a2] = args;
const a3 = "radau";
const a4 = "newton";
const a5 = {};
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __nps5 = M.lengthBytesUTF8(a4);
const __ps5 = M._malloc(__nps5 + 1);
M.stringToUTF8(a4, __ps5, __nps5 + 1);
const __r = __from_handle(__chk(M._swig_casadi_simpleIRK_0(__unwrap(a0), BigInt(a1), BigInt(a2), __ps4, __ps5, __unwrap(a5))));
M._free(__ps4);
M._free(__ps5);
return __r;
}
if (args.length === 4 && M._swig_can_Function(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && typeof args[3] === 'string') {
const [a0, a1, a2, a3] = args;
const a4 = "newton";
const a5 = {};
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __nps5 = M.lengthBytesUTF8(a4);
const __ps5 = M._malloc(__nps5 + 1);
M.stringToUTF8(a4, __ps5, __nps5 + 1);
const __r = __from_handle(__chk(M._swig_casadi_simpleIRK_0(__unwrap(a0), BigInt(a1), BigInt(a2), __ps4, __ps5, __unwrap(a5))));
M._free(__ps4);
M._free(__ps5);
return __r;
}
if (args.length === 5 && M._swig_can_Function(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && typeof args[3] === 'string' && typeof args[4] === 'string') {
const [a0, a1, a2, a3, a4] = args;
const a5 = {};
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __nps5 = M.lengthBytesUTF8(a4);
const __ps5 = M._malloc(__nps5 + 1);
M.stringToUTF8(a4, __ps5, __nps5 + 1);
const __r = __from_handle(__chk(M._swig_casadi_simpleIRK_0(__unwrap(a0), BigInt(a1), BigInt(a2), __ps4, __ps5, __unwrap(a5))));
M._free(__ps4);
M._free(__ps5);
return __r;
}
if (args.length === 6 && M._swig_can_Function(__unwrap(args[0])) && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && typeof args[3] === 'string' && typeof args[4] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[5]))) {
const [a0, a1, a2, a3, a4, a5] = args;
const __nps4 = M.lengthBytesUTF8(a3);
const __ps4 = M._malloc(__nps4 + 1);
M.stringToUTF8(a3, __ps4, __nps4 + 1);
const __nps5 = M.lengthBytesUTF8(a4);
const __ps5 = M._malloc(__nps5 + 1);
M.stringToUTF8(a4, __ps5, __nps5 + 1);
const __r = __from_handle(__chk(M._swig_casadi_simpleIRK_0(__unwrap(a0), BigInt(a1), BigInt(a2), __ps4, __ps5, __unwrap(a5))));
M._free(__ps4);
M._free(__ps5);
return __r;
}
throw new TypeError(`simpleIRK: no overload matches arg types`);
},
nlpsol_out(...args) {
if (args.length === 0) {
const [] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_nlpsol_out_0())));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return (()=>{const __p=__chk(M._swig_casadi_nlpsol_out_1(BigInt(a0)));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
}
throw new TypeError(`nlpsol_out: no overload matches arg types`);
},
qpsol(...args) {
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_qpsol_0(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MatrixT_casadi__SXElem_t_t(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_qpsol_0(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_qpsol_1(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__MX_t(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_qpsol_1(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
throw new TypeError(`qpsol: no overload matches arg types`);
},
collocation_points(...args) {
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
const a1 = "radau";
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_collocation_points_0(BigInt(a0), __ps2))));
M._free(__ps2);
return __r;
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && typeof args[1] === 'string') {
const [a0, a1] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_collocation_points_0(BigInt(a0), __ps2))));
M._free(__ps2);
return __r;
}
throw new TypeError(`collocation_points: no overload matches arg types`);
},
load_filesystem(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = __chk(M._swig_casadi_load_filesystem_0(__ps1));
M._free(__ps1);
return __r;
},
substitute_inplace(...args) {
if (args.length === 3 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_MXVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new MXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_substitute_inplace_0(__unwrap(__vp1), __unwrap(__vp2), __unwrap(__vp3), a3));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 4 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_MXVector(__unwrap(args[2])) && (typeof args[3] === 'boolean')) {
const [a0, a1, a2, a3] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new MXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_substitute_inplace_0(__unwrap(__vp1), __unwrap(__vp2), __unwrap(__vp3), a3));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 3 && M._swig_can_DMVector(__unwrap(args[0])) && M._swig_can_DMVector(__unwrap(args[1])) && M._swig_can_DMVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new DMVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_substitute_inplace_1(__unwrap(__vp1), __unwrap(__vp2), __unwrap(__vp3), a3));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 4 && M._swig_can_DMVector(__unwrap(args[0])) && M._swig_can_DMVector(__unwrap(args[1])) && M._swig_can_DMVector(__unwrap(args[2])) && (typeof args[3] === 'boolean')) {
const [a0, a1, a2, a3] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new DMVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_substitute_inplace_1(__unwrap(__vp1), __unwrap(__vp2), __unwrap(__vp3), a3));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 3 && M._swig_can_SXVector(__unwrap(args[0])) && M._swig_can_SXVector(__unwrap(args[1])) && M._swig_can_SXVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = false;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new SXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new SXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_substitute_inplace_2(__unwrap(__vp1), __unwrap(__vp2), __unwrap(__vp3), a3));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 4 && M._swig_can_SXVector(__unwrap(args[0])) && M._swig_can_SXVector(__unwrap(args[1])) && M._swig_can_SXVector(__unwrap(args[2])) && (typeof args[3] === 'boolean')) {
const [a0, a1, a2, a3] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new SXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new SXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_substitute_inplace_2(__unwrap(__vp1), __unwrap(__vp2), __unwrap(__vp3), a3));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
throw new TypeError(`substitute_inplace: no overload matches arg types`);
},
taylor(...args) {
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = 0;
const a3 = 1n;
return __from_handle(__chk(M._swig_casadi_casadi_taylor_0(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), BigInt(a3))));
}
if (args.length === 3 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
const a3 = 1n;
return __from_handle(__chk(M._swig_casadi_casadi_taylor_0(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), BigInt(a3))));
}
if (args.length === 4 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_DM(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint')) {
const [a0, a1, a2, a3] = args;
return __from_handle(__chk(M._swig_casadi_casadi_taylor_0(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)), __unwrap(__coerce(a2, DM)), BigInt(a3))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
const a2 = 0;
const a3 = 1n;
return __from_handle(__chk(M._swig_casadi_casadi_taylor_1(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), BigInt(a3))));
}
if (args.length === 3 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2]))) {
const [a0, a1, a2] = args;
const a3 = 1n;
return __from_handle(__chk(M._swig_casadi_casadi_taylor_1(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), BigInt(a3))));
}
if (args.length === 4 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && (M._swig_can_SX(__unwrap(args[2])) || typeof args[2] === 'number' || typeof args[2] === 'bigint' || Array.isArray(args[2])) && (typeof args[3] === 'number' || typeof args[3] === 'bigint')) {
const [a0, a1, a2, a3] = args;
return __from_handle(__chk(M._swig_casadi_casadi_taylor_1(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)), __unwrap(__coerce(a2, SX)), BigInt(a3))));
}
throw new TypeError(`taylor: no overload matches arg types`);
},
doc_nlpsol(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (()=>{const __p=__chk(M._swig_casadi_doc_nlpsol_0(__ps1));const __s=M.UTF8ToString(__p);M._free(__p);return __s;})();
M._free(__ps1);
return __r;
},
has_interpolant(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_has_interpolant_0(__ps1))));
M._free(__ps1);
return __r;
},
simplify(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_simplify_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_simplify_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_simplify_2(__unwrap(__coerce(a0, SX)))));
}
if (args.length === 1 && (typeof args[0] === 'number' || typeof args[0] === 'bigint')) {
const [a0] = args;
return __chk(M._swig_casadi_casadi_simplify_3(a0));
}
throw new TypeError(`simplify: no overload matches arg types`);
},
symvar(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_symvar_0(__unwrap(__coerce(a0, MX))))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_symvar_1(__unwrap(__coerce(a0, DM))))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_symvar_2(__unwrap(__coerce(a0, SX))))));
}
throw new TypeError(`symvar: no overload matches arg types`);
},
reverse(...args) {
if (args.length === 3 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_std__vectorT_std__vectorT_casadi__MX_t_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_reverse_0(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2), __unwrap(a3)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 4 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_std__vectorT_std__vectorT_casadi__MX_t_t(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_reverse_0(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2), __unwrap(a3)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 3 && M._swig_can_DMVector(__unwrap(args[0])) && M._swig_can_DMVector(__unwrap(args[1])) && M._swig_can_std__vectorT_std__vectorT_casadi__MatrixT_double_t_t_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_reverse_1(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2), __unwrap(a3)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 4 && M._swig_can_DMVector(__unwrap(args[0])) && M._swig_can_DMVector(__unwrap(args[1])) && M._swig_can_std__vectorT_std__vectorT_casadi__MatrixT_double_t_t_t(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_reverse_1(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2), __unwrap(a3)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 3 && M._swig_can_SXVector(__unwrap(args[0])) && M._swig_can_SXVector(__unwrap(args[1])) && M._swig_can_std__vectorT_std__vectorT_casadi__MatrixT_casadi__SXElem_t_t_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new SXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_reverse_2(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2), __unwrap(a3)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
if (args.length === 4 && M._swig_can_SXVector(__unwrap(args[0])) && M._swig_can_SXVector(__unwrap(args[1])) && M._swig_can_std__vectorT_std__vectorT_casadi__MatrixT_casadi__SXElem_t_t_t(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new SXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new SXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __r = __chk(M._swig_casadi_casadi_reverse_2(__unwrap(__vp1), __unwrap(__vp2), __unwrap(a2), __unwrap(a3)));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
return __r;
}
throw new TypeError(`reverse: no overload matches arg types`);
},
convexify(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = {};
return __from_handle(__chk(M._swig_casadi_casadi_convexify_0(__unwrap(__coerce(a0, MX)), __unwrap(a1))));
}
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_convexify_0(__unwrap(__coerce(a0, MX)), __unwrap(a1))));
}
throw new TypeError(`convexify: no overload matches arg types`);
},
hash_sparsity(...args) {
if (args.length === 4 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && M._swig_can_IntVector(__unwrap(args[2])) && M._swig_can_IntVector(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new IntVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
let __vp4 = a3;
let __vown4 = false;
if (Array.isArray(a3)) {
__vp4 = new IntVector();
__vown4 = true;
for (const __x of a3) __vp4.push_back(__x);
}
const __r = __chk(M._swig_casadi_hash_sparsity_0(BigInt(a0), BigInt(a1), __unwrap(__vp3), __unwrap(__vp4)));
if (__vown3 && __vp3.delete) __vp3.delete();
if (__vown4 && __vp4.delete) __vp4.delete();
return __r;
}
if (args.length === 4 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint') && (typeof args[2] === 'number' || typeof args[2] === 'bigint') && (typeof args[3] === 'number' || typeof args[3] === 'bigint')) {
const [a0, a1, a2, a3] = args;
return __chk(M._swig_casadi_hash_sparsity_1(BigInt(a0), BigInt(a1), a2, a3));
}
throw new TypeError(`hash_sparsity: no overload matches arg types`);
},
and(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_and_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_and_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_and_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_and_3(a0, a1));
}
throw new TypeError(`and: no overload matches arg types`);
},
copysign(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_copysign_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_copysign_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_copysign_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
if (args.length === 2 && (typeof args[0] === 'number' || typeof args[0] === 'bigint') && (typeof args[1] === 'number' || typeof args[1] === 'bigint')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_copysign_3(a0, a1));
}
throw new TypeError(`copysign: no overload matches arg types`);
},
expmsol(...args) {
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_Sparsity(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_expmsol_0(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_Sparsity(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_expmsol_0(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
throw new TypeError(`expmsol: no overload matches arg types`);
},
has_expm(a0) {
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __r = (!!(__chk(M._swig_casadi_has_expm_0(__ps1))));
M._free(__ps1);
return __r;
},
adj(...args) {
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_adj_0(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_adj_1(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`adj: no overload matches arg types`);
},
qr_sparse(...args) {
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = true;
return __chk(M._swig_casadi_casadi_qr_sparse_0(__unwrap(__coerce(a0, DM)), a1));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_qr_sparse_0(__unwrap(__coerce(a0, DM)), a1));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
const a1 = true;
return __chk(M._swig_casadi_casadi_qr_sparse_1(__unwrap(__coerce(a0, SX)), a1));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (typeof args[1] === 'boolean')) {
const [a0, a1] = args;
return __chk(M._swig_casadi_casadi_qr_sparse_1(__unwrap(__coerce(a0, SX)), a1));
}
throw new TypeError(`qr_sparse: no overload matches arg types`);
},
graph_substitute(...args) {
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_MXVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new MXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __from_handle(__chk(M._swig_casadi_casadi_graph_substitute_0(__unwrap(__coerce(a0, MX)), __unwrap(__vp2), __unwrap(__vp3))));
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
if (args.length === 3 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && M._swig_can_MXVector(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
let __vp3 = a2;
let __vown3 = false;
if (Array.isArray(a2)) {
__vp3 = new MXVector();
__vown3 = true;
for (const __x of a2) __vp3.push_back(__x);
}
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_casadi_graph_substitute_1(__unwrap(__vp1), __unwrap(__vp2), __unwrap(__vp3)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
if (__vown3 && __vp3.delete) __vp3.delete();
return __r;
}
throw new TypeError(`graph_substitute: no overload matches arg types`);
},
dplesol(...args) {
if (args.length === 3 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__Sparsity_t(__unwrap(args[2]))) {
const [a0, a1, a2] = args;
const a3 = {};
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_dplesol_0(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 4 && typeof args[0] === 'string' && typeof args[1] === 'string' && M._swig_can_std__mapT_std__string_casadi__Sparsity_t(__unwrap(args[2])) && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps1 = M.lengthBytesUTF8(a0);
const __ps1 = M._malloc(__nps1 + 1);
M.stringToUTF8(a0, __ps1, __nps1 + 1);
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __from_handle(__chk(M._swig_casadi_dplesol_0(__ps1, __ps2, __unwrap(a2), __unwrap(a3))));
M._free(__ps1);
M._free(__ps2);
return __r;
}
if (args.length === 3 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
const a3 = {};
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_dplesol_1(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __ps3, __unwrap(a3))));
M._free(__ps3);
return __r;
}
if (args.length === 4 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1])) && typeof args[2] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __from_handle(__chk(M._swig_casadi_dplesol_1(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)), __ps3, __unwrap(a3))));
M._free(__ps3);
return __r;
}
if (args.length === 3 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
const a3 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_dplesol_2(__unwrap(__vp1), __unwrap(__vp2), __ps3, __unwrap(a3)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
M._free(__ps3);
return __r;
}
if (args.length === 4 && M._swig_can_MXVector(__unwrap(args[0])) && M._swig_can_MXVector(__unwrap(args[1])) && typeof args[2] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new MXVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new MXVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_dplesol_2(__unwrap(__vp1), __unwrap(__vp2), __ps3, __unwrap(a3)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
M._free(__ps3);
return __r;
}
if (args.length === 3 && M._swig_can_DMVector(__unwrap(args[0])) && M._swig_can_DMVector(__unwrap(args[1])) && typeof args[2] === 'string') {
const [a0, a1, a2] = args;
const a3 = {};
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_dplesol_3(__unwrap(__vp1), __unwrap(__vp2), __ps3, __unwrap(a3)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
M._free(__ps3);
return __r;
}
if (args.length === 4 && M._swig_can_DMVector(__unwrap(args[0])) && M._swig_can_DMVector(__unwrap(args[1])) && typeof args[2] === 'string' && M._swig_can_std__mapT_std__string_casadi__GenericType_t(__unwrap(args[3]))) {
const [a0, a1, a2, a3] = args;
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new DMVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
let __vp2 = a1;
let __vown2 = false;
if (Array.isArray(a1)) {
__vp2 = new DMVector();
__vown2 = true;
for (const __x of a1) __vp2.push_back(__x);
}
const __nps3 = M.lengthBytesUTF8(a2);
const __ps3 = M._malloc(__nps3 + 1);
M.stringToUTF8(a2, __ps3, __nps3 + 1);
const __r = __vec_to_arr(__from_handle(__chk(M._swig_casadi_dplesol_3(__unwrap(__vp1), __unwrap(__vp2), __ps3, __unwrap(a3)))));
if (__vown1 && __vp1.delete) __vp1.delete();
if (__vown2 && __vp2.delete) __vp2.delete();
M._free(__ps3);
return __r;
}
throw new TypeError(`dplesol: no overload matches arg types`);
},
is_slice2(a0) {
let __vp1 = a0;
let __vown1 = false;
if (Array.isArray(a0)) {
__vp1 = new IntVector();
__vown1 = true;
for (const __x of a0) __vp1.push_back(__x);
}
const __r = (!!(__chk(M._swig_casadi_is_slice2_0(__unwrap(__vp1)))));
if (__vown1 && __vp1.delete) __vp1.delete();
return __r;
},
conic_n_out() {
return __chk(M._swig_casadi_conic_n_out_0());
},
conic_debug(...args) {
if (args.length === 2 && M._swig_can_Function(__unwrap(args[0])) && typeof args[1] === 'string') {
const [a0, a1] = args;
const __nps2 = M.lengthBytesUTF8(a1);
const __ps2 = M._malloc(__nps2 + 1);
M.stringToUTF8(a1, __ps2, __nps2 + 1);
const __r = __chk(M._swig_casadi_conic_debug_0(__unwrap(a0), __ps2));
M._free(__ps2);
return __r;
}
if (args.length === 2 && M._swig_can_Function(__unwrap(args[0]))) {
const [a0, a1] = args;
return __chk(M._swig_casadi_conic_debug_1(__unwrap(a0), a1));
}
throw new TypeError(`conic_debug: no overload matches arg types`);
},
inv_minor(...args) {
if (args.length === 1 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_inv_minor_0(__unwrap(__coerce(a0, MX)))));
}
if (args.length === 1 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_inv_minor_1(__unwrap(__coerce(a0, DM)))));
}
if (args.length === 1 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0]))) {
const [a0] = args;
return __from_handle(__chk(M._swig_casadi_casadi_inv_minor_2(__unwrap(__coerce(a0, SX)))));
}
throw new TypeError(`inv_minor: no overload matches arg types`);
},
mldivide(...args) {
if (args.length === 2 && (M._swig_can_MX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_MX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mldivide_0(__unwrap(__coerce(a0, MX)), __unwrap(__coerce(a1, MX)))));
}
if (args.length === 2 && (M._swig_can_DM(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_DM(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mldivide_1(__unwrap(__coerce(a0, DM)), __unwrap(__coerce(a1, DM)))));
}
if (args.length === 2 && (M._swig_can_SX(__unwrap(args[0])) || typeof args[0] === 'number' || typeof args[0] === 'bigint' || Array.isArray(args[0])) && (M._swig_can_SX(__unwrap(args[1])) || typeof args[1] === 'number' || typeof args[1] === 'bigint' || Array.isArray(args[1]))) {
const [a0, a1] = args;
return __from_handle(__chk(M._swig_casadi_casadi_mldivide_2(__unwrap(__coerce(a0, SX)), __unwrap(__coerce(a1, SX)))));
}
throw new TypeError(`mldivide: no overload matches arg types`);
},
};
/* Coerce a bare JS number / array into a casadi matrix proxy via its
constructor, leaving existing proxies untouched. Used by the
jsarg typemaps for SX/MX/DM so `M.plus(x, 2)` works (the matching
jstypecheck typemap lets such an arg select the overload). */
const __coerce = (v, Cls) =>
(v === null || v === undefined ||
(typeof v === "object" && v._swig_type !== undefined)) ? v : new Cls(v);
/* Element indexing for matrix classes (SX/MX/DM), wired by
%feature("wasmjs:index") -> the wasm-js backend wraps every
instance in __mkIndex. Mirrors casadi's 0-based get/set:
x[k] x.get(false, k) (1-D element)
x[k] = v x.set(v, false, k) (v coerced by jsarg)
x[[i, j]] x.get(false, i, j) (2-D; x[i,j] can't work
in JS -- comma operator)
x["a:b"] x.get(false, Slice(a,b)) (slice)
x["a:b,j"] x.get(false, Slice(a,b), j) (mixed)
x.nz[k] / =v x.get_nz/set_nz(false, k) (structural nz)
Non-index keys (methods, _ptr, symbols) pass straight through. */
const __isIdxKey = (k) => typeof k === "string" && k.length > 0 &&
(k.charCodeAt(0) === 45 || (k.charCodeAt(0) >= 48 && k.charCodeAt(0) <= 57));
const __idxPart = (s) => {
if (s.indexOf(":") < 0) return Number(s);
if (s === ":") return new Slice();
const p = s.split(":");
return p.length >= 3 ? new Slice(Number(p[0]), Number(p[1]), Number(p[2]))
: new Slice(Number(p[0]), Number(p[1]));
};
const __idxArgs = (k) => k.split(",").map(__idxPart);
const __NZ_HANDLER = {
get(t, k, r) { return __isIdxKey(k) ? t.get_nz(false, Number(k)) : Reflect.get(t, k, r); },
set(t, k, v, r) { if (__isIdxKey(k)) { t.set_nz(v, false, Number(k)); return true; } return Reflect.set(t, k, v, r); },
};
const __INDEX_HANDLER = {
get(t, k, r) {
if (k === "__indexed") return true;
if (k === "nz") return new Proxy(t, __NZ_HANDLER);
if (__isIdxKey(k)) return t.get(false, ...__idxArgs(k));
return Reflect.get(t, k, r);
},
set(t, k, v, r) {
if (__isIdxKey(k)) { t.set(v, false, ...__idxArgs(k)); return true; }
return Reflect.set(t, k, v, r);
},
};
const __mkIndex = (o) =>
(o === null || typeof o !== "object" || o.__indexed) ? o : new Proxy(o, __INDEX_HANDLER);
/* Function.call vs callable: two distinct conventions, mirroring
Python's casadi.
f.call([a, b]) -- ALWAYS returns the full list of outputs
(`[y0, y1, ...]`). Programmatically
stable. Element type (DM/MX/SX) is
detected from the input list and the
matching overload is invoked, so the
return is `DM[]`, `MX[]`, or `SX[]`
respectively (mirrors Python's
type-overloaded f.call).
f.call({name: value}) -- dict input -> dict output keyed by
the function's output names; value
type detected from the input values
(DMDict/MXDict/SXDict overloads).
f(a, b) -- syntax sugar (variadic). Return shape
depends on n_out:
n_out == 0 -> null
n_out == 1 -> bare output
n_out > 1 -> list
Matches Python's `f(a, b)`.
f({i0: x}) -- dict-input sugar; returns dict.
Implementation note: the SWIG-emit-time Function.prototype.call
dispatcher had the "first-wins-per-arity" trap -- only the DM
overload was generated for arity 3, so `f.call([MX])` errored
with `Failed to convert input 1 to type 'DM'`. We REPLACE the
dispatcher here with one that probes the input type and routes
to one of the 6 wasm exports
_swig_casadi_Function_call_0 vector<DM> -> DMVector
_swig_casadi_Function_call_1 vector<SX> -> SXVector
_swig_casadi_Function_call_2 vector<MX> -> MXVector
_swig_casadi_Function_call_3 DMDict -> DMDict
_swig_casadi_Function_call_4 SXDict -> SXDict
_swig_casadi_Function_call_5 MXDict -> MXDict
all of which the SWIG-emit already generates on the C++ side. */
Function.prototype.call = function(arg, always_inline, never_inline) {
if (always_inline === undefined) always_inline = false;
if (never_inline === undefined) never_inline = false;
const ail = always_inline ? 1 : 0;
const nil = never_inline ? 1 : 0;
// Detect positional (list-shaped) vs dict input.
const is_list = Array.isArray(arg) || (arg instanceof DMVector)
|| (arg instanceof MXVector) || (arg instanceof SXVector);
const is_dict = !is_list && arg && typeof arg === 'object'
&& !(arg instanceof DM) && !(arg instanceof MX)
&& !(arg instanceof SX) && !(arg instanceof Sparsity);
if (is_list) {
// Detect element type to pick the overload.
// Default: DM (matches the existing wasm-js convention for raw
// arrays of numbers via casadi's array-to-DM auto-coercion).
let mode = 'DM';
if (arg instanceof MXVector) mode = 'MX';
else if (arg instanceof SXVector) mode = 'SX';
else if (Array.isArray(arg)) {
for (const e of arg) {
if (e instanceof MX) { mode = 'MX'; break; }
if (e instanceof SX) { mode = 'SX'; break; }
}
}
let vec, own = false;
if (Array.isArray(arg)) {
const VecCls = mode === 'MX' ? MXVector : (mode === 'SX' ? SXVector : DMVector);
vec = new VecCls();
own = true;
for (const x of arg) vec.push_back(x);
} else {
vec = arg;
}
const fn = mode === 'DM' ? M._swig_casadi_Function_call_0 :
mode === 'SX' ? M._swig_casadi_Function_call_1 :
M._swig_casadi_Function_call_2;
const OutVec = mode === 'DM' ? DMVector : (mode === 'SX' ? SXVector : MXVector);
// Vector returns: from_ptr<std::vector<M>> in casadi.i passes
// type=0 to SWIG_NewPointerObj, so __from_handle yields a bare
// {_ptr} carrier rather than a fully-wrapped XVector. Reach
// into ._ptr to recover the raw pointer; both bare carriers and
// typed proxies expose it, so this is safe either way.
const result = __vec_to_arr(new OutVec(__PRIVATE_CTOR,
__from_handle(__chk(fn(__unwrap(this), __unwrap(vec), ail, nil)))._ptr));
if (own && vec.delete) vec.delete();
return result;
}
if (is_dict) {
// Detect value type from the dict's actual values.
let mode = 'DM';
for (const k of Object.keys(arg)) {
const v = arg[k];
if (v instanceof MX) { mode = 'MX'; break; }
if (v instanceof SX) { mode = 'SX'; break; }
}
// Route via the DICT wasm exports (_call_3 = DMDict, _call_4 =
// SXDict, _call_5 = MXDict). Those honor casadi's "missing key
// = use default" convention -- nlpsol's lbx/ubx default to
// -inf/+inf when the key is absent, etc. Going via the LIST
// path would force every slot to receive an empty-DM, which the
// solver interprets as a length-0 user-provided bound (defaults
// x to 0). Dict values come back as fully-wrapped proxies via
// SWIG_WASMJS_NewPointerObj (which consults swig_type_info::
// clientdata and calls M.__wrap_<JsName> on the C++ side), so
// no JS-side rewrap is needed.
const fn = mode === 'DM' ? M._swig_casadi_Function_call_3
: mode === 'SX' ? M._swig_casadi_Function_call_4
: M._swig_casadi_Function_call_5;
return M.__swig_release_handle(__chk(fn(__unwrap(this),
__unwrap(arg), ail, nil)));
}
throw new Error('Function.call: arg must be a list (DM/MX/SX vector or JS array) or a dict object');
};
/* x.T as a getter property -- matches Python's `x.T`. The original
auto-generated method stays available as x.T_method() should
anyone hold a stale binding; the getter is the canonical form. */
for (const Cls of [DM, MX, SX, Sparsity]) {
const __orig_T = Cls.prototype.T;
if (!__orig_T) continue;
Object.defineProperty(Cls.prototype, "T", {
get() { return __orig_T.call(this); },
configurable: true,
});
}
/* Variadic + list aliases for the concat family, mirroring Python:
horzcat(a, b, c, d) variadic -- 1xN row (stack)
hcat([a, b, c, d]) list form -- 1xN row (stack)
horzcat([1, 2, 3, 4]) 1-arg list of nums -- 4x1 column (identity)
(analogous for vertcat/vcat, diagcat/dcat).
Python's `def horzcat(*args): return _horzcat(args)` always passes
the variadic rest-tuple as the single C++ "vector input" arg. We
mirror that exactly: always pass the rest-array. When the rest
has 1 element AND that element is a JS array of primitives, the
C++ to_ptr<DM> nested-array handler builds a column DM, and the
C++ horzcat is an identity on the single column. When the rest
has 1 element that is a list of matrices (e.g. `vertcat([x, y])`),
it FAILS in Python too -- callers should use `vertcat(x, y)`
variadic or `vcat([x, y])` list-form instead. */
const __cat_variadic = (orig) => function (...args) {
return orig.call(this, args);
};
const __cat_list = (orig) => function (arr) {
return orig.call(this, arr);
};
for (const [variadic, list] of [
["horzcat", "hcat"],
["vertcat", "vcat"],
["diagcat", "dcat"],
]) {
const fn = __m[variadic];
__m[variadic] = __cat_variadic(fn).bind(__m);
__m[list] = __cat_list(fn).bind(__m);
}
/* Factory + callable Function instances. Two ergonomic wins together:
1. CONSTRUCTION:
const f = M.Function('name', [x], [y]); // factory (preferred)
const f = new M.Function('name', [x], [y]); // also works
Established convention in test/javascript/*.js is the factory
form (no `new`). Internally `Function(...)` is just a regular
function that delegates to `new __OrigFunction(...)`; since the
body returns an object (the callable), `new Function(...)` and
`Function(...)` produce the same callable per JS semantics.
2. INVOCATION:
f([x, y]) <- direct call (sugar for f.call([x, y]))
f({i0: x}) <- dict-style call (sugar for f.call({...}))
f.call([x, y]) <- explicit
Mirrors Python's `f([x, y])` and matches the natural JS calling
convention.
Implementation: the constructor-returns-a-callable pattern. Build
a real JS function whose `[[Prototype]]` is our `Function.prototype`,
so all methods (call, n_in, delete, name_in, expand, ...) still work
via prototype lookup AND the function-invocation slot delegates to
`.call`. See the inner-binding-immutability workaround below for
why every prototype method needs to be re-wrapped at registration.
Lifecycle: the wasm pointer was originally registered with
`__fr_casadi_Function` against the bare inst (held internally by the
class constructor). We transfer registration to the callable so its
destruction (rather than the orphan inst's) triggers
`_swig_casadi_Function_delete`. Setting `inst._ptr = 0` prevents
inst.delete() from running on the now-stale handle.
Why not extend Function: `class Wrapped extends Function { ... }`
would require `super(<body>)` with a string body that can't capture
enclosing scope -- forcing global state plumbing. The setPrototypeOf
approach is cleaner and equally well-supported.
SWIG-emitted internal call-sites that build Function instances via
`new Function(__PRIVATE_CTOR, ptr)` (e.g. Function.find_function,
f.reverse()) bypass the OUTER `Function` binding because ES6 class
method bodies bind to the INNER (immutable) class binding -- so we
ALSO patch every method on Function.prototype to post-wrap any
bare Function instance in its return value. See the
`__wrapFunctionReturning` block below. */
const __OrigFunction = Function;
// Function methods that collide with own properties of every JS function
// instance (`name`, `length`, `caller`, `arguments`, `prototype`). Of
// the 103 methods on casadi::Function only `name()` actually collides.
// The collision matters because the JS engine sets `callable.name` as an
// own property at function-creation time -- the prototype-chain lookup
// that would otherwise resolve to our SWIG method is shadowed.
// Re-define the own property to point at the SWIG method so `f.name()`
// still returns the function's casadi-name. (`f.name` thus returns the
// method function rather than the JS-engine's debug name -- a minor
// trade-off; consoles will display "[Function: name]" instead of "".)
const __builtinFnOwn = new Set(Object.getOwnPropertyNames(function(){}));
const __FunctionMethodCollisions = Object.getOwnPropertyNames(
__OrigFunction.prototype).filter(n =>
n !== 'constructor' && __builtinFnOwn.has(n));
// Turn a freshly-constructed plain Function instance into a callable.
// Transfers ownership of the wasm ptr's FinalizationRegistry registration
// from `inst` to `callable` and zeros `inst._ptr` so the orphan inst's
// GC doesn't double-free.
//
// Calling convention (mirrors Python's casadi):
// f(a, b) variadic positional, n_out-dependent return shape
// f({i0: a}) dict input; returns dict (always)
//
// The args passed to `f(...)` ARE the positional inputs, one per
// C++ parm. We do NOT flatten a single-array arg into multiple
// positionals -- `f([1, 2])` for an n_in=1 function passes the
// ENTIRE `[1, 2]` array as the first input (where casadi's
// `to_ptr<DM>` auto-coerces it to a column DM, matching Python's
// `f([1, 2])` semantics for a vector-valued input). Calling
// `f([a, b])` against an n_in=2 function errors loudly -- use
// `f(a, b)` for variadic-positional.
//
// For positional input the return shape is:
// n_out == 0 null (no outputs; useful for side-effect-only fns)
// n_out == 1 bare (single output unwrapped)
// n_out > 1 list (full output array)
//
// Programmatic users wanting a stable return shape should use
// `f.call([...])` -- the patched .call above always returns a list.
function __makeCallableFunction(inst) {
const callable = function (...invokeArgs) {
// dict-input branch: route through .call which returns a dict.
// The dict-shape check must EXCLUDE casadi matrix types (DM, MX,
// SX, Sparsity, IM) which are objects too -- otherwise
// `f(M.DM(5))` would be misinterpreted as a {...}-dict input.
if (invokeArgs.length === 1) {
const a = invokeArgs[0];
if (a && typeof a === 'object' && !Array.isArray(a)
&& !(a instanceof DMVector)
&& !(a instanceof MXVector)
&& !(a instanceof SXVector)
&& !(a instanceof DM)
&& !(a instanceof MX)
&& !(a instanceof SX)
&& !(a instanceof Sparsity)
&& (typeof IM === 'undefined' || !(a instanceof IM))) {
return __OrigFunction.prototype.call.call(callable, a);
}
}
// positional: invokeArgs IS the positional list (one entry per parm).
const result = __OrigFunction.prototype.call.call(callable, invokeArgs);
// After the un-wrap removal from .call, result is always a list.
const n_out = Number(callable.n_out());
if (n_out === 0) return null;
if (n_out === 1) return result[0];
return result;
};
Object.setPrototypeOf(callable, __OrigFunction.prototype);
callable._ptr = inst._ptr;
__fr_casadi_Function.unregister(inst);
__fr_casadi_Function.register(callable, inst._ptr, callable);
inst._ptr = 0;
for (const __k of __FunctionMethodCollisions) {
Object.defineProperty(callable, __k, {
value: __OrigFunction.prototype[__k],
writable: false,
configurable: true,
});
}
return callable;
}
function __WrappedFunction(...args) {
return __makeCallableFunction(new __OrigFunction(...args));
}
__WrappedFunction.prototype = __OrigFunction.prototype;
__WrappedFunction.prototype.constructor = __WrappedFunction;
// Copy static class members (e.g. Function.expand, Function.if_else,
// Function.deserialize, ...) onto the wrapper so M.Function.expand(...)
// keeps working.
for (const __k of Object.getOwnPropertyNames(__OrigFunction)) {
if (__k === 'length' || __k === 'name' || __k === 'prototype') continue;
const __d = Object.getOwnPropertyDescriptor(__OrigFunction, __k);
if (__d) Object.defineProperty(__WrappedFunction, __k, __d);
}
Function = __WrappedFunction;
__m.Function = __WrappedFunction;
// Class-method bodies refer to the INNER class binding (immutable per
// ES6 semantics) -- so `new Function(__PRIVATE_CTOR, ptr)` inside e.g.
// `Function.prototype.expand` always invokes the ORIGINAL constructor,
// never `__WrappedFunction`. As a result `f.expand()` would return a
// plain non-callable Function. Workaround: monkey-patch every method
// on Function.prototype so its return value is post-wrapped if it's a
// bare Function instance. Also patch static methods (`Function.expand`,
// `Function.deserialize`, ...) for the same reason.
const __wrapFunctionReturning = (orig) => function (...args) {
const r = orig.apply(this, args);
if (r && typeof r === 'object' && r instanceof __OrigFunction
&& typeof r !== 'function' && r._ptr !== 0) {
return __makeCallableFunction(r);
}
return r;
};
for (const __k of Object.getOwnPropertyNames(__OrigFunction.prototype)) {
if (__k === 'constructor') continue;
const __d = Object.getOwnPropertyDescriptor(__OrigFunction.prototype, __k);
if (!__d || typeof __d.value !== 'function') continue;
Object.defineProperty(__OrigFunction.prototype, __k,
{ ...__d, value: __wrapFunctionReturning(__d.value) });
}
for (const __k of Object.getOwnPropertyNames(__WrappedFunction)) {
if (__k === 'length' || __k === 'name' || __k === 'prototype') continue;
const __d = Object.getOwnPropertyDescriptor(__WrappedFunction, __k);
if (!__d || typeof __d.value !== 'function') continue;
Object.defineProperty(__WrappedFunction, __k,
{ ...__d, value: __wrapFunctionReturning(__d.value) });
}
/* Lazy plugin loading. Plugins ship as sibling .so files (not embedded);
the C++ load_<type>(name) -> dlopen path needs the .so resident first.
Make load_<type>() async: ensure the plugin .so is in MEMFS (read from
disk under Node, fetched in the browser), then call the synchronous C++
loader. Mirrors casadi::load_<type>; a JS user does
`await casadi.load_nlpsol('ipopt')` once, after which nlpsol('s','ipopt')
is fully synchronous. (Under Node a solver constructor also dlopens the
sibling .so directly, so the explicit await is only required in the
browser, where synchronous network fetch is impossible.) */
const __ensurePlugin = async (soname) => {
try { if (M.FS.analyzePath("/" + soname).exists) return; } catch (e) {}
let bytes;
if (typeof process !== "undefined" && process.versions && process.versions.node) {
bytes = require("fs").readFileSync(__path.join(__dirname, soname));
} else {
const resp = await fetch(soname);
if (!resp.ok) throw new Error("Failed to fetch plugin " + soname + ": " + resp.status);
bytes = new Uint8Array(await resp.arrayBuffer());
}
M.FS.writeFile("/" + soname, bytes);
};
for (const [__fn, __infix] of [["load_nlpsol", "nlpsol"], ["load_conic", "conic"],
["load_linsol", "linsol"], ["load_integrator", "integrator"],
["load_rootfinder", "rootfinder"], ["load_interpolant", "interpolant"],
["load_expm", "expm"], ["load_dple", "dple"]]) {
const __orig = __m[__fn];
if (typeof __orig !== "function") continue;
__m[__fn] = async (name) => {
await __ensurePlugin("libcasadi_" + __infix + "_" + name + ".so");
return __orig.call(__m, name);
};
}
/* Destructor safety. Each class' FinalizationRegistry frees the wasm
pointer (M._swig_<C>_delete) during GC. At interpreter shutdown the
sweep can run after casadi's C++ static caches (Sparsity singletons,
...) are torn down, so a late ~vector<DM>/~Matrix hits freed memory ->
wasm OOB trap; a throw out of a FinalizationRegistry callback then
crashes the process at exit. A failed free in a destructor is not
actionable from JS, so make every _swig_*_delete non-throwing (warn,
don't throw, when not shutting down so genuine issues stay visible). */
let __shuttingDown = false;
if (typeof process !== "undefined" && typeof process.on === "function") {
process.on("beforeExit", () => { __shuttingDown = true; });
process.on("exit", () => { __shuttingDown = true; });
}
for (const __k of Object.keys(M)) {
if (typeof M[__k] !== "function" || !/^_swig_.*_delete$/.test(__k)) continue;
const __origDel = M[__k];
M[__k] = function (p) {
try { return __origDel.call(this, p); }
catch (e) {
if (!__shuttingDown && typeof console !== "undefined")
console.warn("casadi: ignored error freeing wasm object:", (e && e.message) || e);
return 0;
}
};
}
DeserializerBase.prototype.unpack = function () {
const name = SerializerBase.type_to_string(this.pop_type());
return this["blind_unpack_" + name]();
};
return __m;
};