Skip to content

Wrap fixed-size Eigen values as MATLAB arrays - #202

Merged
ProfFan merged 1 commit into
codex/idempotent-matlab-deletefrom
codex/matlab-fixed-size-eigen-values
Aug 22, 2026
Merged

Wrap fixed-size Eigen values as MATLAB arrays#202
ProfFan merged 1 commit into
codex/idempotent-matlab-deletefrom
codex/matlab-fixed-size-eigen-values

Conversation

@ProfFan

@ProfFan ProfFan commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • recognize MatrixN, MatrixMN, MatrixNxM, and VectorN aliases as fixed-size Eigen values in MATLAB codegen
  • emit MATLAB double-array dispatch with fixed dimensions when the alias spelling is unambiguous
  • add dimension-checked C++ conversion helpers for fixed-size Eigen inputs and outputs
  • cover constructors, methods, properties, pairs, optionals, and rectangular matrices

Validation

  • uv run pytest tests -q: 127 passed
  • generated and compiled the complete GTSAM MATLAB wrapper with Octave 11.3
  • Matrix3/Vector3 input-output round trip passed in Octave
  • GTSAM MATLAB runner: 19 passed, 1 Octave script-local-function limitation; the remaining numerical derivative test passes when its helper is externalized

@ProfFan
ProfFan requested a review from dellaert August 22, 2026 05:39

@dellaert dellaert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but:

  1. Could we do the unit test with a regular mechanism from this repo?
  2. Could the Python code please throw an exception for non-const reference return values?

@ProfFan
ProfFan merged commit 0a74b36 into master Aug 22, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants