feat(python): implement python bindings for all components and solvers

This commit is contained in:
Sepehr
2026-02-21 20:34:56 +01:00
parent 8ef8cd2eba
commit 4440132b0a
310 changed files with 11577 additions and 397 deletions

View File

@@ -370,14 +370,14 @@ impl JacobianMatrix {
// This optimizes the check from O(N^2 * C) to O(N^2)
let mut row_block_cols = vec![None; nrows];
for &(rs, re, cs, ce) in &blocks {
for r in rs..re {
row_block_cols[r] = Some((cs, ce));
for block in &mut row_block_cols[rs..re] {
*block = Some((cs, ce));
}
}
for row in 0..nrows {
for (row, block) in row_block_cols.iter().enumerate().take(nrows) {
for col in 0..ncols {
let in_block = match row_block_cols[row] {
let in_block = match *block {
Some((cs, ce)) => col >= cs && col < ce,
None => false,
};