feat(python): implement python bindings for all components and solvers
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user