Commit fc9d407
committed
Replace VNL eigensystem with Eigen SVD for PCA computation
Switch ParticleShapeStatistics::compute_modes() from VNL's
vnl_symmetric_eigensystem to Eigen's BDCSVD algorithm. This provides:
- Better numerical stability by computing SVD directly on the centered
data matrix rather than forming the covariance matrix A^T*A first
- Reduced dependency on legacy VNL library in favor of Eigen
- Cleaner code using Eigen's built-in vector normalization
The SVD singular values squared equal the eigenvalues, and the left
singular vectors (U) correspond to the eigenvectors in particle space.
Results are reversed to maintain ascending eigenvalue order for backward
compatibility.
Also add profiling instrumentation to compute_modes() and Studio main.1 parent b213366 commit fc9d407
File tree
3 files changed
+38
-32
lines changed- Libs
- Common
- Particles
- Studio
3 files changed
+38
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
160 | 162 | | |
161 | 163 | | |
162 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
577 | 578 | | |
578 | 579 | | |
579 | 580 | | |
| 581 | + | |
580 | 582 | | |
| 583 | + | |
581 | 584 | | |
582 | | - | |
583 | 585 | | |
584 | | - | |
585 | | - | |
| 586 | + | |
| 587 | + | |
586 | 588 | | |
587 | | - | |
588 | | - | |
589 | | - | |
| 589 | + | |
590 | 590 | | |
591 | | - | |
592 | | - | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
593 | 594 | | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
| 595 | + | |
601 | 596 | | |
602 | | - | |
603 | | - | |
604 | | - | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
605 | 601 | | |
606 | | - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
607 | 607 | | |
| 608 | + | |
608 | 609 | | |
609 | | - | |
610 | | - | |
611 | | - | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
612 | 614 | | |
613 | 615 | | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
618 | 622 | | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
| 82 | + | |
80 | 83 | | |
81 | | - | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
151 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
152 | 156 | | |
153 | 157 | | |
154 | 158 | | |
| |||
0 commit comments