--- /srv/rebuilderd/tmp/rebuilderd8jUr32/inputs/libgtsam-doc_4.2.0+dfsg-1_all.deb +++ /srv/rebuilderd/tmp/rebuilderd8jUr32/out/libgtsam-doc_4.2.0+dfsg-1_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2024-01-09 05:51:35.000000 debian-binary │ --rw-r--r-- 0 0 0 75856 2024-01-09 05:51:35.000000 control.tar.xz │ --rw-r--r-- 0 0 0 14524432 2024-01-09 05:51:35.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 75732 2024-01-09 05:51:35.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 14529748 2024-01-09 05:51:35.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ │ │ │ ├── line order │ │ │ │ @@ -124,532 +124,524 @@ │ │ │ │ usr/share/doc/libgtsam-dev/examples/TriangulationLOSTExample.cpp.gz │ │ │ │ usr/share/doc/libgtsam-dev/examples/UGM_chain.cpp │ │ │ │ usr/share/doc/libgtsam-dev/examples/UGM_small.cpp │ │ │ │ usr/share/doc/libgtsam-dev/examples/VisualISAM2Example.cpp.gz │ │ │ │ usr/share/doc/libgtsam-dev/examples/VisualISAMExample.cpp.gz │ │ │ │ usr/share/doc/libgtsam-dev/examples/easyPoint2KalmanFilter.cpp.gz │ │ │ │ usr/share/doc/libgtsam-dev/examples/elaboratePoint2KalmanFilter.cpp.gz │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00002.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00002.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00002_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00005_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00008.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00008.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00008_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00011.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00011.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00014.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00014.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00014_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00017.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00017.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00017_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00020.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00023.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00023.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00023_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00026.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00026_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00026.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00029.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00029.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00029_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00032.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00032.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00032_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00035.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00035.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00035_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00038.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00038.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00038_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00041.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00041_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00044.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00044.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00044_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00047.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00047_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00050.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00050.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00050_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00053.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00053.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00053_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00056.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00056.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00056_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00059.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00059.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00059_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00062.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00062.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00062_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00065.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00068_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00065.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00065_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00071.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00071_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00071.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00074.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00074.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00074_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00077.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00077.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00080.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00080.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00080_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00083.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00083.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00083_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00086.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00086.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00086_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00089.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00089.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00089_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00092.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00092.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00092_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00095.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00095.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00095_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00098.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00098.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00098_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00101.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00101.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00101_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00104.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00104.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00104_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00107.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00107.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00107_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00110.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00110.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00110_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00113.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00113.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00113_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00116.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00116.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00116_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00119.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00119.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00119_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00122_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00125.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00125.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00122.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00125_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00128.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00128_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00131.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00131_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00134.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00134.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00134_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00137.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00137.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00137_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00140.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00140.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00140_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00143.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00143_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00146.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00146.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00146_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00149_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00152.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00152.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00152_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00155.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00155.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00155_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00158.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00158.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00158_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00161.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00161.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00161_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00164.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00164.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00164_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00167.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00167.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00167_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00170.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00170.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00170_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00173.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00173.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00173_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00176.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00176.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00176_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00179.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00179.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00179_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00182.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00182.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00185.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00185.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00185_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00188.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00188.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00188_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00191.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00191_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00194.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00194.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00194_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00197.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00197.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00197_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00200.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00200.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00200_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00203.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00203.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00203_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00206.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00206.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00206_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00209.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00212.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00212.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00209.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00209_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00212_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00215.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00215.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00218.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00218.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00218_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00221.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00221.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00221_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00224.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00224_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00224.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00227.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00227.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00227_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00230.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00230.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00230_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00233.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00236.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00236.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00236_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00239.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00239.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00239_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00242.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00242.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00242_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00245.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00245.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00245_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00248.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00248.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00248_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00251.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00251.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00254.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00254.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00254_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00257.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00257.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00257_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00260.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00260.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00260_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00263.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00263_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00266.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00266.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00266_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00269.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00269.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00269_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00272.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00275.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00275.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00275_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00278.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00281.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00281.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00281_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00284.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00284.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00287.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00287.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00287_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00290.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00290.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00290_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00293.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00293.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00293_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00299.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00299.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00299_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00296.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00302.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00302.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00302_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00305.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00305.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00305_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00308.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00311.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00311.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00311_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00314.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00317.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00317.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00314.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00314_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00317_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00320.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00320.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00320_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00323.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00323.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00323_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00326.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00329.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00329.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00329_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00332.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00332.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00332_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00335.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00335.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00338.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00338.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00338_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00341.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00341.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00344.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00347.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00350.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00350.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00350_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00353.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00353.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00353_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00356.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00356.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00356_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00359.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00359.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00359_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00362.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00362.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00362_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00365.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00365.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00365_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00368.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00368.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00368_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00371.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00371.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00371_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00374.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00377.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00377.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00377_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00380.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00380.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00380_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00383.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00383.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00383_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00386.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00386.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00386_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00389.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00389.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00389_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00392.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00392.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00392_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00395.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00395.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00395_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00398_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00404.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00404.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00404_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00410_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00398.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00401.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00401.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00401_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00407.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00410.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00413.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00413.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00413_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00416.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00416.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00416_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00419.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00419.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00419_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00422.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00422.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00422_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00425.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00425.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00425_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00428.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00431.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00431.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00431_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00434.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00434.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00434_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00437.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00437.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00437_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00440.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00443.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00443.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00443_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00446.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00449.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00449.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00449_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00452.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00452.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00452_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00455.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00455.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00455_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00458.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00458.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00458_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00461.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00461.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00461_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00464.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00464.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00464_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00467.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00467.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00467_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00470.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00473.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00473.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00473_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00470_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00476.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00476.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00479.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00479.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00479_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00482.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00482.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00482_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00485.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00485.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00485_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00488.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00488.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00488_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00491.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00491.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00491_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00494.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00494.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00494_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00497.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00497.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00497_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00500.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00500.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00500_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00503.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00506.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00506.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00506_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00509.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00512.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00512.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00512_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00515.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00518.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00518.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00518_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00521.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00521.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00524.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00524.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00524_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00527.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00527.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00527_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00530.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00530.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00530_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00533.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00533.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00533_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00536.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00536.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00536_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00539.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00539.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00542.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00542.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00542_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00545.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00548.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00548.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00548_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00551.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00554.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00554.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00554_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00557.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00557.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00557_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00560.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00560.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00560_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00563.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00566.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00566.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00566_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00569.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00569.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00572.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00569_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00572_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00575.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00575.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00575_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00578.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00578.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00578_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00581.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00581.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00581_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00584_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00587.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00587.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00584.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00587_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00590.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00593.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00593.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00593_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00590.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00590_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00596.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00596_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00599.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00599.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00599_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00602.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00605.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00608.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00608.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00605_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00608_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00611.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00611.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00611_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00614.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00614.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00614_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00617.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00617.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00617_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00620.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00620.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00620_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00623.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00623.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00623_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00626.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00626.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00626_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00629.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00629_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00632.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00632.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00632_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00635.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00635.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00635_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00638.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00638_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00641.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00641.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00641_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00644.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00644_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00647.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00647.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00647_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00650.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00650.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00650_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00653.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00653.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00653_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00656.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00656_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00659.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00659.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00659_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00662.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00662.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00662_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00665.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00665.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00665_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00668.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00668.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00668_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00671.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00671.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00671_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00674_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00677.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00677.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00677_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00680.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00680.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00680_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00683.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00683.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00683_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00686.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00686.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00686_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00689.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00689.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00689_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00692.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00692_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00695.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00695.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00695_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00698.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00698.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00698_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00701.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00701.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00701_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00704.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00704.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00704_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00707.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00707.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00710.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00710.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00710_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00713.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00716.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00716.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00713_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00716_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00719.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00719.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00719_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00722.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00722.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00725.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00725.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00725_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00728.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00728.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00728_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00731.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00734.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00734.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00731.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00731_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00734_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00737.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00737.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00737_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00740.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00740.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00740_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00743.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00746.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00746.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00746_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00749.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00749.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00749_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00752.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00752.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00752_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00755.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00755.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00755_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00758.html │ │ │ │ @@ -659,423 +651,431 @@ │ │ │ │ usr/share/doc/libgtsam-dev/html/a00764.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00767.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00767.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00767_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00770.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00770.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00770_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00773.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00773.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00773_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00776.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00776.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00779.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00779.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00779_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00782.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00782.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00782_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00785.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00785.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00788.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00788.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00788_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00791.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00791.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00791_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00794.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00794.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00794_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00797.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00800.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00800.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00800_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00803.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00806.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00806.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00806_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00809_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00809.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00812.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00812.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00812_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00815.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00815.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00815_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00818.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00818.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00818_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00821.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00821.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00821_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00824.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00824_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00827.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00830.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00830.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00830_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00836.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00836.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00836_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00833.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00839.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00839.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00839_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00842.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00842.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00842_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00845.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00845_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00848.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00848.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00848_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00851.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00851.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00851_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00854.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00854.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00854_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00857.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00857.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00860.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00860.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00860_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00863.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00863.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00863_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00866.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00866.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00866_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00869.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00869.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00869_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00872.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00875.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00875.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00875_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00878.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00878.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00878_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00881.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00884.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00884.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00884_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00887.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00887.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00887_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00890.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00890.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00890_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00896.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00896.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00896_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00893.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00893.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00893_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00899.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00899.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00899_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00902.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00905.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00905.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00905_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00908.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00911.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00911.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00911_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00917.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00917.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00917_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00920.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00920.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00920_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00926.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00926.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00914.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00914.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00914_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00923.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00923.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00923_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00926_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00929.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00932.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00932.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00932_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00935.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00935.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00935_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00938.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00938.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00938_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00941.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00941.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00944.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00944.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00944_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00947.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00950.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00950.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00950_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00953.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00953.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00953_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00956.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00956.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00956_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00959.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00962.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00962.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00962_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00965.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00965.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00965_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00968.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00968.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00968_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00971.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00971.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00971_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00974.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00974.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00974_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00977.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00977.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00977_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00980.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00983.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00983_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00986.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00989.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00989.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00989_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00992.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00992_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00995.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00995.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00995_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00998.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00998.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00998_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01001.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01001.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01001_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01004.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01004.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01004_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01007.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01007.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01007_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01010.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01010.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01010_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01013.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01013.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01013_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01016.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01016.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01016_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01019.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01019.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01019_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01022.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01022.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01022_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01025.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01025.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01025_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01028.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01028.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01028_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01031.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01031.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01031_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01034.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01034.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01037.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01037.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01034_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01037_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01040.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01040_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01043.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01043.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01043_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01046.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01049.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01049.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01049_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01052.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01055.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01055.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01055_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01058.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01058.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01058_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01061.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01061.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01061_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01064.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01064.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01064_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01067.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01067.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01067_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01070.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01070.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01070_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01073.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01076.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01076.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01076_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01079.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01082.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01082.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01082_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01085.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01085.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01085_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01088.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01088_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01088.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01091.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01091.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01091_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01094.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01094.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01094_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01097.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01100.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01100.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01100_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01103.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01103.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01103_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01106.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01106.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01106_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01109.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01112.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01112.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01112_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01109.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01109_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01115.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01115.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01115_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01118.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01118.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01118_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01121.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01121.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01121_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01124.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01124.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01124_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01127.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01127.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01127_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01130.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01130.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01130_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01133.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01136.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01136.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01136_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01139.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01139.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01139_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01142.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01142.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01142_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01145.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01145.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01145_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01148_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01151.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01151.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01151_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01154.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01154.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01154_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01157.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01157.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01157_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01163.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01163.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01163_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01166.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01169.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01169.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01169_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01172.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01184.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01184_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01187.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01187.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01187_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01190.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01190.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01193.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01193_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01196.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01196.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01196_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01199.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01199.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01199_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01202.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01202.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01202_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01205.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01205.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01205_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01208.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01208.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01208_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01211.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01214.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01214.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01214_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01217.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01217.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01220.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01220_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01217_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01223.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01223.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01223_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01226.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01226.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01226_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01229.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01229.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01229_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01232.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01232.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01232_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01235.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01235.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01238.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01238_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01241.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01241.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01241_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01244.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01244.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01244_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01247_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01250.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01250.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01250_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01253.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01253.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01253_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01256.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01256.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01256_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01259.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01259.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01259_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01262.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01262.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01262_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01265.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01265.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01265_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01268.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01268.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01268_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01271.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01271.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01271_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01274_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01277.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01277.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01274.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01274.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01277_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01280.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01280.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01280_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01283.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01283.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01283_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01286_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01292_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01286.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01289.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01289.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01289_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01292.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01292.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01295.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01295_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01298_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01301.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01301.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01301_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01304.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01304.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01304_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01307.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01307.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01307_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01310.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01310_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01313.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01313_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01316.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01316.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01316_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01319.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01319.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01319_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01322.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01322.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01325_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01328.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01322_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01328_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01331.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01331_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01334.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01334.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01334_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01337.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01337.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01337_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01340.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01340.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01340_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01343.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01343.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01343_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01346.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01346.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01346_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01349.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01349.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01349_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01352.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01352.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01355.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01355.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01355_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01358.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01361.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01361.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01361_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01358.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01358_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01364.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01364.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01367.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01367.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01367_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01370.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01370.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01370_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01373.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01373.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01373_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01376.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01376.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01376_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01379.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01379.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01379_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01382.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01382.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01382_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01385.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01385.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01385_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01388.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01388.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01388_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01391.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01391.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01391_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01394.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01394_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01397.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01403.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01403_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01406.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01406_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01409.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01410.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01411.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01412.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01413.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01414.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01415.html ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -1,14 +1,14 @@ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-01-09 05:51:35.000000 ./ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-01-09 05:51:35.000000 ./usr/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-01-09 05:51:35.000000 ./usr/share/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-01-09 05:51:35.000000 ./usr/share/doc/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/ │ │ │ -rw-r--r-- 0 root (0) root (0) 75426 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/Hybrid.pdf │ │ │ --rw-r--r-- 0 root (0) root (0) 148768 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/ImuFactor.pdf │ │ │ +-rw-r--r-- 0 root (0) root (0) 148799 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/ImuFactor.pdf │ │ │ -rw-r--r-- 0 root (0) root (0) 39594 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/cholesky.pdf │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/examples/ │ │ │ -rw-r--r-- 0 root (0) root (0) 156 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/examples/CMakeLists.txt │ │ │ -rw-r--r-- 0 root (0) root (0) 3425 2023-09-04 02:21:18.000000 ./usr/share/doc/libgtsam-dev/examples/CameraResectioning.cpp │ │ │ -rw-r--r-- 0 root (0) root (0) 3838 2023-09-04 02:21:18.000000 ./usr/share/doc/libgtsam-dev/examples/CombinedImuFactorsExample.cpp.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 3896 2023-09-04 02:21:18.000000 ./usr/share/doc/libgtsam-dev/examples/CreateSFMExampleData.cpp │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/examples/Data/ │ │ │ @@ -133,958 +133,958 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 2889 2023-09-04 02:21:18.000000 ./usr/share/doc/libgtsam-dev/examples/UGM_chain.cpp │ │ │ -rw-r--r-- 0 root (0) root (0) 2641 2023-09-04 02:21:18.000000 ./usr/share/doc/libgtsam-dev/examples/UGM_small.cpp │ │ │ -rw-r--r-- 0 root (0) root (0) 2368 2023-09-04 02:21:18.000000 ./usr/share/doc/libgtsam-dev/examples/VisualISAM2Example.cpp.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 2104 2023-09-04 02:21:18.000000 ./usr/share/doc/libgtsam-dev/examples/VisualISAMExample.cpp.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 1713 2023-09-04 02:21:18.000000 ./usr/share/doc/libgtsam-dev/examples/easyPoint2KalmanFilter.cpp.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 3926 2023-09-04 02:21:18.000000 ./usr/share/doc/libgtsam-dev/examples/elaboratePoint2KalmanFilter.cpp.gz │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/ │ │ │ --rw-r--r-- 0 root (0) root (0) 24215 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00008.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1480 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00008.js │ │ │ --rw-r--r-- 0 root (0) root (0) 51312 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00008_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6595 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00011.html │ │ │ --rw-r--r-- 0 root (0) root (0) 91 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00011.js │ │ │ --rw-r--r-- 0 root (0) root (0) 11015 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00014.html │ │ │ --rw-r--r-- 0 root (0) root (0) 429 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00014.js │ │ │ --rw-r--r-- 0 root (0) root (0) 37799 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00014_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21582 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00017.html │ │ │ --rw-r--r-- 0 root (0) root (0) 143 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00017.js │ │ │ --rw-r--r-- 0 root (0) root (0) 56603 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00017_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8401 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00020.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19377 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00023_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17131 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00026.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35570 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00026_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25653 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00029.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2086 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00029.js │ │ │ --rw-r--r-- 0 root (0) root (0) 57397 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00029_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 66646 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00032.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2508 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00032.js │ │ │ --rw-r--r-- 0 root (0) root (0) 192234 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00032_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9190 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00035.html │ │ │ --rw-r--r-- 0 root (0) root (0) 250 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00035.js │ │ │ --rw-r--r-- 0 root (0) root (0) 12942 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00035_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9399 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00038.html │ │ │ --rw-r--r-- 0 root (0) root (0) 237 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00038.js │ │ │ --rw-r--r-- 0 root (0) root (0) 12509 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00038_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8433 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00041.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14770 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00041_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7978 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00044.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7389 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00050.html │ │ │ --rw-r--r-- 0 root (0) root (0) 180 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00050.js │ │ │ --rw-r--r-- 0 root (0) root (0) 9727 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00050_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7344 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00053.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10629 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00002.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 87 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00002.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15877 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00002_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 52200 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00005_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21582 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00008.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 143 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00008.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 56603 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00008_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7978 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00011.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 26139 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00014_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9399 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00017.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 237 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00017.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 12509 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00017_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11015 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00023.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 429 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00023.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37799 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00023_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6595 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00026.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 91 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00026.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17131 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00029.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35570 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00029_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17409 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00032.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1045 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00032.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 66871 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00032_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 66646 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00035.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2508 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00035.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 192234 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00035_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7913 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00038.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14683 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00038_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6665 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00041.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18668 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00041_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6209 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00044.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00044.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25066 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00044_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7079 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00047.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16163 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00047_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5941 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00050.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7389 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00053.html │ │ │ -rw-r--r-- 0 root (0) root (0) 180 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00053.js │ │ │ --rw-r--r-- 0 root (0) root (0) 16112 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00056_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6209 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00059.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00059.js │ │ │ --rw-r--r-- 0 root (0) root (0) 25066 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00059_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6741 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00062.html │ │ │ --rw-r--r-- 0 root (0) root (0) 52828 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00062_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5941 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00065.html │ │ │ --rw-r--r-- 0 root (0) root (0) 77207 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00068_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7913 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00071.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14683 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00071_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27261 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00074.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1636 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00074.js │ │ │ --rw-r--r-- 0 root (0) root (0) 37709 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00074_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18926 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00077.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1345 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00077.js │ │ │ --rw-r--r-- 0 root (0) root (0) 6548 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00080.html │ │ │ --rw-r--r-- 0 root (0) root (0) 65 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00080.js │ │ │ --rw-r--r-- 0 root (0) root (0) 20753 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00080_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8418 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00083.html │ │ │ --rw-r--r-- 0 root (0) root (0) 343 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00083.js │ │ │ --rw-r--r-- 0 root (0) root (0) 27879 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00083_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17409 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00086.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1045 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00086.js │ │ │ --rw-r--r-- 0 root (0) root (0) 66871 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00086_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15649 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00089.html │ │ │ --rw-r--r-- 0 root (0) root (0) 556 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00089.js │ │ │ --rw-r--r-- 0 root (0) root (0) 29171 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00089_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6608 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00092.html │ │ │ --rw-r--r-- 0 root (0) root (0) 82782 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00092_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5816 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00095.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6757 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00098.html │ │ │ --rw-r--r-- 0 root (0) root (0) 156 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00098.js │ │ │ --rw-r--r-- 0 root (0) root (0) 35281 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00098_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7983 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00101.html │ │ │ --rw-r--r-- 0 root (0) root (0) 312 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00101.js │ │ │ --rw-r--r-- 0 root (0) root (0) 48110 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00101_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10629 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00104.html │ │ │ --rw-r--r-- 0 root (0) root (0) 87 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00104.js │ │ │ --rw-r--r-- 0 root (0) root (0) 15877 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00104_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 46759 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00107.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3446 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00107.js │ │ │ --rw-r--r-- 0 root (0) root (0) 77745 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00107_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28203 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00110.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2121 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00110.js │ │ │ --rw-r--r-- 0 root (0) root (0) 12084 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00113.html │ │ │ --rw-r--r-- 0 root (0) root (0) 696 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00113.js │ │ │ --rw-r--r-- 0 root (0) root (0) 31578 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00113_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17818 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00116.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1016 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00116.js │ │ │ --rw-r--r-- 0 root (0) root (0) 65609 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00116_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13624 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00119.html │ │ │ --rw-r--r-- 0 root (0) root (0) 675 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00119.js │ │ │ --rw-r--r-- 0 root (0) root (0) 39982 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00119_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 52200 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00122_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6884 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00125.html │ │ │ --rw-r--r-- 0 root (0) root (0) 94 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00125.js │ │ │ --rw-r--r-- 0 root (0) root (0) 9315 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00125_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6657 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00128.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27843 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00128_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9727 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00053_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7983 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00056.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 312 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00056.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 48110 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00056_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6757 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00059.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 156 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00059.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35281 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00059_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7057 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00062.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 172 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00062.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18897 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00062_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27261 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00065.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1636 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00065.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37709 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00065_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7344 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00071.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 180 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00071.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18926 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00074.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1345 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00074.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 8401 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00077.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6608 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00080.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 82782 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00080_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6741 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00083.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 52828 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00083_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 77207 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00086_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25653 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00089.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2086 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00089.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 57397 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00089_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 46759 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00092.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3446 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00092.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 77745 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00092_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 24215 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00095.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1480 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00095.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 51312 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00095_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15649 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00098.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 556 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00098.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 29171 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00098_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28203 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00101.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2121 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00101.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13624 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00104.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 675 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00104.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 39982 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00104_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16112 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00107_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10386 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00110.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 125 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00110.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 27505 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00110_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17818 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00113.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1016 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00113.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 65609 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00113_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6548 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00116.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 65 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00116.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 20753 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00116_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12084 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00119.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 696 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00119.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 31578 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00119_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5679 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00122.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19377 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00125_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5816 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00128.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6662 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00131.html │ │ │ -rw-r--r-- 0 root (0) root (0) 18268 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00131_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6665 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00134.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18668 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00134_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7057 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00137.html │ │ │ --rw-r--r-- 0 root (0) root (0) 172 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00137.js │ │ │ --rw-r--r-- 0 root (0) root (0) 18897 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00137_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7079 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00140.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16163 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00140_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5679 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00143.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10386 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00146.html │ │ │ --rw-r--r-- 0 root (0) root (0) 125 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00146.js │ │ │ --rw-r--r-- 0 root (0) root (0) 27505 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00146_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 26139 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00149_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7825 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00152.html │ │ │ --rw-r--r-- 0 root (0) root (0) 150 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00152.js │ │ │ --rw-r--r-- 0 root (0) root (0) 40486 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00152_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6449 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00155.html │ │ │ --rw-r--r-- 0 root (0) root (0) 68 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00155.js │ │ │ --rw-r--r-- 0 root (0) root (0) 18960 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00155_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8041 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00158.html │ │ │ --rw-r--r-- 0 root (0) root (0) 225 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00158.js │ │ │ --rw-r--r-- 0 root (0) root (0) 24383 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00158_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7285 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00161.html │ │ │ --rw-r--r-- 0 root (0) root (0) 66 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00161.js │ │ │ --rw-r--r-- 0 root (0) root (0) 22085 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00161_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5706 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00164.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7226 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00167.html │ │ │ --rw-r--r-- 0 root (0) root (0) 126 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00167.js │ │ │ --rw-r--r-- 0 root (0) root (0) 13159 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00167_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5639 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00170.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8418 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00134.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 343 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00134.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 27879 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00134_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8433 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00137.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14770 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00137_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9190 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00140.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 250 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00140.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 12942 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00140_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6657 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00143.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27843 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00143_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6884 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00146.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 94 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00146.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 9315 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00146_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13635 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00152.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 803 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00152.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 85202 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00152_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7285 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00155.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 66 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00155.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22085 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00155_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5706 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00158.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5639 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00161.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6449 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00164.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 68 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00164.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18960 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00164_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7825 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00167.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 150 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00167.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 40486 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00167_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8041 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00170.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 225 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00170.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24383 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00170_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 10375 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00173.html │ │ │ -rw-r--r-- 0 root (0) root (0) 324 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00173.js │ │ │ -rw-r--r-- 0 root (0) root (0) 54641 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00173_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13635 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00176.html │ │ │ --rw-r--r-- 0 root (0) root (0) 803 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00176.js │ │ │ --rw-r--r-- 0 root (0) root (0) 85202 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00176_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10021 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00179.html │ │ │ --rw-r--r-- 0 root (0) root (0) 244 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00179.js │ │ │ --rw-r--r-- 0 root (0) root (0) 21706 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00179_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13686 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00182.html │ │ │ --rw-r--r-- 0 root (0) root (0) 244 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00182.js │ │ │ --rw-r--r-- 0 root (0) root (0) 9286 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00185.html │ │ │ --rw-r--r-- 0 root (0) root (0) 309 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00185.js │ │ │ --rw-r--r-- 0 root (0) root (0) 27194 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00185_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7532 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00188.html │ │ │ --rw-r--r-- 0 root (0) root (0) 162 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00188.js │ │ │ --rw-r--r-- 0 root (0) root (0) 6642 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00191.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18784 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00191_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7124 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00194.html │ │ │ --rw-r--r-- 0 root (0) root (0) 144 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00194.js │ │ │ --rw-r--r-- 0 root (0) root (0) 25959 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00194_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5555 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00197.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7226 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00176.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 126 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00176.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13159 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00176_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6434 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00179.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19109 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00179_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7720 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00185.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 184 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00185.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 10021 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00188.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 244 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00188.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 21706 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00188_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5566 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00191.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5552 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00194.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6604 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00197.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 82 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00197.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32573 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00197_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 8783 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00200.html │ │ │ -rw-r--r-- 0 root (0) root (0) 289 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00200.js │ │ │ -rw-r--r-- 0 root (0) root (0) 24144 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00200_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7427 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00206.html │ │ │ --rw-r--r-- 0 root (0) root (0) 98 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00206.js │ │ │ --rw-r--r-- 0 root (0) root (0) 13987 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00206_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5566 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00209.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9288 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00212.html │ │ │ --rw-r--r-- 0 root (0) root (0) 337 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00212.js │ │ │ --rw-r--r-- 0 root (0) root (0) 50616 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00212_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7720 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00215.html │ │ │ --rw-r--r-- 0 root (0) root (0) 184 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00215.js │ │ │ --rw-r--r-- 0 root (0) root (0) 7580 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00218.html │ │ │ --rw-r--r-- 0 root (0) root (0) 159 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00218.js │ │ │ --rw-r--r-- 0 root (0) root (0) 29980 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00218_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6491 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00221.html │ │ │ --rw-r--r-- 0 root (0) root (0) 95 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00221.js │ │ │ --rw-r--r-- 0 root (0) root (0) 6320 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00224.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15576 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00224_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5575 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00227.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6594 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00230.html │ │ │ --rw-r--r-- 0 root (0) root (0) 86 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00230.js │ │ │ --rw-r--r-- 0 root (0) root (0) 20439 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00230_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5540 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00233.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6738 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00236.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00236.js │ │ │ --rw-r--r-- 0 root (0) root (0) 44827 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00236_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6278 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00239.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6998 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00242.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00242.js │ │ │ --rw-r--r-- 0 root (0) root (0) 24591 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00242_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5707 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00245.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6604 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00248.html │ │ │ --rw-r--r-- 0 root (0) root (0) 82 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00248.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32573 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00248_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5552 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00251.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6589 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00254.html │ │ │ --rw-r--r-- 0 root (0) root (0) 84 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00254.js │ │ │ --rw-r--r-- 0 root (0) root (0) 47723 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00254_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5639 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00257.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12074 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00260.html │ │ │ --rw-r--r-- 0 root (0) root (0) 444 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00260.js │ │ │ --rw-r--r-- 0 root (0) root (0) 69958 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00260_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 206584 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00263_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6434 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00266.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19109 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00266_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7329 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00269.html │ │ │ --rw-r--r-- 0 root (0) root (0) 164 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00269.js │ │ │ --rw-r--r-- 0 root (0) root (0) 40301 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00269_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5592 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00272.html │ │ │ --rw-r--r-- 0 root (0) root (0) 39426 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00275.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2373 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00275.js │ │ │ --rw-r--r-- 0 root (0) root (0) 127405 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00275_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 42494 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00281_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7695 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00287.html │ │ │ --rw-r--r-- 0 root (0) root (0) 146 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00287.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34553 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00287_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6253 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00290.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7269 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00293.html │ │ │ --rw-r--r-- 0 root (0) root (0) 211 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00293.js │ │ │ --rw-r--r-- 0 root (0) root (0) 39700 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00293_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7527 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00299.html │ │ │ --rw-r--r-- 0 root (0) root (0) 152 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00299.js │ │ │ --rw-r--r-- 0 root (0) root (0) 49706 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00299_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8992 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00305.html │ │ │ --rw-r--r-- 0 root (0) root (0) 103 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00305.js │ │ │ --rw-r--r-- 0 root (0) root (0) 24792 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00305_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5665 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00308.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8178 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00311.html │ │ │ --rw-r--r-- 0 root (0) root (0) 265 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00311.js │ │ │ --rw-r--r-- 0 root (0) root (0) 35173 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00311_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6350 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00314.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7340 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00317.html │ │ │ --rw-r--r-- 0 root (0) root (0) 265 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00317.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32342 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00317_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6343 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00320.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10697 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00323.html │ │ │ --rw-r--r-- 0 root (0) root (0) 403 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00323.js │ │ │ --rw-r--r-- 0 root (0) root (0) 79141 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00323_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5656 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00326.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5688 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00329.html │ │ │ --rw-r--r-- 0 root (0) root (0) 31329 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00329_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9756 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00332.html │ │ │ --rw-r--r-- 0 root (0) root (0) 352 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00332.js │ │ │ --rw-r--r-- 0 root (0) root (0) 26504 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00332_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7319 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00335.html │ │ │ --rw-r--r-- 0 root (0) root (0) 164 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00335.js │ │ │ --rw-r--r-- 0 root (0) root (0) 11986 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00338.html │ │ │ --rw-r--r-- 0 root (0) root (0) 475 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00338.js │ │ │ --rw-r--r-- 0 root (0) root (0) 39165 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00338_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8675 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00341.html │ │ │ --rw-r--r-- 0 root (0) root (0) 165 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00341.js │ │ │ --rw-r--r-- 0 root (0) root (0) 4906 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00344.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5655 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00347.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10562 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00350.html │ │ │ --rw-r--r-- 0 root (0) root (0) 392 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00350.js │ │ │ --rw-r--r-- 0 root (0) root (0) 84719 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00350_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7283 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00353.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00353.js │ │ │ --rw-r--r-- 0 root (0) root (0) 7206 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00356.html │ │ │ --rw-r--r-- 0 root (0) root (0) 189 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00356.js │ │ │ --rw-r--r-- 0 root (0) root (0) 42743 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00356_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5565 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00359.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7569 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00362.html │ │ │ --rw-r--r-- 0 root (0) root (0) 81 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00362.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32907 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00362_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10872 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00365.html │ │ │ --rw-r--r-- 0 root (0) root (0) 457 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00365.js │ │ │ --rw-r--r-- 0 root (0) root (0) 61746 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00365_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6171 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00368.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10132 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00371.html │ │ │ --rw-r--r-- 0 root (0) root (0) 389 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00371.js │ │ │ --rw-r--r-- 0 root (0) root (0) 71861 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00371_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7124 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00203.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 144 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00203.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25959 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00203_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5592 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00206.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7580 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00209.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 159 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00209.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 29980 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00209_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 206584 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00212_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5540 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00215.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7532 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00218.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 162 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00218.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 6589 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00221.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 84 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00221.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 47723 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00221_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13686 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00224.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 244 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00224.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 7329 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00227.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 164 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00227.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 40301 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00227_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5639 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00230.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5555 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00233.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7427 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00236.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 98 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00236.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13987 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00236_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6594 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00239.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 86 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00239.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 20439 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00239_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9286 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00242.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 309 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00242.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 27194 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00242_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12074 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00245.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 444 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00245.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 69958 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00245_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5575 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00248.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6491 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00251.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 95 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00251.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 6320 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00254.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15576 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00254_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9288 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00257.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 337 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00257.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 50616 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00257_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5707 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00260.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6642 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00263.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18784 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00263_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6738 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00266.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00266.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 44827 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00266_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6998 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00269.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00269.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24591 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00269_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6278 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00272.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7138 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00275.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 226 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00275.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 21252 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00275_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6379 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00278.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7047 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00281.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 144 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00281.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25061 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00281_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7319 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00284.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 164 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00284.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15430 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00287.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 661 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00287.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 23382 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00287_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6883 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00290.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 136 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00290.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 29154 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00290_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 39426 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00293.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2373 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00293.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 127405 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00293_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5676 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00296.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10697 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00302.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 403 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00302.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 79141 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00302_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7340 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00305.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 265 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00305.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32342 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00305_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7321 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00311.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 136 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00311.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 21198 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00311_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7527 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00314.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 152 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00314.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49706 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00314_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29089 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00317_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7439 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00320.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 258 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00320.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 80368 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00320_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11986 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00323.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 475 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00323.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 39165 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00323_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7569 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00329.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 81 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00329.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32907 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00329_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7206 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00332.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 189 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00332.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 42743 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00332_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6322 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00335.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6350 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00338.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11287 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00341.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 454 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00341.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 6268 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00344.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6259 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00347.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7581 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00350.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 286 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00350.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 41607 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00350_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5688 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00353.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 31329 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00353_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5538 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00356.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7636 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00359.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 101 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00359.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 33928 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00359_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6288 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00362.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6253 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00365.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8992 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00368.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 103 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00368.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24792 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00368_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7269 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00371.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 211 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00371.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 39700 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00371_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6171 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00374.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15430 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00377.html │ │ │ --rw-r--r-- 0 root (0) root (0) 661 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00377.js │ │ │ --rw-r--r-- 0 root (0) root (0) 23382 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00377_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11287 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00380.html │ │ │ --rw-r--r-- 0 root (0) root (0) 454 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00380.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14835 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00383.html │ │ │ --rw-r--r-- 0 root (0) root (0) 539 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00383.js │ │ │ --rw-r--r-- 0 root (0) root (0) 22880 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00383_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10872 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00386.html │ │ │ --rw-r--r-- 0 root (0) root (0) 327 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00386.js │ │ │ --rw-r--r-- 0 root (0) root (0) 7138 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00389.html │ │ │ --rw-r--r-- 0 root (0) root (0) 226 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00389.js │ │ │ --rw-r--r-- 0 root (0) root (0) 21252 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00389_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7741 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00392.html │ │ │ --rw-r--r-- 0 root (0) root (0) 174 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00392.js │ │ │ --rw-r--r-- 0 root (0) root (0) 103910 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00392_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7439 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00395.html │ │ │ --rw-r--r-- 0 root (0) root (0) 258 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00395.js │ │ │ --rw-r--r-- 0 root (0) root (0) 80368 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00395_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 31104 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00398_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8154 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00404.html │ │ │ --rw-r--r-- 0 root (0) root (0) 210 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00404.js │ │ │ --rw-r--r-- 0 root (0) root (0) 25126 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00404_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 51201 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00410_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6858 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00416.html │ │ │ --rw-r--r-- 0 root (0) root (0) 132 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00416.js │ │ │ --rw-r--r-- 0 root (0) root (0) 19855 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00416_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5538 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00419.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7039 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00422.html │ │ │ --rw-r--r-- 0 root (0) root (0) 223 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00422.js │ │ │ --rw-r--r-- 0 root (0) root (0) 94047 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00422_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8178 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00425.html │ │ │ --rw-r--r-- 0 root (0) root (0) 281 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00425.js │ │ │ --rw-r--r-- 0 root (0) root (0) 68835 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00425_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5676 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00428.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6968 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00431.html │ │ │ --rw-r--r-- 0 root (0) root (0) 148 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00431.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32402 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00431_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6379 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00434.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6883 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00437.html │ │ │ --rw-r--r-- 0 root (0) root (0) 136 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00437.js │ │ │ --rw-r--r-- 0 root (0) root (0) 29154 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00437_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6322 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00440.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7047 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00443.html │ │ │ --rw-r--r-- 0 root (0) root (0) 144 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00443.js │ │ │ --rw-r--r-- 0 root (0) root (0) 25061 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00443_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6286 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00446.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6957 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00449.html │ │ │ --rw-r--r-- 0 root (0) root (0) 144 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00449.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34458 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00449_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6284 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00452.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29089 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00455_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6288 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00458.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7321 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00461.html │ │ │ --rw-r--r-- 0 root (0) root (0) 136 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00461.js │ │ │ --rw-r--r-- 0 root (0) root (0) 21198 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00461_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6268 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00464.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6953 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00467.html │ │ │ --rw-r--r-- 0 root (0) root (0) 144 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00467.js │ │ │ --rw-r--r-- 0 root (0) root (0) 30607 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00467_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6259 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00470.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7636 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00473.html │ │ │ --rw-r--r-- 0 root (0) root (0) 101 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00473.js │ │ │ --rw-r--r-- 0 root (0) root (0) 33928 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00473_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6302 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00476.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7581 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00479.html │ │ │ --rw-r--r-- 0 root (0) root (0) 286 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00479.js │ │ │ --rw-r--r-- 0 root (0) root (0) 41607 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00479_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6690 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00482.html │ │ │ --rw-r--r-- 0 root (0) root (0) 73 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00482.js │ │ │ --rw-r--r-- 0 root (0) root (0) 57767 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00482_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6908 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00485.html │ │ │ --rw-r--r-- 0 root (0) root (0) 134 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00485.js │ │ │ --rw-r--r-- 0 root (0) root (0) 58194 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00485_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6226 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00488.html │ │ │ --rw-r--r-- 0 root (0) root (0) 74 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00488.js │ │ │ --rw-r--r-- 0 root (0) root (0) 15209 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00488_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5665 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00491.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6403 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00494.html │ │ │ --rw-r--r-- 0 root (0) root (0) 79 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00494.js │ │ │ --rw-r--r-- 0 root (0) root (0) 29636 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00494_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5531 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00497.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6587 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00500.html │ │ │ --rw-r--r-- 0 root (0) root (0) 162 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00500.js │ │ │ --rw-r--r-- 0 root (0) root (0) 18018 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00500_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5709 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00503.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6506 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00506.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13719 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00506_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5524 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00509.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6769 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00512.html │ │ │ --rw-r--r-- 0 root (0) root (0) 84 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00512.js │ │ │ --rw-r--r-- 0 root (0) root (0) 16945 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00512_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8586 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00518.html │ │ │ --rw-r--r-- 0 root (0) root (0) 270 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00518.js │ │ │ --rw-r--r-- 0 root (0) root (0) 41431 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00518_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8675 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00377.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 165 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00377.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 10562 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00380.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 392 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00380.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 84719 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00380_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4906 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00383.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10132 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00386.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 389 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00386.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 71861 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00386_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5656 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00389.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5655 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00392.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5665 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00395.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5565 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00398.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8178 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00401.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 265 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00401.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35173 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00401_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6343 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00407.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6284 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00410.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14835 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00413.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 539 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00413.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22880 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00413_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7695 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00416.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 146 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00416.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34553 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00416_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8154 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00419.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 210 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00419.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25126 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00419_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6957 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00422.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 144 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00422.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34458 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00422_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9756 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00425.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 352 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00425.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 26504 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00425_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 42494 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00431_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6968 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00434.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 148 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00434.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32402 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00434_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6858 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00437.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 132 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00437.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 19855 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00437_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6286 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00440.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 51201 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00443_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6302 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00446.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10872 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00452.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 457 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00452.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 61746 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00452_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6953 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00455.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 144 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00455.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 30607 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00455_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8178 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00458.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 281 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00458.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 68835 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00458_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7283 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00461.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00461.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 7039 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00464.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 223 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00464.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 94047 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00464_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6171 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00467.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 31104 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00470_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10872 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00476.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 327 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00476.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 7741 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00479.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 174 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00479.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 103910 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00479_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5531 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00482.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8586 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00485.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 270 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00485.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 41431 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00485_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7018 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00488.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 80 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00488.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 31373 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00488_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6816 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00491.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 87 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00491.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 29314 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00491_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6908 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00494.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 134 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00494.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 58194 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00494_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6769 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00497.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 84 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00497.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 16945 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00497_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5697 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00500.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5665 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00503.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6226 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00506.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 74 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00506.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15209 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00506_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6903 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00512.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 93 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00512.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 5755 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00515.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6403 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00518.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 79 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00518.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 29636 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00518_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9159 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00521.html │ │ │ -rw-r--r-- 0 root (0) root (0) 180 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00521.js │ │ │ --rw-r--r-- 0 root (0) root (0) 7268 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00524.html │ │ │ --rw-r--r-- 0 root (0) root (0) 77 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00524.js │ │ │ --rw-r--r-- 0 root (0) root (0) 18804 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00524_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5697 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00527.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9935 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00530.html │ │ │ --rw-r--r-- 0 root (0) root (0) 168 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00530.js │ │ │ --rw-r--r-- 0 root (0) root (0) 33611 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00530_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7749 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00533.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6322 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00536.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15766 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00536_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5533 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00539.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6582 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00542.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00542.js │ │ │ --rw-r--r-- 0 root (0) root (0) 42027 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00542_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5521 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00545.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8025 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00548.html │ │ │ --rw-r--r-- 0 root (0) root (0) 231 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00548.js │ │ │ --rw-r--r-- 0 root (0) root (0) 31331 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00548_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5713 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00551.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7018 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00554.html │ │ │ --rw-r--r-- 0 root (0) root (0) 80 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00554.js │ │ │ --rw-r--r-- 0 root (0) root (0) 31373 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00554_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6903 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00557.html │ │ │ --rw-r--r-- 0 root (0) root (0) 93 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00557.js │ │ │ --rw-r--r-- 0 root (0) root (0) 6816 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00560.html │ │ │ --rw-r--r-- 0 root (0) root (0) 87 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00560.js │ │ │ --rw-r--r-- 0 root (0) root (0) 29314 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00560_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5755 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00563.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7797 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00566.html │ │ │ --rw-r--r-- 0 root (0) root (0) 165 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00566.js │ │ │ --rw-r--r-- 0 root (0) root (0) 36848 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00566_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6737 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00569.html │ │ │ --rw-r--r-- 0 root (0) root (0) 100 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00569.js │ │ │ --rw-r--r-- 0 root (0) root (0) 5529 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00572.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6476 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00575.html │ │ │ --rw-r--r-- 0 root (0) root (0) 88 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00575.js │ │ │ --rw-r--r-- 0 root (0) root (0) 11023 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00575_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8617 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00578.html │ │ │ --rw-r--r-- 0 root (0) root (0) 96 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00578.js │ │ │ --rw-r--r-- 0 root (0) root (0) 19774 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00578_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13267 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00581.html │ │ │ --rw-r--r-- 0 root (0) root (0) 681 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00581.js │ │ │ --rw-r--r-- 0 root (0) root (0) 22145 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00581_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 54067 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00584_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7023 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00587.html │ │ │ --rw-r--r-- 0 root (0) root (0) 136 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00587.js │ │ │ --rw-r--r-- 0 root (0) root (0) 23512 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00587_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5520 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00590.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6879 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00593.html │ │ │ --rw-r--r-- 0 root (0) root (0) 136 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00593.js │ │ │ --rw-r--r-- 0 root (0) root (0) 38328 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00593_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5523 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00596.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5606 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00599.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22139 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00599_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6367 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00605.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6687 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00608.html │ │ │ --rw-r--r-- 0 root (0) root (0) 126 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00608.js │ │ │ --rw-r--r-- 0 root (0) root (0) 49427 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00608_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6465 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00611.html │ │ │ --rw-r--r-- 0 root (0) root (0) 70 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00611.js │ │ │ --rw-r--r-- 0 root (0) root (0) 18421 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00611_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5593 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00614.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17977 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00614_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9935 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00524.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 168 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00524.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 33611 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00524_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7797 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00527.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 165 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00527.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 36848 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00527_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5533 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00530.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6582 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00533.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00533.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 42027 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00533_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8025 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00536.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 231 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00536.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 31331 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00536_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6737 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00539.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 100 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00539.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 5713 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00542.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5524 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00545.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6506 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00548.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13719 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00548_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5521 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00551.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6587 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00554.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 162 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00554.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18018 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00554_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7268 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00557.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 77 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00557.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18804 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00557_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6322 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00560.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15766 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00560_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7749 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00563.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5709 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00566.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6690 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00569.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 73 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00569.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 57767 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00569_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 90312 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00572_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6687 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00575.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 126 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00575.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49427 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00575_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6459 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00578.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22692 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00578_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6436 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00581.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22543 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00581_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5666 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00584.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28303 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00587_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7505 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00590.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 221 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00590.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 65993 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00590_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5606 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00596.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22139 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00596_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6695 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00599.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 189 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00599.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 62349 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00599_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5529 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00602.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5734 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00605.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 46729 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00605_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28749 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00608_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5591 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00611.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6465 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00614.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 70 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00614.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18421 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00614_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 10019 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00617.html │ │ │ -rw-r--r-- 0 root (0) root (0) 449 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00617.js │ │ │ -rw-r--r-- 0 root (0) root (0) 31790 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00617_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15849 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00623.html │ │ │ --rw-r--r-- 0 root (0) root (0) 641 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00623.js │ │ │ --rw-r--r-- 0 root (0) root (0) 30059 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00623_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6700 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00629.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15755 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00629_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6648 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00632.html │ │ │ --rw-r--r-- 0 root (0) root (0) 229 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00632.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34362 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00632_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6363 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00635.html │ │ │ --rw-r--r-- 0 root (0) root (0) 77 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00635.js │ │ │ --rw-r--r-- 0 root (0) root (0) 15140 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00635_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5671 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00638.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18304 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00638_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7717 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00641.html │ │ │ --rw-r--r-- 0 root (0) root (0) 262 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00641.js │ │ │ --rw-r--r-- 0 root (0) root (0) 88802 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00641_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5734 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00644.html │ │ │ --rw-r--r-- 0 root (0) root (0) 46729 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00644_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7687 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00647.html │ │ │ --rw-r--r-- 0 root (0) root (0) 146 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00647.js │ │ │ --rw-r--r-- 0 root (0) root (0) 38682 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00647_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5591 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00650.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6665 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00653.html │ │ │ --rw-r--r-- 0 root (0) root (0) 178 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00653.js │ │ │ --rw-r--r-- 0 root (0) root (0) 36162 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00653_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5639 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00656.html │ │ │ --rw-r--r-- 0 root (0) root (0) 66585 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00656_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7205 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00659.html │ │ │ --rw-r--r-- 0 root (0) root (0) 166 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00659.js │ │ │ --rw-r--r-- 0 root (0) root (0) 56256 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00659_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 90312 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00662_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6459 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00665.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22692 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00665_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5637 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00668.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6167 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00671.html │ │ │ --rw-r--r-- 0 root (0) root (0) 101 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00671.js │ │ │ --rw-r--r-- 0 root (0) root (0) 42759 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00671_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28303 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00674_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7807 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00677.html │ │ │ --rw-r--r-- 0 root (0) root (0) 240 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00677.js │ │ │ --rw-r--r-- 0 root (0) root (0) 56707 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00677_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6695 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00680.html │ │ │ --rw-r--r-- 0 root (0) root (0) 189 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00680.js │ │ │ --rw-r--r-- 0 root (0) root (0) 62349 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00680_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6454 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00683.html │ │ │ --rw-r--r-- 0 root (0) root (0) 103 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00683.js │ │ │ --rw-r--r-- 0 root (0) root (0) 46554 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00683_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5705 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00686.html │ │ │ --rw-r--r-- 0 root (0) root (0) 51666 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00686_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7505 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00689.html │ │ │ --rw-r--r-- 0 root (0) root (0) 221 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00689.js │ │ │ --rw-r--r-- 0 root (0) root (0) 65993 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00689_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5666 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00692.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6945 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00695.html │ │ │ --rw-r--r-- 0 root (0) root (0) 113625 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00695_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6436 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00698.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22543 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00698_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28749 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00701_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8332 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00704.html │ │ │ --rw-r--r-- 0 root (0) root (0) 192 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00704.js │ │ │ --rw-r--r-- 0 root (0) root (0) 8297 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00707.html │ │ │ --rw-r--r-- 0 root (0) root (0) 94 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00707.js │ │ │ --rw-r--r-- 0 root (0) root (0) 7999 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00710.html │ │ │ --rw-r--r-- 0 root (0) root (0) 276 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00710.js │ │ │ --rw-r--r-- 0 root (0) root (0) 21749 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00710_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5691 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00713.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7661 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00716.html │ │ │ --rw-r--r-- 0 root (0) root (0) 188 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00716.js │ │ │ --rw-r--r-- 0 root (0) root (0) 38060 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00716_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13120 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00719.html │ │ │ --rw-r--r-- 0 root (0) root (0) 670 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00719.js │ │ │ --rw-r--r-- 0 root (0) root (0) 28259 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00719_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10979 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00722.html │ │ │ --rw-r--r-- 0 root (0) root (0) 453 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00722.js │ │ │ --rw-r--r-- 0 root (0) root (0) 7443 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00725.html │ │ │ --rw-r--r-- 0 root (0) root (0) 163 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00725.js │ │ │ --rw-r--r-- 0 root (0) root (0) 33932 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00725_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7225 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00728.html │ │ │ --rw-r--r-- 0 root (0) root (0) 78 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00728.js │ │ │ --rw-r--r-- 0 root (0) root (0) 69400 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00728_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7759 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00731.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6717 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00734.html │ │ │ --rw-r--r-- 0 root (0) root (0) 138 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00734.js │ │ │ --rw-r--r-- 0 root (0) root (0) 22245 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00734_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5648 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00737.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6663 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00740.html │ │ │ --rw-r--r-- 0 root (0) root (0) 154 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00740.js │ │ │ --rw-r--r-- 0 root (0) root (0) 29640 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00740_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5557 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00743.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8871 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00746.html │ │ │ --rw-r--r-- 0 root (0) root (0) 415 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00746.js │ │ │ --rw-r--r-- 0 root (0) root (0) 38721 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00746_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9091 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00749.html │ │ │ --rw-r--r-- 0 root (0) root (0) 185 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00749.js │ │ │ --rw-r--r-- 0 root (0) root (0) 8668 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00752.html │ │ │ --rw-r--r-- 0 root (0) root (0) 180 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00752.js │ │ │ --rw-r--r-- 0 root (0) root (0) 15601 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00752_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7323 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00755.html │ │ │ --rw-r--r-- 0 root (0) root (0) 116 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00755.js │ │ │ --rw-r--r-- 0 root (0) root (0) 16423 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00755_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5520 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00758.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6366 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00761.html │ │ │ --rw-r--r-- 0 root (0) root (0) 67 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00761.js │ │ │ --rw-r--r-- 0 root (0) root (0) 13881 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00761_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5578 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00764.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6842 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00767.html │ │ │ --rw-r--r-- 0 root (0) root (0) 86 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00767.js │ │ │ --rw-r--r-- 0 root (0) root (0) 40634 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00767_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6562 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00770.html │ │ │ --rw-r--r-- 0 root (0) root (0) 160 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00770.js │ │ │ --rw-r--r-- 0 root (0) root (0) 56968 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00770_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37272 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00773_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6428 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00779.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00779.js │ │ │ --rw-r--r-- 0 root (0) root (0) 25237 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00779_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28869 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00782_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15960 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00788.html │ │ │ --rw-r--r-- 0 root (0) root (0) 891 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00788.js │ │ │ --rw-r--r-- 0 root (0) root (0) 125878 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00788_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8124 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00791.html │ │ │ --rw-r--r-- 0 root (0) root (0) 69549 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00794_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7128 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00800.html │ │ │ --rw-r--r-- 0 root (0) root (0) 72 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00800.js │ │ │ --rw-r--r-- 0 root (0) root (0) 26183 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00800_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5725 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00803.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7995 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00806.html │ │ │ --rw-r--r-- 0 root (0) root (0) 216 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00806.js │ │ │ --rw-r--r-- 0 root (0) root (0) 73746 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00806_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27298 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00809_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7940 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00812.html │ │ │ --rw-r--r-- 0 root (0) root (0) 245 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00812.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32692 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00812_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6419 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00815.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8957 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00818.html │ │ │ --rw-r--r-- 0 root (0) root (0) 312 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00818.js │ │ │ --rw-r--r-- 0 root (0) root (0) 60246 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00818_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5770 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00821.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13639 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00821_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6387 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00824.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13406 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00824_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5562 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00827.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6532 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00830.html │ │ │ --rw-r--r-- 0 root (0) root (0) 134 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00830.js │ │ │ --rw-r--r-- 0 root (0) root (0) 12972 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00830_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8188 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00836.html │ │ │ --rw-r--r-- 0 root (0) root (0) 313 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00836.js │ │ │ --rw-r--r-- 0 root (0) root (0) 73410 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00836_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7316 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00839.html │ │ │ --rw-r--r-- 0 root (0) root (0) 97 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00839.js │ │ │ --rw-r--r-- 0 root (0) root (0) 7058 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00842.html │ │ │ --rw-r--r-- 0 root (0) root (0) 138 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00842.js │ │ │ --rw-r--r-- 0 root (0) root (0) 39533 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00842_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5627 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00845.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6141 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00848.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00848.js │ │ │ --rw-r--r-- 0 root (0) root (0) 15664 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00848_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5571 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00851.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6581 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00854.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17930 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00854_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5609 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00857.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6901 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00860.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00860.js │ │ │ --rw-r--r-- 0 root (0) root (0) 46918 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00860_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5601 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00863.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5668 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00866.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12032 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00866_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7433 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00869.html │ │ │ --rw-r--r-- 0 root (0) root (0) 207 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00869.js │ │ │ --rw-r--r-- 0 root (0) root (0) 22427 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00869_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6475 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00872.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7362 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00875.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13056 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00875_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6978 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00878.html │ │ │ --rw-r--r-- 0 root (0) root (0) 82 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00878.js │ │ │ --rw-r--r-- 0 root (0) root (0) 35496 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00878_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5643 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00881.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13381 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00884.html │ │ │ --rw-r--r-- 0 root (0) root (0) 665 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00884.js │ │ │ --rw-r--r-- 0 root (0) root (0) 19609 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00884_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12146 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00887.html │ │ │ --rw-r--r-- 0 root (0) root (0) 536 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00887.js │ │ │ --rw-r--r-- 0 root (0) root (0) 7445 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00890.html │ │ │ --rw-r--r-- 0 root (0) root (0) 87 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00890.js │ │ │ --rw-r--r-- 0 root (0) root (0) 35988 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00890_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7210 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00896.html │ │ │ --rw-r--r-- 0 root (0) root (0) 176 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00896.js │ │ │ --rw-r--r-- 0 root (0) root (0) 28405 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00896_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7195 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00899.html │ │ │ --rw-r--r-- 0 root (0) root (0) 94 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00899.js │ │ │ --rw-r--r-- 0 root (0) root (0) 29635 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00899_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6414 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00905.html │ │ │ --rw-r--r-- 0 root (0) root (0) 81 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00905.js │ │ │ --rw-r--r-- 0 root (0) root (0) 25637 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00905_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8617 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00620.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 96 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00620.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 19774 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00620_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5520 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00623.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6167 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00626.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 101 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00626.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 42759 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00626_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5705 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00629.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 51666 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00629_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6363 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00632.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 77 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00632.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15140 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00632_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5639 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00635.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 66585 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00635_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 54067 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00638_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5523 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00641.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6367 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00644.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6700 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00647.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15755 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00647_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7023 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00650.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 136 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00650.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 23512 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00650_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6945 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00653.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 113625 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00653_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5671 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00656.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18304 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00656_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5637 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00659.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7205 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00662.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 166 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00662.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 56256 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00662_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7687 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00665.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 146 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00665.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 38682 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00665_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7807 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00668.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 240 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00668.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 56707 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00668_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6648 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00671.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 229 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00671.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34362 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00671_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15849 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00677.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 641 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00677.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 30059 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00677_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6879 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00683.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 136 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00683.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 38328 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00683_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6454 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00686.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 103 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00686.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 46554 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00686_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13267 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00689.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 681 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00689.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22145 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00689_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5593 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00692.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17977 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00692_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6665 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00695.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 178 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00695.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 36162 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00695_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7717 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00698.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 262 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00698.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 88802 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00698_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6476 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00701.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 88 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00701.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 11023 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00701_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7940 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00704.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 245 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00704.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32692 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00704_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6475 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00707.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5643 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00710.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37272 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00713_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28869 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00716_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9091 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00719.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 185 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00719.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 5578 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00722.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5668 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00725.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12032 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00725_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12146 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00728.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 536 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00728.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13120 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00731.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 670 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00731.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 28259 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00731_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27298 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00734_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15960 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00737.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 891 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00737.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 125878 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00737_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5627 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00740.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7225 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00746.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 78 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00746.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 69400 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00746_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8957 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00749.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 312 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00749.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 60246 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00749_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6428 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00752.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00752.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25237 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00752_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7999 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00755.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 276 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00755.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 21749 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00755_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5648 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00758.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7323 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00761.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 116 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00761.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 16423 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00761_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5609 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00764.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13381 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00767.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 665 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00767.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 19609 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00767_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7661 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00770.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 188 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00770.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 38060 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00770_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7433 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00773.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 207 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00773.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22427 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00773_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7316 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00776.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 97 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00776.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 5725 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00779.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6562 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00782.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 160 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00782.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 56968 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00782_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10979 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00785.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 453 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00785.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 5557 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00788.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7128 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00791.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 72 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00791.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 26183 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00791_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7995 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00794.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 216 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00794.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 73746 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00794_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5520 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00797.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6387 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00800.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13406 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00800_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8124 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00809.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6978 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00812.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 82 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00812.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35496 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00812_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7195 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00815.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 94 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00815.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 29635 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00815_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6581 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00818.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17930 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00818_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8871 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00821.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 415 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00821.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 38721 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00821_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 69549 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00824_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6419 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00827.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6901 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00830.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00830.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 46918 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00830_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7759 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00833.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7443 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00839.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 163 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00839.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 33932 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00839_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6141 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00842.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00842.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15664 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00842_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5770 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00845.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13639 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00845_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8668 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00848.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 180 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00848.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15601 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00848_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7445 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00851.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 87 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00851.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35988 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00851_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7058 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00854.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 138 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00854.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 39533 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00854_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8297 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00857.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 94 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00857.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 5601 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00860.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6366 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00863.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 67 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00863.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13881 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00863_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6717 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00866.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 138 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00866.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22245 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00866_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8188 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00869.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 313 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00869.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 73410 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00869_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5691 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00872.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6842 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00875.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 86 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00875.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 40634 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00875_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7210 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00878.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 176 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00878.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 28405 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00878_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5562 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00881.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8332 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00884.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 192 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00884.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 6663 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00887.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 154 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00887.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 29640 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00887_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7362 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00890.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13056 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00890_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6532 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00893.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 134 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00893.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 12972 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00893_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5571 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00899.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5669 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00902.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7029 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00905.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35940 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00905_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9996 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00908.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6439 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00911.html │ │ │ --rw-r--r-- 0 root (0) root (0) 140 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00911.js │ │ │ --rw-r--r-- 0 root (0) root (0) 33448 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00911_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7321 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00917.html │ │ │ --rw-r--r-- 0 root (0) root (0) 197 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00917.js │ │ │ --rw-r--r-- 0 root (0) root (0) 33342 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00917_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6448 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00920.html │ │ │ --rw-r--r-- 0 root (0) root (0) 80 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00920.js │ │ │ --rw-r--r-- 0 root (0) root (0) 23692 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00920_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7069 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00926.html │ │ │ --rw-r--r-- 0 root (0) root (0) 78 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00926.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34621 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00926_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7763 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00932.html │ │ │ --rw-r--r-- 0 root (0) root (0) 223 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00932.js │ │ │ --rw-r--r-- 0 root (0) root (0) 38413 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00932_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5609 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00935.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6414 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00914.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 81 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00914.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25637 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00914_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7763 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00923.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 223 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00923.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 38413 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00923_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 32900 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00926_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11831 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00929.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8465 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00932.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 231 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00932.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 47156 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00932_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6611 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00935.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 82 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00935.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18128 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00935_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7639 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00938.html │ │ │ -rw-r--r-- 0 root (0) root (0) 202 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00938.js │ │ │ -rw-r--r-- 0 root (0) root (0) 39261 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00938_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6359 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00944.html │ │ │ --rw-r--r-- 0 root (0) root (0) 82 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00944.js │ │ │ --rw-r--r-- 0 root (0) root (0) 24129 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00944_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5612 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00947.html │ │ │ --rw-r--r-- 0 root (0) root (0) 32900 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00950_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8465 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00953.html │ │ │ --rw-r--r-- 0 root (0) root (0) 231 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00953.js │ │ │ --rw-r--r-- 0 root (0) root (0) 47156 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00953_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8826 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00956.html │ │ │ --rw-r--r-- 0 root (0) root (0) 213 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00956.js │ │ │ --rw-r--r-- 0 root (0) root (0) 55825 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00956_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6864 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00959.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6921 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00962.html │ │ │ --rw-r--r-- 0 root (0) root (0) 152 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00962.js │ │ │ --rw-r--r-- 0 root (0) root (0) 37965 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00962_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6963 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00965.html │ │ │ --rw-r--r-- 0 root (0) root (0) 93 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00965.js │ │ │ --rw-r--r-- 0 root (0) root (0) 7029 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00968.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35940 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00968_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5635 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00971.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6611 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00974.html │ │ │ --rw-r--r-- 0 root (0) root (0) 82 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00974.js │ │ │ --rw-r--r-- 0 root (0) root (0) 18128 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00974_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9760 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00977.html │ │ │ --rw-r--r-- 0 root (0) root (0) 316 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00977.js │ │ │ --rw-r--r-- 0 root (0) root (0) 59601 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00977_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11831 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00980.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6390 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00983.html │ │ │ --rw-r--r-- 0 root (0) root (0) 24874 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00983_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5669 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00986.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8571 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00989.html │ │ │ --rw-r--r-- 0 root (0) root (0) 153 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00989.js │ │ │ --rw-r--r-- 0 root (0) root (0) 49274 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00989_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5660 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00992.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6683 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00995.html │ │ │ --rw-r--r-- 0 root (0) root (0) 143 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00995.js │ │ │ --rw-r--r-- 0 root (0) root (0) 41393 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00995_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5559 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00998.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6646 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01001.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01001.js │ │ │ --rw-r--r-- 0 root (0) root (0) 13167 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01001_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10777 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01004.html │ │ │ --rw-r--r-- 0 root (0) root (0) 201 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01004.js │ │ │ --rw-r--r-- 0 root (0) root (0) 26364 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01004_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10047 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01007.html │ │ │ --rw-r--r-- 0 root (0) root (0) 118 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01007.js │ │ │ --rw-r--r-- 0 root (0) root (0) 13067 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01007_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7258 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01010.html │ │ │ --rw-r--r-- 0 root (0) root (0) 153 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01010.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32517 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01010_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6963 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00941.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 93 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00941.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 8826 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00944.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 213 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00944.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 55825 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00944_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6359 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00950.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 82 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00950.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24129 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00950_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6683 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00953.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 143 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00953.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 41393 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00953_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5635 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00956.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5609 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00959.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5559 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00962.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6921 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00965.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 152 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00965.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37965 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00965_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7069 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00968.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 78 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00968.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34621 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00968_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6439 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00971.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 140 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00971.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 33448 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00971_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7321 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00974.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 197 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00974.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 33342 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00974_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6864 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00980.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5660 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00983.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5612 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00986.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9760 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00989.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 316 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00989.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 59601 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00989_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6390 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00992.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 24874 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00992_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6448 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00995.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 80 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00995.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 23692 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00995_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8571 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00998.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 153 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00998.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49274 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00998_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6403 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01001.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 73 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01001.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25127 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01001_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8403 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01004.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 161 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01004.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 23145 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01004_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5765 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01007.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6674 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01010.html │ │ │ -rw-r--r-- 0 root (0) root (0) 10303 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01013.html │ │ │ -rw-r--r-- 0 root (0) root (0) 693 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01013.js │ │ │ -rw-r--r-- 0 root (0) root (0) 99817 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01013_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83353 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01019_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7249 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01025.html │ │ │ --rw-r--r-- 0 root (0) root (0) 84 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01025.js │ │ │ --rw-r--r-- 0 root (0) root (0) 36222 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01025_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5757 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01028.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8403 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01031.html │ │ │ --rw-r--r-- 0 root (0) root (0) 161 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01031.js │ │ │ --rw-r--r-- 0 root (0) root (0) 23145 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01031_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7515 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01034.html │ │ │ --rw-r--r-- 0 root (0) root (0) 99 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01034.js │ │ │ --rw-r--r-- 0 root (0) root (0) 6403 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01037.html │ │ │ --rw-r--r-- 0 root (0) root (0) 73 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01037.js │ │ │ --rw-r--r-- 0 root (0) root (0) 25127 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01037_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5537 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01040.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6681 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01043.html │ │ │ --rw-r--r-- 0 root (0) root (0) 150 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01043.js │ │ │ --rw-r--r-- 0 root (0) root (0) 49490 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01043_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5672 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01046.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11271 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01049.html │ │ │ --rw-r--r-- 0 root (0) root (0) 275 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01049.js │ │ │ --rw-r--r-- 0 root (0) root (0) 88722 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01049_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5598 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01052.html │ │ │ --rw-r--r-- 0 root (0) root (0) 75095 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01055_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8791 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01058.html │ │ │ --rw-r--r-- 0 root (0) root (0) 265 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01058.js │ │ │ --rw-r--r-- 0 root (0) root (0) 44674 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01058_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5791 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01061.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7312 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01064.html │ │ │ --rw-r--r-- 0 root (0) root (0) 126 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01064.js │ │ │ --rw-r--r-- 0 root (0) root (0) 37468 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01064_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5509 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01067.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8791 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01016.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 265 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01016.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 44674 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01016_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6521 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01019.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 84 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01019.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37759 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01019_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6646 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01022.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01022.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13167 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01022_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5544 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01025.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6521 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01028.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 81 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01028.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13022 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01028_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5542 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01031.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7312 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01034.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 126 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01034.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37468 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01034_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 43820 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01037_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83353 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01040_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6662 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01043.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16604 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01043_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5575 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01046.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5641 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01049.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6201 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01052.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6681 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01055.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 150 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01055.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49490 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01055_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8787 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01058.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 314 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01058.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 68014 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01058_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6802 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01061.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 137 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01061.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17991 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01061_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7950 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01064.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 364 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01064.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 103846 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01064_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8182 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01067.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 154 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01067.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32933 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01067_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6866 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01070.html │ │ │ -rw-r--r-- 0 root (0) root (0) 152 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01070.js │ │ │ -rw-r--r-- 0 root (0) root (0) 28417 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01070_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5544 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01073.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6521 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01076.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5757 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01073.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7249 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01076.html │ │ │ -rw-r--r-- 0 root (0) root (0) 84 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01076.js │ │ │ --rw-r--r-- 0 root (0) root (0) 37759 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01076_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5765 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01079.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6590 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01082.html │ │ │ --rw-r--r-- 0 root (0) root (0) 87 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01082.js │ │ │ --rw-r--r-- 0 root (0) root (0) 24596 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01082_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5816 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01085.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6662 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01088.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16604 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01088_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8050 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01091.html │ │ │ --rw-r--r-- 0 root (0) root (0) 176 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01091.js │ │ │ --rw-r--r-- 0 root (0) root (0) 37487 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01091_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8813 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01094.html │ │ │ --rw-r--r-- 0 root (0) root (0) 156 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01094.js │ │ │ --rw-r--r-- 0 root (0) root (0) 60117 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01094_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5575 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01097.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8182 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01100.html │ │ │ --rw-r--r-- 0 root (0) root (0) 154 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01100.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32933 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01100_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7262 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01103.html │ │ │ --rw-r--r-- 0 root (0) root (0) 99 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01103.js │ │ │ --rw-r--r-- 0 root (0) root (0) 7005 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01106.html │ │ │ --rw-r--r-- 0 root (0) root (0) 71 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01106.js │ │ │ --rw-r--r-- 0 root (0) root (0) 54857 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01106_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5679 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01109.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7950 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01112.html │ │ │ --rw-r--r-- 0 root (0) root (0) 364 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01112.js │ │ │ --rw-r--r-- 0 root (0) root (0) 103846 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01112_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6674 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01115.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6511 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01118.html │ │ │ --rw-r--r-- 0 root (0) root (0) 78 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01118.js │ │ │ --rw-r--r-- 0 root (0) root (0) 17610 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01118_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5676 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01121.html │ │ │ --rw-r--r-- 0 root (0) root (0) 43820 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01124_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6719 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01127.html │ │ │ --rw-r--r-- 0 root (0) root (0) 89 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01127.js │ │ │ --rw-r--r-- 0 root (0) root (0) 94502 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01127_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6802 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01130.html │ │ │ --rw-r--r-- 0 root (0) root (0) 137 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01130.js │ │ │ --rw-r--r-- 0 root (0) root (0) 17991 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01130_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5542 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01133.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10339 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01136.html │ │ │ --rw-r--r-- 0 root (0) root (0) 493 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01136.js │ │ │ --rw-r--r-- 0 root (0) root (0) 50078 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01136_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6497 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01139.html │ │ │ --rw-r--r-- 0 root (0) root (0) 89 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01139.js │ │ │ --rw-r--r-- 0 root (0) root (0) 21256 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01139_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5778 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01142.html │ │ │ --rw-r--r-- 0 root (0) root (0) 30718 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01142_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6521 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01145.html │ │ │ --rw-r--r-- 0 root (0) root (0) 81 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01145.js │ │ │ --rw-r--r-- 0 root (0) root (0) 13022 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01145_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 74370 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01148_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15640 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01151.html │ │ │ --rw-r--r-- 0 root (0) root (0) 919 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01151.js │ │ │ --rw-r--r-- 0 root (0) root (0) 61984 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01151_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8787 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01154.html │ │ │ --rw-r--r-- 0 root (0) root (0) 314 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01154.js │ │ │ --rw-r--r-- 0 root (0) root (0) 68014 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01154_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6766 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01157.html │ │ │ --rw-r--r-- 0 root (0) root (0) 155 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01157.js │ │ │ --rw-r--r-- 0 root (0) root (0) 35912 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01157_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6735 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01163.html │ │ │ --rw-r--r-- 0 root (0) root (0) 131 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01163.js │ │ │ --rw-r--r-- 0 root (0) root (0) 24143 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01163_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6201 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01166.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36222 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01076_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5676 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01079.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6497 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01082.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 89 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01082.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 21256 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01082_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15640 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01085.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 919 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01085.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 61984 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01085_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7515 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01088.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 99 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01088.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 8813 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01091.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 156 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01091.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 60117 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01091_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5816 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01094.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5679 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01097.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 74370 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01100_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6590 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01103.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 87 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01103.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24596 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01103_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6719 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01106.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 89 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01106.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 94502 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01106_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6766 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01109.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 155 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01109.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35912 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01109_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11271 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01115.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 275 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01115.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 88722 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01115_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10047 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01118.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 118 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01118.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13067 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01118_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7005 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01121.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 71 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01121.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 54857 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01121_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10777 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01124.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 201 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01124.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 26364 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01124_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6511 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01127.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 78 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01127.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17610 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01127_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7258 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01130.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 153 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01130.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32517 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01130_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5791 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01133.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5509 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01136.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7262 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01139.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 99 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01139.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 6735 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01142.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 131 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01142.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24143 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01142_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8050 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01145.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 176 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01145.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37487 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01145_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 75095 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01148_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5598 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01154.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10339 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01157.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 493 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01157.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 50078 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01157_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5778 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01163.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 30718 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01163_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5672 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01166.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7509 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01169.html │ │ │ -rw-r--r-- 0 root (0) root (0) 72 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01169.js │ │ │ -rw-r--r-- 0 root (0) root (0) 23599 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01169_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5641 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01172.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5657 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01184.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6298 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01187.html │ │ │ --rw-r--r-- 0 root (0) root (0) 79 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01187.js │ │ │ --rw-r--r-- 0 root (0) root (0) 27993 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01187_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7661 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01190.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6465 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01193.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18491 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01193_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6626 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01196.html │ │ │ --rw-r--r-- 0 root (0) root (0) 77 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01196.js │ │ │ --rw-r--r-- 0 root (0) root (0) 21272 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01196_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7996 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01199.html │ │ │ --rw-r--r-- 0 root (0) root (0) 77 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01199.js │ │ │ --rw-r--r-- 0 root (0) root (0) 18886 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01199_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8734 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01205.html │ │ │ --rw-r--r-- 0 root (0) root (0) 266 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01205.js │ │ │ --rw-r--r-- 0 root (0) root (0) 75097 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01205_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9089 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01208.html │ │ │ --rw-r--r-- 0 root (0) root (0) 337 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01208.js │ │ │ --rw-r--r-- 0 root (0) root (0) 37621 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01208_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5537 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01172.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6465 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01184.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18491 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01184_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7996 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01187.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 77 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01187.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18886 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01187_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12714 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01190.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 674 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01190.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 7490 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01193.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14520 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01193_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7767 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01196.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9089 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01199.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 337 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01199.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37621 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01199_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8734 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01202.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 266 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01202.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 75097 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01202_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14404 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01205.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 807 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01205.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 36213 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01205_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5657 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01208.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5666 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01211.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14404 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01214.html │ │ │ --rw-r--r-- 0 root (0) root (0) 807 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01214.js │ │ │ --rw-r--r-- 0 root (0) root (0) 36213 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01214_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12714 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01217.html │ │ │ --rw-r--r-- 0 root (0) root (0) 674 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01217.js │ │ │ --rw-r--r-- 0 root (0) root (0) 7490 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01220.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14520 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01220_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7767 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01223.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10834 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01226.html │ │ │ --rw-r--r-- 0 root (0) root (0) 168 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01226.js │ │ │ --rw-r--r-- 0 root (0) root (0) 15064 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01226_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9294 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01229.html │ │ │ --rw-r--r-- 0 root (0) root (0) 108 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01229.js │ │ │ --rw-r--r-- 0 root (0) root (0) 6896 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01232.html │ │ │ --rw-r--r-- 0 root (0) root (0) 82 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01232.js │ │ │ --rw-r--r-- 0 root (0) root (0) 22430 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01232_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 30917 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01235.html │ │ │ --rw-r--r-- 0 root (0) root (0) 877 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01235.js │ │ │ --rw-r--r-- 0 root (0) root (0) 17845 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01238.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13824 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01238_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27308 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01244.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2405 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01244.js │ │ │ --rw-r--r-- 0 root (0) root (0) 44752 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01244_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 53045 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01247_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6847 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01250.html │ │ │ --rw-r--r-- 0 root (0) root (0) 95 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01250.js │ │ │ --rw-r--r-- 0 root (0) root (0) 47234 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01250_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6298 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01214.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 79 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01214.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 27993 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01214_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6896 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01217.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 82 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01217.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22430 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01217_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6626 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01223.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 77 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01223.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 21272 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01223_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9294 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01226.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 108 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01226.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 10834 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01229.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 168 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01229.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15064 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01229_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7661 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01232.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 34893 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01238_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6829 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01241.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 182 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01241.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 123331 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01241_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17845 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01244.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13824 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01244_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 32324 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01247_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7173 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01250.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 97 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01250.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37474 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01250_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7254 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01253.html │ │ │ -rw-r--r-- 0 root (0) root (0) 100 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01253.js │ │ │ -rw-r--r-- 0 root (0) root (0) 80135 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01253_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6936 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01256.html │ │ │ --rw-r--r-- 0 root (0) root (0) 106 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01256.js │ │ │ --rw-r--r-- 0 root (0) root (0) 36516 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01256_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7033 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01259.html │ │ │ --rw-r--r-- 0 root (0) root (0) 172 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01259.js │ │ │ --rw-r--r-- 0 root (0) root (0) 118926 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01259_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8061 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01262.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1057 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01262.js │ │ │ --rw-r--r-- 0 root (0) root (0) 31679 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01262_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6450 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01265.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01265.js │ │ │ --rw-r--r-- 0 root (0) root (0) 99463 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01265_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 34893 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01268_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6829 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01271.html │ │ │ --rw-r--r-- 0 root (0) root (0) 182 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01271.js │ │ │ --rw-r--r-- 0 root (0) root (0) 123331 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01271_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 32324 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01274_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6954 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01277.html │ │ │ --rw-r--r-- 0 root (0) root (0) 120 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01277.js │ │ │ --rw-r--r-- 0 root (0) root (0) 56560 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01277_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6459 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01280.html │ │ │ --rw-r--r-- 0 root (0) root (0) 88 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01280.js │ │ │ --rw-r--r-- 0 root (0) root (0) 28186 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01280_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6262 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01283.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01283.js │ │ │ --rw-r--r-- 0 root (0) root (0) 28637 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01283_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22375 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01286_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18044 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01292_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19122 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01295_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19138 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01298_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19703 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01301_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22253 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01304_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7578 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01307.html │ │ │ --rw-r--r-- 0 root (0) root (0) 71 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01307.js │ │ │ --rw-r--r-- 0 root (0) root (0) 18772 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01307_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5540 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01310.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5751 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01313.html │ │ │ --rw-r--r-- 0 root (0) root (0) 20551 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01313_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7589 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01316.html │ │ │ --rw-r--r-- 0 root (0) root (0) 260 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01316.js │ │ │ --rw-r--r-- 0 root (0) root (0) 70927 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01316_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9523 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01319.html │ │ │ --rw-r--r-- 0 root (0) root (0) 304 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01319.js │ │ │ --rw-r--r-- 0 root (0) root (0) 35653 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01319_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7064 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01322.html │ │ │ --rw-r--r-- 0 root (0) root (0) 100 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01322.js │ │ │ --rw-r--r-- 0 root (0) root (0) 77347 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01325_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6595 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01328.html │ │ │ --rw-r--r-- 0 root (0) root (0) 24742 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01328_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5575 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01331.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7173 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01334.html │ │ │ --rw-r--r-- 0 root (0) root (0) 97 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01334.js │ │ │ --rw-r--r-- 0 root (0) root (0) 37474 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01334_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8386 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01337.html │ │ │ --rw-r--r-- 0 root (0) root (0) 234 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01337.js │ │ │ --rw-r--r-- 0 root (0) root (0) 42102 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01337_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6186 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01340.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27374 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01340_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7426 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01343.html │ │ │ --rw-r--r-- 0 root (0) root (0) 98 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01343.js │ │ │ --rw-r--r-- 0 root (0) root (0) 13828 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01343_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5566 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01346.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6102 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01349.html │ │ │ --rw-r--r-- 0 root (0) root (0) 72 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01349.js │ │ │ --rw-r--r-- 0 root (0) root (0) 11368 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01349_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5543 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01352.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7075 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01355.html │ │ │ --rw-r--r-- 0 root (0) root (0) 232 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01355.js │ │ │ --rw-r--r-- 0 root (0) root (0) 45377 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01355_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5536 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01358.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8056 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01361.html │ │ │ --rw-r--r-- 0 root (0) root (0) 222 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01361.js │ │ │ --rw-r--r-- 0 root (0) root (0) 42918 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01361_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6648 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01364.html │ │ │ --rw-r--r-- 0 root (0) root (0) 100 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01364.js │ │ │ --rw-r--r-- 0 root (0) root (0) 8301 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01367.html │ │ │ --rw-r--r-- 0 root (0) root (0) 100 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01367.js │ │ │ --rw-r--r-- 0 root (0) root (0) 18569 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01367_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6590 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01370.html │ │ │ --rw-r--r-- 0 root (0) root (0) 156 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01370.js │ │ │ --rw-r--r-- 0 root (0) root (0) 17141 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01370_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5575 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01373.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7104 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01376.html │ │ │ --rw-r--r-- 0 root (0) root (0) 148 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01376.js │ │ │ --rw-r--r-- 0 root (0) root (0) 37514 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01376_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5537 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01379.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7720 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01382.html │ │ │ --rw-r--r-- 0 root (0) root (0) 280 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01382.js │ │ │ --rw-r--r-- 0 root (0) root (0) 19653 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01382_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6870 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01388.html │ │ │ --rw-r--r-- 0 root (0) root (0) 82 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01388.js │ │ │ --rw-r--r-- 0 root (0) root (0) 28867 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01388_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5554 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01391.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4950 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01394.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18761 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01394_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4958 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01397.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4933 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01406.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7579 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01406_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19703 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01256_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5540 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01259.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18044 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01262_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8061 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01265.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1057 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01265.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 31679 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01265_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7033 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01268.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 172 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01268.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 118926 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01268_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19122 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01271_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 30917 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01274.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 877 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01274.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 77347 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01277_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8386 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01280.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 234 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01280.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 42102 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01280_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27308 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01283.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2405 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01283.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 44752 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01283_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5575 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01286.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6459 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01289.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 88 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01289.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 28186 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01289_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7064 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01292.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 100 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01292.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 5751 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01295.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 20551 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01295_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22375 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01298_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7589 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01301.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 260 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01301.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 70927 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01301_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6262 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01304.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01304.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 28637 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01304_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6450 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01307.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01307.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 99463 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01307_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6595 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01310.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 24742 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01310_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6186 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01313.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27374 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01313_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6954 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01316.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 120 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01316.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 56560 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01316_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22253 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01319_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7578 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01322.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 71 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01322.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18772 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01322_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 53045 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01328_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19138 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01331_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9523 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01334.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 304 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01334.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35653 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01334_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6847 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01337.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 95 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01337.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 47234 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01337_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6936 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01340.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 106 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01340.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 36516 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01340_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5536 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01343.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8301 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01346.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 100 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01346.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18569 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01346_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7104 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01349.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 148 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01349.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37514 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01349_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6648 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01352.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 100 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01352.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 5537 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01355.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7720 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01358.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 280 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01358.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 19653 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01358_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5566 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01364.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6102 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01367.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 72 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01367.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 11368 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01367_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8056 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01370.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 222 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01370.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 42918 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01370_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6870 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01373.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 82 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01373.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 28867 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01373_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5543 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01376.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6590 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01379.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 156 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01379.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17141 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01379_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5554 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01382.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7426 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01385.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 98 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01385.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13828 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01385_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5575 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01388.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7075 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01391.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 232 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01391.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 45377 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01391_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4933 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01394.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7579 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01394_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4950 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01403.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18761 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01403_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4958 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01406.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9763 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01409.html │ │ │ -rw-r--r-- 0 root (0) root (0) 15228 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01410.html │ │ │ -rw-r--r-- 0 root (0) root (0) 8481 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01411.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4316 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01412.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14442 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01413.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9641 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01414.html │ │ │ -rw-r--r-- 0 root (0) root (0) 20286 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01415.html │ │ │ @@ -3427,15 +3427,15 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 10749 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/functions_w.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5058 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/functions_x.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4940 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/functions_y.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5144 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/functions_z.html │ │ │ -rw-r--r-- 0 root (0) root (0) 12860 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/functions_~.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5530 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/globals.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5529 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/globals_defs.html │ │ │ --rw-r--r-- 0 root (0) root (0) 204403 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/gtsam.tag.gz │ │ │ +-rw-r--r-- 0 root (0) root (0) 204493 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/gtsam.tag.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 428173 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/hierarchy.html │ │ │ -rw-r--r-- 0 root (0) root (0) 80762 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/hierarchy.js │ │ │ -rw-r--r-- 0 root (0) root (0) 4336 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/index.html │ │ │ -rw-r--r-- 0 root (0) root (0) 176630 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/jquery.js │ │ │ -rw-r--r-- 0 root (0) root (0) 5925 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/menu.js │ │ │ -rw-r--r-- 0 root (0) root (0) 9869 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/menudata.js │ │ │ -rw-r--r-- 0 root (0) root (0) 582 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/minus.svg │ │ │ @@ -3497,39 +3497,39 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 153 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/nav_f.png │ │ │ -rw-r--r-- 0 root (0) root (0) 169 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/nav_fd.png │ │ │ -rw-r--r-- 0 root (0) root (0) 95 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/nav_g.png │ │ │ -rw-r--r-- 0 root (0) root (0) 98 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/nav_h.png │ │ │ -rw-r--r-- 0 root (0) root (0) 114 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/nav_hd.png │ │ │ -rw-r--r-- 0 root (0) root (0) 2167 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtree.css │ │ │ -rw-r--r-- 0 root (0) root (0) 15935 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtree.js │ │ │ --rw-r--r-- 0 root (0) root (0) 4328 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreedata.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14315 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex0.js │ │ │ --rw-r--r-- 0 root (0) root (0) 10733 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex1.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 4308 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreedata.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14255 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex0.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 10612 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex1.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15173 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex10.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14907 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex11.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14415 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex12.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14357 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex13.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15133 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex14.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15217 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex15.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14811 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex16.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13820 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex17.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14082 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex18.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14793 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex19.js │ │ │ --rw-r--r-- 0 root (0) root (0) 9331 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex2.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 9775 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex2.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14797 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex20.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15745 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex21.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14997 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex22.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14791 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex23.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14412 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex24.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14245 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex25.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14589 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex26.js │ │ │ -rw-r--r-- 0 root (0) root (0) 11449 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex27.js │ │ │ -rw-r--r-- 0 root (0) root (0) 2879 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex28.js │ │ │ --rw-r--r-- 0 root (0) root (0) 9631 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex3.js │ │ │ --rw-r--r-- 0 root (0) root (0) 13582 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex4.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 9341 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex3.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13609 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex4.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15499 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex5.js │ │ │ -rw-r--r-- 0 root (0) root (0) 11980 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex6.js │ │ │ -rw-r--r-- 0 root (0) root (0) 12384 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex7.js │ │ │ -rw-r--r-- 0 root (0) root (0) 11740 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex8.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13164 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex9.js │ │ │ -rw-r--r-- 0 root (0) root (0) 123 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/open.png │ │ │ -rw-r--r-- 0 root (0) root (0) 4591 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/pages.html │ │ ├── ./usr/share/doc/libgtsam-dev/ImuFactor.pdf │ │ │ ├── pdftotext {} - │ │ │ │ @@ -1,10 +1,10 @@ │ │ │ │ The New IMU Factor │ │ │ │ Frank Dellaert & Varun Agrawal │ │ │ │ -January 9, 2024 │ │ │ │ +July 26, 2025 │ │ │ │ │ │ │ │ 1 │ │ │ │ │ │ │ │ IMU Factor │ │ │ │ The IMU factor has 2 variants: │ │ │ │ 1. ImuFactor is a 5-way factor between the previous pose and velocity, the current pose │ │ │ │ and velocity, and the current IMU bias. │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00008.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/types.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/timing.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -97,205 +97,209 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ Macros | │ │ │ -Typedefs | │ │ │ -Functions
│ │ │ -
types.h File Reference
│ │ │ +Functions | │ │ │ +Variables
│ │ │ +
timing.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Typedefs for easier changing of types. │ │ │ +

Timing utilities. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │

│ │ │ Classes

struct  gtsam::const_selector< TEST_TYPE, BASIC_TYPE, AS_NON_CONST, AS_CONST >
 Helper class that uses templates to select between two types based on whether TEST_TYPE is const or not. More...
class  gtsam::internal::TimingOutline
 Timing Entry, arranged in a tree. More...
 
struct  gtsam::const_selector< BASIC_TYPE, BASIC_TYPE, AS_NON_CONST, AS_CONST >
 Specialization for the non-const version. More...
 
struct  gtsam::const_selector< const BASIC_TYPE, BASIC_TYPE, AS_NON_CONST, AS_CONST >
 Specialization for the const version. More...
 
struct  gtsam::ValueWithDefault< T, defaultValue >
 Helper struct that encapsulates a value with a default, this is just used as a member object so you don't have to specify defaults in the class constructor. More...
 
class  gtsam::ListOfOneContainer< T >
 A helper class that behaves as a container with one element, and works with boost::range. More...
 
class  gtsam::TbbOpenMPMixedScope
 An object whose scope defines a block where TBB and OpenMP parallelism are mixed. More...
 
struct  gtsam::needs_eigen_aligned_allocator< typename, typename >
 A SFINAE trait to mark classes that need special alignment. More...
 
struct  gtsam::needs_eigen_aligned_allocator< T, void_t< typename T::_eigen_aligned_allocator_trait > >
class  gtsam::internal::AutoTicToc
 Small class that calls internal::tic at construction, and internol::toc when destroyed. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ Macros

│ │ │ -#define GTSAM_DEPRECATED
 
│ │ │ -#define DO_PRAGMA(x)   _Pragma (#x)
 
│ │ │ -#define CLANG_DIAGNOSTIC_PUSH_IGNORE(diag)
 
│ │ │ -#define GCC_DIAGNOSTIC_PUSH_IGNORE(diag)
 
│ │ │ -#define MSVC_DIAGNOSTIC_PUSH_IGNORE(code)
 
│ │ │ -#define DIAGNOSTIC_POP()
 
#define assert_throw(CONDITION, EXCEPTION)
 An assertion that throws an exception if NDEBUG is not defined and evaluates to an empty statement otherwise.
 
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
 This marks a GTSAM object to require alignment.
 
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
 This marks a GTSAM object to require alignment.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ -Typedefs

│ │ │ -typedef std::uint64_t gtsam::Key
 Integer nonlinear key type.
 
│ │ │ -typedef std::uint64_t gtsam::FactorIndex
 Integer nonlinear factor index type.
 
│ │ │ -typedef ptrdiff_t gtsam::DenseIndex
 The index type for Eigen objects.
 
│ │ │ -template<typename ... >
using gtsam::void_t = void
 Convenience void_t as we assume C++11, it will not conflict the std one in C++17 as this is in gtsam::
 
#define gttic_(label)
 
│ │ │ +#define gttoc_(label)    label##_obj.stop()
 
#define longtic_(label)
 
#define longtoc_(label)
 
#define tictoc_getNode(variable, label)
 
│ │ │ +#define gttic(label)   ((void)0)
 
│ │ │ +#define gttoc(label)   ((void)0)
 
│ │ │ +#define longtic(label)   ((void)0)
 
│ │ │ +#define longtoc(label)   ((void)0)
 
│ │ │ +#define tictoc_finishedIteration()   ((void)0)
 
│ │ │ +#define tictoc_print()   ((void)0)
 
│ │ │ +#define tictoc_reset()   ((void)0)
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ Functions

std::string gtsam::demangle (const char *name)
 Pretty print Value type name.
 
│ │ │ - gtsam::BOOST_CONCEPT_ASSERT ((boost::RandomAccessRangeConcept< ListOfOneContainer< int > >))
 
│ │ │ -template<typename T >
ListOfOneContainer< T > gtsam::ListOfOne (const T &element)
 Factory function for ListOfOneContainer to enable ListOfOne(e) syntax.
 
│ │ │ +size_t gtsam::internal::getTicTocID (const char *descriptionC)
 
│ │ │ +void gtsam::internal::tic (size_t id, const char *labelC)
 
│ │ │ +void gtsam::internal::toc (size_t id, const char *label)
 
│ │ │ +void gtsam::tictoc_finishedIteration_ ()
 
│ │ │ +void gtsam::tictoc_print_ ()
 
│ │ │ +void gtsam::tictoc_print2_ ()
 
│ │ │ +void gtsam::tictoc_reset_ ()
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Variables

│ │ │ +GTSAM_EXTERN_EXPORT boost::shared_ptr< TimingOutlinegtsam::internal::gTimingRoot
 
│ │ │ +GTSAM_EXTERN_EXPORT boost::weak_ptr< TimingOutlinegtsam::internal::gCurrentTimer
 
│ │ │

Detailed Description

│ │ │ -

Typedefs for easier changing of types.

│ │ │ -
Author
Richard Roberts
│ │ │ -
Date
Aug 21, 2010
│ │ │ +

Timing utilities.

│ │ │ +
Author
Richard Roberts, Michael Kaess
│ │ │ +
Date
Oct 5, 2010
│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ assert_throw

│ │ │ + │ │ │ +

◆ gttic_

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ │ │ │ +
#define assert_throw#define gttic_( CONDITION,
label) EXCEPTION 
│ │ │ +
│ │ │ +Value:
static const size_t label##_id_tic = ::gtsam::internal::getTicTocID(#label); \
│ │ │ +
::gtsam::internal::AutoTicToc label##_obj(label##_id_tic, #label)
│ │ │ +
Small class that calls internal::tic at construction, and internol::toc when destroyed.
Definition timing.h:199
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ longtic_

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ │ │ │
#define longtic_( label))
│ │ │
│ │ │ -Value:
if (!(CONDITION)) { \
│ │ │ -
throw (EXCEPTION); \
│ │ │ -
}
│ │ │ +Value:
static const size_t label##_id_tic = ::gtsam::internal::getTicTocID(#label); \
│ │ │ +
::gtsam::internal::ticInternal(label##_id_tic, #label)
│ │ │
│ │ │ -

An assertion that throws an exception if NDEBUG is not defined and evaluates to an empty statement otherwise.

│ │ │ - │ │ │
│ │ │
│ │ │ - │ │ │ -

◆ GTSAM_MAKE_ALIGNED_OPERATOR_NEW

│ │ │ + │ │ │ +

◆ longtoc_

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW#define longtoc_( label)
│ │ │
│ │ │ -Value:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW \
│ │ │ -
using _eigen_aligned_allocator_trait = void;
│ │ │ +Value:
static const size_t label##_id_toc = ::gtsam::internal::getTicTocID(#label); \
│ │ │ +
::gtsam::internal::tocInternal(label##_id_toc, #label)
│ │ │
│ │ │ -

This marks a GTSAM object to require alignment.

│ │ │ -

With this macro an object will automatically be allocated in aligned memory when one uses gtsam::make_shared. It reduces future misalignment problems that is hard to debug. See https://eigen.tuxfamily.org/dox/group__DenseMatrixManipulation__Alignement.html for detailed explanation.

│ │ │ - │ │ │
│ │ │
│ │ │ - │ │ │ -

◆ GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF

│ │ │ + │ │ │ +

◆ tictoc_getNode

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │ + │ │ │ + │ │ │ │ │ │
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF#define tictoc_getNode( NeedsToAlign)variable,
 label 
)
│ │ │
│ │ │ -Value:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) \
│ │ │ -
using _eigen_aligned_allocator_trait = void;
│ │ │ +Value:
static const size_t label##_id_getnode = ::gtsam::internal::getTicTocID(#label); \
│ │ │ +
const boost::shared_ptr<const ::gtsam::internal::TimingOutline> variable = \
│ │ │ +
::gtsam::internal::gCurrentTimer.lock()->child(label##_id_getnode, #label, ::gtsam::internal::gCurrentTimer);
│ │ │
│ │ │ -

This marks a GTSAM object to require alignment.

│ │ │ -

With this macro an object will automatically be allocated in aligned memory when one uses gtsam::make_shared. It reduces future misalignment problems that is hard to debug. See https://eigen.tuxfamily.org/dox/group__DenseMatrixManipulation__Alignement.html for detailed explanation.

│ │ │ - │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,138 +1,108 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -types.h File Reference │ │ │ │ -_B_a_s_e │ │ │ │ -Typedefs for easier changing of types. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ +timing.h File Reference │ │ │ │ +Timing utilities. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _g_t_s_a_m_:_:_c_o_n_s_t___s_e_l_e_c_t_o_r_<_ _T_E_S_T___T_Y_P_E_,_ _B_A_S_I_C___T_Y_P_E_,_ _A_S___N_O_N___C_O_N_S_T_,_ _A_S___C_O_N_S_T_ _> │ │ │ │ -  Helper class that uses templates to select between two types based on │ │ │ │ - whether TEST_TYPE is const or not. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_c_o_n_s_t___s_e_l_e_c_t_o_r_<_ _B_A_S_I_C___T_Y_P_E_,_ _B_A_S_I_C___T_Y_P_E_,_ _A_S___N_O_N___C_O_N_S_T_,_ _A_S___C_O_N_S_T │ │ │ │ - _> │ │ │ │ -  Specialization for the non-const version. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_c_o_n_s_t___s_e_l_e_c_t_o_r_<_ _c_o_n_s_t_ _B_A_S_I_C___T_Y_P_E_,_ _B_A_S_I_C___T_Y_P_E_,_ _A_S___N_O_N___C_O_N_S_T_, │ │ │ │ - _A_S___C_O_N_S_T_ _> │ │ │ │ -  Specialization for the const version. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_V_a_l_u_e_W_i_t_h_D_e_f_a_u_l_t_<_ _T_,_ _d_e_f_a_u_l_t_V_a_l_u_e_ _> │ │ │ │ - Helper struct that encapsulates a value with a default, this is just │ │ │ │ -  used as a member object so you don't have to specify defaults in the │ │ │ │ - class constructor. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ - class   _g_t_s_a_m_:_:_L_i_s_t_O_f_O_n_e_C_o_n_t_a_i_n_e_r_<_ _T_ _> │ │ │ │ -  A helper class that behaves as a container with one element, and works │ │ │ │ - with boost::range. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ - class   _g_t_s_a_m_:_:_T_b_b_O_p_e_n_M_P_M_i_x_e_d_S_c_o_p_e │ │ │ │ -  An object whose scope defines a block where TBB and OpenMP parallelism │ │ │ │ - are mixed. _M_o_r_e_._._. │ │ │ │ +class   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e │ │ │ │ +  Timing Entry, arranged in a tree. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_n_e_e_d_s___e_i_g_e_n___a_l_i_g_n_e_d___a_l_l_o_c_a_t_o_r_<_ _t_y_p_e_n_a_m_e_,_ _t_y_p_e_n_a_m_e_ _> │ │ │ │ -  A SFINAE trait to mark classes that need special alignment. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_n_e_e_d_s___e_i_g_e_n___a_l_i_g_n_e_d___a_l_l_o_c_a_t_o_r_<_ _T_,_ _v_o_i_d___t_<_ _t_y_p_e_n_a_m_e_ _T_:_: │ │ │ │ - ___e_i_g_e_n___a_l_i_g_n_e_d___a_l_l_o_c_a_t_o_r___t_r_a_i_t_ _>_ _> │ │ │ │ +class   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_A_u_t_o_T_i_c_T_o_c │ │ │ │ +  Small class that calls internal::tic at construction, and internol::toc │ │ │ │ + when destroyed. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ MMaaccrrooss │ │ │ │ -#define  GGTTSSAAMM__DDEEPPRREECCAATTEEDD │ │ │ │ -  │ │ │ │ -#define  DDOO__PPRRAAGGMMAA(x)   _Pragma (#x) │ │ │ │ +#define  _g_t_t_i_c__(label) │ │ │ │   │ │ │ │ -#define  CCLLAANNGG__DDIIAAGGNNOOSSTTIICC__PPUUSSHH__IIGGNNOORREE(diag) │ │ │ │ +#define  ggttttoocc__(label)    label##_obj.stop() │ │ │ │   │ │ │ │ -#define  GGCCCC__DDIIAAGGNNOOSSTTIICC__PPUUSSHH__IIGGNNOORREE(diag) │ │ │ │ +#define  _l_o_n_g_t_i_c__(label) │ │ │ │   │ │ │ │ -#define  MMSSVVCC__DDIIAAGGNNOOSSTTIICC__PPUUSSHH__IIGGNNOORREE(code) │ │ │ │ +#define  _l_o_n_g_t_o_c__(label) │ │ │ │   │ │ │ │ -#define  DDIIAAGGNNOOSSTTIICC__PPOOPP() │ │ │ │ +#define  _t_i_c_t_o_c___g_e_t_N_o_d_e(variable, label) │ │ │ │   │ │ │ │ -#define  _a_s_s_e_r_t___t_h_r_o_w(CONDITION, EXCEPTION) │ │ │ │ -  An assertion that throws an exception if NDEBUG is not defined and │ │ │ │ - evaluates to an empty statement otherwise. │ │ │ │ +#define  ggttttiicc(label)   ((void)0) │ │ │ │   │ │ │ │ -#define  _G_T_S_A_M___M_A_K_E___A_L_I_G_N_E_D___O_P_E_R_A_T_O_R___N_E_W │ │ │ │ -  This marks a GTSAM object to require alignment. │ │ │ │ +#define  ggttttoocc(label)   ((void)0) │ │ │ │   │ │ │ │ -#define  _G_T_S_A_M___M_A_K_E___A_L_I_G_N_E_D___O_P_E_R_A_T_O_R___N_E_W___I_F(NeedsToAlign) │ │ │ │ -  This marks a GTSAM object to require alignment. │ │ │ │ +#define  lloonnggttiicc(label)   ((void)0) │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -typedef std::uint64_t  ggttssaamm::::KKeeyy │ │ │ │ -  Integer nonlinear key type. │ │ │ │ +#define  lloonnggttoocc(label)   ((void)0) │ │ │ │   │ │ │ │ -typedef std::uint64_t  ggttssaamm::::FFaaccttoorrIInnddeexx │ │ │ │ -  Integer nonlinear factor index type. │ │ │ │ +#define  ttiiccttoocc__ffiinniisshheeddIItteerraattiioonn()   ((void)0) │ │ │ │   │ │ │ │ - typedef ptrdiff_t  ggttssaamm::::DDeennsseeIInnddeexx │ │ │ │ -  The index type for Eigen objects. │ │ │ │ +#define  ttiiccttoocc__pprriinntt()   ((void)0) │ │ │ │   │ │ │ │ -template │ │ │ │ - using  ggttssaamm::::vvooiidd__tt = void │ │ │ │ -  Convenience void_t as we assume C++11, it will not │ │ │ │ - conflict the std one in C++17 as this is in gtsam:: │ │ │ │ +#define  ttiiccttoocc__rreesseett()   ((void)0) │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ - std::string  _g_t_s_a_m_:_:_d_e_m_a_n_g_l_e (const char *name) │ │ │ │ -  Pretty print _V_a_l_u_e type name. │ │ │ │ +size_t  ggttssaamm::::iinntteerrnnaall::::ggeettTTiiccTTooccIIDD (const char *descriptionC) │ │ │ │ +  │ │ │ │ + void  ggttssaamm::::iinntteerrnnaall::::ttiicc (size_t id, const char *labelC) │ │ │ │ +  │ │ │ │ + void  ggttssaamm::::iinntteerrnnaall::::ttoocc (size_t id, const char *label) │ │ │ │ +  │ │ │ │ + void  ggttssaamm::::ttiiccttoocc__ffiinniisshheeddIItteerraattiioonn__ () │ │ │ │   │ │ │ │ -   ggttssaamm::::BBOOOOSSTT__CCOONNCCEEPPTT__AASSSSEERRTT ((boost:: │ │ │ │ - RandomAccessRangeConcept< _L_i_s_t_O_f_O_n_e_C_o_n_t_a_i_n_e_r< int > │ │ │ │ - >)) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_L_i_s_t_O_f_O_n_e_C_o_n_t_a_i_n_e_r< T >  ggttssaamm::::LLiissttOOffOOnnee (const T &element) │ │ │ │ -  Factory function for _L_i_s_t_O_f_O_n_e_C_o_n_t_a_i_n_e_r to enable │ │ │ │ - ListOfOne(e) syntax. │ │ │ │ + void  ggttssaamm::::ttiiccttoocc__pprriinntt__ () │ │ │ │ +  │ │ │ │ + void  ggttssaamm::::ttiiccttoocc__pprriinntt22__ () │ │ │ │ +  │ │ │ │ + void  ggttssaamm::::ttiiccttoocc__rreesseett__ () │ │ │ │ +  │ │ │ │ +VVaarriiaabblleess │ │ │ │ +GTSAM_EXTERN_EXPORT boost::shared_ptr< │ │ │ │ + _T_i_m_i_n_g_O_u_t_l_i_n_e >  ggttssaamm::::iinntteerrnnaall::::ggTTiimmiinnggRRoooott │ │ │ │ +  │ │ │ │ + GTSAM_EXTERN_EXPORT boost::weak_ptr< │ │ │ │ + _T_i_m_i_n_g_O_u_t_l_i_n_e >  ggttssaamm::::iinntteerrnnaall::::ggCCuurrrreennttTTiimmeerr │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Typedefs for easier changing of types. │ │ │ │ +Timing utilities. │ │ │ │ Author │ │ │ │ - Richard Roberts │ │ │ │ + Richard Roberts, Michael Kaess │ │ │ │ Date │ │ │ │ - Aug 21, 2010 │ │ │ │ + Oct 5, 2010 │ │ │ │ ********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? aasssseerrtt__tthhrrooww ********** │ │ │ │ -#define assert_throw (   CONDITION, │ │ │ │ -   EXCEPTION  │ │ │ │ - ) │ │ │ │ +********** _?◆_? ggttttiicc__ ********** │ │ │ │ +#define gttic_ (   label ) │ │ │ │ +VVaalluuee:: │ │ │ │ +static const size_t label##_id_tic = ::gtsam::internal::getTicTocID(#label); \ │ │ │ │ +_:_:_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_A_u_t_o_T_i_c_T_o_c label##_obj(label##_id_tic, #label) │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_A_u_t_o_T_i_c_T_o_c │ │ │ │ +Small class that calls internal::tic at construction, and internol::toc when │ │ │ │ +destroyed. │ │ │ │ +DDeeffiinniittiioonn timing.h:199 │ │ │ │ +********** _?◆_? lloonnggttiicc__ ********** │ │ │ │ +#define longtic_ (   label ) │ │ │ │ VVaalluuee:: │ │ │ │ -if (!(CONDITION)) { \ │ │ │ │ -throw (EXCEPTION); \ │ │ │ │ -} │ │ │ │ -An assertion that throws an exception if NDEBUG is not defined and evaluates to │ │ │ │ -an empty statement otherwise. │ │ │ │ -********** _?◆_? GGTTSSAAMM__MMAAKKEE__AALLIIGGNNEEDD__OOPPEERRAATTOORR__NNEEWW ********** │ │ │ │ -#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW │ │ │ │ +static const size_t label##_id_tic = ::gtsam::internal::getTicTocID(#label); \ │ │ │ │ +::gtsam::internal::ticInternal(label##_id_tic, #label) │ │ │ │ +********** _?◆_? lloonnggttoocc__ ********** │ │ │ │ +#define longtoc_ (   label ) │ │ │ │ VVaalluuee:: │ │ │ │ -EIGEN_MAKE_ALIGNED_OPERATOR_NEW \ │ │ │ │ -using _eigen_aligned_allocator_trait = void; │ │ │ │ -This marks a GTSAM object to require alignment. │ │ │ │ -With this macro an object will automatically be allocated in aligned memory │ │ │ │ -when one uses _g_t_s_a_m_:_:_m_a_k_e___s_h_a_r_e_d. It reduces future misalignment problems that │ │ │ │ -is hard to debug. See _h_t_t_p_s_:_/_/_e_i_g_e_n_._t_u_x_f_a_m_i_l_y_._o_r_g_/_d_o_x_/ │ │ │ │ -_g_r_o_u_p_____D_e_n_s_e_M_a_t_r_i_x_M_a_n_i_p_u_l_a_t_i_o_n_____A_l_i_g_n_e_m_e_n_t_._h_t_m_l for detailed explanation. │ │ │ │ -********** _?◆_? GGTTSSAAMM__MMAAKKEE__AALLIIGGNNEEDD__OOPPEERRAATTOORR__NNEEWW__IIFF ********** │ │ │ │ -#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF (   NeedsToAlign ) │ │ │ │ +static const size_t label##_id_toc = ::gtsam::internal::getTicTocID(#label); \ │ │ │ │ +::gtsam::internal::tocInternal(label##_id_toc, #label) │ │ │ │ +********** _?◆_? ttiiccttoocc__ggeettNNooddee ********** │ │ │ │ +#define tictoc_getNode (   variable, │ │ │ │ +   label  │ │ │ │ + ) │ │ │ │ VVaalluuee:: │ │ │ │ -EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) \ │ │ │ │ -using _eigen_aligned_allocator_trait = void; │ │ │ │ -This marks a GTSAM object to require alignment. │ │ │ │ -With this macro an object will automatically be allocated in aligned memory │ │ │ │ -when one uses _g_t_s_a_m_:_:_m_a_k_e___s_h_a_r_e_d. It reduces future misalignment problems that │ │ │ │ -is hard to debug. See _h_t_t_p_s_:_/_/_e_i_g_e_n_._t_u_x_f_a_m_i_l_y_._o_r_g_/_d_o_x_/ │ │ │ │ -_g_r_o_u_p_____D_e_n_s_e_M_a_t_r_i_x_M_a_n_i_p_u_l_a_t_i_o_n_____A_l_i_g_n_e_m_e_n_t_._h_t_m_l for detailed explanation. │ │ │ │ +static const size_t label##_id_getnode = ::gtsam::internal::getTicTocID │ │ │ │ +(#label); \ │ │ │ │ +const boost::shared_ptr variable = \ │ │ │ │ +::gtsam::internal::gCurrentTimer.lock()->child(label##_id_getnode, #label, :: │ │ │ │ +gtsam::internal::gCurrentTimer); │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _t_y_p_e_s_._h │ │ │ │ + * _t_i_m_i_n_g_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00008.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,19 +1,4 @@ │ │ │ │ var a00008 = [ │ │ │ │ - ["gtsam::const_selector< TEST_TYPE, BASIC_TYPE, AS_NON_CONST, AS_CONST >", "a02536.html", null], │ │ │ │ - ["gtsam::const_selector< BASIC_TYPE, BASIC_TYPE, AS_NON_CONST, AS_CONST >", "a02540.html", null], │ │ │ │ - ["gtsam::const_selector< const BASIC_TYPE, BASIC_TYPE, AS_NON_CONST, AS_CONST >", "a02544.html", null], │ │ │ │ - ["gtsam::ValueWithDefault< T, defaultValue >", "a02548.html", "a02548"], │ │ │ │ - ["gtsam::ListOfOneContainer< T >", "a02552.html", null], │ │ │ │ - ["gtsam::TbbOpenMPMixedScope", "a02556.html", null], │ │ │ │ - ["gtsam::needs_eigen_aligned_allocator< typename, typename >", "a02560.html", null], │ │ │ │ - ["gtsam::needs_eigen_aligned_allocator< T, void_t< typename T::_eigen_aligned_allocator_trait > >", "a02564.html", null], │ │ │ │ - ["assert_throw", "a00008.html#a30d3af2da1ea940197addce4f3c223c8", null], │ │ │ │ - ["GTSAM_MAKE_ALIGNED_OPERATOR_NEW", "a00008.html#aa123dd61687e08ae328154a1890b7b86", null], │ │ │ │ - ["GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF", "a00008.html#a352ab46cee3a766e30b049690802fb0a", null], │ │ │ │ - ["DenseIndex", "a00008.html#a21006f326f57cdf7d3f35fec40f43e40", null], │ │ │ │ - ["FactorIndex", "a00008.html#a19c53f2faabb0f4b4b78ce2f7168cc14", null], │ │ │ │ - ["Key", "a00008.html#adad029f5f6ffce610428b5fe768b0df2", null], │ │ │ │ - ["void_t", "a00008.html#a6525d741529c7a2cd91fa913431f5fb7", null], │ │ │ │ - ["demangle", "a00008.html#a0b97fc96e5f69236e81489c66d5b92ba", null], │ │ │ │ - ["ListOfOne", "a00008.html#a045b43784acac77531813c4ab6c4d281", null] │ │ │ │ + ["gtsam::internal::TimingOutline", "a02516.html", "a02516"], │ │ │ │ + ["gtsam::internal::AutoTicToc", "a02520.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00008_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/types.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/timing.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,318 +98,328 @@ │ │ │
No Matches
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ -
types.h
│ │ │ +
timing.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
20#pragma once
│ │ │ -
21
│ │ │ -
22#include <gtsam/dllexport.h>
│ │ │ -
23#include <boost/concept/assert.hpp>
│ │ │ -
24#include <boost/range/concepts.hpp>
│ │ │ -
25#include <gtsam/config.h> // for GTSAM_USE_TBB
│ │ │ -
26
│ │ │ -
27#include <cstddef>
│ │ │ -
28#include <cstdint>
│ │ │ -
29
│ │ │ -
30#include <exception>
│ │ │ -
31#include <string>
│ │ │ -
32
│ │ │ -
33#ifdef GTSAM_USE_TBB
│ │ │ -
34#include <tbb/scalable_allocator.h>
│ │ │ -
35#endif
│ │ │ -
36
│ │ │ -
37#if defined(__GNUC__) || defined(__clang__)
│ │ │ -
38#define GTSAM_DEPRECATED __attribute__((deprecated))
│ │ │ -
39#elif defined(_MSC_VER)
│ │ │ -
40#define GTSAM_DEPRECATED __declspec(deprecated)
│ │ │ -
41#else
│ │ │ -
42#define GTSAM_DEPRECATED
│ │ │ -
43#endif
│ │ │ -
44
│ │ │ -
45#ifdef GTSAM_USE_EIGEN_MKL_OPENMP
│ │ │ -
46#include <omp.h>
│ │ │ -
47#endif
│ │ │ -
48
│ │ │ -
49/* Define macros for ignoring compiler warnings.
│ │ │ -
50 * Usage Example:
│ │ │ -
51 * ```
│ │ │ -
52 * CLANG_DIAGNOSTIC_PUSH_IGNORE("-Wdeprecated-declarations")
│ │ │ -
53 * GCC_DIAGNOSTIC_PUSH_IGNORE("-Wdeprecated-declarations")
│ │ │ -
54 * MSVC_DIAGNOSTIC_PUSH_IGNORE(4996)
│ │ │ -
55 * // ... code you want to suppress deprecation warnings for ...
│ │ │ -
56 * DIAGNOSTIC_POP()
│ │ │ -
57 * ```
│ │ │ -
58 */
│ │ │ -
59#define DO_PRAGMA(x) _Pragma (#x)
│ │ │ -
60#ifdef __clang__
│ │ │ -
61# define CLANG_DIAGNOSTIC_PUSH_IGNORE(diag) \
│ │ │ -
62 _Pragma("clang diagnostic push") \
│ │ │ -
63 DO_PRAGMA(clang diagnostic ignored diag)
│ │ │ -
64#else
│ │ │ -
65# define CLANG_DIAGNOSTIC_PUSH_IGNORE(diag)
│ │ │ -
66#endif
│ │ │ -
67
│ │ │ -
68#ifdef __GNUC__
│ │ │ -
69# define GCC_DIAGNOSTIC_PUSH_IGNORE(diag) \
│ │ │ -
70 _Pragma("GCC diagnostic push") \
│ │ │ -
71 DO_PRAGMA(GCC diagnostic ignored diag)
│ │ │ -
72#else
│ │ │ -
73# define GCC_DIAGNOSTIC_PUSH_IGNORE(diag)
│ │ │ -
74#endif
│ │ │ -
75
│ │ │ -
76#ifdef _MSC_VER
│ │ │ -
77# define MSVC_DIAGNOSTIC_PUSH_IGNORE(code) \
│ │ │ -
78 _Pragma("warning ( push )") \
│ │ │ -
79 DO_PRAGMA(warning ( disable : code ))
│ │ │ -
80#else
│ │ │ -
81# define MSVC_DIAGNOSTIC_PUSH_IGNORE(code)
│ │ │ -
82#endif
│ │ │ -
83
│ │ │ -
84#if defined(__clang__)
│ │ │ -
85# define DIAGNOSTIC_POP() _Pragma("clang diagnostic pop")
│ │ │ -
86#elif defined(__GNUC__)
│ │ │ -
87# define DIAGNOSTIC_POP() _Pragma("GCC diagnostic pop")
│ │ │ -
88#elif defined(_MSC_VER)
│ │ │ -
89# define DIAGNOSTIC_POP() _Pragma("warning ( pop )")
│ │ │ -
90#else
│ │ │ -
91# define DIAGNOSTIC_POP()
│ │ │ -
92#endif
│ │ │ -
93
│ │ │ -
94namespace gtsam {
│ │ │ -
95
│ │ │ -
97 std::string GTSAM_EXPORT demangle(const char* name);
│ │ │ -
98
│ │ │ -
100 typedef std::uint64_t Key;
│ │ │ -
101
│ │ │ -
103 typedef std::uint64_t FactorIndex;
│ │ │ -
104
│ │ │ -
106 typedef ptrdiff_t DenseIndex;
│ │ │ -
107
│ │ │ -
108 /* ************************************************************************* */
│ │ │ -
113 template<typename TEST_TYPE, typename BASIC_TYPE, typename AS_NON_CONST,
│ │ │ -
114 typename AS_CONST>
│ │ │ -
│ │ │ - │ │ │ -
116 };
│ │ │ -
│ │ │ -
117
│ │ │ -
119 template<typename BASIC_TYPE, typename AS_NON_CONST, typename AS_CONST>
│ │ │ -
│ │ │ -
120 struct const_selector<BASIC_TYPE, BASIC_TYPE, AS_NON_CONST, AS_CONST> {
│ │ │ -
121 typedef AS_NON_CONST type;
│ │ │ -
122 };
│ │ │ -
│ │ │ -
123
│ │ │ -
125 template<typename BASIC_TYPE, typename AS_NON_CONST, typename AS_CONST>
│ │ │ -
│ │ │ -
126 struct const_selector<const BASIC_TYPE, BASIC_TYPE, AS_NON_CONST, AS_CONST> {
│ │ │ -
127 typedef AS_CONST type;
│ │ │ -
128 };
│ │ │ -
│ │ │ +
18#pragma once
│ │ │ +
19
│ │ │ +
20#include <gtsam/base/FastMap.h>
│ │ │ +
21#include <gtsam/dllexport.h>
│ │ │ +
22#include <gtsam/config.h> // for GTSAM_USE_TBB
│ │ │ +
23
│ │ │ +
24#include <boost/smart_ptr/shared_ptr.hpp>
│ │ │ +
25#include <boost/smart_ptr/weak_ptr.hpp>
│ │ │ +
26#include <boost/version.hpp>
│ │ │ +
27
│ │ │ +
28#include <cstddef>
│ │ │ +
29#include <string>
│ │ │ +
30
│ │ │ +
31// This file contains the GTSAM timing instrumentation library, a low-overhead method for
│ │ │ +
32// learning at a medium-fine level how much time various components of an algorithm take
│ │ │ +
33// in CPU and wall time.
│ │ │ +
34//
│ │ │ +
35// The output of this instrumentation is a call-tree-like printout containing statistics
│ │ │ +
36// about each instrumented code block. To print this output at any time, call
│ │ │ +
37// tictoc_print() or tictoc_print_().
│ │ │ +
38//
│ │ │ +
39// An overall point to be aware of is that there are two versions of each function - one
│ │ │ +
40// ending in an underscore '_' and one without the trailing underscore. The underscore
│ │ │ +
41// versions always are active, but the versions without an underscore are active only when
│ │ │ +
42// GTSAM_ENABLE_TIMING is defined (automatically defined in our CMake Timing build type).
│ │ │ +
43// GTSAM algorithms are all instrumented with the non-underscore versions, so generally
│ │ │ +
44// you should use the underscore versions in your own code to leave out the GTSAM detail.
│ │ │ +
45//
│ │ │ +
46// gttic and gttoc start and stop a timed section, respectively. gttic creates a *scoped*
│ │ │ +
47// object - when it goes out of scope gttoc is called automatically. Thus, you do not
│ │ │ +
48// need to call gttoc if you are timing an entire function (see basic use examples below).
│ │ │ +
49// However, you must be *aware* of this scoped nature - putting gttic inside of an if(...)
│ │ │ +
50// block, for example, will only time code until the closing brace '}'. See advanced
│ │ │ +
51// usage below if you need to avoid this.
│ │ │ +
52//
│ │ │ +
53// Multiple calls nest automatically - each gttic nests under the previous gttic called
│ │ │ +
54// for which gttoc has not been called (or the previous gttic did not go out of scope).
│ │ │ +
55//
│ │ │ +
56// Basic usage examples are as follows:
│ │ │ +
57//
│ │ │ +
58// - Timing an entire function:
│ │ │ +
59// void myFunction() {
│ │ │ +
60// gttic_(myFunction);
│ │ │ +
61// ........
│ │ │ +
62// }
│ │ │ +
63//
│ │ │ +
64// - Timing an entire function as well as its component parts:
│ │ │ +
65// void myLongFunction() {
│ │ │ +
66// gttic_(myLongFunction);
│ │ │ +
67// gttic_(step1); // Will nest under the 'myLongFunction' label
│ │ │ +
68// ........
│ │ │ +
69// gttoc_(step1);
│ │ │ +
70// gttic_(step2); // Will nest under the 'myLongFunction' label
│ │ │ +
71// ........
│ │ │ +
72// gttoc_(step2);
│ │ │ +
73// ........
│ │ │ +
74// }
│ │ │ +
75//
│ │ │ +
76// - Timing functions calling/called by other functions:
│ │ │ +
77// void oneStep() {
│ │ │ +
78// gttic_(oneStep); // Will automatically nest under the gttic label of the calling function
│ │ │ +
79// .......
│ │ │ +
80// }
│ │ │ +
81// void algorithm() {
│ │ │ +
82// gttic_(algorithm);
│ │ │ +
83// oneStep(); // gttic's inside this function will automatically nest inside our 'algorithm' label
│ │ │ +
84// twoStep(); // gttic's inside this function will automatically nest inside our 'algorithm' label
│ │ │ +
85// }
│ │ │ +
86//
│ │ │ +
87//
│ │ │ +
88// Advanced usage:
│ │ │ +
89//
│ │ │ +
90// - "Finishing iterations" - to get correct min/max times for each call, you must define
│ │ │ +
91// in your code what constitutes an iteration. A single sum for the min/max times is
│ │ │ +
92// accumulated within each iteration. If you don't care about min/max times, you don't
│ │ │ +
93// need to worry about this. For example:
│ │ │ +
94// void myOuterLoop() {
│ │ │ +
95// while(true) {
│ │ │ +
96// iterateMyAlgorithm();
│ │ │ +
97// tictoc_finishedIteration_();
│ │ │ +
98// tictoc_print_(); // Optional
│ │ │ +
99// }
│ │ │ +
100// }
│ │ │ +
101//
│ │ │ +
102// - Stopping timing a section in a different scope than it is started. Normally, a gttoc
│ │ │ +
103// statement goes out of scope at end of C++ scope. However, you can use longtic and
│ │ │ +
104// longtoc to start and stop timing with the specified label at any point, without regard
│ │ │ +
105// too scope. Note that if you use these, it may become difficult to ensure that you
│ │ │ +
106// have matching gttic/gttoc statments. You may want to consider reorganizing your timing
│ │ │ +
107// outline to match the scope of your code.
│ │ │ +
108
│ │ │ +
109// Automatically use the new Boost timers if version is recent enough.
│ │ │ +
110#if BOOST_VERSION >= 104800
│ │ │ +
111# ifndef GTSAM_DISABLE_NEW_TIMERS
│ │ │ +
112# define GTSAM_USING_NEW_BOOST_TIMERS
│ │ │ +
113# endif
│ │ │ +
114#endif
│ │ │ +
115
│ │ │ +
116#ifdef GTSAM_USING_NEW_BOOST_TIMERS
│ │ │ +
117# include <boost/timer/timer.hpp>
│ │ │ +
118#else
│ │ │ +
119# include <boost/timer.hpp>
│ │ │ +
120# include <gtsam/base/types.h>
│ │ │ +
121#endif
│ │ │ +
122
│ │ │ +
123#ifdef GTSAM_USE_TBB
│ │ │ +
124# include <tbb/tick_count.h>
│ │ │ +
125# undef min
│ │ │ +
126# undef max
│ │ │ +
127# undef ERROR
│ │ │ +
128#endif
│ │ │
129
│ │ │ -
130 /* ************************************************************************* */
│ │ │ -
136 template<typename T, T defaultValue>
│ │ │ -
│ │ │ - │ │ │ -
138 T value;
│ │ │ -
139
│ │ │ -
141 ValueWithDefault() : value(defaultValue) {}
│ │ │ -
142
│ │ │ -
144 ValueWithDefault(const T& _value) : value(_value) {}
│ │ │ -
145
│ │ │ -
147 T& operator*() { return value; }
│ │ │ -
148
│ │ │ -
150 const T& operator*() const { return value; }
│ │ │ -
151
│ │ │ -
153 operator T() const { return value; }
│ │ │ -
154 };
│ │ │ -
│ │ │ -
155
│ │ │ -
156 /* ************************************************************************* */
│ │ │ -
159 template<typename T>
│ │ │ -
│ │ │ - │ │ │ -
161 T element_;
│ │ │ -
162 public:
│ │ │ -
163 typedef T value_type;
│ │ │ -
164 typedef const T* const_iterator;
│ │ │ -
165 typedef T* iterator;
│ │ │ -
166 ListOfOneContainer(const T& element) : element_(element) {}
│ │ │ -
167 const T* begin() const { return &element_; }
│ │ │ -
168 const T* end() const { return &element_ + 1; }
│ │ │ -
169 T* begin() { return &element_; }
│ │ │ -
170 T* end() { return &element_ + 1; }
│ │ │ -
171 size_t size() const { return 1; }
│ │ │ -
172 };
│ │ │ -
│ │ │ -
173
│ │ │ -
174 BOOST_CONCEPT_ASSERT((boost::RandomAccessRangeConcept<ListOfOneContainer<int> >));
│ │ │ -
175
│ │ │ -
177 template<typename T>
│ │ │ -
│ │ │ - │ │ │ -
179 return ListOfOneContainer<T>(element);
│ │ │ -
180 }
│ │ │ -
│ │ │ -
181
│ │ │ -
182 /* ************************************************************************* */
│ │ │ -
183#ifdef __clang__
│ │ │ -
184# pragma clang diagnostic push
│ │ │ -
185# pragma clang diagnostic ignored "-Wunused-private-field" // Clang complains that previousOpenMPThreads is unused in the #else case below
│ │ │ -
186#endif
│ │ │ -
187
│ │ │ -
│ │ │ - │ │ │ -
192 {
│ │ │ -
193 int previousOpenMPThreads;
│ │ │ -
194
│ │ │ -
195 public:
│ │ │ -
196#if defined GTSAM_USE_TBB && defined GTSAM_USE_EIGEN_MKL_OPENMP
│ │ │ - │ │ │ -
198 previousOpenMPThreads(omp_get_num_threads())
│ │ │ -
199 {
│ │ │ -
200 omp_set_num_threads(omp_get_num_procs() / 4);
│ │ │ -
201 }
│ │ │ -
202
│ │ │ - │ │ │ -
204 {
│ │ │ -
205 omp_set_num_threads(previousOpenMPThreads);
│ │ │ -
206 }
│ │ │ -
207#else
│ │ │ -
208 TbbOpenMPMixedScope() : previousOpenMPThreads(-1) {}
│ │ │ - │ │ │ -
210#endif
│ │ │ -
211 };
│ │ │ -
│ │ │ -
212
│ │ │ -
213#ifdef __clang__
│ │ │ -
214# pragma clang diagnostic pop
│ │ │ -
215#endif
│ │ │ -
216
│ │ │ -
217}
│ │ │ +
130namespace gtsam {
│ │ │ +
131
│ │ │ +
132 namespace internal {
│ │ │ +
133 // Generate/retrieve a unique global ID number that will be used to look up tic/toc statements
│ │ │ +
134 GTSAM_EXPORT size_t getTicTocID(const char *description);
│ │ │ +
135
│ │ │ +
136 // Create new TimingOutline child for gCurrentTimer, make it gCurrentTimer, and call tic method
│ │ │ +
137 GTSAM_EXPORT void tic(size_t id, const char *label);
│ │ │ +
138
│ │ │ +
139 // Call toc on gCurrentTimer and then set gCurrentTimer to the parent of gCurrentTimer
│ │ │ +
140 GTSAM_EXPORT void toc(size_t id, const char *label);
│ │ │ +
141
│ │ │ +
│ │ │ + │ │ │ +
146 protected:
│ │ │ +
147 size_t id_;
│ │ │ +
148 size_t t_;
│ │ │ +
149 size_t tWall_;
│ │ │ +
150 double t2_ ;
│ │ │ +
151 size_t tIt_;
│ │ │ +
152 size_t tMax_;
│ │ │ +
153 size_t tMin_;
│ │ │ +
154 size_t n_;
│ │ │ +
155 size_t myOrder_;
│ │ │ +
156 size_t lastChildOrder_;
│ │ │ +
157 std::string label_;
│ │ │ +
158
│ │ │ +
159 // Tree structure
│ │ │ +
160 boost::weak_ptr<TimingOutline> parent_;
│ │ │ + │ │ │ + │ │ │ +
163
│ │ │ +
164#ifdef GTSAM_USING_NEW_BOOST_TIMERS
│ │ │ +
165 boost::timer::cpu_timer timer_;
│ │ │ +
166#else
│ │ │ +
167 boost::timer timer_;
│ │ │ + │ │ │ +
169#endif
│ │ │ +
170#ifdef GTSAM_USE_TBB
│ │ │ +
171 tbb::tick_count tbbTimer_;
│ │ │ +
172#endif
│ │ │ +
173 void add(size_t usecs, size_t usecsWall);
│ │ │ +
174
│ │ │ +
175 public:
│ │ │ +
177 GTSAM_EXPORT TimingOutline(const std::string& label, size_t myId);
│ │ │ +
178 GTSAM_EXPORT size_t time() const;
│ │ │ +
179 double secs() const { return double(time()) / 1000000.0;}
│ │ │ +
│ │ │ +
180 double self() const { return double(t_) / 1000000.0;}
│ │ │ +
│ │ │ +
181 double wall() const { return double(tWall_) / 1000000.0;}
│ │ │ +
│ │ │ +
182 double min() const { return double(tMin_) / 1000000.0;}
│ │ │ +
│ │ │ +
183 double max() const { return double(tMax_) / 1000000.0;}
│ │ │ +
│ │ │ +
184 double mean() const { return self() / double(n_); }
│ │ │ +
185 GTSAM_EXPORT void print(const std::string& outline = "") const;
│ │ │ +
186 GTSAM_EXPORT void print2(const std::string& outline = "", const double parentTotal = -1.0) const;
│ │ │ +
187 GTSAM_EXPORT const boost::shared_ptr<TimingOutline>&
│ │ │ +
188 child(size_t child, const std::string& label, const boost::weak_ptr<TimingOutline>& thisPtr);
│ │ │ +
189 GTSAM_EXPORT void tic();
│ │ │ +
190 GTSAM_EXPORT void toc();
│ │ │ +
191 GTSAM_EXPORT void finishedIteration();
│ │ │ +
192
│ │ │ +
193 GTSAM_EXPORT friend void toc(size_t id, const char *label);
│ │ │ +
194 }; // \TimingOutline
│ │ │ +
195
│ │ │ +
│ │ │ +
199 class GTSAM_EXPORT AutoTicToc {
│ │ │ +
200 private:
│ │ │ +
201 size_t id_;
│ │ │ +
202 const char* label_;
│ │ │ +
203 bool isSet_;
│ │ │ +
204
│ │ │ +
205 public:
│ │ │ +
206 AutoTicToc(size_t id, const char* label)
│ │ │ +
207 : id_(id), label_(label), isSet_(true) {
│ │ │ +
208 tic(id_, label_);
│ │ │ +
209 }
│ │ │ +
210 void stop() {
│ │ │ +
211 toc(id_, label_);
│ │ │ +
212 isSet_ = false;
│ │ │ +
213 }
│ │ │ +
214 ~AutoTicToc() {
│ │ │ +
215 if (isSet_) stop();
│ │ │ +
216 }
│ │ │ +
217 };
│ │ │ +
│ │ │
218
│ │ │ -
219/* ************************************************************************* */
│ │ │ -
222#ifdef NDEBUG
│ │ │ -
223#define assert_throw(CONDITION, EXCEPTION) ((void)0)
│ │ │ -
224#else
│ │ │ -
│ │ │ -
225#define assert_throw(CONDITION, EXCEPTION) \
│ │ │ -
226 if (!(CONDITION)) { \
│ │ │ -
227 throw (EXCEPTION); \
│ │ │ -
228 }
│ │ │ -
│ │ │ -
229#endif
│ │ │ -
230
│ │ │ -
231#ifdef _MSC_VER
│ │ │ -
232
│ │ │ -
233// Define some common g++ functions and macros we use that MSVC does not have
│ │ │ -
234
│ │ │ -
235#if (_MSC_VER < 1800)
│ │ │ -
236
│ │ │ -
237#include <boost/math/special_functions/fpclassify.hpp>
│ │ │ -
238namespace std {
│ │ │ -
239 template<typename T> inline int isfinite(T a) {
│ │ │ -
240 return (int)boost::math::isfinite(a); }
│ │ │ -
241 template<typename T> inline int isnan(T a) {
│ │ │ -
242 return (int)boost::math::isnan(a); }
│ │ │ -
243 template<typename T> inline int isinf(T a) {
│ │ │ -
244 return (int)boost::math::isinf(a); }
│ │ │ -
245}
│ │ │ -
246
│ │ │ -
247#endif
│ │ │ -
248
│ │ │ -
249#include <boost/math/constants/constants.hpp>
│ │ │ -
250#ifndef M_PI
│ │ │ -
251#define M_PI (boost::math::constants::pi<double>())
│ │ │ -
252#endif
│ │ │ -
253#ifndef M_PI_2
│ │ │ -
254#define M_PI_2 (boost::math::constants::pi<double>() / 2.0)
│ │ │ -
255#endif
│ │ │ -
256#ifndef M_PI_4
│ │ │ -
257#define M_PI_4 (boost::math::constants::pi<double>() / 4.0)
│ │ │ -
258#endif
│ │ │ +
219 GTSAM_EXTERN_EXPORT boost::shared_ptr<TimingOutline> gTimingRoot;
│ │ │ +
220 GTSAM_EXTERN_EXPORT boost::weak_ptr<TimingOutline> gCurrentTimer;
│ │ │ +
221 }
│ │ │ +
222
│ │ │ +
223// Tic and toc functions that are always active (whether or not ENABLE_TIMING is defined)
│ │ │ +
224// There is a trick being used here to achieve near-zero runtime overhead, in that a
│ │ │ +
225// static variable is created for each tic/toc statement storing an integer ID, but the
│ │ │ +
226// integer ID is only looked up by string once when the static variable is initialized
│ │ │ +
227// as the program starts.
│ │ │ +
228
│ │ │ +
229// tic
│ │ │ +
230#define gttic_(label) \
│ │ │ +
231 static const size_t label##_id_tic = ::gtsam::internal::getTicTocID(#label); \
│ │ │ +
232 ::gtsam::internal::AutoTicToc label##_obj(label##_id_tic, #label)
│ │ │ +
233
│ │ │ +
234// toc
│ │ │ +
235#define gttoc_(label) \
│ │ │ +
236 label##_obj.stop()
│ │ │ +
237
│ │ │ +
238// tic
│ │ │ +
239#define longtic_(label) \
│ │ │ +
240 static const size_t label##_id_tic = ::gtsam::internal::getTicTocID(#label); \
│ │ │ +
241 ::gtsam::internal::ticInternal(label##_id_tic, #label)
│ │ │ +
242
│ │ │ +
243// toc
│ │ │ +
244#define longtoc_(label) \
│ │ │ +
245 static const size_t label##_id_toc = ::gtsam::internal::getTicTocID(#label); \
│ │ │ +
246 ::gtsam::internal::tocInternal(label##_id_toc, #label)
│ │ │ +
247
│ │ │ +
248// indicate iteration is finished
│ │ │ +
249inline void tictoc_finishedIteration_() {
│ │ │ +
250 ::gtsam::internal::gTimingRoot->finishedIteration(); }
│ │ │ +
251
│ │ │ +
252// print
│ │ │ +
253inline void tictoc_print_() {
│ │ │ +
254 ::gtsam::internal::gTimingRoot->print(); }
│ │ │ +
255
│ │ │ +
256// print mean and standard deviation
│ │ │ +
257inline void tictoc_print2_() {
│ │ │ +
258 ::gtsam::internal::gTimingRoot->print2(); }
│ │ │
259
│ │ │ -
260#endif
│ │ │ -
261
│ │ │ -
262#ifdef min
│ │ │ -
263#undef min
│ │ │ -
264#endif
│ │ │ +
260// get a node by label and assign it to variable
│ │ │ +
261#define tictoc_getNode(variable, label) \
│ │ │ +
262 static const size_t label##_id_getnode = ::gtsam::internal::getTicTocID(#label); \
│ │ │ +
263 const boost::shared_ptr<const ::gtsam::internal::TimingOutline> variable = \
│ │ │ +
264 ::gtsam::internal::gCurrentTimer.lock()->child(label##_id_getnode, #label, ::gtsam::internal::gCurrentTimer);
│ │ │
265
│ │ │ -
266#ifdef max
│ │ │ -
267#undef max
│ │ │ -
268#endif
│ │ │ -
269
│ │ │ -
270#ifdef ERROR
│ │ │ -
271#undef ERROR
│ │ │ -
272#endif
│ │ │ -
273
│ │ │ -
274namespace gtsam {
│ │ │ -
275
│ │ │ -
277 template<typename ...> using void_t = void;
│ │ │ -
278
│ │ │ -
294 template<typename, typename = void_t<>>
│ │ │ -
│ │ │ -
295 struct needs_eigen_aligned_allocator : std::false_type {
│ │ │ -
296 };
│ │ │ -
│ │ │ -
297 template<typename T>
│ │ │ -
│ │ │ - │ │ │ -
299 };
│ │ │ -
│ │ │ -
300
│ │ │ -
301}
│ │ │ -
302
│ │ │ -
│ │ │ -
308#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW \
│ │ │ -
309 EIGEN_MAKE_ALIGNED_OPERATOR_NEW \
│ │ │ -
310 using _eigen_aligned_allocator_trait = void;
│ │ │ -
│ │ │ -
311
│ │ │ -
│ │ │ -
317#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) \
│ │ │ -
318 EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) \
│ │ │ -
319 using _eigen_aligned_allocator_trait = void;
│ │ │ +
266// reset
│ │ │ +
267inline void tictoc_reset_() {
│ │ │ +
268 ::gtsam::internal::gTimingRoot.reset(new ::gtsam::internal::TimingOutline("Total", ::gtsam::internal::getTicTocID("Total")));
│ │ │ +
269 ::gtsam::internal::gCurrentTimer = ::gtsam::internal::gTimingRoot; }
│ │ │ +
270
│ │ │ +
271#ifdef ENABLE_TIMING
│ │ │ +
272#define gttic(label) gttic_(label)
│ │ │ +
273#define gttoc(label) gttoc_(label)
│ │ │ +
274#define longtic(label) longtic_(label)
│ │ │ +
275#define longtoc(label) longtoc_(label)
│ │ │ +
276#define tictoc_finishedIteration tictoc_finishedIteration_
│ │ │ +
277#define tictoc_print tictoc_print_
│ │ │ +
278#define tictoc_reset tictoc_reset_
│ │ │ +
279#else
│ │ │ +
280#define gttic(label) ((void)0)
│ │ │ +
281#define gttoc(label) ((void)0)
│ │ │ +
282#define longtic(label) ((void)0)
│ │ │ +
283#define longtoc(label) ((void)0)
│ │ │ +
284#define tictoc_finishedIteration() ((void)0)
│ │ │ +
285#define tictoc_print() ((void)0)
│ │ │ +
286#define tictoc_reset() ((void)0)
│ │ │ +
287#endif
│ │ │ +
288
│ │ │ +
289}
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ +
Typedefs for easier changing of types.
│ │ │ +
A thin wrapper around std::map that uses boost's fast_pool_allocator.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
ListOfOneContainer< T > ListOfOne(const T &element)
Factory function for ListOfOneContainer to enable ListOfOne(e) syntax.
Definition types.h:178
│ │ │ -
std::string demangle(const char *name)
Pretty print Value type name.
Definition types.cpp:37
│ │ │ -
std::uint64_t FactorIndex
Integer nonlinear factor index type.
Definition types.h:103
│ │ │ -
ptrdiff_t DenseIndex
The index type for Eigen objects.
Definition types.h:106
│ │ │ -
void void_t
Convenience void_t as we assume C++11, it will not conflict the std one in C++17 as this is in gtsam:...
Definition types.h:277
│ │ │ -
std::uint64_t Key
Integer nonlinear key type.
Definition types.h:100
│ │ │ -
Helper class that uses templates to select between two types based on whether TEST_TYPE is const or n...
Definition types.h:115
│ │ │ +
FastMap is a thin wrapper around std::map that uses the boost fast_pool_allocator instead of the defa...
Definition FastMap.h:38
│ │ │ +
Timing Entry, arranged in a tree.
Definition timing.h:145
│ │ │ +
double t2_
cache the
Definition timing.h:150
│ │ │ +
ChildMap children_
subtrees
Definition timing.h:162
│ │ │ +
double max() const
max time, in seconds
Definition timing.h:183
│ │ │ +
double wall() const
wall time, in seconds
Definition timing.h:181
│ │ │ +
double secs() const
time taken, in seconds, including children
Definition timing.h:179
│ │ │ +
double self() const
self time only, in seconds
Definition timing.h:180
│ │ │ +
boost::weak_ptr< TimingOutline > parent_
parent pointer
Definition timing.h:160
│ │ │ +
double min() const
min time, in seconds
Definition timing.h:182
│ │ │ +
double mean() const
mean self time, in seconds
Definition timing.h:184
│ │ │ +
GTSAM_EXPORT size_t time() const
time taken, including children
Definition timing.cpp:65
│ │ │ +
Small class that calls internal::tic at construction, and internol::toc when destroyed.
Definition timing.h:199
│ │ │
Helper struct that encapsulates a value with a default, this is just used as a member object so you d...
Definition types.h:137
│ │ │ -
T & operator*()
Operator to access the value.
Definition types.h:147
│ │ │ -
const T & operator*() const
Operator to access the value.
Definition types.h:150
│ │ │ -
ValueWithDefault()
Default constructor, initialize to default value supplied in template argument.
Definition types.h:141
│ │ │ -
ValueWithDefault(const T &_value)
Initialize to the given value.
Definition types.h:144
│ │ │ -
A helper class that behaves as a container with one element, and works with boost::range.
Definition types.h:160
│ │ │ -
An object whose scope defines a block where TBB and OpenMP parallelism are mixed.
Definition types.h:192
│ │ │ -
A SFINAE trait to mark classes that need special alignment.
Definition types.h:295
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,343 +1,394 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -types.h │ │ │ │ +timing.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -20#pragma once │ │ │ │ -21 │ │ │ │ -22#include │ │ │ │ -23#include │ │ │ │ -24#include │ │ │ │ -25#include // for GTSAM_USE_TBB │ │ │ │ -26 │ │ │ │ -27#include │ │ │ │ -28#include │ │ │ │ -29 │ │ │ │ -30#include │ │ │ │ -31#include │ │ │ │ -32 │ │ │ │ -33#ifdef GTSAM_USE_TBB │ │ │ │ -34#include │ │ │ │ -35#endif │ │ │ │ -36 │ │ │ │ -37#if defined(__GNUC__) || defined(__clang__) │ │ │ │ -38#define GTSAM_DEPRECATED __attribute__((deprecated)) │ │ │ │ -39#elif defined(_MSC_VER) │ │ │ │ -40#define GTSAM_DEPRECATED __declspec(deprecated) │ │ │ │ -41#else │ │ │ │ -42#define GTSAM_DEPRECATED │ │ │ │ -43#endif │ │ │ │ -44 │ │ │ │ -45#ifdef GTSAM_USE_EIGEN_MKL_OPENMP │ │ │ │ -46#include │ │ │ │ -47#endif │ │ │ │ -48 │ │ │ │ -49/* Define macros for ignoring compiler warnings. │ │ │ │ -50 * Usage Example: │ │ │ │ -51 * ``` │ │ │ │ -52 * CLANG_DIAGNOSTIC_PUSH_IGNORE("-Wdeprecated-declarations") │ │ │ │ -53 * GCC_DIAGNOSTIC_PUSH_IGNORE("-Wdeprecated-declarations") │ │ │ │ -54 * MSVC_DIAGNOSTIC_PUSH_IGNORE(4996) │ │ │ │ -55 * // ... code you want to suppress deprecation warnings for ... │ │ │ │ -56 * DIAGNOSTIC_POP() │ │ │ │ -57 * ``` │ │ │ │ -58 */ │ │ │ │ -59#define DO_PRAGMA(x) _Pragma (#x) │ │ │ │ -60#ifdef __clang__ │ │ │ │ -61# define CLANG_DIAGNOSTIC_PUSH_IGNORE(diag) \ │ │ │ │ -62 _Pragma("clang diagnostic push") \ │ │ │ │ -63 DO_PRAGMA(clang diagnostic ignored diag) │ │ │ │ -64#else │ │ │ │ -65# define CLANG_DIAGNOSTIC_PUSH_IGNORE(diag) │ │ │ │ -66#endif │ │ │ │ -67 │ │ │ │ -68#ifdef __GNUC__ │ │ │ │ -69# define GCC_DIAGNOSTIC_PUSH_IGNORE(diag) \ │ │ │ │ -70 _Pragma("GCC diagnostic push") \ │ │ │ │ -71 DO_PRAGMA(GCC diagnostic ignored diag) │ │ │ │ -72#else │ │ │ │ -73# define GCC_DIAGNOSTIC_PUSH_IGNORE(diag) │ │ │ │ -74#endif │ │ │ │ -75 │ │ │ │ -76#ifdef _MSC_VER │ │ │ │ -77# define MSVC_DIAGNOSTIC_PUSH_IGNORE(code) \ │ │ │ │ -78 _Pragma("warning ( push )") \ │ │ │ │ -79 DO_PRAGMA(warning ( disable : code )) │ │ │ │ -80#else │ │ │ │ -81# define MSVC_DIAGNOSTIC_PUSH_IGNORE(code) │ │ │ │ -82#endif │ │ │ │ -83 │ │ │ │ -84#if defined(__clang__) │ │ │ │ -85# define DIAGNOSTIC_POP() _Pragma("clang diagnostic pop") │ │ │ │ -86#elif defined(__GNUC__) │ │ │ │ -87# define DIAGNOSTIC_POP() _Pragma("GCC diagnostic pop") │ │ │ │ -88#elif defined(_MSC_VER) │ │ │ │ -89# define DIAGNOSTIC_POP() _Pragma("warning ( pop )") │ │ │ │ -90#else │ │ │ │ -91# define DIAGNOSTIC_POP() │ │ │ │ -92#endif │ │ │ │ -93 │ │ │ │ -94namespace _g_t_s_a_m { │ │ │ │ -95 │ │ │ │ -97 std::string GTSAM_EXPORT _d_e_m_a_n_g_l_e(const char* name); │ │ │ │ -98 │ │ │ │ -_1_0_0 typedef std::uint64_t _K_e_y; │ │ │ │ -101 │ │ │ │ -_1_0_3 typedef std::uint64_t _F_a_c_t_o_r_I_n_d_e_x; │ │ │ │ -104 │ │ │ │ -_1_0_6 typedef ptrdiff_t _D_e_n_s_e_I_n_d_e_x; │ │ │ │ -107 │ │ │ │ -108 / │ │ │ │ -* ************************************************************************* */ │ │ │ │ -113 template │ │ │ │ -_1_1_5 struct _c_o_n_s_t___s_e_l_e_c_t_o_r { │ │ │ │ -116 }; │ │ │ │ -117 │ │ │ │ -119 template │ │ │ │ -_1_2_0 struct _c_o_n_s_t___s_e_l_e_c_t_o_r { │ │ │ │ -121 typedef AS_NON_CONST type; │ │ │ │ -122 }; │ │ │ │ -123 │ │ │ │ -125 template │ │ │ │ -_1_2_6 struct _c_o_n_s_t___s_e_l_e_c_t_o_r │ │ │ │ -{ │ │ │ │ -127 typedef AS_CONST type; │ │ │ │ -128 }; │ │ │ │ +18#pragma once │ │ │ │ +19 │ │ │ │ +20#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_M_a_p_._h> │ │ │ │ +21#include │ │ │ │ +22#include // for GTSAM_USE_TBB │ │ │ │ +23 │ │ │ │ +24#include │ │ │ │ +25#include │ │ │ │ +26#include │ │ │ │ +27 │ │ │ │ +28#include │ │ │ │ +29#include │ │ │ │ +30 │ │ │ │ +31// This file contains the GTSAM timing instrumentation library, a low- │ │ │ │ +overhead method for │ │ │ │ +32// learning at a medium-fine level how much time various components of an │ │ │ │ +algorithm take │ │ │ │ +33// in CPU and wall time. │ │ │ │ +34// │ │ │ │ +35// The output of this instrumentation is a call-tree-like printout containing │ │ │ │ +statistics │ │ │ │ +36// about each instrumented code block. To print this output at any time, call │ │ │ │ +37// tictoc_print() or tictoc_print_(). │ │ │ │ +38// │ │ │ │ +39// An overall point to be aware of is that there are two versions of each │ │ │ │ +function - one │ │ │ │ +40// ending in an underscore '_' and one without the trailing underscore. The │ │ │ │ +underscore │ │ │ │ +41// versions always are active, but the versions without an underscore are │ │ │ │ +active only when │ │ │ │ +42// GTSAM_ENABLE_TIMING is defined (automatically defined in our CMake Timing │ │ │ │ +build type). │ │ │ │ +43// GTSAM algorithms are all instrumented with the non-underscore versions, so │ │ │ │ +generally │ │ │ │ +44// you should use the underscore versions in your own code to leave out the │ │ │ │ +GTSAM detail. │ │ │ │ +45// │ │ │ │ +46// gttic and gttoc start and stop a timed section, respectively. gttic │ │ │ │ +creates a *scoped* │ │ │ │ +47// object - when it goes out of scope gttoc is called automatically. Thus, │ │ │ │ +you do not │ │ │ │ +48// need to call gttoc if you are timing an entire function (see basic use │ │ │ │ +examples below). │ │ │ │ +49// However, you must be *aware* of this scoped nature - putting gttic inside │ │ │ │ +of an if(...) │ │ │ │ +50// block, for example, will only time code until the closing brace '}'. See │ │ │ │ +advanced │ │ │ │ +51// usage below if you need to avoid this. │ │ │ │ +52// │ │ │ │ +53// Multiple calls nest automatically - each gttic nests under the previous │ │ │ │ +gttic called │ │ │ │ +54// for which gttoc has not been called (or the previous gttic did not go out │ │ │ │ +of scope). │ │ │ │ +55// │ │ │ │ +56// Basic usage examples are as follows: │ │ │ │ +57// │ │ │ │ +58// - Timing an entire function: │ │ │ │ +59// void myFunction() { │ │ │ │ +60// gttic_(myFunction); │ │ │ │ +61// ........ │ │ │ │ +62// } │ │ │ │ +63// │ │ │ │ +64// - Timing an entire function as well as its component parts: │ │ │ │ +65// void myLongFunction() { │ │ │ │ +66// gttic_(myLongFunction); │ │ │ │ +67// gttic_(step1); // Will nest under the 'myLongFunction' label │ │ │ │ +68// ........ │ │ │ │ +69// gttoc_(step1); │ │ │ │ +70// gttic_(step2); // Will nest under the 'myLongFunction' label │ │ │ │ +71// ........ │ │ │ │ +72// gttoc_(step2); │ │ │ │ +73// ........ │ │ │ │ +74// } │ │ │ │ +75// │ │ │ │ +76// - Timing functions calling/called by other functions: │ │ │ │ +77// void oneStep() { │ │ │ │ +78// gttic_(oneStep); // Will automatically nest under the gttic label of the │ │ │ │ +calling function │ │ │ │ +79// ....... │ │ │ │ +80// } │ │ │ │ +81// void algorithm() { │ │ │ │ +82// gttic_(algorithm); │ │ │ │ +83// oneStep(); // gttic's inside this function will automatically nest inside │ │ │ │ +our 'algorithm' label │ │ │ │ +84// twoStep(); // gttic's inside this function will automatically nest inside │ │ │ │ +our 'algorithm' label │ │ │ │ +85// } │ │ │ │ +86// │ │ │ │ +87// │ │ │ │ +88// Advanced usage: │ │ │ │ +89// │ │ │ │ +90// - "Finishing iterations" - to get correct min/max times for each call, you │ │ │ │ +must define │ │ │ │ +91// in your code what constitutes an iteration. A single sum for the min/max │ │ │ │ +times is │ │ │ │ +92// accumulated within each iteration. If you don't care about min/max times, │ │ │ │ +you don't │ │ │ │ +93// need to worry about this. For example: │ │ │ │ +94// void myOuterLoop() { │ │ │ │ +95// while(true) { │ │ │ │ +96// iterateMyAlgorithm(); │ │ │ │ +97// tictoc_finishedIteration_(); │ │ │ │ +98// tictoc_print_(); // Optional │ │ │ │ +99// } │ │ │ │ +100// } │ │ │ │ +101// │ │ │ │ +102// - Stopping timing a section in a different scope than it is started. │ │ │ │ +Normally, a gttoc │ │ │ │ +103// statement goes out of scope at end of C++ scope. However, you can use │ │ │ │ +longtic and │ │ │ │ +104// longtoc to start and stop timing with the specified label at any point, │ │ │ │ +without regard │ │ │ │ +105// too scope. Note that if you use these, it may become difficult to ensure │ │ │ │ +that you │ │ │ │ +106// have matching gttic/gttoc statments. You may want to consider │ │ │ │ +reorganizing your timing │ │ │ │ +107// outline to match the scope of your code. │ │ │ │ +108 │ │ │ │ +109// Automatically use the new Boost timers if version is recent enough. │ │ │ │ +110#if BOOST_VERSION >= 104800 │ │ │ │ +111# ifndef GTSAM_DISABLE_NEW_TIMERS │ │ │ │ +112# define GTSAM_USING_NEW_BOOST_TIMERS │ │ │ │ +113# endif │ │ │ │ +114#endif │ │ │ │ +115 │ │ │ │ +116#ifdef GTSAM_USING_NEW_BOOST_TIMERS │ │ │ │ +117# include │ │ │ │ +118#else │ │ │ │ +119# include │ │ │ │ +120# include <_g_t_s_a_m_/_b_a_s_e_/_t_y_p_e_s_._h> │ │ │ │ +121#endif │ │ │ │ +122 │ │ │ │ +123#ifdef GTSAM_USE_TBB │ │ │ │ +124# include │ │ │ │ +125# undef min │ │ │ │ +126# undef max │ │ │ │ +127# undef ERROR │ │ │ │ +128#endif │ │ │ │ 129 │ │ │ │ -130 / │ │ │ │ -* ************************************************************************* */ │ │ │ │ -136 template │ │ │ │ -_1_3_7 struct _V_a_l_u_e_W_i_t_h_D_e_f_a_u_l_t { │ │ │ │ -138 T value; │ │ │ │ -139 │ │ │ │ -_1_4_1 _V_a_l_u_e_W_i_t_h_D_e_f_a_u_l_t() : value(defaultValue) {} │ │ │ │ -142 │ │ │ │ -_1_4_4 _V_a_l_u_e_W_i_t_h_D_e_f_a_u_l_t(const T& _value) : value(_value) {} │ │ │ │ -145 │ │ │ │ -_1_4_7 T& _o_p_e_r_a_t_o_r_*() { return value; } │ │ │ │ -148 │ │ │ │ -_1_5_0 const T& _o_p_e_r_a_t_o_r_*() const { return value; } │ │ │ │ -151 │ │ │ │ -_1_5_3 operator T() const { return value; } │ │ │ │ -154 }; │ │ │ │ -155 │ │ │ │ -156 / │ │ │ │ -* ************************************************************************* */ │ │ │ │ -159 template │ │ │ │ -_1_6_0 class _L_i_s_t_O_f_O_n_e_C_o_n_t_a_i_n_e_r { │ │ │ │ -161 T element_; │ │ │ │ -162 public: │ │ │ │ -163 typedef T value_type; │ │ │ │ -164 typedef const T* const_iterator; │ │ │ │ -165 typedef T* iterator; │ │ │ │ -166 _L_i_s_t_O_f_O_n_e_C_o_n_t_a_i_n_e_r(const T& element) : element_(element) {} │ │ │ │ -167 const T* begin() const { return &element_; } │ │ │ │ -168 const T* end() const { return &element_ + 1; } │ │ │ │ -169 T* begin() { return &element_; } │ │ │ │ -170 T* end() { return &element_ + 1; } │ │ │ │ -171 size_t size() const { return 1; } │ │ │ │ -172 }; │ │ │ │ -173 │ │ │ │ -174 BOOST_CONCEPT_ASSERT((boost:: │ │ │ │ -RandomAccessRangeConcept<_L_i_s_t_O_f_O_n_e_C_o_n_t_a_i_n_e_r_<_i_n_t_> >)); │ │ │ │ -175 │ │ │ │ -177 template │ │ │ │ -_1_7_8 _L_i_s_t_O_f_O_n_e_C_o_n_t_a_i_n_e_r_<_T_> _L_i_s_t_O_f_O_n_e(const T& element) { │ │ │ │ -179 return _L_i_s_t_O_f_O_n_e_C_o_n_t_a_i_n_e_r_<_T_>(element); │ │ │ │ -180 } │ │ │ │ -181 │ │ │ │ -182 / │ │ │ │ -* ************************************************************************* */ │ │ │ │ -183#ifdef __clang__ │ │ │ │ -184# pragma clang diagnostic push │ │ │ │ -185# pragma clang diagnostic ignored "-Wunused-private-field" // Clang │ │ │ │ -complains that previousOpenMPThreads is unused in the #else case below │ │ │ │ -186#endif │ │ │ │ -187 │ │ │ │ -_1_9_1 class _T_b_b_O_p_e_n_M_P_M_i_x_e_d_S_c_o_p_e │ │ │ │ -192 { │ │ │ │ -193 int previousOpenMPThreads; │ │ │ │ -194 │ │ │ │ -195 public: │ │ │ │ -196#if defined GTSAM_USE_TBB && defined GTSAM_USE_EIGEN_MKL_OPENMP │ │ │ │ -197 _T_b_b_O_p_e_n_M_P_M_i_x_e_d_S_c_o_p_e() : │ │ │ │ -198 previousOpenMPThreads(omp_get_num_threads()) │ │ │ │ -199 { │ │ │ │ -200 omp_set_num_threads(omp_get_num_procs() / 4); │ │ │ │ -201 } │ │ │ │ -202 │ │ │ │ -203 _~_T_b_b_O_p_e_n_M_P_M_i_x_e_d_S_c_o_p_e() │ │ │ │ -204 { │ │ │ │ -205 omp_set_num_threads(previousOpenMPThreads); │ │ │ │ -206 } │ │ │ │ -207#else │ │ │ │ -208 _T_b_b_O_p_e_n_M_P_M_i_x_e_d_S_c_o_p_e() : previousOpenMPThreads(-1) {} │ │ │ │ -209 _~_T_b_b_O_p_e_n_M_P_M_i_x_e_d_S_c_o_p_e() {} │ │ │ │ -210#endif │ │ │ │ -211 }; │ │ │ │ -212 │ │ │ │ -213#ifdef __clang__ │ │ │ │ -214# pragma clang diagnostic pop │ │ │ │ -215#endif │ │ │ │ -216 │ │ │ │ -217} │ │ │ │ +130namespace _g_t_s_a_m { │ │ │ │ +131 │ │ │ │ +132 namespace internal { │ │ │ │ +133 // Generate/retrieve a unique global ID number that will be used to look up │ │ │ │ +tic/toc statements │ │ │ │ +134 GTSAM_EXPORT size_t getTicTocID(const char *description); │ │ │ │ +135 │ │ │ │ +136 // Create new TimingOutline child for gCurrentTimer, make it gCurrentTimer, │ │ │ │ +and call tic method │ │ │ │ +137 GTSAM_EXPORT void tic(size_t id, const char *label); │ │ │ │ +138 │ │ │ │ +139 // Call toc on gCurrentTimer and then set gCurrentTimer to the parent of │ │ │ │ +gCurrentTimer │ │ │ │ +140 GTSAM_EXPORT void toc(size_t id, const char *label); │ │ │ │ +141 │ │ │ │ +_1_4_5 class _T_i_m_i_n_g_O_u_t_l_i_n_e { │ │ │ │ +146 protected: │ │ │ │ +147 size_t id_; │ │ │ │ +148 size_t t_; │ │ │ │ +149 size_t tWall_; │ │ │ │ +_1_5_0 double _t_2__ ; │ │ │ │ +151 size_t tIt_; │ │ │ │ +152 size_t tMax_; │ │ │ │ +153 size_t tMin_; │ │ │ │ +154 size_t n_; │ │ │ │ +155 size_t myOrder_; │ │ │ │ +156 size_t lastChildOrder_; │ │ │ │ +157 std::string label_; │ │ │ │ +158 │ │ │ │ +159 // Tree structure │ │ │ │ +_1_6_0 boost::weak_ptr _p_a_r_e_n_t__; │ │ │ │ +161 typedef _F_a_s_t_M_a_p_<_s_i_z_e___t_,_ _b_o_o_s_t_:_:_s_h_a_r_e_d___p_t_r_<_T_i_m_i_n_g_O_u_t_l_i_n_e_> > _C_h_i_l_d_M_a_p; │ │ │ │ +_1_6_2 _C_h_i_l_d_M_a_p _c_h_i_l_d_r_e_n__; │ │ │ │ +163 │ │ │ │ +164#ifdef GTSAM_USING_NEW_BOOST_TIMERS │ │ │ │ +165 boost::timer::cpu_timer timer_; │ │ │ │ +166#else │ │ │ │ +167 boost::timer timer_; │ │ │ │ +168 _g_t_s_a_m_:_:_V_a_l_u_e_W_i_t_h_D_e_f_a_u_l_t_<_b_o_o_l_,_f_a_l_s_e_> timerActive_; │ │ │ │ +169#endif │ │ │ │ +170#ifdef GTSAM_USE_TBB │ │ │ │ +171 tbb::tick_count tbbTimer_; │ │ │ │ +172#endif │ │ │ │ +173 void add(size_t usecs, size_t usecsWall); │ │ │ │ +174 │ │ │ │ +175 public: │ │ │ │ +177 GTSAM_EXPORT _T_i_m_i_n_g_O_u_t_l_i_n_e(const std::string& label, size_t myId); │ │ │ │ +178 GTSAM_EXPORT size_t _t_i_m_e() const; │ │ │ │ +_1_7_9 double _s_e_c_s() const { return double(_t_i_m_e()) / 1000000.0;} │ │ │ │ +_1_8_0 double _s_e_l_f() const { return double(t_) / 1000000.0;} │ │ │ │ +_1_8_1 double _w_a_l_l() const { return double(tWall_) / 1000000.0;} │ │ │ │ +_1_8_2 double _m_i_n() const { return double(tMin_) / 1000000.0;} │ │ │ │ +_1_8_3 double _m_a_x() const { return double(tMax_) / 1000000.0;} │ │ │ │ +_1_8_4 double _m_e_a_n() const { return _s_e_l_f() / double(n_); } │ │ │ │ +185 GTSAM_EXPORT void print(const std::string& outline = "") const; │ │ │ │ +186 GTSAM_EXPORT void print2(const std::string& outline = "", const double │ │ │ │ +parentTotal = -1.0) const; │ │ │ │ +187 GTSAM_EXPORT const boost::shared_ptr& │ │ │ │ +188 child(size_t child, const std::string& label, const boost:: │ │ │ │ +weak_ptr& thisPtr); │ │ │ │ +189 GTSAM_EXPORT void tic(); │ │ │ │ +190 GTSAM_EXPORT void toc(); │ │ │ │ +191 GTSAM_EXPORT void finishedIteration(); │ │ │ │ +192 │ │ │ │ +193 GTSAM_EXPORT friend void toc(size_t id, const char *label); │ │ │ │ +194 }; // \TimingOutline │ │ │ │ +195 │ │ │ │ +_1_9_9 class GTSAM_EXPORT _A_u_t_o_T_i_c_T_o_c { │ │ │ │ +200 private: │ │ │ │ +201 size_t id_; │ │ │ │ +202 const char* label_; │ │ │ │ +203 bool isSet_; │ │ │ │ +204 │ │ │ │ +205 public: │ │ │ │ +206 _A_u_t_o_T_i_c_T_o_c(size_t id, const char* label) │ │ │ │ +207 : id_(id), label_(label), isSet_(true) { │ │ │ │ +208 tic(id_, label_); │ │ │ │ +209 } │ │ │ │ +210 void stop() { │ │ │ │ +211 toc(id_, label_); │ │ │ │ +212 isSet_ = false; │ │ │ │ +213 } │ │ │ │ +214 _~_A_u_t_o_T_i_c_T_o_c() { │ │ │ │ +215 if (isSet_) stop(); │ │ │ │ +216 } │ │ │ │ +217 }; │ │ │ │ 218 │ │ │ │ -219/* ************************************************************************* │ │ │ │ -*/ │ │ │ │ -222#ifdef NDEBUG │ │ │ │ -223#define assert_throw(CONDITION, EXCEPTION) ((void)0) │ │ │ │ -224#else │ │ │ │ -_2_2_5#define assert_throw(CONDITION, EXCEPTION) \ │ │ │ │ -226 if (!(CONDITION)) { \ │ │ │ │ -227 throw (EXCEPTION); \ │ │ │ │ -228 } │ │ │ │ -229#endif │ │ │ │ -230 │ │ │ │ -231#ifdef _MSC_VER │ │ │ │ -232 │ │ │ │ -233// Define some common g++ functions and macros we use that MSVC does not │ │ │ │ -have │ │ │ │ -234 │ │ │ │ -235#if (_MSC_VER < 1800) │ │ │ │ -236 │ │ │ │ -237#include │ │ │ │ -238namespace std { │ │ │ │ -239 template inline int isfinite(T a) { │ │ │ │ -240 return (int)boost::math::isfinite(a); } │ │ │ │ -241 template inline int isnan(T a) { │ │ │ │ -242 return (int)boost::math::isnan(a); } │ │ │ │ -243 template inline int isinf(T a) { │ │ │ │ -244 return (int)boost::math::isinf(a); } │ │ │ │ -245} │ │ │ │ -246 │ │ │ │ -247#endif │ │ │ │ -248 │ │ │ │ -249#include │ │ │ │ -250#ifndef M_PI │ │ │ │ -251#define M_PI (boost::math::constants::pi()) │ │ │ │ -252#endif │ │ │ │ -253#ifndef M_PI_2 │ │ │ │ -254#define M_PI_2 (boost::math::constants::pi() / 2.0) │ │ │ │ -255#endif │ │ │ │ -256#ifndef M_PI_4 │ │ │ │ -257#define M_PI_4 (boost::math::constants::pi() / 4.0) │ │ │ │ -258#endif │ │ │ │ +219 GTSAM_EXTERN_EXPORT boost::shared_ptr gTimingRoot; │ │ │ │ +220 GTSAM_EXTERN_EXPORT boost::weak_ptr gCurrentTimer; │ │ │ │ +221 } │ │ │ │ +222 │ │ │ │ +223// Tic and toc functions that are always active (whether or not │ │ │ │ +ENABLE_TIMING is defined) │ │ │ │ +224// There is a trick being used here to achieve near-zero runtime overhead, │ │ │ │ +in that a │ │ │ │ +225// static variable is created for each tic/toc statement storing an integer │ │ │ │ +ID, but the │ │ │ │ +226// integer ID is only looked up by string once when the static variable is │ │ │ │ +initialized │ │ │ │ +227// as the program starts. │ │ │ │ +228 │ │ │ │ +229// tic │ │ │ │ +230#define gttic_(label) \ │ │ │ │ +231 static const size_t label##_id_tic = ::gtsam::internal::getTicTocID │ │ │ │ +(#label); \ │ │ │ │ +232 ::gtsam::internal::AutoTicToc label##_obj(label##_id_tic, #label) │ │ │ │ +233 │ │ │ │ +234// toc │ │ │ │ +235#define gttoc_(label) \ │ │ │ │ +236 label##_obj.stop() │ │ │ │ +237 │ │ │ │ +238// tic │ │ │ │ +239#define longtic_(label) \ │ │ │ │ +240 static const size_t label##_id_tic = ::gtsam::internal::getTicTocID │ │ │ │ +(#label); \ │ │ │ │ +241 ::gtsam::internal::ticInternal(label##_id_tic, #label) │ │ │ │ +242 │ │ │ │ +243// toc │ │ │ │ +244#define longtoc_(label) \ │ │ │ │ +245 static const size_t label##_id_toc = ::gtsam::internal::getTicTocID │ │ │ │ +(#label); \ │ │ │ │ +246 ::gtsam::internal::tocInternal(label##_id_toc, #label) │ │ │ │ +247 │ │ │ │ +248// indicate iteration is finished │ │ │ │ +249inline void tictoc_finishedIteration_() { │ │ │ │ +250 ::gtsam::internal::gTimingRoot->finishedIteration(); } │ │ │ │ +251 │ │ │ │ +252// print │ │ │ │ +253inline void tictoc_print_() { │ │ │ │ +254 ::gtsam::internal::gTimingRoot->print(); } │ │ │ │ +255 │ │ │ │ +256// print mean and standard deviation │ │ │ │ +257inline void tictoc_print2_() { │ │ │ │ +258 ::gtsam::internal::gTimingRoot->print2(); } │ │ │ │ 259 │ │ │ │ -260#endif │ │ │ │ -261 │ │ │ │ -262#ifdef min │ │ │ │ -263#undef min │ │ │ │ -264#endif │ │ │ │ +260// get a node by label and assign it to variable │ │ │ │ +261#define tictoc_getNode(variable, label) \ │ │ │ │ +262 static const size_t label##_id_getnode = ::gtsam::internal::getTicTocID │ │ │ │ +(#label); \ │ │ │ │ +263 const boost::shared_ptr variable = │ │ │ │ +\ │ │ │ │ +264 ::gtsam::internal::gCurrentTimer.lock()->child(label##_id_getnode, #label, │ │ │ │ +::gtsam::internal::gCurrentTimer); │ │ │ │ 265 │ │ │ │ -266#ifdef max │ │ │ │ -267#undef max │ │ │ │ -268#endif │ │ │ │ -269 │ │ │ │ -270#ifdef ERROR │ │ │ │ -271#undef ERROR │ │ │ │ -272#endif │ │ │ │ -273 │ │ │ │ -274namespace _g_t_s_a_m { │ │ │ │ -275 │ │ │ │ -_2_7_7 template using _v_o_i_d___t = void; │ │ │ │ -278 │ │ │ │ -294 template> │ │ │ │ -_2_9_5 struct _n_e_e_d_s___e_i_g_e_n___a_l_i_g_n_e_d___a_l_l_o_c_a_t_o_r : std::false_type { │ │ │ │ -296 }; │ │ │ │ -297 template │ │ │ │ -_2_9_8 struct _n_e_e_d_s___e_i_g_e_n___a_l_i_g_n_e_d___a_l_l_o_c_a_t_o_r_<_T_,_ _v_o_i_d___t_<_t_y_p_e_n_a_m_e_ _T_:_: │ │ │ │ -___e_i_g_e_n___a_l_i_g_n_e_d___a_l_l_o_c_a_t_o_r___t_r_a_i_t_>> : std::true_type { │ │ │ │ -299 }; │ │ │ │ -300 │ │ │ │ -301} │ │ │ │ -302 │ │ │ │ -_3_0_8#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW \ │ │ │ │ -309 EIGEN_MAKE_ALIGNED_OPERATOR_NEW \ │ │ │ │ -310 using _eigen_aligned_allocator_trait = void; │ │ │ │ -311 │ │ │ │ -_3_1_7#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) \ │ │ │ │ -318 EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) \ │ │ │ │ -319 using _eigen_aligned_allocator_trait = void; │ │ │ │ +266// reset │ │ │ │ +267inline void tictoc_reset_() { │ │ │ │ +268 ::gtsam::internal::gTimingRoot.reset(new ::gtsam::internal::TimingOutline │ │ │ │ +("Total", ::gtsam::internal::getTicTocID("Total"))); │ │ │ │ +269 ::gtsam::internal::gCurrentTimer = ::gtsam::internal::gTimingRoot; } │ │ │ │ +270 │ │ │ │ +271#ifdef ENABLE_TIMING │ │ │ │ +272#define gttic(label) gttic_(label) │ │ │ │ +273#define gttoc(label) gttoc_(label) │ │ │ │ +274#define longtic(label) longtic_(label) │ │ │ │ +275#define longtoc(label) longtoc_(label) │ │ │ │ +276#define tictoc_finishedIteration tictoc_finishedIteration_ │ │ │ │ +277#define tictoc_print tictoc_print_ │ │ │ │ +278#define tictoc_reset tictoc_reset_ │ │ │ │ +279#else │ │ │ │ +280#define gttic(label) ((void)0) │ │ │ │ +281#define gttoc(label) ((void)0) │ │ │ │ +282#define longtic(label) ((void)0) │ │ │ │ +283#define longtoc(label) ((void)0) │ │ │ │ +284#define tictoc_finishedIteration() ((void)0) │ │ │ │ +285#define tictoc_print() ((void)0) │ │ │ │ +286#define tictoc_reset() ((void)0) │ │ │ │ +287#endif │ │ │ │ +288 │ │ │ │ +289} │ │ │ │ +_t_y_p_e_s_._h │ │ │ │ +Typedefs for easier changing of types. │ │ │ │ +_F_a_s_t_M_a_p_._h │ │ │ │ +A thin wrapper around std::map that uses boost's fast_pool_allocator. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_L_i_s_t_O_f_O_n_e │ │ │ │ -ListOfOneContainer< T > ListOfOne(const T &element) │ │ │ │ -Factory function for ListOfOneContainer to enable ListOfOne(e) syntax. │ │ │ │ -DDeeffiinniittiioonn types.h:178 │ │ │ │ -_g_t_s_a_m_:_:_d_e_m_a_n_g_l_e │ │ │ │ -std::string demangle(const char *name) │ │ │ │ -Pretty print Value type name. │ │ │ │ -DDeeffiinniittiioonn types.cpp:37 │ │ │ │ -_g_t_s_a_m_:_:_F_a_c_t_o_r_I_n_d_e_x │ │ │ │ -std::uint64_t FactorIndex │ │ │ │ -Integer nonlinear factor index type. │ │ │ │ -DDeeffiinniittiioonn types.h:103 │ │ │ │ -_g_t_s_a_m_:_:_D_e_n_s_e_I_n_d_e_x │ │ │ │ -ptrdiff_t DenseIndex │ │ │ │ -The index type for Eigen objects. │ │ │ │ -DDeeffiinniittiioonn types.h:106 │ │ │ │ -_g_t_s_a_m_:_:_v_o_i_d___t │ │ │ │ -void void_t │ │ │ │ -Convenience void_t as we assume C++11, it will not conflict the std one in │ │ │ │ -C++17 as this is in gtsam:... │ │ │ │ -DDeeffiinniittiioonn types.h:277 │ │ │ │ -_g_t_s_a_m_:_:_K_e_y │ │ │ │ -std::uint64_t Key │ │ │ │ -Integer nonlinear key type. │ │ │ │ -DDeeffiinniittiioonn types.h:100 │ │ │ │ -_g_t_s_a_m_:_:_c_o_n_s_t___s_e_l_e_c_t_o_r │ │ │ │ -Helper class that uses templates to select between two types based on whether │ │ │ │ -TEST_TYPE is const or n... │ │ │ │ -DDeeffiinniittiioonn types.h:115 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_M_a_p │ │ │ │ +FastMap is a thin wrapper around std::map that uses the boost │ │ │ │ +fast_pool_allocator instead of the defa... │ │ │ │ +DDeeffiinniittiioonn FastMap.h:38 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e │ │ │ │ +Timing Entry, arranged in a tree. │ │ │ │ +DDeeffiinniittiioonn timing.h:145 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_t_2__ │ │ │ │ +double t2_ │ │ │ │ +cache the │ │ │ │ +DDeeffiinniittiioonn timing.h:150 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_c_h_i_l_d_r_e_n__ │ │ │ │ +ChildMap children_ │ │ │ │ +subtrees │ │ │ │ +DDeeffiinniittiioonn timing.h:162 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_m_a_x │ │ │ │ +double max() const │ │ │ │ +max time, in seconds │ │ │ │ +DDeeffiinniittiioonn timing.h:183 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_w_a_l_l │ │ │ │ +double wall() const │ │ │ │ +wall time, in seconds │ │ │ │ +DDeeffiinniittiioonn timing.h:181 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_s_e_c_s │ │ │ │ +double secs() const │ │ │ │ +time taken, in seconds, including children │ │ │ │ +DDeeffiinniittiioonn timing.h:179 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_s_e_l_f │ │ │ │ +double self() const │ │ │ │ +self time only, in seconds │ │ │ │ +DDeeffiinniittiioonn timing.h:180 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_p_a_r_e_n_t__ │ │ │ │ +boost::weak_ptr< TimingOutline > parent_ │ │ │ │ +parent pointer │ │ │ │ +DDeeffiinniittiioonn timing.h:160 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_m_i_n │ │ │ │ +double min() const │ │ │ │ +min time, in seconds │ │ │ │ +DDeeffiinniittiioonn timing.h:182 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_m_e_a_n │ │ │ │ +double mean() const │ │ │ │ +mean self time, in seconds │ │ │ │ +DDeeffiinniittiioonn timing.h:184 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_t_i_m_e │ │ │ │ +GTSAM_EXPORT size_t time() const │ │ │ │ +time taken, including children │ │ │ │ +DDeeffiinniittiioonn timing.cpp:65 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_A_u_t_o_T_i_c_T_o_c │ │ │ │ +Small class that calls internal::tic at construction, and internol::toc when │ │ │ │ +destroyed. │ │ │ │ +DDeeffiinniittiioonn timing.h:199 │ │ │ │ _g_t_s_a_m_:_:_V_a_l_u_e_W_i_t_h_D_e_f_a_u_l_t │ │ │ │ Helper struct that encapsulates a value with a default, this is just used as a │ │ │ │ member object so you d... │ │ │ │ DDeeffiinniittiioonn types.h:137 │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e_W_i_t_h_D_e_f_a_u_l_t_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -T & operator*() │ │ │ │ -Operator to access the value. │ │ │ │ -DDeeffiinniittiioonn types.h:147 │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e_W_i_t_h_D_e_f_a_u_l_t_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -const T & operator*() const │ │ │ │ -Operator to access the value. │ │ │ │ -DDeeffiinniittiioonn types.h:150 │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e_W_i_t_h_D_e_f_a_u_l_t_:_:_V_a_l_u_e_W_i_t_h_D_e_f_a_u_l_t │ │ │ │ -ValueWithDefault() │ │ │ │ -Default constructor, initialize to default value supplied in template argument. │ │ │ │ -DDeeffiinniittiioonn types.h:141 │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e_W_i_t_h_D_e_f_a_u_l_t_:_:_V_a_l_u_e_W_i_t_h_D_e_f_a_u_l_t │ │ │ │ -ValueWithDefault(const T &_value) │ │ │ │ -Initialize to the given value. │ │ │ │ -DDeeffiinniittiioonn types.h:144 │ │ │ │ -_g_t_s_a_m_:_:_L_i_s_t_O_f_O_n_e_C_o_n_t_a_i_n_e_r │ │ │ │ -A helper class that behaves as a container with one element, and works with │ │ │ │ -boost::range. │ │ │ │ -DDeeffiinniittiioonn types.h:160 │ │ │ │ -_g_t_s_a_m_:_:_T_b_b_O_p_e_n_M_P_M_i_x_e_d_S_c_o_p_e │ │ │ │ -An object whose scope defines a block where TBB and OpenMP parallelism are │ │ │ │ -mixed. │ │ │ │ -DDeeffiinniittiioonn types.h:192 │ │ │ │ -_g_t_s_a_m_:_:_n_e_e_d_s___e_i_g_e_n___a_l_i_g_n_e_d___a_l_l_o_c_a_t_o_r │ │ │ │ -A SFINAE trait to mark classes that need special alignment. │ │ │ │ -DDeeffiinniittiioonn types.h:295 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _t_y_p_e_s_._h │ │ │ │ + * _t_i_m_i_n_g_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00011.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/types.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/debug.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,42 +95,55 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ -Functions
│ │ │ -
types.cpp File Reference
│ │ │ +Functions | │ │ │ +Variables
│ │ │ +
debug.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Functions for handling type information. │ │ │ +

Global debugging flags. │ │ │ More...

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ Functions

std::string gtsam::demangle (const char *name)
 Pretty print Value type name.
 
│ │ │ +bool gtsam::guardedIsDebug (const std::string &s)
 
│ │ │ +void gtsam::guardedSetDebug (const std::string &s, const bool v)
 
│ │ │ +bool gtsam::isDebugVersion ()
 
│ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Variables

│ │ │ +GTSAM_EXPORT FastMap< std::string, ValueWithDefault< bool, false > > gtsam::debugFlags
 
│ │ │

Detailed Description

│ │ │ -

Functions for handling type information.

│ │ │ -
Author
Varun Agrawal
│ │ │ -
Date
May 18, 2020
│ │ │ +

Global debugging flags.

│ │ │ +
Author
Richard Roberts
│ │ │ +
Date
Feb 1, 2011
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,27 +1,33 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -types.cpp File Reference │ │ │ │ -_B_a_s_e │ │ │ │ -Functions for handling type information. _M_o_r_e_._._. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ +debug.cpp File Reference │ │ │ │ +Global debugging flags. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -std::string  _g_t_s_a_m_:_:_d_e_m_a_n_g_l_e (const char *name) │ │ │ │ -  Pretty print _V_a_l_u_e type name. │ │ │ │ +bool  ggttssaamm::::gguuaarrddeeddIIssDDeebbuugg (const std::string &s) │ │ │ │ +  │ │ │ │ +void  ggttssaamm::::gguuaarrddeeddSSeettDDeebbuugg (const std::string &s, const bool v) │ │ │ │ +  │ │ │ │ +bool  ggttssaamm::::iissDDeebbuuggVVeerrssiioonn () │ │ │ │ +  │ │ │ │ +VVaarriiaabblleess │ │ │ │ +GTSAM_EXPORT _F_a_s_t_M_a_p< std::string, _V_a_l_u_e_W_i_t_h_D_e_f_a_u_l_t< bool, │ │ │ │ + false > >  ggttssaamm::::ddeebbuuggFFllaaggss │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Functions for handling type information. │ │ │ │ +Global debugging flags. │ │ │ │ Author │ │ │ │ - Varun Agrawal │ │ │ │ + Richard Roberts │ │ │ │ Date │ │ │ │ - May 18, 2020 │ │ │ │ + Feb 1, 2011 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _t_y_p_e_s_._c_p_p │ │ │ │ + * _d_e_b_u_g_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00014_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/treeTraversal-inst.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/ConcurrentMap.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,217 +98,140 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
treeTraversal-inst.h
│ │ │ +
ConcurrentMap.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │ +
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
17#pragma once
│ │ │ -
18
│ │ │ -
19#include <gtsam/base/treeTraversal/parallelTraversalTasks.h>
│ │ │ -
20#include <gtsam/base/treeTraversal/statistics.h>
│ │ │ -
21
│ │ │ -
22#include <gtsam/base/FastList.h>
│ │ │ - │ │ │ -
24#include <gtsam/inference/Key.h>
│ │ │ -
25#include <gtsam/config.h> // for GTSAM_USE_TBB
│ │ │ -
26
│ │ │ -
27#include <stack>
│ │ │ -
28#include <vector>
│ │ │ -
29#include <string>
│ │ │ -
30#include <boost/shared_ptr.hpp>
│ │ │ -
31#include <boost/make_shared.hpp>
│ │ │ -
32
│ │ │ -
33namespace gtsam {
│ │ │ -
34
│ │ │ -
│ │ │ -
36namespace treeTraversal {
│ │ │ -
37
│ │ │ -
38/* ************************************************************************* */
│ │ │ -
39namespace {
│ │ │ -
40// Internal node used in DFS preorder stack
│ │ │ -
41template<typename NODE, typename DATA>
│ │ │ -
42struct TraversalNode {
│ │ │ -
43 bool expanded;
│ │ │ -
44 const boost::shared_ptr<NODE>& treeNode;
│ │ │ -
45 DATA& parentData;
│ │ │ -
46 typename FastList<DATA>::iterator dataPointer;
│ │ │ -
47 TraversalNode(const boost::shared_ptr<NODE>& _treeNode, DATA& _parentData) :
│ │ │ -
48 expanded(false), treeNode(_treeNode), parentData(_parentData) {
│ │ │ -
49 }
│ │ │ -
50};
│ │ │ -
51
│ │ │ -
52// Do nothing - default argument for post-visitor for tree traversal
│ │ │ -
53struct no_op {
│ │ │ -
54 template<typename NODE, typename DATA>
│ │ │ -
55 void operator()(const boost::shared_ptr<NODE>& node, const DATA& data) {
│ │ │ -
56 }
│ │ │ -
57};
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ + │ │ │ +
22
│ │ │ +
23// Change class depending on whether we are using TBB
│ │ │ +
24#ifdef GTSAM_USE_TBB
│ │ │ +
25
│ │ │ +
26// Include TBB header
│ │ │ +
27# include <tbb/concurrent_unordered_map.h>
│ │ │ +
28# undef min // TBB seems to include Windows.h which defines these macros that cause problems
│ │ │ +
29# undef max
│ │ │ +
30# undef ERROR
│ │ │ +
31
│ │ │ +
32#include <functional> // std::hash()
│ │ │ +
33
│ │ │ +
34// Use TBB concurrent_unordered_map for ConcurrentMap
│ │ │ +
35template <typename KEY, typename VALUE>
│ │ │ +
36using ConcurrentMapBase = tbb::concurrent_unordered_map<
│ │ │ +
37 KEY,
│ │ │ +
38 VALUE,
│ │ │ +
39 std::hash<KEY>
│ │ │ +
40 >;
│ │ │ +
41
│ │ │ +
42#else
│ │ │ +
43
│ │ │ +
44// If we're not using TBB, use a FastMap for ConcurrentMap
│ │ │ +
45#include <gtsam/base/FastMap.h>
│ │ │ +
46template <typename KEY, typename VALUE>
│ │ │ + │ │ │ +
48
│ │ │ +
49#endif
│ │ │ +
50
│ │ │ +
51#include <boost/serialization/nvp.hpp>
│ │ │ +
52#include <boost/serialization/split_member.hpp>
│ │ │ +
53#include <boost/static_assert.hpp>
│ │ │ +
54
│ │ │ + │ │ │ +
56
│ │ │ +
57namespace gtsam {
│ │ │
58
│ │ │ -
59}
│ │ │ -
60
│ │ │ -
75template<class FOREST, typename DATA, typename VISITOR_PRE,
│ │ │ -
76 typename VISITOR_POST>
│ │ │ -
│ │ │ -
77void DepthFirstForest(FOREST& forest, DATA& rootData, VISITOR_PRE& visitorPre,
│ │ │ -
78 VISITOR_POST& visitorPost) {
│ │ │ -
79 // Typedefs
│ │ │ -
80 typedef typename FOREST::Node Node;
│ │ │ -
81 typedef boost::shared_ptr<Node> sharedNode;
│ │ │ -
82
│ │ │ -
83 // Depth first traversal stack
│ │ │ -
84 typedef TraversalNode<typename FOREST::Node, DATA> TraversalNode;
│ │ │ -
85 typedef FastList<TraversalNode> Stack;
│ │ │ -
86 Stack stack;
│ │ │ -
87 FastList<DATA> dataList; // List to store node data as it is returned from the pre-order visitor
│ │ │ -
88
│ │ │ -
89 // Add roots to stack (insert such that they are visited and processed in order
│ │ │ -
90 {
│ │ │ -
91 typename Stack::iterator insertLocation = stack.begin();
│ │ │ -
92 for(const sharedNode& root: forest.roots())
│ │ │ -
93 stack.insert(insertLocation, TraversalNode(root, rootData));
│ │ │ -
94 }
│ │ │ -
95
│ │ │ -
96 // Traverse
│ │ │ -
97 while (!stack.empty()) {
│ │ │ -
98 // Get next node
│ │ │ -
99 TraversalNode& node = stack.front();
│ │ │ -
100
│ │ │ -
101 if (node.expanded) {
│ │ │ -
102 // If already expanded, then the data stored in the node is no longer needed, so visit
│ │ │ -
103 // then delete it.
│ │ │ -
104 (void) visitorPost(node.treeNode, *node.dataPointer);
│ │ │ -
105 dataList.erase(node.dataPointer);
│ │ │ -
106 stack.pop_front();
│ │ │ -
107 } else {
│ │ │ -
108 // If not already visited, visit the node and add its children (use reverse iterators so
│ │ │ -
109 // children are processed in the order they appear)
│ │ │ -
110 node.dataPointer = dataList.insert(dataList.end(),
│ │ │ -
111 visitorPre(node.treeNode, node.parentData));
│ │ │ -
112 typename Stack::iterator insertLocation = stack.begin();
│ │ │ -
113 for(const sharedNode& child: node.treeNode->children)
│ │ │ -
114 stack.insert(insertLocation, TraversalNode(child, *node.dataPointer));
│ │ │ -
115 node.expanded = true;
│ │ │ -
116 }
│ │ │ -
117 }
│ │ │ -
118 assert(dataList.empty());
│ │ │ -
119}
│ │ │ -
│ │ │ -
120
│ │ │ -
132template<class FOREST, typename DATA, typename VISITOR_PRE>
│ │ │ -
│ │ │ -
133void DepthFirstForest(FOREST& forest, DATA& rootData, VISITOR_PRE& visitorPre) {
│ │ │ -
134 no_op visitorPost;
│ │ │ -
135 DepthFirstForest(forest, rootData, visitorPre, visitorPost);
│ │ │ -
136}
│ │ │ -
│ │ │ -
137
│ │ │ -
152template<class FOREST, typename DATA, typename VISITOR_PRE,
│ │ │ -
153 typename VISITOR_POST>
│ │ │ -
│ │ │ -
154void DepthFirstForestParallel(FOREST& forest, DATA& rootData,
│ │ │ -
155 VISITOR_PRE& visitorPre, VISITOR_POST& visitorPost,
│ │ │ -
156 int problemSizeThreshold = 10) {
│ │ │ -
157#ifdef GTSAM_USE_TBB
│ │ │ -
158 // Typedefs
│ │ │ -
159 typedef typename FOREST::Node Node;
│ │ │ -
160
│ │ │ -
161 internal::CreateRootTask<Node>(forest.roots(), rootData, visitorPre,
│ │ │ -
162 visitorPost, problemSizeThreshold);
│ │ │ -
163#else
│ │ │ -
164 DepthFirstForest(forest, rootData, visitorPre, visitorPost);
│ │ │ -
165#endif
│ │ │ -
166}
│ │ │ -
│ │ │ -
167
│ │ │ -
168/* ************************************************************************* */
│ │ │ -
170namespace {
│ │ │ -
171template<typename NODE>
│ │ │ -
172boost::shared_ptr<NODE> CloneForestVisitorPre(
│ │ │ -
173 const boost::shared_ptr<NODE>& node,
│ │ │ -
174 const boost::shared_ptr<NODE>& parentPointer) {
│ │ │ -
175 // Clone the current node and add it to its cloned parent
│ │ │ -
176 boost::shared_ptr<NODE> clone = boost::make_shared<NODE>(*node);
│ │ │ -
177 clone->children.clear();
│ │ │ -
178 parentPointer->children.push_back(clone);
│ │ │ -
179 return clone;
│ │ │ -
180}
│ │ │ -
181}
│ │ │ -
182
│ │ │ -
188template<class FOREST>
│ │ │ -
│ │ │ - │ │ │ -
190 const FOREST& forest) {
│ │ │ -
191 typedef typename FOREST::Node Node;
│ │ │ -
192 boost::shared_ptr<Node> rootContainer = boost::make_shared<Node>();
│ │ │ -
193 DepthFirstForest(forest, rootContainer, CloneForestVisitorPre<Node>);
│ │ │ -
194 return FastVector<boost::shared_ptr<Node> >(rootContainer->children.begin(),
│ │ │ -
195 rootContainer->children.end());
│ │ │ -
196}
│ │ │ -
│ │ │ -
197
│ │ │ -
198/* ************************************************************************* */
│ │ │ -
200namespace {
│ │ │ -
201struct PrintForestVisitorPre {
│ │ │ -
202 const KeyFormatter& formatter;
│ │ │ -
203 PrintForestVisitorPre(const KeyFormatter& formatter) :
│ │ │ -
204 formatter(formatter) {
│ │ │ -
205 }
│ │ │ -
206 template<typename NODE> std::string operator()(
│ │ │ -
207 const boost::shared_ptr<NODE>& node, const std::string& parentString) {
│ │ │ -
208 // Print the current node
│ │ │ -
209 node->print(parentString + "-", formatter);
│ │ │ -
210 // Increment the indentation
│ │ │ -
211 return parentString + "| ";
│ │ │ -
212 }
│ │ │ -
213};
│ │ │ -
214}
│ │ │ -
215
│ │ │ -
218template<class FOREST>
│ │ │ -
│ │ │ -
219void PrintForest(const FOREST& forest, std::string str,
│ │ │ -
220 const KeyFormatter& keyFormatter) {
│ │ │ -
221 PrintForestVisitorPre visitor(keyFormatter);
│ │ │ -
222 DepthFirstForest(forest, str, visitor);
│ │ │ -
223}
│ │ │ -
│ │ │ -
224} // namespace treeTraversal
│ │ │ -
│ │ │ -
225
│ │ │ -
226} // namespace gtsam
│ │ │ -
A thin wrapper around std::vector that uses a custom allocator.
│ │ │ -
A thin wrapper around std::list that uses boost's fast_pool_allocator.
│ │ │ - │ │ │ +
67template<typename KEY, typename VALUE>
│ │ │ +
│ │ │ +
68class ConcurrentMap : public ConcurrentMapBase<KEY,VALUE> {
│ │ │ +
69
│ │ │ +
70public:
│ │ │ +
71
│ │ │ + │ │ │ +
73
│ │ │ + │ │ │ +
76
│ │ │ +
78 template<typename INPUTITERATOR>
│ │ │ +
79 ConcurrentMap(INPUTITERATOR first, INPUTITERATOR last) : Base(first, last) {}
│ │ │ +
80
│ │ │ + │ │ │ +
83
│ │ │ +
85 ConcurrentMap(const Base& x) : Base(x) {}
│ │ │ +
86
│ │ │ +
88 bool exists(const KEY& e) const { return this->count(e); }
│ │ │ +
89
│ │ │ +
90#ifndef GTSAM_USE_TBB
│ │ │ +
91 // If we're not using TBB and this is actually a FastMap, we need to add these functions and hide
│ │ │ +
92 // the original erase functions.
│ │ │ +
93 void unsafe_erase(typename Base::iterator position) { ((Base*)this)->erase(position); }
│ │ │ +
94 typename Base::size_type unsafe_erase(const KEY& k) { return ((Base*)this)->erase(k); }
│ │ │ +
95 void unsafe_erase(typename Base::iterator first, typename Base::iterator last) {
│ │ │ +
96 return ((Base*)this)->erase(first, last); }
│ │ │ +
97private:
│ │ │ +
98 void erase() {}
│ │ │ +
99public:
│ │ │ +
100#endif
│ │ │ +
101
│ │ │ +
102private:
│ │ │ + │ │ │ +
105 template<class Archive>
│ │ │ +
106 void save(Archive& ar, const unsigned int /*version*/) const
│ │ │ +
107 {
│ │ │ +
108 // Copy to an STL container and serialize that
│ │ │ +
109 FastVector<std::pair<KEY, VALUE> > map(this->size());
│ │ │ +
110 std::copy(this->begin(), this->end(), map.begin());
│ │ │ +
111 ar & BOOST_SERIALIZATION_NVP(map);
│ │ │ +
112 }
│ │ │ +
113 template<class Archive>
│ │ │ +
114 void load(Archive& ar, const unsigned int /*version*/)
│ │ │ +
115 {
│ │ │ +
116 this->clear();
│ │ │ +
117 // Load into STL container and then fill our map
│ │ │ + │ │ │ +
119 ar & BOOST_SERIALIZATION_NVP(map);
│ │ │ +
120 this->insert(map.begin(), map.end());
│ │ │ +
121 }
│ │ │ +
122 BOOST_SERIALIZATION_SPLIT_MEMBER()
│ │ │ +
123};
│ │ │ +
│ │ │ +
124
│ │ │ +
125}
│ │ │ +
A thin wrapper around std::map that uses boost's fast_pool_allocator.
│ │ │ +
A thin wrapper around std::vector that uses a custom allocator.
│ │ │ +
Included from all GTSAM files.
│ │ │
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
FastVector is a type alias to a std::vector with a custom memory allocator.
Definition FastVector.h:34
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
Matrix stack(size_t nrMatrices,...)
create a matrix by stacking other matrices Given a set of matrices: A1, A2, A3...
Definition Matrix.cpp:397
│ │ │ -
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition Key.h:35
│ │ │ -
void DepthFirstForest(FOREST &forest, DATA &rootData, VISITOR_PRE &visitorPre, VISITOR_POST &visitorPost)
Traverse a forest depth-first with pre-order and post-order visits.
Definition treeTraversal-inst.h:77
│ │ │ -
FastVector< boost::shared_ptr< typename FOREST::Node > > CloneForest(const FOREST &forest)
Clone a tree, copy-constructing new nodes (calling boost::make_shared) and setting up child pointers ...
Definition treeTraversal-inst.h:189
│ │ │ -
void PrintForest(const FOREST &forest, std::string str, const KeyFormatter &keyFormatter)
Print a tree, prefixing each line with str, and formatting keys using keyFormatter.
Definition treeTraversal-inst.h:219
│ │ │ -
void DepthFirstForestParallel(FOREST &forest, DATA &rootData, VISITOR_PRE &visitorPre, VISITOR_POST &visitorPost, int problemSizeThreshold=10)
Traverse a forest depth-first with pre-order and post-order visits.
Definition treeTraversal-inst.h:154
│ │ │ -
FastList is a thin wrapper around std::list that uses the boost fast_pool_allocator instead of the de...
Definition FastList.h:40
│ │ │ +
FastMap is a thin wrapper around std::map that uses the boost fast_pool_allocator instead of the defa...
Definition ConcurrentMap.h:68
│ │ │ +
ConcurrentMap(INPUTITERATOR first, INPUTITERATOR last)
Constructor from a range, passes through to base class.
Definition ConcurrentMap.h:79
│ │ │ +
ConcurrentMap(const ConcurrentMap< KEY, VALUE > &x)
Copy constructor from another ConcurrentMap.
Definition ConcurrentMap.h:82
│ │ │ +
bool exists(const KEY &e) const
Handy 'exists' function.
Definition ConcurrentMap.h:88
│ │ │ +
ConcurrentMap(const Base &x)
Copy constructor from the base map class.
Definition ConcurrentMap.h:85
│ │ │ +
ConcurrentMap()
Default constructor.
Definition ConcurrentMap.h:75
│ │ │ +
friend class boost::serialization::access
Serialization function.
Definition ConcurrentMap.h:104
│ │ │ +
FastMap is a thin wrapper around std::map that uses the boost fast_pool_allocator instead of the defa...
Definition FastMap.h:38
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,243 +1,168 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -treeTraversal-inst.h │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +ConcurrentMap.h │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -17#pragma once │ │ │ │ -18 │ │ │ │ -19#include │ │ │ │ -20#include │ │ │ │ -21 │ │ │ │ -22#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_L_i_s_t_._h> │ │ │ │ -23#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_V_e_c_t_o_r_._h> │ │ │ │ -24#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_K_e_y_._h> │ │ │ │ -25#include // for GTSAM_USE_TBB │ │ │ │ -26 │ │ │ │ -27#include │ │ │ │ -28#include │ │ │ │ -29#include │ │ │ │ -30#include │ │ │ │ -31#include │ │ │ │ -32 │ │ │ │ -33namespace _g_t_s_a_m { │ │ │ │ -34 │ │ │ │ -_3_6namespace treeTraversal { │ │ │ │ -37 │ │ │ │ -38/* ************************************************************************* │ │ │ │ -*/ │ │ │ │ -39namespace { │ │ │ │ -40// Internal node used in DFS preorder stack │ │ │ │ -41template │ │ │ │ -42struct TraversalNode { │ │ │ │ -43 bool expanded; │ │ │ │ -44 const boost::shared_ptr& treeNode; │ │ │ │ -45 DATA& parentData; │ │ │ │ -46 typename _F_a_s_t_L_i_s_t_<_D_A_T_A_>_:_:_i_t_e_r_a_t_o_r dataPointer; │ │ │ │ -47 TraversalNode(const boost::shared_ptr& _treeNode, DATA& _parentData) : │ │ │ │ -48 expanded(false), treeNode(_treeNode), parentData(_parentData) { │ │ │ │ -49 } │ │ │ │ -50}; │ │ │ │ -51 │ │ │ │ -52// Do nothing - default argument for post-visitor for tree traversal │ │ │ │ -53struct no_op { │ │ │ │ -54 template │ │ │ │ -55 void operator()(const boost::shared_ptr& node, const DATA& data) { │ │ │ │ -56 } │ │ │ │ -57}; │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +21#include <_g_t_s_a_m_/_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h> │ │ │ │ +22 │ │ │ │ +23// Change class depending on whether we are using TBB │ │ │ │ +24#ifdef GTSAM_USE_TBB │ │ │ │ +25 │ │ │ │ +26// Include TBB header │ │ │ │ +27# include │ │ │ │ +28# undef min // TBB seems to include Windows.h which defines these macros that │ │ │ │ +cause problems │ │ │ │ +29# undef max │ │ │ │ +30# undef ERROR │ │ │ │ +31 │ │ │ │ +32#include // std::hash() │ │ │ │ +33 │ │ │ │ +34// Use TBB concurrent_unordered_map for ConcurrentMap │ │ │ │ +35template │ │ │ │ +36using _C_o_n_c_u_r_r_e_n_t_M_a_p_B_a_s_e = tbb::concurrent_unordered_map< │ │ │ │ +37 KEY, │ │ │ │ +38 VALUE, │ │ │ │ +39 std::hash │ │ │ │ +40 >; │ │ │ │ +41 │ │ │ │ +42#else │ │ │ │ +43 │ │ │ │ +44// If we're not using TBB, use a FastMap for ConcurrentMap │ │ │ │ +45#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_M_a_p_._h> │ │ │ │ +46template │ │ │ │ +47using _C_o_n_c_u_r_r_e_n_t_M_a_p_B_a_s_e = _g_t_s_a_m_:_:_F_a_s_t_M_a_p_<_K_E_Y_,_ _V_A_L_U_E_>; │ │ │ │ +48 │ │ │ │ +49#endif │ │ │ │ +50 │ │ │ │ +51#include │ │ │ │ +52#include │ │ │ │ +53#include │ │ │ │ +54 │ │ │ │ +55#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_V_e_c_t_o_r_._h> │ │ │ │ +56 │ │ │ │ +57namespace _g_t_s_a_m { │ │ │ │ 58 │ │ │ │ -59} │ │ │ │ -60 │ │ │ │ -75template │ │ │ │ -_7_7void _D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t(FOREST& forest, DATA& rootData, VISITOR_PRE& │ │ │ │ -visitorPre, │ │ │ │ -78 VISITOR_POST& visitorPost) { │ │ │ │ -79 // Typedefs │ │ │ │ -80 typedef typename FOREST::Node Node; │ │ │ │ -81 typedef boost::shared_ptr sharedNode; │ │ │ │ -82 │ │ │ │ -83 // Depth first traversal stack │ │ │ │ -84 typedef TraversalNode TraversalNode; │ │ │ │ -85 typedef _F_a_s_t_L_i_s_t_<_T_r_a_v_e_r_s_a_l_N_o_d_e_> Stack; │ │ │ │ -86 Stack _s_t_a_c_k; │ │ │ │ -87 _F_a_s_t_L_i_s_t_<_D_A_T_A_> dataList; // List to store node data as it is returned from │ │ │ │ -the pre-order visitor │ │ │ │ -88 │ │ │ │ -89 // Add roots to stack (insert such that they are visited and processed in │ │ │ │ -order │ │ │ │ -90 { │ │ │ │ -91 typename Stack::iterator insertLocation = _s_t_a_c_k.begin(); │ │ │ │ -92 for(const sharedNode& root: forest.roots()) │ │ │ │ -93 _s_t_a_c_k.insert(insertLocation, TraversalNode(root, rootData)); │ │ │ │ -94 } │ │ │ │ -95 │ │ │ │ -96 // Traverse │ │ │ │ -97 while (!_s_t_a_c_k.empty()) { │ │ │ │ -98 // Get next node │ │ │ │ -99 TraversalNode& node = _s_t_a_c_k.front(); │ │ │ │ -100 │ │ │ │ -101 if (node.expanded) { │ │ │ │ -102 // If already expanded, then the data stored in the node is no longer │ │ │ │ -needed, so visit │ │ │ │ -103 // then delete it. │ │ │ │ -104 (void) visitorPost(node.treeNode, *node.dataPointer); │ │ │ │ -105 dataList.erase(node.dataPointer); │ │ │ │ -106 _s_t_a_c_k.pop_front(); │ │ │ │ -107 } else { │ │ │ │ -108 // If not already visited, visit the node and add its children (use reverse │ │ │ │ -iterators so │ │ │ │ -109 // children are processed in the order they appear) │ │ │ │ -110 node.dataPointer = dataList.insert(dataList.end(), │ │ │ │ -111 visitorPre(node.treeNode, node.parentData)); │ │ │ │ -112 typename Stack::iterator insertLocation = _s_t_a_c_k.begin(); │ │ │ │ -113 for(const sharedNode& child: node.treeNode->children) │ │ │ │ -114 _s_t_a_c_k.insert(insertLocation, TraversalNode(child, *node.dataPointer)); │ │ │ │ -115 node.expanded = true; │ │ │ │ -116 } │ │ │ │ -117 } │ │ │ │ -118 assert(dataList.empty()); │ │ │ │ -119} │ │ │ │ -120 │ │ │ │ -132template │ │ │ │ -_1_3_3void _D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t(FOREST& forest, DATA& rootData, VISITOR_PRE& │ │ │ │ -visitorPre) { │ │ │ │ -134 no_op visitorPost; │ │ │ │ -135 _D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t(forest, rootData, visitorPre, visitorPost); │ │ │ │ -136} │ │ │ │ -137 │ │ │ │ -152template │ │ │ │ -_1_5_4void _D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t_P_a_r_a_l_l_e_l(FOREST& forest, DATA& rootData, │ │ │ │ -155 VISITOR_PRE& visitorPre, VISITOR_POST& visitorPost, │ │ │ │ -156 int problemSizeThreshold = 10) { │ │ │ │ -157#ifdef GTSAM_USE_TBB │ │ │ │ -158 // Typedefs │ │ │ │ -159 typedef typename FOREST::Node Node; │ │ │ │ -160 │ │ │ │ -161 internal::CreateRootTask(forest.roots(), rootData, visitorPre, │ │ │ │ -162 visitorPost, problemSizeThreshold); │ │ │ │ -163#else │ │ │ │ -164 _D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t(forest, rootData, visitorPre, visitorPost); │ │ │ │ -165#endif │ │ │ │ -166} │ │ │ │ -167 │ │ │ │ -168/* ************************************************************************* │ │ │ │ -*/ │ │ │ │ -170namespace { │ │ │ │ -171template │ │ │ │ -172boost::shared_ptr CloneForestVisitorPre( │ │ │ │ -173 const boost::shared_ptr& node, │ │ │ │ -174 const boost::shared_ptr& parentPointer) { │ │ │ │ -175 // Clone the current node and add it to its cloned parent │ │ │ │ -176 boost::shared_ptr clone = boost::make_shared(*node); │ │ │ │ -177 clone->children.clear(); │ │ │ │ -178 parentPointer->children.push_back(clone); │ │ │ │ -179 return clone; │ │ │ │ -180} │ │ │ │ -181} │ │ │ │ -182 │ │ │ │ -188template │ │ │ │ -_1_8_9_F_a_s_t_V_e_c_t_o_r_<_b_o_o_s_t_:_:_s_h_a_r_e_d___p_t_r_<_t_y_p_e_n_a_m_e_ _F_O_R_E_S_T_:_:_N_o_d_e_> > _C_l_o_n_e_F_o_r_e_s_t( │ │ │ │ -190 const FOREST& forest) { │ │ │ │ -191 typedef typename FOREST::Node Node; │ │ │ │ -192 boost::shared_ptr rootContainer = boost::make_shared(); │ │ │ │ -193 _D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t(forest, rootContainer, CloneForestVisitorPre); │ │ │ │ -194 return _F_a_s_t_V_e_c_t_o_r_<_b_o_o_s_t_:_:_s_h_a_r_e_d___p_t_r_<_N_o_d_e_> >(rootContainer->children.begin │ │ │ │ -(), │ │ │ │ -195 rootContainer->children.end()); │ │ │ │ -196} │ │ │ │ -197 │ │ │ │ -198/* ************************************************************************* │ │ │ │ -*/ │ │ │ │ -200namespace { │ │ │ │ -201struct PrintForestVisitorPre { │ │ │ │ -202 const _K_e_y_F_o_r_m_a_t_t_e_r& formatter; │ │ │ │ -203 PrintForestVisitorPre(const _K_e_y_F_o_r_m_a_t_t_e_r& formatter) : │ │ │ │ -204 formatter(formatter) { │ │ │ │ -205 } │ │ │ │ -206 template std::string operator()( │ │ │ │ -207 const boost::shared_ptr& node, const std::string& parentString) { │ │ │ │ -208 // Print the current node │ │ │ │ -209 node->print(parentString + "-", formatter); │ │ │ │ -210 // Increment the indentation │ │ │ │ -211 return parentString + "| "; │ │ │ │ -212 } │ │ │ │ -213}; │ │ │ │ -214} │ │ │ │ -215 │ │ │ │ -218template │ │ │ │ -_2_1_9void _P_r_i_n_t_F_o_r_e_s_t(const FOREST& forest, std::string str, │ │ │ │ -220 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter) { │ │ │ │ -221 PrintForestVisitorPre visitor(keyFormatter); │ │ │ │ -222 _D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t(forest, str, visitor); │ │ │ │ -223} │ │ │ │ -224} // namespace treeTraversal │ │ │ │ -225 │ │ │ │ -226} // namespace gtsam │ │ │ │ +67template │ │ │ │ +_6_8class _C_o_n_c_u_r_r_e_n_t_M_a_p : public _C_o_n_c_u_r_r_e_n_t_M_a_p_B_a_s_e { │ │ │ │ +69 │ │ │ │ +70public: │ │ │ │ +71 │ │ │ │ +72 typedef _C_o_n_c_u_r_r_e_n_t_M_a_p_B_a_s_e_<_K_E_Y_,_V_A_L_U_E_> Base; │ │ │ │ +73 │ │ │ │ +_7_5 _C_o_n_c_u_r_r_e_n_t_M_a_p() {} │ │ │ │ +76 │ │ │ │ +78 template │ │ │ │ +_7_9 _C_o_n_c_u_r_r_e_n_t_M_a_p(INPUTITERATOR first, INPUTITERATOR last) : Base(first, last) │ │ │ │ +{} │ │ │ │ +80 │ │ │ │ +_8_2 _C_o_n_c_u_r_r_e_n_t_M_a_p(const _C_o_n_c_u_r_r_e_n_t_M_a_p_<_K_E_Y_,_V_A_L_U_E_>& x) : Base(x) {} │ │ │ │ +83 │ │ │ │ +_8_5 _C_o_n_c_u_r_r_e_n_t_M_a_p(const Base& x) : Base(x) {} │ │ │ │ +86 │ │ │ │ +_8_8 bool _e_x_i_s_t_s(const KEY& e) const { return this->count(e); } │ │ │ │ +89 │ │ │ │ +90#ifndef GTSAM_USE_TBB │ │ │ │ +91 // If we're not using TBB and this is actually a FastMap, we need to add │ │ │ │ +these functions and hide │ │ │ │ +92 // the original erase functions. │ │ │ │ +93 void unsafe_erase(typename Base::iterator position) { ((Base*)this)->erase │ │ │ │ +(position); } │ │ │ │ +94 typename Base::size_type unsafe_erase(const KEY& k) { return ((Base*)this)- │ │ │ │ +>erase(k); } │ │ │ │ +95 void unsafe_erase(typename Base::iterator first, typename Base::iterator │ │ │ │ +last) { │ │ │ │ +96 return ((Base*)this)->erase(first, last); } │ │ │ │ +97private: │ │ │ │ +98 void erase() {} │ │ │ │ +99public: │ │ │ │ +100#endif │ │ │ │ +101 │ │ │ │ +102private: │ │ │ │ +_1_0_4 friend class _b_o_o_s_t_:_:_s_e_r_i_a_l_i_z_a_t_i_o_n_:_:_a_c_c_e_s_s; │ │ │ │ +105 template │ │ │ │ +106 void save(Archive& ar, const unsigned int /*version*/) const │ │ │ │ +107 { │ │ │ │ +108 // Copy to an STL container and serialize that │ │ │ │ +109 _F_a_s_t_V_e_c_t_o_r_<_s_t_d_:_:_p_a_i_r_<_K_E_Y_,_ _V_A_L_U_E_> > map(this->size()); │ │ │ │ +110 std::copy(this->begin(), this->end(), map.begin()); │ │ │ │ +111 ar & BOOST_SERIALIZATION_NVP(map); │ │ │ │ +112 } │ │ │ │ +113 template │ │ │ │ +114 void load(Archive& ar, const unsigned int /*version*/) │ │ │ │ +115 { │ │ │ │ +116 this->clear(); │ │ │ │ +117 // Load into STL container and then fill our map │ │ │ │ +118 _F_a_s_t_V_e_c_t_o_r_<_s_t_d_:_:_p_a_i_r_<_K_E_Y_,_ _V_A_L_U_E_> > map; │ │ │ │ +119 ar & BOOST_SERIALIZATION_NVP(map); │ │ │ │ +120 this->insert(map.begin(), map.end()); │ │ │ │ +121 } │ │ │ │ +122 BOOST_SERIALIZATION_SPLIT_MEMBER() │ │ │ │ +123}; │ │ │ │ +124 │ │ │ │ +125} │ │ │ │ +_F_a_s_t_M_a_p_._h │ │ │ │ +A thin wrapper around std::map that uses boost's fast_pool_allocator. │ │ │ │ _F_a_s_t_V_e_c_t_o_r_._h │ │ │ │ A thin wrapper around std::vector that uses a custom allocator. │ │ │ │ -_F_a_s_t_L_i_s_t_._h │ │ │ │ -A thin wrapper around std::list that uses boost's fast_pool_allocator. │ │ │ │ -_K_e_y_._h │ │ │ │ +_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h │ │ │ │ +Included from all GTSAM files. │ │ │ │ _g_t_s_a_m_:_:_F_a_s_t_V_e_c_t_o_r │ │ │ │ std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > │ │ │ │ FastVector │ │ │ │ FastVector is a type alias to a std::vector with a custom memory allocator. │ │ │ │ DDeeffiinniittiioonn FastVector.h:34 │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_s_t_a_c_k │ │ │ │ -Matrix stack(size_t nrMatrices,...) │ │ │ │ -create a matrix by stacking other matrices Given a set of matrices: A1, A2, │ │ │ │ -A3... │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:397 │ │ │ │ -_g_t_s_a_m_:_:_K_e_y_F_o_r_m_a_t_t_e_r │ │ │ │ -std::function< std::string(Key)> KeyFormatter │ │ │ │ -Typedef for a function to format a key, i.e. to convert it to a string. │ │ │ │ -DDeeffiinniittiioonn Key.h:35 │ │ │ │ -_g_t_s_a_m_:_:_t_r_e_e_T_r_a_v_e_r_s_a_l_:_:_D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t │ │ │ │ -void DepthFirstForest(FOREST &forest, DATA &rootData, VISITOR_PRE &visitorPre, │ │ │ │ -VISITOR_POST &visitorPost) │ │ │ │ -Traverse a forest depth-first with pre-order and post-order visits. │ │ │ │ -DDeeffiinniittiioonn treeTraversal-inst.h:77 │ │ │ │ -_g_t_s_a_m_:_:_t_r_e_e_T_r_a_v_e_r_s_a_l_:_:_C_l_o_n_e_F_o_r_e_s_t │ │ │ │ -FastVector< boost::shared_ptr< typename FOREST::Node > > CloneForest(const │ │ │ │ -FOREST &forest) │ │ │ │ -Clone a tree, copy-constructing new nodes (calling boost::make_shared) and │ │ │ │ -setting up child pointers ... │ │ │ │ -DDeeffiinniittiioonn treeTraversal-inst.h:189 │ │ │ │ -_g_t_s_a_m_:_:_t_r_e_e_T_r_a_v_e_r_s_a_l_:_:_P_r_i_n_t_F_o_r_e_s_t │ │ │ │ -void PrintForest(const FOREST &forest, std::string str, const KeyFormatter │ │ │ │ -&keyFormatter) │ │ │ │ -Print a tree, prefixing each line with str, and formatting keys using │ │ │ │ -keyFormatter. │ │ │ │ -DDeeffiinniittiioonn treeTraversal-inst.h:219 │ │ │ │ -_g_t_s_a_m_:_:_t_r_e_e_T_r_a_v_e_r_s_a_l_:_:_D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t_P_a_r_a_l_l_e_l │ │ │ │ -void DepthFirstForestParallel(FOREST &forest, DATA &rootData, VISITOR_PRE │ │ │ │ -&visitorPre, VISITOR_POST &visitorPost, int problemSizeThreshold=10) │ │ │ │ -Traverse a forest depth-first with pre-order and post-order visits. │ │ │ │ -DDeeffiinniittiioonn treeTraversal-inst.h:154 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_L_i_s_t │ │ │ │ -FastList is a thin wrapper around std::list that uses the boost │ │ │ │ -fast_pool_allocator instead of the de... │ │ │ │ -DDeeffiinniittiioonn FastList.h:40 │ │ │ │ +_g_t_s_a_m_:_:_C_o_n_c_u_r_r_e_n_t_M_a_p │ │ │ │ +FastMap is a thin wrapper around std::map that uses the boost │ │ │ │ +fast_pool_allocator instead of the defa... │ │ │ │ +DDeeffiinniittiioonn ConcurrentMap.h:68 │ │ │ │ +_g_t_s_a_m_:_:_C_o_n_c_u_r_r_e_n_t_M_a_p_:_:_C_o_n_c_u_r_r_e_n_t_M_a_p │ │ │ │ +ConcurrentMap(INPUTITERATOR first, INPUTITERATOR last) │ │ │ │ +Constructor from a range, passes through to base class. │ │ │ │ +DDeeffiinniittiioonn ConcurrentMap.h:79 │ │ │ │ +_g_t_s_a_m_:_:_C_o_n_c_u_r_r_e_n_t_M_a_p_:_:_C_o_n_c_u_r_r_e_n_t_M_a_p │ │ │ │ +ConcurrentMap(const ConcurrentMap< KEY, VALUE > &x) │ │ │ │ +Copy constructor from another ConcurrentMap. │ │ │ │ +DDeeffiinniittiioonn ConcurrentMap.h:82 │ │ │ │ +_g_t_s_a_m_:_:_C_o_n_c_u_r_r_e_n_t_M_a_p_:_:_e_x_i_s_t_s │ │ │ │ +bool exists(const KEY &e) const │ │ │ │ +Handy 'exists' function. │ │ │ │ +DDeeffiinniittiioonn ConcurrentMap.h:88 │ │ │ │ +_g_t_s_a_m_:_:_C_o_n_c_u_r_r_e_n_t_M_a_p_:_:_C_o_n_c_u_r_r_e_n_t_M_a_p │ │ │ │ +ConcurrentMap(const Base &x) │ │ │ │ +Copy constructor from the base map class. │ │ │ │ +DDeeffiinniittiioonn ConcurrentMap.h:85 │ │ │ │ +_g_t_s_a_m_:_:_C_o_n_c_u_r_r_e_n_t_M_a_p_:_:_C_o_n_c_u_r_r_e_n_t_M_a_p │ │ │ │ +ConcurrentMap() │ │ │ │ +Default constructor. │ │ │ │ +DDeeffiinniittiioonn ConcurrentMap.h:75 │ │ │ │ +_g_t_s_a_m_:_:_C_o_n_c_u_r_r_e_n_t_M_a_p_:_:_a_c_c_e_s_s │ │ │ │ +friend class boost::serialization::access │ │ │ │ +Serialization function. │ │ │ │ +DDeeffiinniittiioonn ConcurrentMap.h:104 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_M_a_p │ │ │ │ +FastMap is a thin wrapper around std::map that uses the boost │ │ │ │ +fast_pool_allocator instead of the defa... │ │ │ │ +DDeeffiinniittiioonn FastMap.h:38 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _t_r_e_e_T_r_a_v_e_r_s_a_l_-_i_n_s_t_._h │ │ │ │ + * CCoonnccuurrrreennttMMaapp..hh │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00017.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/timing.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/lieProxies.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,212 +94,64 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Macros | │ │ │ -Functions | │ │ │ -Variables
│ │ │ -
timing.h File Reference
│ │ │ +Functions
│ │ │ +
lieProxies.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Timing utilities. │ │ │ +

Provides convenient mappings of common member functions for testing. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  gtsam::internal::TimingOutline
 Timing Entry, arranged in a tree. More...
 
class  gtsam::internal::AutoTicToc
 Small class that calls internal::tic at construction, and internol::toc when destroyed. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Macros

#define gttic_(label)
 
│ │ │ -#define gttoc_(label)    label##_obj.stop()
 
#define longtic_(label)
 
#define longtoc_(label)
 
#define tictoc_getNode(variable, label)
 
│ │ │ -#define gttic(label)   ((void)0)
 
│ │ │ -#define gttoc(label)   ((void)0)
 
│ │ │ -#define longtic(label)   ((void)0)
 
│ │ │ -#define longtoc(label)   ((void)0)
 
│ │ │ -#define tictoc_finishedIteration()   ((void)0)
 
│ │ │ -#define tictoc_print()   ((void)0)
 
│ │ │ -#define tictoc_reset()   ((void)0)
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ Functions

│ │ │ -size_t gtsam::internal::getTicTocID (const char *descriptionC)
 
│ │ │ -void gtsam::internal::tic (size_t id, const char *labelC)
 
│ │ │ -void gtsam::internal::toc (size_t id, const char *label)
 
│ │ │ -void gtsam::tictoc_finishedIteration_ ()
 
│ │ │ -void gtsam::tictoc_print_ ()
 
│ │ │ -void gtsam::tictoc_print2_ ()
 
│ │ │ -void gtsam::tictoc_reset_ ()
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ -Variables

│ │ │ -GTSAM_EXTERN_EXPORT boost::shared_ptr< TimingOutlinegtsam::internal::gTimingRoot
 
│ │ │ -GTSAM_EXTERN_EXPORT boost::weak_ptr< TimingOutlinegtsam::internal::gCurrentTimer
 
│ │ │ +template<class T >
gtsam::testing::between (const T &t1, const T &t2)
 binary functions
 
│ │ │ +template<class T >
gtsam::testing::compose (const T &t1, const T &t2)
 
│ │ │ +template<class T >
gtsam::testing::inverse (const T &t)
 unary functions
 
│ │ │ +template<class T , class P >
gtsam::testing::rotate (const T &r, const P &pt)
 rotation functions
 
│ │ │ +template<class T , class P >
gtsam::testing::unrotate (const T &r, const P &pt)
 
│ │ │

Detailed Description

│ │ │ -

Timing utilities.

│ │ │ -
Author
Richard Roberts, Michael Kaess
│ │ │ -
Date
Oct 5, 2010
│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ gttic_

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define gttic_( label)
│ │ │ -
│ │ │ -Value:
static const size_t label##_id_tic = ::gtsam::internal::getTicTocID(#label); \
│ │ │ -
::gtsam::internal::AutoTicToc label##_obj(label##_id_tic, #label)
│ │ │ -
Small class that calls internal::tic at construction, and internol::toc when destroyed.
Definition timing.h:199
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ - │ │ │ -

◆ longtic_

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define longtic_( label)
│ │ │ -
│ │ │ -Value:
static const size_t label##_id_tic = ::gtsam::internal::getTicTocID(#label); \
│ │ │ -
::gtsam::internal::ticInternal(label##_id_tic, #label)
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ - │ │ │ -

◆ longtoc_

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define longtoc_( label)
│ │ │ -
│ │ │ -Value:
static const size_t label##_id_toc = ::gtsam::internal::getTicTocID(#label); \
│ │ │ -
::gtsam::internal::tocInternal(label##_id_toc, #label)
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ - │ │ │ -

◆ tictoc_getNode

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define tictoc_getNode( variable,
 label 
)
│ │ │ -
│ │ │ -Value:
static const size_t label##_id_getnode = ::gtsam::internal::getTicTocID(#label); \
│ │ │ -
const boost::shared_ptr<const ::gtsam::internal::TimingOutline> variable = \
│ │ │ -
::gtsam::internal::gCurrentTimer.lock()->child(label##_id_getnode, #label, ::gtsam::internal::gCurrentTimer);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +

Provides convenient mappings of common member functions for testing.

│ │ │ +
Author
Alex Cunningham
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,108 +1,40 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ -timing.h File Reference │ │ │ │ -Timing utilities. _M_o_r_e_._._. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +lieProxies.h File Reference │ │ │ │ +Provides convenient mappings of common member functions for testing. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e │ │ │ │ -  Timing Entry, arranged in a tree. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_A_u_t_o_T_i_c_T_o_c │ │ │ │ -  Small class that calls internal::tic at construction, and internol::toc │ │ │ │ - when destroyed. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  _g_t_t_i_c__(label) │ │ │ │ -  │ │ │ │ -#define  ggttttoocc__(label)    label##_obj.stop() │ │ │ │ -  │ │ │ │ -#define  _l_o_n_g_t_i_c__(label) │ │ │ │ -  │ │ │ │ -#define  _l_o_n_g_t_o_c__(label) │ │ │ │ -  │ │ │ │ -#define  _t_i_c_t_o_c___g_e_t_N_o_d_e(variable, label) │ │ │ │ -  │ │ │ │ -#define  ggttttiicc(label)   ((void)0) │ │ │ │ -  │ │ │ │ -#define  ggttttoocc(label)   ((void)0) │ │ │ │ -  │ │ │ │ -#define  lloonnggttiicc(label)   ((void)0) │ │ │ │ -  │ │ │ │ -#define  lloonnggttoocc(label)   ((void)0) │ │ │ │ -  │ │ │ │ -#define  ttiiccttoocc__ffiinniisshheeddIItteerraattiioonn()   ((void)0) │ │ │ │ -  │ │ │ │ -#define  ttiiccttoocc__pprriinntt()   ((void)0) │ │ │ │ -  │ │ │ │ -#define  ttiiccttoocc__rreesseett()   ((void)0) │ │ │ │ -  │ │ │ │ FFuunnccttiioonnss │ │ │ │ -size_t  ggttssaamm::::iinntteerrnnaall::::ggeettTTiiccTTooccIIDD (const char *descriptionC) │ │ │ │ -  │ │ │ │ - void  ggttssaamm::::iinntteerrnnaall::::ttiicc (size_t id, const char *labelC) │ │ │ │ -  │ │ │ │ - void  ggttssaamm::::iinntteerrnnaall::::ttoocc (size_t id, const char *label) │ │ │ │ -  │ │ │ │ - void  ggttssaamm::::ttiiccttoocc__ffiinniisshheeddIItteerraattiioonn__ () │ │ │ │ -  │ │ │ │ - void  ggttssaamm::::ttiiccttoocc__pprriinntt__ () │ │ │ │ -  │ │ │ │ - void  ggttssaamm::::ttiiccttoocc__pprriinntt22__ () │ │ │ │ -  │ │ │ │ - void  ggttssaamm::::ttiiccttoocc__rreesseett__ () │ │ │ │ -  │ │ │ │ -VVaarriiaabblleess │ │ │ │ -GTSAM_EXTERN_EXPORT boost::shared_ptr< │ │ │ │ - _T_i_m_i_n_g_O_u_t_l_i_n_e >  ggttssaamm::::iinntteerrnnaall::::ggTTiimmiinnggRRoooott │ │ │ │ +template │ │ │ │ +T  ggttssaamm::::tteessttiinngg::::bbeettwweeeenn (const T &t1, const T &t2) │ │ │ │ +  binary functions │ │ │ │ +  │ │ │ │ +template │ │ │ │ +T  ggttssaamm::::tteessttiinngg::::ccoommppoossee (const T &t1, const T &t2) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +T  ggttssaamm::::tteessttiinngg::::iinnvveerrssee (const T &t) │ │ │ │ +  unary functions │ │ │ │ +  │ │ │ │ +template │ │ │ │ +P  ggttssaamm::::tteessttiinngg::::rroottaattee (const T &r, const P &pt) │ │ │ │ +  rotation functions │ │ │ │   │ │ │ │ - GTSAM_EXTERN_EXPORT boost::weak_ptr< │ │ │ │ - _T_i_m_i_n_g_O_u_t_l_i_n_e >  ggttssaamm::::iinntteerrnnaall::::ggCCuurrrreennttTTiimmeerr │ │ │ │ +template │ │ │ │ +P  ggttssaamm::::tteessttiinngg::::uunnrroottaattee (const T &r, const P &pt) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Timing utilities. │ │ │ │ +Provides convenient mappings of common member functions for testing. │ │ │ │ Author │ │ │ │ - Richard Roberts, Michael Kaess │ │ │ │ - Date │ │ │ │ - Oct 5, 2010 │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? ggttttiicc__ ********** │ │ │ │ -#define gttic_ (   label ) │ │ │ │ -VVaalluuee:: │ │ │ │ -static const size_t label##_id_tic = ::gtsam::internal::getTicTocID(#label); \ │ │ │ │ -_:_:_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_A_u_t_o_T_i_c_T_o_c label##_obj(label##_id_tic, #label) │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_A_u_t_o_T_i_c_T_o_c │ │ │ │ -Small class that calls internal::tic at construction, and internol::toc when │ │ │ │ -destroyed. │ │ │ │ -DDeeffiinniittiioonn timing.h:199 │ │ │ │ -********** _?◆_? lloonnggttiicc__ ********** │ │ │ │ -#define longtic_ (   label ) │ │ │ │ -VVaalluuee:: │ │ │ │ -static const size_t label##_id_tic = ::gtsam::internal::getTicTocID(#label); \ │ │ │ │ -::gtsam::internal::ticInternal(label##_id_tic, #label) │ │ │ │ -********** _?◆_? lloonnggttoocc__ ********** │ │ │ │ -#define longtoc_ (   label ) │ │ │ │ -VVaalluuee:: │ │ │ │ -static const size_t label##_id_toc = ::gtsam::internal::getTicTocID(#label); \ │ │ │ │ -::gtsam::internal::tocInternal(label##_id_toc, #label) │ │ │ │ -********** _?◆_? ttiiccttoocc__ggeettNNooddee ********** │ │ │ │ -#define tictoc_getNode (   variable, │ │ │ │ -   label  │ │ │ │ - ) │ │ │ │ -VVaalluuee:: │ │ │ │ -static const size_t label##_id_getnode = ::gtsam::internal::getTicTocID │ │ │ │ -(#label); \ │ │ │ │ -const boost::shared_ptr variable = \ │ │ │ │ -::gtsam::internal::gCurrentTimer.lock()->child(label##_id_getnode, #label, :: │ │ │ │ -gtsam::internal::gCurrentTimer); │ │ │ │ + Alex Cunningham │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _t_i_m_i_n_g_._h │ │ │ │ + * _l_i_e_P_r_o_x_i_e_s_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00017.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,5 @@ │ │ │ │ var a00017 = [ │ │ │ │ - ["gtsam::internal::TimingOutline", "a02516.html", "a02516"], │ │ │ │ - ["gtsam::internal::AutoTicToc", "a02520.html", null] │ │ │ │ + ["between", "a00017.html#a72a7c561cc91f437a22023297fb7f658", null], │ │ │ │ + ["inverse", "a00017.html#aaa623dd059a67523b029af6ec20a38da", null], │ │ │ │ + ["rotate", "a00017.html#a644bbe6719d8dd756e11e8b3d2fd229a", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00017_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/timing.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/lieProxies.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,15 +98,15 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
timing.h
│ │ │ +
lieProxies.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │ @@ -114,312 +114,47 @@ │ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │
18#pragma once
│ │ │
19
│ │ │ -
20#include <gtsam/base/FastMap.h>
│ │ │ -
21#include <gtsam/dllexport.h>
│ │ │ -
22#include <gtsam/config.h> // for GTSAM_USE_TBB
│ │ │ -
23
│ │ │ -
24#include <boost/smart_ptr/shared_ptr.hpp>
│ │ │ -
25#include <boost/smart_ptr/weak_ptr.hpp>
│ │ │ -
26#include <boost/version.hpp>
│ │ │ -
27
│ │ │ -
28#include <cstddef>
│ │ │ -
29#include <string>
│ │ │ -
30
│ │ │ -
31// This file contains the GTSAM timing instrumentation library, a low-overhead method for
│ │ │ -
32// learning at a medium-fine level how much time various components of an algorithm take
│ │ │ -
33// in CPU and wall time.
│ │ │ -
34//
│ │ │ -
35// The output of this instrumentation is a call-tree-like printout containing statistics
│ │ │ -
36// about each instrumented code block. To print this output at any time, call
│ │ │ -
37// tictoc_print() or tictoc_print_().
│ │ │ -
38//
│ │ │ -
39// An overall point to be aware of is that there are two versions of each function - one
│ │ │ -
40// ending in an underscore '_' and one without the trailing underscore. The underscore
│ │ │ -
41// versions always are active, but the versions without an underscore are active only when
│ │ │ -
42// GTSAM_ENABLE_TIMING is defined (automatically defined in our CMake Timing build type).
│ │ │ -
43// GTSAM algorithms are all instrumented with the non-underscore versions, so generally
│ │ │ -
44// you should use the underscore versions in your own code to leave out the GTSAM detail.
│ │ │ -
45//
│ │ │ -
46// gttic and gttoc start and stop a timed section, respectively. gttic creates a *scoped*
│ │ │ -
47// object - when it goes out of scope gttoc is called automatically. Thus, you do not
│ │ │ -
48// need to call gttoc if you are timing an entire function (see basic use examples below).
│ │ │ -
49// However, you must be *aware* of this scoped nature - putting gttic inside of an if(...)
│ │ │ -
50// block, for example, will only time code until the closing brace '}'. See advanced
│ │ │ -
51// usage below if you need to avoid this.
│ │ │ -
52//
│ │ │ -
53// Multiple calls nest automatically - each gttic nests under the previous gttic called
│ │ │ -
54// for which gttoc has not been called (or the previous gttic did not go out of scope).
│ │ │ -
55//
│ │ │ -
56// Basic usage examples are as follows:
│ │ │ -
57//
│ │ │ -
58// - Timing an entire function:
│ │ │ -
59// void myFunction() {
│ │ │ -
60// gttic_(myFunction);
│ │ │ -
61// ........
│ │ │ -
62// }
│ │ │ -
63//
│ │ │ -
64// - Timing an entire function as well as its component parts:
│ │ │ -
65// void myLongFunction() {
│ │ │ -
66// gttic_(myLongFunction);
│ │ │ -
67// gttic_(step1); // Will nest under the 'myLongFunction' label
│ │ │ -
68// ........
│ │ │ -
69// gttoc_(step1);
│ │ │ -
70// gttic_(step2); // Will nest under the 'myLongFunction' label
│ │ │ -
71// ........
│ │ │ -
72// gttoc_(step2);
│ │ │ -
73// ........
│ │ │ -
74// }
│ │ │ -
75//
│ │ │ -
76// - Timing functions calling/called by other functions:
│ │ │ -
77// void oneStep() {
│ │ │ -
78// gttic_(oneStep); // Will automatically nest under the gttic label of the calling function
│ │ │ -
79// .......
│ │ │ -
80// }
│ │ │ -
81// void algorithm() {
│ │ │ -
82// gttic_(algorithm);
│ │ │ -
83// oneStep(); // gttic's inside this function will automatically nest inside our 'algorithm' label
│ │ │ -
84// twoStep(); // gttic's inside this function will automatically nest inside our 'algorithm' label
│ │ │ -
85// }
│ │ │ -
86//
│ │ │ -
87//
│ │ │ -
88// Advanced usage:
│ │ │ -
89//
│ │ │ -
90// - "Finishing iterations" - to get correct min/max times for each call, you must define
│ │ │ -
91// in your code what constitutes an iteration. A single sum for the min/max times is
│ │ │ -
92// accumulated within each iteration. If you don't care about min/max times, you don't
│ │ │ -
93// need to worry about this. For example:
│ │ │ -
94// void myOuterLoop() {
│ │ │ -
95// while(true) {
│ │ │ -
96// iterateMyAlgorithm();
│ │ │ -
97// tictoc_finishedIteration_();
│ │ │ -
98// tictoc_print_(); // Optional
│ │ │ -
99// }
│ │ │ -
100// }
│ │ │ -
101//
│ │ │ -
102// - Stopping timing a section in a different scope than it is started. Normally, a gttoc
│ │ │ -
103// statement goes out of scope at end of C++ scope. However, you can use longtic and
│ │ │ -
104// longtoc to start and stop timing with the specified label at any point, without regard
│ │ │ -
105// too scope. Note that if you use these, it may become difficult to ensure that you
│ │ │ -
106// have matching gttic/gttoc statments. You may want to consider reorganizing your timing
│ │ │ -
107// outline to match the scope of your code.
│ │ │ -
108
│ │ │ -
109// Automatically use the new Boost timers if version is recent enough.
│ │ │ -
110#if BOOST_VERSION >= 104800
│ │ │ -
111# ifndef GTSAM_DISABLE_NEW_TIMERS
│ │ │ -
112# define GTSAM_USING_NEW_BOOST_TIMERS
│ │ │ -
113# endif
│ │ │ -
114#endif
│ │ │ -
115
│ │ │ -
116#ifdef GTSAM_USING_NEW_BOOST_TIMERS
│ │ │ -
117# include <boost/timer/timer.hpp>
│ │ │ -
118#else
│ │ │ -
119# include <boost/timer.hpp>
│ │ │ -
120# include <gtsam/base/types.h>
│ │ │ -
121#endif
│ │ │ -
122
│ │ │ -
123#ifdef GTSAM_USE_TBB
│ │ │ -
124# include <tbb/tick_count.h>
│ │ │ -
125# undef min
│ │ │ -
126# undef max
│ │ │ -
127# undef ERROR
│ │ │ -
128#endif
│ │ │ -
129
│ │ │ -
130namespace gtsam {
│ │ │ -
131
│ │ │ -
132 namespace internal {
│ │ │ -
133 // Generate/retrieve a unique global ID number that will be used to look up tic/toc statements
│ │ │ -
134 GTSAM_EXPORT size_t getTicTocID(const char *description);
│ │ │ -
135
│ │ │ -
136 // Create new TimingOutline child for gCurrentTimer, make it gCurrentTimer, and call tic method
│ │ │ -
137 GTSAM_EXPORT void tic(size_t id, const char *label);
│ │ │ -
138
│ │ │ -
139 // Call toc on gCurrentTimer and then set gCurrentTimer to the parent of gCurrentTimer
│ │ │ -
140 GTSAM_EXPORT void toc(size_t id, const char *label);
│ │ │ -
141
│ │ │ -
│ │ │ - │ │ │ -
146 protected:
│ │ │ -
147 size_t id_;
│ │ │ -
148 size_t t_;
│ │ │ -
149 size_t tWall_;
│ │ │ -
150 double t2_ ;
│ │ │ -
151 size_t tIt_;
│ │ │ -
152 size_t tMax_;
│ │ │ -
153 size_t tMin_;
│ │ │ -
154 size_t n_;
│ │ │ -
155 size_t myOrder_;
│ │ │ -
156 size_t lastChildOrder_;
│ │ │ -
157 std::string label_;
│ │ │ -
158
│ │ │ -
159 // Tree structure
│ │ │ -
160 boost::weak_ptr<TimingOutline> parent_;
│ │ │ - │ │ │ - │ │ │ -
163
│ │ │ -
164#ifdef GTSAM_USING_NEW_BOOST_TIMERS
│ │ │ -
165 boost::timer::cpu_timer timer_;
│ │ │ -
166#else
│ │ │ -
167 boost::timer timer_;
│ │ │ - │ │ │ -
169#endif
│ │ │ -
170#ifdef GTSAM_USE_TBB
│ │ │ -
171 tbb::tick_count tbbTimer_;
│ │ │ -
172#endif
│ │ │ -
173 void add(size_t usecs, size_t usecsWall);
│ │ │ -
174
│ │ │ -
175 public:
│ │ │ -
177 GTSAM_EXPORT TimingOutline(const std::string& label, size_t myId);
│ │ │ -
178 GTSAM_EXPORT size_t time() const;
│ │ │ -
179 double secs() const { return double(time()) / 1000000.0;}
│ │ │ -
│ │ │ -
180 double self() const { return double(t_) / 1000000.0;}
│ │ │ -
│ │ │ -
181 double wall() const { return double(tWall_) / 1000000.0;}
│ │ │ -
│ │ │ -
182 double min() const { return double(tMin_) / 1000000.0;}
│ │ │ -
│ │ │ -
183 double max() const { return double(tMax_) / 1000000.0;}
│ │ │ -
│ │ │ -
184 double mean() const { return self() / double(n_); }
│ │ │ -
185 GTSAM_EXPORT void print(const std::string& outline = "") const;
│ │ │ -
186 GTSAM_EXPORT void print2(const std::string& outline = "", const double parentTotal = -1.0) const;
│ │ │ -
187 GTSAM_EXPORT const boost::shared_ptr<TimingOutline>&
│ │ │ -
188 child(size_t child, const std::string& label, const boost::weak_ptr<TimingOutline>& thisPtr);
│ │ │ -
189 GTSAM_EXPORT void tic();
│ │ │ -
190 GTSAM_EXPORT void toc();
│ │ │ -
191 GTSAM_EXPORT void finishedIteration();
│ │ │ -
192
│ │ │ -
193 GTSAM_EXPORT friend void toc(size_t id, const char *label);
│ │ │ -
194 }; // \TimingOutline
│ │ │ -
195
│ │ │ -
│ │ │ -
199 class GTSAM_EXPORT AutoTicToc {
│ │ │ -
200 private:
│ │ │ -
201 size_t id_;
│ │ │ -
202 const char* label_;
│ │ │ -
203 bool isSet_;
│ │ │ -
204
│ │ │ -
205 public:
│ │ │ -
206 AutoTicToc(size_t id, const char* label)
│ │ │ -
207 : id_(id), label_(label), isSet_(true) {
│ │ │ -
208 tic(id_, label_);
│ │ │ -
209 }
│ │ │ -
210 void stop() {
│ │ │ -
211 toc(id_, label_);
│ │ │ -
212 isSet_ = false;
│ │ │ -
213 }
│ │ │ -
214 ~AutoTicToc() {
│ │ │ -
215 if (isSet_) stop();
│ │ │ -
216 }
│ │ │ -
217 };
│ │ │ -
│ │ │ -
218
│ │ │ -
219 GTSAM_EXTERN_EXPORT boost::shared_ptr<TimingOutline> gTimingRoot;
│ │ │ -
220 GTSAM_EXTERN_EXPORT boost::weak_ptr<TimingOutline> gCurrentTimer;
│ │ │ -
221 }
│ │ │ -
222
│ │ │ -
223// Tic and toc functions that are always active (whether or not ENABLE_TIMING is defined)
│ │ │ -
224// There is a trick being used here to achieve near-zero runtime overhead, in that a
│ │ │ -
225// static variable is created for each tic/toc statement storing an integer ID, but the
│ │ │ -
226// integer ID is only looked up by string once when the static variable is initialized
│ │ │ -
227// as the program starts.
│ │ │ -
228
│ │ │ -
229// tic
│ │ │ -
230#define gttic_(label) \
│ │ │ -
231 static const size_t label##_id_tic = ::gtsam::internal::getTicTocID(#label); \
│ │ │ -
232 ::gtsam::internal::AutoTicToc label##_obj(label##_id_tic, #label)
│ │ │ -
233
│ │ │ -
234// toc
│ │ │ -
235#define gttoc_(label) \
│ │ │ -
236 label##_obj.stop()
│ │ │ -
237
│ │ │ -
238// tic
│ │ │ -
239#define longtic_(label) \
│ │ │ -
240 static const size_t label##_id_tic = ::gtsam::internal::getTicTocID(#label); \
│ │ │ -
241 ::gtsam::internal::ticInternal(label##_id_tic, #label)
│ │ │ -
242
│ │ │ -
243// toc
│ │ │ -
244#define longtoc_(label) \
│ │ │ -
245 static const size_t label##_id_toc = ::gtsam::internal::getTicTocID(#label); \
│ │ │ -
246 ::gtsam::internal::tocInternal(label##_id_toc, #label)
│ │ │ -
247
│ │ │ -
248// indicate iteration is finished
│ │ │ -
249inline void tictoc_finishedIteration_() {
│ │ │ -
250 ::gtsam::internal::gTimingRoot->finishedIteration(); }
│ │ │ -
251
│ │ │ -
252// print
│ │ │ -
253inline void tictoc_print_() {
│ │ │ -
254 ::gtsam::internal::gTimingRoot->print(); }
│ │ │ -
255
│ │ │ -
256// print mean and standard deviation
│ │ │ -
257inline void tictoc_print2_() {
│ │ │ -
258 ::gtsam::internal::gTimingRoot->print2(); }
│ │ │ -
259
│ │ │ -
260// get a node by label and assign it to variable
│ │ │ -
261#define tictoc_getNode(variable, label) \
│ │ │ -
262 static const size_t label##_id_getnode = ::gtsam::internal::getTicTocID(#label); \
│ │ │ -
263 const boost::shared_ptr<const ::gtsam::internal::TimingOutline> variable = \
│ │ │ -
264 ::gtsam::internal::gCurrentTimer.lock()->child(label##_id_getnode, #label, ::gtsam::internal::gCurrentTimer);
│ │ │ -
265
│ │ │ -
266// reset
│ │ │ -
267inline void tictoc_reset_() {
│ │ │ -
268 ::gtsam::internal::gTimingRoot.reset(new ::gtsam::internal::TimingOutline("Total", ::gtsam::internal::getTicTocID("Total")));
│ │ │ -
269 ::gtsam::internal::gCurrentTimer = ::gtsam::internal::gTimingRoot; }
│ │ │ -
270
│ │ │ -
271#ifdef ENABLE_TIMING
│ │ │ -
272#define gttic(label) gttic_(label)
│ │ │ -
273#define gttoc(label) gttoc_(label)
│ │ │ -
274#define longtic(label) longtic_(label)
│ │ │ -
275#define longtoc(label) longtoc_(label)
│ │ │ -
276#define tictoc_finishedIteration tictoc_finishedIteration_
│ │ │ -
277#define tictoc_print tictoc_print_
│ │ │ -
278#define tictoc_reset tictoc_reset_
│ │ │ -
279#else
│ │ │ -
280#define gttic(label) ((void)0)
│ │ │ -
281#define gttoc(label) ((void)0)
│ │ │ -
282#define longtic(label) ((void)0)
│ │ │ -
283#define longtoc(label) ((void)0)
│ │ │ -
284#define tictoc_finishedIteration() ((void)0)
│ │ │ -
285#define tictoc_print() ((void)0)
│ │ │ -
286#define tictoc_reset() ((void)0)
│ │ │ -
287#endif
│ │ │ -
288
│ │ │ -
289}
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
Typedefs for easier changing of types.
│ │ │ -
A thin wrapper around std::map that uses boost's fast_pool_allocator.
│ │ │ + │ │ │ +
21
│ │ │ +
31namespace gtsam {
│ │ │ +
32namespace testing {
│ │ │ +
33
│ │ │ +
35 template<class T>
│ │ │ +
36 T between(const T& t1, const T& t2) { return t1.between(t2); }
│ │ │ +
37
│ │ │ +
38 template<class T>
│ │ │ +
39 T compose(const T& t1, const T& t2) { return t1.compose(t2); }
│ │ │ +
40
│ │ │ +
42 template<class T>
│ │ │ +
43 T inverse(const T& t) { return t.inverse(); }
│ │ │ +
44
│ │ │ +
46 template<class T, class P>
│ │ │ +
47 P rotate(const T& r, const P& pt) { return r.rotate(pt); }
│ │ │ +
48
│ │ │ +
49 template<class T, class P>
│ │ │ +
50 P unrotate(const T& r, const P& pt) { return r.unrotate(pt); }
│ │ │ +
51
│ │ │ +
52} // \namespace testing
│ │ │ +
53} // \namespace gtsam
│ │ │ +
54
│ │ │ +
55
│ │ │ +
P rotate(const T &r, const P &pt)
rotation functions
Definition lieProxies.h:47
│ │ │ +
T between(const T &t1, const T &t2)
binary functions
Definition lieProxies.h:36
│ │ │ +
T inverse(const T &t)
unary functions
Definition lieProxies.h:43
│ │ │ +
Included from all GTSAM files.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
FastMap is a thin wrapper around std::map that uses the boost fast_pool_allocator instead of the defa...
Definition FastMap.h:38
│ │ │ -
Timing Entry, arranged in a tree.
Definition timing.h:145
│ │ │ -
double t2_
cache the
Definition timing.h:150
│ │ │ -
ChildMap children_
subtrees
Definition timing.h:162
│ │ │ -
double max() const
max time, in seconds
Definition timing.h:183
│ │ │ -
double wall() const
wall time, in seconds
Definition timing.h:181
│ │ │ -
double secs() const
time taken, in seconds, including children
Definition timing.h:179
│ │ │ -
double self() const
self time only, in seconds
Definition timing.h:180
│ │ │ -
boost::weak_ptr< TimingOutline > parent_
parent pointer
Definition timing.h:160
│ │ │ -
double min() const
min time, in seconds
Definition timing.h:182
│ │ │ -
double mean() const
mean self time, in seconds
Definition timing.h:184
│ │ │ -
GTSAM_EXPORT size_t time() const
time taken, including children
Definition timing.cpp:65
│ │ │ -
Small class that calls internal::tic at construction, and internol::toc when destroyed.
Definition timing.h:199
│ │ │ -
Helper struct that encapsulates a value with a default, this is just used as a member object so you d...
Definition types.h:137
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -timing.h │ │ │ │ +lieProxies.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ @@ -16,379 +16,52 @@ │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ 18#pragma once │ │ │ │ 19 │ │ │ │ -20#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_M_a_p_._h> │ │ │ │ -21#include │ │ │ │ -22#include // for GTSAM_USE_TBB │ │ │ │ -23 │ │ │ │ -24#include │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27 │ │ │ │ -28#include │ │ │ │ -29#include │ │ │ │ -30 │ │ │ │ -31// This file contains the GTSAM timing instrumentation library, a low- │ │ │ │ -overhead method for │ │ │ │ -32// learning at a medium-fine level how much time various components of an │ │ │ │ -algorithm take │ │ │ │ -33// in CPU and wall time. │ │ │ │ -34// │ │ │ │ -35// The output of this instrumentation is a call-tree-like printout containing │ │ │ │ -statistics │ │ │ │ -36// about each instrumented code block. To print this output at any time, call │ │ │ │ -37// tictoc_print() or tictoc_print_(). │ │ │ │ -38// │ │ │ │ -39// An overall point to be aware of is that there are two versions of each │ │ │ │ -function - one │ │ │ │ -40// ending in an underscore '_' and one without the trailing underscore. The │ │ │ │ -underscore │ │ │ │ -41// versions always are active, but the versions without an underscore are │ │ │ │ -active only when │ │ │ │ -42// GTSAM_ENABLE_TIMING is defined (automatically defined in our CMake Timing │ │ │ │ -build type). │ │ │ │ -43// GTSAM algorithms are all instrumented with the non-underscore versions, so │ │ │ │ -generally │ │ │ │ -44// you should use the underscore versions in your own code to leave out the │ │ │ │ -GTSAM detail. │ │ │ │ -45// │ │ │ │ -46// gttic and gttoc start and stop a timed section, respectively. gttic │ │ │ │ -creates a *scoped* │ │ │ │ -47// object - when it goes out of scope gttoc is called automatically. Thus, │ │ │ │ -you do not │ │ │ │ -48// need to call gttoc if you are timing an entire function (see basic use │ │ │ │ -examples below). │ │ │ │ -49// However, you must be *aware* of this scoped nature - putting gttic inside │ │ │ │ -of an if(...) │ │ │ │ -50// block, for example, will only time code until the closing brace '}'. See │ │ │ │ -advanced │ │ │ │ -51// usage below if you need to avoid this. │ │ │ │ -52// │ │ │ │ -53// Multiple calls nest automatically - each gttic nests under the previous │ │ │ │ -gttic called │ │ │ │ -54// for which gttoc has not been called (or the previous gttic did not go out │ │ │ │ -of scope). │ │ │ │ -55// │ │ │ │ -56// Basic usage examples are as follows: │ │ │ │ -57// │ │ │ │ -58// - Timing an entire function: │ │ │ │ -59// void myFunction() { │ │ │ │ -60// gttic_(myFunction); │ │ │ │ -61// ........ │ │ │ │ -62// } │ │ │ │ -63// │ │ │ │ -64// - Timing an entire function as well as its component parts: │ │ │ │ -65// void myLongFunction() { │ │ │ │ -66// gttic_(myLongFunction); │ │ │ │ -67// gttic_(step1); // Will nest under the 'myLongFunction' label │ │ │ │ -68// ........ │ │ │ │ -69// gttoc_(step1); │ │ │ │ -70// gttic_(step2); // Will nest under the 'myLongFunction' label │ │ │ │ -71// ........ │ │ │ │ -72// gttoc_(step2); │ │ │ │ -73// ........ │ │ │ │ -74// } │ │ │ │ -75// │ │ │ │ -76// - Timing functions calling/called by other functions: │ │ │ │ -77// void oneStep() { │ │ │ │ -78// gttic_(oneStep); // Will automatically nest under the gttic label of the │ │ │ │ -calling function │ │ │ │ -79// ....... │ │ │ │ -80// } │ │ │ │ -81// void algorithm() { │ │ │ │ -82// gttic_(algorithm); │ │ │ │ -83// oneStep(); // gttic's inside this function will automatically nest inside │ │ │ │ -our 'algorithm' label │ │ │ │ -84// twoStep(); // gttic's inside this function will automatically nest inside │ │ │ │ -our 'algorithm' label │ │ │ │ -85// } │ │ │ │ -86// │ │ │ │ -87// │ │ │ │ -88// Advanced usage: │ │ │ │ -89// │ │ │ │ -90// - "Finishing iterations" - to get correct min/max times for each call, you │ │ │ │ -must define │ │ │ │ -91// in your code what constitutes an iteration. A single sum for the min/max │ │ │ │ -times is │ │ │ │ -92// accumulated within each iteration. If you don't care about min/max times, │ │ │ │ -you don't │ │ │ │ -93// need to worry about this. For example: │ │ │ │ -94// void myOuterLoop() { │ │ │ │ -95// while(true) { │ │ │ │ -96// iterateMyAlgorithm(); │ │ │ │ -97// tictoc_finishedIteration_(); │ │ │ │ -98// tictoc_print_(); // Optional │ │ │ │ -99// } │ │ │ │ -100// } │ │ │ │ -101// │ │ │ │ -102// - Stopping timing a section in a different scope than it is started. │ │ │ │ -Normally, a gttoc │ │ │ │ -103// statement goes out of scope at end of C++ scope. However, you can use │ │ │ │ -longtic and │ │ │ │ -104// longtoc to start and stop timing with the specified label at any point, │ │ │ │ -without regard │ │ │ │ -105// too scope. Note that if you use these, it may become difficult to ensure │ │ │ │ -that you │ │ │ │ -106// have matching gttic/gttoc statments. You may want to consider │ │ │ │ -reorganizing your timing │ │ │ │ -107// outline to match the scope of your code. │ │ │ │ -108 │ │ │ │ -109// Automatically use the new Boost timers if version is recent enough. │ │ │ │ -110#if BOOST_VERSION >= 104800 │ │ │ │ -111# ifndef GTSAM_DISABLE_NEW_TIMERS │ │ │ │ -112# define GTSAM_USING_NEW_BOOST_TIMERS │ │ │ │ -113# endif │ │ │ │ -114#endif │ │ │ │ -115 │ │ │ │ -116#ifdef GTSAM_USING_NEW_BOOST_TIMERS │ │ │ │ -117# include │ │ │ │ -118#else │ │ │ │ -119# include │ │ │ │ -120# include <_g_t_s_a_m_/_b_a_s_e_/_t_y_p_e_s_._h> │ │ │ │ -121#endif │ │ │ │ -122 │ │ │ │ -123#ifdef GTSAM_USE_TBB │ │ │ │ -124# include │ │ │ │ -125# undef min │ │ │ │ -126# undef max │ │ │ │ -127# undef ERROR │ │ │ │ -128#endif │ │ │ │ -129 │ │ │ │ -130namespace _g_t_s_a_m { │ │ │ │ -131 │ │ │ │ -132 namespace internal { │ │ │ │ -133 // Generate/retrieve a unique global ID number that will be used to look up │ │ │ │ -tic/toc statements │ │ │ │ -134 GTSAM_EXPORT size_t getTicTocID(const char *description); │ │ │ │ -135 │ │ │ │ -136 // Create new TimingOutline child for gCurrentTimer, make it gCurrentTimer, │ │ │ │ -and call tic method │ │ │ │ -137 GTSAM_EXPORT void tic(size_t id, const char *label); │ │ │ │ -138 │ │ │ │ -139 // Call toc on gCurrentTimer and then set gCurrentTimer to the parent of │ │ │ │ -gCurrentTimer │ │ │ │ -140 GTSAM_EXPORT void toc(size_t id, const char *label); │ │ │ │ -141 │ │ │ │ -_1_4_5 class _T_i_m_i_n_g_O_u_t_l_i_n_e { │ │ │ │ -146 protected: │ │ │ │ -147 size_t id_; │ │ │ │ -148 size_t t_; │ │ │ │ -149 size_t tWall_; │ │ │ │ -_1_5_0 double _t_2__ ; │ │ │ │ -151 size_t tIt_; │ │ │ │ -152 size_t tMax_; │ │ │ │ -153 size_t tMin_; │ │ │ │ -154 size_t n_; │ │ │ │ -155 size_t myOrder_; │ │ │ │ -156 size_t lastChildOrder_; │ │ │ │ -157 std::string label_; │ │ │ │ -158 │ │ │ │ -159 // Tree structure │ │ │ │ -_1_6_0 boost::weak_ptr _p_a_r_e_n_t__; │ │ │ │ -161 typedef _F_a_s_t_M_a_p_<_s_i_z_e___t_,_ _b_o_o_s_t_:_:_s_h_a_r_e_d___p_t_r_<_T_i_m_i_n_g_O_u_t_l_i_n_e_> > _C_h_i_l_d_M_a_p; │ │ │ │ -_1_6_2 _C_h_i_l_d_M_a_p _c_h_i_l_d_r_e_n__; │ │ │ │ -163 │ │ │ │ -164#ifdef GTSAM_USING_NEW_BOOST_TIMERS │ │ │ │ -165 boost::timer::cpu_timer timer_; │ │ │ │ -166#else │ │ │ │ -167 boost::timer timer_; │ │ │ │ -168 _g_t_s_a_m_:_:_V_a_l_u_e_W_i_t_h_D_e_f_a_u_l_t_<_b_o_o_l_,_f_a_l_s_e_> timerActive_; │ │ │ │ -169#endif │ │ │ │ -170#ifdef GTSAM_USE_TBB │ │ │ │ -171 tbb::tick_count tbbTimer_; │ │ │ │ -172#endif │ │ │ │ -173 void add(size_t usecs, size_t usecsWall); │ │ │ │ -174 │ │ │ │ -175 public: │ │ │ │ -177 GTSAM_EXPORT _T_i_m_i_n_g_O_u_t_l_i_n_e(const std::string& label, size_t myId); │ │ │ │ -178 GTSAM_EXPORT size_t _t_i_m_e() const; │ │ │ │ -_1_7_9 double _s_e_c_s() const { return double(_t_i_m_e()) / 1000000.0;} │ │ │ │ -_1_8_0 double _s_e_l_f() const { return double(t_) / 1000000.0;} │ │ │ │ -_1_8_1 double _w_a_l_l() const { return double(tWall_) / 1000000.0;} │ │ │ │ -_1_8_2 double _m_i_n() const { return double(tMin_) / 1000000.0;} │ │ │ │ -_1_8_3 double _m_a_x() const { return double(tMax_) / 1000000.0;} │ │ │ │ -_1_8_4 double _m_e_a_n() const { return _s_e_l_f() / double(n_); } │ │ │ │ -185 GTSAM_EXPORT void print(const std::string& outline = "") const; │ │ │ │ -186 GTSAM_EXPORT void print2(const std::string& outline = "", const double │ │ │ │ -parentTotal = -1.0) const; │ │ │ │ -187 GTSAM_EXPORT const boost::shared_ptr& │ │ │ │ -188 child(size_t child, const std::string& label, const boost:: │ │ │ │ -weak_ptr& thisPtr); │ │ │ │ -189 GTSAM_EXPORT void tic(); │ │ │ │ -190 GTSAM_EXPORT void toc(); │ │ │ │ -191 GTSAM_EXPORT void finishedIteration(); │ │ │ │ -192 │ │ │ │ -193 GTSAM_EXPORT friend void toc(size_t id, const char *label); │ │ │ │ -194 }; // \TimingOutline │ │ │ │ -195 │ │ │ │ -_1_9_9 class GTSAM_EXPORT _A_u_t_o_T_i_c_T_o_c { │ │ │ │ -200 private: │ │ │ │ -201 size_t id_; │ │ │ │ -202 const char* label_; │ │ │ │ -203 bool isSet_; │ │ │ │ -204 │ │ │ │ -205 public: │ │ │ │ -206 _A_u_t_o_T_i_c_T_o_c(size_t id, const char* label) │ │ │ │ -207 : id_(id), label_(label), isSet_(true) { │ │ │ │ -208 tic(id_, label_); │ │ │ │ -209 } │ │ │ │ -210 void stop() { │ │ │ │ -211 toc(id_, label_); │ │ │ │ -212 isSet_ = false; │ │ │ │ -213 } │ │ │ │ -214 _~_A_u_t_o_T_i_c_T_o_c() { │ │ │ │ -215 if (isSet_) stop(); │ │ │ │ -216 } │ │ │ │ -217 }; │ │ │ │ -218 │ │ │ │ -219 GTSAM_EXTERN_EXPORT boost::shared_ptr gTimingRoot; │ │ │ │ -220 GTSAM_EXTERN_EXPORT boost::weak_ptr gCurrentTimer; │ │ │ │ -221 } │ │ │ │ -222 │ │ │ │ -223// Tic and toc functions that are always active (whether or not │ │ │ │ -ENABLE_TIMING is defined) │ │ │ │ -224// There is a trick being used here to achieve near-zero runtime overhead, │ │ │ │ -in that a │ │ │ │ -225// static variable is created for each tic/toc statement storing an integer │ │ │ │ -ID, but the │ │ │ │ -226// integer ID is only looked up by string once when the static variable is │ │ │ │ -initialized │ │ │ │ -227// as the program starts. │ │ │ │ -228 │ │ │ │ -229// tic │ │ │ │ -230#define gttic_(label) \ │ │ │ │ -231 static const size_t label##_id_tic = ::gtsam::internal::getTicTocID │ │ │ │ -(#label); \ │ │ │ │ -232 ::gtsam::internal::AutoTicToc label##_obj(label##_id_tic, #label) │ │ │ │ -233 │ │ │ │ -234// toc │ │ │ │ -235#define gttoc_(label) \ │ │ │ │ -236 label##_obj.stop() │ │ │ │ -237 │ │ │ │ -238// tic │ │ │ │ -239#define longtic_(label) \ │ │ │ │ -240 static const size_t label##_id_tic = ::gtsam::internal::getTicTocID │ │ │ │ -(#label); \ │ │ │ │ -241 ::gtsam::internal::ticInternal(label##_id_tic, #label) │ │ │ │ -242 │ │ │ │ -243// toc │ │ │ │ -244#define longtoc_(label) \ │ │ │ │ -245 static const size_t label##_id_toc = ::gtsam::internal::getTicTocID │ │ │ │ -(#label); \ │ │ │ │ -246 ::gtsam::internal::tocInternal(label##_id_toc, #label) │ │ │ │ -247 │ │ │ │ -248// indicate iteration is finished │ │ │ │ -249inline void tictoc_finishedIteration_() { │ │ │ │ -250 ::gtsam::internal::gTimingRoot->finishedIteration(); } │ │ │ │ -251 │ │ │ │ -252// print │ │ │ │ -253inline void tictoc_print_() { │ │ │ │ -254 ::gtsam::internal::gTimingRoot->print(); } │ │ │ │ -255 │ │ │ │ -256// print mean and standard deviation │ │ │ │ -257inline void tictoc_print2_() { │ │ │ │ -258 ::gtsam::internal::gTimingRoot->print2(); } │ │ │ │ -259 │ │ │ │ -260// get a node by label and assign it to variable │ │ │ │ -261#define tictoc_getNode(variable, label) \ │ │ │ │ -262 static const size_t label##_id_getnode = ::gtsam::internal::getTicTocID │ │ │ │ -(#label); \ │ │ │ │ -263 const boost::shared_ptr variable = │ │ │ │ -\ │ │ │ │ -264 ::gtsam::internal::gCurrentTimer.lock()->child(label##_id_getnode, #label, │ │ │ │ -::gtsam::internal::gCurrentTimer); │ │ │ │ -265 │ │ │ │ -266// reset │ │ │ │ -267inline void tictoc_reset_() { │ │ │ │ -268 ::gtsam::internal::gTimingRoot.reset(new ::gtsam::internal::TimingOutline │ │ │ │ -("Total", ::gtsam::internal::getTicTocID("Total"))); │ │ │ │ -269 ::gtsam::internal::gCurrentTimer = ::gtsam::internal::gTimingRoot; } │ │ │ │ -270 │ │ │ │ -271#ifdef ENABLE_TIMING │ │ │ │ -272#define gttic(label) gttic_(label) │ │ │ │ -273#define gttoc(label) gttoc_(label) │ │ │ │ -274#define longtic(label) longtic_(label) │ │ │ │ -275#define longtoc(label) longtoc_(label) │ │ │ │ -276#define tictoc_finishedIteration tictoc_finishedIteration_ │ │ │ │ -277#define tictoc_print tictoc_print_ │ │ │ │ -278#define tictoc_reset tictoc_reset_ │ │ │ │ -279#else │ │ │ │ -280#define gttic(label) ((void)0) │ │ │ │ -281#define gttoc(label) ((void)0) │ │ │ │ -282#define longtic(label) ((void)0) │ │ │ │ -283#define longtoc(label) ((void)0) │ │ │ │ -284#define tictoc_finishedIteration() ((void)0) │ │ │ │ -285#define tictoc_print() ((void)0) │ │ │ │ -286#define tictoc_reset() ((void)0) │ │ │ │ -287#endif │ │ │ │ -288 │ │ │ │ -289} │ │ │ │ -_t_y_p_e_s_._h │ │ │ │ -Typedefs for easier changing of types. │ │ │ │ -_F_a_s_t_M_a_p_._h │ │ │ │ -A thin wrapper around std::map that uses boost's fast_pool_allocator. │ │ │ │ +20#include <_g_t_s_a_m_/_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h> │ │ │ │ +21 │ │ │ │ +31namespace _g_t_s_a_m { │ │ │ │ +32namespace testing { │ │ │ │ +33 │ │ │ │ +35 template │ │ │ │ +_3_6 T _b_e_t_w_e_e_n(const T& t1, const T& t2) { return t1.between(t2); } │ │ │ │ +37 │ │ │ │ +38 template │ │ │ │ +39 T compose(const T& t1, const T& t2) { return t1.compose(t2); } │ │ │ │ +40 │ │ │ │ +42 template │ │ │ │ +_4_3 T _i_n_v_e_r_s_e(const T& t) { return t.inverse(); } │ │ │ │ +44 │ │ │ │ +46 template │ │ │ │ +_4_7 P _r_o_t_a_t_e(const T& r, const P& pt) { return r.rotate(pt); } │ │ │ │ +48 │ │ │ │ +49 template │ │ │ │ +50 P unrotate(const T& r, const P& pt) { return r.unrotate(pt); } │ │ │ │ +51 │ │ │ │ +52} // \namespace testing │ │ │ │ +53} // \namespace gtsam │ │ │ │ +54 │ │ │ │ +55 │ │ │ │ +_g_t_s_a_m_:_:_t_e_s_t_i_n_g_:_:_r_o_t_a_t_e │ │ │ │ +P rotate(const T &r, const P &pt) │ │ │ │ +rotation functions │ │ │ │ +DDeeffiinniittiioonn lieProxies.h:47 │ │ │ │ +_g_t_s_a_m_:_:_t_e_s_t_i_n_g_:_:_b_e_t_w_e_e_n │ │ │ │ +T between(const T &t1, const T &t2) │ │ │ │ +binary functions │ │ │ │ +DDeeffiinniittiioonn lieProxies.h:36 │ │ │ │ +_g_t_s_a_m_:_:_t_e_s_t_i_n_g_:_:_i_n_v_e_r_s_e │ │ │ │ +T inverse(const T &t) │ │ │ │ +unary functions │ │ │ │ +DDeeffiinniittiioonn lieProxies.h:43 │ │ │ │ +_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h │ │ │ │ +Included from all GTSAM files. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_M_a_p │ │ │ │ -FastMap is a thin wrapper around std::map that uses the boost │ │ │ │ -fast_pool_allocator instead of the defa... │ │ │ │ -DDeeffiinniittiioonn FastMap.h:38 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e │ │ │ │ -Timing Entry, arranged in a tree. │ │ │ │ -DDeeffiinniittiioonn timing.h:145 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_t_2__ │ │ │ │ -double t2_ │ │ │ │ -cache the │ │ │ │ -DDeeffiinniittiioonn timing.h:150 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_c_h_i_l_d_r_e_n__ │ │ │ │ -ChildMap children_ │ │ │ │ -subtrees │ │ │ │ -DDeeffiinniittiioonn timing.h:162 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_m_a_x │ │ │ │ -double max() const │ │ │ │ -max time, in seconds │ │ │ │ -DDeeffiinniittiioonn timing.h:183 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_w_a_l_l │ │ │ │ -double wall() const │ │ │ │ -wall time, in seconds │ │ │ │ -DDeeffiinniittiioonn timing.h:181 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_s_e_c_s │ │ │ │ -double secs() const │ │ │ │ -time taken, in seconds, including children │ │ │ │ -DDeeffiinniittiioonn timing.h:179 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_s_e_l_f │ │ │ │ -double self() const │ │ │ │ -self time only, in seconds │ │ │ │ -DDeeffiinniittiioonn timing.h:180 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_p_a_r_e_n_t__ │ │ │ │ -boost::weak_ptr< TimingOutline > parent_ │ │ │ │ -parent pointer │ │ │ │ -DDeeffiinniittiioonn timing.h:160 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_m_i_n │ │ │ │ -double min() const │ │ │ │ -min time, in seconds │ │ │ │ -DDeeffiinniittiioonn timing.h:182 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_m_e_a_n │ │ │ │ -double mean() const │ │ │ │ -mean self time, in seconds │ │ │ │ -DDeeffiinniittiioonn timing.h:184 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_T_i_m_i_n_g_O_u_t_l_i_n_e_:_:_t_i_m_e │ │ │ │ -GTSAM_EXPORT size_t time() const │ │ │ │ -time taken, including children │ │ │ │ -DDeeffiinniittiioonn timing.cpp:65 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_A_u_t_o_T_i_c_T_o_c │ │ │ │ -Small class that calls internal::tic at construction, and internol::toc when │ │ │ │ -destroyed. │ │ │ │ -DDeeffiinniittiioonn timing.h:199 │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e_W_i_t_h_D_e_f_a_u_l_t │ │ │ │ -Helper struct that encapsulates a value with a default, this is just used as a │ │ │ │ -member object so you d... │ │ │ │ -DDeeffiinniittiioonn types.h:137 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _t_i_m_i_n_g_._h │ │ │ │ + * _l_i_e_P_r_o_x_i_e_s_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00023_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/testLie.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/treeTraversal-inst.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,111 +98,217 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
testLie.h
│ │ │ +
treeTraversal-inst.h
│ │ │
│ │ │
│ │ │ -
1/* ----------------------------------------------------------------------------
│ │ │ +Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
12/*
│ │ │ -
13 * @file testLie.h
│ │ │ -
14 * @brief Test utilities for Lie groups
│ │ │ -
15 * @date November, 2014
│ │ │ -
16 * @author Paul Furgale
│ │ │ -
17 */
│ │ │ +
17#pragma once
│ │ │
18
│ │ │ -
19#pragma once
│ │ │ -
20
│ │ │ -
21#include <gtsam/base/Lie.h>
│ │ │ - │ │ │ -
23
│ │ │ -
24#include <CppUnitLite/TestResult.h>
│ │ │ -
25#include <CppUnitLite/Test.h>
│ │ │ -
26#include <CppUnitLite/Failure.h>
│ │ │ -
27
│ │ │ -
28namespace gtsam {
│ │ │ -
29
│ │ │ -
30// Do a comprehensive test of Lie Group derivatives
│ │ │ -
31template<typename G>
│ │ │ -
32void testLieGroupDerivatives(TestResult& result_, const std::string& name_,
│ │ │ -
33 const G& t1, const G& t2) {
│ │ │ +
19#include <gtsam/base/treeTraversal/parallelTraversalTasks.h>
│ │ │ +
20#include <gtsam/base/treeTraversal/statistics.h>
│ │ │ +
21
│ │ │ +
22#include <gtsam/base/FastList.h>
│ │ │ + │ │ │ +
24#include <gtsam/inference/Key.h>
│ │ │ +
25#include <gtsam/config.h> // for GTSAM_USE_TBB
│ │ │ +
26
│ │ │ +
27#include <stack>
│ │ │ +
28#include <vector>
│ │ │ +
29#include <string>
│ │ │ +
30#include <boost/shared_ptr.hpp>
│ │ │ +
31#include <boost/make_shared.hpp>
│ │ │ +
32
│ │ │ +
33namespace gtsam {
│ │ │
34
│ │ │ -
35 Matrix H1, H2;
│ │ │ -
36 typedef traits<G> T;
│ │ │ -
37 typedef OptionalJacobian<T::dimension,T::dimension> OJ;
│ │ │ -
38
│ │ │ -
39 // Inverse
│ │ │ -
40 OJ none;
│ │ │ -
41 EXPECT(assert_equal<G>(t1.inverse(),T::Inverse(t1, H1)));
│ │ │ -
42 EXPECT(assert_equal(numericalDerivative21<G,G,OJ>(T::Inverse, t1, none),H1));
│ │ │ -
43
│ │ │ -
44 EXPECT(assert_equal<G>(t2.inverse(),T::Inverse(t2, H1)));
│ │ │ -
45 EXPECT(assert_equal(numericalDerivative21<G,G,OJ>(T::Inverse, t2, none),H1));
│ │ │ -
46
│ │ │ -
47 // Compose
│ │ │ -
48 EXPECT(assert_equal<G>(t1 * t2,T::Compose(t1, t2, H1, H2)));
│ │ │ -
49 EXPECT(assert_equal(numericalDerivative41<G,G,G,OJ,OJ>(T::Compose, t1, t2, none, none), H1));
│ │ │ -
50 EXPECT(assert_equal(numericalDerivative42<G,G,G,OJ,OJ>(T::Compose, t1, t2, none, none), H2));
│ │ │ +
│ │ │ +
36namespace treeTraversal {
│ │ │ +
37
│ │ │ +
38/* ************************************************************************* */
│ │ │ +
39namespace {
│ │ │ +
40// Internal node used in DFS preorder stack
│ │ │ +
41template<typename NODE, typename DATA>
│ │ │ +
42struct TraversalNode {
│ │ │ +
43 bool expanded;
│ │ │ +
44 const boost::shared_ptr<NODE>& treeNode;
│ │ │ +
45 DATA& parentData;
│ │ │ +
46 typename FastList<DATA>::iterator dataPointer;
│ │ │ +
47 TraversalNode(const boost::shared_ptr<NODE>& _treeNode, DATA& _parentData) :
│ │ │ +
48 expanded(false), treeNode(_treeNode), parentData(_parentData) {
│ │ │ +
49 }
│ │ │ +
50};
│ │ │
51
│ │ │ -
52 // Between
│ │ │ -
53 EXPECT(assert_equal<G>(t1.inverse() * t2,T::Between(t1, t2, H1, H2)));
│ │ │ -
54 EXPECT(assert_equal(numericalDerivative41<G,G,G,OJ,OJ>(T::Between, t1, t2, none, none), H1));
│ │ │ -
55 EXPECT(assert_equal(numericalDerivative42<G,G,G,OJ,OJ>(T::Between, t1, t2, none, none), H2));
│ │ │ -
56}
│ │ │ -
57
│ │ │ -
58// Do a comprehensive test of Lie Group Chart derivatives
│ │ │ -
59template<typename G>
│ │ │ -
60void testChartDerivatives(TestResult& result_, const std::string& name_,
│ │ │ -
61 const G& t1, const G& t2) {
│ │ │ -
62
│ │ │ -
63 Matrix H1, H2;
│ │ │ -
64 typedef traits<G> T;
│ │ │ -
65 typedef typename T::TangentVector V;
│ │ │ -
66 typedef OptionalJacobian<T::dimension,T::dimension> OJ;
│ │ │ -
67
│ │ │ -
68 // Retract
│ │ │ -
69 OJ none;
│ │ │ -
70 V w12 = T::Local(t1, t2);
│ │ │ -
71 EXPECT(assert_equal<G>(t2, T::Retract(t1,w12, H1, H2)));
│ │ │ -
72 EXPECT(assert_equal(numericalDerivative41<G,G,V,OJ,OJ>(T::Retract, t1, w12, none, none), H1));
│ │ │ -
73 EXPECT(assert_equal(numericalDerivative42<G,G,V,OJ,OJ>(T::Retract, t1, w12, none, none), H2));
│ │ │ -
74
│ │ │ -
75 // Local
│ │ │ -
76 EXPECT(assert_equal(w12, T::Local(t1, t2, H1, H2)));
│ │ │ -
77 EXPECT(assert_equal(numericalDerivative41<V,G,G,OJ,OJ>(T::Local, t1, t2, none, none), H1));
│ │ │ -
78 EXPECT(assert_equal(numericalDerivative42<V,G,G,OJ,OJ>(T::Local, t1, t2, none, none), H2));
│ │ │ -
79}
│ │ │ -
80} // namespace gtsam
│ │ │ -
81
│ │ │ -
82#define CHECK_LIE_GROUP_DERIVATIVES(t1,t2) \
│ │ │ -
83 { gtsam::testLieGroupDerivatives(result_, name_, t1, t2); }
│ │ │ -
84
│ │ │ -
85#define CHECK_CHART_DERIVATIVES(t1,t2) \
│ │ │ -
86 { gtsam::testChartDerivatives(result_, name_, t1, t2); }
│ │ │ -
Some functions to compute numerical derivatives.
│ │ │ -
Base class and basic functions for Lie types.
│ │ │ +
52// Do nothing - default argument for post-visitor for tree traversal
│ │ │ +
53struct no_op {
│ │ │ +
54 template<typename NODE, typename DATA>
│ │ │ +
55 void operator()(const boost::shared_ptr<NODE>& node, const DATA& data) {
│ │ │ +
56 }
│ │ │ +
57};
│ │ │ +
58
│ │ │ +
59}
│ │ │ +
60
│ │ │ +
75template<class FOREST, typename DATA, typename VISITOR_PRE,
│ │ │ +
76 typename VISITOR_POST>
│ │ │ +
│ │ │ +
77void DepthFirstForest(FOREST& forest, DATA& rootData, VISITOR_PRE& visitorPre,
│ │ │ +
78 VISITOR_POST& visitorPost) {
│ │ │ +
79 // Typedefs
│ │ │ +
80 typedef typename FOREST::Node Node;
│ │ │ +
81 typedef boost::shared_ptr<Node> sharedNode;
│ │ │ +
82
│ │ │ +
83 // Depth first traversal stack
│ │ │ +
84 typedef TraversalNode<typename FOREST::Node, DATA> TraversalNode;
│ │ │ +
85 typedef FastList<TraversalNode> Stack;
│ │ │ +
86 Stack stack;
│ │ │ +
87 FastList<DATA> dataList; // List to store node data as it is returned from the pre-order visitor
│ │ │ +
88
│ │ │ +
89 // Add roots to stack (insert such that they are visited and processed in order
│ │ │ +
90 {
│ │ │ +
91 typename Stack::iterator insertLocation = stack.begin();
│ │ │ +
92 for(const sharedNode& root: forest.roots())
│ │ │ +
93 stack.insert(insertLocation, TraversalNode(root, rootData));
│ │ │ +
94 }
│ │ │ +
95
│ │ │ +
96 // Traverse
│ │ │ +
97 while (!stack.empty()) {
│ │ │ +
98 // Get next node
│ │ │ +
99 TraversalNode& node = stack.front();
│ │ │ +
100
│ │ │ +
101 if (node.expanded) {
│ │ │ +
102 // If already expanded, then the data stored in the node is no longer needed, so visit
│ │ │ +
103 // then delete it.
│ │ │ +
104 (void) visitorPost(node.treeNode, *node.dataPointer);
│ │ │ +
105 dataList.erase(node.dataPointer);
│ │ │ +
106 stack.pop_front();
│ │ │ +
107 } else {
│ │ │ +
108 // If not already visited, visit the node and add its children (use reverse iterators so
│ │ │ +
109 // children are processed in the order they appear)
│ │ │ +
110 node.dataPointer = dataList.insert(dataList.end(),
│ │ │ +
111 visitorPre(node.treeNode, node.parentData));
│ │ │ +
112 typename Stack::iterator insertLocation = stack.begin();
│ │ │ +
113 for(const sharedNode& child: node.treeNode->children)
│ │ │ +
114 stack.insert(insertLocation, TraversalNode(child, *node.dataPointer));
│ │ │ +
115 node.expanded = true;
│ │ │ +
116 }
│ │ │ +
117 }
│ │ │ +
118 assert(dataList.empty());
│ │ │ +
119}
│ │ │ +
│ │ │ +
120
│ │ │ +
132template<class FOREST, typename DATA, typename VISITOR_PRE>
│ │ │ +
│ │ │ +
133void DepthFirstForest(FOREST& forest, DATA& rootData, VISITOR_PRE& visitorPre) {
│ │ │ +
134 no_op visitorPost;
│ │ │ +
135 DepthFirstForest(forest, rootData, visitorPre, visitorPost);
│ │ │ +
136}
│ │ │ +
│ │ │ +
137
│ │ │ +
152template<class FOREST, typename DATA, typename VISITOR_PRE,
│ │ │ +
153 typename VISITOR_POST>
│ │ │ +
│ │ │ +
154void DepthFirstForestParallel(FOREST& forest, DATA& rootData,
│ │ │ +
155 VISITOR_PRE& visitorPre, VISITOR_POST& visitorPost,
│ │ │ +
156 int problemSizeThreshold = 10) {
│ │ │ +
157#ifdef GTSAM_USE_TBB
│ │ │ +
158 // Typedefs
│ │ │ +
159 typedef typename FOREST::Node Node;
│ │ │ +
160
│ │ │ +
161 internal::CreateRootTask<Node>(forest.roots(), rootData, visitorPre,
│ │ │ +
162 visitorPost, problemSizeThreshold);
│ │ │ +
163#else
│ │ │ +
164 DepthFirstForest(forest, rootData, visitorPre, visitorPost);
│ │ │ +
165#endif
│ │ │ +
166}
│ │ │ +
│ │ │ +
167
│ │ │ +
168/* ************************************************************************* */
│ │ │ +
170namespace {
│ │ │ +
171template<typename NODE>
│ │ │ +
172boost::shared_ptr<NODE> CloneForestVisitorPre(
│ │ │ +
173 const boost::shared_ptr<NODE>& node,
│ │ │ +
174 const boost::shared_ptr<NODE>& parentPointer) {
│ │ │ +
175 // Clone the current node and add it to its cloned parent
│ │ │ +
176 boost::shared_ptr<NODE> clone = boost::make_shared<NODE>(*node);
│ │ │ +
177 clone->children.clear();
│ │ │ +
178 parentPointer->children.push_back(clone);
│ │ │ +
179 return clone;
│ │ │ +
180}
│ │ │ +
181}
│ │ │ +
182
│ │ │ +
188template<class FOREST>
│ │ │ +
│ │ │ + │ │ │ +
190 const FOREST& forest) {
│ │ │ +
191 typedef typename FOREST::Node Node;
│ │ │ +
192 boost::shared_ptr<Node> rootContainer = boost::make_shared<Node>();
│ │ │ +
193 DepthFirstForest(forest, rootContainer, CloneForestVisitorPre<Node>);
│ │ │ +
194 return FastVector<boost::shared_ptr<Node> >(rootContainer->children.begin(),
│ │ │ +
195 rootContainer->children.end());
│ │ │ +
196}
│ │ │ +
│ │ │ +
197
│ │ │ +
198/* ************************************************************************* */
│ │ │ +
200namespace {
│ │ │ +
201struct PrintForestVisitorPre {
│ │ │ +
202 const KeyFormatter& formatter;
│ │ │ +
203 PrintForestVisitorPre(const KeyFormatter& formatter) :
│ │ │ +
204 formatter(formatter) {
│ │ │ +
205 }
│ │ │ +
206 template<typename NODE> std::string operator()(
│ │ │ +
207 const boost::shared_ptr<NODE>& node, const std::string& parentString) {
│ │ │ +
208 // Print the current node
│ │ │ +
209 node->print(parentString + "-", formatter);
│ │ │ +
210 // Increment the indentation
│ │ │ +
211 return parentString + "| ";
│ │ │ +
212 }
│ │ │ +
213};
│ │ │ +
214}
│ │ │ +
215
│ │ │ +
218template<class FOREST>
│ │ │ +
│ │ │ +
219void PrintForest(const FOREST& forest, std::string str,
│ │ │ +
220 const KeyFormatter& keyFormatter) {
│ │ │ +
221 PrintForestVisitorPre visitor(keyFormatter);
│ │ │ +
222 DepthFirstForest(forest, str, visitor);
│ │ │ +
223}
│ │ │ +
│ │ │ +
224} // namespace treeTraversal
│ │ │ +
│ │ │ +
225
│ │ │ +
226} // namespace gtsam
│ │ │ +
A thin wrapper around std::list that uses boost's fast_pool_allocator.
│ │ │ +
A thin wrapper around std::vector that uses a custom allocator.
│ │ │ + │ │ │ +
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
FastVector is a type alias to a std::vector with a custom memory allocator.
Definition FastVector.h:34
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
equals with an tolerance, prints out message if unequal
Definition Matrix.cpp:43
│ │ │ +
Matrix stack(size_t nrMatrices,...)
create a matrix by stacking other matrices Given a set of matrices: A1, A2, A3...
Definition Matrix.cpp:397
│ │ │ +
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition Key.h:35
│ │ │ +
void DepthFirstForest(FOREST &forest, DATA &rootData, VISITOR_PRE &visitorPre, VISITOR_POST &visitorPost)
Traverse a forest depth-first with pre-order and post-order visits.
Definition treeTraversal-inst.h:77
│ │ │ +
FastVector< boost::shared_ptr< typename FOREST::Node > > CloneForest(const FOREST &forest)
Clone a tree, copy-constructing new nodes (calling boost::make_shared) and setting up child pointers ...
Definition treeTraversal-inst.h:189
│ │ │ +
void PrintForest(const FOREST &forest, std::string str, const KeyFormatter &keyFormatter)
Print a tree, prefixing each line with str, and formatting keys using keyFormatter.
Definition treeTraversal-inst.h:219
│ │ │ +
void DepthFirstForestParallel(FOREST &forest, DATA &rootData, VISITOR_PRE &visitorPre, VISITOR_POST &visitorPost, int problemSizeThreshold=10)
Traverse a forest depth-first with pre-order and post-order visits.
Definition treeTraversal-inst.h:154
│ │ │ +
FastList is a thin wrapper around std::list that uses the boost fast_pool_allocator instead of the de...
Definition FastList.h:40
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,119 +1,243 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -testLie.h │ │ │ │ +treeTraversal-inst.h │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -12/* │ │ │ │ -13 * @file testLie.h │ │ │ │ -14 * @brief Test utilities for Lie groups │ │ │ │ -15 * @date November, 2014 │ │ │ │ -16 * @author Paul Furgale │ │ │ │ -17 */ │ │ │ │ +17#pragma once │ │ │ │ 18 │ │ │ │ -19#pragma once │ │ │ │ -20 │ │ │ │ -21#include <_g_t_s_a_m_/_b_a_s_e_/_L_i_e_._h> │ │ │ │ -22#include <_g_t_s_a_m_/_b_a_s_e_/_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_._h> │ │ │ │ -23 │ │ │ │ -24#include │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27 │ │ │ │ -28namespace _g_t_s_a_m { │ │ │ │ -29 │ │ │ │ -30// Do a comprehensive test of Lie Group derivatives │ │ │ │ -31template │ │ │ │ -32void testLieGroupDerivatives(TestResult& result_, const std::string& name_, │ │ │ │ -33 const G& t1, const G& t2) { │ │ │ │ +19#include │ │ │ │ +20#include │ │ │ │ +21 │ │ │ │ +22#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_L_i_s_t_._h> │ │ │ │ +23#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_V_e_c_t_o_r_._h> │ │ │ │ +24#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_K_e_y_._h> │ │ │ │ +25#include // for GTSAM_USE_TBB │ │ │ │ +26 │ │ │ │ +27#include │ │ │ │ +28#include │ │ │ │ +29#include │ │ │ │ +30#include │ │ │ │ +31#include │ │ │ │ +32 │ │ │ │ +33namespace _g_t_s_a_m { │ │ │ │ 34 │ │ │ │ -35 Matrix H1, H2; │ │ │ │ -36 typedef traits T; │ │ │ │ -37 typedef OptionalJacobian OJ; │ │ │ │ -38 │ │ │ │ -39 // Inverse │ │ │ │ -40 OJ none; │ │ │ │ -41 EXPECT(assert_equal(t1.inverse(),T::Inverse(t1, H1))); │ │ │ │ -42 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative21(T::Inverse, t1, │ │ │ │ -none),H1)); │ │ │ │ -43 │ │ │ │ -44 EXPECT(assert_equal(t2.inverse(),T::Inverse(t2, H1))); │ │ │ │ -45 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative21(T::Inverse, t2, │ │ │ │ -none),H1)); │ │ │ │ -46 │ │ │ │ -47 // Compose │ │ │ │ -48 EXPECT(assert_equal(t1 * t2,T::Compose(t1, t2, H1, H2))); │ │ │ │ -49 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative41(T::Compose, t1, t2, │ │ │ │ -none, none), H1)); │ │ │ │ -50 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative42(T::Compose, t1, t2, │ │ │ │ -none, none), H2)); │ │ │ │ +_3_6namespace treeTraversal { │ │ │ │ +37 │ │ │ │ +38/* ************************************************************************* │ │ │ │ +*/ │ │ │ │ +39namespace { │ │ │ │ +40// Internal node used in DFS preorder stack │ │ │ │ +41template │ │ │ │ +42struct TraversalNode { │ │ │ │ +43 bool expanded; │ │ │ │ +44 const boost::shared_ptr& treeNode; │ │ │ │ +45 DATA& parentData; │ │ │ │ +46 typename _F_a_s_t_L_i_s_t_<_D_A_T_A_>_:_:_i_t_e_r_a_t_o_r dataPointer; │ │ │ │ +47 TraversalNode(const boost::shared_ptr& _treeNode, DATA& _parentData) : │ │ │ │ +48 expanded(false), treeNode(_treeNode), parentData(_parentData) { │ │ │ │ +49 } │ │ │ │ +50}; │ │ │ │ 51 │ │ │ │ -52 // Between │ │ │ │ -53 EXPECT(assert_equal(t1.inverse() * t2,T::Between(t1, t2, H1, H2))); │ │ │ │ -54 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative41(T::Between, t1, t2, │ │ │ │ -none, none), H1)); │ │ │ │ -55 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative42(T::Between, t1, t2, │ │ │ │ -none, none), H2)); │ │ │ │ -56} │ │ │ │ -57 │ │ │ │ -58// Do a comprehensive test of Lie Group Chart derivatives │ │ │ │ -59template │ │ │ │ -60void testChartDerivatives(TestResult& result_, const std::string& name_, │ │ │ │ -61 const G& t1, const G& t2) { │ │ │ │ -62 │ │ │ │ -63 Matrix H1, H2; │ │ │ │ -64 typedef traits T; │ │ │ │ -65 typedef typename T::TangentVector V; │ │ │ │ -66 typedef OptionalJacobian OJ; │ │ │ │ -67 │ │ │ │ -68 // Retract │ │ │ │ -69 OJ none; │ │ │ │ -70 V w12 = T::Local(t1, t2); │ │ │ │ -71 EXPECT(assert_equal(t2, T::Retract(t1,w12, H1, H2))); │ │ │ │ -72 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative41(T::Retract, t1, w12, │ │ │ │ -none, none), H1)); │ │ │ │ -73 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative42(T::Retract, t1, w12, │ │ │ │ -none, none), H2)); │ │ │ │ -74 │ │ │ │ -75 // Local │ │ │ │ -76 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(w12, T::Local(t1, t2, H1, H2))); │ │ │ │ -77 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative41(T::Local, t1, t2, │ │ │ │ -none, none), H1)); │ │ │ │ -78 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative42(T::Local, t1, t2, │ │ │ │ -none, none), H2)); │ │ │ │ -79} │ │ │ │ -80} // namespace gtsam │ │ │ │ -81 │ │ │ │ -82#define CHECK_LIE_GROUP_DERIVATIVES(t1,t2) \ │ │ │ │ -83 { gtsam::testLieGroupDerivatives(result_, name_, t1, t2); } │ │ │ │ -84 │ │ │ │ -85#define CHECK_CHART_DERIVATIVES(t1,t2) \ │ │ │ │ -86 { gtsam::testChartDerivatives(result_, name_, t1, t2); } │ │ │ │ -_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_._h │ │ │ │ -Some functions to compute numerical derivatives. │ │ │ │ -_L_i_e_._h │ │ │ │ -Base class and basic functions for Lie types. │ │ │ │ +52// Do nothing - default argument for post-visitor for tree traversal │ │ │ │ +53struct no_op { │ │ │ │ +54 template │ │ │ │ +55 void operator()(const boost::shared_ptr& node, const DATA& data) { │ │ │ │ +56 } │ │ │ │ +57}; │ │ │ │ +58 │ │ │ │ +59} │ │ │ │ +60 │ │ │ │ +75template │ │ │ │ +_7_7void _D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t(FOREST& forest, DATA& rootData, VISITOR_PRE& │ │ │ │ +visitorPre, │ │ │ │ +78 VISITOR_POST& visitorPost) { │ │ │ │ +79 // Typedefs │ │ │ │ +80 typedef typename FOREST::Node Node; │ │ │ │ +81 typedef boost::shared_ptr sharedNode; │ │ │ │ +82 │ │ │ │ +83 // Depth first traversal stack │ │ │ │ +84 typedef TraversalNode TraversalNode; │ │ │ │ +85 typedef _F_a_s_t_L_i_s_t_<_T_r_a_v_e_r_s_a_l_N_o_d_e_> Stack; │ │ │ │ +86 Stack _s_t_a_c_k; │ │ │ │ +87 _F_a_s_t_L_i_s_t_<_D_A_T_A_> dataList; // List to store node data as it is returned from │ │ │ │ +the pre-order visitor │ │ │ │ +88 │ │ │ │ +89 // Add roots to stack (insert such that they are visited and processed in │ │ │ │ +order │ │ │ │ +90 { │ │ │ │ +91 typename Stack::iterator insertLocation = _s_t_a_c_k.begin(); │ │ │ │ +92 for(const sharedNode& root: forest.roots()) │ │ │ │ +93 _s_t_a_c_k.insert(insertLocation, TraversalNode(root, rootData)); │ │ │ │ +94 } │ │ │ │ +95 │ │ │ │ +96 // Traverse │ │ │ │ +97 while (!_s_t_a_c_k.empty()) { │ │ │ │ +98 // Get next node │ │ │ │ +99 TraversalNode& node = _s_t_a_c_k.front(); │ │ │ │ +100 │ │ │ │ +101 if (node.expanded) { │ │ │ │ +102 // If already expanded, then the data stored in the node is no longer │ │ │ │ +needed, so visit │ │ │ │ +103 // then delete it. │ │ │ │ +104 (void) visitorPost(node.treeNode, *node.dataPointer); │ │ │ │ +105 dataList.erase(node.dataPointer); │ │ │ │ +106 _s_t_a_c_k.pop_front(); │ │ │ │ +107 } else { │ │ │ │ +108 // If not already visited, visit the node and add its children (use reverse │ │ │ │ +iterators so │ │ │ │ +109 // children are processed in the order they appear) │ │ │ │ +110 node.dataPointer = dataList.insert(dataList.end(), │ │ │ │ +111 visitorPre(node.treeNode, node.parentData)); │ │ │ │ +112 typename Stack::iterator insertLocation = _s_t_a_c_k.begin(); │ │ │ │ +113 for(const sharedNode& child: node.treeNode->children) │ │ │ │ +114 _s_t_a_c_k.insert(insertLocation, TraversalNode(child, *node.dataPointer)); │ │ │ │ +115 node.expanded = true; │ │ │ │ +116 } │ │ │ │ +117 } │ │ │ │ +118 assert(dataList.empty()); │ │ │ │ +119} │ │ │ │ +120 │ │ │ │ +132template │ │ │ │ +_1_3_3void _D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t(FOREST& forest, DATA& rootData, VISITOR_PRE& │ │ │ │ +visitorPre) { │ │ │ │ +134 no_op visitorPost; │ │ │ │ +135 _D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t(forest, rootData, visitorPre, visitorPost); │ │ │ │ +136} │ │ │ │ +137 │ │ │ │ +152template │ │ │ │ +_1_5_4void _D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t_P_a_r_a_l_l_e_l(FOREST& forest, DATA& rootData, │ │ │ │ +155 VISITOR_PRE& visitorPre, VISITOR_POST& visitorPost, │ │ │ │ +156 int problemSizeThreshold = 10) { │ │ │ │ +157#ifdef GTSAM_USE_TBB │ │ │ │ +158 // Typedefs │ │ │ │ +159 typedef typename FOREST::Node Node; │ │ │ │ +160 │ │ │ │ +161 internal::CreateRootTask(forest.roots(), rootData, visitorPre, │ │ │ │ +162 visitorPost, problemSizeThreshold); │ │ │ │ +163#else │ │ │ │ +164 _D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t(forest, rootData, visitorPre, visitorPost); │ │ │ │ +165#endif │ │ │ │ +166} │ │ │ │ +167 │ │ │ │ +168/* ************************************************************************* │ │ │ │ +*/ │ │ │ │ +170namespace { │ │ │ │ +171template │ │ │ │ +172boost::shared_ptr CloneForestVisitorPre( │ │ │ │ +173 const boost::shared_ptr& node, │ │ │ │ +174 const boost::shared_ptr& parentPointer) { │ │ │ │ +175 // Clone the current node and add it to its cloned parent │ │ │ │ +176 boost::shared_ptr clone = boost::make_shared(*node); │ │ │ │ +177 clone->children.clear(); │ │ │ │ +178 parentPointer->children.push_back(clone); │ │ │ │ +179 return clone; │ │ │ │ +180} │ │ │ │ +181} │ │ │ │ +182 │ │ │ │ +188template │ │ │ │ +_1_8_9_F_a_s_t_V_e_c_t_o_r_<_b_o_o_s_t_:_:_s_h_a_r_e_d___p_t_r_<_t_y_p_e_n_a_m_e_ _F_O_R_E_S_T_:_:_N_o_d_e_> > _C_l_o_n_e_F_o_r_e_s_t( │ │ │ │ +190 const FOREST& forest) { │ │ │ │ +191 typedef typename FOREST::Node Node; │ │ │ │ +192 boost::shared_ptr rootContainer = boost::make_shared(); │ │ │ │ +193 _D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t(forest, rootContainer, CloneForestVisitorPre); │ │ │ │ +194 return _F_a_s_t_V_e_c_t_o_r_<_b_o_o_s_t_:_:_s_h_a_r_e_d___p_t_r_<_N_o_d_e_> >(rootContainer->children.begin │ │ │ │ +(), │ │ │ │ +195 rootContainer->children.end()); │ │ │ │ +196} │ │ │ │ +197 │ │ │ │ +198/* ************************************************************************* │ │ │ │ +*/ │ │ │ │ +200namespace { │ │ │ │ +201struct PrintForestVisitorPre { │ │ │ │ +202 const _K_e_y_F_o_r_m_a_t_t_e_r& formatter; │ │ │ │ +203 PrintForestVisitorPre(const _K_e_y_F_o_r_m_a_t_t_e_r& formatter) : │ │ │ │ +204 formatter(formatter) { │ │ │ │ +205 } │ │ │ │ +206 template std::string operator()( │ │ │ │ +207 const boost::shared_ptr& node, const std::string& parentString) { │ │ │ │ +208 // Print the current node │ │ │ │ +209 node->print(parentString + "-", formatter); │ │ │ │ +210 // Increment the indentation │ │ │ │ +211 return parentString + "| "; │ │ │ │ +212 } │ │ │ │ +213}; │ │ │ │ +214} │ │ │ │ +215 │ │ │ │ +218template │ │ │ │ +_2_1_9void _P_r_i_n_t_F_o_r_e_s_t(const FOREST& forest, std::string str, │ │ │ │ +220 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter) { │ │ │ │ +221 PrintForestVisitorPre visitor(keyFormatter); │ │ │ │ +222 _D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t(forest, str, visitor); │ │ │ │ +223} │ │ │ │ +224} // namespace treeTraversal │ │ │ │ +225 │ │ │ │ +226} // namespace gtsam │ │ │ │ +_F_a_s_t_L_i_s_t_._h │ │ │ │ +A thin wrapper around std::list that uses boost's fast_pool_allocator. │ │ │ │ +_F_a_s_t_V_e_c_t_o_r_._h │ │ │ │ +A thin wrapper around std::vector that uses a custom allocator. │ │ │ │ +_K_e_y_._h │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_V_e_c_t_o_r │ │ │ │ +std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > │ │ │ │ +FastVector │ │ │ │ +FastVector is a type alias to a std::vector with a custom memory allocator. │ │ │ │ +DDeeffiinniittiioonn FastVector.h:34 │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_a_s_s_e_r_t___e_q_u_a_l │ │ │ │ -bool assert_equal(const Matrix &expected, const Matrix &actual, double tol) │ │ │ │ -equals with an tolerance, prints out message if unequal │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:43 │ │ │ │ +_g_t_s_a_m_:_:_s_t_a_c_k │ │ │ │ +Matrix stack(size_t nrMatrices,...) │ │ │ │ +create a matrix by stacking other matrices Given a set of matrices: A1, A2, │ │ │ │ +A3... │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:397 │ │ │ │ +_g_t_s_a_m_:_:_K_e_y_F_o_r_m_a_t_t_e_r │ │ │ │ +std::function< std::string(Key)> KeyFormatter │ │ │ │ +Typedef for a function to format a key, i.e. to convert it to a string. │ │ │ │ +DDeeffiinniittiioonn Key.h:35 │ │ │ │ +_g_t_s_a_m_:_:_t_r_e_e_T_r_a_v_e_r_s_a_l_:_:_D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t │ │ │ │ +void DepthFirstForest(FOREST &forest, DATA &rootData, VISITOR_PRE &visitorPre, │ │ │ │ +VISITOR_POST &visitorPost) │ │ │ │ +Traverse a forest depth-first with pre-order and post-order visits. │ │ │ │ +DDeeffiinniittiioonn treeTraversal-inst.h:77 │ │ │ │ +_g_t_s_a_m_:_:_t_r_e_e_T_r_a_v_e_r_s_a_l_:_:_C_l_o_n_e_F_o_r_e_s_t │ │ │ │ +FastVector< boost::shared_ptr< typename FOREST::Node > > CloneForest(const │ │ │ │ +FOREST &forest) │ │ │ │ +Clone a tree, copy-constructing new nodes (calling boost::make_shared) and │ │ │ │ +setting up child pointers ... │ │ │ │ +DDeeffiinniittiioonn treeTraversal-inst.h:189 │ │ │ │ +_g_t_s_a_m_:_:_t_r_e_e_T_r_a_v_e_r_s_a_l_:_:_P_r_i_n_t_F_o_r_e_s_t │ │ │ │ +void PrintForest(const FOREST &forest, std::string str, const KeyFormatter │ │ │ │ +&keyFormatter) │ │ │ │ +Print a tree, prefixing each line with str, and formatting keys using │ │ │ │ +keyFormatter. │ │ │ │ +DDeeffiinniittiioonn treeTraversal-inst.h:219 │ │ │ │ +_g_t_s_a_m_:_:_t_r_e_e_T_r_a_v_e_r_s_a_l_:_:_D_e_p_t_h_F_i_r_s_t_F_o_r_e_s_t_P_a_r_a_l_l_e_l │ │ │ │ +void DepthFirstForestParallel(FOREST &forest, DATA &rootData, VISITOR_PRE │ │ │ │ +&visitorPre, VISITOR_POST &visitorPost, int problemSizeThreshold=10) │ │ │ │ +Traverse a forest depth-first with pre-order and post-order visits. │ │ │ │ +DDeeffiinniittiioonn treeTraversal-inst.h:154 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_L_i_s_t │ │ │ │ +FastList is a thin wrapper around std::list that uses the boost │ │ │ │ +fast_pool_allocator instead of the de... │ │ │ │ +DDeeffiinniittiioonn FastList.h:40 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * tteessttLLiiee..hh │ │ │ │ + * _t_r_e_e_T_r_a_v_e_r_s_a_l_-_i_n_s_t_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00026.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/serializationTestHelpers.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/types.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,113 +95,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ -Functions | │ │ │ -Variables
│ │ │ -
serializationTestHelpers.h File Reference
│ │ │ +Functions
│ │ │ +
types.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Go to the source code of this file.

│ │ │ +

Functions for handling type information. │ │ │ +More...

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ Functions

│ │ │ -template<class T >
gtsam::serializationTestHelpers::create ()
 
│ │ │ -boost::filesystem::path gtsam::serializationTestHelpers::resetFilesystem (boost::filesystem::path folder="actual")
 
│ │ │ -template<class T >
void gtsam::serializationTestHelpers::roundtrip (const T &input, T &output)
 
│ │ │ -template<class T >
void gtsam::serializationTestHelpers::roundtripFile (const T &input, T &output)
 
│ │ │ -template<class T >
bool gtsam::serializationTestHelpers::equality (const T &input=T())
 
│ │ │ -template<class T >
bool gtsam::serializationTestHelpers::equalsObj (const T &input=T())
 
│ │ │ -template<class T >
bool gtsam::serializationTestHelpers::equalsDereferenced (const T &input)
 
│ │ │ -template<class T >
void gtsam::serializationTestHelpers::roundtripXML (const T &input, T &output)
 
│ │ │ -template<class T >
void gtsam::serializationTestHelpers::roundtripXMLFile (const T &input, T &output)
 
│ │ │ -template<class T >
bool gtsam::serializationTestHelpers::equalityXML (const T &input=T())
 
│ │ │ -template<class T >
bool gtsam::serializationTestHelpers::equalsXML (const T &input=T())
 
│ │ │ -template<class T >
bool gtsam::serializationTestHelpers::equalsDereferencedXML (const T &input=T())
 
│ │ │ -template<class T >
void gtsam::serializationTestHelpers::roundtripBinary (const T &input, T &output)
 
│ │ │ -template<class T >
void gtsam::serializationTestHelpers::roundtripBinaryFile (const T &input, T &output)
 
│ │ │ -template<class T >
bool gtsam::serializationTestHelpers::equalityBinary (const T &input=T())
 
│ │ │ -template<class T >
bool gtsam::serializationTestHelpers::equalsBinary (const T &input=T())
 
│ │ │ -template<class T >
bool gtsam::serializationTestHelpers::equalsDereferencedBinary (const T &input=T())
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ -Variables

│ │ │ -const bool verbose = false
 
std::string gtsam::demangle (const char *name)
 Pretty print Value type name.
 
│ │ │

Detailed Description

│ │ │ -
Author
Alex Cunningham
│ │ │ -
│ │ │ -Richard Roberts
│ │ │ -
Date
Feb 7, 2012
│ │ │ +

Functions for handling type information.

│ │ │ +
Author
Varun Agrawal
│ │ │ +
Date
May 18, 2020
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,92 +1,27 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ -serializationTestHelpers.h File Reference │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +types.cpp File Reference │ │ │ │ +_B_a_s_e │ │ │ │ +Functions for handling type information. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ - T  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::ccrreeaattee () │ │ │ │ -  │ │ │ │ -boost::filesystem::path  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::rreesseettFFiilleessyysstteemm │ │ │ │ - (boost::filesystem::path folder="actual") │ │ │ │ -  │ │ │ │ -template │ │ │ │ - void  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::rroouunnddttrriipp (const T │ │ │ │ - &input, T &output) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - void  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::rroouunnddttrriippFFiillee (const │ │ │ │ - T &input, T &output) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::eeqquuaalliittyy (const T │ │ │ │ - &input=T()) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::eeqquuaallssOObbjj (const T │ │ │ │ - &input=T()) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::eeqquuaallssDDeerreeffeerreenncceedd │ │ │ │ - (const T &input) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - void  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::rroouunnddttrriippXXMMLL (const T │ │ │ │ - &input, T &output) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - void  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::rroouunnddttrriippXXMMLLFFiillee │ │ │ │ - (const T &input, T &output) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::eeqquuaalliittyyXXMMLL (const T │ │ │ │ - &input=T()) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::eeqquuaallssXXMMLL (const T │ │ │ │ - &input=T()) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::eeqquuaallssDDeerreeffeerreenncceeddXXMMLL │ │ │ │ - (const T &input=T()) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - void  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::rroouunnddttrriippBBiinnaarryy │ │ │ │ - (const T &input, T &output) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - void  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::rroouunnddttrriippBBiinnaarryyFFiillee │ │ │ │ - (const T &input, T &output) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::eeqquuaalliittyyBBiinnaarryy (const │ │ │ │ - T &input=T()) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::eeqquuaallssBBiinnaarryy (const T │ │ │ │ - &input=T()) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss:::: │ │ │ │ - eeqquuaallssDDeerreeffeerreenncceeddBBiinnaarryy (const T &input=T()) │ │ │ │ -  │ │ │ │ -VVaarriiaabblleess │ │ │ │ -const bool  vveerrbboossee = false │ │ │ │ +std::string  _g_t_s_a_m_:_:_d_e_m_a_n_g_l_e (const char *name) │ │ │ │ +  Pretty print _V_a_l_u_e type name. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +Functions for handling type information. │ │ │ │ Author │ │ │ │ - Alex Cunningham │ │ │ │ - Richard Roberts │ │ │ │ + Varun Agrawal │ │ │ │ Date │ │ │ │ - Feb 7, 2012 │ │ │ │ + May 18, 2020 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _s_e_r_i_a_l_i_z_a_t_i_o_n_T_e_s_t_H_e_l_p_e_r_s_._h │ │ │ │ + * _t_y_p_e_s_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00029.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/serialization.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/serializationTestHelpers.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,166 +94,114 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
serialization.h File Reference
│ │ │ +Namespaces | │ │ │ +Functions | │ │ │ +Variables
│ │ │ +
serializationTestHelpers.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Convenience functions for serializing data structures via boost.serialization. │ │ │ -More...

│ │ │ - │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ Functions

Standard serialization

Serialization in default compressed format

│ │ │ -
template<class T >
void gtsam::serializeToStream (const T &input, std::ostream &out_archive_stream)
 
│ │ │ -template<class T >
void gtsam::deserializeFromStream (std::istream &in_archive_stream, T &output)
 deserializes from a stream
 
│ │ │ -template<class T >
std::string gtsam::serializeToString (const T &input)
 serializes to a string
 
│ │ │ -template<class T >
void gtsam::deserializeFromString (const std::string &serialized, T &output)
 deserializes from a string
 
│ │ │ -template<class T >
bool gtsam::serializeToFile (const T &input, const std::string &filename)
 serializes to a file
 
│ │ │ -template<class T >
bool gtsam::deserializeFromFile (const std::string &filename, T &output)
 deserializes from a file
 
│ │ │ -template<class T >
std::string gtsam::serialize (const T &input)
 serializes to a string
 
│ │ │ -template<class T >
void gtsam::deserialize (const std::string &serialized, T &output)
 deserializes from a string
 
XML Serialization

Serialization to XML format with named structures

│ │ │ -
template<class T >
void gtsam::serializeToXMLStream (const T &input, std::ostream &out_archive_stream, const std::string &name="data")
 
│ │ │ -template<class T >
void gtsam::deserializeFromXMLStream (std::istream &in_archive_stream, T &output, const std::string &name="data")
 deserializes from a stream in XML
 
│ │ │ -template<class T >
std::string gtsam::serializeToXMLString (const T &input, const std::string &name="data")
 serializes to a string in XML
 
│ │ │ -template<class T >
void gtsam::deserializeFromXMLString (const std::string &serialized, T &output, const std::string &name="data")
 deserializes from a string in XML
 
│ │ │ -template<class T >
bool gtsam::serializeToXMLFile (const T &input, const std::string &filename, const std::string &name="data")
 serializes to an XML file
 
│ │ │ -template<class T >
bool gtsam::deserializeFromXMLFile (const std::string &filename, T &output, const std::string &name="data")
 deserializes from an XML file
 
│ │ │ -template<class T >
std::string gtsam::serializeXML (const T &input, const std::string &name="data")
 serializes to a string in XML
 
│ │ │ -template<class T >
void gtsam::deserializeXML (const std::string &serialized, T &output, const std::string &name="data")
 deserializes from a string in XML
 
Binary Serialization

Serialization to binary format with named structures

│ │ │ -
template<class T >
void gtsam::serializeToBinaryStream (const T &input, std::ostream &out_archive_stream, const std::string &name="data")
 
│ │ │ -template<class T >
void gtsam::deserializeFromBinaryStream (std::istream &in_archive_stream, T &output, const std::string &name="data")
 deserializes from a stream in binary
 
│ │ │ -template<class T >
std::string gtsam::serializeToBinaryString (const T &input, const std::string &name="data")
 serializes to a string in binary
 
│ │ │ -template<class T >
void gtsam::deserializeFromBinaryString (const std::string &serialized, T &output, const std::string &name="data")
 deserializes from a string in binary
 
│ │ │ -template<class T >
bool gtsam::serializeToBinaryFile (const T &input, const std::string &filename, const std::string &name="data")
 serializes to a binary file
 
│ │ │ -template<class T >
bool gtsam::deserializeFromBinaryFile (const std::string &filename, T &output, const std::string &name="data")
 deserializes from a binary file
 
│ │ │ -template<class T >
std::string gtsam::serializeBinary (const T &input, const std::string &name="data")
 serializes to a string in binary
 
│ │ │ -template<class T >
void gtsam::deserializeBinary (const std::string &serialized, T &output, const std::string &name="data")
 deserializes from a string in binary
 
│ │ │ +template<class T >
gtsam::serializationTestHelpers::create ()
 
│ │ │ +boost::filesystem::path gtsam::serializationTestHelpers::resetFilesystem (boost::filesystem::path folder="actual")
 
│ │ │ +template<class T >
void gtsam::serializationTestHelpers::roundtrip (const T &input, T &output)
 
│ │ │ +template<class T >
void gtsam::serializationTestHelpers::roundtripFile (const T &input, T &output)
 
│ │ │ +template<class T >
bool gtsam::serializationTestHelpers::equality (const T &input=T())
 
│ │ │ +template<class T >
bool gtsam::serializationTestHelpers::equalsObj (const T &input=T())
 
│ │ │ +template<class T >
bool gtsam::serializationTestHelpers::equalsDereferenced (const T &input)
 
│ │ │ +template<class T >
void gtsam::serializationTestHelpers::roundtripXML (const T &input, T &output)
 
│ │ │ +template<class T >
void gtsam::serializationTestHelpers::roundtripXMLFile (const T &input, T &output)
 
│ │ │ +template<class T >
bool gtsam::serializationTestHelpers::equalityXML (const T &input=T())
 
│ │ │ +template<class T >
bool gtsam::serializationTestHelpers::equalsXML (const T &input=T())
 
│ │ │ +template<class T >
bool gtsam::serializationTestHelpers::equalsDereferencedXML (const T &input=T())
 
│ │ │ +template<class T >
void gtsam::serializationTestHelpers::roundtripBinary (const T &input, T &output)
 
│ │ │ +template<class T >
void gtsam::serializationTestHelpers::roundtripBinaryFile (const T &input, T &output)
 
│ │ │ +template<class T >
bool gtsam::serializationTestHelpers::equalityBinary (const T &input=T())
 
│ │ │ +template<class T >
bool gtsam::serializationTestHelpers::equalsBinary (const T &input=T())
 
│ │ │ +template<class T >
bool gtsam::serializationTestHelpers::equalsDereferencedBinary (const T &input=T())
 
│ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Variables

│ │ │ +const bool verbose = false
 
│ │ │

Detailed Description

│ │ │ -

Convenience functions for serializing data structures via boost.serialization.

│ │ │ -
Author
Alex Cunningham
│ │ │ +
Author
Alex Cunningham
│ │ │
│ │ │ Richard Roberts
│ │ │
Date
Feb 7, 2012
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,146 +1,92 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -serialization.h File Reference │ │ │ │ -Convenience functions for serializing data structures via boost.serialization. │ │ │ │ -_M_o_r_e_._._. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ +serializationTestHelpers.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -Standard serialization │ │ │ │ -Serialization in default compressed format │ │ │ │ template │ │ │ │ - void  _g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_S_t_r_e_a_m (const T &input, std::ostream │ │ │ │ - &out_archive_stream) │ │ │ │ + T  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::ccrreeaattee () │ │ │ │   │ │ │ │ -template │ │ │ │ - void  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommSSttrreeaamm (std::istream &in_archive_stream, T │ │ │ │ - &output) │ │ │ │ -  deserializes from a stream │ │ │ │ -  │ │ │ │ -template │ │ │ │ -std::string  ggttssaamm::::sseerriiaalliizzeeTTooSSttrriinngg (const T &input) │ │ │ │ -  serializes to a string │ │ │ │ -  │ │ │ │ -template │ │ │ │ - void  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommSSttrriinngg (const std::string &serialized, T │ │ │ │ - &output) │ │ │ │ -  deserializes from a string │ │ │ │ -  │ │ │ │ -template │ │ │ │ - bool  ggttssaamm::::sseerriiaalliizzeeTTooFFiillee (const T &input, const std::string │ │ │ │ - &filename) │ │ │ │ -  serializes to a file │ │ │ │ +boost::filesystem::path  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::rreesseettFFiilleessyysstteemm │ │ │ │ + (boost::filesystem::path folder="actual") │ │ │ │   │ │ │ │ template │ │ │ │ - bool  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommFFiillee (const std::string &filename, T │ │ │ │ - &output) │ │ │ │ -  deserializes from a file │ │ │ │ + void  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::rroouunnddttrriipp (const T │ │ │ │ + &input, T &output) │ │ │ │   │ │ │ │ template │ │ │ │ -std::string  ggttssaamm::::sseerriiaalliizzee (const T &input) │ │ │ │ -  serializes to a string │ │ │ │ + void  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::rroouunnddttrriippFFiillee (const │ │ │ │ + T &input, T &output) │ │ │ │   │ │ │ │ template │ │ │ │ - void  ggttssaamm::::ddeesseerriiaalliizzee (const std::string &serialized, T &output) │ │ │ │ -  deserializes from a string │ │ │ │ + bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::eeqquuaalliittyy (const T │ │ │ │ + &input=T()) │ │ │ │   │ │ │ │ -XML Serialization │ │ │ │ -Serialization to XML format with named structures │ │ │ │ template │ │ │ │ - void  _g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_X_M_L_S_t_r_e_a_m (const T &input, std::ostream │ │ │ │ - &out_archive_stream, const std::string &name="data") │ │ │ │ + bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::eeqquuaallssOObbjj (const T │ │ │ │ + &input=T()) │ │ │ │   │ │ │ │ template │ │ │ │ - void  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommXXMMLLSSttrreeaamm (std::istream &in_archive_stream, │ │ │ │ - T &output, const std::string &name="data") │ │ │ │ -  deserializes from a stream in XML │ │ │ │ + bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::eeqquuaallssDDeerreeffeerreenncceedd │ │ │ │ + (const T &input) │ │ │ │   │ │ │ │ template │ │ │ │ -std::string  ggttssaamm::::sseerriiaalliizzeeTTooXXMMLLSSttrriinngg (const T &input, const std::string │ │ │ │ - &name="data") │ │ │ │ -  serializes to a string in XML │ │ │ │ + void  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::rroouunnddttrriippXXMMLL (const T │ │ │ │ + &input, T &output) │ │ │ │   │ │ │ │ template │ │ │ │ - void  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommXXMMLLSSttrriinngg (const std::string &serialized, T │ │ │ │ - &output, const std::string &name="data") │ │ │ │ -  deserializes from a string in XML │ │ │ │ + void  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::rroouunnddttrriippXXMMLLFFiillee │ │ │ │ + (const T &input, T &output) │ │ │ │   │ │ │ │ template │ │ │ │ - bool  ggttssaamm::::sseerriiaalliizzeeTTooXXMMLLFFiillee (const T &input, const std::string │ │ │ │ - &filename, const std::string &name="data") │ │ │ │ -  serializes to an XML file │ │ │ │ + bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::eeqquuaalliittyyXXMMLL (const T │ │ │ │ + &input=T()) │ │ │ │   │ │ │ │ template │ │ │ │ - bool  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommXXMMLLFFiillee (const std::string &filename, T │ │ │ │ - &output, const std::string &name="data") │ │ │ │ -  deserializes from an XML file │ │ │ │ + bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::eeqquuaallssXXMMLL (const T │ │ │ │ + &input=T()) │ │ │ │   │ │ │ │ template │ │ │ │ -std::string  ggttssaamm::::sseerriiaalliizzeeXXMMLL (const T &input, const std::string │ │ │ │ - &name="data") │ │ │ │ -  serializes to a string in XML │ │ │ │ + bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::eeqquuaallssDDeerreeffeerreenncceeddXXMMLL │ │ │ │ + (const T &input=T()) │ │ │ │   │ │ │ │ template │ │ │ │ - void  ggttssaamm::::ddeesseerriiaalliizzeeXXMMLL (const std::string &serialized, T &output, │ │ │ │ - const std::string &name="data") │ │ │ │ -  deserializes from a string in XML │ │ │ │ + void  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::rroouunnddttrriippBBiinnaarryy │ │ │ │ + (const T &input, T &output) │ │ │ │   │ │ │ │ -Binary Serialization │ │ │ │ -Serialization to binary format with named structures │ │ │ │ template │ │ │ │ - void  _g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_S_t_r_e_a_m (const T &input, std::ostream │ │ │ │ - &out_archive_stream, const std::string &name="data") │ │ │ │ + void  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::rroouunnddttrriippBBiinnaarryyFFiillee │ │ │ │ + (const T &input, T &output) │ │ │ │   │ │ │ │ template │ │ │ │ - void  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommBBiinnaarryySSttrreeaamm (std::istream │ │ │ │ - &in_archive_stream, T &output, const std::string &name="data") │ │ │ │ -  deserializes from a stream in binary │ │ │ │ + bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::eeqquuaalliittyyBBiinnaarryy (const │ │ │ │ + T &input=T()) │ │ │ │   │ │ │ │ template │ │ │ │ -std::string  ggttssaamm::::sseerriiaalliizzeeTTooBBiinnaarryySSttrriinngg (const T &input, const std::string │ │ │ │ - &name="data") │ │ │ │ -  serializes to a string in binary │ │ │ │ + bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss::::eeqquuaallssBBiinnaarryy (const T │ │ │ │ + &input=T()) │ │ │ │   │ │ │ │ template │ │ │ │ - void  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommBBiinnaarryySSttrriinngg (const std::string &serialized, │ │ │ │ - T &output, const std::string &name="data") │ │ │ │ -  deserializes from a string in binary │ │ │ │ + bool  ggttssaamm::::sseerriiaalliizzaattiioonnTTeessttHHeellppeerrss:::: │ │ │ │ + eeqquuaallssDDeerreeffeerreenncceeddBBiinnaarryy (const T &input=T()) │ │ │ │   │ │ │ │ -template │ │ │ │ - bool  ggttssaamm::::sseerriiaalliizzeeTTooBBiinnaarryyFFiillee (const T &input, const std::string │ │ │ │ - &filename, const std::string &name="data") │ │ │ │ -  serializes to a binary file │ │ │ │ -  │ │ │ │ -template │ │ │ │ - bool  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommBBiinnaarryyFFiillee (const std::string &filename, T │ │ │ │ - &output, const std::string &name="data") │ │ │ │ -  deserializes from a binary file │ │ │ │ -  │ │ │ │ -template │ │ │ │ -std::string  ggttssaamm::::sseerriiaalliizzeeBBiinnaarryy (const T &input, const std::string │ │ │ │ - &name="data") │ │ │ │ -  serializes to a string in binary │ │ │ │ -  │ │ │ │ -template │ │ │ │ - void  ggttssaamm::::ddeesseerriiaalliizzeeBBiinnaarryy (const std::string &serialized, T │ │ │ │ - &output, const std::string &name="data") │ │ │ │ -  deserializes from a string in binary │ │ │ │ +VVaarriiaabblleess │ │ │ │ +const bool  vveerrbboossee = false │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Convenience functions for serializing data structures via boost.serialization. │ │ │ │ Author │ │ │ │ Alex Cunningham │ │ │ │ Richard Roberts │ │ │ │ Date │ │ │ │ Feb 7, 2012 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _s_e_r_i_a_l_i_z_a_t_i_o_n_._h │ │ │ │ + * _s_e_r_i_a_l_i_z_a_t_i_o_n_T_e_s_t_H_e_l_p_e_r_s_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00029_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/serialization.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/serializationTestHelpers.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,15 +98,15 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
serialization.h
│ │ │ +
serializationTestHelpers.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │ @@ -114,303 +114,186 @@ │ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │
20#pragma once
│ │ │
21
│ │ │ -
22#include <Eigen/Core>
│ │ │ -
23#include <fstream>
│ │ │ -
24#include <sstream>
│ │ │ -
25#include <string>
│ │ │ -
26
│ │ │ -
27// includes for standard serialization types
│ │ │ -
28#include <boost/serialization/version.hpp>
│ │ │ -
29#include <boost/serialization/optional.hpp>
│ │ │ -
30#include <boost/serialization/shared_ptr.hpp>
│ │ │ -
31#include <boost/serialization/vector.hpp>
│ │ │ -
32#include <boost/serialization/map.hpp>
│ │ │ -
33#include <boost/serialization/list.hpp>
│ │ │ -
34#include <boost/serialization/deque.hpp>
│ │ │ -
35#include <boost/serialization/weak_ptr.hpp>
│ │ │ -
36
│ │ │ -
37#include <boost/archive/text_oarchive.hpp>
│ │ │ -
38#include <boost/archive/text_iarchive.hpp>
│ │ │ -
39#include <boost/archive/xml_iarchive.hpp>
│ │ │ -
40#include <boost/archive/xml_oarchive.hpp>
│ │ │ -
41#include <boost/archive/binary_iarchive.hpp>
│ │ │ -
42#include <boost/archive/binary_oarchive.hpp>
│ │ │ -
43#include <boost/serialization/export.hpp>
│ │ │ -
44
│ │ │ -
45// Workaround a bug in GCC >= 7 and C++17
│ │ │ -
46// ref. https://gitlab.com/libeigen/eigen/-/issues/1676
│ │ │ -
47#ifdef __GNUC__
│ │ │ -
48#if __GNUC__ >= 7 && __cplusplus >= 201703L
│ │ │ -
49namespace boost { namespace serialization { struct U; } }
│ │ │ -
50namespace Eigen { namespace internal {
│ │ │ -
51template<> struct traits<boost::serialization::U> {enum {Flags=0};};
│ │ │ -
52} }
│ │ │ -
53#endif
│ │ │ -
54#endif
│ │ │ -
55
│ │ │ -
56namespace gtsam {
│ │ │ -
57
│ │ │ -
63template <class T>
│ │ │ -
│ │ │ -
64void serializeToStream(const T& input, std::ostream& out_archive_stream) {
│ │ │ -
65 boost::archive::text_oarchive out_archive(out_archive_stream);
│ │ │ -
66 out_archive << input;
│ │ │ -
67}
│ │ │ -
│ │ │ -
68
│ │ │ -
70template <class T>
│ │ │ -
│ │ │ -
71void deserializeFromStream(std::istream& in_archive_stream, T& output) {
│ │ │ -
72 boost::archive::text_iarchive in_archive(in_archive_stream);
│ │ │ -
73 in_archive >> output;
│ │ │ -
74}
│ │ │ -
│ │ │ -
75
│ │ │ -
77template <class T>
│ │ │ -
│ │ │ -
78std::string serializeToString(const T& input) {
│ │ │ -
79 std::ostringstream out_archive_stream;
│ │ │ -
80 serializeToStream(input, out_archive_stream);
│ │ │ -
81 return out_archive_stream.str();
│ │ │ -
82}
│ │ │ -
│ │ │ -
83
│ │ │ -
85template <class T>
│ │ │ -
│ │ │ -
86void deserializeFromString(const std::string& serialized, T& output) {
│ │ │ -
87 std::istringstream in_archive_stream(serialized);
│ │ │ -
88 deserializeFromStream(in_archive_stream, output);
│ │ │ -
89}
│ │ │ -
│ │ │ -
90
│ │ │ -
92template <class T>
│ │ │ -
│ │ │ -
93bool serializeToFile(const T& input, const std::string& filename) {
│ │ │ -
94 std::ofstream out_archive_stream(filename.c_str());
│ │ │ -
95 if (!out_archive_stream.is_open()) return false;
│ │ │ -
96 serializeToStream(input, out_archive_stream);
│ │ │ -
97 out_archive_stream.close();
│ │ │ -
98 return true;
│ │ │ +
22#include <iostream>
│ │ │ +
23#include <sstream>
│ │ │ +
24#include <string>
│ │ │ +
25
│ │ │ + │ │ │ +
27
│ │ │ +
28#include <boost/serialization/serialization.hpp>
│ │ │ +
29#include <boost/filesystem.hpp>
│ │ │ +
30
│ │ │ +
31
│ │ │ +
32// whether to print the serialized text to stdout
│ │ │ +
33const bool verbose = false;
│ │ │ +
34
│ │ │ +
35namespace gtsam {
│ │ │ +
36namespace serializationTestHelpers {
│ │ │ +
37
│ │ │ +
38// templated default object creation so we only need to declare one friend (if applicable)
│ │ │ +
39template<class T>
│ │ │ +
40T create() {
│ │ │ +
41 return T();
│ │ │ +
42}
│ │ │ +
43
│ │ │ +
44// Creates or empties a folder in the build folder and returns the relative path
│ │ │ +
45inline boost::filesystem::path resetFilesystem(
│ │ │ +
46 boost::filesystem::path folder = "actual") {
│ │ │ +
47 boost::filesystem::remove_all(folder);
│ │ │ +
48 boost::filesystem::create_directory(folder);
│ │ │ +
49 return folder;
│ │ │ +
50}
│ │ │ +
51
│ │ │ +
52// Templated round-trip serialization
│ │ │ +
53template<class T>
│ │ │ +
54void roundtrip(const T& input, T& output) {
│ │ │ +
55 std::string serialized = serialize(input);
│ │ │ +
56 if (verbose) std::cout << serialized << std::endl << std::endl;
│ │ │ +
57 deserialize(serialized, output);
│ │ │ +
58}
│ │ │ +
59
│ │ │ +
60// Templated round-trip serialization using a file
│ │ │ +
61template<class T>
│ │ │ +
62void roundtripFile(const T& input, T& output) {
│ │ │ +
63 boost::filesystem::path path = resetFilesystem()/"graph.dat";
│ │ │ +
64 serializeToFile(input, path.string());
│ │ │ +
65 deserializeFromFile(path.string(), output);
│ │ │ +
66}
│ │ │ +
67
│ │ │ +
68// This version requires equality operator and uses string and file round-trips
│ │ │ +
69template<class T>
│ │ │ +
70bool equality(const T& input = T()) {
│ │ │ +
71 T output = create<T>(), outputf = create<T>();
│ │ │ +
72 roundtrip<T>(input,output);
│ │ │ +
73 roundtripFile<T>(input,outputf);
│ │ │ +
74 return (input==output) && (input==outputf);
│ │ │ +
75}
│ │ │ +
76
│ │ │ +
77// This version requires Testable
│ │ │ +
78template<class T>
│ │ │ +
79bool equalsObj(const T& input = T()) {
│ │ │ +
80 T output = create<T>();
│ │ │ +
81 roundtrip<T>(input,output);
│ │ │ +
82 return assert_equal(input, output);
│ │ │ +
83}
│ │ │ +
84
│ │ │ +
85// De-referenced version for pointers, requires equals method
│ │ │ +
86template<class T>
│ │ │ +
87bool equalsDereferenced(const T& input) {
│ │ │ +
88 T output = create<T>();
│ │ │ +
89 roundtrip<T>(input,output);
│ │ │ +
90 return input->equals(*output);
│ │ │ +
91}
│ │ │ +
92
│ │ │ +
93// Templated round-trip serialization using XML
│ │ │ +
94template<class T>
│ │ │ +
95void roundtripXML(const T& input, T& output) {
│ │ │ +
96 std::string serialized = serializeXML<T>(input);
│ │ │ +
97 if (verbose) std::cout << serialized << std::endl << std::endl;
│ │ │ +
98 deserializeXML(serialized, output);
│ │ │
99}
│ │ │ -
│ │ │
100
│ │ │ -
102template <class T>
│ │ │ -
│ │ │ -
103bool deserializeFromFile(const std::string& filename, T& output) {
│ │ │ -
104 std::ifstream in_archive_stream(filename.c_str());
│ │ │ -
105 if (!in_archive_stream.is_open()) return false;
│ │ │ -
106 deserializeFromStream(in_archive_stream, output);
│ │ │ -
107 in_archive_stream.close();
│ │ │ -
108 return true;
│ │ │ -
109}
│ │ │ -
│ │ │ -
110
│ │ │ -
112template <class T>
│ │ │ -
│ │ │ -
113std::string serialize(const T& input) {
│ │ │ -
114 return serializeToString(input);
│ │ │ -
115}
│ │ │ -
│ │ │ -
116
│ │ │ -
118template <class T>
│ │ │ -
│ │ │ -
119void deserialize(const std::string& serialized, T& output) {
│ │ │ -
120 deserializeFromString(serialized, output);
│ │ │ -
121}
│ │ │ -
│ │ │ -
123
│ │ │ -
129template <class T>
│ │ │ -
│ │ │ -
130void serializeToXMLStream(const T& input, std::ostream& out_archive_stream,
│ │ │ -
131 const std::string& name = "data") {
│ │ │ -
132 boost::archive::xml_oarchive out_archive(out_archive_stream);
│ │ │ -
133 out_archive << boost::serialization::make_nvp(name.c_str(), input);
│ │ │ -
134}
│ │ │ -
│ │ │ -
135
│ │ │ -
137template <class T>
│ │ │ -
│ │ │ -
138void deserializeFromXMLStream(std::istream& in_archive_stream, T& output,
│ │ │ -
139 const std::string& name = "data") {
│ │ │ -
140 boost::archive::xml_iarchive in_archive(in_archive_stream);
│ │ │ -
141 in_archive >> boost::serialization::make_nvp(name.c_str(), output);
│ │ │ -
142}
│ │ │ -
│ │ │ -
143
│ │ │ -
145template <class T>
│ │ │ -
│ │ │ -
146std::string serializeToXMLString(const T& input,
│ │ │ -
147 const std::string& name = "data") {
│ │ │ -
148 std::ostringstream out_archive_stream;
│ │ │ -
149 serializeToXMLStream(input, out_archive_stream, name);
│ │ │ -
150 return out_archive_stream.str();
│ │ │ -
151}
│ │ │ -
│ │ │ -
152
│ │ │ -
154template <class T>
│ │ │ -
│ │ │ -
155void deserializeFromXMLString(const std::string& serialized, T& output,
│ │ │ -
156 const std::string& name = "data") {
│ │ │ -
157 std::istringstream in_archive_stream(serialized);
│ │ │ -
158 deserializeFromXMLStream(in_archive_stream, output, name);
│ │ │ -
159}
│ │ │ -
│ │ │ -
160
│ │ │ -
162template <class T>
│ │ │ -
│ │ │ -
163bool serializeToXMLFile(const T& input, const std::string& filename,
│ │ │ -
164 const std::string& name = "data") {
│ │ │ -
165 std::ofstream out_archive_stream(filename.c_str());
│ │ │ -
166 if (!out_archive_stream.is_open()) return false;
│ │ │ -
167 serializeToXMLStream(input, out_archive_stream, name);
│ │ │ -
168 out_archive_stream.close();
│ │ │ -
169 return true;
│ │ │ -
170}
│ │ │ -
│ │ │ -
171
│ │ │ -
173template <class T>
│ │ │ -
│ │ │ -
174bool deserializeFromXMLFile(const std::string& filename, T& output,
│ │ │ -
175 const std::string& name = "data") {
│ │ │ -
176 std::ifstream in_archive_stream(filename.c_str());
│ │ │ -
177 if (!in_archive_stream.is_open()) return false;
│ │ │ -
178 deserializeFromXMLStream(in_archive_stream, output, name);
│ │ │ -
179 in_archive_stream.close();
│ │ │ -
180 return true;
│ │ │ -
181}
│ │ │ -
│ │ │ -
182
│ │ │ -
184template <class T>
│ │ │ -
│ │ │ -
185std::string serializeXML(const T& input,
│ │ │ -
186 const std::string& name = "data") {
│ │ │ -
187 return serializeToXMLString(input, name);
│ │ │ -
188}
│ │ │ -
│ │ │ -
189
│ │ │ -
191template <class T>
│ │ │ -
│ │ │ -
192void deserializeXML(const std::string& serialized, T& output,
│ │ │ -
193 const std::string& name = "data") {
│ │ │ -
194 deserializeFromXMLString(serialized, output, name);
│ │ │ -
195}
│ │ │ -
│ │ │ -
197
│ │ │ -
203template <class T>
│ │ │ -
│ │ │ -
204void serializeToBinaryStream(const T& input, std::ostream& out_archive_stream,
│ │ │ -
205 const std::string& name = "data") {
│ │ │ -
206 boost::archive::binary_oarchive out_archive(out_archive_stream);
│ │ │ -
207 out_archive << boost::serialization::make_nvp(name.c_str(), input);
│ │ │ -
208}
│ │ │ -
│ │ │ -
209
│ │ │ -
211template <class T>
│ │ │ -
│ │ │ -
212void deserializeFromBinaryStream(std::istream& in_archive_stream, T& output,
│ │ │ -
213 const std::string& name = "data") {
│ │ │ -
214 boost::archive::binary_iarchive in_archive(in_archive_stream);
│ │ │ -
215 in_archive >> boost::serialization::make_nvp(name.c_str(), output);
│ │ │ -
216}
│ │ │ -
│ │ │ -
217
│ │ │ -
219template <class T>
│ │ │ -
│ │ │ -
220std::string serializeToBinaryString(const T& input,
│ │ │ -
221 const std::string& name = "data") {
│ │ │ -
222 std::ostringstream out_archive_stream;
│ │ │ -
223 serializeToBinaryStream(input, out_archive_stream, name);
│ │ │ -
224 return out_archive_stream.str();
│ │ │ -
225}
│ │ │ -
│ │ │ -
226
│ │ │ -
228template <class T>
│ │ │ -
│ │ │ -
229void deserializeFromBinaryString(const std::string& serialized, T& output,
│ │ │ -
230 const std::string& name = "data") {
│ │ │ -
231 std::istringstream in_archive_stream(serialized);
│ │ │ -
232 deserializeFromBinaryStream(in_archive_stream, output, name);
│ │ │ -
233}
│ │ │ -
│ │ │ -
234
│ │ │ -
236template <class T>
│ │ │ -
│ │ │ -
237bool serializeToBinaryFile(const T& input, const std::string& filename,
│ │ │ -
238 const std::string& name = "data") {
│ │ │ -
239 std::ofstream out_archive_stream(filename.c_str());
│ │ │ -
240 if (!out_archive_stream.is_open()) return false;
│ │ │ -
241 serializeToBinaryStream(input, out_archive_stream, name);
│ │ │ -
242 out_archive_stream.close();
│ │ │ -
243 return true;
│ │ │ -
244}
│ │ │ -
│ │ │ -
245
│ │ │ -
247template <class T>
│ │ │ -
│ │ │ -
248bool deserializeFromBinaryFile(const std::string& filename, T& output,
│ │ │ -
249 const std::string& name = "data") {
│ │ │ -
250 std::ifstream in_archive_stream(filename.c_str());
│ │ │ -
251 if (!in_archive_stream.is_open()) return false;
│ │ │ -
252 deserializeFromBinaryStream(in_archive_stream, output, name);
│ │ │ -
253 in_archive_stream.close();
│ │ │ -
254 return true;
│ │ │ -
255}
│ │ │ -
│ │ │ -
256
│ │ │ -
258template <class T>
│ │ │ -
│ │ │ -
259std::string serializeBinary(const T& input,
│ │ │ -
260 const std::string& name = "data") {
│ │ │ -
261 return serializeToBinaryString(input, name);
│ │ │ -
262}
│ │ │ -
│ │ │ -
263
│ │ │ -
265template <class T>
│ │ │ -
│ │ │ -
266void deserializeBinary(const std::string& serialized, T& output,
│ │ │ -
267 const std::string& name = "data") {
│ │ │ -
268 deserializeFromBinaryString(serialized, output, name);
│ │ │ -
269}
│ │ │ -
│ │ │ -
271
│ │ │ -
272} // namespace gtsam
│ │ │ +
101// Templated round-trip serialization using XML File
│ │ │ +
102template<class T>
│ │ │ +
103void roundtripXMLFile(const T& input, T& output) {
│ │ │ +
104 boost::filesystem::path path = resetFilesystem()/"graph.xml";
│ │ │ +
105 serializeToXMLFile(input, path.string());
│ │ │ +
106 deserializeFromXMLFile(path.string(), output);
│ │ │ +
107}
│ │ │ +
108
│ │ │ +
109// This version requires equality operator
│ │ │ +
110template<class T>
│ │ │ +
111bool equalityXML(const T& input = T()) {
│ │ │ +
112 T output = create<T>(), outputf = create<T>();
│ │ │ +
113 roundtripXML<T>(input,output);
│ │ │ +
114 roundtripXMLFile<T>(input,outputf);
│ │ │ +
115 return (input==output) && (input==outputf);
│ │ │ +
116}
│ │ │ +
117
│ │ │ +
118// This version requires Testable
│ │ │ +
119template<class T>
│ │ │ +
120bool equalsXML(const T& input = T()) {
│ │ │ +
121 T output = create<T>();
│ │ │ +
122 roundtripXML<T>(input,output);
│ │ │ +
123 return assert_equal(input, output);
│ │ │ +
124}
│ │ │ +
125
│ │ │ +
126// This version is for pointers, requires equals method
│ │ │ +
127template<class T>
│ │ │ +
128bool equalsDereferencedXML(const T& input = T()) {
│ │ │ +
129 T output = create<T>();
│ │ │ +
130 roundtripXML<T>(input,output);
│ │ │ +
131 return input->equals(*output);
│ │ │ +
132}
│ │ │ +
133
│ │ │ +
134// Templated round-trip serialization using XML
│ │ │ +
135template<class T>
│ │ │ +
136void roundtripBinary(const T& input, T& output) {
│ │ │ +
137 std::string serialized = serializeBinary<T>(input);
│ │ │ +
138 if (verbose) std::cout << serialized << std::endl << std::endl;
│ │ │ +
139 deserializeBinary(serialized, output);
│ │ │ +
140}
│ │ │ +
141
│ │ │ +
142// Templated round-trip serialization using Binary file
│ │ │ +
143template<class T>
│ │ │ +
144void roundtripBinaryFile(const T& input, T& output) {
│ │ │ +
145 boost::filesystem::path path = resetFilesystem()/"graph.bin";
│ │ │ +
146 serializeToBinaryFile(input, path.string());
│ │ │ +
147 deserializeFromBinaryFile(path.string(), output);
│ │ │ +
148}
│ │ │ +
149
│ │ │ +
150// This version requires equality operator
│ │ │ +
151template<class T>
│ │ │ +
152bool equalityBinary(const T& input = T()) {
│ │ │ +
153 T output = create<T>(), outputf = create<T>();
│ │ │ +
154 roundtripBinary<T>(input,output);
│ │ │ +
155 roundtripBinaryFile<T>(input,outputf);
│ │ │ +
156 return (input==output) && (input==outputf);
│ │ │ +
157}
│ │ │ +
158
│ │ │ +
159// This version requires Testable
│ │ │ +
160template<class T>
│ │ │ +
161bool equalsBinary(const T& input = T()) {
│ │ │ +
162 T output = create<T>();
│ │ │ +
163 roundtripBinary<T>(input,output);
│ │ │ +
164 return assert_equal(input, output);
│ │ │ +
165}
│ │ │ +
166
│ │ │ +
167// This version is for pointers, requires equals method
│ │ │ +
168template<class T>
│ │ │ +
169bool equalsDereferencedBinary(const T& input = T()) {
│ │ │ +
170 T output = create<T>();
│ │ │ +
171 roundtripBinary<T>(input,output);
│ │ │ +
172 return input->equals(*output);
│ │ │ +
173}
│ │ │ +
174
│ │ │ +
175} // \namespace serializationTestHelpers
│ │ │ +
176} // \namespace gtsam
│ │ │ +
Convenience functions for serializing data structures via boost.serialization.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
void serializeToStream(const T &input, std::ostream &out_archive_stream)
Definition serialization.h:64
│ │ │
bool deserializeFromXMLFile(const std::string &filename, T &output, const std::string &name="data")
deserializes from an XML file
Definition serialization.h:174
│ │ │ -
std::string serializeToXMLString(const T &input, const std::string &name="data")
serializes to a string in XML
Definition serialization.h:146
│ │ │ -
void deserializeFromString(const std::string &serialized, T &output)
deserializes from a string
Definition serialization.h:86
│ │ │
std::string serialize(const T &input)
serializes to a string
Definition serialization.h:113
│ │ │ -
void deserializeFromBinaryString(const std::string &serialized, T &output, const std::string &name="data")
deserializes from a string in binary
Definition serialization.h:229
│ │ │ +
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
equals with an tolerance, prints out message if unequal
Definition Matrix.cpp:43
│ │ │
void deserializeBinary(const std::string &serialized, T &output, const std::string &name="data")
deserializes from a string in binary
Definition serialization.h:266
│ │ │ -
void deserializeFromXMLString(const std::string &serialized, T &output, const std::string &name="data")
deserializes from a string in XML
Definition serialization.h:155
│ │ │ -
std::string serializeToBinaryString(const T &input, const std::string &name="data")
serializes to a string in binary
Definition serialization.h:220
│ │ │
void deserializeXML(const std::string &serialized, T &output, const std::string &name="data")
deserializes from a string in XML
Definition serialization.h:192
│ │ │
bool serializeToXMLFile(const T &input, const std::string &filename, const std::string &name="data")
serializes to an XML file
Definition serialization.h:163
│ │ │ -
void deserializeFromXMLStream(std::istream &in_archive_stream, T &output, const std::string &name="data")
deserializes from a stream in XML
Definition serialization.h:138
│ │ │ -
void deserializeFromBinaryStream(std::istream &in_archive_stream, T &output, const std::string &name="data")
deserializes from a stream in binary
Definition serialization.h:212
│ │ │ -
std::string serializeXML(const T &input, const std::string &name="data")
serializes to a string in XML
Definition serialization.h:185
│ │ │ -
std::string serializeToString(const T &input)
serializes to a string
Definition serialization.h:78
│ │ │
bool serializeToFile(const T &input, const std::string &filename)
serializes to a file
Definition serialization.h:93
│ │ │
void deserialize(const std::string &serialized, T &output)
deserializes from a string
Definition serialization.h:119
│ │ │ -
void serializeToBinaryStream(const T &input, std::ostream &out_archive_stream, const std::string &name="data")
Definition serialization.h:204
│ │ │ -
void deserializeFromStream(std::istream &in_archive_stream, T &output)
deserializes from a stream
Definition serialization.h:71
│ │ │ -
std::string serializeBinary(const T &input, const std::string &name="data")
serializes to a string in binary
Definition serialization.h:259
│ │ │
bool serializeToBinaryFile(const T &input, const std::string &filename, const std::string &name="data")
serializes to a binary file
Definition serialization.h:237
│ │ │
bool deserializeFromFile(const std::string &filename, T &output)
deserializes from a file
Definition serialization.h:103
│ │ │ -
void serializeToXMLStream(const T &input, std::ostream &out_archive_stream, const std::string &name="data")
Definition serialization.h:130
│ │ │
bool deserializeFromBinaryFile(const std::string &filename, T &output, const std::string &name="data")
deserializes from a binary file
Definition serialization.h:248
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -serialization.h │ │ │ │ +serializationTestHelpers.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ @@ -16,334 +16,224 @@ │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ 20#pragma once │ │ │ │ 21 │ │ │ │ -22#include │ │ │ │ -23#include │ │ │ │ -24#include │ │ │ │ -25#include │ │ │ │ -26 │ │ │ │ -27// includes for standard serialization types │ │ │ │ -28#include │ │ │ │ -29#include │ │ │ │ -30#include │ │ │ │ -31#include │ │ │ │ -32#include │ │ │ │ -33#include │ │ │ │ -34#include │ │ │ │ -35#include │ │ │ │ -36 │ │ │ │ -37#include │ │ │ │ -38#include │ │ │ │ -39#include │ │ │ │ -40#include │ │ │ │ -41#include │ │ │ │ -42#include │ │ │ │ -43#include │ │ │ │ -44 │ │ │ │ -45// Workaround a bug in GCC >= 7 and C++17 │ │ │ │ -46// ref. https://gitlab.com/libeigen/eigen/-/issues/1676 │ │ │ │ -47#ifdef __GNUC__ │ │ │ │ -48#if __GNUC__ >= 7 && __cplusplus >= 201703L │ │ │ │ -49namespace boost { namespace serialization { struct U; } } │ │ │ │ -50namespace Eigen { namespace internal { │ │ │ │ -51template<> struct traits {enum {Flags=0};}; │ │ │ │ -52} } │ │ │ │ -53#endif │ │ │ │ -54#endif │ │ │ │ -55 │ │ │ │ -56namespace _g_t_s_a_m { │ │ │ │ -57 │ │ │ │ -63template │ │ │ │ -_6_4void _s_e_r_i_a_l_i_z_e_T_o_S_t_r_e_a_m(const T& input, std::ostream& out_archive_stream) { │ │ │ │ -65 boost::archive::text_oarchive out_archive(out_archive_stream); │ │ │ │ -66 out_archive << input; │ │ │ │ -67} │ │ │ │ -68 │ │ │ │ -70template │ │ │ │ -_7_1void _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_S_t_r_e_a_m(std::istream& in_archive_stream, T& output) { │ │ │ │ -72 boost::archive::text_iarchive in_archive(in_archive_stream); │ │ │ │ -73 in_archive >> output; │ │ │ │ -74} │ │ │ │ -75 │ │ │ │ -77template │ │ │ │ -_7_8std::string _s_e_r_i_a_l_i_z_e_T_o_S_t_r_i_n_g(const T& input) { │ │ │ │ -79 std::ostringstream out_archive_stream; │ │ │ │ -80 _s_e_r_i_a_l_i_z_e_T_o_S_t_r_e_a_m(input, out_archive_stream); │ │ │ │ -81 return out_archive_stream.str(); │ │ │ │ -82} │ │ │ │ -83 │ │ │ │ -85template │ │ │ │ -_8_6void _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_S_t_r_i_n_g(const std::string& serialized, T& output) { │ │ │ │ -87 std::istringstream in_archive_stream(serialized); │ │ │ │ -88 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_S_t_r_e_a_m(in_archive_stream, output); │ │ │ │ -89} │ │ │ │ -90 │ │ │ │ -92template │ │ │ │ -_9_3bool _s_e_r_i_a_l_i_z_e_T_o_F_i_l_e(const T& input, const std::string& filename) { │ │ │ │ -94 std::ofstream out_archive_stream(filename.c_str()); │ │ │ │ -95 if (!out_archive_stream.is_open()) return false; │ │ │ │ -96 _s_e_r_i_a_l_i_z_e_T_o_S_t_r_e_a_m(input, out_archive_stream); │ │ │ │ -97 out_archive_stream.close(); │ │ │ │ -98 return true; │ │ │ │ +22#include │ │ │ │ +23#include │ │ │ │ +24#include │ │ │ │ +25 │ │ │ │ +26#include <_g_t_s_a_m_/_b_a_s_e_/_s_e_r_i_a_l_i_z_a_t_i_o_n_._h> │ │ │ │ +27 │ │ │ │ +28#include │ │ │ │ +29#include │ │ │ │ +30 │ │ │ │ +31 │ │ │ │ +32// whether to print the serialized text to stdout │ │ │ │ +33const bool verbose = false; │ │ │ │ +34 │ │ │ │ +35namespace _g_t_s_a_m { │ │ │ │ +36namespace serializationTestHelpers { │ │ │ │ +37 │ │ │ │ +38// templated default object creation so we only need to declare one friend │ │ │ │ +(if applicable) │ │ │ │ +39template │ │ │ │ +40T create() { │ │ │ │ +41 return T(); │ │ │ │ +42} │ │ │ │ +43 │ │ │ │ +44// Creates or empties a folder in the build folder and returns the relative │ │ │ │ +path │ │ │ │ +45inline boost::filesystem::path resetFilesystem( │ │ │ │ +46 boost::filesystem::path folder = "actual") { │ │ │ │ +47 boost::filesystem::remove_all(folder); │ │ │ │ +48 boost::filesystem::create_directory(folder); │ │ │ │ +49 return folder; │ │ │ │ +50} │ │ │ │ +51 │ │ │ │ +52// Templated round-trip serialization │ │ │ │ +53template │ │ │ │ +54void roundtrip(const T& input, T& output) { │ │ │ │ +55 std::string serialized = _s_e_r_i_a_l_i_z_e(input); │ │ │ │ +56 if (verbose) std::cout << serialized << std::endl << std::endl; │ │ │ │ +57 _d_e_s_e_r_i_a_l_i_z_e(serialized, output); │ │ │ │ +58} │ │ │ │ +59 │ │ │ │ +60// Templated round-trip serialization using a file │ │ │ │ +61template │ │ │ │ +62void roundtripFile(const T& input, T& output) { │ │ │ │ +63 boost::filesystem::path path = resetFilesystem()/"graph.dat"; │ │ │ │ +64 _s_e_r_i_a_l_i_z_e_T_o_F_i_l_e(input, path.string()); │ │ │ │ +65 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_F_i_l_e(path.string(), output); │ │ │ │ +66} │ │ │ │ +67 │ │ │ │ +68// This version requires equality operator and uses string and file round- │ │ │ │ +trips │ │ │ │ +69template │ │ │ │ +70bool equality(const T& input = T()) { │ │ │ │ +71 T output = create(), outputf = create(); │ │ │ │ +72 roundtrip(input,output); │ │ │ │ +73 roundtripFile(input,outputf); │ │ │ │ +74 return (input==output) && (input==outputf); │ │ │ │ +75} │ │ │ │ +76 │ │ │ │ +77// This version requires Testable │ │ │ │ +78template │ │ │ │ +79bool equalsObj(const T& input = T()) { │ │ │ │ +80 T output = create(); │ │ │ │ +81 roundtrip(input,output); │ │ │ │ +82 return _a_s_s_e_r_t___e_q_u_a_l(input, output); │ │ │ │ +83} │ │ │ │ +84 │ │ │ │ +85// De-referenced version for pointers, requires equals method │ │ │ │ +86template │ │ │ │ +87bool equalsDereferenced(const T& input) { │ │ │ │ +88 T output = create(); │ │ │ │ +89 roundtrip(input,output); │ │ │ │ +90 return input->equals(*output); │ │ │ │ +91} │ │ │ │ +92 │ │ │ │ +93// Templated round-trip serialization using XML │ │ │ │ +94template │ │ │ │ +95void roundtripXML(const T& input, T& output) { │ │ │ │ +96 std::string serialized = serializeXML(input); │ │ │ │ +97 if (verbose) std::cout << serialized << std::endl << std::endl; │ │ │ │ +98 _d_e_s_e_r_i_a_l_i_z_e_X_M_L(serialized, output); │ │ │ │ 99} │ │ │ │ 100 │ │ │ │ -102template │ │ │ │ -_1_0_3bool _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_F_i_l_e(const std::string& filename, T& output) { │ │ │ │ -104 std::ifstream in_archive_stream(filename.c_str()); │ │ │ │ -105 if (!in_archive_stream.is_open()) return false; │ │ │ │ -106 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_S_t_r_e_a_m(in_archive_stream, output); │ │ │ │ -107 in_archive_stream.close(); │ │ │ │ -108 return true; │ │ │ │ -109} │ │ │ │ -110 │ │ │ │ -112template │ │ │ │ -_1_1_3std::string _s_e_r_i_a_l_i_z_e(const T& input) { │ │ │ │ -114 return _s_e_r_i_a_l_i_z_e_T_o_S_t_r_i_n_g(input); │ │ │ │ -115} │ │ │ │ -116 │ │ │ │ -118template │ │ │ │ -_1_1_9void _d_e_s_e_r_i_a_l_i_z_e(const std::string& serialized, T& output) { │ │ │ │ -120 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_S_t_r_i_n_g(serialized, output); │ │ │ │ -121} │ │ │ │ -123 │ │ │ │ -129template │ │ │ │ -_1_3_0void _s_e_r_i_a_l_i_z_e_T_o_X_M_L_S_t_r_e_a_m(const T& input, std::ostream& out_archive_stream, │ │ │ │ -131 const std::string& name = "data") { │ │ │ │ -132 boost::archive::xml_oarchive out_archive(out_archive_stream); │ │ │ │ -133 out_archive << boost::serialization::make_nvp(name.c_str(), input); │ │ │ │ -134} │ │ │ │ -135 │ │ │ │ -137template │ │ │ │ -_1_3_8void _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_S_t_r_e_a_m(std::istream& in_archive_stream, T& output, │ │ │ │ -139 const std::string& name = "data") { │ │ │ │ -140 boost::archive::xml_iarchive in_archive(in_archive_stream); │ │ │ │ -141 in_archive >> boost::serialization::make_nvp(name.c_str(), output); │ │ │ │ -142} │ │ │ │ -143 │ │ │ │ -145template │ │ │ │ -_1_4_6std::string _s_e_r_i_a_l_i_z_e_T_o_X_M_L_S_t_r_i_n_g(const T& input, │ │ │ │ -147 const std::string& name = "data") { │ │ │ │ -148 std::ostringstream out_archive_stream; │ │ │ │ -149 _s_e_r_i_a_l_i_z_e_T_o_X_M_L_S_t_r_e_a_m(input, out_archive_stream, name); │ │ │ │ -150 return out_archive_stream.str(); │ │ │ │ -151} │ │ │ │ -152 │ │ │ │ -154template │ │ │ │ -_1_5_5void _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_S_t_r_i_n_g(const std::string& serialized, T& output, │ │ │ │ -156 const std::string& name = "data") { │ │ │ │ -157 std::istringstream in_archive_stream(serialized); │ │ │ │ -158 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_S_t_r_e_a_m(in_archive_stream, output, name); │ │ │ │ -159} │ │ │ │ -160 │ │ │ │ -162template │ │ │ │ -_1_6_3bool _s_e_r_i_a_l_i_z_e_T_o_X_M_L_F_i_l_e(const T& input, const std::string& filename, │ │ │ │ -164 const std::string& name = "data") { │ │ │ │ -165 std::ofstream out_archive_stream(filename.c_str()); │ │ │ │ -166 if (!out_archive_stream.is_open()) return false; │ │ │ │ -167 _s_e_r_i_a_l_i_z_e_T_o_X_M_L_S_t_r_e_a_m(input, out_archive_stream, name); │ │ │ │ -168 out_archive_stream.close(); │ │ │ │ -169 return true; │ │ │ │ -170} │ │ │ │ -171 │ │ │ │ -173template │ │ │ │ -_1_7_4bool _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_F_i_l_e(const std::string& filename, T& output, │ │ │ │ -175 const std::string& name = "data") { │ │ │ │ -176 std::ifstream in_archive_stream(filename.c_str()); │ │ │ │ -177 if (!in_archive_stream.is_open()) return false; │ │ │ │ -178 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_S_t_r_e_a_m(in_archive_stream, output, name); │ │ │ │ -179 in_archive_stream.close(); │ │ │ │ -180 return true; │ │ │ │ -181} │ │ │ │ -182 │ │ │ │ -184template │ │ │ │ -_1_8_5std::string _s_e_r_i_a_l_i_z_e_X_M_L(const T& input, │ │ │ │ -186 const std::string& name = "data") { │ │ │ │ -187 return _s_e_r_i_a_l_i_z_e_T_o_X_M_L_S_t_r_i_n_g(input, name); │ │ │ │ -188} │ │ │ │ -189 │ │ │ │ -191template │ │ │ │ -_1_9_2void _d_e_s_e_r_i_a_l_i_z_e_X_M_L(const std::string& serialized, T& output, │ │ │ │ -193 const std::string& name = "data") { │ │ │ │ -194 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_S_t_r_i_n_g(serialized, output, name); │ │ │ │ -195} │ │ │ │ -197 │ │ │ │ -203template │ │ │ │ -_2_0_4void _s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_S_t_r_e_a_m(const T& input, std::ostream& │ │ │ │ -out_archive_stream, │ │ │ │ -205 const std::string& name = "data") { │ │ │ │ -206 boost::archive::binary_oarchive out_archive(out_archive_stream); │ │ │ │ -207 out_archive << boost::serialization::make_nvp(name.c_str(), input); │ │ │ │ -208} │ │ │ │ -209 │ │ │ │ -211template │ │ │ │ -_2_1_2void _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_S_t_r_e_a_m(std::istream& in_archive_stream, T& output, │ │ │ │ -213 const std::string& name = "data") { │ │ │ │ -214 boost::archive::binary_iarchive in_archive(in_archive_stream); │ │ │ │ -215 in_archive >> boost::serialization::make_nvp(name.c_str(), output); │ │ │ │ -216} │ │ │ │ -217 │ │ │ │ -219template │ │ │ │ -_2_2_0std::string _s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_S_t_r_i_n_g(const T& input, │ │ │ │ -221 const std::string& name = "data") { │ │ │ │ -222 std::ostringstream out_archive_stream; │ │ │ │ -223 _s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_S_t_r_e_a_m(input, out_archive_stream, name); │ │ │ │ -224 return out_archive_stream.str(); │ │ │ │ -225} │ │ │ │ -226 │ │ │ │ -228template │ │ │ │ -_2_2_9void _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_S_t_r_i_n_g(const std::string& serialized, T& output, │ │ │ │ -230 const std::string& name = "data") { │ │ │ │ -231 std::istringstream in_archive_stream(serialized); │ │ │ │ -232 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_S_t_r_e_a_m(in_archive_stream, output, name); │ │ │ │ -233} │ │ │ │ -234 │ │ │ │ -236template │ │ │ │ -_2_3_7bool _s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_F_i_l_e(const T& input, const std::string& filename, │ │ │ │ -238 const std::string& name = "data") { │ │ │ │ -239 std::ofstream out_archive_stream(filename.c_str()); │ │ │ │ -240 if (!out_archive_stream.is_open()) return false; │ │ │ │ -241 _s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_S_t_r_e_a_m(input, out_archive_stream, name); │ │ │ │ -242 out_archive_stream.close(); │ │ │ │ -243 return true; │ │ │ │ -244} │ │ │ │ -245 │ │ │ │ -247template │ │ │ │ -_2_4_8bool _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_F_i_l_e(const std::string& filename, T& output, │ │ │ │ -249 const std::string& name = "data") { │ │ │ │ -250 std::ifstream in_archive_stream(filename.c_str()); │ │ │ │ -251 if (!in_archive_stream.is_open()) return false; │ │ │ │ -252 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_S_t_r_e_a_m(in_archive_stream, output, name); │ │ │ │ -253 in_archive_stream.close(); │ │ │ │ -254 return true; │ │ │ │ -255} │ │ │ │ -256 │ │ │ │ -258template │ │ │ │ -_2_5_9std::string _s_e_r_i_a_l_i_z_e_B_i_n_a_r_y(const T& input, │ │ │ │ -260 const std::string& name = "data") { │ │ │ │ -261 return _s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_S_t_r_i_n_g(input, name); │ │ │ │ -262} │ │ │ │ -263 │ │ │ │ -265template │ │ │ │ -_2_6_6void _d_e_s_e_r_i_a_l_i_z_e_B_i_n_a_r_y(const std::string& serialized, T& output, │ │ │ │ -267 const std::string& name = "data") { │ │ │ │ -268 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_S_t_r_i_n_g(serialized, output, name); │ │ │ │ -269} │ │ │ │ -271 │ │ │ │ -272} // namespace gtsam │ │ │ │ +101// Templated round-trip serialization using XML File │ │ │ │ +102template │ │ │ │ +103void roundtripXMLFile(const T& input, T& output) { │ │ │ │ +104 boost::filesystem::path path = resetFilesystem()/"graph.xml"; │ │ │ │ +105 _s_e_r_i_a_l_i_z_e_T_o_X_M_L_F_i_l_e(input, path.string()); │ │ │ │ +106 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_F_i_l_e(path.string(), output); │ │ │ │ +107} │ │ │ │ +108 │ │ │ │ +109// This version requires equality operator │ │ │ │ +110template │ │ │ │ +111bool equalityXML(const T& input = T()) { │ │ │ │ +112 T output = create(), outputf = create(); │ │ │ │ +113 roundtripXML(input,output); │ │ │ │ +114 roundtripXMLFile(input,outputf); │ │ │ │ +115 return (input==output) && (input==outputf); │ │ │ │ +116} │ │ │ │ +117 │ │ │ │ +118// This version requires Testable │ │ │ │ +119template │ │ │ │ +120bool equalsXML(const T& input = T()) { │ │ │ │ +121 T output = create(); │ │ │ │ +122 roundtripXML(input,output); │ │ │ │ +123 return _a_s_s_e_r_t___e_q_u_a_l(input, output); │ │ │ │ +124} │ │ │ │ +125 │ │ │ │ +126// This version is for pointers, requires equals method │ │ │ │ +127template │ │ │ │ +128bool equalsDereferencedXML(const T& input = T()) { │ │ │ │ +129 T output = create(); │ │ │ │ +130 roundtripXML(input,output); │ │ │ │ +131 return input->equals(*output); │ │ │ │ +132} │ │ │ │ +133 │ │ │ │ +134// Templated round-trip serialization using XML │ │ │ │ +135template │ │ │ │ +136void roundtripBinary(const T& input, T& output) { │ │ │ │ +137 std::string serialized = serializeBinary(input); │ │ │ │ +138 if (verbose) std::cout << serialized << std::endl << std::endl; │ │ │ │ +139 _d_e_s_e_r_i_a_l_i_z_e_B_i_n_a_r_y(serialized, output); │ │ │ │ +140} │ │ │ │ +141 │ │ │ │ +142// Templated round-trip serialization using Binary file │ │ │ │ +143template │ │ │ │ +144void roundtripBinaryFile(const T& input, T& output) { │ │ │ │ +145 boost::filesystem::path path = resetFilesystem()/"graph.bin"; │ │ │ │ +146 _s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_F_i_l_e(input, path.string()); │ │ │ │ +147 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_F_i_l_e(path.string(), output); │ │ │ │ +148} │ │ │ │ +149 │ │ │ │ +150// This version requires equality operator │ │ │ │ +151template │ │ │ │ +152bool equalityBinary(const T& input = T()) { │ │ │ │ +153 T output = create(), outputf = create(); │ │ │ │ +154 roundtripBinary(input,output); │ │ │ │ +155 roundtripBinaryFile(input,outputf); │ │ │ │ +156 return (input==output) && (input==outputf); │ │ │ │ +157} │ │ │ │ +158 │ │ │ │ +159// This version requires Testable │ │ │ │ +160template │ │ │ │ +161bool equalsBinary(const T& input = T()) { │ │ │ │ +162 T output = create(); │ │ │ │ +163 roundtripBinary(input,output); │ │ │ │ +164 return _a_s_s_e_r_t___e_q_u_a_l(input, output); │ │ │ │ +165} │ │ │ │ +166 │ │ │ │ +167// This version is for pointers, requires equals method │ │ │ │ +168template │ │ │ │ +169bool equalsDereferencedBinary(const T& input = T()) { │ │ │ │ +170 T output = create(); │ │ │ │ +171 roundtripBinary(input,output); │ │ │ │ +172 return input->equals(*output); │ │ │ │ +173} │ │ │ │ +174 │ │ │ │ +175} // \namespace serializationTestHelpers │ │ │ │ +176} // \namespace gtsam │ │ │ │ +_s_e_r_i_a_l_i_z_a_t_i_o_n_._h │ │ │ │ +Convenience functions for serializing data structures via boost.serialization. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_S_t_r_e_a_m │ │ │ │ -void serializeToStream(const T &input, std::ostream &out_archive_stream) │ │ │ │ -DDeeffiinniittiioonn serialization.h:64 │ │ │ │ _g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_F_i_l_e │ │ │ │ bool deserializeFromXMLFile(const std::string &filename, T &output, const std:: │ │ │ │ string &name="data") │ │ │ │ deserializes from an XML file │ │ │ │ DDeeffiinniittiioonn serialization.h:174 │ │ │ │ -_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_X_M_L_S_t_r_i_n_g │ │ │ │ -std::string serializeToXMLString(const T &input, const std::string │ │ │ │ -&name="data") │ │ │ │ -serializes to a string in XML │ │ │ │ -DDeeffiinniittiioonn serialization.h:146 │ │ │ │ -_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_S_t_r_i_n_g │ │ │ │ -void deserializeFromString(const std::string &serialized, T &output) │ │ │ │ -deserializes from a string │ │ │ │ -DDeeffiinniittiioonn serialization.h:86 │ │ │ │ _g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e │ │ │ │ std::string serialize(const T &input) │ │ │ │ serializes to a string │ │ │ │ DDeeffiinniittiioonn serialization.h:113 │ │ │ │ -_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_S_t_r_i_n_g │ │ │ │ -void deserializeFromBinaryString(const std::string &serialized, T &output, │ │ │ │ -const std::string &name="data") │ │ │ │ -deserializes from a string in binary │ │ │ │ -DDeeffiinniittiioonn serialization.h:229 │ │ │ │ +_g_t_s_a_m_:_:_a_s_s_e_r_t___e_q_u_a_l │ │ │ │ +bool assert_equal(const Matrix &expected, const Matrix &actual, double tol) │ │ │ │ +equals with an tolerance, prints out message if unequal │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:43 │ │ │ │ _g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_B_i_n_a_r_y │ │ │ │ void deserializeBinary(const std::string &serialized, T &output, const std:: │ │ │ │ string &name="data") │ │ │ │ deserializes from a string in binary │ │ │ │ DDeeffiinniittiioonn serialization.h:266 │ │ │ │ -_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_S_t_r_i_n_g │ │ │ │ -void deserializeFromXMLString(const std::string &serialized, T &output, const │ │ │ │ -std::string &name="data") │ │ │ │ -deserializes from a string in XML │ │ │ │ -DDeeffiinniittiioonn serialization.h:155 │ │ │ │ -_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_S_t_r_i_n_g │ │ │ │ -std::string serializeToBinaryString(const T &input, const std::string │ │ │ │ -&name="data") │ │ │ │ -serializes to a string in binary │ │ │ │ -DDeeffiinniittiioonn serialization.h:220 │ │ │ │ _g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_X_M_L │ │ │ │ void deserializeXML(const std::string &serialized, T &output, const std::string │ │ │ │ &name="data") │ │ │ │ deserializes from a string in XML │ │ │ │ DDeeffiinniittiioonn serialization.h:192 │ │ │ │ _g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_X_M_L_F_i_l_e │ │ │ │ bool serializeToXMLFile(const T &input, const std::string &filename, const │ │ │ │ std::string &name="data") │ │ │ │ serializes to an XML file │ │ │ │ DDeeffiinniittiioonn serialization.h:163 │ │ │ │ -_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_S_t_r_e_a_m │ │ │ │ -void deserializeFromXMLStream(std::istream &in_archive_stream, T &output, const │ │ │ │ -std::string &name="data") │ │ │ │ -deserializes from a stream in XML │ │ │ │ -DDeeffiinniittiioonn serialization.h:138 │ │ │ │ -_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_S_t_r_e_a_m │ │ │ │ -void deserializeFromBinaryStream(std::istream &in_archive_stream, T &output, │ │ │ │ -const std::string &name="data") │ │ │ │ -deserializes from a stream in binary │ │ │ │ -DDeeffiinniittiioonn serialization.h:212 │ │ │ │ -_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_X_M_L │ │ │ │ -std::string serializeXML(const T &input, const std::string &name="data") │ │ │ │ -serializes to a string in XML │ │ │ │ -DDeeffiinniittiioonn serialization.h:185 │ │ │ │ -_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_S_t_r_i_n_g │ │ │ │ -std::string serializeToString(const T &input) │ │ │ │ -serializes to a string │ │ │ │ -DDeeffiinniittiioonn serialization.h:78 │ │ │ │ _g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_F_i_l_e │ │ │ │ bool serializeToFile(const T &input, const std::string &filename) │ │ │ │ serializes to a file │ │ │ │ DDeeffiinniittiioonn serialization.h:93 │ │ │ │ _g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e │ │ │ │ void deserialize(const std::string &serialized, T &output) │ │ │ │ deserializes from a string │ │ │ │ DDeeffiinniittiioonn serialization.h:119 │ │ │ │ -_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_S_t_r_e_a_m │ │ │ │ -void serializeToBinaryStream(const T &input, std::ostream &out_archive_stream, │ │ │ │ -const std::string &name="data") │ │ │ │ -DDeeffiinniittiioonn serialization.h:204 │ │ │ │ -_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_S_t_r_e_a_m │ │ │ │ -void deserializeFromStream(std::istream &in_archive_stream, T &output) │ │ │ │ -deserializes from a stream │ │ │ │ -DDeeffiinniittiioonn serialization.h:71 │ │ │ │ -_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_B_i_n_a_r_y │ │ │ │ -std::string serializeBinary(const T &input, const std::string &name="data") │ │ │ │ -serializes to a string in binary │ │ │ │ -DDeeffiinniittiioonn serialization.h:259 │ │ │ │ _g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_F_i_l_e │ │ │ │ bool serializeToBinaryFile(const T &input, const std::string &filename, const │ │ │ │ std::string &name="data") │ │ │ │ serializes to a binary file │ │ │ │ DDeeffiinniittiioonn serialization.h:237 │ │ │ │ _g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_F_i_l_e │ │ │ │ bool deserializeFromFile(const std::string &filename, T &output) │ │ │ │ deserializes from a file │ │ │ │ DDeeffiinniittiioonn serialization.h:103 │ │ │ │ -_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_X_M_L_S_t_r_e_a_m │ │ │ │ -void serializeToXMLStream(const T &input, std::ostream &out_archive_stream, │ │ │ │ -const std::string &name="data") │ │ │ │ -DDeeffiinniittiioonn serialization.h:130 │ │ │ │ _g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_F_i_l_e │ │ │ │ bool deserializeFromBinaryFile(const std::string &filename, T &output, const │ │ │ │ std::string &name="data") │ │ │ │ deserializes from a binary file │ │ │ │ DDeeffiinniittiioonn serialization.h:248 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _s_e_r_i_a_l_i_z_a_t_i_o_n_._h │ │ │ │ + * _s_e_r_i_a_l_i_z_a_t_i_o_n_T_e_s_t_H_e_l_p_e_r_s_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00032.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/numericalDerivative.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/TestableAssertions.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,306 +94,105 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ Functions
│ │ │ -
numericalDerivative.h File Reference
│ │ │ +
TestableAssertions.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Some functions to compute numerical derivatives. │ │ │ +

Provides additional testing facilities for common data structures. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

struct  gtsam::internal::FixedSizeMatrix< Y, X >
 
class  gtsam::G_x1< X1, X2 >
 Helper class that computes the derivative of f w.r.t. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

template<class X , int N = traits<X>::dimension>
Eigen::Matrix< double, N, 1 > gtsam::numericalGradient (std::function< double(const X &)> h, const X &x, double delta=1e-5)
 Numerically compute gradient of scalar function.
 
template<class Y , class X , int N = traits<X>::dimension>
internal::FixedSizeMatrix< Y, X >::type gtsam::numericalDerivative11 (std::function< Y(const X &)> h, const X &x, double delta=1e-5)
 New-style numerical derivatives using manifold_traits.
 
│ │ │ -template<class Y , class X >
internal::FixedSizeMatrix< Y, X >::type gtsam::numericalDerivative11 (Y(*h)(const X &), const X &x, double delta=1e-5)
 use a raw C++ function pointer
 
template<class Y , class X1 , class X2 , int N = traits<X1>::dimension>
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative21 (const std::function< Y(const X1 &, const X2 &)> &h, const X1 &x1, const X2 &x2, double delta=1e-5)
 Compute numerical derivative in argument 1 of binary function.
 
│ │ │ -template<class Y , class X1 , class X2 >
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative21 (Y(*h)(const X1 &, const X2 &), const X1 &x1, const X2 &x2, double delta=1e-5)
 use a raw C++ function pointer
 
template<class Y , class X1 , class X2 , int N = traits<X2>::dimension>
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative22 (std::function< Y(const X1 &, const X2 &)> h, const X1 &x1, const X2 &x2, double delta=1e-5)
 Compute numerical derivative in argument 2 of binary function.
 
│ │ │ -template<class Y , class X1 , class X2 >
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative22 (Y(*h)(const X1 &, const X2 &), const X1 &x1, const X2 &x2, double delta=1e-5)
 use a raw C++ function pointer
 
template<class Y , class X1 , class X2 , class X3 , int N = traits<X1>::dimension>
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative31 (std::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 Compute numerical derivative in argument 1 of ternary function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative31 (Y(*h)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , int N = traits<X2>::dimension>
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative32 (std::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 Compute numerical derivative in argument 2 of ternary function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative32 (Y(*h)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , int N = traits<X3>::dimension>
internal::FixedSizeMatrix< Y, X3 >::type gtsam::numericalDerivative33 (std::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 Compute numerical derivative in argument 3 of ternary function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< Y, X3 >::type gtsam::numericalDerivative33 (Y(*h)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , int N = traits<X1>::dimension>
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative41 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
 Compute numerical derivative in argument 1 of 4-argument function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 , class X4 >
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative41 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , int N = traits<X2>::dimension>
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative42 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
 Compute numerical derivative in argument 2 of 4-argument function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 , class X4 >
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative42 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , int N = traits<X3>::dimension>
internal::FixedSizeMatrix< Y, X3 >::type gtsam::numericalDerivative43 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
 Compute numerical derivative in argument 3 of 4-argument function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 , class X4 >
internal::FixedSizeMatrix< Y, X3 >::type gtsam::numericalDerivative43 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , int N = traits<X4>::dimension>
internal::FixedSizeMatrix< Y, X4 >::type gtsam::numericalDerivative44 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
 Compute numerical derivative in argument 4 of 4-argument function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 , class X4 >
internal::FixedSizeMatrix< Y, X4 >::type gtsam::numericalDerivative44 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , int N = traits<X1>::dimension>
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative51 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 Compute numerical derivative in argument 1 of 5-argument function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 >
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative51 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , int N = traits<X2>::dimension>
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative52 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 Compute numerical derivative in argument 2 of 5-argument function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 >
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative52 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , int N = traits<X3>::dimension>
internal::FixedSizeMatrix< Y, X3 >::type gtsam::numericalDerivative53 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 Compute numerical derivative in argument 3 of 5-argument function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 >
internal::FixedSizeMatrix< Y, X3 >::type gtsam::numericalDerivative53 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , int N = traits<X4>::dimension>
internal::FixedSizeMatrix< Y, X4 >::type gtsam::numericalDerivative54 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 Compute numerical derivative in argument 4 of 5-argument function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 >
internal::FixedSizeMatrix< Y, X4 >::type gtsam::numericalDerivative54 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , int N = traits<X5>::dimension>
internal::FixedSizeMatrix< Y, X5 >::type gtsam::numericalDerivative55 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 Compute numerical derivative in argument 5 of 5-argument function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 >
internal::FixedSizeMatrix< Y, X5 >::type gtsam::numericalDerivative55 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 , int N = traits<X1>::dimension>
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative61 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 Compute numerical derivative in argument 1 of 6-argument function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 >
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative61 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 , int N = traits<X2>::dimension>
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative62 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 Compute numerical derivative in argument 2 of 6-argument function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 >
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative62 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 , int N = traits<X3>::dimension>
internal::FixedSizeMatrix< Y, X3 >::type gtsam::numericalDerivative63 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 Compute numerical derivative in argument 3 of 6-argument function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 >
internal::FixedSizeMatrix< Y, X3 >::type gtsam::numericalDerivative63 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 , int N = traits<X4>::dimension>
internal::FixedSizeMatrix< Y, X4 >::type gtsam::numericalDerivative64 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 Compute numerical derivative in argument 4 of 6-argument function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 >
internal::FixedSizeMatrix< Y, X4 >::type gtsam::numericalDerivative64 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 , int N = traits<X5>::dimension>
internal::FixedSizeMatrix< Y, X5 >::type gtsam::numericalDerivative65 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 Compute numerical derivative in argument 5 of 6-argument function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 >
internal::FixedSizeMatrix< Y, X5 >::type gtsam::numericalDerivative65 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 , int N = traits<X6>::dimension>
internal::FixedSizeMatrix< Y, X6 >::type gtsam::numericalDerivative66 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 Compute numerical derivative in argument 6 of 6-argument function.
 
│ │ │ -template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 >
internal::FixedSizeMatrix< Y, X6 >::type gtsam::numericalDerivative66 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 
template<class X >
internal::FixedSizeMatrix< X, X >::type gtsam::numericalHessian (std::function< double(const X &)> f, const X &x, double delta=1e-5)
 Compute numerical Hessian matrix.
 
│ │ │ -template<class X >
internal::FixedSizeMatrix< X, X >::type gtsam::numericalHessian (double(*f)(const X &), const X &x, double delta=1e-5)
 
│ │ │ -template<class X1 , class X2 >
internal::FixedSizeMatrix< X1, X2 >::type gtsam::numericalHessian212 (std::function< double(const X1 &, const X2 &)> f, const X1 &x1, const X2 &x2, double delta=1e-5)
 
│ │ │ -template<class X1 , class X2 >
internal::FixedSizeMatrix< X1, X2 >::type gtsam::numericalHessian212 (double(*f)(const X1 &, const X2 &), const X1 &x1, const X2 &x2, double delta=1e-5)
 
│ │ │ -template<class X1 , class X2 >
internal::FixedSizeMatrix< X1, X1 >::type gtsam::numericalHessian211 (std::function< double(const X1 &, const X2 &)> f, const X1 &x1, const X2 &x2, double delta=1e-5)
 
│ │ │ -template<class X1 , class X2 >
internal::FixedSizeMatrix< X1, X1 >::type gtsam::numericalHessian211 (double(*f)(const X1 &, const X2 &), const X1 &x1, const X2 &x2, double delta=1e-5)
 
│ │ │ -template<class X1 , class X2 >
internal::FixedSizeMatrix< X2, X2 >::type gtsam::numericalHessian222 (std::function< double(const X1 &, const X2 &)> f, const X1 &x1, const X2 &x2, double delta=1e-5)
 
│ │ │ -template<class X1 , class X2 >
internal::FixedSizeMatrix< X2, X2 >::type gtsam::numericalHessian222 (double(*f)(const X1 &, const X2 &), const X1 &x1, const X2 &x2, double delta=1e-5)
 
│ │ │ -template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X1, X1 >::type gtsam::numericalHessian311 (std::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 Numerical Hessian for tenary functions.
 
│ │ │ -template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X1, X1 >::type gtsam::numericalHessian311 (double(*f)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ -template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X2, X2 >::type gtsam::numericalHessian322 (std::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ -template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X2, X2 >::type gtsam::numericalHessian322 (double(*f)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ -template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X3, X3 >::type gtsam::numericalHessian333 (std::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ -template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X3, X3 >::type gtsam::numericalHessian333 (double(*f)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ -template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X1, X2 >::type gtsam::numericalHessian312 (std::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ -template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X1, X3 >::type gtsam::numericalHessian313 (std::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ -template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X2, X3 >::type gtsam::numericalHessian323 (std::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ -template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X1, X2 >::type gtsam::numericalHessian312 (double(*f)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ -template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X1, X3 >::type gtsam::numericalHessian313 (double(*f)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ -template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X2, X3 >::type gtsam::numericalHessian323 (double(*f)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ +bool gtsam::assert_equal (const Key &expected, const Key &actual, double tol=0.0)
 Equals testing for basic types.
 
template<class V >
bool gtsam::assert_equal (const boost::optional< V > &expected, const boost::optional< V > &actual, double tol=1e-9)
 Comparisons for boost.optional objects that checks whether objects exist before comparing their values.
 
│ │ │ +template<class V >
bool gtsam::assert_equal (const V &expected, const boost::optional< V > &actual, double tol=1e-9)
 
│ │ │ +template<class V >
bool gtsam::assert_equal (const V &expected, const boost::optional< const V & > &actual, double tol=1e-9)
 
│ │ │ +template<class V1 , class V2 >
bool gtsam::assert_container_equal (const std::map< V1, V2 > &expected, const std::map< V1, V2 > &actual, double tol=1e-9)
 Function for comparing maps of testable->testable TODO: replace with more generalized version.
 
│ │ │ +template<class V2 >
bool gtsam::assert_container_equal (const std::map< size_t, V2 > &expected, const std::map< size_t, V2 > &actual, double tol=1e-9)
 Function for comparing maps of size_t->testable.
 
│ │ │ +template<class V1 , class V2 >
bool gtsam::assert_container_equal (const std::vector< std::pair< V1, V2 > > &expected, const std::vector< std::pair< V1, V2 > > &actual, double tol=1e-9)
 Function for comparing vector of pairs (testable, testable)
 
│ │ │ +template<class V >
bool gtsam::assert_container_equal (const V &expected, const V &actual, double tol=1e-9)
 General function for comparing containers of testable objects.
 
│ │ │ +template<class V2 >
bool gtsam::assert_container_equality (const std::map< size_t, V2 > &expected, const std::map< size_t, V2 > &actual)
 Function for comparing maps of size_t->testable Types are assumed to have operator ==.
 
│ │ │ +template<class V >
bool gtsam::assert_container_equality (const V &expected, const V &actual)
 General function for comparing containers of objects with operator==.
 
│ │ │ +bool gtsam::assert_equal (const std::string &expected, const std::string &actual)
 Compare strings for unit tests.
 
│ │ │ +template<class V >
bool gtsam::assert_inequal (const V &expected, const V &actual, double tol=1e-9)
 Allow for testing inequality.
 
│ │ │ +template<class V >
bool gtsam::assert_stdout_equal (const std::string &expected, const V &actual)
 Capture std out via cout stream and compare against string.
 
template<class V >
bool gtsam::assert_print_equal (const std::string &expected, const V &actual, const std::string &s="")
 Capture print function output and compare against string.
 
│ │ │

Detailed Description

│ │ │ -

Some functions to compute numerical derivatives.

│ │ │ -
Author
Frank Dellaert
│ │ │ +

Provides additional testing facilities for common data structures.

│ │ │ +
Author
Alex Cunningham
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,516 +1,90 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -numericalDerivative.h File Reference │ │ │ │ -Some functions to compute numerical derivatives. _M_o_r_e_._._. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +TestableAssertions.h File Reference │ │ │ │ +Provides additional testing facilities for common data structures. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x_<_ _Y_,_ _X_ _> │ │ │ │ -  │ │ │ │ - class   _g_t_s_a_m_:_:_G___x_1_<_ _X_1_,_ _X_2_ _> │ │ │ │ -  Helper class that computes the derivative of f w.r.t. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template::dimension> │ │ │ │ - Eigen::Matrix< double, N, 1 >  _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_G_r_a_d_i_e_n_t (std::function< │ │ │ │ - double(const X &)> h, const X &x, double │ │ │ │ - delta=1e-5) │ │ │ │ -  Numerically compute gradient of scalar │ │ │ │ - function. │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_1_1 (std:: │ │ │ │ - type  function< Y(const X &)> h, const X &x, │ │ │ │ - double delta=1e-5) │ │ │ │ -  New-style numerical derivatives using │ │ │ │ - manifold_traits. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee1111 (Y(*h) │ │ │ │ - type  (const X &), const X &x, double │ │ │ │ - delta=1e-5) │ │ │ │ -  use a raw C++ function pointer │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_2_1 (const │ │ │ │ - type  std::function< Y(const X1 &, const X2 │ │ │ │ - &)> &h, const X1 &x1, const X2 &x2, │ │ │ │ - double delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 1 of binary function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee2211 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &), const X1 &x1, │ │ │ │ - const X2 &x2, double delta=1e-5) │ │ │ │ -  use a raw C++ function pointer │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_2_2 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &)> h, │ │ │ │ - const X1 &x1, const X2 &x2, double │ │ │ │ - delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 2 of binary function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee2222 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &), const X1 &x1, │ │ │ │ - const X2 &x2, double delta=1e-5) │ │ │ │ -  use a raw C++ function pointer │ │ │ │ -  │ │ │ │ -template:: │ │ │ │ -dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_1 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &)> h, const X1 &x1, const X2 │ │ │ │ - &x2, const X3 &x3, double delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 1 of ternary function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee3311 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &), │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template:: │ │ │ │ -dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_2 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &)> h, const X1 &x1, const X2 │ │ │ │ - &x2, const X3 &x3, double delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 2 of ternary function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee3322 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &), │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template:: │ │ │ │ -dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X3 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_3 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &)> h, const X1 &x1, const X2 │ │ │ │ - &x2, const X3 &x3, double delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 3 of ternary function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X3 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee3333 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &), │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_1 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &, const X4 &)> h, const X1 │ │ │ │ - &x1, const X2 &x2, const X3 &x3, const │ │ │ │ - X4 &x4, double delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 1 of 4-argument function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee4411 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &, │ │ │ │ - const X4 &), const X1 &x1, const X2 &x2, │ │ │ │ - const X3 &x3, const X4 &x4, double │ │ │ │ - delta=1e-5) │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_2 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &, const X4 &)> h, const X1 │ │ │ │ - &x1, const X2 &x2, const X3 &x3, const │ │ │ │ - X4 &x4, double delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 2 of 4-argument function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee4422 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &, │ │ │ │ - const X4 &), const X1 &x1, const X2 &x2, │ │ │ │ - const X3 &x3, const X4 &x4, double │ │ │ │ - delta=1e-5) │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X3 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_3 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &, const X4 &)> h, const X1 │ │ │ │ - &x1, const X2 &x2, const X3 &x3, const │ │ │ │ - X4 &x4, double delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 3 of 4-argument function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X3 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee4433 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &, │ │ │ │ - const X4 &), const X1 &x1, const X2 &x2, │ │ │ │ - const X3 &x3, const X4 &x4, double │ │ │ │ - delta=1e-5) │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X4 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_4 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &, const X4 &)> h, const X1 │ │ │ │ - &x1, const X2 &x2, const X3 &x3, const │ │ │ │ - X4 &x4, double delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 4 of 4-argument function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X4 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee4444 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &, │ │ │ │ - const X4 &), const X1 &x1, const X2 &x2, │ │ │ │ - const X3 &x3, const X4 &x4, double │ │ │ │ - delta=1e-5) │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_1 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &, const X4 &, const X5 &)> h, │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, const X4 &x4, const X5 &x5, double │ │ │ │ - delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 1 of 5-argument function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee5511 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &, │ │ │ │ - const X4 &, const X5 &), const X1 &x1, │ │ │ │ - const X2 &x2, const X3 &x3, const X4 │ │ │ │ - &x4, const X5 &x5, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_2 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &, const X4 &, const X5 &)> h, │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, const X4 &x4, const X5 &x5, double │ │ │ │ - delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 2 of 5-argument function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee5522 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &, │ │ │ │ - const X4 &, const X5 &), const X1 &x1, │ │ │ │ - const X2 &x2, const X3 &x3, const X4 │ │ │ │ - &x4, const X5 &x5, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X3 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_3 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &, const X4 &, const X5 &)> h, │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, const X4 &x4, const X5 &x5, double │ │ │ │ - delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 3 of 5-argument function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X3 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee5533 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &, │ │ │ │ - const X4 &, const X5 &), const X1 &x1, │ │ │ │ - const X2 &x2, const X3 &x3, const X4 │ │ │ │ - &x4, const X5 &x5, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X4 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_4 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &, const X4 &, const X5 &)> h, │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, const X4 &x4, const X5 &x5, double │ │ │ │ - delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 4 of 5-argument function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X4 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee5544 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &, │ │ │ │ - const X4 &, const X5 &), const X1 &x1, │ │ │ │ - const X2 &x2, const X3 &x3, const X4 │ │ │ │ - &x4, const X5 &x5, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X5 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_5 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &, const X4 &, const X5 &)> h, │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, const X4 &x4, const X5 &x5, double │ │ │ │ - delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 5 of 5-argument function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X5 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee5555 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &, │ │ │ │ - const X4 &, const X5 &), const X1 &x1, │ │ │ │ - const X2 &x2, const X3 &x3, const X4 │ │ │ │ - &x4, const X5 &x5, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_1 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &, const X4 &, const X5 &, │ │ │ │ - const X6 &)> h, const X1 &x1, const X2 │ │ │ │ - &x2, const X3 &x3, const X4 &x4, const │ │ │ │ - X5 &x5, const X6 &x6, double delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 1 of 6-argument function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee6611 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &, │ │ │ │ - const X4 &, const X5 &, const X6 &), │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, const X4 &x4, const X5 &x5, const │ │ │ │ - X6 &x6, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_2 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &, const X4 &, const X5 &, │ │ │ │ - const X6 &)> h, const X1 &x1, const X2 │ │ │ │ - &x2, const X3 &x3, const X4 &x4, const │ │ │ │ - X5 &x5, const X6 &x6, double delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 2 of 6-argument function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee6622 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &, │ │ │ │ - const X4 &, const X5 &, const X6 &), │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, const X4 &x4, const X5 &x5, const │ │ │ │ - X6 &x6, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X3 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_3 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &, const X4 &, const X5 &, │ │ │ │ - const X6 &)> h, const X1 &x1, const X2 │ │ │ │ - &x2, const X3 &x3, const X4 &x4, const │ │ │ │ - X5 &x5, const X6 &x6, double delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 3 of 6-argument function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X3 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee6633 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &, │ │ │ │ - const X4 &, const X5 &, const X6 &), │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, const X4 &x4, const X5 &x5, const │ │ │ │ - X6 &x6, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X4 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_4 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &, const X4 &, const X5 &, │ │ │ │ - const X6 &)> h, const X1 &x1, const X2 │ │ │ │ - &x2, const X3 &x3, const X4 &x4, const │ │ │ │ - X5 &x5, const X6 &x6, double delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 4 of 6-argument function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X4 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee6644 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &, │ │ │ │ - const X4 &, const X5 &, const X6 &), │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, const X4 &x4, const X5 &x5, const │ │ │ │ - X6 &x6, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X5 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_5 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &, const X4 &, const X5 &, │ │ │ │ - const X6 &)> h, const X1 &x1, const X2 │ │ │ │ - &x2, const X3 &x3, const X4 &x4, const │ │ │ │ - X5 &x5, const X6 &x6, double delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 5 of 6-argument function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X5 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee6655 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &, │ │ │ │ - const X4 &, const X5 &, const X6 &), │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, const X4 &x4, const X5 &x5, const │ │ │ │ - X6 &x6, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template::dimension> │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X6 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_6 (std:: │ │ │ │ - type  function< Y(const X1 &, const X2 &, │ │ │ │ - const X3 &, const X4 &, const X5 &, │ │ │ │ - const X6 &)> h, const X1 &x1, const X2 │ │ │ │ - &x2, const X3 &x3, const X4 &x4, const │ │ │ │ - X5 &x5, const X6 &x6, double delta=1e-5) │ │ │ │ -  Compute numerical derivative in argument │ │ │ │ - 6 of 6-argument function. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X6 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee6666 (Y(*h) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &, │ │ │ │ - const X4 &, const X5 &, const X6 &), │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, const X4 &x4, const X5 &x5, const │ │ │ │ - X6 &x6, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X, X >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n (std::function< │ │ │ │ - type  double(const X &)> f, const X &x, double │ │ │ │ - delta=1e-5) │ │ │ │ -  Compute numerical Hessian matrix. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X, X >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann (double(*f) │ │ │ │ - type  (const X &), const X &x, double │ │ │ │ - delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X2 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann221122 (std:: │ │ │ │ - type  function< double(const X1 &, const X2 │ │ │ │ - &)> f, const X1 &x1, const X2 &x2, │ │ │ │ - double delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X2 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann221122 (double(*f) │ │ │ │ - type  (const X1 &, const X2 &), const X1 &x1, │ │ │ │ - const X2 &x2, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X1 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann221111 (std:: │ │ │ │ - type  function< double(const X1 &, const X2 │ │ │ │ - &)> f, const X1 &x1, const X2 &x2, │ │ │ │ - double delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X1 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann221111 (double(*f) │ │ │ │ - type  (const X1 &, const X2 &), const X1 &x1, │ │ │ │ - const X2 &x2, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X2, X2 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann222222 (std:: │ │ │ │ - type  function< double(const X1 &, const X2 │ │ │ │ - &)> f, const X1 &x1, const X2 &x2, │ │ │ │ - double delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X2, X2 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann222222 (double(*f) │ │ │ │ - type  (const X1 &, const X2 &), const X1 &x1, │ │ │ │ - const X2 &x2, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X1 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann331111 (std:: │ │ │ │ - type  function< double(const X1 &, const X2 &, │ │ │ │ - const X3 &)> f, const X1 &x1, const X2 │ │ │ │ - &x2, const X3 &x3, double delta=1e-5) │ │ │ │ -  Numerical Hessian for tenary functions. │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X1 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann331111 (double(*f) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &), │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X2, X2 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann332222 (std:: │ │ │ │ - type  function< double(const X1 &, const X2 &, │ │ │ │ - const X3 &)> f, const X1 &x1, const X2 │ │ │ │ - &x2, const X3 &x3, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X2, X2 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann332222 (double(*f) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &), │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X3, X3 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann333333 (std:: │ │ │ │ - type  function< double(const X1 &, const X2 &, │ │ │ │ - const X3 &)> f, const X1 &x1, const X2 │ │ │ │ - &x2, const X3 &x3, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X3, X3 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann333333 (double(*f) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &), │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X2 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann331122 (std:: │ │ │ │ - type  function< double(const X1 &, const X2 &, │ │ │ │ - const X3 &)> f, const X1 &x1, const X2 │ │ │ │ - &x2, const X3 &x3, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X3 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann331133 (std:: │ │ │ │ - type  function< double(const X1 &, const X2 &, │ │ │ │ - const X3 &)> f, const X1 &x1, const X2 │ │ │ │ - &x2, const X3 &x3, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X2, X3 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann332233 (std:: │ │ │ │ - type  function< double(const X1 &, const X2 &, │ │ │ │ - const X3 &)> f, const X1 &x1, const X2 │ │ │ │ - &x2, const X3 &x3, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X2 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann331122 (double(*f) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &), │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X3 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann331133 (double(*f) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &), │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, double delta=1e-5) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X2, X3 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann332233 (double(*f) │ │ │ │ - type  (const X1 &, const X2 &, const X3 &), │ │ │ │ - const X1 &x1, const X2 &x2, const X3 │ │ │ │ - &x3, double delta=1e-5) │ │ │ │ +bool  ggttssaamm::::aasssseerrtt__eeqquuaall (const _K_e_y &expected, const _K_e_y &actual, double │ │ │ │ + tol=0.0) │ │ │ │ +  Equals testing for basic types. │ │ │ │ +  │ │ │ │ +template │ │ │ │ +bool  _g_t_s_a_m_:_:_a_s_s_e_r_t___e_q_u_a_l (const boost::optional< V > &expected, const boost:: │ │ │ │ + optional< V > &actual, double tol=1e-9) │ │ │ │ +  Comparisons for boost.optional objects that checks whether objects exist │ │ │ │ + before comparing their values. │ │ │ │ +  │ │ │ │ +template │ │ │ │ +bool  ggttssaamm::::aasssseerrtt__eeqquuaall (const V &expected, const boost::optional< V > │ │ │ │ + &actual, double tol=1e-9) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +bool  ggttssaamm::::aasssseerrtt__eeqquuaall (const V &expected, const boost::optional< const V & │ │ │ │ + > &actual, double tol=1e-9) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +bool  ggttssaamm::::aasssseerrtt__ccoonnttaaiinneerr__eeqquuaall (const std::map< V1, V2 > &expected, const │ │ │ │ + std::map< V1, V2 > &actual, double tol=1e-9) │ │ │ │ +  Function for comparing maps of testable->testable TODO: replace with more │ │ │ │ + generalized version. │ │ │ │ +  │ │ │ │ +template │ │ │ │ +bool  ggttssaamm::::aasssseerrtt__ccoonnttaaiinneerr__eeqquuaall (const std::map< size_t, V2 > &expected, │ │ │ │ + const std::map< size_t, V2 > &actual, double tol=1e-9) │ │ │ │ +  Function for comparing maps of size_t->testable. │ │ │ │ +  │ │ │ │ +template │ │ │ │ +bool  ggttssaamm::::aasssseerrtt__ccoonnttaaiinneerr__eeqquuaall (const std::vector< std::pair< V1, V2 > > │ │ │ │ + &expected, const std::vector< std::pair< V1, V2 > > &actual, double │ │ │ │ + tol=1e-9) │ │ │ │ +  Function for comparing vector of pairs (testable, testable) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +bool  ggttssaamm::::aasssseerrtt__ccoonnttaaiinneerr__eeqquuaall (const V &expected, const V &actual, double │ │ │ │ + tol=1e-9) │ │ │ │ +  General function for comparing containers of testable objects. │ │ │ │ +  │ │ │ │ +template │ │ │ │ +bool  ggttssaamm::::aasssseerrtt__ccoonnttaaiinneerr__eeqquuaalliittyy (const std::map< size_t, V2 > &expected, │ │ │ │ + const std::map< size_t, V2 > &actual) │ │ │ │ +  Function for comparing maps of size_t->testable Types are assumed to have │ │ │ │ + operator ==. │ │ │ │ +  │ │ │ │ +template │ │ │ │ +bool  ggttssaamm::::aasssseerrtt__ccoonnttaaiinneerr__eeqquuaalliittyy (const V &expected, const V &actual) │ │ │ │ +  General function for comparing containers of objects with operator==. │ │ │ │ +  │ │ │ │ +bool  ggttssaamm::::aasssseerrtt__eeqquuaall (const std::string &expected, const std::string │ │ │ │ + &actual) │ │ │ │ +  Compare strings for unit tests. │ │ │ │ +  │ │ │ │ +template │ │ │ │ +bool  ggttssaamm::::aasssseerrtt__iinneeqquuaall (const V &expected, const V &actual, double tol=1e- │ │ │ │ + 9) │ │ │ │ +  Allow for testing inequality. │ │ │ │ +  │ │ │ │ +template │ │ │ │ +bool  ggttssaamm::::aasssseerrtt__ssttddoouutt__eeqquuaall (const std::string &expected, const V &actual) │ │ │ │ +  Capture std out via cout stream and compare against string. │ │ │ │ +  │ │ │ │ +template │ │ │ │ +bool  _g_t_s_a_m_:_:_a_s_s_e_r_t___p_r_i_n_t___e_q_u_a_l (const std::string &expected, const V &actual, │ │ │ │ + const std::string &s="") │ │ │ │ +  Capture print function output and compare against string. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Some functions to compute numerical derivatives. │ │ │ │ +Provides additional testing facilities for common data structures. │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + Alex Cunningham │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_._h │ │ │ │ + * _T_e_s_t_a_b_l_e_A_s_s_e_r_t_i_o_n_s_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00032.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,31 +1,14 @@ │ │ │ │ var a00032 = [ │ │ │ │ - ["gtsam::internal::FixedSizeMatrix< Y, X >", "a02440.html", null], │ │ │ │ - ["gtsam::G_x1< X1, X2 >", "a02444.html", null], │ │ │ │ - ["numericalDerivative11", "a00032.html#a581a9f8db043590096fbac682b8f6a93", null], │ │ │ │ - ["numericalDerivative11", "a00032.html#a4c4c5744f0b348d4ec6c047f796e7924", null], │ │ │ │ - ["numericalDerivative21", "a00032.html#a157eb3b44dd4e38bbd66f3cc68a20e43", null], │ │ │ │ - ["numericalDerivative21", "a00032.html#afcc94e3b49906e824c01a3d56df62d33", null], │ │ │ │ - ["numericalDerivative22", "a00032.html#a5b0db4ac5f279b12fc91fab4cb40b1bf", null], │ │ │ │ - ["numericalDerivative22", "a00032.html#a46d002a0529f1172aebb7e1d85d5c08c", null], │ │ │ │ - ["numericalDerivative31", "a00032.html#aa8f0264edaf78d503809c1e3152340ee", null], │ │ │ │ - ["numericalDerivative32", "a00032.html#acfbadc0ab0cd9386205b2737c5d0b727", null], │ │ │ │ - ["numericalDerivative33", "a00032.html#a526a422ea611724345affed8b71d9bac", null], │ │ │ │ - ["numericalDerivative41", "a00032.html#a3b0937e08e79604ee6ab10fca6ffe65e", null], │ │ │ │ - ["numericalDerivative42", "a00032.html#af40f61e8eff01acdb028ad33b8f3529b", null], │ │ │ │ - ["numericalDerivative43", "a00032.html#a6846b5cc84c1d5a54a436121b27057e0", null], │ │ │ │ - ["numericalDerivative44", "a00032.html#a8061b20199f839b115512d95d058fcbf", null], │ │ │ │ - ["numericalDerivative51", "a00032.html#a272af6f7139b76d085279060646e32d1", null], │ │ │ │ - ["numericalDerivative52", "a00032.html#a722e98babba795ce480f89527b572251", null], │ │ │ │ - ["numericalDerivative53", "a00032.html#acc2f741132522a6ce57d544a27a95855", null], │ │ │ │ - ["numericalDerivative54", "a00032.html#a2cf5181fc7bca1ef6a1070959de7b975", null], │ │ │ │ - ["numericalDerivative55", "a00032.html#a5ca42a2fc87373c005299f3087995a97", null], │ │ │ │ - ["numericalDerivative61", "a00032.html#a0ca8a22de666bc39015da34f150df748", null], │ │ │ │ - ["numericalDerivative62", "a00032.html#ac224e2384e41171181b2dbc0f700cdc1", null], │ │ │ │ - ["numericalDerivative63", "a00032.html#a15c46aa999886d4ccd06ab73fc02db31", null], │ │ │ │ - ["numericalDerivative64", "a00032.html#a3eb3fef9c77920dfd9496e71a0bcf669", null], │ │ │ │ - ["numericalDerivative65", "a00032.html#a799c83517a20a8e0b0b014f26b50f660", null], │ │ │ │ - ["numericalDerivative66", "a00032.html#a4e010b7f436124b9b421ba7dc438d987", null], │ │ │ │ - ["numericalGradient", "a00032.html#afd8862271510196ec4e2d894f623942d", null], │ │ │ │ - ["numericalHessian", "a00032.html#a11011d8e9bd69e486c9752875f710c18", null], │ │ │ │ - ["numericalHessian311", "a00032.html#a10295660c0177e08d45812fbb7e4c554", null] │ │ │ │ + ["assert_container_equal", "a00032.html#a2f509195ea2180d0f7dbd3a99a088ff4", null], │ │ │ │ + ["assert_container_equal", "a00032.html#a254be27d6d4b416fa2b546c77ae783fc", null], │ │ │ │ + ["assert_container_equal", "a00032.html#a0eec17f894b358dd9f30d7af28082ba5", null], │ │ │ │ + ["assert_container_equal", "a00032.html#a6d6b2964354593f69848f6bf5d3e0ca1", null], │ │ │ │ + ["assert_container_equality", "a00032.html#a59ba6a7db27344c5cb021f1421905020", null], │ │ │ │ + ["assert_container_equality", "a00032.html#aa0926a5d779171bd8e1d30fb5982b5c0", null], │ │ │ │ + ["assert_equal", "a00032.html#add6d6575582314cc9b5dbdbe2a86374d", null], │ │ │ │ + ["assert_equal", "a00032.html#a982034802415eb6e9bd02355257ed96a", null], │ │ │ │ + ["assert_equal", "a00032.html#a21e760bc75888053afd86a27d56b6148", null], │ │ │ │ + ["assert_inequal", "a00032.html#a2f19ba6625a264457805513fefcb5c32", null], │ │ │ │ + ["assert_print_equal", "a00032.html#a830c8c65902d7d0e763562e6c9357346", null], │ │ │ │ + ["assert_stdout_equal", "a00032.html#a08641f0f7145716bba9159dd95099a44", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00032_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/numericalDerivative.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/TestableAssertions.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,941 +98,399 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
numericalDerivative.h
│ │ │ +
TestableAssertions.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
18// \callgraph
│ │ │ -
19#pragma once
│ │ │ -
20
│ │ │ -
21#include <functional>
│ │ │ +
18#pragma once
│ │ │ +
19
│ │ │ +
20#include <gtsam/base/Testable.h>
│ │ │ + │ │ │
22
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
26#include <gtsam/base/Lie.h>
│ │ │ -
27
│ │ │ -
28namespace gtsam {
│ │ │ -
29
│ │ │ -
30/*
│ │ │ -
31 * Note that all of these functions have two versions, a boost.function version and a
│ │ │ -
32 * standard C++ function pointer version. This allows reformulating the arguments of
│ │ │ -
33 * a function to fit the correct structure, which is useful for situations like
│ │ │ -
34 * member functions and functions with arguments not involved in the derivative:
│ │ │ -
35 *
│ │ │ -
36 * Usage of the boost bind version to rearrange arguments:
│ │ │ -
37 * for a function with one relevant param and an optional derivative:
│ │ │ -
38 * Foo bar(const Obj& a, boost::optional<Matrix&> H1)
│ │ │ -
39 * Use boost.bind to restructure:
│ │ │ -
40 * std::bind(bar, std::placeholders::_1, boost::none)
│ │ │ -
41 * This syntax will fix the optional argument to boost::none, while using the first argument provided
│ │ │ -
42 *
│ │ │ -
43 * For member functions, such as below, with an instantiated copy instanceOfSomeClass
│ │ │ -
44 * Foo SomeClass::bar(const Obj& a)
│ │ │ -
45 * Use boost bind as follows to create a function pointer that uses the member function:
│ │ │ -
46 * std::bind(&SomeClass::bar, ref(instanceOfSomeClass), std::placeholders::_1)
│ │ │ -
47 *
│ │ │ -
48 * For additional details, see the documentation:
│ │ │ -
49 * http://www.boost.org/doc/libs/release/libs/bind/bind.html
│ │ │ -
50 */
│ │ │ -
51
│ │ │ -
52
│ │ │ -
53// a quick helper struct to get the appropriate fixed sized matrix from two value types
│ │ │ -
54namespace internal {
│ │ │ -
55template<class Y, class X=double>
│ │ │ -
│ │ │ - │ │ │ -
57 typedef Eigen::Matrix<double,traits<Y>::dimension, traits<X>::dimension> type;
│ │ │ -
58};
│ │ │ -
│ │ │ -
59}
│ │ │ -
60
│ │ │ -
69template <class X, int N = traits<X>::dimension>
│ │ │ -
│ │ │ -
70typename Eigen::Matrix<double, N, 1> numericalGradient(
│ │ │ -
71 std::function<double(const X&)> h, const X& x, double delta = 1e-5) {
│ │ │ -
72 double factor = 1.0 / (2.0 * delta);
│ │ │ +
23#include <boost/optional.hpp>
│ │ │ +
24#include <map>
│ │ │ +
25#include <iostream>
│ │ │ +
26#include <sstream>
│ │ │ +
27#include <vector>
│ │ │ +
28
│ │ │ +
29namespace gtsam {
│ │ │ +
30
│ │ │ +
│ │ │ +
34inline bool assert_equal(const Key& expected, const Key& actual, double tol = 0.0) {
│ │ │ +
35 if(expected != actual) {
│ │ │ +
36 std::cout << "Not equal:\nexpected: " << expected << "\nactual: " << actual << std::endl;
│ │ │ +
37 return false;
│ │ │ +
38 }
│ │ │ +
39 return true;
│ │ │ +
40}
│ │ │ +
│ │ │ +
41
│ │ │ +
49template<class V>
│ │ │ +
│ │ │ +
50bool assert_equal(const boost::optional<V>& expected,
│ │ │ +
51 const boost::optional<V>& actual, double tol = 1e-9) {
│ │ │ +
52 if (!expected && actual) {
│ │ │ +
53 std::cout << "expected is boost::none, while actual is not" << std::endl;
│ │ │ +
54 return false;
│ │ │ +
55 }
│ │ │ +
56 if (expected && !actual) {
│ │ │ +
57 std::cout << "actual is boost::none, while expected is not" << std::endl;
│ │ │ +
58 return false;
│ │ │ +
59 }
│ │ │ +
60 if (!expected && !actual)
│ │ │ +
61 return true;
│ │ │ +
62 return assert_equal(*expected, *actual, tol);
│ │ │ +
63}
│ │ │ +
│ │ │ +
64
│ │ │ +
65template<class V>
│ │ │ +
66bool assert_equal(const V& expected, const boost::optional<V>& actual, double tol = 1e-9) {
│ │ │ +
67 if (!actual) {
│ │ │ +
68 std::cout << "actual is boost::none" << std::endl;
│ │ │ +
69 return false;
│ │ │ +
70 }
│ │ │ +
71 return assert_equal(expected, *actual, tol);
│ │ │ +
72}
│ │ │
73
│ │ │ -
74 BOOST_STATIC_ASSERT_MSG(
│ │ │ -
75 (boost::is_base_of<manifold_tag, typename traits<X>::structure_category>::value),
│ │ │ -
76 "Template argument X must be a manifold type.");
│ │ │ -
77 BOOST_STATIC_ASSERT_MSG(N>0, "Template argument X must be fixed-size type or N must be specified.");
│ │ │ -
78
│ │ │ -
79 // Prepare a tangent vector to perturb x with, only works for fixed size
│ │ │ -
80 typename traits<X>::TangentVector d;
│ │ │ -
81 d.setZero();
│ │ │ +
74template<class V>
│ │ │ +
75bool assert_equal(const V& expected, const boost::optional<const V&>& actual, double tol = 1e-9) {
│ │ │ +
76 if (!actual) {
│ │ │ +
77 std::cout << "actual is boost::none" << std::endl;
│ │ │ +
78 return false;
│ │ │ +
79 }
│ │ │ +
80 return assert_equal(expected, *actual, tol);
│ │ │ +
81}
│ │ │
82
│ │ │ -
83 Eigen::Matrix<double,N,1> g;
│ │ │ -
84 g.setZero();
│ │ │ -
85 for (int j = 0; j < N; j++) {
│ │ │ -
86 d(j) = delta;
│ │ │ -
87 double hxplus = h(traits<X>::Retract(x, d));
│ │ │ -
88 d(j) = -delta;
│ │ │ -
89 double hxmin = h(traits<X>::Retract(x, d));
│ │ │ -
90 d(j) = 0;
│ │ │ -
91 g(j) = (hxplus - hxmin) * factor;
│ │ │ -
92 }
│ │ │ -
93 return g;
│ │ │ -
94}
│ │ │ -
│ │ │ -
95
│ │ │ -
108template <class Y, class X, int N = traits<X>::dimension>
│ │ │ -
109// TODO Should compute fixed-size matrix
│ │ │ -
│ │ │ -
110typename internal::FixedSizeMatrix<Y, X>::type numericalDerivative11(
│ │ │ -
111 std::function<Y(const X&)> h, const X& x, double delta = 1e-5) {
│ │ │ -
112 typedef typename internal::FixedSizeMatrix<Y,X>::type Matrix;
│ │ │ +
83#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
│ │ │ +
88template<class V>
│ │ │ +
89bool GTSAM_DEPRECATED assert_equal(const std::vector<V>& expected, const std::vector<V>& actual, double tol = 1e-9) {
│ │ │ +
90 bool match = true;
│ │ │ +
91 if (expected.size() != actual.size())
│ │ │ +
92 match = false;
│ │ │ +
93 if(match) {
│ │ │ +
94 size_t i = 0;
│ │ │ +
95 for(const V& a: expected) {
│ │ │ +
96 if (!assert_equal(a, actual[i++], tol)) {
│ │ │ +
97 match = false;
│ │ │ +
98 break;
│ │ │ +
99 }
│ │ │ +
100 }
│ │ │ +
101 }
│ │ │ +
102 if(!match) {
│ │ │ +
103 std::cout << "expected: " << std::endl;
│ │ │ +
104 for(const V& a: expected) { std::cout << a << " "; }
│ │ │ +
105 std::cout << "\nactual: " << std::endl;
│ │ │ +
106 for(const V& a: actual) { std::cout << a << " "; }
│ │ │ +
107 std::cout << std::endl;
│ │ │ +
108 return false;
│ │ │ +
109 }
│ │ │ +
110 return true;
│ │ │ +
111}
│ │ │ +
112#endif
│ │ │
113
│ │ │ -
114 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
115 "Template argument Y must be a manifold type.");
│ │ │ -
116 typedef traits<Y> TraitsY;
│ │ │ -
117
│ │ │ -
118 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X>::structure_category>::value),
│ │ │ -
119 "Template argument X must be a manifold type.");
│ │ │ -
120 BOOST_STATIC_ASSERT_MSG(N>0, "Template argument X must be fixed-size type or N must be specified.");
│ │ │ -
121 typedef traits<X> TraitsX;
│ │ │ -
122
│ │ │ -
123 // get value at x, and corresponding chart
│ │ │ -
124 const Y hx = h(x);
│ │ │ -
125
│ │ │ -
126 // Bit of a hack for now to find number of rows
│ │ │ -
127 const typename TraitsY::TangentVector zeroY = TraitsY::Local(hx, hx);
│ │ │ -
128 const size_t m = zeroY.size();
│ │ │ -
129
│ │ │ -
130 // Prepare a tangent vector to perturb x with, only works for fixed size
│ │ │ -
131 Eigen::Matrix<double, N, 1> dx;
│ │ │ -
132 dx.setZero();
│ │ │ -
133
│ │ │ -
134 // Fill in Jacobian H
│ │ │ -
135 Matrix H = Matrix::Zero(m, N);
│ │ │ -
136 const double factor = 1.0 / (2.0 * delta);
│ │ │ -
137 for (int j = 0; j < N; j++) {
│ │ │ -
138 dx(j) = delta;
│ │ │ -
139 const auto dy1 = TraitsY::Local(hx, h(TraitsX::Retract(x, dx)));
│ │ │ -
140 dx(j) = -delta;
│ │ │ -
141 const auto dy2 = TraitsY::Local(hx, h(TraitsX::Retract(x, dx)));
│ │ │ -
142 dx(j) = 0;
│ │ │ -
143 H.col(j) << (dy1 - dy2) * factor;
│ │ │ -
144 }
│ │ │ -
145 return H;
│ │ │ -
146}
│ │ │ -
│ │ │ -
147
│ │ │ -
149template<class Y, class X>
│ │ │ -
│ │ │ -
150typename internal::FixedSizeMatrix<Y,X>::type numericalDerivative11(Y (*h)(const X&), const X& x,
│ │ │ -
151 double delta = 1e-5) {
│ │ │ -
152 return numericalDerivative11<Y, X>(std::bind(h, std::placeholders::_1), x,
│ │ │ -
153 delta);
│ │ │ -
154}
│ │ │ -
│ │ │ -
155
│ │ │ -
165template<class Y, class X1, class X2, int N = traits<X1>::dimension>
│ │ │ -
│ │ │ -
166typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative21(const std::function<Y(const X1&, const X2&)>& h,
│ │ │ -
167 const X1& x1, const X2& x2, double delta = 1e-5) {
│ │ │ -
168 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
169 "Template argument Y must be a manifold type.");
│ │ │ -
170 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ -
171 "Template argument X1 must be a manifold type.");
│ │ │ -
172 return numericalDerivative11<Y, X1, N>(
│ │ │ -
173 std::bind(h, std::placeholders::_1, std::cref(x2)), x1, delta);
│ │ │ -
174}
│ │ │ +
118template<class V1, class V2>
│ │ │ +
│ │ │ +
119bool assert_container_equal(const std::map<V1,V2>& expected, const std::map<V1,V2>& actual, double tol = 1e-9) {
│ │ │ +
120 typedef typename std::map<V1,V2> Map;
│ │ │ +
121 bool match = true;
│ │ │ +
122 if (expected.size() != actual.size())
│ │ │ +
123 match = false;
│ │ │ +
124 typename Map::const_iterator
│ │ │ +
125 itExp = expected.begin(),
│ │ │ +
126 itAct = actual.begin();
│ │ │ +
127 if(match) {
│ │ │ +
128 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) {
│ │ │ +
129 if (!assert_equal(itExp->first, itAct->first, tol) ||
│ │ │ +
130 !assert_equal(itExp->second, itAct->second, tol)) {
│ │ │ +
131 match = false;
│ │ │ +
132 break;
│ │ │ +
133 }
│ │ │ +
134 }
│ │ │ +
135 }
│ │ │ +
136 if(!match) {
│ │ │ +
137 std::cout << "expected: " << std::endl;
│ │ │ +
138 for(const typename Map::value_type& a: expected) {
│ │ │ +
139 a.first.print("key");
│ │ │ +
140 a.second.print(" value");
│ │ │ +
141 }
│ │ │ +
142 std::cout << "\nactual: " << std::endl;
│ │ │ +
143 for(const typename Map::value_type& a: actual) {
│ │ │ +
144 a.first.print("key");
│ │ │ +
145 a.second.print(" value");
│ │ │ +
146 }
│ │ │ +
147 std::cout << std::endl;
│ │ │ +
148 return false;
│ │ │ +
149 }
│ │ │ +
150 return true;
│ │ │ +
151}
│ │ │ +
│ │ │ +
152
│ │ │ +
156template<class V2>
│ │ │ +
│ │ │ +
157bool assert_container_equal(const std::map<size_t,V2>& expected, const std::map<size_t,V2>& actual, double tol = 1e-9) {
│ │ │ +
158 typedef typename std::map<size_t,V2> Map;
│ │ │ +
159 bool match = true;
│ │ │ +
160 if (expected.size() != actual.size())
│ │ │ +
161 match = false;
│ │ │ +
162 typename Map::const_iterator
│ │ │ +
163 itExp = expected.begin(),
│ │ │ +
164 itAct = actual.begin();
│ │ │ +
165 if(match) {
│ │ │ +
166 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) {
│ │ │ +
167 if (itExp->first != itAct->first ||
│ │ │ +
168 !assert_equal(itExp->second, itAct->second, tol)) {
│ │ │ +
169 match = false;
│ │ │ +
170 break;
│ │ │ +
171 }
│ │ │ +
172 }
│ │ │ +
173 }
│ │ │ +
174 if(!match) {
│ │ │ +
175 std::cout << "expected: " << std::endl;
│ │ │ +
176 for(const typename Map::value_type& a: expected) {
│ │ │ +
177 std::cout << "Key: " << a.first << std::endl;
│ │ │ +
178 a.second.print(" value");
│ │ │ +
179 }
│ │ │ +
180 std::cout << "\nactual: " << std::endl;
│ │ │ +
181 for(const typename Map::value_type& a: actual) {
│ │ │ +
182 std::cout << "Key: " << a.first << std::endl;
│ │ │ +
183 a.second.print(" value");
│ │ │ +
184 }
│ │ │ +
185 std::cout << std::endl;
│ │ │ +
186 return false;
│ │ │ +
187 }
│ │ │ +
188 return true;
│ │ │ +
189}
│ │ │
│ │ │ -
175
│ │ │ -
177template<class Y, class X1, class X2>
│ │ │ -
│ │ │ -
178typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative21(Y (*h)(const X1&, const X2&), const X1& x1,
│ │ │ -
179 const X2& x2, double delta = 1e-5) {
│ │ │ -
180 return numericalDerivative21<Y, X1, X2>(
│ │ │ -
181 std::bind(h, std::placeholders::_1, std::placeholders::_2), x1, x2,
│ │ │ -
182 delta);
│ │ │ -
183}
│ │ │ -
│ │ │ -
184
│ │ │ -
194template<class Y, class X1, class X2, int N = traits<X2>::dimension>
│ │ │ +
190
│ │ │ +
194template<class V1, class V2>
│ │ │
│ │ │ -
195typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative22(std::function<Y(const X1&, const X2&)> h,
│ │ │ -
196 const X1& x1, const X2& x2, double delta = 1e-5) {
│ │ │ -
197// BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ -
198// "Template argument X1 must be a manifold type.");
│ │ │ -
199 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X2>::structure_category>::value),
│ │ │ -
200 "Template argument X2 must be a manifold type.");
│ │ │ -
201 return numericalDerivative11<Y, X2, N>(
│ │ │ -
202 std::bind(h, std::cref(x1), std::placeholders::_1), x2, delta);
│ │ │ -
203}
│ │ │ -
│ │ │ -
204
│ │ │ -
206template<class Y, class X1, class X2>
│ │ │ -
│ │ │ -
207typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative22(Y (*h)(const X1&, const X2&), const X1& x1,
│ │ │ -
208 const X2& x2, double delta = 1e-5) {
│ │ │ -
209 return numericalDerivative22<Y, X1, X2>(
│ │ │ -
210 std::bind(h, std::placeholders::_1, std::placeholders::_2), x1, x2,
│ │ │ -
211 delta);
│ │ │ -
212}
│ │ │ -
│ │ │ -
213
│ │ │ -
225template<class Y, class X1, class X2, class X3, int N = traits<X1>::dimension>
│ │ │ -
│ │ │ -
226typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative31(
│ │ │ -
227 std::function<Y(const X1&, const X2&, const X3&)> h, const X1& x1,
│ │ │ -
228 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
229 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
230 "Template argument Y must be a manifold type.");
│ │ │ -
231 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ -
232 "Template argument X1 must be a manifold type.");
│ │ │ -
233 return numericalDerivative11<Y, X1, N>(
│ │ │ -
234 std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3)),
│ │ │ -
235 x1, delta);
│ │ │ -
236}
│ │ │ +
195bool assert_container_equal(const std::vector<std::pair<V1,V2> >& expected,
│ │ │ +
196 const std::vector<std::pair<V1,V2> >& actual, double tol = 1e-9) {
│ │ │ +
197 typedef typename std::vector<std::pair<V1,V2> > VectorPair;
│ │ │ +
198 bool match = true;
│ │ │ +
199 if (expected.size() != actual.size())
│ │ │ +
200 match = false;
│ │ │ +
201 typename VectorPair::const_iterator
│ │ │ +
202 itExp = expected.begin(),
│ │ │ +
203 itAct = actual.begin();
│ │ │ +
204 if(match) {
│ │ │ +
205 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) {
│ │ │ +
206 if (!assert_equal(itExp->first, itAct->first, tol) ||
│ │ │ +
207 !assert_equal(itExp->second, itAct->second, tol)) {
│ │ │ +
208 match = false;
│ │ │ +
209 break;
│ │ │ +
210 }
│ │ │ +
211 }
│ │ │ +
212 }
│ │ │ +
213 if(!match) {
│ │ │ +
214 std::cout << "expected: " << std::endl;
│ │ │ +
215 for(const typename VectorPair::value_type& a: expected) {
│ │ │ +
216 a.first.print( " first ");
│ │ │ +
217 a.second.print(" second");
│ │ │ +
218 }
│ │ │ +
219 std::cout << "\nactual: " << std::endl;
│ │ │ +
220 for(const typename VectorPair::value_type& a: actual) {
│ │ │ +
221 a.first.print( " first ");
│ │ │ +
222 a.second.print(" second");
│ │ │ +
223 }
│ │ │ +
224 std::cout << std::endl;
│ │ │ +
225 return false;
│ │ │ +
226 }
│ │ │ +
227 return true;
│ │ │ +
228}
│ │ │ +
│ │ │ +
229
│ │ │ +
230
│ │ │ +
234template<class V>
│ │ │ +
│ │ │ +
235bool assert_container_equal(const V& expected, const V& actual, double tol = 1e-9) {
│ │ │ +
236 bool match = true;
│ │ │ +
237 typename V::const_iterator
│ │ │ +
238 itExp = expected.begin(),
│ │ │ +
239 itAct = actual.begin();
│ │ │ +
240 if(match) {
│ │ │ +
241 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) {
│ │ │ +
242 if (!assert_equal(*itExp, *itAct, tol)) {
│ │ │ +
243 match = false;
│ │ │ +
244 break;
│ │ │ +
245 }
│ │ │ +
246 }
│ │ │ +
247 if(itExp != expected.end() || itAct != actual.end())
│ │ │ +
248 match = false;
│ │ │ +
249 }
│ │ │ +
250 if(!match) {
│ │ │ +
251 std::cout << "expected: " << std::endl;
│ │ │ +
252 for(const typename V::value_type& a: expected) { a.print(" "); }
│ │ │ +
253 std::cout << "\nactual: " << std::endl;
│ │ │ +
254 for(const typename V::value_type& a: actual) { a.print(" "); }
│ │ │ +
255 std::cout << std::endl;
│ │ │ +
256 return false;
│ │ │ +
257 }
│ │ │ +
258 return true;
│ │ │ +
259}
│ │ │ +
│ │ │ +
260
│ │ │ +
265template<class V2>
│ │ │ +
│ │ │ +
266bool assert_container_equality(const std::map<size_t,V2>& expected, const std::map<size_t,V2>& actual) {
│ │ │ +
267 typedef typename std::map<size_t,V2> Map;
│ │ │ +
268 bool match = true;
│ │ │ +
269 if (expected.size() != actual.size())
│ │ │ +
270 match = false;
│ │ │ +
271 typename Map::const_iterator
│ │ │ +
272 itExp = expected.begin(),
│ │ │ +
273 itAct = actual.begin();
│ │ │ +
274 if(match) {
│ │ │ +
275 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) {
│ │ │ +
276 if (itExp->first != itAct->first || itExp->second != itAct->second) {
│ │ │ +
277 match = false;
│ │ │ +
278 break;
│ │ │ +
279 }
│ │ │ +
280 }
│ │ │ +
281 }
│ │ │ +
282 if(!match) {
│ │ │ +
283 std::cout << "expected: " << std::endl;
│ │ │ +
284 for(const typename Map::value_type& a: expected) {
│ │ │ +
285 std::cout << "Key: " << a.first << std::endl;
│ │ │ +
286 std::cout << "Value: " << a.second << std::endl;
│ │ │ +
287 }
│ │ │ +
288 std::cout << "\nactual: " << std::endl;
│ │ │ +
289 for(const typename Map::value_type& a: actual) {
│ │ │ +
290 std::cout << "Key: " << a.first << std::endl;
│ │ │ +
291 std::cout << "Value: " << a.second << std::endl;
│ │ │ +
292 }
│ │ │ +
293 std::cout << std::endl;
│ │ │ +
294 return false;
│ │ │ +
295 }
│ │ │ +
296 return true;
│ │ │ +
297}
│ │ │ +
│ │ │ +
298
│ │ │ +
299
│ │ │ +
303template<class V>
│ │ │ +
│ │ │ +
304bool assert_container_equality(const V& expected, const V& actual) {
│ │ │ +
305 bool match = true;
│ │ │ +
306 if (expected.size() != actual.size())
│ │ │ +
307 match = false;
│ │ │ +
308 typename V::const_iterator
│ │ │ +
309 itExp = expected.begin(),
│ │ │ +
310 itAct = actual.begin();
│ │ │ +
311 if(match) {
│ │ │ +
312 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) {
│ │ │ +
313 if (*itExp != *itAct) {
│ │ │ +
314 match = false;
│ │ │ +
315 break;
│ │ │ +
316 }
│ │ │ +
317 }
│ │ │ +
318 }
│ │ │ +
319 if(!match) {
│ │ │ +
320 std::cout << "expected: " << std::endl;
│ │ │ +
321 for(const typename V::value_type& a: expected) { std::cout << a << " "; }
│ │ │ +
322 std::cout << "\nactual: " << std::endl;
│ │ │ +
323 for(const typename V::value_type& a: actual) { std::cout << a << " "; }
│ │ │ +
324 std::cout << std::endl;
│ │ │ +
325 return false;
│ │ │ +
326 }
│ │ │ +
327 return true;
│ │ │ +
328}
│ │ │ +
│ │ │ +
329
│ │ │ +
│ │ │ +
333inline bool assert_equal(const std::string& expected, const std::string& actual) {
│ │ │ +
334 if (expected == actual)
│ │ │ +
335 return true;
│ │ │ +
336 printf("Not equal:\n");
│ │ │ +
337 std::cout << "expected: [" << expected << "]\n";
│ │ │ +
338 std::cout << "actual: [" << actual << "]" << std::endl;
│ │ │ +
339 return false;
│ │ │ +
340}
│ │ │ +
│ │ │ +
341
│ │ │ +
345template<class V>
│ │ │ +
│ │ │ +
346bool assert_inequal(const V& expected, const V& actual, double tol = 1e-9) {
│ │ │ +
347 if (!actual.equals(expected, tol))
│ │ │ +
348 return true;
│ │ │ +
349 printf("Erroneously equal:\n");
│ │ │ +
350 expected.print("expected");
│ │ │ +
351 actual.print("actual");
│ │ │ +
352 return false;
│ │ │ +
353}
│ │ │
│ │ │ -
237
│ │ │ -
238template<class Y, class X1, class X2, class X3>
│ │ │ -
239typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative31(Y (*h)(const X1&, const X2&, const X3&),
│ │ │ -
240 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
241 return numericalDerivative31<Y, X1, X2, X3>(
│ │ │ -
242 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
243 std::placeholders::_3),
│ │ │ -
244 x1, x2, x3, delta);
│ │ │ -
245}
│ │ │ -
246
│ │ │ -
258template<class Y, class X1, class X2, class X3, int N = traits<X2>::dimension>
│ │ │ -
│ │ │ -
259typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative32(
│ │ │ -
260 std::function<Y(const X1&, const X2&, const X3&)> h, const X1& x1,
│ │ │ -
261 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
262 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
263 "Template argument Y must be a manifold type.");
│ │ │ -
264 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X2>::structure_category>::value),
│ │ │ -
265 "Template argument X2 must be a manifold type.");
│ │ │ -
266 return numericalDerivative11<Y, X2, N>(
│ │ │ -
267 std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3)),
│ │ │ -
268 x2, delta);
│ │ │ -
269}
│ │ │ -
│ │ │ -
270
│ │ │ -
271template<class Y, class X1, class X2, class X3>
│ │ │ -
272inline typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative32(Y (*h)(const X1&, const X2&, const X3&),
│ │ │ -
273 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
274 return numericalDerivative32<Y, X1, X2, X3>(
│ │ │ -
275 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
276 std::placeholders::_3),
│ │ │ -
277 x1, x2, x3, delta);
│ │ │ -
278}
│ │ │ -
279
│ │ │ -
291template<class Y, class X1, class X2, class X3, int N = traits<X3>::dimension>
│ │ │ -
│ │ │ -
292typename internal::FixedSizeMatrix<Y,X3>::type numericalDerivative33(
│ │ │ -
293 std::function<Y(const X1&, const X2&, const X3&)> h, const X1& x1,
│ │ │ -
294 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
295 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
296 "Template argument Y must be a manifold type.");
│ │ │ -
297 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X3>::structure_category>::value),
│ │ │ -
298 "Template argument X3 must be a manifold type.");
│ │ │ -
299 return numericalDerivative11<Y, X3, N>(
│ │ │ -
300 std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1),
│ │ │ -
301 x3, delta);
│ │ │ -
302}
│ │ │ -
│ │ │ -
303
│ │ │ -
304template<class Y, class X1, class X2, class X3>
│ │ │ -
305inline typename internal::FixedSizeMatrix<Y,X3>::type numericalDerivative33(Y (*h)(const X1&, const X2&, const X3&),
│ │ │ -
306 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
307 return numericalDerivative33<Y, X1, X2, X3>(
│ │ │ -
308 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
309 std::placeholders::_3),
│ │ │ -
310 x1, x2, x3, delta);
│ │ │ -
311}
│ │ │ -
312
│ │ │ -
324template<class Y, class X1, class X2, class X3, class X4, int N = traits<X1>::dimension>
│ │ │ -
│ │ │ -
325typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative41(
│ │ │ -
326 std::function<Y(const X1&, const X2&, const X3&, const X4&)> h, const X1& x1,
│ │ │ -
327 const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) {
│ │ │ -
328 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
329 "Template argument Y must be a manifold type.");
│ │ │ -
330 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ -
331 "Template argument X1 must be a manifold type.");
│ │ │ -
332 return numericalDerivative11<Y, X1, N>(
│ │ │ -
333 std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3),
│ │ │ -
334 std::cref(x4)),
│ │ │ -
335 x1, delta);
│ │ │ -
336}
│ │ │ -
│ │ │ -
337
│ │ │ -
338template<class Y, class X1, class X2, class X3, class X4>
│ │ │ -
339inline typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative41(Y (*h)(const X1&, const X2&, const X3&, const X4&),
│ │ │ -
340 const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) {
│ │ │ -
341 return numericalDerivative41<Y, X1, X2, X3, X4>(
│ │ │ -
342 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
343 std::placeholders::_3, std::placeholders::_4),
│ │ │ -
344 x1, x2, x3, x4);
│ │ │ -
345}
│ │ │ -
346
│ │ │ -
358template<class Y, class X1, class X2, class X3, class X4, int N = traits<X2>::dimension>
│ │ │ +
354
│ │ │ +
358template<class V>
│ │ │
│ │ │ -
359typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative42(
│ │ │ -
360 std::function<Y(const X1&, const X2&, const X3&, const X4&)> h, const X1& x1,
│ │ │ -
361 const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) {
│ │ │ -
362 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
363 "Template argument Y must be a manifold type.");
│ │ │ -
364 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X2>::structure_category>::value),
│ │ │ -
365 "Template argument X2 must be a manifold type.");
│ │ │ -
366 return numericalDerivative11<Y, X2, N>(
│ │ │ -
367 std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3),
│ │ │ -
368 std::cref(x4)),
│ │ │ -
369 x2, delta);
│ │ │ -
370}
│ │ │ -
│ │ │ +
359bool assert_stdout_equal(const std::string& expected, const V& actual) {
│ │ │ +
360 // Redirect output to buffer so we can compare
│ │ │ +
361 std::stringstream buffer;
│ │ │ +
362 // Save the original output stream so we can reset later
│ │ │ +
363 std::streambuf* old = std::cout.rdbuf(buffer.rdbuf());
│ │ │ +
364
│ │ │ +
365 // We test against actual std::cout for faithful reproduction
│ │ │ +
366 std::cout << actual;
│ │ │ +
367
│ │ │ +
368 // Get output string and reset stdout
│ │ │ +
369 std::string actual_ = buffer.str();
│ │ │ +
370 std::cout.rdbuf(old);
│ │ │
371
│ │ │ -
372template<class Y, class X1, class X2, class X3, class X4>
│ │ │ -
373inline typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative42(Y (*h)(const X1&, const X2&, const X3&, const X4&),
│ │ │ -
374 const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) {
│ │ │ -
375 return numericalDerivative42<Y, X1, X2, X3, X4>(
│ │ │ -
376 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
377 std::placeholders::_3, std::placeholders::_4),
│ │ │ -
378 x1, x2, x3, x4);
│ │ │ -
379}
│ │ │ -
380
│ │ │ -
392template<class Y, class X1, class X2, class X3, class X4, int N = traits<X3>::dimension>
│ │ │ -
│ │ │ -
393typename internal::FixedSizeMatrix<Y,X3>::type numericalDerivative43(
│ │ │ -
394 std::function<Y(const X1&, const X2&, const X3&, const X4&)> h, const X1& x1,
│ │ │ -
395 const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) {
│ │ │ -
396 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
397 "Template argument Y must be a manifold type.");
│ │ │ -
398 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X3>::structure_category>::value),
│ │ │ -
399 "Template argument X3 must be a manifold type.");
│ │ │ -
400 return numericalDerivative11<Y, X3, N>(
│ │ │ -
401 std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1,
│ │ │ -
402 std::cref(x4)),
│ │ │ -
403 x3, delta);
│ │ │ -
404}
│ │ │ -
│ │ │ -
405
│ │ │ -
406template<class Y, class X1, class X2, class X3, class X4>
│ │ │ -
407inline typename internal::FixedSizeMatrix<Y,X3>::type numericalDerivative43(Y (*h)(const X1&, const X2&, const X3&, const X4&),
│ │ │ -
408 const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) {
│ │ │ -
409 return numericalDerivative43<Y, X1, X2, X3, X4>(
│ │ │ -
410 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
411 std::placeholders::_3, std::placeholders::_4),
│ │ │ -
412 x1, x2, x3, x4);
│ │ │ -
413}
│ │ │ -
414
│ │ │ -
426template<class Y, class X1, class X2, class X3, class X4, int N = traits<X4>::dimension>
│ │ │ -
│ │ │ -
427typename internal::FixedSizeMatrix<Y,X4>::type numericalDerivative44(
│ │ │ -
428 std::function<Y(const X1&, const X2&, const X3&, const X4&)> h, const X1& x1,
│ │ │ -
429 const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) {
│ │ │ -
430 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
431 "Template argument Y must be a manifold type.");
│ │ │ -
432 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X4>::structure_category>::value),
│ │ │ -
433 "Template argument X4 must be a manifold type.");
│ │ │ -
434 return numericalDerivative11<Y, X4, N>(
│ │ │ -
435 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3),
│ │ │ -
436 std::placeholders::_1),
│ │ │ -
437 x4, delta);
│ │ │ -
438}
│ │ │ -
│ │ │ -
439
│ │ │ -
440template<class Y, class X1, class X2, class X3, class X4>
│ │ │ -
441inline typename internal::FixedSizeMatrix<Y,X4>::type numericalDerivative44(Y (*h)(const X1&, const X2&, const X3&, const X4&),
│ │ │ -
442 const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) {
│ │ │ -
443 return numericalDerivative44<Y, X1, X2, X3, X4>(
│ │ │ -
444 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
445 std::placeholders::_3, std::placeholders::_4),
│ │ │ -
446 x1, x2, x3, x4);
│ │ │ -
447}
│ │ │ -
448
│ │ │ -
461template<class Y, class X1, class X2, class X3, class X4, class X5, int N = traits<X1>::dimension>
│ │ │ -
│ │ │ -
462typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative51(
│ │ │ -
463 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&)> h, const X1& x1,
│ │ │ -
464 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ -
465 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
466 "Template argument Y must be a manifold type.");
│ │ │ -
467 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ -
468 "Template argument X1 must be a manifold type.");
│ │ │ -
469 return numericalDerivative11<Y, X1, N>(
│ │ │ -
470 std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3),
│ │ │ -
471 std::cref(x4), std::cref(x5)),
│ │ │ -
472 x1, delta);
│ │ │ -
473}
│ │ │ -
│ │ │ -
474
│ │ │ -
475template<class Y, class X1, class X2, class X3, class X4, class X5>
│ │ │ -
476inline typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative51(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&),
│ │ │ -
477 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ -
478 return numericalDerivative51<Y, X1, X2, X3, X4, X5>(
│ │ │ -
479 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
480 std::placeholders::_3, std::placeholders::_4,
│ │ │ -
481 std::placeholders::_5),
│ │ │ -
482 x1, x2, x3, x4, x5);
│ │ │ -
483}
│ │ │ -
484
│ │ │ -
497template<class Y, class X1, class X2, class X3, class X4, class X5, int N = traits<X2>::dimension>
│ │ │ -
│ │ │ -
498typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative52(
│ │ │ -
499 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&)> h, const X1& x1,
│ │ │ -
500 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ -
501 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
502 "Template argument Y must be a manifold type.");
│ │ │ -
503 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ -
504 "Template argument X1 must be a manifold type.");
│ │ │ -
505 return numericalDerivative11<Y, X2, N>(
│ │ │ -
506 std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3),
│ │ │ -
507 std::cref(x4), std::cref(x5)),
│ │ │ -
508 x2, delta);
│ │ │ -
509}
│ │ │ -
│ │ │ -
510
│ │ │ -
511template<class Y, class X1, class X2, class X3, class X4, class X5>
│ │ │ -
512inline typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative52(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&),
│ │ │ -
513 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ -
514 return numericalDerivative52<Y, X1, X2, X3, X4, X5>(
│ │ │ -
515 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
516 std::placeholders::_3, std::placeholders::_4,
│ │ │ -
517 std::placeholders::_5),
│ │ │ -
518 x1, x2, x3, x4, x5);
│ │ │ -
519}
│ │ │ -
520
│ │ │ -
533template<class Y, class X1, class X2, class X3, class X4, class X5, int N = traits<X3>::dimension>
│ │ │ -
│ │ │ -
534typename internal::FixedSizeMatrix<Y,X3>::type numericalDerivative53(
│ │ │ -
535 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&)> h, const X1& x1,
│ │ │ -
536 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ -
537 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
538 "Template argument Y must be a manifold type.");
│ │ │ -
539 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ -
540 "Template argument X1 must be a manifold type.");
│ │ │ -
541 return numericalDerivative11<Y, X3, N>(
│ │ │ -
542 std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1,
│ │ │ -
543 std::cref(x4), std::cref(x5)),
│ │ │ -
544 x3, delta);
│ │ │ -
545}
│ │ │ -
│ │ │ -
546
│ │ │ -
547template<class Y, class X1, class X2, class X3, class X4, class X5>
│ │ │ -
548inline typename internal::FixedSizeMatrix<Y,X3>::type numericalDerivative53(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&),
│ │ │ -
549 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ -
550 return numericalDerivative53<Y, X1, X2, X3, X4, X5>(
│ │ │ -
551 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
552 std::placeholders::_3, std::placeholders::_4,
│ │ │ -
553 std::placeholders::_5),
│ │ │ -
554 x1, x2, x3, x4, x5);
│ │ │ -
555}
│ │ │ -
556
│ │ │ -
569template<class Y, class X1, class X2, class X3, class X4, class X5, int N = traits<X4>::dimension>
│ │ │ -
│ │ │ -
570typename internal::FixedSizeMatrix<Y,X4>::type numericalDerivative54(
│ │ │ -
571 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&)> h, const X1& x1,
│ │ │ -
572 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ -
573 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
574 "Template argument Y must be a manifold type.");
│ │ │ -
575 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ -
576 "Template argument X1 must be a manifold type.");
│ │ │ -
577 return numericalDerivative11<Y, X4, N>(
│ │ │ -
578 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3),
│ │ │ -
579 std::placeholders::_1, std::cref(x5)),
│ │ │ -
580 x4, delta);
│ │ │ -
581}
│ │ │ -
│ │ │ -
582
│ │ │ -
583template<class Y, class X1, class X2, class X3, class X4, class X5>
│ │ │ -
584inline typename internal::FixedSizeMatrix<Y,X4>::type numericalDerivative54(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&),
│ │ │ -
585 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ -
586 return numericalDerivative54<Y, X1, X2, X3, X4, X5>(
│ │ │ -
587 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
588 std::placeholders::_3, std::placeholders::_4,
│ │ │ -
589 std::placeholders::_5),
│ │ │ -
590 x1, x2, x3, x4, x5);
│ │ │ -
591}
│ │ │ -
592
│ │ │ -
605template<class Y, class X1, class X2, class X3, class X4, class X5, int N = traits<X5>::dimension>
│ │ │ -
│ │ │ -
606typename internal::FixedSizeMatrix<Y,X5>::type numericalDerivative55(
│ │ │ -
607 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&)> h, const X1& x1,
│ │ │ -
608 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ -
609 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
610 "Template argument Y must be a manifold type.");
│ │ │ -
611 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ -
612 "Template argument X1 must be a manifold type.");
│ │ │ -
613 return numericalDerivative11<Y, X5, N>(
│ │ │ -
614 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3),
│ │ │ -
615 std::cref(x4), std::placeholders::_1),
│ │ │ -
616 x5, delta);
│ │ │ -
617}
│ │ │ -
│ │ │ -
618
│ │ │ -
619template<class Y, class X1, class X2, class X3, class X4, class X5>
│ │ │ -
620inline typename internal::FixedSizeMatrix<Y,X5>::type numericalDerivative55(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&),
│ │ │ -
621 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ -
622 return numericalDerivative55<Y, X1, X2, X3, X4, X5>(
│ │ │ -
623 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
624 std::placeholders::_3, std::placeholders::_4,
│ │ │ -
625 std::placeholders::_5),
│ │ │ -
626 x1, x2, x3, x4, x5);
│ │ │ -
627}
│ │ │ -
628
│ │ │ -
642template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X1>::dimension>
│ │ │ -
│ │ │ -
643typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative61(
│ │ │ -
644 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&)> h, const X1& x1,
│ │ │ -
645 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ -
646 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
647 "Template argument Y must be a manifold type.");
│ │ │ -
648 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ -
649 "Template argument X1 must be a manifold type.");
│ │ │ -
650 return numericalDerivative11<Y, X1, N>(
│ │ │ -
651 std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3),
│ │ │ -
652 std::cref(x4), std::cref(x5), std::cref(x6)),
│ │ │ -
653 x1, delta);
│ │ │ -
654}
│ │ │ -
│ │ │ -
655
│ │ │ -
656template<class Y, class X1, class X2, class X3, class X4, class X5, class X6>
│ │ │ -
657inline typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative61(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&),
│ │ │ -
658 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ -
659 return numericalDerivative61<Y, X1, X2, X3, X4, X5, X6>(
│ │ │ -
660 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
661 std::placeholders::_3, std::placeholders::_4,
│ │ │ -
662 std::placeholders::_5, std::placeholders::_6),
│ │ │ -
663 x1, x2, x3, x4, x5, x6);
│ │ │ -
664}
│ │ │ -
665
│ │ │ -
679template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X2>::dimension>
│ │ │ -
│ │ │ -
680typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative62(
│ │ │ -
681 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&)> h, const X1& x1,
│ │ │ -
682 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ -
683 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
684 "Template argument Y must be a manifold type.");
│ │ │ -
685 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ -
686 "Template argument X1 must be a manifold type.");
│ │ │ -
687 return numericalDerivative11<Y, X2, N>(
│ │ │ -
688 std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3),
│ │ │ -
689 std::cref(x4), std::cref(x5), std::cref(x6)),
│ │ │ -
690 x2, delta);
│ │ │ -
691}
│ │ │ -
│ │ │ -
692
│ │ │ -
693template<class Y, class X1, class X2, class X3, class X4, class X5, class X6>
│ │ │ -
694inline typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative62(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&),
│ │ │ -
695 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ -
696 return numericalDerivative62<Y, X1, X2, X3, X4, X5, X6>(
│ │ │ -
697 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
698 std::placeholders::_3, std::placeholders::_4,
│ │ │ -
699 std::placeholders::_5, std::placeholders::_6),
│ │ │ -
700 x1, x2, x3, x4, x5, x6);
│ │ │ -
701}
│ │ │ -
702
│ │ │ -
716template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X3>::dimension>
│ │ │ -
│ │ │ -
717typename internal::FixedSizeMatrix<Y,X3>::type numericalDerivative63(
│ │ │ -
718 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&)> h, const X1& x1,
│ │ │ -
719 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ -
720 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
721 "Template argument Y must be a manifold type.");
│ │ │ -
722 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ -
723 "Template argument X1 must be a manifold type.");
│ │ │ -
724 return numericalDerivative11<Y, X3, N>(
│ │ │ -
725 std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1,
│ │ │ -
726 std::cref(x4), std::cref(x5), std::cref(x6)),
│ │ │ -
727 x3, delta);
│ │ │ -
728}
│ │ │ -
│ │ │ -
729
│ │ │ -
730template<class Y, class X1, class X2, class X3, class X4, class X5, class X6>
│ │ │ -
731inline typename internal::FixedSizeMatrix<Y,X3>::type numericalDerivative63(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&),
│ │ │ -
732 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ -
733 return numericalDerivative63<Y, X1, X2, X3, X4, X5, X6>(
│ │ │ -
734 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
735 std::placeholders::_3, std::placeholders::_4,
│ │ │ -
736 std::placeholders::_5, std::placeholders::_6),
│ │ │ -
737 x1, x2, x3, x4, x5, x6);
│ │ │ -
738}
│ │ │ -
739
│ │ │ -
753template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X4>::dimension>
│ │ │ -
│ │ │ -
754typename internal::FixedSizeMatrix<Y,X4>::type numericalDerivative64(
│ │ │ -
755 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&)> h, const X1& x1,
│ │ │ -
756 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ -
757 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
758 "Template argument Y must be a manifold type.");
│ │ │ -
759 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ -
760 "Template argument X1 must be a manifold type.");
│ │ │ -
761 return numericalDerivative11<Y, X4, N>(
│ │ │ -
762 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3),
│ │ │ -
763 std::placeholders::_1, std::cref(x5), std::cref(x6)),
│ │ │ -
764 x4, delta);
│ │ │ -
765}
│ │ │ -
│ │ │ -
766
│ │ │ -
767template<class Y, class X1, class X2, class X3, class X4, class X5, class X6>
│ │ │ -
768inline typename internal::FixedSizeMatrix<Y,X4>::type numericalDerivative64(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&),
│ │ │ -
769 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ -
770 return numericalDerivative64<Y, X1, X2, X3, X4, X5>(
│ │ │ -
771 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
772 std::placeholders::_3, std::placeholders::_4,
│ │ │ -
773 std::placeholders::_5, std::placeholders::_6),
│ │ │ -
774 x1, x2, x3, x4, x5, x6);
│ │ │ -
775}
│ │ │ -
776
│ │ │ -
790template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X5>::dimension>
│ │ │ -
│ │ │ -
791typename internal::FixedSizeMatrix<Y,X5>::type numericalDerivative65(
│ │ │ -
792 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&)> h, const X1& x1,
│ │ │ -
793 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ -
794 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
795 "Template argument Y must be a manifold type.");
│ │ │ -
796 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ -
797 "Template argument X1 must be a manifold type.");
│ │ │ -
798 return numericalDerivative11<Y, X5, N>(
│ │ │ -
799 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3),
│ │ │ -
800 std::cref(x4), std::placeholders::_1, std::cref(x6)),
│ │ │ -
801 x5, delta);
│ │ │ -
802}
│ │ │ -
│ │ │ -
803
│ │ │ -
804template<class Y, class X1, class X2, class X3, class X4, class X5, class X6>
│ │ │ -
805inline typename internal::FixedSizeMatrix<Y,X5>::type numericalDerivative65(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&),
│ │ │ -
806 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ -
807 return numericalDerivative65<Y, X1, X2, X3, X4, X5, X6>(
│ │ │ -
808 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
809 std::placeholders::_3, std::placeholders::_4,
│ │ │ -
810 std::placeholders::_5, std::placeholders::_6),
│ │ │ -
811 x1, x2, x3, x4, x5, x6);
│ │ │ -
812}
│ │ │ -
813
│ │ │ -
827template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X6>::dimension>
│ │ │ -
│ │ │ -
828typename internal::FixedSizeMatrix<Y, X6>::type numericalDerivative66(
│ │ │ -
829 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&)> h,
│ │ │ -
830 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6,
│ │ │ -
831 double delta = 1e-5) {
│ │ │ -
832 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ -
833 "Template argument Y must be a manifold type.");
│ │ │ -
834 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ -
835 "Template argument X1 must be a manifold type.");
│ │ │ -
836 return numericalDerivative11<Y, X6, N>(
│ │ │ -
837 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3),
│ │ │ -
838 std::cref(x4), std::cref(x5), std::placeholders::_1),
│ │ │ -
839 x6, delta);
│ │ │ -
840}
│ │ │ -
│ │ │ -
841
│ │ │ -
842template<class Y, class X1, class X2, class X3, class X4, class X5, class X6>
│ │ │ -
843inline typename internal::FixedSizeMatrix<Y,X6>::type numericalDerivative66(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&),
│ │ │ -
844 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ -
845 return numericalDerivative66<Y, X1, X2, X3, X4, X5, X6>(
│ │ │ -
846 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
847 std::placeholders::_3, std::placeholders::_4,
│ │ │ -
848 std::placeholders::_5, std::placeholders::_6),
│ │ │ -
849 x1, x2, x3, x4, x5, x6);
│ │ │ -
850}
│ │ │ -
851
│ │ │ -
860template<class X>
│ │ │ -
│ │ │ -
861inline typename internal::FixedSizeMatrix<X,X>::type numericalHessian(std::function<double(const X&)> f, const X& x,
│ │ │ -
862 double delta = 1e-5) {
│ │ │ -
863 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X>::structure_category>::value),
│ │ │ -
864 "Template argument X must be a manifold type.");
│ │ │ -
865 typedef Eigen::Matrix<double, traits<X>::dimension, 1> VectorD;
│ │ │ -
866 typedef std::function<double(const X&)> F;
│ │ │ -
867 typedef std::function<VectorD(F, const X&, double)> G;
│ │ │ -
868 G ng = static_cast<G>(numericalGradient<X> );
│ │ │ -
869 return numericalDerivative11<VectorD, X>(
│ │ │ -
870 std::bind(ng, f, std::placeholders::_1, delta), x, delta);
│ │ │ -
871}
│ │ │ -
│ │ │ -
872
│ │ │ -
873template<class X>
│ │ │ -
874inline typename internal::FixedSizeMatrix<X,X>::type numericalHessian(double (*f)(const X&), const X& x, double delta =
│ │ │ -
875 1e-5) {
│ │ │ -
876 return numericalHessian(std::function<double(const X&)>(f), x, delta);
│ │ │ -
877}
│ │ │ -
878
│ │ │ -
882template<class X1, class X2>
│ │ │ -
│ │ │ -
883class G_x1 {
│ │ │ -
884 const std::function<double(const X1&, const X2&)>& f_;
│ │ │ -
885 X1 x1_;
│ │ │ -
886 double delta_;
│ │ │ -
887public:
│ │ │ -
888 typedef typename internal::FixedSizeMatrix<X1>::type Vector;
│ │ │ -
889
│ │ │ -
890 G_x1(const std::function<double(const X1&, const X2&)>& f, const X1& x1,
│ │ │ -
891 double delta) :
│ │ │ -
892 f_(f), x1_(x1), delta_(delta) {
│ │ │ -
893 }
│ │ │ -
894 Vector operator()(const X2& x2) {
│ │ │ -
895 return numericalGradient<X1>(
│ │ │ -
896 std::bind(f_, std::placeholders::_1, std::cref(x2)), x1_, delta_);
│ │ │ -
897 }
│ │ │ -
898};
│ │ │ -
│ │ │ -
899
│ │ │ -
900template<class X1, class X2>
│ │ │ -
901inline typename internal::FixedSizeMatrix<X1,X2>::type numericalHessian212(
│ │ │ -
902 std::function<double(const X1&, const X2&)> f, const X1& x1, const X2& x2,
│ │ │ -
903 double delta = 1e-5) {
│ │ │ -
904 typedef typename internal::FixedSizeMatrix<X1>::type Vector;
│ │ │ -
905 G_x1<X1, X2> g_x1(f, x1, delta);
│ │ │ -
906 return numericalDerivative11<Vector, X2>(
│ │ │ -
907 std::function<Vector(const X2&)>(
│ │ │ -
908 std::bind<Vector>(std::ref(g_x1), std::placeholders::_1)),
│ │ │ -
909 x2, delta);
│ │ │ -
910}
│ │ │ -
911
│ │ │ -
912template<class X1, class X2>
│ │ │ -
913inline typename internal::FixedSizeMatrix<X1,X2>::type numericalHessian212(double (*f)(const X1&, const X2&),
│ │ │ -
914 const X1& x1, const X2& x2, double delta = 1e-5) {
│ │ │ -
915 return numericalHessian212(std::function<double(const X1&, const X2&)>(f),
│ │ │ -
916 x1, x2, delta);
│ │ │ -
917}
│ │ │ -
918
│ │ │ -
919template<class X1, class X2>
│ │ │ -
920inline typename internal::FixedSizeMatrix<X1,X1>::type numericalHessian211(
│ │ │ -
921 std::function<double(const X1&, const X2&)> f, const X1& x1, const X2& x2,
│ │ │ -
922 double delta = 1e-5) {
│ │ │ -
923
│ │ │ -
924 typedef typename internal::FixedSizeMatrix<X1>::type Vector;
│ │ │ -
925
│ │ │ -
926 Vector (*numGrad)(std::function<double(const X1&)>, const X1&,
│ │ │ -
927 double) = &numericalGradient<X1>;
│ │ │ -
928 std::function<double(const X1&)> f2(
│ │ │ -
929 std::bind(f, std::placeholders::_1, std::cref(x2)));
│ │ │ -
930
│ │ │ -
931 return numericalDerivative11<Vector, X1>(
│ │ │ -
932 std::function<Vector(const X1&)>(
│ │ │ -
933 std::bind(numGrad, f2, std::placeholders::_1, delta)),
│ │ │ -
934 x1, delta);
│ │ │ -
935}
│ │ │ -
936
│ │ │ -
937template<class X1, class X2>
│ │ │ -
938inline typename internal::FixedSizeMatrix<X1,X1>::type numericalHessian211(double (*f)(const X1&, const X2&),
│ │ │ -
939 const X1& x1, const X2& x2, double delta = 1e-5) {
│ │ │ -
940 return numericalHessian211(std::function<double(const X1&, const X2&)>(f),
│ │ │ -
941 x1, x2, delta);
│ │ │ -
942}
│ │ │ -
943
│ │ │ -
944template<class X1, class X2>
│ │ │ -
945inline typename internal::FixedSizeMatrix<X2,X2>::type numericalHessian222(
│ │ │ -
946 std::function<double(const X1&, const X2&)> f, const X1& x1, const X2& x2,
│ │ │ -
947 double delta = 1e-5) {
│ │ │ -
948 typedef typename internal::FixedSizeMatrix<X2>::type Vector;
│ │ │ -
949 Vector (*numGrad)(std::function<double(const X2&)>, const X2&,
│ │ │ -
950 double) = &numericalGradient<X2>;
│ │ │ -
951 std::function<double(const X2&)> f2(
│ │ │ -
952 std::bind(f, std::cref(x1), std::placeholders::_1));
│ │ │ -
953
│ │ │ -
954 return numericalDerivative11<Vector, X2>(
│ │ │ -
955 std::function<Vector(const X2&)>(
│ │ │ -
956 std::bind(numGrad, f2, std::placeholders::_1, delta)),
│ │ │ -
957 x2, delta);
│ │ │ -
958}
│ │ │ -
959
│ │ │ -
960template<class X1, class X2>
│ │ │ -
961inline typename internal::FixedSizeMatrix<X2,X2>::type numericalHessian222(double (*f)(const X1&, const X2&),
│ │ │ -
962 const X1& x1, const X2& x2, double delta = 1e-5) {
│ │ │ -
963 return numericalHessian222(std::function<double(const X1&, const X2&)>(f),
│ │ │ -
964 x1, x2, delta);
│ │ │ -
965}
│ │ │ -
966
│ │ │ -
970/* **************************************************************** */
│ │ │ -
971template<class X1, class X2, class X3>
│ │ │ -
│ │ │ -
972inline typename internal::FixedSizeMatrix<X1,X1>::type numericalHessian311(
│ │ │ -
973 std::function<double(const X1&, const X2&, const X3&)> f, const X1& x1,
│ │ │ -
974 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
975 typedef typename internal::FixedSizeMatrix<X1>::type Vector;
│ │ │ -
976 Vector (*numGrad)(std::function<double(const X1&)>, const X1&,
│ │ │ -
977 double) = &numericalGradient<X1>;
│ │ │ -
978 std::function<double(const X1&)> f2(std::bind(
│ │ │ -
979 f, std::placeholders::_1, std::cref(x2), std::cref(x3)));
│ │ │ -
980
│ │ │ -
981 return numericalDerivative11<Vector, X1>(
│ │ │ -
982 std::function<Vector(const X1&)>(
│ │ │ -
983 std::bind(numGrad, f2, std::placeholders::_1, delta)),
│ │ │ -
984 x1, delta);
│ │ │ -
985}
│ │ │ +
372 return assert_equal(expected, actual_);
│ │ │ +
373}
│ │ │
│ │ │ -
986
│ │ │ -
987template<class X1, class X2, class X3>
│ │ │ -
988inline typename internal::FixedSizeMatrix<X1,X1>::type numericalHessian311(double (*f)(const X1&, const X2&, const X3&),
│ │ │ -
989 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
990 return numericalHessian311(
│ │ │ -
991 std::function<double(const X1&, const X2&, const X3&)>(f), x1, x2, x3,
│ │ │ -
992 delta);
│ │ │ -
993}
│ │ │ -
994
│ │ │ -
995/* **************************************************************** */
│ │ │ -
996template<class X1, class X2, class X3>
│ │ │ -
997inline typename internal::FixedSizeMatrix<X2,X2>::type numericalHessian322(
│ │ │ -
998 std::function<double(const X1&, const X2&, const X3&)> f, const X1& x1,
│ │ │ -
999 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
1000 typedef typename internal::FixedSizeMatrix<X2>::type Vector;
│ │ │ -
1001 Vector (*numGrad)(std::function<double(const X2&)>, const X2&,
│ │ │ -
1002 double) = &numericalGradient<X2>;
│ │ │ -
1003 std::function<double(const X2&)> f2(std::bind(
│ │ │ -
1004 f, std::cref(x1), std::placeholders::_1, std::cref(x3)));
│ │ │ -
1005
│ │ │ -
1006 return numericalDerivative11<Vector, X2>(
│ │ │ -
1007 std::function<Vector(const X2&)>(
│ │ │ -
1008 std::bind(numGrad, f2, std::placeholders::_1, delta)),
│ │ │ -
1009 x2, delta);
│ │ │ -
1010}
│ │ │ -
1011
│ │ │ -
1012template<class X1, class X2, class X3>
│ │ │ -
1013inline typename internal::FixedSizeMatrix<X2,X2>::type numericalHessian322(double (*f)(const X1&, const X2&, const X3&),
│ │ │ -
1014 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
1015 return numericalHessian322(
│ │ │ -
1016 std::function<double(const X1&, const X2&, const X3&)>(f), x1, x2, x3,
│ │ │ -
1017 delta);
│ │ │ -
1018}
│ │ │ -
1019
│ │ │ -
1020/* **************************************************************** */
│ │ │ -
1021template<class X1, class X2, class X3>
│ │ │ -
1022inline typename internal::FixedSizeMatrix<X3,X3>::type numericalHessian333(
│ │ │ -
1023 std::function<double(const X1&, const X2&, const X3&)> f, const X1& x1,
│ │ │ -
1024 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
1025 typedef typename internal::FixedSizeMatrix<X3>::type Vector;
│ │ │ -
1026 Vector (*numGrad)(std::function<double(const X3&)>, const X3&,
│ │ │ -
1027 double) = &numericalGradient<X3>;
│ │ │ -
1028 std::function<double(const X3&)> f2(std::bind(
│ │ │ -
1029 f, std::cref(x1), std::cref(x2), std::placeholders::_1));
│ │ │ -
1030
│ │ │ -
1031 return numericalDerivative11<Vector, X3>(
│ │ │ -
1032 std::function<Vector(const X3&)>(
│ │ │ -
1033 std::bind(numGrad, f2, std::placeholders::_1, delta)),
│ │ │ -
1034 x3, delta);
│ │ │ -
1035}
│ │ │ -
1036
│ │ │ -
1037template<class X1, class X2, class X3>
│ │ │ -
1038inline typename internal::FixedSizeMatrix<X3,X3>::type numericalHessian333(double (*f)(const X1&, const X2&, const X3&),
│ │ │ -
1039 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
1040 return numericalHessian333(
│ │ │ -
1041 std::function<double(const X1&, const X2&, const X3&)>(f), x1, x2, x3,
│ │ │ -
1042 delta);
│ │ │ -
1043}
│ │ │ -
1044
│ │ │ -
1045/* **************************************************************** */
│ │ │ -
1046template<class X1, class X2, class X3>
│ │ │ -
1047inline typename internal::FixedSizeMatrix<X1,X2>::type numericalHessian312(
│ │ │ -
1048 std::function<double(const X1&, const X2&, const X3&)> f, const X1& x1,
│ │ │ -
1049 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
1050 return numericalHessian212<X1, X2>(
│ │ │ -
1051 std::function<double(const X1&, const X2&)>(
│ │ │ -
1052 std::bind(f, std::placeholders::_1, std::placeholders::_2,
│ │ │ -
1053 std::cref(x3))),
│ │ │ -
1054 x1, x2, delta);
│ │ │ -
1055}
│ │ │ -
1056
│ │ │ -
1057template<class X1, class X2, class X3>
│ │ │ -
1058inline typename internal::FixedSizeMatrix<X1,X3>::type numericalHessian313(
│ │ │ -
1059 std::function<double(const X1&, const X2&, const X3&)> f, const X1& x1,
│ │ │ -
1060 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
1061 return numericalHessian212<X1, X3>(
│ │ │ -
1062 std::function<double(const X1&, const X3&)>(
│ │ │ -
1063 std::bind(f, std::placeholders::_1, std::cref(x2),
│ │ │ -
1064 std::placeholders::_2)),
│ │ │ -
1065 x1, x3, delta);
│ │ │ -
1066}
│ │ │ -
1067
│ │ │ -
1068template<class X1, class X2, class X3>
│ │ │ -
1069inline typename internal::FixedSizeMatrix<X2,X3>::type numericalHessian323(
│ │ │ -
1070 std::function<double(const X1&, const X2&, const X3&)> f, const X1& x1,
│ │ │ -
1071 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
1072 return numericalHessian212<X2, X3>(
│ │ │ -
1073 std::function<double(const X2&, const X3&)>(
│ │ │ -
1074 std::bind(f, std::cref(x1), std::placeholders::_1,
│ │ │ -
1075 std::placeholders::_2)),
│ │ │ -
1076 x2, x3, delta);
│ │ │ -
1077}
│ │ │ -
1078
│ │ │ -
1079/* **************************************************************** */
│ │ │ -
1080template<class X1, class X2, class X3>
│ │ │ -
1081inline typename internal::FixedSizeMatrix<X1,X2>::type numericalHessian312(double (*f)(const X1&, const X2&, const X3&),
│ │ │ -
1082 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
1083 return numericalHessian312(
│ │ │ -
1084 std::function<double(const X1&, const X2&, const X3&)>(f), x1, x2, x3,
│ │ │ -
1085 delta);
│ │ │ -
1086}
│ │ │ -
1087
│ │ │ -
1088template<class X1, class X2, class X3>
│ │ │ -
1089inline typename internal::FixedSizeMatrix<X1,X3>::type numericalHessian313(double (*f)(const X1&, const X2&, const X3&),
│ │ │ -
1090 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
1091 return numericalHessian313(
│ │ │ -
1092 std::function<double(const X1&, const X2&, const X3&)>(f), x1, x2, x3,
│ │ │ -
1093 delta);
│ │ │ -
1094}
│ │ │ -
1095
│ │ │ -
1096template<class X1, class X2, class X3>
│ │ │ -
1097inline typename internal::FixedSizeMatrix<X2,X3>::type numericalHessian323(double (*f)(const X1&, const X2&, const X3&),
│ │ │ -
1098 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ -
1099 return numericalHessian323(
│ │ │ -
1100 std::function<double(const X1&, const X2&, const X3&)>(f), x1, x2, x3,
│ │ │ -
1101 delta);
│ │ │ -
1102}
│ │ │ -
1103
│ │ │ -
1104} // namespace gtsam
│ │ │ -
1105
│ │ │ -
Base class and basic functions for Lie types.
│ │ │ -
Factor Graph Values.
│ │ │ - │ │ │ -
A non-templated config holding any types of Manifold-group elements.
│ │ │ +
374
│ │ │ +
380template <class V>
│ │ │ +
│ │ │ +
381bool assert_print_equal(const std::string& expected, const V& actual,
│ │ │ +
382 const std::string& s = "") {
│ │ │ +
383 // Redirect output to buffer so we can compare
│ │ │ +
384 std::stringstream buffer;
│ │ │ +
385 // Save the original output stream so we can reset later
│ │ │ +
386 std::streambuf* old = std::cout.rdbuf(buffer.rdbuf());
│ │ │ +
387
│ │ │ +
388 // We test against actual std::cout for faithful reproduction
│ │ │ +
389 actual.print(s);
│ │ │ +
390
│ │ │ +
391 // Get output string and reset stdout
│ │ │ +
392 std::string actual_ = buffer.str();
│ │ │ +
393 std::cout.rdbuf(old);
│ │ │ +
394
│ │ │ +
395 return assert_equal(expected, actual_);
│ │ │ +
396}
│ │ │ +
│ │ │ +
397
│ │ │ +
398} // \namespace gtsam
│ │ │ +
Concept check for values that can be used in unit tests.
│ │ │ +
Included from all GTSAM files.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative61(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
Compute numerical derivative in argument 1 of 6-argument function.
Definition numericalDerivative.h:643
│ │ │ -
internal::FixedSizeMatrix< X1, X1 >::type numericalHessian311(std::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
Numerical Hessian for tenary functions.
Definition numericalDerivative.h:972
│ │ │ -
internal::FixedSizeMatrix< X, X >::type numericalHessian(std::function< double(const X &)> f, const X &x, double delta=1e-5)
Compute numerical Hessian matrix.
Definition numericalDerivative.h:861
│ │ │ -
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative21(const std::function< Y(const X1 &, const X2 &)> &h, const X1 &x1, const X2 &x2, double delta=1e-5)
Compute numerical derivative in argument 1 of binary function.
Definition numericalDerivative.h:166
│ │ │ -
internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative63(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
Compute numerical derivative in argument 3 of 6-argument function.
Definition numericalDerivative.h:717
│ │ │ -
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative51(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
Compute numerical derivative in argument 1 of 5-argument function.
Definition numericalDerivative.h:462
│ │ │ -
internal::FixedSizeMatrix< Y, X4 >::type numericalDerivative54(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
Compute numerical derivative in argument 4 of 5-argument function.
Definition numericalDerivative.h:570
│ │ │ -
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative41(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
Compute numerical derivative in argument 1 of 4-argument function.
Definition numericalDerivative.h:325
│ │ │ -
internal::FixedSizeMatrix< Y, X4 >::type numericalDerivative64(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
Compute numerical derivative in argument 4 of 6-argument function.
Definition numericalDerivative.h:754
│ │ │ -
internal::FixedSizeMatrix< Y, X6 >::type numericalDerivative66(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
Compute numerical derivative in argument 6 of 6-argument function.
Definition numericalDerivative.h:828
│ │ │ -
internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative33(std::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
Compute numerical derivative in argument 3 of ternary function.
Definition numericalDerivative.h:292
│ │ │ -
internal::FixedSizeMatrix< Y, X >::type numericalDerivative11(std::function< Y(const X &)> h, const X &x, double delta=1e-5)
New-style numerical derivatives using manifold_traits.
Definition numericalDerivative.h:110
│ │ │ -
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative22(std::function< Y(const X1 &, const X2 &)> h, const X1 &x1, const X2 &x2, double delta=1e-5)
Compute numerical derivative in argument 2 of binary function.
Definition numericalDerivative.h:195
│ │ │ -
internal::FixedSizeMatrix< Y, X5 >::type numericalDerivative55(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
Compute numerical derivative in argument 5 of 5-argument function.
Definition numericalDerivative.h:606
│ │ │ -
internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative43(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
Compute numerical derivative in argument 3 of 4-argument function.
Definition numericalDerivative.h:393
│ │ │ -
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative52(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
Compute numerical derivative in argument 2 of 5-argument function.
Definition numericalDerivative.h:498
│ │ │ -
internal::FixedSizeMatrix< Y, X5 >::type numericalDerivative65(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
Compute numerical derivative in argument 5 of 6-argument function.
Definition numericalDerivative.h:791
│ │ │ -
internal::FixedSizeMatrix< Y, X4 >::type numericalDerivative44(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
Compute numerical derivative in argument 4 of 4-argument function.
Definition numericalDerivative.h:427
│ │ │ -
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative31(std::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
Compute numerical derivative in argument 1 of ternary function.
Definition numericalDerivative.h:226
│ │ │ -
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative62(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
Compute numerical derivative in argument 2 of 6-argument function.
Definition numericalDerivative.h:680
│ │ │ -
internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative53(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
Compute numerical derivative in argument 3 of 5-argument function.
Definition numericalDerivative.h:534
│ │ │ -
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative32(std::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
Compute numerical derivative in argument 2 of ternary function.
Definition numericalDerivative.h:259
│ │ │ -
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative42(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
Compute numerical derivative in argument 2 of 4-argument function.
Definition numericalDerivative.h:359
│ │ │ -
Eigen::Matrix< double, N, 1 > numericalGradient(std::function< double(const X &)> h, const X &x, double delta=1e-5)
Numerically compute gradient of scalar function.
Definition numericalDerivative.h:70
│ │ │ -
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ -
tag to assert a type is a manifold
Definition Manifold.h:33
│ │ │ -
Definition numericalDerivative.h:56
│ │ │ -
Helper class that computes the derivative of f w.r.t.
Definition numericalDerivative.h:883
│ │ │ +
bool assert_stdout_equal(const std::string &expected, const V &actual)
Capture std out via cout stream and compare against string.
Definition TestableAssertions.h:359
│ │ │ +
bool assert_container_equal(const std::map< V1, V2 > &expected, const std::map< V1, V2 > &actual, double tol=1e-9)
Function for comparing maps of testable->testable TODO: replace with more generalized version.
Definition TestableAssertions.h:119
│ │ │ +
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
equals with an tolerance, prints out message if unequal
Definition Matrix.cpp:43
│ │ │ +
bool assert_container_equality(const std::map< size_t, V2 > &expected, const std::map< size_t, V2 > &actual)
Function for comparing maps of size_t->testable Types are assumed to have operator ==.
Definition TestableAssertions.h:266
│ │ │ +
bool assert_inequal(const Matrix &A, const Matrix &B, double tol)
inequals with an tolerance, prints out message if within tolerance
Definition Matrix.cpp:63
│ │ │ +
bool assert_print_equal(const std::string &expected, const V &actual, const std::string &s="")
Capture print function output and compare against string.
Definition TestableAssertions.h:381
│ │ │ +
std::uint64_t Key
Integer nonlinear key type.
Definition types.h:100
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,1165 +1,407 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -numericalDerivative.h │ │ │ │ +TestableAssertions.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -18// \callgraph │ │ │ │ -19#pragma once │ │ │ │ -20 │ │ │ │ -21#include │ │ │ │ +18#pragma once │ │ │ │ +19 │ │ │ │ +20#include <_g_t_s_a_m_/_b_a_s_e_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ +21#include <_g_t_s_a_m_/_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h> │ │ │ │ 22 │ │ │ │ -23#include <_g_t_s_a_m_/_l_i_n_e_a_r_/_V_e_c_t_o_r_V_a_l_u_e_s_._h> │ │ │ │ -24#include <_g_t_s_a_m_/_l_i_n_e_a_r_/_J_a_c_o_b_i_a_n_F_a_c_t_o_r_._h> │ │ │ │ -25#include <_g_t_s_a_m_/_n_o_n_l_i_n_e_a_r_/_V_a_l_u_e_s_._h> │ │ │ │ -26#include <_g_t_s_a_m_/_b_a_s_e_/_L_i_e_._h> │ │ │ │ -27 │ │ │ │ -28namespace _g_t_s_a_m { │ │ │ │ -29 │ │ │ │ -30/* │ │ │ │ -31 * Note that all of these functions have two versions, a boost.function │ │ │ │ -version and a │ │ │ │ -32 * standard C++ function pointer version. This allows reformulating the │ │ │ │ -arguments of │ │ │ │ -33 * a function to fit the correct structure, which is useful for situations │ │ │ │ -like │ │ │ │ -34 * member functions and functions with arguments not involved in the │ │ │ │ -derivative: │ │ │ │ -35 * │ │ │ │ -36 * Usage of the boost bind version to rearrange arguments: │ │ │ │ -37 * for a function with one relevant param and an optional derivative: │ │ │ │ -38 * Foo bar(const Obj& a, boost::optional H1) │ │ │ │ -39 * Use boost.bind to restructure: │ │ │ │ -40 * std::bind(bar, std::placeholders::_1, boost::none) │ │ │ │ -41 * This syntax will fix the optional argument to boost::none, while using the │ │ │ │ -first argument provided │ │ │ │ -42 * │ │ │ │ -43 * For member functions, such as below, with an instantiated copy │ │ │ │ -instanceOfSomeClass │ │ │ │ -44 * Foo SomeClass::bar(const Obj& a) │ │ │ │ -45 * Use boost bind as follows to create a function pointer that uses the │ │ │ │ -member function: │ │ │ │ -46 * std::bind(&SomeClass::bar, ref(instanceOfSomeClass), std::placeholders:: │ │ │ │ -_1) │ │ │ │ -47 * │ │ │ │ -48 * For additional details, see the documentation: │ │ │ │ -49 * http://www.boost.org/doc/libs/release/libs/bind/bind.html │ │ │ │ -50 */ │ │ │ │ -51 │ │ │ │ -52 │ │ │ │ -53// a quick helper struct to get the appropriate fixed sized matrix from two │ │ │ │ -value types │ │ │ │ -54namespace internal { │ │ │ │ -55template │ │ │ │ -_5_6struct _F_i_x_e_d_S_i_z_e_M_a_t_r_i_x { │ │ │ │ -57 typedef Eigen::Matrix::dimension, _t_r_a_i_t_s_<_X_>_:_:_d_i_m_e_n_s_i_o_n> │ │ │ │ -type; │ │ │ │ -58}; │ │ │ │ -59} │ │ │ │ -60 │ │ │ │ -69template ::dimension> │ │ │ │ -_7_0typename Eigen::Matrix _n_u_m_e_r_i_c_a_l_G_r_a_d_i_e_n_t( │ │ │ │ -71 std::function h, const X& x, double delta = 1e-5) { │ │ │ │ -72 double factor = 1.0 / (2.0 * delta); │ │ │ │ +23#include │ │ │ │ +24#include │ │ │ │ +25#include │ │ │ │ +26#include │ │ │ │ +27#include │ │ │ │ +28 │ │ │ │ +29namespace _g_t_s_a_m { │ │ │ │ +30 │ │ │ │ +_3_4inline bool _a_s_s_e_r_t___e_q_u_a_l(const _K_e_y& expected, const _K_e_y& actual, double tol = │ │ │ │ +0.0) { │ │ │ │ +35 if(expected != actual) { │ │ │ │ +36 std::cout << "Not equal:\nexpected: " << expected << "\nactual: " << actual │ │ │ │ +<< std::endl; │ │ │ │ +37 return false; │ │ │ │ +38 } │ │ │ │ +39 return true; │ │ │ │ +40} │ │ │ │ +41 │ │ │ │ +49template │ │ │ │ +_5_0bool _a_s_s_e_r_t___e_q_u_a_l(const boost::optional& expected, │ │ │ │ +51 const boost::optional& actual, double tol = 1e-9) { │ │ │ │ +52 if (!expected && actual) { │ │ │ │ +53 std::cout << "expected is boost::none, while actual is not" << std::endl; │ │ │ │ +54 return false; │ │ │ │ +55 } │ │ │ │ +56 if (expected && !actual) { │ │ │ │ +57 std::cout << "actual is boost::none, while expected is not" << std::endl; │ │ │ │ +58 return false; │ │ │ │ +59 } │ │ │ │ +60 if (!expected && !actual) │ │ │ │ +61 return true; │ │ │ │ +62 return _a_s_s_e_r_t___e_q_u_a_l(*expected, *actual, tol); │ │ │ │ +63} │ │ │ │ +64 │ │ │ │ +65template │ │ │ │ +66bool _a_s_s_e_r_t___e_q_u_a_l(const V& expected, const boost::optional& actual, double │ │ │ │ +tol = 1e-9) { │ │ │ │ +67 if (!actual) { │ │ │ │ +68 std::cout << "actual is boost::none" << std::endl; │ │ │ │ +69 return false; │ │ │ │ +70 } │ │ │ │ +71 return _a_s_s_e_r_t___e_q_u_a_l(expected, *actual, tol); │ │ │ │ +72} │ │ │ │ 73 │ │ │ │ -74 BOOST_STATIC_ASSERT_MSG( │ │ │ │ -75 (boost::is_base_of<_m_a_n_i_f_o_l_d___t_a_g, typename _t_r_a_i_t_s_<_X_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>:: │ │ │ │ -value), │ │ │ │ -76 "Template argument X must be a manifold type."); │ │ │ │ -77 BOOST_STATIC_ASSERT_MSG(N>0, "Template argument X must be fixed-size type or │ │ │ │ -N must be specified."); │ │ │ │ -78 │ │ │ │ -79 // Prepare a tangent vector to perturb x with, only works for fixed size │ │ │ │ -80 typename _t_r_a_i_t_s_<_X_>_:_:_T_a_n_g_e_n_t_V_e_c_t_o_r d; │ │ │ │ -81 d.setZero(); │ │ │ │ +74template │ │ │ │ +75bool _a_s_s_e_r_t___e_q_u_a_l(const V& expected, const boost::optional& actual, │ │ │ │ +double tol = 1e-9) { │ │ │ │ +76 if (!actual) { │ │ │ │ +77 std::cout << "actual is boost::none" << std::endl; │ │ │ │ +78 return false; │ │ │ │ +79 } │ │ │ │ +80 return _a_s_s_e_r_t___e_q_u_a_l(expected, *actual, tol); │ │ │ │ +81} │ │ │ │ 82 │ │ │ │ -83 Eigen::Matrix g; │ │ │ │ -84 g.setZero(); │ │ │ │ -85 for (int j = 0; j < N; j++) { │ │ │ │ -86 d(j) = delta; │ │ │ │ -87 double hxplus = h(_t_r_a_i_t_s_<_X_>_:_:_R_e_t_r_a_c_t(x, d)); │ │ │ │ -88 d(j) = -delta; │ │ │ │ -89 double hxmin = h(_t_r_a_i_t_s_<_X_>_:_:_R_e_t_r_a_c_t(x, d)); │ │ │ │ -90 d(j) = 0; │ │ │ │ -91 g(j) = (hxplus - hxmin) * factor; │ │ │ │ -92 } │ │ │ │ -93 return g; │ │ │ │ -94} │ │ │ │ -95 │ │ │ │ -108template ::dimension> │ │ │ │ -109// TODO Should compute fixed-size matrix │ │ │ │ -_1_1_0typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_1_1( │ │ │ │ -111 std::function h, const X& x, double delta = 1e-5) { │ │ │ │ -112 typedef typename internal::FixedSizeMatrix::type Matrix; │ │ │ │ +83#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42 │ │ │ │ +88template │ │ │ │ +89bool GTSAM_DEPRECATED _a_s_s_e_r_t___e_q_u_a_l(const std::vector& expected, const │ │ │ │ +std::vector& actual, double tol = 1e-9) { │ │ │ │ +90 bool match = true; │ │ │ │ +91 if (expected.size() != actual.size()) │ │ │ │ +92 match = false; │ │ │ │ +93 if(match) { │ │ │ │ +94 size_t i = 0; │ │ │ │ +95 for(const V& a: expected) { │ │ │ │ +96 if (!_a_s_s_e_r_t___e_q_u_a_l(a, actual[i++], tol)) { │ │ │ │ +97 match = false; │ │ │ │ +98 break; │ │ │ │ +99 } │ │ │ │ +100 } │ │ │ │ +101 } │ │ │ │ +102 if(!match) { │ │ │ │ +103 std::cout << "expected: " << std::endl; │ │ │ │ +104 for(const V& a: expected) { std::cout << a << " "; } │ │ │ │ +105 std::cout << "\nactual: " << std::endl; │ │ │ │ +106 for(const V& a: actual) { std::cout << a << " "; } │ │ │ │ +107 std::cout << std::endl; │ │ │ │ +108 return false; │ │ │ │ +109 } │ │ │ │ +110 return true; │ │ │ │ +111} │ │ │ │ +112#endif │ │ │ │ 113 │ │ │ │ -114 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -115 "Template argument Y must be a manifold type."); │ │ │ │ -116 typedef _t_r_a_i_t_s_<_Y_> TraitsY; │ │ │ │ -117 │ │ │ │ -118 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -119 "Template argument X must be a manifold type."); │ │ │ │ -120 BOOST_STATIC_ASSERT_MSG(N>0, "Template argument X must be fixed-size type │ │ │ │ -or N must be specified."); │ │ │ │ -121 typedef _t_r_a_i_t_s_<_X_> TraitsX; │ │ │ │ -122 │ │ │ │ -123 // get value at x, and corresponding chart │ │ │ │ -124 const Y hx = h(x); │ │ │ │ -125 │ │ │ │ -126 // Bit of a hack for now to find number of rows │ │ │ │ -127 const typename TraitsY::TangentVector zeroY = TraitsY::Local(hx, hx); │ │ │ │ -128 const size_t m = zeroY.size(); │ │ │ │ -129 │ │ │ │ -130 // Prepare a tangent vector to perturb x with, only works for fixed size │ │ │ │ -131 Eigen::Matrix dx; │ │ │ │ -132 dx.setZero(); │ │ │ │ -133 │ │ │ │ -134 // Fill in Jacobian H │ │ │ │ -135 Matrix H = Matrix::Zero(m, N); │ │ │ │ -136 const double factor = 1.0 / (2.0 * delta); │ │ │ │ -137 for (int j = 0; j < N; j++) { │ │ │ │ -138 dx(j) = delta; │ │ │ │ -139 const auto dy1 = TraitsY::Local(hx, h(TraitsX::Retract(x, dx))); │ │ │ │ -140 dx(j) = -delta; │ │ │ │ -141 const auto dy2 = TraitsY::Local(hx, h(TraitsX::Retract(x, dx))); │ │ │ │ -142 dx(j) = 0; │ │ │ │ -143 H.col(j) << (dy1 - dy2) * factor; │ │ │ │ -144 } │ │ │ │ -145 return H; │ │ │ │ -146} │ │ │ │ -147 │ │ │ │ -149template │ │ │ │ -_1_5_0typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_1_1(Y (*h) │ │ │ │ -(const X&), const X& x, │ │ │ │ -151 double delta = 1e-5) { │ │ │ │ -152 return numericalDerivative11(std::bind(h, std::placeholders::_1), x, │ │ │ │ -153 delta); │ │ │ │ -154} │ │ │ │ -155 │ │ │ │ -165template::dimension> │ │ │ │ -_1_6_6typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_2_1(const │ │ │ │ -std::function& h, │ │ │ │ -167 const X1& x1, const X2& x2, double delta = 1e-5) { │ │ │ │ -168 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -169 "Template argument Y must be a manifold type."); │ │ │ │ -170 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -171 "Template argument X1 must be a manifold type."); │ │ │ │ -172 return numericalDerivative11( │ │ │ │ -173 std::bind(h, std::placeholders::_1, std::cref(x2)), x1, delta); │ │ │ │ -174} │ │ │ │ -175 │ │ │ │ -177template │ │ │ │ -_1_7_8typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_2_1(Y (*h) │ │ │ │ -(const X1&, const X2&), const X1& x1, │ │ │ │ -179 const X2& x2, double delta = 1e-5) { │ │ │ │ -180 return numericalDerivative21( │ │ │ │ -181 std::bind(h, std::placeholders::_1, std::placeholders::_2), x1, x2, │ │ │ │ -182 delta); │ │ │ │ -183} │ │ │ │ -184 │ │ │ │ -194template::dimension> │ │ │ │ -_1_9_5typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_2_2(std:: │ │ │ │ -function h, │ │ │ │ -196 const X1& x1, const X2& x2, double delta = 1e-5) { │ │ │ │ -197// BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), │ │ │ │ -198// "Template argument X1 must be a manifold type."); │ │ │ │ -199 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_2_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -200 "Template argument X2 must be a manifold type."); │ │ │ │ -201 return numericalDerivative11( │ │ │ │ -202 std::bind(h, std::cref(x1), std::placeholders::_1), x2, delta); │ │ │ │ -203} │ │ │ │ -204 │ │ │ │ -206template │ │ │ │ -_2_0_7typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_2_2(Y (*h) │ │ │ │ -(const X1&, const X2&), const X1& x1, │ │ │ │ -208 const X2& x2, double delta = 1e-5) { │ │ │ │ -209 return numericalDerivative22( │ │ │ │ -210 std::bind(h, std::placeholders::_1, std::placeholders::_2), x1, x2, │ │ │ │ -211 delta); │ │ │ │ -212} │ │ │ │ -213 │ │ │ │ -225template:: │ │ │ │ -dimension> │ │ │ │ -_2_2_6typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_1( │ │ │ │ -227 std::function h, const X1& x1, │ │ │ │ -228 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -229 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -230 "Template argument Y must be a manifold type."); │ │ │ │ -231 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -232 "Template argument X1 must be a manifold type."); │ │ │ │ -233 return numericalDerivative11( │ │ │ │ -234 std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3)), │ │ │ │ -235 x1, delta); │ │ │ │ -236} │ │ │ │ -237 │ │ │ │ -238template │ │ │ │ -239typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_1(Y (*h) │ │ │ │ -(const X1&, const X2&, const X3&), │ │ │ │ -240 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -241 return numericalDerivative31( │ │ │ │ -242 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -243 std::placeholders::_3), │ │ │ │ -244 x1, x2, x3, delta); │ │ │ │ -245} │ │ │ │ -246 │ │ │ │ -258template:: │ │ │ │ -dimension> │ │ │ │ -_2_5_9typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_2( │ │ │ │ -260 std::function h, const X1& x1, │ │ │ │ -261 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -262 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -263 "Template argument Y must be a manifold type."); │ │ │ │ -264 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_2_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -265 "Template argument X2 must be a manifold type."); │ │ │ │ -266 return numericalDerivative11( │ │ │ │ -267 std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3)), │ │ │ │ -268 x2, delta); │ │ │ │ -269} │ │ │ │ -270 │ │ │ │ -271template │ │ │ │ -272inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_2 │ │ │ │ -(Y (*h)(const X1&, const X2&, const X3&), │ │ │ │ -273 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -274 return numericalDerivative32( │ │ │ │ -275 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -276 std::placeholders::_3), │ │ │ │ -277 x1, x2, x3, delta); │ │ │ │ -278} │ │ │ │ -279 │ │ │ │ -291template:: │ │ │ │ -dimension> │ │ │ │ -_2_9_2typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_3( │ │ │ │ -293 std::function h, const X1& x1, │ │ │ │ -294 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -295 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -296 "Template argument Y must be a manifold type."); │ │ │ │ -297 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_3_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -298 "Template argument X3 must be a manifold type."); │ │ │ │ -299 return numericalDerivative11( │ │ │ │ -300 std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1), │ │ │ │ -301 x3, delta); │ │ │ │ -302} │ │ │ │ -303 │ │ │ │ -304template │ │ │ │ -305inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_3 │ │ │ │ -(Y (*h)(const X1&, const X2&, const X3&), │ │ │ │ -306 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -307 return numericalDerivative33( │ │ │ │ -308 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -309 std::placeholders::_3), │ │ │ │ -310 x1, x2, x3, delta); │ │ │ │ -311} │ │ │ │ -312 │ │ │ │ -324template::dimension> │ │ │ │ -_3_2_5typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_1( │ │ │ │ -326 std::function h, const X1& │ │ │ │ -x1, │ │ │ │ -327 const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) { │ │ │ │ -328 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -329 "Template argument Y must be a manifold type."); │ │ │ │ -330 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -331 "Template argument X1 must be a manifold type."); │ │ │ │ -332 return numericalDerivative11( │ │ │ │ -333 std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3), │ │ │ │ -334 std::cref(x4)), │ │ │ │ -335 x1, delta); │ │ │ │ -336} │ │ │ │ -337 │ │ │ │ -338template │ │ │ │ -339inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_1 │ │ │ │ -(Y (*h)(const X1&, const X2&, const X3&, const X4&), │ │ │ │ -340 const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e- │ │ │ │ -5) { │ │ │ │ -341 return numericalDerivative41( │ │ │ │ -342 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -343 std::placeholders::_3, std::placeholders::_4), │ │ │ │ -344 x1, x2, x3, x4); │ │ │ │ -345} │ │ │ │ -346 │ │ │ │ -358template::dimension> │ │ │ │ -_3_5_9typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_2( │ │ │ │ -360 std::function h, const X1& │ │ │ │ -x1, │ │ │ │ -361 const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) { │ │ │ │ -362 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -363 "Template argument Y must be a manifold type."); │ │ │ │ -364 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_2_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -365 "Template argument X2 must be a manifold type."); │ │ │ │ -366 return numericalDerivative11( │ │ │ │ -367 std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3), │ │ │ │ -368 std::cref(x4)), │ │ │ │ -369 x2, delta); │ │ │ │ -370} │ │ │ │ +118template │ │ │ │ +_1_1_9bool _a_s_s_e_r_t___c_o_n_t_a_i_n_e_r___e_q_u_a_l(const std::map& expected, const std:: │ │ │ │ +map& actual, double tol = 1e-9) { │ │ │ │ +120 typedef typename std::map Map; │ │ │ │ +121 bool match = true; │ │ │ │ +122 if (expected.size() != actual.size()) │ │ │ │ +123 match = false; │ │ │ │ +124 typename Map::const_iterator │ │ │ │ +125 itExp = expected.begin(), │ │ │ │ +126 itAct = actual.begin(); │ │ │ │ +127 if(match) { │ │ │ │ +128 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) { │ │ │ │ +129 if (!_a_s_s_e_r_t___e_q_u_a_l(itExp->first, itAct->first, tol) || │ │ │ │ +130 !_a_s_s_e_r_t___e_q_u_a_l(itExp->second, itAct->second, tol)) { │ │ │ │ +131 match = false; │ │ │ │ +132 break; │ │ │ │ +133 } │ │ │ │ +134 } │ │ │ │ +135 } │ │ │ │ +136 if(!match) { │ │ │ │ +137 std::cout << "expected: " << std::endl; │ │ │ │ +138 for(const typename Map::value_type& a: expected) { │ │ │ │ +139 a.first.print("key"); │ │ │ │ +140 a.second.print(" value"); │ │ │ │ +141 } │ │ │ │ +142 std::cout << "\nactual: " << std::endl; │ │ │ │ +143 for(const typename Map::value_type& a: actual) { │ │ │ │ +144 a.first.print("key"); │ │ │ │ +145 a.second.print(" value"); │ │ │ │ +146 } │ │ │ │ +147 std::cout << std::endl; │ │ │ │ +148 return false; │ │ │ │ +149 } │ │ │ │ +150 return true; │ │ │ │ +151} │ │ │ │ +152 │ │ │ │ +156template │ │ │ │ +_1_5_7bool _a_s_s_e_r_t___c_o_n_t_a_i_n_e_r___e_q_u_a_l(const std::map& expected, const std:: │ │ │ │ +map& actual, double tol = 1e-9) { │ │ │ │ +158 typedef typename std::map Map; │ │ │ │ +159 bool match = true; │ │ │ │ +160 if (expected.size() != actual.size()) │ │ │ │ +161 match = false; │ │ │ │ +162 typename Map::const_iterator │ │ │ │ +163 itExp = expected.begin(), │ │ │ │ +164 itAct = actual.begin(); │ │ │ │ +165 if(match) { │ │ │ │ +166 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) { │ │ │ │ +167 if (itExp->first != itAct->first || │ │ │ │ +168 !_a_s_s_e_r_t___e_q_u_a_l(itExp->second, itAct->second, tol)) { │ │ │ │ +169 match = false; │ │ │ │ +170 break; │ │ │ │ +171 } │ │ │ │ +172 } │ │ │ │ +173 } │ │ │ │ +174 if(!match) { │ │ │ │ +175 std::cout << "expected: " << std::endl; │ │ │ │ +176 for(const typename Map::value_type& a: expected) { │ │ │ │ +177 std::cout << "Key: " << a.first << std::endl; │ │ │ │ +178 a.second.print(" value"); │ │ │ │ +179 } │ │ │ │ +180 std::cout << "\nactual: " << std::endl; │ │ │ │ +181 for(const typename Map::value_type& a: actual) { │ │ │ │ +182 std::cout << "Key: " << a.first << std::endl; │ │ │ │ +183 a.second.print(" value"); │ │ │ │ +184 } │ │ │ │ +185 std::cout << std::endl; │ │ │ │ +186 return false; │ │ │ │ +187 } │ │ │ │ +188 return true; │ │ │ │ +189} │ │ │ │ +190 │ │ │ │ +194template │ │ │ │ +_1_9_5bool _a_s_s_e_r_t___c_o_n_t_a_i_n_e_r___e_q_u_a_l(const std::vector >& expected, │ │ │ │ +196 const std::vector >& actual, double tol = 1e-9) { │ │ │ │ +197 typedef typename std::vector > VectorPair; │ │ │ │ +198 bool match = true; │ │ │ │ +199 if (expected.size() != actual.size()) │ │ │ │ +200 match = false; │ │ │ │ +201 typename VectorPair::const_iterator │ │ │ │ +202 itExp = expected.begin(), │ │ │ │ +203 itAct = actual.begin(); │ │ │ │ +204 if(match) { │ │ │ │ +205 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) { │ │ │ │ +206 if (!_a_s_s_e_r_t___e_q_u_a_l(itExp->first, itAct->first, tol) || │ │ │ │ +207 !_a_s_s_e_r_t___e_q_u_a_l(itExp->second, itAct->second, tol)) { │ │ │ │ +208 match = false; │ │ │ │ +209 break; │ │ │ │ +210 } │ │ │ │ +211 } │ │ │ │ +212 } │ │ │ │ +213 if(!match) { │ │ │ │ +214 std::cout << "expected: " << std::endl; │ │ │ │ +215 for(const typename VectorPair::value_type& a: expected) { │ │ │ │ +216 a.first.print( " first "); │ │ │ │ +217 a.second.print(" second"); │ │ │ │ +218 } │ │ │ │ +219 std::cout << "\nactual: " << std::endl; │ │ │ │ +220 for(const typename VectorPair::value_type& a: actual) { │ │ │ │ +221 a.first.print( " first "); │ │ │ │ +222 a.second.print(" second"); │ │ │ │ +223 } │ │ │ │ +224 std::cout << std::endl; │ │ │ │ +225 return false; │ │ │ │ +226 } │ │ │ │ +227 return true; │ │ │ │ +228} │ │ │ │ +229 │ │ │ │ +230 │ │ │ │ +234template │ │ │ │ +_2_3_5bool _a_s_s_e_r_t___c_o_n_t_a_i_n_e_r___e_q_u_a_l(const V& expected, const V& actual, double tol = │ │ │ │ +1e-9) { │ │ │ │ +236 bool match = true; │ │ │ │ +237 typename V::const_iterator │ │ │ │ +238 itExp = expected.begin(), │ │ │ │ +239 itAct = actual.begin(); │ │ │ │ +240 if(match) { │ │ │ │ +241 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) { │ │ │ │ +242 if (!_a_s_s_e_r_t___e_q_u_a_l(*itExp, *itAct, tol)) { │ │ │ │ +243 match = false; │ │ │ │ +244 break; │ │ │ │ +245 } │ │ │ │ +246 } │ │ │ │ +247 if(itExp != expected.end() || itAct != actual.end()) │ │ │ │ +248 match = false; │ │ │ │ +249 } │ │ │ │ +250 if(!match) { │ │ │ │ +251 std::cout << "expected: " << std::endl; │ │ │ │ +252 for(const typename V::value_type& a: expected) { a.print(" "); } │ │ │ │ +253 std::cout << "\nactual: " << std::endl; │ │ │ │ +254 for(const typename V::value_type& a: actual) { a.print(" "); } │ │ │ │ +255 std::cout << std::endl; │ │ │ │ +256 return false; │ │ │ │ +257 } │ │ │ │ +258 return true; │ │ │ │ +259} │ │ │ │ +260 │ │ │ │ +265template │ │ │ │ +_2_6_6bool _a_s_s_e_r_t___c_o_n_t_a_i_n_e_r___e_q_u_a_l_i_t_y(const std::map& expected, const │ │ │ │ +std::map& actual) { │ │ │ │ +267 typedef typename std::map Map; │ │ │ │ +268 bool match = true; │ │ │ │ +269 if (expected.size() != actual.size()) │ │ │ │ +270 match = false; │ │ │ │ +271 typename Map::const_iterator │ │ │ │ +272 itExp = expected.begin(), │ │ │ │ +273 itAct = actual.begin(); │ │ │ │ +274 if(match) { │ │ │ │ +275 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) { │ │ │ │ +276 if (itExp->first != itAct->first || itExp->second != itAct->second) { │ │ │ │ +277 match = false; │ │ │ │ +278 break; │ │ │ │ +279 } │ │ │ │ +280 } │ │ │ │ +281 } │ │ │ │ +282 if(!match) { │ │ │ │ +283 std::cout << "expected: " << std::endl; │ │ │ │ +284 for(const typename Map::value_type& a: expected) { │ │ │ │ +285 std::cout << "Key: " << a.first << std::endl; │ │ │ │ +286 std::cout << "Value: " << a.second << std::endl; │ │ │ │ +287 } │ │ │ │ +288 std::cout << "\nactual: " << std::endl; │ │ │ │ +289 for(const typename Map::value_type& a: actual) { │ │ │ │ +290 std::cout << "Key: " << a.first << std::endl; │ │ │ │ +291 std::cout << "Value: " << a.second << std::endl; │ │ │ │ +292 } │ │ │ │ +293 std::cout << std::endl; │ │ │ │ +294 return false; │ │ │ │ +295 } │ │ │ │ +296 return true; │ │ │ │ +297} │ │ │ │ +298 │ │ │ │ +299 │ │ │ │ +303template │ │ │ │ +_3_0_4bool _a_s_s_e_r_t___c_o_n_t_a_i_n_e_r___e_q_u_a_l_i_t_y(const V& expected, const V& actual) { │ │ │ │ +305 bool match = true; │ │ │ │ +306 if (expected.size() != actual.size()) │ │ │ │ +307 match = false; │ │ │ │ +308 typename V::const_iterator │ │ │ │ +309 itExp = expected.begin(), │ │ │ │ +310 itAct = actual.begin(); │ │ │ │ +311 if(match) { │ │ │ │ +312 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) { │ │ │ │ +313 if (*itExp != *itAct) { │ │ │ │ +314 match = false; │ │ │ │ +315 break; │ │ │ │ +316 } │ │ │ │ +317 } │ │ │ │ +318 } │ │ │ │ +319 if(!match) { │ │ │ │ +320 std::cout << "expected: " << std::endl; │ │ │ │ +321 for(const typename V::value_type& a: expected) { std::cout << a << " "; } │ │ │ │ +322 std::cout << "\nactual: " << std::endl; │ │ │ │ +323 for(const typename V::value_type& a: actual) { std::cout << a << " "; } │ │ │ │ +324 std::cout << std::endl; │ │ │ │ +325 return false; │ │ │ │ +326 } │ │ │ │ +327 return true; │ │ │ │ +328} │ │ │ │ +329 │ │ │ │ +_3_3_3inline bool _a_s_s_e_r_t___e_q_u_a_l(const std::string& expected, const std::string& │ │ │ │ +actual) { │ │ │ │ +334 if (expected == actual) │ │ │ │ +335 return true; │ │ │ │ +336 printf("Not equal:\n"); │ │ │ │ +337 std::cout << "expected: [" << expected << "]\n"; │ │ │ │ +338 std::cout << "actual: [" << actual << "]" << std::endl; │ │ │ │ +339 return false; │ │ │ │ +340} │ │ │ │ +341 │ │ │ │ +345template │ │ │ │ +_3_4_6bool _a_s_s_e_r_t___i_n_e_q_u_a_l(const V& expected, const V& actual, double tol = 1e-9) { │ │ │ │ +347 if (!actual.equals(expected, tol)) │ │ │ │ +348 return true; │ │ │ │ +349 printf("Erroneously equal:\n"); │ │ │ │ +350 expected.print("expected"); │ │ │ │ +351 actual.print("actual"); │ │ │ │ +352 return false; │ │ │ │ +353} │ │ │ │ +354 │ │ │ │ +358template │ │ │ │ +_3_5_9bool _a_s_s_e_r_t___s_t_d_o_u_t___e_q_u_a_l(const std::string& expected, const V& actual) { │ │ │ │ +360 // Redirect output to buffer so we can compare │ │ │ │ +361 std::stringstream buffer; │ │ │ │ +362 // Save the original output stream so we can reset later │ │ │ │ +363 std::streambuf* old = std::cout.rdbuf(buffer.rdbuf()); │ │ │ │ +364 │ │ │ │ +365 // We test against actual std::cout for faithful reproduction │ │ │ │ +366 std::cout << actual; │ │ │ │ +367 │ │ │ │ +368 // Get output string and reset stdout │ │ │ │ +369 std::string actual_ = buffer.str(); │ │ │ │ +370 std::cout.rdbuf(old); │ │ │ │ 371 │ │ │ │ -372template │ │ │ │ -373inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_2 │ │ │ │ -(Y (*h)(const X1&, const X2&, const X3&, const X4&), │ │ │ │ -374 const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e- │ │ │ │ -5) { │ │ │ │ -375 return numericalDerivative42( │ │ │ │ -376 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -377 std::placeholders::_3, std::placeholders::_4), │ │ │ │ -378 x1, x2, x3, x4); │ │ │ │ -379} │ │ │ │ -380 │ │ │ │ -392template::dimension> │ │ │ │ -_3_9_3typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_3( │ │ │ │ -394 std::function h, const X1& │ │ │ │ -x1, │ │ │ │ -395 const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) { │ │ │ │ -396 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -397 "Template argument Y must be a manifold type."); │ │ │ │ -398 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_3_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -399 "Template argument X3 must be a manifold type."); │ │ │ │ -400 return numericalDerivative11( │ │ │ │ -401 std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1, │ │ │ │ -402 std::cref(x4)), │ │ │ │ -403 x3, delta); │ │ │ │ -404} │ │ │ │ -405 │ │ │ │ -406template │ │ │ │ -407inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_3 │ │ │ │ -(Y (*h)(const X1&, const X2&, const X3&, const X4&), │ │ │ │ -408 const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e- │ │ │ │ -5) { │ │ │ │ -409 return numericalDerivative43( │ │ │ │ -410 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -411 std::placeholders::_3, std::placeholders::_4), │ │ │ │ -412 x1, x2, x3, x4); │ │ │ │ -413} │ │ │ │ -414 │ │ │ │ -426template::dimension> │ │ │ │ -_4_2_7typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_4( │ │ │ │ -428 std::function h, const X1& │ │ │ │ -x1, │ │ │ │ -429 const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) { │ │ │ │ -430 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -431 "Template argument Y must be a manifold type."); │ │ │ │ -432 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_4_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -433 "Template argument X4 must be a manifold type."); │ │ │ │ -434 return numericalDerivative11( │ │ │ │ -435 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), │ │ │ │ -436 std::placeholders::_1), │ │ │ │ -437 x4, delta); │ │ │ │ -438} │ │ │ │ -439 │ │ │ │ -440template │ │ │ │ -441inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_4 │ │ │ │ -(Y (*h)(const X1&, const X2&, const X3&, const X4&), │ │ │ │ -442 const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e- │ │ │ │ -5) { │ │ │ │ -443 return numericalDerivative44( │ │ │ │ -444 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -445 std::placeholders::_3, std::placeholders::_4), │ │ │ │ -446 x1, x2, x3, x4); │ │ │ │ -447} │ │ │ │ -448 │ │ │ │ -461template::dimension> │ │ │ │ -_4_6_2typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_1( │ │ │ │ -463 std::function h, │ │ │ │ -const X1& x1, │ │ │ │ -464 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e- │ │ │ │ -5) { │ │ │ │ -465 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -466 "Template argument Y must be a manifold type."); │ │ │ │ -467 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -468 "Template argument X1 must be a manifold type."); │ │ │ │ -469 return numericalDerivative11( │ │ │ │ -470 std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3), │ │ │ │ -471 std::cref(x4), std::cref(x5)), │ │ │ │ -472 x1, delta); │ │ │ │ -473} │ │ │ │ -474 │ │ │ │ -475template │ │ │ │ -476inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_1 │ │ │ │ -(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&), │ │ │ │ -477 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, │ │ │ │ -double delta = 1e-5) { │ │ │ │ -478 return numericalDerivative51( │ │ │ │ -479 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -480 std::placeholders::_3, std::placeholders::_4, │ │ │ │ -481 std::placeholders::_5), │ │ │ │ -482 x1, x2, x3, x4, x5); │ │ │ │ -483} │ │ │ │ -484 │ │ │ │ -497template::dimension> │ │ │ │ -_4_9_8typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_2( │ │ │ │ -499 std::function h, │ │ │ │ -const X1& x1, │ │ │ │ -500 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e- │ │ │ │ -5) { │ │ │ │ -501 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -502 "Template argument Y must be a manifold type."); │ │ │ │ -503 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -504 "Template argument X1 must be a manifold type."); │ │ │ │ -505 return numericalDerivative11( │ │ │ │ -506 std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3), │ │ │ │ -507 std::cref(x4), std::cref(x5)), │ │ │ │ -508 x2, delta); │ │ │ │ -509} │ │ │ │ -510 │ │ │ │ -511template │ │ │ │ -512inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_2 │ │ │ │ -(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&), │ │ │ │ -513 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, │ │ │ │ -double delta = 1e-5) { │ │ │ │ -514 return numericalDerivative52( │ │ │ │ -515 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -516 std::placeholders::_3, std::placeholders::_4, │ │ │ │ -517 std::placeholders::_5), │ │ │ │ -518 x1, x2, x3, x4, x5); │ │ │ │ -519} │ │ │ │ -520 │ │ │ │ -533template::dimension> │ │ │ │ -_5_3_4typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_3( │ │ │ │ -535 std::function h, │ │ │ │ -const X1& x1, │ │ │ │ -536 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e- │ │ │ │ -5) { │ │ │ │ -537 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -538 "Template argument Y must be a manifold type."); │ │ │ │ -539 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -540 "Template argument X1 must be a manifold type."); │ │ │ │ -541 return numericalDerivative11( │ │ │ │ -542 std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1, │ │ │ │ -543 std::cref(x4), std::cref(x5)), │ │ │ │ -544 x3, delta); │ │ │ │ -545} │ │ │ │ -546 │ │ │ │ -547template │ │ │ │ -548inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_3 │ │ │ │ -(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&), │ │ │ │ -549 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, │ │ │ │ -double delta = 1e-5) { │ │ │ │ -550 return numericalDerivative53( │ │ │ │ -551 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -552 std::placeholders::_3, std::placeholders::_4, │ │ │ │ -553 std::placeholders::_5), │ │ │ │ -554 x1, x2, x3, x4, x5); │ │ │ │ -555} │ │ │ │ -556 │ │ │ │ -569template::dimension> │ │ │ │ -_5_7_0typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_4( │ │ │ │ -571 std::function h, │ │ │ │ -const X1& x1, │ │ │ │ -572 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e- │ │ │ │ -5) { │ │ │ │ -573 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -574 "Template argument Y must be a manifold type."); │ │ │ │ -575 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -576 "Template argument X1 must be a manifold type."); │ │ │ │ -577 return numericalDerivative11( │ │ │ │ -578 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), │ │ │ │ -579 std::placeholders::_1, std::cref(x5)), │ │ │ │ -580 x4, delta); │ │ │ │ -581} │ │ │ │ -582 │ │ │ │ -583template │ │ │ │ -584inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_4 │ │ │ │ -(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&), │ │ │ │ -585 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, │ │ │ │ -double delta = 1e-5) { │ │ │ │ -586 return numericalDerivative54( │ │ │ │ -587 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -588 std::placeholders::_3, std::placeholders::_4, │ │ │ │ -589 std::placeholders::_5), │ │ │ │ -590 x1, x2, x3, x4, x5); │ │ │ │ -591} │ │ │ │ -592 │ │ │ │ -605template::dimension> │ │ │ │ -_6_0_6typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_5( │ │ │ │ -607 std::function h, │ │ │ │ -const X1& x1, │ │ │ │ -608 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e- │ │ │ │ -5) { │ │ │ │ -609 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -610 "Template argument Y must be a manifold type."); │ │ │ │ -611 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -612 "Template argument X1 must be a manifold type."); │ │ │ │ -613 return numericalDerivative11( │ │ │ │ -614 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), │ │ │ │ -615 std::cref(x4), std::placeholders::_1), │ │ │ │ -616 x5, delta); │ │ │ │ -617} │ │ │ │ -618 │ │ │ │ -619template │ │ │ │ -620inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_5 │ │ │ │ -(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&), │ │ │ │ -621 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, │ │ │ │ -double delta = 1e-5) { │ │ │ │ -622 return numericalDerivative55( │ │ │ │ -623 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -624 std::placeholders::_3, std::placeholders::_4, │ │ │ │ -625 std::placeholders::_5), │ │ │ │ -626 x1, x2, x3, x4, x5); │ │ │ │ -627} │ │ │ │ -628 │ │ │ │ -642template::dimension> │ │ │ │ -_6_4_3typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_1( │ │ │ │ -644 std::function h, const X1& x1, │ │ │ │ -645 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, │ │ │ │ -double delta = 1e-5) { │ │ │ │ -646 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -647 "Template argument Y must be a manifold type."); │ │ │ │ -648 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -649 "Template argument X1 must be a manifold type."); │ │ │ │ -650 return numericalDerivative11( │ │ │ │ -651 std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3), │ │ │ │ -652 std::cref(x4), std::cref(x5), std::cref(x6)), │ │ │ │ -653 x1, delta); │ │ │ │ -654} │ │ │ │ -655 │ │ │ │ -656template │ │ │ │ -657inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_1 │ │ │ │ -(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&), │ │ │ │ -658 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const │ │ │ │ -X6& x6, double delta = 1e-5) { │ │ │ │ -659 return numericalDerivative61( │ │ │ │ -660 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -661 std::placeholders::_3, std::placeholders::_4, │ │ │ │ -662 std::placeholders::_5, std::placeholders::_6), │ │ │ │ -663 x1, x2, x3, x4, x5, x6); │ │ │ │ -664} │ │ │ │ -665 │ │ │ │ -679template::dimension> │ │ │ │ -_6_8_0typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_2( │ │ │ │ -681 std::function h, const X1& x1, │ │ │ │ -682 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, │ │ │ │ -double delta = 1e-5) { │ │ │ │ -683 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -684 "Template argument Y must be a manifold type."); │ │ │ │ -685 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -686 "Template argument X1 must be a manifold type."); │ │ │ │ -687 return numericalDerivative11( │ │ │ │ -688 std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3), │ │ │ │ -689 std::cref(x4), std::cref(x5), std::cref(x6)), │ │ │ │ -690 x2, delta); │ │ │ │ -691} │ │ │ │ -692 │ │ │ │ -693template │ │ │ │ -694inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_2 │ │ │ │ -(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&), │ │ │ │ -695 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const │ │ │ │ -X6& x6, double delta = 1e-5) { │ │ │ │ -696 return numericalDerivative62( │ │ │ │ -697 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -698 std::placeholders::_3, std::placeholders::_4, │ │ │ │ -699 std::placeholders::_5, std::placeholders::_6), │ │ │ │ -700 x1, x2, x3, x4, x5, x6); │ │ │ │ -701} │ │ │ │ -702 │ │ │ │ -716template::dimension> │ │ │ │ -_7_1_7typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_3( │ │ │ │ -718 std::function h, const X1& x1, │ │ │ │ -719 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, │ │ │ │ -double delta = 1e-5) { │ │ │ │ -720 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -721 "Template argument Y must be a manifold type."); │ │ │ │ -722 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -723 "Template argument X1 must be a manifold type."); │ │ │ │ -724 return numericalDerivative11( │ │ │ │ -725 std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1, │ │ │ │ -726 std::cref(x4), std::cref(x5), std::cref(x6)), │ │ │ │ -727 x3, delta); │ │ │ │ -728} │ │ │ │ -729 │ │ │ │ -730template │ │ │ │ -731inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_3 │ │ │ │ -(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&), │ │ │ │ -732 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const │ │ │ │ -X6& x6, double delta = 1e-5) { │ │ │ │ -733 return numericalDerivative63( │ │ │ │ -734 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -735 std::placeholders::_3, std::placeholders::_4, │ │ │ │ -736 std::placeholders::_5, std::placeholders::_6), │ │ │ │ -737 x1, x2, x3, x4, x5, x6); │ │ │ │ -738} │ │ │ │ -739 │ │ │ │ -753template::dimension> │ │ │ │ -_7_5_4typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_4( │ │ │ │ -755 std::function h, const X1& x1, │ │ │ │ -756 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, │ │ │ │ -double delta = 1e-5) { │ │ │ │ -757 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -758 "Template argument Y must be a manifold type."); │ │ │ │ -759 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -760 "Template argument X1 must be a manifold type."); │ │ │ │ -761 return numericalDerivative11( │ │ │ │ -762 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), │ │ │ │ -763 std::placeholders::_1, std::cref(x5), std::cref(x6)), │ │ │ │ -764 x4, delta); │ │ │ │ -765} │ │ │ │ -766 │ │ │ │ -767template │ │ │ │ -768inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_4 │ │ │ │ -(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&), │ │ │ │ -769 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const │ │ │ │ -X6& x6, double delta = 1e-5) { │ │ │ │ -770 return numericalDerivative64( │ │ │ │ -771 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -772 std::placeholders::_3, std::placeholders::_4, │ │ │ │ -773 std::placeholders::_5, std::placeholders::_6), │ │ │ │ -774 x1, x2, x3, x4, x5, x6); │ │ │ │ -775} │ │ │ │ -776 │ │ │ │ -790template::dimension> │ │ │ │ -_7_9_1typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_5( │ │ │ │ -792 std::function h, const X1& x1, │ │ │ │ -793 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, │ │ │ │ -double delta = 1e-5) { │ │ │ │ -794 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -795 "Template argument Y must be a manifold type."); │ │ │ │ -796 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -797 "Template argument X1 must be a manifold type."); │ │ │ │ -798 return numericalDerivative11( │ │ │ │ -799 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), │ │ │ │ -800 std::cref(x4), std::placeholders::_1, std::cref(x6)), │ │ │ │ -801 x5, delta); │ │ │ │ -802} │ │ │ │ -803 │ │ │ │ -804template │ │ │ │ -805inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_5 │ │ │ │ -(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&), │ │ │ │ -806 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const │ │ │ │ -X6& x6, double delta = 1e-5) { │ │ │ │ -807 return numericalDerivative65( │ │ │ │ -808 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -809 std::placeholders::_3, std::placeholders::_4, │ │ │ │ -810 std::placeholders::_5, std::placeholders::_6), │ │ │ │ -811 x1, x2, x3, x4, x5, x6); │ │ │ │ -812} │ │ │ │ -813 │ │ │ │ -827template::dimension> │ │ │ │ -_8_2_8typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_6( │ │ │ │ -829 std::function h, │ │ │ │ -830 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const │ │ │ │ -X6& x6, │ │ │ │ -831 double delta = 1e-5) { │ │ │ │ -832 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -833 "Template argument Y must be a manifold type."); │ │ │ │ -834 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -835 "Template argument X1 must be a manifold type."); │ │ │ │ -836 return numericalDerivative11( │ │ │ │ -837 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), │ │ │ │ -838 std::cref(x4), std::cref(x5), std::placeholders::_1), │ │ │ │ -839 x6, delta); │ │ │ │ -840} │ │ │ │ -841 │ │ │ │ -842template │ │ │ │ -843inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_6 │ │ │ │ -(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&), │ │ │ │ -844 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const │ │ │ │ -X6& x6, double delta = 1e-5) { │ │ │ │ -845 return numericalDerivative66( │ │ │ │ -846 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -847 std::placeholders::_3, std::placeholders::_4, │ │ │ │ -848 std::placeholders::_5, std::placeholders::_6), │ │ │ │ -849 x1, x2, x3, x4, x5, x6); │ │ │ │ -850} │ │ │ │ -851 │ │ │ │ -860template │ │ │ │ -_8_6_1inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n(std:: │ │ │ │ -function f, const X& x, │ │ │ │ -862 double delta = 1e-5) { │ │ │ │ -863 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ -_t_r_a_i_t_s_<_X_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ -864 "Template argument X must be a manifold type."); │ │ │ │ -865 typedef Eigen::Matrix::dimension, 1> VectorD; │ │ │ │ -866 typedef std::function F; │ │ │ │ -867 typedef std::function G; │ │ │ │ -868 G ng = static_cast(numericalGradient ); │ │ │ │ -869 return numericalDerivative11( │ │ │ │ -870 std::bind(ng, f, std::placeholders::_1, delta), x, delta); │ │ │ │ -871} │ │ │ │ -872 │ │ │ │ -873template │ │ │ │ -874inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n(double │ │ │ │ -(*f)(const X&), const X& x, double delta = │ │ │ │ -875 1e-5) { │ │ │ │ -876 return _n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n(std::function(f), x, delta); │ │ │ │ -877} │ │ │ │ -878 │ │ │ │ -882template │ │ │ │ -_8_8_3class _G___x_1 { │ │ │ │ -884 const std::function& f_; │ │ │ │ -885 X1 x1_; │ │ │ │ -886 double delta_; │ │ │ │ -887public: │ │ │ │ -888 typedef typename internal::FixedSizeMatrix::type Vector; │ │ │ │ -889 │ │ │ │ -890 _G___x_1(const std::function& f, const X1& x1, │ │ │ │ -891 double delta) : │ │ │ │ -892 f_(f), x1_(x1), delta_(delta) { │ │ │ │ -893 } │ │ │ │ -894 Vector operator()(const X2& x2) { │ │ │ │ -895 return numericalGradient( │ │ │ │ -896 std::bind(f_, std::placeholders::_1, std::cref(x2)), x1_, delta_); │ │ │ │ -897 } │ │ │ │ -898}; │ │ │ │ -899 │ │ │ │ -900template │ │ │ │ -901inline typename internal::FixedSizeMatrix::type numericalHessian212( │ │ │ │ -902 std::function f, const X1& x1, const X2& x2, │ │ │ │ -903 double delta = 1e-5) { │ │ │ │ -904 typedef typename internal::FixedSizeMatrix::type Vector; │ │ │ │ -905 _G___x_1_<_X_1_,_ _X_2_> g_x1(f, x1, delta); │ │ │ │ -906 return numericalDerivative11( │ │ │ │ -907 std::function( │ │ │ │ -908 std::bind(std::ref(g_x1), std::placeholders::_1)), │ │ │ │ -909 x2, delta); │ │ │ │ -910} │ │ │ │ -911 │ │ │ │ -912template │ │ │ │ -913inline typename internal::FixedSizeMatrix::type numericalHessian212 │ │ │ │ -(double (*f)(const X1&, const X2&), │ │ │ │ -914 const X1& x1, const X2& x2, double delta = 1e-5) { │ │ │ │ -915 return numericalHessian212(std::function(f), │ │ │ │ -916 x1, x2, delta); │ │ │ │ -917} │ │ │ │ -918 │ │ │ │ -919template │ │ │ │ -920inline typename internal::FixedSizeMatrix::type numericalHessian211( │ │ │ │ -921 std::function f, const X1& x1, const X2& x2, │ │ │ │ -922 double delta = 1e-5) { │ │ │ │ -923 │ │ │ │ -924 typedef typename internal::FixedSizeMatrix::type Vector; │ │ │ │ -925 │ │ │ │ -926 Vector (*numGrad)(std::function, const X1&, │ │ │ │ -927 double) = &numericalGradient; │ │ │ │ -928 std::function f2( │ │ │ │ -929 std::bind(f, std::placeholders::_1, std::cref(x2))); │ │ │ │ -930 │ │ │ │ -931 return numericalDerivative11( │ │ │ │ -932 std::function( │ │ │ │ -933 std::bind(numGrad, f2, std::placeholders::_1, delta)), │ │ │ │ -934 x1, delta); │ │ │ │ -935} │ │ │ │ -936 │ │ │ │ -937template │ │ │ │ -938inline typename internal::FixedSizeMatrix::type numericalHessian211 │ │ │ │ -(double (*f)(const X1&, const X2&), │ │ │ │ -939 const X1& x1, const X2& x2, double delta = 1e-5) { │ │ │ │ -940 return numericalHessian211(std::function(f), │ │ │ │ -941 x1, x2, delta); │ │ │ │ -942} │ │ │ │ -943 │ │ │ │ -944template │ │ │ │ -945inline typename internal::FixedSizeMatrix::type numericalHessian222( │ │ │ │ -946 std::function f, const X1& x1, const X2& x2, │ │ │ │ -947 double delta = 1e-5) { │ │ │ │ -948 typedef typename internal::FixedSizeMatrix::type Vector; │ │ │ │ -949 Vector (*numGrad)(std::function, const X2&, │ │ │ │ -950 double) = &numericalGradient; │ │ │ │ -951 std::function f2( │ │ │ │ -952 std::bind(f, std::cref(x1), std::placeholders::_1)); │ │ │ │ -953 │ │ │ │ -954 return numericalDerivative11( │ │ │ │ -955 std::function( │ │ │ │ -956 std::bind(numGrad, f2, std::placeholders::_1, delta)), │ │ │ │ -957 x2, delta); │ │ │ │ -958} │ │ │ │ -959 │ │ │ │ -960template │ │ │ │ -961inline typename internal::FixedSizeMatrix::type numericalHessian222 │ │ │ │ -(double (*f)(const X1&, const X2&), │ │ │ │ -962 const X1& x1, const X2& x2, double delta = 1e-5) { │ │ │ │ -963 return numericalHessian222(std::function(f), │ │ │ │ -964 x1, x2, delta); │ │ │ │ -965} │ │ │ │ -966 │ │ │ │ -970/* **************************************************************** */ │ │ │ │ -971template │ │ │ │ -_9_7_2inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n_3_1_1( │ │ │ │ -973 std::function f, const X1& x1, │ │ │ │ -974 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -975 typedef typename internal::FixedSizeMatrix::type Vector; │ │ │ │ -976 Vector (*numGrad)(std::function, const X1&, │ │ │ │ -977 double) = &numericalGradient; │ │ │ │ -978 std::function f2(std::bind( │ │ │ │ -979 f, std::placeholders::_1, std::cref(x2), std::cref(x3))); │ │ │ │ -980 │ │ │ │ -981 return numericalDerivative11( │ │ │ │ -982 std::function( │ │ │ │ -983 std::bind(numGrad, f2, std::placeholders::_1, delta)), │ │ │ │ -984 x1, delta); │ │ │ │ -985} │ │ │ │ -986 │ │ │ │ -987template │ │ │ │ -988inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n_3_1_1 │ │ │ │ -(double (*f)(const X1&, const X2&, const X3&), │ │ │ │ -989 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -990 return _n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n_3_1_1( │ │ │ │ -991 std::function(f), x1, x2, x3, │ │ │ │ -992 delta); │ │ │ │ -993} │ │ │ │ -994 │ │ │ │ -995/* **************************************************************** */ │ │ │ │ -996template │ │ │ │ -997inline typename internal::FixedSizeMatrix::type numericalHessian322( │ │ │ │ -998 std::function f, const X1& x1, │ │ │ │ -999 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -1000 typedef typename internal::FixedSizeMatrix::type Vector; │ │ │ │ -1001 Vector (*numGrad)(std::function, const X2&, │ │ │ │ -1002 double) = &numericalGradient; │ │ │ │ -1003 std::function f2(std::bind( │ │ │ │ -1004 f, std::cref(x1), std::placeholders::_1, std::cref(x3))); │ │ │ │ -1005 │ │ │ │ -1006 return numericalDerivative11( │ │ │ │ -1007 std::function( │ │ │ │ -1008 std::bind(numGrad, f2, std::placeholders::_1, delta)), │ │ │ │ -1009 x2, delta); │ │ │ │ -1010} │ │ │ │ -1011 │ │ │ │ -1012template │ │ │ │ -1013inline typename internal::FixedSizeMatrix::type numericalHessian322 │ │ │ │ -(double (*f)(const X1&, const X2&, const X3&), │ │ │ │ -1014 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -1015 return numericalHessian322( │ │ │ │ -1016 std::function(f), x1, x2, x3, │ │ │ │ -1017 delta); │ │ │ │ -1018} │ │ │ │ -1019 │ │ │ │ -1020/* **************************************************************** */ │ │ │ │ -1021template │ │ │ │ -1022inline typename internal::FixedSizeMatrix::type numericalHessian333( │ │ │ │ -1023 std::function f, const X1& x1, │ │ │ │ -1024 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -1025 typedef typename internal::FixedSizeMatrix::type Vector; │ │ │ │ -1026 Vector (*numGrad)(std::function, const X3&, │ │ │ │ -1027 double) = &numericalGradient; │ │ │ │ -1028 std::function f2(std::bind( │ │ │ │ -1029 f, std::cref(x1), std::cref(x2), std::placeholders::_1)); │ │ │ │ -1030 │ │ │ │ -1031 return numericalDerivative11( │ │ │ │ -1032 std::function( │ │ │ │ -1033 std::bind(numGrad, f2, std::placeholders::_1, delta)), │ │ │ │ -1034 x3, delta); │ │ │ │ -1035} │ │ │ │ -1036 │ │ │ │ -1037template │ │ │ │ -1038inline typename internal::FixedSizeMatrix::type numericalHessian333 │ │ │ │ -(double (*f)(const X1&, const X2&, const X3&), │ │ │ │ -1039 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -1040 return numericalHessian333( │ │ │ │ -1041 std::function(f), x1, x2, x3, │ │ │ │ -1042 delta); │ │ │ │ -1043} │ │ │ │ -1044 │ │ │ │ -1045/* **************************************************************** */ │ │ │ │ -1046template │ │ │ │ -1047inline typename internal::FixedSizeMatrix::type numericalHessian312( │ │ │ │ -1048 std::function f, const X1& x1, │ │ │ │ -1049 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -1050 return numericalHessian212( │ │ │ │ -1051 std::function( │ │ │ │ -1052 std::bind(f, std::placeholders::_1, std::placeholders::_2, │ │ │ │ -1053 std::cref(x3))), │ │ │ │ -1054 x1, x2, delta); │ │ │ │ -1055} │ │ │ │ -1056 │ │ │ │ -1057template │ │ │ │ -1058inline typename internal::FixedSizeMatrix::type numericalHessian313( │ │ │ │ -1059 std::function f, const X1& x1, │ │ │ │ -1060 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -1061 return numericalHessian212( │ │ │ │ -1062 std::function( │ │ │ │ -1063 std::bind(f, std::placeholders::_1, std::cref(x2), │ │ │ │ -1064 std::placeholders::_2)), │ │ │ │ -1065 x1, x3, delta); │ │ │ │ -1066} │ │ │ │ -1067 │ │ │ │ -1068template │ │ │ │ -1069inline typename internal::FixedSizeMatrix::type numericalHessian323( │ │ │ │ -1070 std::function f, const X1& x1, │ │ │ │ -1071 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -1072 return numericalHessian212( │ │ │ │ -1073 std::function( │ │ │ │ -1074 std::bind(f, std::cref(x1), std::placeholders::_1, │ │ │ │ -1075 std::placeholders::_2)), │ │ │ │ -1076 x2, x3, delta); │ │ │ │ -1077} │ │ │ │ -1078 │ │ │ │ -1079/* **************************************************************** */ │ │ │ │ -1080template │ │ │ │ -1081inline typename internal::FixedSizeMatrix::type numericalHessian312 │ │ │ │ -(double (*f)(const X1&, const X2&, const X3&), │ │ │ │ -1082 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -1083 return numericalHessian312( │ │ │ │ -1084 std::function(f), x1, x2, x3, │ │ │ │ -1085 delta); │ │ │ │ -1086} │ │ │ │ -1087 │ │ │ │ -1088template │ │ │ │ -1089inline typename internal::FixedSizeMatrix::type numericalHessian313 │ │ │ │ -(double (*f)(const X1&, const X2&, const X3&), │ │ │ │ -1090 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -1091 return numericalHessian313( │ │ │ │ -1092 std::function(f), x1, x2, x3, │ │ │ │ -1093 delta); │ │ │ │ -1094} │ │ │ │ -1095 │ │ │ │ -1096template │ │ │ │ -1097inline typename internal::FixedSizeMatrix::type numericalHessian323 │ │ │ │ -(double (*f)(const X1&, const X2&, const X3&), │ │ │ │ -1098 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ -1099 return numericalHessian323( │ │ │ │ -1100 std::function(f), x1, x2, x3, │ │ │ │ -1101 delta); │ │ │ │ -1102} │ │ │ │ -1103 │ │ │ │ -1104} // namespace gtsam │ │ │ │ -1105 │ │ │ │ -_L_i_e_._h │ │ │ │ -Base class and basic functions for Lie types. │ │ │ │ -_V_e_c_t_o_r_V_a_l_u_e_s_._h │ │ │ │ -Factor Graph Values. │ │ │ │ -_J_a_c_o_b_i_a_n_F_a_c_t_o_r_._h │ │ │ │ -_V_a_l_u_e_s_._h │ │ │ │ -A non-templated config holding any types of Manifold-group elements. │ │ │ │ +372 return _a_s_s_e_r_t___e_q_u_a_l(expected, actual_); │ │ │ │ +373} │ │ │ │ +374 │ │ │ │ +380template │ │ │ │ +_3_8_1bool _a_s_s_e_r_t___p_r_i_n_t___e_q_u_a_l(const std::string& expected, const V& actual, │ │ │ │ +382 const std::string& s = "") { │ │ │ │ +383 // Redirect output to buffer so we can compare │ │ │ │ +384 std::stringstream buffer; │ │ │ │ +385 // Save the original output stream so we can reset later │ │ │ │ +386 std::streambuf* old = std::cout.rdbuf(buffer.rdbuf()); │ │ │ │ +387 │ │ │ │ +388 // We test against actual std::cout for faithful reproduction │ │ │ │ +389 actual.print(s); │ │ │ │ +390 │ │ │ │ +391 // Get output string and reset stdout │ │ │ │ +392 std::string actual_ = buffer.str(); │ │ │ │ +393 std::cout.rdbuf(old); │ │ │ │ +394 │ │ │ │ +395 return _a_s_s_e_r_t___e_q_u_a_l(expected, actual_); │ │ │ │ +396} │ │ │ │ +397 │ │ │ │ +398} // \namespace gtsam │ │ │ │ +_T_e_s_t_a_b_l_e_._h │ │ │ │ +Concept check for values that can be used in unit tests. │ │ │ │ +_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h │ │ │ │ +Included from all GTSAM files. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_1 │ │ │ │ -internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative61(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, │ │ │ │ -const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 │ │ │ │ -&x6, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 1 of 6-argument function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:643 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n_3_1_1 │ │ │ │ -internal::FixedSizeMatrix< X1, X1 >::type numericalHessian311(std::function< │ │ │ │ -double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, │ │ │ │ -const X3 &x3, double delta=1e-5) │ │ │ │ -Numerical Hessian for tenary functions. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:972 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n │ │ │ │ -internal::FixedSizeMatrix< X, X >::type numericalHessian(std::function< double │ │ │ │ -(const X &)> f, const X &x, double delta=1e-5) │ │ │ │ -Compute numerical Hessian matrix. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:861 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_2_1 │ │ │ │ -internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative21(const std:: │ │ │ │ -function< Y(const X1 &, const X2 &)> &h, const X1 &x1, const X2 &x2, double │ │ │ │ -delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 1 of binary function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:166 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_3 │ │ │ │ -internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative63(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, │ │ │ │ -const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 │ │ │ │ -&x6, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 3 of 6-argument function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:717 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_1 │ │ │ │ -internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative51(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, │ │ │ │ -const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 1 of 5-argument function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:462 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_4 │ │ │ │ -internal::FixedSizeMatrix< Y, X4 >::type numericalDerivative54(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, │ │ │ │ -const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 4 of 5-argument function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:570 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_1 │ │ │ │ -internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative41(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 │ │ │ │ -&x2, const X3 &x3, const X4 &x4, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 1 of 4-argument function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:325 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_4 │ │ │ │ -internal::FixedSizeMatrix< Y, X4 >::type numericalDerivative64(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, │ │ │ │ -const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 │ │ │ │ -&x6, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 4 of 6-argument function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:754 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_6 │ │ │ │ -internal::FixedSizeMatrix< Y, X6 >::type numericalDerivative66(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, │ │ │ │ -const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 │ │ │ │ -&x6, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 6 of 6-argument function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:828 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_3 │ │ │ │ -internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative33(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 │ │ │ │ -&x3, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 3 of ternary function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:292 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_1_1 │ │ │ │ -internal::FixedSizeMatrix< Y, X >::type numericalDerivative11(std::function< Y │ │ │ │ -(const X &)> h, const X &x, double delta=1e-5) │ │ │ │ -New-style numerical derivatives using manifold_traits. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:110 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_2_2 │ │ │ │ -internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative22(std::function< Y │ │ │ │ -(const X1 &, const X2 &)> h, const X1 &x1, const X2 &x2, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 2 of binary function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:195 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_5 │ │ │ │ -internal::FixedSizeMatrix< Y, X5 >::type numericalDerivative55(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, │ │ │ │ -const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 5 of 5-argument function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:606 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_3 │ │ │ │ -internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative43(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 │ │ │ │ -&x2, const X3 &x3, const X4 &x4, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 3 of 4-argument function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:393 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_2 │ │ │ │ -internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative52(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, │ │ │ │ -const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 2 of 5-argument function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:498 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_5 │ │ │ │ -internal::FixedSizeMatrix< Y, X5 >::type numericalDerivative65(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, │ │ │ │ -const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 │ │ │ │ -&x6, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 5 of 6-argument function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:791 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_4 │ │ │ │ -internal::FixedSizeMatrix< Y, X4 >::type numericalDerivative44(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 │ │ │ │ -&x2, const X3 &x3, const X4 &x4, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 4 of 4-argument function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:427 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_1 │ │ │ │ -internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative31(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 │ │ │ │ -&x3, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 1 of ternary function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:226 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_2 │ │ │ │ -internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative62(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, │ │ │ │ -const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 │ │ │ │ -&x6, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 2 of 6-argument function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:680 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_3 │ │ │ │ -internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative53(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, │ │ │ │ -const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 3 of 5-argument function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:534 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_2 │ │ │ │ -internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative32(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 │ │ │ │ -&x3, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 2 of ternary function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:259 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_2 │ │ │ │ -internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative42(std::function< Y │ │ │ │ -(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 │ │ │ │ -&x2, const X3 &x3, const X4 &x4, double delta=1e-5) │ │ │ │ -Compute numerical derivative in argument 2 of 4-argument function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:359 │ │ │ │ -_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_G_r_a_d_i_e_n_t │ │ │ │ -Eigen::Matrix< double, N, 1 > numericalGradient(std::function< double(const X │ │ │ │ -&)> h, const X &x, double delta=1e-5) │ │ │ │ -Numerically compute gradient of scalar function. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:70 │ │ │ │ -_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ -A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ -that can be centered ... │ │ │ │ -DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g │ │ │ │ -tag to assert a type is a manifold │ │ │ │ -DDeeffiinniittiioonn Manifold.h:33 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:56 │ │ │ │ -_g_t_s_a_m_:_:_G___x_1 │ │ │ │ -Helper class that computes the derivative of f w.r.t. │ │ │ │ -DDeeffiinniittiioonn numericalDerivative.h:883 │ │ │ │ +_g_t_s_a_m_:_:_a_s_s_e_r_t___s_t_d_o_u_t___e_q_u_a_l │ │ │ │ +bool assert_stdout_equal(const std::string &expected, const V &actual) │ │ │ │ +Capture std out via cout stream and compare against string. │ │ │ │ +DDeeffiinniittiioonn TestableAssertions.h:359 │ │ │ │ +_g_t_s_a_m_:_:_a_s_s_e_r_t___c_o_n_t_a_i_n_e_r___e_q_u_a_l │ │ │ │ +bool assert_container_equal(const std::map< V1, V2 > &expected, const std::map< │ │ │ │ +V1, V2 > &actual, double tol=1e-9) │ │ │ │ +Function for comparing maps of testable->testable TODO: replace with more │ │ │ │ +generalized version. │ │ │ │ +DDeeffiinniittiioonn TestableAssertions.h:119 │ │ │ │ +_g_t_s_a_m_:_:_a_s_s_e_r_t___e_q_u_a_l │ │ │ │ +bool assert_equal(const Matrix &expected, const Matrix &actual, double tol) │ │ │ │ +equals with an tolerance, prints out message if unequal │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:43 │ │ │ │ +_g_t_s_a_m_:_:_a_s_s_e_r_t___c_o_n_t_a_i_n_e_r___e_q_u_a_l_i_t_y │ │ │ │ +bool assert_container_equality(const std::map< size_t, V2 > &expected, const │ │ │ │ +std::map< size_t, V2 > &actual) │ │ │ │ +Function for comparing maps of size_t->testable Types are assumed to have │ │ │ │ +operator ==. │ │ │ │ +DDeeffiinniittiioonn TestableAssertions.h:266 │ │ │ │ +_g_t_s_a_m_:_:_a_s_s_e_r_t___i_n_e_q_u_a_l │ │ │ │ +bool assert_inequal(const Matrix &A, const Matrix &B, double tol) │ │ │ │ +inequals with an tolerance, prints out message if within tolerance │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:63 │ │ │ │ +_g_t_s_a_m_:_:_a_s_s_e_r_t___p_r_i_n_t___e_q_u_a_l │ │ │ │ +bool assert_print_equal(const std::string &expected, const V &actual, const │ │ │ │ +std::string &s="") │ │ │ │ +Capture print function output and compare against string. │ │ │ │ +DDeeffiinniittiioonn TestableAssertions.h:381 │ │ │ │ +_g_t_s_a_m_:_:_K_e_y │ │ │ │ +std::uint64_t Key │ │ │ │ +Integer nonlinear key type. │ │ │ │ +DDeeffiinniittiioonn types.h:100 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_._h │ │ │ │ + * _T_e_s_t_a_b_l_e_A_s_s_e_r_t_i_o_n_s_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00035.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/make_shared.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/numericalDerivative.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,59 +94,306 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces | │ │ │ -Typedefs | │ │ │ Functions
│ │ │ -
make_shared.h File Reference
│ │ │ +
numericalDerivative.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

make_shared trampoline function to ensure proper alignment │ │ │ +

Some functions to compute numerical derivatives. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

struct  gtsam::internal::FixedSizeMatrix< Y, X >
 
class  gtsam::G_x1< X1, X2 >
 Helper class that computes the derivative of f w.r.t. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Typedefs

│ │ │ -template<bool B, class T = void>
using gtsam::enable_if_t = typename std::enable_if< B, T >::type
 An shorthand alias for accessing the ::type inside std::enable_if that can be used in a template directly.
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

template<typename T , typename ... Args>
gtsam::enable_if_t< needs_eigen_aligned_allocator< T >::value, boost::shared_ptr< T > > gtsam::make_shared (Args &&... args)
 Add our own make_shared as a layer of wrapping on boost::make_shared This solves the problem with the stock make_shared that custom alignment is not respected, causing SEGFAULTs at runtime, which is notoriously hard to debug.
 
│ │ │ -template<typename T , typename ... Args>
gtsam::enable_if_t<!needs_eigen_aligned_allocator< T >::value, boost::shared_ptr< T > > gtsam::make_shared (Args &&... args)
 Fall back to the boost version if no need for alignment.
 
template<class X , int N = traits<X>::dimension>
Eigen::Matrix< double, N, 1 > gtsam::numericalGradient (std::function< double(const X &)> h, const X &x, double delta=1e-5)
 Numerically compute gradient of scalar function.
 
template<class Y , class X , int N = traits<X>::dimension>
internal::FixedSizeMatrix< Y, X >::type gtsam::numericalDerivative11 (std::function< Y(const X &)> h, const X &x, double delta=1e-5)
 New-style numerical derivatives using manifold_traits.
 
│ │ │ +template<class Y , class X >
internal::FixedSizeMatrix< Y, X >::type gtsam::numericalDerivative11 (Y(*h)(const X &), const X &x, double delta=1e-5)
 use a raw C++ function pointer
 
template<class Y , class X1 , class X2 , int N = traits<X1>::dimension>
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative21 (const std::function< Y(const X1 &, const X2 &)> &h, const X1 &x1, const X2 &x2, double delta=1e-5)
 Compute numerical derivative in argument 1 of binary function.
 
│ │ │ +template<class Y , class X1 , class X2 >
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative21 (Y(*h)(const X1 &, const X2 &), const X1 &x1, const X2 &x2, double delta=1e-5)
 use a raw C++ function pointer
 
template<class Y , class X1 , class X2 , int N = traits<X2>::dimension>
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative22 (std::function< Y(const X1 &, const X2 &)> h, const X1 &x1, const X2 &x2, double delta=1e-5)
 Compute numerical derivative in argument 2 of binary function.
 
│ │ │ +template<class Y , class X1 , class X2 >
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative22 (Y(*h)(const X1 &, const X2 &), const X1 &x1, const X2 &x2, double delta=1e-5)
 use a raw C++ function pointer
 
template<class Y , class X1 , class X2 , class X3 , int N = traits<X1>::dimension>
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative31 (std::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 Compute numerical derivative in argument 1 of ternary function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative31 (Y(*h)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , int N = traits<X2>::dimension>
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative32 (std::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 Compute numerical derivative in argument 2 of ternary function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative32 (Y(*h)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , int N = traits<X3>::dimension>
internal::FixedSizeMatrix< Y, X3 >::type gtsam::numericalDerivative33 (std::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 Compute numerical derivative in argument 3 of ternary function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< Y, X3 >::type gtsam::numericalDerivative33 (Y(*h)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , int N = traits<X1>::dimension>
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative41 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
 Compute numerical derivative in argument 1 of 4-argument function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 , class X4 >
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative41 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , int N = traits<X2>::dimension>
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative42 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
 Compute numerical derivative in argument 2 of 4-argument function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 , class X4 >
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative42 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , int N = traits<X3>::dimension>
internal::FixedSizeMatrix< Y, X3 >::type gtsam::numericalDerivative43 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
 Compute numerical derivative in argument 3 of 4-argument function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 , class X4 >
internal::FixedSizeMatrix< Y, X3 >::type gtsam::numericalDerivative43 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , int N = traits<X4>::dimension>
internal::FixedSizeMatrix< Y, X4 >::type gtsam::numericalDerivative44 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
 Compute numerical derivative in argument 4 of 4-argument function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 , class X4 >
internal::FixedSizeMatrix< Y, X4 >::type gtsam::numericalDerivative44 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , int N = traits<X1>::dimension>
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative51 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 Compute numerical derivative in argument 1 of 5-argument function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 >
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative51 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , int N = traits<X2>::dimension>
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative52 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 Compute numerical derivative in argument 2 of 5-argument function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 >
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative52 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , int N = traits<X3>::dimension>
internal::FixedSizeMatrix< Y, X3 >::type gtsam::numericalDerivative53 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 Compute numerical derivative in argument 3 of 5-argument function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 >
internal::FixedSizeMatrix< Y, X3 >::type gtsam::numericalDerivative53 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , int N = traits<X4>::dimension>
internal::FixedSizeMatrix< Y, X4 >::type gtsam::numericalDerivative54 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 Compute numerical derivative in argument 4 of 5-argument function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 >
internal::FixedSizeMatrix< Y, X4 >::type gtsam::numericalDerivative54 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , int N = traits<X5>::dimension>
internal::FixedSizeMatrix< Y, X5 >::type gtsam::numericalDerivative55 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 Compute numerical derivative in argument 5 of 5-argument function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 >
internal::FixedSizeMatrix< Y, X5 >::type gtsam::numericalDerivative55 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 , int N = traits<X1>::dimension>
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative61 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 Compute numerical derivative in argument 1 of 6-argument function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 >
internal::FixedSizeMatrix< Y, X1 >::type gtsam::numericalDerivative61 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 , int N = traits<X2>::dimension>
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative62 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 Compute numerical derivative in argument 2 of 6-argument function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 >
internal::FixedSizeMatrix< Y, X2 >::type gtsam::numericalDerivative62 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 , int N = traits<X3>::dimension>
internal::FixedSizeMatrix< Y, X3 >::type gtsam::numericalDerivative63 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 Compute numerical derivative in argument 3 of 6-argument function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 >
internal::FixedSizeMatrix< Y, X3 >::type gtsam::numericalDerivative63 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 , int N = traits<X4>::dimension>
internal::FixedSizeMatrix< Y, X4 >::type gtsam::numericalDerivative64 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 Compute numerical derivative in argument 4 of 6-argument function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 >
internal::FixedSizeMatrix< Y, X4 >::type gtsam::numericalDerivative64 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 , int N = traits<X5>::dimension>
internal::FixedSizeMatrix< Y, X5 >::type gtsam::numericalDerivative65 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 Compute numerical derivative in argument 5 of 6-argument function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 >
internal::FixedSizeMatrix< Y, X5 >::type gtsam::numericalDerivative65 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 
template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 , int N = traits<X6>::dimension>
internal::FixedSizeMatrix< Y, X6 >::type gtsam::numericalDerivative66 (std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 Compute numerical derivative in argument 6 of 6-argument function.
 
│ │ │ +template<class Y , class X1 , class X2 , class X3 , class X4 , class X5 , class X6 >
internal::FixedSizeMatrix< Y, X6 >::type gtsam::numericalDerivative66 (Y(*h)(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &), const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
 
template<class X >
internal::FixedSizeMatrix< X, X >::type gtsam::numericalHessian (std::function< double(const X &)> f, const X &x, double delta=1e-5)
 Compute numerical Hessian matrix.
 
│ │ │ +template<class X >
internal::FixedSizeMatrix< X, X >::type gtsam::numericalHessian (double(*f)(const X &), const X &x, double delta=1e-5)
 
│ │ │ +template<class X1 , class X2 >
internal::FixedSizeMatrix< X1, X2 >::type gtsam::numericalHessian212 (std::function< double(const X1 &, const X2 &)> f, const X1 &x1, const X2 &x2, double delta=1e-5)
 
│ │ │ +template<class X1 , class X2 >
internal::FixedSizeMatrix< X1, X2 >::type gtsam::numericalHessian212 (double(*f)(const X1 &, const X2 &), const X1 &x1, const X2 &x2, double delta=1e-5)
 
│ │ │ +template<class X1 , class X2 >
internal::FixedSizeMatrix< X1, X1 >::type gtsam::numericalHessian211 (std::function< double(const X1 &, const X2 &)> f, const X1 &x1, const X2 &x2, double delta=1e-5)
 
│ │ │ +template<class X1 , class X2 >
internal::FixedSizeMatrix< X1, X1 >::type gtsam::numericalHessian211 (double(*f)(const X1 &, const X2 &), const X1 &x1, const X2 &x2, double delta=1e-5)
 
│ │ │ +template<class X1 , class X2 >
internal::FixedSizeMatrix< X2, X2 >::type gtsam::numericalHessian222 (std::function< double(const X1 &, const X2 &)> f, const X1 &x1, const X2 &x2, double delta=1e-5)
 
│ │ │ +template<class X1 , class X2 >
internal::FixedSizeMatrix< X2, X2 >::type gtsam::numericalHessian222 (double(*f)(const X1 &, const X2 &), const X1 &x1, const X2 &x2, double delta=1e-5)
 
│ │ │ +template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X1, X1 >::type gtsam::numericalHessian311 (std::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 Numerical Hessian for tenary functions.
 
│ │ │ +template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X1, X1 >::type gtsam::numericalHessian311 (double(*f)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ +template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X2, X2 >::type gtsam::numericalHessian322 (std::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ +template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X2, X2 >::type gtsam::numericalHessian322 (double(*f)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ +template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X3, X3 >::type gtsam::numericalHessian333 (std::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ +template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X3, X3 >::type gtsam::numericalHessian333 (double(*f)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ +template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X1, X2 >::type gtsam::numericalHessian312 (std::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ +template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X1, X3 >::type gtsam::numericalHessian313 (std::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ +template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X2, X3 >::type gtsam::numericalHessian323 (std::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ +template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X1, X2 >::type gtsam::numericalHessian312 (double(*f)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ +template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X1, X3 >::type gtsam::numericalHessian313 (double(*f)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │ +template<class X1 , class X2 , class X3 >
internal::FixedSizeMatrix< X2, X3 >::type gtsam::numericalHessian323 (double(*f)(const X1 &, const X2 &, const X3 &), const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
 
│ │ │

Detailed Description

│ │ │ -

make_shared trampoline function to ensure proper alignment

│ │ │ -
Author
Fan Jiang
│ │ │ +

Some functions to compute numerical derivatives.

│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,47 +1,516 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -make_shared.h File Reference │ │ │ │ -make_shared trampoline function to ensure proper alignment _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +numericalDerivative.h File Reference │ │ │ │ +Some functions to compute numerical derivatives. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x_<_ _Y_,_ _X_ _> │ │ │ │ +  │ │ │ │ + class   _g_t_s_a_m_:_:_G___x_1_<_ _X_1_,_ _X_2_ _> │ │ │ │ +  Helper class that computes the derivative of f w.r.t. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -template │ │ │ │ -using  ggttssaamm::::eennaabbllee__iiff__tt = typename std::enable_if< B, T >::type │ │ │ │ -  An shorthand alias for accessing the ::type inside std::enable_if that │ │ │ │ - can be used in a template directly. │ │ │ │ -  │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ - _g_t_s_a_m_:_:_e_n_a_b_l_e___i_f___t< │ │ │ │ - _n_e_e_d_s___e_i_g_e_n___a_l_i_g_n_e_d___a_l_l_o_c_a_t_o_r< T >::value, _g_t_s_a_m_:_:_m_a_k_e___s_h_a_r_e_d (Args &&... │ │ │ │ - boost::shared_ptr< T > >  args) │ │ │ │ - Add our own make_shared as a layer │ │ │ │ - of wrapping on boost::make_shared │ │ │ │ - This solves the problem with the │ │ │ │ -  stock make_shared that custom │ │ │ │ - alignment is not respected, causing │ │ │ │ - SEGFAULTs at runtime, which is │ │ │ │ - notoriously hard to debug. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _g_t_s_a_m_:_: │ │ │ │ -_e_n_a_b_l_e___i_f___t::value, boost::shared_ptr< T > >  args) │ │ │ │ -  Fall back to the boost version if │ │ │ │ - no need for alignment. │ │ │ │ +template::dimension> │ │ │ │ + Eigen::Matrix< double, N, 1 >  _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_G_r_a_d_i_e_n_t (std::function< │ │ │ │ + double(const X &)> h, const X &x, double │ │ │ │ + delta=1e-5) │ │ │ │ +  Numerically compute gradient of scalar │ │ │ │ + function. │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_1_1 (std:: │ │ │ │ + type  function< Y(const X &)> h, const X &x, │ │ │ │ + double delta=1e-5) │ │ │ │ +  New-style numerical derivatives using │ │ │ │ + manifold_traits. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee1111 (Y(*h) │ │ │ │ + type  (const X &), const X &x, double │ │ │ │ + delta=1e-5) │ │ │ │ +  use a raw C++ function pointer │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_2_1 (const │ │ │ │ + type  std::function< Y(const X1 &, const X2 │ │ │ │ + &)> &h, const X1 &x1, const X2 &x2, │ │ │ │ + double delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 1 of binary function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee2211 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &), const X1 &x1, │ │ │ │ + const X2 &x2, double delta=1e-5) │ │ │ │ +  use a raw C++ function pointer │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_2_2 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &)> h, │ │ │ │ + const X1 &x1, const X2 &x2, double │ │ │ │ + delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 2 of binary function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee2222 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &), const X1 &x1, │ │ │ │ + const X2 &x2, double delta=1e-5) │ │ │ │ +  use a raw C++ function pointer │ │ │ │ +  │ │ │ │ +template:: │ │ │ │ +dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_1 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &)> h, const X1 &x1, const X2 │ │ │ │ + &x2, const X3 &x3, double delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 1 of ternary function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee3311 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &), │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template:: │ │ │ │ +dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_2 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &)> h, const X1 &x1, const X2 │ │ │ │ + &x2, const X3 &x3, double delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 2 of ternary function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee3322 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &), │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template:: │ │ │ │ +dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X3 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_3 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &)> h, const X1 &x1, const X2 │ │ │ │ + &x2, const X3 &x3, double delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 3 of ternary function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X3 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee3333 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &), │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_1 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &, const X4 &)> h, const X1 │ │ │ │ + &x1, const X2 &x2, const X3 &x3, const │ │ │ │ + X4 &x4, double delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 1 of 4-argument function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee4411 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &, │ │ │ │ + const X4 &), const X1 &x1, const X2 &x2, │ │ │ │ + const X3 &x3, const X4 &x4, double │ │ │ │ + delta=1e-5) │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_2 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &, const X4 &)> h, const X1 │ │ │ │ + &x1, const X2 &x2, const X3 &x3, const │ │ │ │ + X4 &x4, double delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 2 of 4-argument function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee4422 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &, │ │ │ │ + const X4 &), const X1 &x1, const X2 &x2, │ │ │ │ + const X3 &x3, const X4 &x4, double │ │ │ │ + delta=1e-5) │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X3 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_3 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &, const X4 &)> h, const X1 │ │ │ │ + &x1, const X2 &x2, const X3 &x3, const │ │ │ │ + X4 &x4, double delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 3 of 4-argument function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X3 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee4433 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &, │ │ │ │ + const X4 &), const X1 &x1, const X2 &x2, │ │ │ │ + const X3 &x3, const X4 &x4, double │ │ │ │ + delta=1e-5) │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X4 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_4 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &, const X4 &)> h, const X1 │ │ │ │ + &x1, const X2 &x2, const X3 &x3, const │ │ │ │ + X4 &x4, double delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 4 of 4-argument function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X4 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee4444 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &, │ │ │ │ + const X4 &), const X1 &x1, const X2 &x2, │ │ │ │ + const X3 &x3, const X4 &x4, double │ │ │ │ + delta=1e-5) │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_1 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &, const X4 &, const X5 &)> h, │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, const X4 &x4, const X5 &x5, double │ │ │ │ + delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 1 of 5-argument function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee5511 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &, │ │ │ │ + const X4 &, const X5 &), const X1 &x1, │ │ │ │ + const X2 &x2, const X3 &x3, const X4 │ │ │ │ + &x4, const X5 &x5, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_2 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &, const X4 &, const X5 &)> h, │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, const X4 &x4, const X5 &x5, double │ │ │ │ + delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 2 of 5-argument function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee5522 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &, │ │ │ │ + const X4 &, const X5 &), const X1 &x1, │ │ │ │ + const X2 &x2, const X3 &x3, const X4 │ │ │ │ + &x4, const X5 &x5, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X3 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_3 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &, const X4 &, const X5 &)> h, │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, const X4 &x4, const X5 &x5, double │ │ │ │ + delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 3 of 5-argument function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X3 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee5533 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &, │ │ │ │ + const X4 &, const X5 &), const X1 &x1, │ │ │ │ + const X2 &x2, const X3 &x3, const X4 │ │ │ │ + &x4, const X5 &x5, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X4 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_4 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &, const X4 &, const X5 &)> h, │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, const X4 &x4, const X5 &x5, double │ │ │ │ + delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 4 of 5-argument function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X4 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee5544 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &, │ │ │ │ + const X4 &, const X5 &), const X1 &x1, │ │ │ │ + const X2 &x2, const X3 &x3, const X4 │ │ │ │ + &x4, const X5 &x5, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X5 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_5 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &, const X4 &, const X5 &)> h, │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, const X4 &x4, const X5 &x5, double │ │ │ │ + delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 5 of 5-argument function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X5 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee5555 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &, │ │ │ │ + const X4 &, const X5 &), const X1 &x1, │ │ │ │ + const X2 &x2, const X3 &x3, const X4 │ │ │ │ + &x4, const X5 &x5, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_1 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &, const X4 &, const X5 &, │ │ │ │ + const X6 &)> h, const X1 &x1, const X2 │ │ │ │ + &x2, const X3 &x3, const X4 &x4, const │ │ │ │ + X5 &x5, const X6 &x6, double delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 1 of 6-argument function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X1 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee6611 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &, │ │ │ │ + const X4 &, const X5 &, const X6 &), │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, const X4 &x4, const X5 &x5, const │ │ │ │ + X6 &x6, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_2 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &, const X4 &, const X5 &, │ │ │ │ + const X6 &)> h, const X1 &x1, const X2 │ │ │ │ + &x2, const X3 &x3, const X4 &x4, const │ │ │ │ + X5 &x5, const X6 &x6, double delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 2 of 6-argument function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X2 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee6622 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &, │ │ │ │ + const X4 &, const X5 &, const X6 &), │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, const X4 &x4, const X5 &x5, const │ │ │ │ + X6 &x6, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X3 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_3 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &, const X4 &, const X5 &, │ │ │ │ + const X6 &)> h, const X1 &x1, const X2 │ │ │ │ + &x2, const X3 &x3, const X4 &x4, const │ │ │ │ + X5 &x5, const X6 &x6, double delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 3 of 6-argument function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X3 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee6633 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &, │ │ │ │ + const X4 &, const X5 &, const X6 &), │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, const X4 &x4, const X5 &x5, const │ │ │ │ + X6 &x6, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X4 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_4 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &, const X4 &, const X5 &, │ │ │ │ + const X6 &)> h, const X1 &x1, const X2 │ │ │ │ + &x2, const X3 &x3, const X4 &x4, const │ │ │ │ + X5 &x5, const X6 &x6, double delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 4 of 6-argument function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X4 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee6644 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &, │ │ │ │ + const X4 &, const X5 &, const X6 &), │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, const X4 &x4, const X5 &x5, const │ │ │ │ + X6 &x6, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X5 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_5 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &, const X4 &, const X5 &, │ │ │ │ + const X6 &)> h, const X1 &x1, const X2 │ │ │ │ + &x2, const X3 &x3, const X4 &x4, const │ │ │ │ + X5 &x5, const X6 &x6, double delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 5 of 6-argument function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X5 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee6655 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &, │ │ │ │ + const X4 &, const X5 &, const X6 &), │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, const X4 &x4, const X5 &x5, const │ │ │ │ + X6 &x6, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template::dimension> │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X6 >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_6 (std:: │ │ │ │ + type  function< Y(const X1 &, const X2 &, │ │ │ │ + const X3 &, const X4 &, const X5 &, │ │ │ │ + const X6 &)> h, const X1 &x1, const X2 │ │ │ │ + &x2, const X3 &x3, const X4 &x4, const │ │ │ │ + X5 &x5, const X6 &x6, double delta=1e-5) │ │ │ │ +  Compute numerical derivative in argument │ │ │ │ + 6 of 6-argument function. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< Y, X6 >:: ggttssaamm::::nnuummeerriiccaallDDeerriivvaattiivvee6666 (Y(*h) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &, │ │ │ │ + const X4 &, const X5 &, const X6 &), │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, const X4 &x4, const X5 &x5, const │ │ │ │ + X6 &x6, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X, X >:: _g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n (std::function< │ │ │ │ + type  double(const X &)> f, const X &x, double │ │ │ │ + delta=1e-5) │ │ │ │ +  Compute numerical Hessian matrix. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X, X >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann (double(*f) │ │ │ │ + type  (const X &), const X &x, double │ │ │ │ + delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X2 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann221122 (std:: │ │ │ │ + type  function< double(const X1 &, const X2 │ │ │ │ + &)> f, const X1 &x1, const X2 &x2, │ │ │ │ + double delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X2 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann221122 (double(*f) │ │ │ │ + type  (const X1 &, const X2 &), const X1 &x1, │ │ │ │ + const X2 &x2, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X1 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann221111 (std:: │ │ │ │ + type  function< double(const X1 &, const X2 │ │ │ │ + &)> f, const X1 &x1, const X2 &x2, │ │ │ │ + double delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X1 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann221111 (double(*f) │ │ │ │ + type  (const X1 &, const X2 &), const X1 &x1, │ │ │ │ + const X2 &x2, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X2, X2 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann222222 (std:: │ │ │ │ + type  function< double(const X1 &, const X2 │ │ │ │ + &)> f, const X1 &x1, const X2 &x2, │ │ │ │ + double delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X2, X2 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann222222 (double(*f) │ │ │ │ + type  (const X1 &, const X2 &), const X1 &x1, │ │ │ │ + const X2 &x2, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X1 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann331111 (std:: │ │ │ │ + type  function< double(const X1 &, const X2 &, │ │ │ │ + const X3 &)> f, const X1 &x1, const X2 │ │ │ │ + &x2, const X3 &x3, double delta=1e-5) │ │ │ │ +  Numerical Hessian for tenary functions. │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X1 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann331111 (double(*f) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &), │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X2, X2 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann332222 (std:: │ │ │ │ + type  function< double(const X1 &, const X2 &, │ │ │ │ + const X3 &)> f, const X1 &x1, const X2 │ │ │ │ + &x2, const X3 &x3, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X2, X2 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann332222 (double(*f) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &), │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X3, X3 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann333333 (std:: │ │ │ │ + type  function< double(const X1 &, const X2 &, │ │ │ │ + const X3 &)> f, const X1 &x1, const X2 │ │ │ │ + &x2, const X3 &x3, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X3, X3 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann333333 (double(*f) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &), │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X2 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann331122 (std:: │ │ │ │ + type  function< double(const X1 &, const X2 &, │ │ │ │ + const X3 &)> f, const X1 &x1, const X2 │ │ │ │ + &x2, const X3 &x3, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X3 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann331133 (std:: │ │ │ │ + type  function< double(const X1 &, const X2 &, │ │ │ │ + const X3 &)> f, const X1 &x1, const X2 │ │ │ │ + &x2, const X3 &x3, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X2, X3 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann332233 (std:: │ │ │ │ + type  function< double(const X1 &, const X2 &, │ │ │ │ + const X3 &)> f, const X1 &x1, const X2 │ │ │ │ + &x2, const X3 &x3, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X2 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann331122 (double(*f) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &), │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X1, X3 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann331133 (double(*f) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &), │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, double delta=1e-5) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x< X2, X3 >:: ggttssaamm::::nnuummeerriiccaallHHeessssiiaann332233 (double(*f) │ │ │ │ + type  (const X1 &, const X2 &, const X3 &), │ │ │ │ + const X1 &x1, const X2 &x2, const X3 │ │ │ │ + &x3, double delta=1e-5) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -make_shared trampoline function to ensure proper alignment │ │ │ │ +Some functions to compute numerical derivatives. │ │ │ │ Author │ │ │ │ - Fan Jiang │ │ │ │ + Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _m_a_k_e___s_h_a_r_e_d_._h │ │ │ │ + * _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00035.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,5 +1,31 @@ │ │ │ │ var a00035 = [ │ │ │ │ - ["enable_if_t", "a00035.html#a47e06cd29f4e8a20a8a7842e4045845f", null], │ │ │ │ - ["make_shared", "a00035.html#abcb9ece2bd206193ac40f118f1815c0e", null], │ │ │ │ - ["make_shared", "a00035.html#a6f805b32c5544e5552d702d5e2b4e801", null] │ │ │ │ + ["gtsam::internal::FixedSizeMatrix< Y, X >", "a02440.html", null], │ │ │ │ + ["gtsam::G_x1< X1, X2 >", "a02444.html", null], │ │ │ │ + ["numericalDerivative11", "a00035.html#a581a9f8db043590096fbac682b8f6a93", null], │ │ │ │ + ["numericalDerivative11", "a00035.html#a4c4c5744f0b348d4ec6c047f796e7924", null], │ │ │ │ + ["numericalDerivative21", "a00035.html#a157eb3b44dd4e38bbd66f3cc68a20e43", null], │ │ │ │ + ["numericalDerivative21", "a00035.html#afcc94e3b49906e824c01a3d56df62d33", null], │ │ │ │ + ["numericalDerivative22", "a00035.html#a5b0db4ac5f279b12fc91fab4cb40b1bf", null], │ │ │ │ + ["numericalDerivative22", "a00035.html#a46d002a0529f1172aebb7e1d85d5c08c", null], │ │ │ │ + ["numericalDerivative31", "a00035.html#aa8f0264edaf78d503809c1e3152340ee", null], │ │ │ │ + ["numericalDerivative32", "a00035.html#acfbadc0ab0cd9386205b2737c5d0b727", null], │ │ │ │ + ["numericalDerivative33", "a00035.html#a526a422ea611724345affed8b71d9bac", null], │ │ │ │ + ["numericalDerivative41", "a00035.html#a3b0937e08e79604ee6ab10fca6ffe65e", null], │ │ │ │ + ["numericalDerivative42", "a00035.html#af40f61e8eff01acdb028ad33b8f3529b", null], │ │ │ │ + ["numericalDerivative43", "a00035.html#a6846b5cc84c1d5a54a436121b27057e0", null], │ │ │ │ + ["numericalDerivative44", "a00035.html#a8061b20199f839b115512d95d058fcbf", null], │ │ │ │ + ["numericalDerivative51", "a00035.html#a272af6f7139b76d085279060646e32d1", null], │ │ │ │ + ["numericalDerivative52", "a00035.html#a722e98babba795ce480f89527b572251", null], │ │ │ │ + ["numericalDerivative53", "a00035.html#acc2f741132522a6ce57d544a27a95855", null], │ │ │ │ + ["numericalDerivative54", "a00035.html#a2cf5181fc7bca1ef6a1070959de7b975", null], │ │ │ │ + ["numericalDerivative55", "a00035.html#a5ca42a2fc87373c005299f3087995a97", null], │ │ │ │ + ["numericalDerivative61", "a00035.html#a0ca8a22de666bc39015da34f150df748", null], │ │ │ │ + ["numericalDerivative62", "a00035.html#ac224e2384e41171181b2dbc0f700cdc1", null], │ │ │ │ + ["numericalDerivative63", "a00035.html#a15c46aa999886d4ccd06ab73fc02db31", null], │ │ │ │ + ["numericalDerivative64", "a00035.html#a3eb3fef9c77920dfd9496e71a0bcf669", null], │ │ │ │ + ["numericalDerivative65", "a00035.html#a799c83517a20a8e0b0b014f26b50f660", null], │ │ │ │ + ["numericalDerivative66", "a00035.html#a4e010b7f436124b9b421ba7dc438d987", null], │ │ │ │ + ["numericalGradient", "a00035.html#afd8862271510196ec4e2d894f623942d", null], │ │ │ │ + ["numericalHessian", "a00035.html#a11011d8e9bd69e486c9752875f710c18", null], │ │ │ │ + ["numericalHessian311", "a00035.html#a10295660c0177e08d45812fbb7e4c554", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00035_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/make_shared.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/numericalDerivative.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,68 +98,941 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
make_shared.h
│ │ │ +
numericalDerivative.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │ -
3 * GTSAM Copyright 2020, Georgia Tech Research Corporation,
│ │ │ +
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
18#pragma once
│ │ │ -
19
│ │ │ -
20#include <gtsam/base/types.h>
│ │ │ -
21
│ │ │ -
22#include <Eigen/Core>
│ │ │ -
23
│ │ │ -
24#include <boost/make_shared.hpp>
│ │ │ -
25
│ │ │ -
26#include <type_traits>
│ │ │ +
18// \callgraph
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ +
21#include <functional>
│ │ │ +
22
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
26#include <gtsam/base/Lie.h>
│ │ │
27
│ │ │
28namespace gtsam {
│ │ │ -
30 template<bool B, class T = void>
│ │ │ -
31 using enable_if_t = typename std::enable_if<B, T>::type;
│ │ │ -
32}
│ │ │ -
33
│ │ │ -
34namespace gtsam {
│ │ │ -
35
│ │ │ -
56 template<typename T, typename ... Args>
│ │ │ -
│ │ │ - │ │ │ -
58 return boost::allocate_shared<T>(Eigen::aligned_allocator<T>(), std::forward<Args>(args)...);
│ │ │ -
59 }
│ │ │ +
29
│ │ │ +
30/*
│ │ │ +
31 * Note that all of these functions have two versions, a boost.function version and a
│ │ │ +
32 * standard C++ function pointer version. This allows reformulating the arguments of
│ │ │ +
33 * a function to fit the correct structure, which is useful for situations like
│ │ │ +
34 * member functions and functions with arguments not involved in the derivative:
│ │ │ +
35 *
│ │ │ +
36 * Usage of the boost bind version to rearrange arguments:
│ │ │ +
37 * for a function with one relevant param and an optional derivative:
│ │ │ +
38 * Foo bar(const Obj& a, boost::optional<Matrix&> H1)
│ │ │ +
39 * Use boost.bind to restructure:
│ │ │ +
40 * std::bind(bar, std::placeholders::_1, boost::none)
│ │ │ +
41 * This syntax will fix the optional argument to boost::none, while using the first argument provided
│ │ │ +
42 *
│ │ │ +
43 * For member functions, such as below, with an instantiated copy instanceOfSomeClass
│ │ │ +
44 * Foo SomeClass::bar(const Obj& a)
│ │ │ +
45 * Use boost bind as follows to create a function pointer that uses the member function:
│ │ │ +
46 * std::bind(&SomeClass::bar, ref(instanceOfSomeClass), std::placeholders::_1)
│ │ │ +
47 *
│ │ │ +
48 * For additional details, see the documentation:
│ │ │ +
49 * http://www.boost.org/doc/libs/release/libs/bind/bind.html
│ │ │ +
50 */
│ │ │ +
51
│ │ │ +
52
│ │ │ +
53// a quick helper struct to get the appropriate fixed sized matrix from two value types
│ │ │ +
54namespace internal {
│ │ │ +
55template<class Y, class X=double>
│ │ │ +
│ │ │ + │ │ │ +
57 typedef Eigen::Matrix<double,traits<Y>::dimension, traits<X>::dimension> type;
│ │ │ +
58};
│ │ │
│ │ │ +
59}
│ │ │
60
│ │ │ -
62 template<typename T, typename ... Args>
│ │ │ -
│ │ │ - │ │ │ -
64 return boost::make_shared<T>(std::forward<Args>(args)...);
│ │ │ -
65 }
│ │ │ -
│ │ │ -
66
│ │ │ -
67}
│ │ │ -
Typedefs for easier changing of types.
│ │ │ +
69template <class X, int N = traits<X>::dimension>
│ │ │ +
│ │ │ +
70typename Eigen::Matrix<double, N, 1> numericalGradient(
│ │ │ +
71 std::function<double(const X&)> h, const X& x, double delta = 1e-5) {
│ │ │ +
72 double factor = 1.0 / (2.0 * delta);
│ │ │ +
73
│ │ │ +
74 BOOST_STATIC_ASSERT_MSG(
│ │ │ +
75 (boost::is_base_of<manifold_tag, typename traits<X>::structure_category>::value),
│ │ │ +
76 "Template argument X must be a manifold type.");
│ │ │ +
77 BOOST_STATIC_ASSERT_MSG(N>0, "Template argument X must be fixed-size type or N must be specified.");
│ │ │ +
78
│ │ │ +
79 // Prepare a tangent vector to perturb x with, only works for fixed size
│ │ │ +
80 typename traits<X>::TangentVector d;
│ │ │ +
81 d.setZero();
│ │ │ +
82
│ │ │ +
83 Eigen::Matrix<double,N,1> g;
│ │ │ +
84 g.setZero();
│ │ │ +
85 for (int j = 0; j < N; j++) {
│ │ │ +
86 d(j) = delta;
│ │ │ +
87 double hxplus = h(traits<X>::Retract(x, d));
│ │ │ +
88 d(j) = -delta;
│ │ │ +
89 double hxmin = h(traits<X>::Retract(x, d));
│ │ │ +
90 d(j) = 0;
│ │ │ +
91 g(j) = (hxplus - hxmin) * factor;
│ │ │ +
92 }
│ │ │ +
93 return g;
│ │ │ +
94}
│ │ │ +
│ │ │ +
95
│ │ │ +
108template <class Y, class X, int N = traits<X>::dimension>
│ │ │ +
109// TODO Should compute fixed-size matrix
│ │ │ +
│ │ │ +
110typename internal::FixedSizeMatrix<Y, X>::type numericalDerivative11(
│ │ │ +
111 std::function<Y(const X&)> h, const X& x, double delta = 1e-5) {
│ │ │ +
112 typedef typename internal::FixedSizeMatrix<Y,X>::type Matrix;
│ │ │ +
113
│ │ │ +
114 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
115 "Template argument Y must be a manifold type.");
│ │ │ +
116 typedef traits<Y> TraitsY;
│ │ │ +
117
│ │ │ +
118 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X>::structure_category>::value),
│ │ │ +
119 "Template argument X must be a manifold type.");
│ │ │ +
120 BOOST_STATIC_ASSERT_MSG(N>0, "Template argument X must be fixed-size type or N must be specified.");
│ │ │ +
121 typedef traits<X> TraitsX;
│ │ │ +
122
│ │ │ +
123 // get value at x, and corresponding chart
│ │ │ +
124 const Y hx = h(x);
│ │ │ +
125
│ │ │ +
126 // Bit of a hack for now to find number of rows
│ │ │ +
127 const typename TraitsY::TangentVector zeroY = TraitsY::Local(hx, hx);
│ │ │ +
128 const size_t m = zeroY.size();
│ │ │ +
129
│ │ │ +
130 // Prepare a tangent vector to perturb x with, only works for fixed size
│ │ │ +
131 Eigen::Matrix<double, N, 1> dx;
│ │ │ +
132 dx.setZero();
│ │ │ +
133
│ │ │ +
134 // Fill in Jacobian H
│ │ │ +
135 Matrix H = Matrix::Zero(m, N);
│ │ │ +
136 const double factor = 1.0 / (2.0 * delta);
│ │ │ +
137 for (int j = 0; j < N; j++) {
│ │ │ +
138 dx(j) = delta;
│ │ │ +
139 const auto dy1 = TraitsY::Local(hx, h(TraitsX::Retract(x, dx)));
│ │ │ +
140 dx(j) = -delta;
│ │ │ +
141 const auto dy2 = TraitsY::Local(hx, h(TraitsX::Retract(x, dx)));
│ │ │ +
142 dx(j) = 0;
│ │ │ +
143 H.col(j) << (dy1 - dy2) * factor;
│ │ │ +
144 }
│ │ │ +
145 return H;
│ │ │ +
146}
│ │ │ +
│ │ │ +
147
│ │ │ +
149template<class Y, class X>
│ │ │ +
│ │ │ +
150typename internal::FixedSizeMatrix<Y,X>::type numericalDerivative11(Y (*h)(const X&), const X& x,
│ │ │ +
151 double delta = 1e-5) {
│ │ │ +
152 return numericalDerivative11<Y, X>(std::bind(h, std::placeholders::_1), x,
│ │ │ +
153 delta);
│ │ │ +
154}
│ │ │ +
│ │ │ +
155
│ │ │ +
165template<class Y, class X1, class X2, int N = traits<X1>::dimension>
│ │ │ +
│ │ │ +
166typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative21(const std::function<Y(const X1&, const X2&)>& h,
│ │ │ +
167 const X1& x1, const X2& x2, double delta = 1e-5) {
│ │ │ +
168 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
169 "Template argument Y must be a manifold type.");
│ │ │ +
170 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ +
171 "Template argument X1 must be a manifold type.");
│ │ │ +
172 return numericalDerivative11<Y, X1, N>(
│ │ │ +
173 std::bind(h, std::placeholders::_1, std::cref(x2)), x1, delta);
│ │ │ +
174}
│ │ │ +
│ │ │ +
175
│ │ │ +
177template<class Y, class X1, class X2>
│ │ │ +
│ │ │ +
178typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative21(Y (*h)(const X1&, const X2&), const X1& x1,
│ │ │ +
179 const X2& x2, double delta = 1e-5) {
│ │ │ +
180 return numericalDerivative21<Y, X1, X2>(
│ │ │ +
181 std::bind(h, std::placeholders::_1, std::placeholders::_2), x1, x2,
│ │ │ +
182 delta);
│ │ │ +
183}
│ │ │ +
│ │ │ +
184
│ │ │ +
194template<class Y, class X1, class X2, int N = traits<X2>::dimension>
│ │ │ +
│ │ │ +
195typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative22(std::function<Y(const X1&, const X2&)> h,
│ │ │ +
196 const X1& x1, const X2& x2, double delta = 1e-5) {
│ │ │ +
197// BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ +
198// "Template argument X1 must be a manifold type.");
│ │ │ +
199 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X2>::structure_category>::value),
│ │ │ +
200 "Template argument X2 must be a manifold type.");
│ │ │ +
201 return numericalDerivative11<Y, X2, N>(
│ │ │ +
202 std::bind(h, std::cref(x1), std::placeholders::_1), x2, delta);
│ │ │ +
203}
│ │ │ +
│ │ │ +
204
│ │ │ +
206template<class Y, class X1, class X2>
│ │ │ +
│ │ │ +
207typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative22(Y (*h)(const X1&, const X2&), const X1& x1,
│ │ │ +
208 const X2& x2, double delta = 1e-5) {
│ │ │ +
209 return numericalDerivative22<Y, X1, X2>(
│ │ │ +
210 std::bind(h, std::placeholders::_1, std::placeholders::_2), x1, x2,
│ │ │ +
211 delta);
│ │ │ +
212}
│ │ │ +
│ │ │ +
213
│ │ │ +
225template<class Y, class X1, class X2, class X3, int N = traits<X1>::dimension>
│ │ │ +
│ │ │ +
226typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative31(
│ │ │ +
227 std::function<Y(const X1&, const X2&, const X3&)> h, const X1& x1,
│ │ │ +
228 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
229 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
230 "Template argument Y must be a manifold type.");
│ │ │ +
231 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ +
232 "Template argument X1 must be a manifold type.");
│ │ │ +
233 return numericalDerivative11<Y, X1, N>(
│ │ │ +
234 std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3)),
│ │ │ +
235 x1, delta);
│ │ │ +
236}
│ │ │ +
│ │ │ +
237
│ │ │ +
238template<class Y, class X1, class X2, class X3>
│ │ │ +
239typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative31(Y (*h)(const X1&, const X2&, const X3&),
│ │ │ +
240 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
241 return numericalDerivative31<Y, X1, X2, X3>(
│ │ │ +
242 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
243 std::placeholders::_3),
│ │ │ +
244 x1, x2, x3, delta);
│ │ │ +
245}
│ │ │ +
246
│ │ │ +
258template<class Y, class X1, class X2, class X3, int N = traits<X2>::dimension>
│ │ │ +
│ │ │ +
259typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative32(
│ │ │ +
260 std::function<Y(const X1&, const X2&, const X3&)> h, const X1& x1,
│ │ │ +
261 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
262 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
263 "Template argument Y must be a manifold type.");
│ │ │ +
264 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X2>::structure_category>::value),
│ │ │ +
265 "Template argument X2 must be a manifold type.");
│ │ │ +
266 return numericalDerivative11<Y, X2, N>(
│ │ │ +
267 std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3)),
│ │ │ +
268 x2, delta);
│ │ │ +
269}
│ │ │ +
│ │ │ +
270
│ │ │ +
271template<class Y, class X1, class X2, class X3>
│ │ │ +
272inline typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative32(Y (*h)(const X1&, const X2&, const X3&),
│ │ │ +
273 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
274 return numericalDerivative32<Y, X1, X2, X3>(
│ │ │ +
275 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
276 std::placeholders::_3),
│ │ │ +
277 x1, x2, x3, delta);
│ │ │ +
278}
│ │ │ +
279
│ │ │ +
291template<class Y, class X1, class X2, class X3, int N = traits<X3>::dimension>
│ │ │ +
│ │ │ +
292typename internal::FixedSizeMatrix<Y,X3>::type numericalDerivative33(
│ │ │ +
293 std::function<Y(const X1&, const X2&, const X3&)> h, const X1& x1,
│ │ │ +
294 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
295 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
296 "Template argument Y must be a manifold type.");
│ │ │ +
297 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X3>::structure_category>::value),
│ │ │ +
298 "Template argument X3 must be a manifold type.");
│ │ │ +
299 return numericalDerivative11<Y, X3, N>(
│ │ │ +
300 std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1),
│ │ │ +
301 x3, delta);
│ │ │ +
302}
│ │ │ +
│ │ │ +
303
│ │ │ +
304template<class Y, class X1, class X2, class X3>
│ │ │ +
305inline typename internal::FixedSizeMatrix<Y,X3>::type numericalDerivative33(Y (*h)(const X1&, const X2&, const X3&),
│ │ │ +
306 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
307 return numericalDerivative33<Y, X1, X2, X3>(
│ │ │ +
308 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
309 std::placeholders::_3),
│ │ │ +
310 x1, x2, x3, delta);
│ │ │ +
311}
│ │ │ +
312
│ │ │ +
324template<class Y, class X1, class X2, class X3, class X4, int N = traits<X1>::dimension>
│ │ │ +
│ │ │ +
325typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative41(
│ │ │ +
326 std::function<Y(const X1&, const X2&, const X3&, const X4&)> h, const X1& x1,
│ │ │ +
327 const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) {
│ │ │ +
328 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
329 "Template argument Y must be a manifold type.");
│ │ │ +
330 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ +
331 "Template argument X1 must be a manifold type.");
│ │ │ +
332 return numericalDerivative11<Y, X1, N>(
│ │ │ +
333 std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3),
│ │ │ +
334 std::cref(x4)),
│ │ │ +
335 x1, delta);
│ │ │ +
336}
│ │ │ +
│ │ │ +
337
│ │ │ +
338template<class Y, class X1, class X2, class X3, class X4>
│ │ │ +
339inline typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative41(Y (*h)(const X1&, const X2&, const X3&, const X4&),
│ │ │ +
340 const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) {
│ │ │ +
341 return numericalDerivative41<Y, X1, X2, X3, X4>(
│ │ │ +
342 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
343 std::placeholders::_3, std::placeholders::_4),
│ │ │ +
344 x1, x2, x3, x4);
│ │ │ +
345}
│ │ │ +
346
│ │ │ +
358template<class Y, class X1, class X2, class X3, class X4, int N = traits<X2>::dimension>
│ │ │ +
│ │ │ +
359typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative42(
│ │ │ +
360 std::function<Y(const X1&, const X2&, const X3&, const X4&)> h, const X1& x1,
│ │ │ +
361 const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) {
│ │ │ +
362 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
363 "Template argument Y must be a manifold type.");
│ │ │ +
364 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X2>::structure_category>::value),
│ │ │ +
365 "Template argument X2 must be a manifold type.");
│ │ │ +
366 return numericalDerivative11<Y, X2, N>(
│ │ │ +
367 std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3),
│ │ │ +
368 std::cref(x4)),
│ │ │ +
369 x2, delta);
│ │ │ +
370}
│ │ │ +
│ │ │ +
371
│ │ │ +
372template<class Y, class X1, class X2, class X3, class X4>
│ │ │ +
373inline typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative42(Y (*h)(const X1&, const X2&, const X3&, const X4&),
│ │ │ +
374 const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) {
│ │ │ +
375 return numericalDerivative42<Y, X1, X2, X3, X4>(
│ │ │ +
376 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
377 std::placeholders::_3, std::placeholders::_4),
│ │ │ +
378 x1, x2, x3, x4);
│ │ │ +
379}
│ │ │ +
380
│ │ │ +
392template<class Y, class X1, class X2, class X3, class X4, int N = traits<X3>::dimension>
│ │ │ +
│ │ │ +
393typename internal::FixedSizeMatrix<Y,X3>::type numericalDerivative43(
│ │ │ +
394 std::function<Y(const X1&, const X2&, const X3&, const X4&)> h, const X1& x1,
│ │ │ +
395 const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) {
│ │ │ +
396 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
397 "Template argument Y must be a manifold type.");
│ │ │ +
398 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X3>::structure_category>::value),
│ │ │ +
399 "Template argument X3 must be a manifold type.");
│ │ │ +
400 return numericalDerivative11<Y, X3, N>(
│ │ │ +
401 std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1,
│ │ │ +
402 std::cref(x4)),
│ │ │ +
403 x3, delta);
│ │ │ +
404}
│ │ │ +
│ │ │ +
405
│ │ │ +
406template<class Y, class X1, class X2, class X3, class X4>
│ │ │ +
407inline typename internal::FixedSizeMatrix<Y,X3>::type numericalDerivative43(Y (*h)(const X1&, const X2&, const X3&, const X4&),
│ │ │ +
408 const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) {
│ │ │ +
409 return numericalDerivative43<Y, X1, X2, X3, X4>(
│ │ │ +
410 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
411 std::placeholders::_3, std::placeholders::_4),
│ │ │ +
412 x1, x2, x3, x4);
│ │ │ +
413}
│ │ │ +
414
│ │ │ +
426template<class Y, class X1, class X2, class X3, class X4, int N = traits<X4>::dimension>
│ │ │ +
│ │ │ +
427typename internal::FixedSizeMatrix<Y,X4>::type numericalDerivative44(
│ │ │ +
428 std::function<Y(const X1&, const X2&, const X3&, const X4&)> h, const X1& x1,
│ │ │ +
429 const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) {
│ │ │ +
430 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
431 "Template argument Y must be a manifold type.");
│ │ │ +
432 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X4>::structure_category>::value),
│ │ │ +
433 "Template argument X4 must be a manifold type.");
│ │ │ +
434 return numericalDerivative11<Y, X4, N>(
│ │ │ +
435 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3),
│ │ │ +
436 std::placeholders::_1),
│ │ │ +
437 x4, delta);
│ │ │ +
438}
│ │ │ +
│ │ │ +
439
│ │ │ +
440template<class Y, class X1, class X2, class X3, class X4>
│ │ │ +
441inline typename internal::FixedSizeMatrix<Y,X4>::type numericalDerivative44(Y (*h)(const X1&, const X2&, const X3&, const X4&),
│ │ │ +
442 const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) {
│ │ │ +
443 return numericalDerivative44<Y, X1, X2, X3, X4>(
│ │ │ +
444 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
445 std::placeholders::_3, std::placeholders::_4),
│ │ │ +
446 x1, x2, x3, x4);
│ │ │ +
447}
│ │ │ +
448
│ │ │ +
461template<class Y, class X1, class X2, class X3, class X4, class X5, int N = traits<X1>::dimension>
│ │ │ +
│ │ │ +
462typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative51(
│ │ │ +
463 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&)> h, const X1& x1,
│ │ │ +
464 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ +
465 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
466 "Template argument Y must be a manifold type.");
│ │ │ +
467 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ +
468 "Template argument X1 must be a manifold type.");
│ │ │ +
469 return numericalDerivative11<Y, X1, N>(
│ │ │ +
470 std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3),
│ │ │ +
471 std::cref(x4), std::cref(x5)),
│ │ │ +
472 x1, delta);
│ │ │ +
473}
│ │ │ +
│ │ │ +
474
│ │ │ +
475template<class Y, class X1, class X2, class X3, class X4, class X5>
│ │ │ +
476inline typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative51(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&),
│ │ │ +
477 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ +
478 return numericalDerivative51<Y, X1, X2, X3, X4, X5>(
│ │ │ +
479 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
480 std::placeholders::_3, std::placeholders::_4,
│ │ │ +
481 std::placeholders::_5),
│ │ │ +
482 x1, x2, x3, x4, x5);
│ │ │ +
483}
│ │ │ +
484
│ │ │ +
497template<class Y, class X1, class X2, class X3, class X4, class X5, int N = traits<X2>::dimension>
│ │ │ +
│ │ │ +
498typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative52(
│ │ │ +
499 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&)> h, const X1& x1,
│ │ │ +
500 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ +
501 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
502 "Template argument Y must be a manifold type.");
│ │ │ +
503 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ +
504 "Template argument X1 must be a manifold type.");
│ │ │ +
505 return numericalDerivative11<Y, X2, N>(
│ │ │ +
506 std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3),
│ │ │ +
507 std::cref(x4), std::cref(x5)),
│ │ │ +
508 x2, delta);
│ │ │ +
509}
│ │ │ +
│ │ │ +
510
│ │ │ +
511template<class Y, class X1, class X2, class X3, class X4, class X5>
│ │ │ +
512inline typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative52(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&),
│ │ │ +
513 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ +
514 return numericalDerivative52<Y, X1, X2, X3, X4, X5>(
│ │ │ +
515 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
516 std::placeholders::_3, std::placeholders::_4,
│ │ │ +
517 std::placeholders::_5),
│ │ │ +
518 x1, x2, x3, x4, x5);
│ │ │ +
519}
│ │ │ +
520
│ │ │ +
533template<class Y, class X1, class X2, class X3, class X4, class X5, int N = traits<X3>::dimension>
│ │ │ +
│ │ │ +
534typename internal::FixedSizeMatrix<Y,X3>::type numericalDerivative53(
│ │ │ +
535 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&)> h, const X1& x1,
│ │ │ +
536 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ +
537 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
538 "Template argument Y must be a manifold type.");
│ │ │ +
539 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ +
540 "Template argument X1 must be a manifold type.");
│ │ │ +
541 return numericalDerivative11<Y, X3, N>(
│ │ │ +
542 std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1,
│ │ │ +
543 std::cref(x4), std::cref(x5)),
│ │ │ +
544 x3, delta);
│ │ │ +
545}
│ │ │ +
│ │ │ +
546
│ │ │ +
547template<class Y, class X1, class X2, class X3, class X4, class X5>
│ │ │ +
548inline typename internal::FixedSizeMatrix<Y,X3>::type numericalDerivative53(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&),
│ │ │ +
549 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ +
550 return numericalDerivative53<Y, X1, X2, X3, X4, X5>(
│ │ │ +
551 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
552 std::placeholders::_3, std::placeholders::_4,
│ │ │ +
553 std::placeholders::_5),
│ │ │ +
554 x1, x2, x3, x4, x5);
│ │ │ +
555}
│ │ │ +
556
│ │ │ +
569template<class Y, class X1, class X2, class X3, class X4, class X5, int N = traits<X4>::dimension>
│ │ │ +
│ │ │ +
570typename internal::FixedSizeMatrix<Y,X4>::type numericalDerivative54(
│ │ │ +
571 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&)> h, const X1& x1,
│ │ │ +
572 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ +
573 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
574 "Template argument Y must be a manifold type.");
│ │ │ +
575 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ +
576 "Template argument X1 must be a manifold type.");
│ │ │ +
577 return numericalDerivative11<Y, X4, N>(
│ │ │ +
578 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3),
│ │ │ +
579 std::placeholders::_1, std::cref(x5)),
│ │ │ +
580 x4, delta);
│ │ │ +
581}
│ │ │ +
│ │ │ +
582
│ │ │ +
583template<class Y, class X1, class X2, class X3, class X4, class X5>
│ │ │ +
584inline typename internal::FixedSizeMatrix<Y,X4>::type numericalDerivative54(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&),
│ │ │ +
585 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ +
586 return numericalDerivative54<Y, X1, X2, X3, X4, X5>(
│ │ │ +
587 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
588 std::placeholders::_3, std::placeholders::_4,
│ │ │ +
589 std::placeholders::_5),
│ │ │ +
590 x1, x2, x3, x4, x5);
│ │ │ +
591}
│ │ │ +
592
│ │ │ +
605template<class Y, class X1, class X2, class X3, class X4, class X5, int N = traits<X5>::dimension>
│ │ │ +
│ │ │ +
606typename internal::FixedSizeMatrix<Y,X5>::type numericalDerivative55(
│ │ │ +
607 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&)> h, const X1& x1,
│ │ │ +
608 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ +
609 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
610 "Template argument Y must be a manifold type.");
│ │ │ +
611 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ +
612 "Template argument X1 must be a manifold type.");
│ │ │ +
613 return numericalDerivative11<Y, X5, N>(
│ │ │ +
614 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3),
│ │ │ +
615 std::cref(x4), std::placeholders::_1),
│ │ │ +
616 x5, delta);
│ │ │ +
617}
│ │ │ +
│ │ │ +
618
│ │ │ +
619template<class Y, class X1, class X2, class X3, class X4, class X5>
│ │ │ +
620inline typename internal::FixedSizeMatrix<Y,X5>::type numericalDerivative55(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&),
│ │ │ +
621 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e-5) {
│ │ │ +
622 return numericalDerivative55<Y, X1, X2, X3, X4, X5>(
│ │ │ +
623 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
624 std::placeholders::_3, std::placeholders::_4,
│ │ │ +
625 std::placeholders::_5),
│ │ │ +
626 x1, x2, x3, x4, x5);
│ │ │ +
627}
│ │ │ +
628
│ │ │ +
642template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X1>::dimension>
│ │ │ +
│ │ │ +
643typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative61(
│ │ │ +
644 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&)> h, const X1& x1,
│ │ │ +
645 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ +
646 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
647 "Template argument Y must be a manifold type.");
│ │ │ +
648 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ +
649 "Template argument X1 must be a manifold type.");
│ │ │ +
650 return numericalDerivative11<Y, X1, N>(
│ │ │ +
651 std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3),
│ │ │ +
652 std::cref(x4), std::cref(x5), std::cref(x6)),
│ │ │ +
653 x1, delta);
│ │ │ +
654}
│ │ │ +
│ │ │ +
655
│ │ │ +
656template<class Y, class X1, class X2, class X3, class X4, class X5, class X6>
│ │ │ +
657inline typename internal::FixedSizeMatrix<Y,X1>::type numericalDerivative61(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&),
│ │ │ +
658 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ +
659 return numericalDerivative61<Y, X1, X2, X3, X4, X5, X6>(
│ │ │ +
660 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
661 std::placeholders::_3, std::placeholders::_4,
│ │ │ +
662 std::placeholders::_5, std::placeholders::_6),
│ │ │ +
663 x1, x2, x3, x4, x5, x6);
│ │ │ +
664}
│ │ │ +
665
│ │ │ +
679template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X2>::dimension>
│ │ │ +
│ │ │ +
680typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative62(
│ │ │ +
681 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&)> h, const X1& x1,
│ │ │ +
682 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ +
683 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
684 "Template argument Y must be a manifold type.");
│ │ │ +
685 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ +
686 "Template argument X1 must be a manifold type.");
│ │ │ +
687 return numericalDerivative11<Y, X2, N>(
│ │ │ +
688 std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3),
│ │ │ +
689 std::cref(x4), std::cref(x5), std::cref(x6)),
│ │ │ +
690 x2, delta);
│ │ │ +
691}
│ │ │ +
│ │ │ +
692
│ │ │ +
693template<class Y, class X1, class X2, class X3, class X4, class X5, class X6>
│ │ │ +
694inline typename internal::FixedSizeMatrix<Y,X2>::type numericalDerivative62(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&),
│ │ │ +
695 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ +
696 return numericalDerivative62<Y, X1, X2, X3, X4, X5, X6>(
│ │ │ +
697 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
698 std::placeholders::_3, std::placeholders::_4,
│ │ │ +
699 std::placeholders::_5, std::placeholders::_6),
│ │ │ +
700 x1, x2, x3, x4, x5, x6);
│ │ │ +
701}
│ │ │ +
702
│ │ │ +
716template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X3>::dimension>
│ │ │ +
│ │ │ +
717typename internal::FixedSizeMatrix<Y,X3>::type numericalDerivative63(
│ │ │ +
718 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&)> h, const X1& x1,
│ │ │ +
719 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ +
720 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
721 "Template argument Y must be a manifold type.");
│ │ │ +
722 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ +
723 "Template argument X1 must be a manifold type.");
│ │ │ +
724 return numericalDerivative11<Y, X3, N>(
│ │ │ +
725 std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1,
│ │ │ +
726 std::cref(x4), std::cref(x5), std::cref(x6)),
│ │ │ +
727 x3, delta);
│ │ │ +
728}
│ │ │ +
│ │ │ +
729
│ │ │ +
730template<class Y, class X1, class X2, class X3, class X4, class X5, class X6>
│ │ │ +
731inline typename internal::FixedSizeMatrix<Y,X3>::type numericalDerivative63(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&),
│ │ │ +
732 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ +
733 return numericalDerivative63<Y, X1, X2, X3, X4, X5, X6>(
│ │ │ +
734 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
735 std::placeholders::_3, std::placeholders::_4,
│ │ │ +
736 std::placeholders::_5, std::placeholders::_6),
│ │ │ +
737 x1, x2, x3, x4, x5, x6);
│ │ │ +
738}
│ │ │ +
739
│ │ │ +
753template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X4>::dimension>
│ │ │ +
│ │ │ +
754typename internal::FixedSizeMatrix<Y,X4>::type numericalDerivative64(
│ │ │ +
755 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&)> h, const X1& x1,
│ │ │ +
756 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ +
757 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
758 "Template argument Y must be a manifold type.");
│ │ │ +
759 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ +
760 "Template argument X1 must be a manifold type.");
│ │ │ +
761 return numericalDerivative11<Y, X4, N>(
│ │ │ +
762 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3),
│ │ │ +
763 std::placeholders::_1, std::cref(x5), std::cref(x6)),
│ │ │ +
764 x4, delta);
│ │ │ +
765}
│ │ │ +
│ │ │ +
766
│ │ │ +
767template<class Y, class X1, class X2, class X3, class X4, class X5, class X6>
│ │ │ +
768inline typename internal::FixedSizeMatrix<Y,X4>::type numericalDerivative64(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&),
│ │ │ +
769 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ +
770 return numericalDerivative64<Y, X1, X2, X3, X4, X5>(
│ │ │ +
771 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
772 std::placeholders::_3, std::placeholders::_4,
│ │ │ +
773 std::placeholders::_5, std::placeholders::_6),
│ │ │ +
774 x1, x2, x3, x4, x5, x6);
│ │ │ +
775}
│ │ │ +
776
│ │ │ +
790template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X5>::dimension>
│ │ │ +
│ │ │ +
791typename internal::FixedSizeMatrix<Y,X5>::type numericalDerivative65(
│ │ │ +
792 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&)> h, const X1& x1,
│ │ │ +
793 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ +
794 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
795 "Template argument Y must be a manifold type.");
│ │ │ +
796 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ +
797 "Template argument X1 must be a manifold type.");
│ │ │ +
798 return numericalDerivative11<Y, X5, N>(
│ │ │ +
799 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3),
│ │ │ +
800 std::cref(x4), std::placeholders::_1, std::cref(x6)),
│ │ │ +
801 x5, delta);
│ │ │ +
802}
│ │ │ +
│ │ │ +
803
│ │ │ +
804template<class Y, class X1, class X2, class X3, class X4, class X5, class X6>
│ │ │ +
805inline typename internal::FixedSizeMatrix<Y,X5>::type numericalDerivative65(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&),
│ │ │ +
806 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ +
807 return numericalDerivative65<Y, X1, X2, X3, X4, X5, X6>(
│ │ │ +
808 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
809 std::placeholders::_3, std::placeholders::_4,
│ │ │ +
810 std::placeholders::_5, std::placeholders::_6),
│ │ │ +
811 x1, x2, x3, x4, x5, x6);
│ │ │ +
812}
│ │ │ +
813
│ │ │ +
827template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X6>::dimension>
│ │ │ +
│ │ │ +
828typename internal::FixedSizeMatrix<Y, X6>::type numericalDerivative66(
│ │ │ +
829 std::function<Y(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&)> h,
│ │ │ +
830 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6,
│ │ │ +
831 double delta = 1e-5) {
│ │ │ +
832 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<Y>::structure_category>::value),
│ │ │ +
833 "Template argument Y must be a manifold type.");
│ │ │ +
834 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X1>::structure_category>::value),
│ │ │ +
835 "Template argument X1 must be a manifold type.");
│ │ │ +
836 return numericalDerivative11<Y, X6, N>(
│ │ │ +
837 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3),
│ │ │ +
838 std::cref(x4), std::cref(x5), std::placeholders::_1),
│ │ │ +
839 x6, delta);
│ │ │ +
840}
│ │ │ +
│ │ │ +
841
│ │ │ +
842template<class Y, class X1, class X2, class X3, class X4, class X5, class X6>
│ │ │ +
843inline typename internal::FixedSizeMatrix<Y,X6>::type numericalDerivative66(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&),
│ │ │ +
844 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, double delta = 1e-5) {
│ │ │ +
845 return numericalDerivative66<Y, X1, X2, X3, X4, X5, X6>(
│ │ │ +
846 std::bind(h, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
847 std::placeholders::_3, std::placeholders::_4,
│ │ │ +
848 std::placeholders::_5, std::placeholders::_6),
│ │ │ +
849 x1, x2, x3, x4, x5, x6);
│ │ │ +
850}
│ │ │ +
851
│ │ │ +
860template<class X>
│ │ │ +
│ │ │ +
861inline typename internal::FixedSizeMatrix<X,X>::type numericalHessian(std::function<double(const X&)> f, const X& x,
│ │ │ +
862 double delta = 1e-5) {
│ │ │ +
863 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<gtsam::manifold_tag, typename traits<X>::structure_category>::value),
│ │ │ +
864 "Template argument X must be a manifold type.");
│ │ │ +
865 typedef Eigen::Matrix<double, traits<X>::dimension, 1> VectorD;
│ │ │ +
866 typedef std::function<double(const X&)> F;
│ │ │ +
867 typedef std::function<VectorD(F, const X&, double)> G;
│ │ │ +
868 G ng = static_cast<G>(numericalGradient<X> );
│ │ │ +
869 return numericalDerivative11<VectorD, X>(
│ │ │ +
870 std::bind(ng, f, std::placeholders::_1, delta), x, delta);
│ │ │ +
871}
│ │ │ +
│ │ │ +
872
│ │ │ +
873template<class X>
│ │ │ +
874inline typename internal::FixedSizeMatrix<X,X>::type numericalHessian(double (*f)(const X&), const X& x, double delta =
│ │ │ +
875 1e-5) {
│ │ │ +
876 return numericalHessian(std::function<double(const X&)>(f), x, delta);
│ │ │ +
877}
│ │ │ +
878
│ │ │ +
882template<class X1, class X2>
│ │ │ +
│ │ │ +
883class G_x1 {
│ │ │ +
884 const std::function<double(const X1&, const X2&)>& f_;
│ │ │ +
885 X1 x1_;
│ │ │ +
886 double delta_;
│ │ │ +
887public:
│ │ │ +
888 typedef typename internal::FixedSizeMatrix<X1>::type Vector;
│ │ │ +
889
│ │ │ +
890 G_x1(const std::function<double(const X1&, const X2&)>& f, const X1& x1,
│ │ │ +
891 double delta) :
│ │ │ +
892 f_(f), x1_(x1), delta_(delta) {
│ │ │ +
893 }
│ │ │ +
894 Vector operator()(const X2& x2) {
│ │ │ +
895 return numericalGradient<X1>(
│ │ │ +
896 std::bind(f_, std::placeholders::_1, std::cref(x2)), x1_, delta_);
│ │ │ +
897 }
│ │ │ +
898};
│ │ │ +
│ │ │ +
899
│ │ │ +
900template<class X1, class X2>
│ │ │ +
901inline typename internal::FixedSizeMatrix<X1,X2>::type numericalHessian212(
│ │ │ +
902 std::function<double(const X1&, const X2&)> f, const X1& x1, const X2& x2,
│ │ │ +
903 double delta = 1e-5) {
│ │ │ +
904 typedef typename internal::FixedSizeMatrix<X1>::type Vector;
│ │ │ +
905 G_x1<X1, X2> g_x1(f, x1, delta);
│ │ │ +
906 return numericalDerivative11<Vector, X2>(
│ │ │ +
907 std::function<Vector(const X2&)>(
│ │ │ +
908 std::bind<Vector>(std::ref(g_x1), std::placeholders::_1)),
│ │ │ +
909 x2, delta);
│ │ │ +
910}
│ │ │ +
911
│ │ │ +
912template<class X1, class X2>
│ │ │ +
913inline typename internal::FixedSizeMatrix<X1,X2>::type numericalHessian212(double (*f)(const X1&, const X2&),
│ │ │ +
914 const X1& x1, const X2& x2, double delta = 1e-5) {
│ │ │ +
915 return numericalHessian212(std::function<double(const X1&, const X2&)>(f),
│ │ │ +
916 x1, x2, delta);
│ │ │ +
917}
│ │ │ +
918
│ │ │ +
919template<class X1, class X2>
│ │ │ +
920inline typename internal::FixedSizeMatrix<X1,X1>::type numericalHessian211(
│ │ │ +
921 std::function<double(const X1&, const X2&)> f, const X1& x1, const X2& x2,
│ │ │ +
922 double delta = 1e-5) {
│ │ │ +
923
│ │ │ +
924 typedef typename internal::FixedSizeMatrix<X1>::type Vector;
│ │ │ +
925
│ │ │ +
926 Vector (*numGrad)(std::function<double(const X1&)>, const X1&,
│ │ │ +
927 double) = &numericalGradient<X1>;
│ │ │ +
928 std::function<double(const X1&)> f2(
│ │ │ +
929 std::bind(f, std::placeholders::_1, std::cref(x2)));
│ │ │ +
930
│ │ │ +
931 return numericalDerivative11<Vector, X1>(
│ │ │ +
932 std::function<Vector(const X1&)>(
│ │ │ +
933 std::bind(numGrad, f2, std::placeholders::_1, delta)),
│ │ │ +
934 x1, delta);
│ │ │ +
935}
│ │ │ +
936
│ │ │ +
937template<class X1, class X2>
│ │ │ +
938inline typename internal::FixedSizeMatrix<X1,X1>::type numericalHessian211(double (*f)(const X1&, const X2&),
│ │ │ +
939 const X1& x1, const X2& x2, double delta = 1e-5) {
│ │ │ +
940 return numericalHessian211(std::function<double(const X1&, const X2&)>(f),
│ │ │ +
941 x1, x2, delta);
│ │ │ +
942}
│ │ │ +
943
│ │ │ +
944template<class X1, class X2>
│ │ │ +
945inline typename internal::FixedSizeMatrix<X2,X2>::type numericalHessian222(
│ │ │ +
946 std::function<double(const X1&, const X2&)> f, const X1& x1, const X2& x2,
│ │ │ +
947 double delta = 1e-5) {
│ │ │ +
948 typedef typename internal::FixedSizeMatrix<X2>::type Vector;
│ │ │ +
949 Vector (*numGrad)(std::function<double(const X2&)>, const X2&,
│ │ │ +
950 double) = &numericalGradient<X2>;
│ │ │ +
951 std::function<double(const X2&)> f2(
│ │ │ +
952 std::bind(f, std::cref(x1), std::placeholders::_1));
│ │ │ +
953
│ │ │ +
954 return numericalDerivative11<Vector, X2>(
│ │ │ +
955 std::function<Vector(const X2&)>(
│ │ │ +
956 std::bind(numGrad, f2, std::placeholders::_1, delta)),
│ │ │ +
957 x2, delta);
│ │ │ +
958}
│ │ │ +
959
│ │ │ +
960template<class X1, class X2>
│ │ │ +
961inline typename internal::FixedSizeMatrix<X2,X2>::type numericalHessian222(double (*f)(const X1&, const X2&),
│ │ │ +
962 const X1& x1, const X2& x2, double delta = 1e-5) {
│ │ │ +
963 return numericalHessian222(std::function<double(const X1&, const X2&)>(f),
│ │ │ +
964 x1, x2, delta);
│ │ │ +
965}
│ │ │ +
966
│ │ │ +
970/* **************************************************************** */
│ │ │ +
971template<class X1, class X2, class X3>
│ │ │ +
│ │ │ +
972inline typename internal::FixedSizeMatrix<X1,X1>::type numericalHessian311(
│ │ │ +
973 std::function<double(const X1&, const X2&, const X3&)> f, const X1& x1,
│ │ │ +
974 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
975 typedef typename internal::FixedSizeMatrix<X1>::type Vector;
│ │ │ +
976 Vector (*numGrad)(std::function<double(const X1&)>, const X1&,
│ │ │ +
977 double) = &numericalGradient<X1>;
│ │ │ +
978 std::function<double(const X1&)> f2(std::bind(
│ │ │ +
979 f, std::placeholders::_1, std::cref(x2), std::cref(x3)));
│ │ │ +
980
│ │ │ +
981 return numericalDerivative11<Vector, X1>(
│ │ │ +
982 std::function<Vector(const X1&)>(
│ │ │ +
983 std::bind(numGrad, f2, std::placeholders::_1, delta)),
│ │ │ +
984 x1, delta);
│ │ │ +
985}
│ │ │ +
│ │ │ +
986
│ │ │ +
987template<class X1, class X2, class X3>
│ │ │ +
988inline typename internal::FixedSizeMatrix<X1,X1>::type numericalHessian311(double (*f)(const X1&, const X2&, const X3&),
│ │ │ +
989 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
990 return numericalHessian311(
│ │ │ +
991 std::function<double(const X1&, const X2&, const X3&)>(f), x1, x2, x3,
│ │ │ +
992 delta);
│ │ │ +
993}
│ │ │ +
994
│ │ │ +
995/* **************************************************************** */
│ │ │ +
996template<class X1, class X2, class X3>
│ │ │ +
997inline typename internal::FixedSizeMatrix<X2,X2>::type numericalHessian322(
│ │ │ +
998 std::function<double(const X1&, const X2&, const X3&)> f, const X1& x1,
│ │ │ +
999 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
1000 typedef typename internal::FixedSizeMatrix<X2>::type Vector;
│ │ │ +
1001 Vector (*numGrad)(std::function<double(const X2&)>, const X2&,
│ │ │ +
1002 double) = &numericalGradient<X2>;
│ │ │ +
1003 std::function<double(const X2&)> f2(std::bind(
│ │ │ +
1004 f, std::cref(x1), std::placeholders::_1, std::cref(x3)));
│ │ │ +
1005
│ │ │ +
1006 return numericalDerivative11<Vector, X2>(
│ │ │ +
1007 std::function<Vector(const X2&)>(
│ │ │ +
1008 std::bind(numGrad, f2, std::placeholders::_1, delta)),
│ │ │ +
1009 x2, delta);
│ │ │ +
1010}
│ │ │ +
1011
│ │ │ +
1012template<class X1, class X2, class X3>
│ │ │ +
1013inline typename internal::FixedSizeMatrix<X2,X2>::type numericalHessian322(double (*f)(const X1&, const X2&, const X3&),
│ │ │ +
1014 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
1015 return numericalHessian322(
│ │ │ +
1016 std::function<double(const X1&, const X2&, const X3&)>(f), x1, x2, x3,
│ │ │ +
1017 delta);
│ │ │ +
1018}
│ │ │ +
1019
│ │ │ +
1020/* **************************************************************** */
│ │ │ +
1021template<class X1, class X2, class X3>
│ │ │ +
1022inline typename internal::FixedSizeMatrix<X3,X3>::type numericalHessian333(
│ │ │ +
1023 std::function<double(const X1&, const X2&, const X3&)> f, const X1& x1,
│ │ │ +
1024 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
1025 typedef typename internal::FixedSizeMatrix<X3>::type Vector;
│ │ │ +
1026 Vector (*numGrad)(std::function<double(const X3&)>, const X3&,
│ │ │ +
1027 double) = &numericalGradient<X3>;
│ │ │ +
1028 std::function<double(const X3&)> f2(std::bind(
│ │ │ +
1029 f, std::cref(x1), std::cref(x2), std::placeholders::_1));
│ │ │ +
1030
│ │ │ +
1031 return numericalDerivative11<Vector, X3>(
│ │ │ +
1032 std::function<Vector(const X3&)>(
│ │ │ +
1033 std::bind(numGrad, f2, std::placeholders::_1, delta)),
│ │ │ +
1034 x3, delta);
│ │ │ +
1035}
│ │ │ +
1036
│ │ │ +
1037template<class X1, class X2, class X3>
│ │ │ +
1038inline typename internal::FixedSizeMatrix<X3,X3>::type numericalHessian333(double (*f)(const X1&, const X2&, const X3&),
│ │ │ +
1039 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
1040 return numericalHessian333(
│ │ │ +
1041 std::function<double(const X1&, const X2&, const X3&)>(f), x1, x2, x3,
│ │ │ +
1042 delta);
│ │ │ +
1043}
│ │ │ +
1044
│ │ │ +
1045/* **************************************************************** */
│ │ │ +
1046template<class X1, class X2, class X3>
│ │ │ +
1047inline typename internal::FixedSizeMatrix<X1,X2>::type numericalHessian312(
│ │ │ +
1048 std::function<double(const X1&, const X2&, const X3&)> f, const X1& x1,
│ │ │ +
1049 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
1050 return numericalHessian212<X1, X2>(
│ │ │ +
1051 std::function<double(const X1&, const X2&)>(
│ │ │ +
1052 std::bind(f, std::placeholders::_1, std::placeholders::_2,
│ │ │ +
1053 std::cref(x3))),
│ │ │ +
1054 x1, x2, delta);
│ │ │ +
1055}
│ │ │ +
1056
│ │ │ +
1057template<class X1, class X2, class X3>
│ │ │ +
1058inline typename internal::FixedSizeMatrix<X1,X3>::type numericalHessian313(
│ │ │ +
1059 std::function<double(const X1&, const X2&, const X3&)> f, const X1& x1,
│ │ │ +
1060 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
1061 return numericalHessian212<X1, X3>(
│ │ │ +
1062 std::function<double(const X1&, const X3&)>(
│ │ │ +
1063 std::bind(f, std::placeholders::_1, std::cref(x2),
│ │ │ +
1064 std::placeholders::_2)),
│ │ │ +
1065 x1, x3, delta);
│ │ │ +
1066}
│ │ │ +
1067
│ │ │ +
1068template<class X1, class X2, class X3>
│ │ │ +
1069inline typename internal::FixedSizeMatrix<X2,X3>::type numericalHessian323(
│ │ │ +
1070 std::function<double(const X1&, const X2&, const X3&)> f, const X1& x1,
│ │ │ +
1071 const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
1072 return numericalHessian212<X2, X3>(
│ │ │ +
1073 std::function<double(const X2&, const X3&)>(
│ │ │ +
1074 std::bind(f, std::cref(x1), std::placeholders::_1,
│ │ │ +
1075 std::placeholders::_2)),
│ │ │ +
1076 x2, x3, delta);
│ │ │ +
1077}
│ │ │ +
1078
│ │ │ +
1079/* **************************************************************** */
│ │ │ +
1080template<class X1, class X2, class X3>
│ │ │ +
1081inline typename internal::FixedSizeMatrix<X1,X2>::type numericalHessian312(double (*f)(const X1&, const X2&, const X3&),
│ │ │ +
1082 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
1083 return numericalHessian312(
│ │ │ +
1084 std::function<double(const X1&, const X2&, const X3&)>(f), x1, x2, x3,
│ │ │ +
1085 delta);
│ │ │ +
1086}
│ │ │ +
1087
│ │ │ +
1088template<class X1, class X2, class X3>
│ │ │ +
1089inline typename internal::FixedSizeMatrix<X1,X3>::type numericalHessian313(double (*f)(const X1&, const X2&, const X3&),
│ │ │ +
1090 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
1091 return numericalHessian313(
│ │ │ +
1092 std::function<double(const X1&, const X2&, const X3&)>(f), x1, x2, x3,
│ │ │ +
1093 delta);
│ │ │ +
1094}
│ │ │ +
1095
│ │ │ +
1096template<class X1, class X2, class X3>
│ │ │ +
1097inline typename internal::FixedSizeMatrix<X2,X3>::type numericalHessian323(double (*f)(const X1&, const X2&, const X3&),
│ │ │ +
1098 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) {
│ │ │ +
1099 return numericalHessian323(
│ │ │ +
1100 std::function<double(const X1&, const X2&, const X3&)>(f), x1, x2, x3,
│ │ │ +
1101 delta);
│ │ │ +
1102}
│ │ │ +
1103
│ │ │ +
1104} // namespace gtsam
│ │ │ +
1105
│ │ │ +
Base class and basic functions for Lie types.
│ │ │ +
Factor Graph Values.
│ │ │ + │ │ │ +
A non-templated config holding any types of Manifold-group elements.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
typename std::enable_if< B, T >::type enable_if_t
An shorthand alias for accessing the ::type inside std::enable_if that can be used in a template dire...
Definition make_shared.h:31
│ │ │ -
gtsam::enable_if_t< needs_eigen_aligned_allocator< T >::value, boost::shared_ptr< T > > make_shared(Args &&... args)
Add our own make_shared as a layer of wrapping on boost::make_shared This solves the problem with the...
Definition make_shared.h:57
│ │ │ +
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative61(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
Compute numerical derivative in argument 1 of 6-argument function.
Definition numericalDerivative.h:643
│ │ │ +
internal::FixedSizeMatrix< X1, X1 >::type numericalHessian311(std::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
Numerical Hessian for tenary functions.
Definition numericalDerivative.h:972
│ │ │ +
internal::FixedSizeMatrix< X, X >::type numericalHessian(std::function< double(const X &)> f, const X &x, double delta=1e-5)
Compute numerical Hessian matrix.
Definition numericalDerivative.h:861
│ │ │ +
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative21(const std::function< Y(const X1 &, const X2 &)> &h, const X1 &x1, const X2 &x2, double delta=1e-5)
Compute numerical derivative in argument 1 of binary function.
Definition numericalDerivative.h:166
│ │ │ +
internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative63(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
Compute numerical derivative in argument 3 of 6-argument function.
Definition numericalDerivative.h:717
│ │ │ +
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative51(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
Compute numerical derivative in argument 1 of 5-argument function.
Definition numericalDerivative.h:462
│ │ │ +
internal::FixedSizeMatrix< Y, X4 >::type numericalDerivative54(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
Compute numerical derivative in argument 4 of 5-argument function.
Definition numericalDerivative.h:570
│ │ │ +
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative41(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
Compute numerical derivative in argument 1 of 4-argument function.
Definition numericalDerivative.h:325
│ │ │ +
internal::FixedSizeMatrix< Y, X4 >::type numericalDerivative64(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
Compute numerical derivative in argument 4 of 6-argument function.
Definition numericalDerivative.h:754
│ │ │ +
internal::FixedSizeMatrix< Y, X6 >::type numericalDerivative66(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
Compute numerical derivative in argument 6 of 6-argument function.
Definition numericalDerivative.h:828
│ │ │ +
internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative33(std::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
Compute numerical derivative in argument 3 of ternary function.
Definition numericalDerivative.h:292
│ │ │ +
internal::FixedSizeMatrix< Y, X >::type numericalDerivative11(std::function< Y(const X &)> h, const X &x, double delta=1e-5)
New-style numerical derivatives using manifold_traits.
Definition numericalDerivative.h:110
│ │ │ +
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative22(std::function< Y(const X1 &, const X2 &)> h, const X1 &x1, const X2 &x2, double delta=1e-5)
Compute numerical derivative in argument 2 of binary function.
Definition numericalDerivative.h:195
│ │ │ +
internal::FixedSizeMatrix< Y, X5 >::type numericalDerivative55(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
Compute numerical derivative in argument 5 of 5-argument function.
Definition numericalDerivative.h:606
│ │ │ +
internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative43(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
Compute numerical derivative in argument 3 of 4-argument function.
Definition numericalDerivative.h:393
│ │ │ +
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative52(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
Compute numerical derivative in argument 2 of 5-argument function.
Definition numericalDerivative.h:498
│ │ │ +
internal::FixedSizeMatrix< Y, X5 >::type numericalDerivative65(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
Compute numerical derivative in argument 5 of 6-argument function.
Definition numericalDerivative.h:791
│ │ │ +
internal::FixedSizeMatrix< Y, X4 >::type numericalDerivative44(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
Compute numerical derivative in argument 4 of 4-argument function.
Definition numericalDerivative.h:427
│ │ │ +
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative31(std::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
Compute numerical derivative in argument 1 of ternary function.
Definition numericalDerivative.h:226
│ │ │ +
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative62(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
Compute numerical derivative in argument 2 of 6-argument function.
Definition numericalDerivative.h:680
│ │ │ +
internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative53(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
Compute numerical derivative in argument 3 of 5-argument function.
Definition numericalDerivative.h:534
│ │ │ +
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative32(std::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
Compute numerical derivative in argument 2 of ternary function.
Definition numericalDerivative.h:259
│ │ │ +
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative42(std::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
Compute numerical derivative in argument 2 of 4-argument function.
Definition numericalDerivative.h:359
│ │ │ +
Eigen::Matrix< double, N, 1 > numericalGradient(std::function< double(const X &)> h, const X &x, double delta=1e-5)
Numerically compute gradient of scalar function.
Definition numericalDerivative.h:70
│ │ │ +
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ +
tag to assert a type is a manifold
Definition Manifold.h:33
│ │ │ +
Definition numericalDerivative.h:56
│ │ │ +
Helper class that computes the derivative of f w.r.t.
Definition numericalDerivative.h:883
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,71 +1,1165 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -make_shared.h │ │ │ │ +numericalDerivative.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ -3 * GTSAM Copyright 2020, Georgia Tech Research Corporation, │ │ │ │ +3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -18#pragma once │ │ │ │ -19 │ │ │ │ -20#include <_g_t_s_a_m_/_b_a_s_e_/_t_y_p_e_s_._h> │ │ │ │ -21 │ │ │ │ -22#include │ │ │ │ -23 │ │ │ │ -24#include │ │ │ │ -25 │ │ │ │ -26#include │ │ │ │ +18// \callgraph │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +21#include │ │ │ │ +22 │ │ │ │ +23#include <_g_t_s_a_m_/_l_i_n_e_a_r_/_V_e_c_t_o_r_V_a_l_u_e_s_._h> │ │ │ │ +24#include <_g_t_s_a_m_/_l_i_n_e_a_r_/_J_a_c_o_b_i_a_n_F_a_c_t_o_r_._h> │ │ │ │ +25#include <_g_t_s_a_m_/_n_o_n_l_i_n_e_a_r_/_V_a_l_u_e_s_._h> │ │ │ │ +26#include <_g_t_s_a_m_/_b_a_s_e_/_L_i_e_._h> │ │ │ │ 27 │ │ │ │ 28namespace _g_t_s_a_m { │ │ │ │ -30 template │ │ │ │ -_3_1 using _e_n_a_b_l_e___i_f___t = typename std::enable_if::type; │ │ │ │ -32} │ │ │ │ -33 │ │ │ │ -34namespace _g_t_s_a_m { │ │ │ │ -35 │ │ │ │ -56 template │ │ │ │ -_5_7 _g_t_s_a_m_:_:_e_n_a_b_l_e___i_f___t_<_n_e_e_d_s___e_i_g_e_n___a_l_i_g_n_e_d___a_l_l_o_c_a_t_o_r_<_T_>_:_:_v_a_l_u_e, boost:: │ │ │ │ -shared_ptr> _m_a_k_e___s_h_a_r_e_d(Args &&... args) { │ │ │ │ -58 return boost::allocate_shared(Eigen::aligned_allocator(), std:: │ │ │ │ -forward(args)...); │ │ │ │ -59 } │ │ │ │ +29 │ │ │ │ +30/* │ │ │ │ +31 * Note that all of these functions have two versions, a boost.function │ │ │ │ +version and a │ │ │ │ +32 * standard C++ function pointer version. This allows reformulating the │ │ │ │ +arguments of │ │ │ │ +33 * a function to fit the correct structure, which is useful for situations │ │ │ │ +like │ │ │ │ +34 * member functions and functions with arguments not involved in the │ │ │ │ +derivative: │ │ │ │ +35 * │ │ │ │ +36 * Usage of the boost bind version to rearrange arguments: │ │ │ │ +37 * for a function with one relevant param and an optional derivative: │ │ │ │ +38 * Foo bar(const Obj& a, boost::optional H1) │ │ │ │ +39 * Use boost.bind to restructure: │ │ │ │ +40 * std::bind(bar, std::placeholders::_1, boost::none) │ │ │ │ +41 * This syntax will fix the optional argument to boost::none, while using the │ │ │ │ +first argument provided │ │ │ │ +42 * │ │ │ │ +43 * For member functions, such as below, with an instantiated copy │ │ │ │ +instanceOfSomeClass │ │ │ │ +44 * Foo SomeClass::bar(const Obj& a) │ │ │ │ +45 * Use boost bind as follows to create a function pointer that uses the │ │ │ │ +member function: │ │ │ │ +46 * std::bind(&SomeClass::bar, ref(instanceOfSomeClass), std::placeholders:: │ │ │ │ +_1) │ │ │ │ +47 * │ │ │ │ +48 * For additional details, see the documentation: │ │ │ │ +49 * http://www.boost.org/doc/libs/release/libs/bind/bind.html │ │ │ │ +50 */ │ │ │ │ +51 │ │ │ │ +52 │ │ │ │ +53// a quick helper struct to get the appropriate fixed sized matrix from two │ │ │ │ +value types │ │ │ │ +54namespace internal { │ │ │ │ +55template │ │ │ │ +_5_6struct _F_i_x_e_d_S_i_z_e_M_a_t_r_i_x { │ │ │ │ +57 typedef Eigen::Matrix::dimension, _t_r_a_i_t_s_<_X_>_:_:_d_i_m_e_n_s_i_o_n> │ │ │ │ +type; │ │ │ │ +58}; │ │ │ │ +59} │ │ │ │ 60 │ │ │ │ -62 template │ │ │ │ -_6_3 _g_t_s_a_m_:_:_e_n_a_b_l_e___i_f___t_<_!_n_e_e_d_s___e_i_g_e_n___a_l_i_g_n_e_d___a_l_l_o_c_a_t_o_r_<_T_>_:_:_v_a_l_u_e, boost:: │ │ │ │ -shared_ptr> _m_a_k_e___s_h_a_r_e_d(Args &&... args) { │ │ │ │ -64 return boost::make_shared(std::forward(args)...); │ │ │ │ -65 } │ │ │ │ -66 │ │ │ │ -67} │ │ │ │ -_t_y_p_e_s_._h │ │ │ │ -Typedefs for easier changing of types. │ │ │ │ +69template ::dimension> │ │ │ │ +_7_0typename Eigen::Matrix _n_u_m_e_r_i_c_a_l_G_r_a_d_i_e_n_t( │ │ │ │ +71 std::function h, const X& x, double delta = 1e-5) { │ │ │ │ +72 double factor = 1.0 / (2.0 * delta); │ │ │ │ +73 │ │ │ │ +74 BOOST_STATIC_ASSERT_MSG( │ │ │ │ +75 (boost::is_base_of<_m_a_n_i_f_o_l_d___t_a_g, typename _t_r_a_i_t_s_<_X_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>:: │ │ │ │ +value), │ │ │ │ +76 "Template argument X must be a manifold type."); │ │ │ │ +77 BOOST_STATIC_ASSERT_MSG(N>0, "Template argument X must be fixed-size type or │ │ │ │ +N must be specified."); │ │ │ │ +78 │ │ │ │ +79 // Prepare a tangent vector to perturb x with, only works for fixed size │ │ │ │ +80 typename _t_r_a_i_t_s_<_X_>_:_:_T_a_n_g_e_n_t_V_e_c_t_o_r d; │ │ │ │ +81 d.setZero(); │ │ │ │ +82 │ │ │ │ +83 Eigen::Matrix g; │ │ │ │ +84 g.setZero(); │ │ │ │ +85 for (int j = 0; j < N; j++) { │ │ │ │ +86 d(j) = delta; │ │ │ │ +87 double hxplus = h(_t_r_a_i_t_s_<_X_>_:_:_R_e_t_r_a_c_t(x, d)); │ │ │ │ +88 d(j) = -delta; │ │ │ │ +89 double hxmin = h(_t_r_a_i_t_s_<_X_>_:_:_R_e_t_r_a_c_t(x, d)); │ │ │ │ +90 d(j) = 0; │ │ │ │ +91 g(j) = (hxplus - hxmin) * factor; │ │ │ │ +92 } │ │ │ │ +93 return g; │ │ │ │ +94} │ │ │ │ +95 │ │ │ │ +108template ::dimension> │ │ │ │ +109// TODO Should compute fixed-size matrix │ │ │ │ +_1_1_0typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_1_1( │ │ │ │ +111 std::function h, const X& x, double delta = 1e-5) { │ │ │ │ +112 typedef typename internal::FixedSizeMatrix::type Matrix; │ │ │ │ +113 │ │ │ │ +114 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +115 "Template argument Y must be a manifold type."); │ │ │ │ +116 typedef _t_r_a_i_t_s_<_Y_> TraitsY; │ │ │ │ +117 │ │ │ │ +118 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +119 "Template argument X must be a manifold type."); │ │ │ │ +120 BOOST_STATIC_ASSERT_MSG(N>0, "Template argument X must be fixed-size type │ │ │ │ +or N must be specified."); │ │ │ │ +121 typedef _t_r_a_i_t_s_<_X_> TraitsX; │ │ │ │ +122 │ │ │ │ +123 // get value at x, and corresponding chart │ │ │ │ +124 const Y hx = h(x); │ │ │ │ +125 │ │ │ │ +126 // Bit of a hack for now to find number of rows │ │ │ │ +127 const typename TraitsY::TangentVector zeroY = TraitsY::Local(hx, hx); │ │ │ │ +128 const size_t m = zeroY.size(); │ │ │ │ +129 │ │ │ │ +130 // Prepare a tangent vector to perturb x with, only works for fixed size │ │ │ │ +131 Eigen::Matrix dx; │ │ │ │ +132 dx.setZero(); │ │ │ │ +133 │ │ │ │ +134 // Fill in Jacobian H │ │ │ │ +135 Matrix H = Matrix::Zero(m, N); │ │ │ │ +136 const double factor = 1.0 / (2.0 * delta); │ │ │ │ +137 for (int j = 0; j < N; j++) { │ │ │ │ +138 dx(j) = delta; │ │ │ │ +139 const auto dy1 = TraitsY::Local(hx, h(TraitsX::Retract(x, dx))); │ │ │ │ +140 dx(j) = -delta; │ │ │ │ +141 const auto dy2 = TraitsY::Local(hx, h(TraitsX::Retract(x, dx))); │ │ │ │ +142 dx(j) = 0; │ │ │ │ +143 H.col(j) << (dy1 - dy2) * factor; │ │ │ │ +144 } │ │ │ │ +145 return H; │ │ │ │ +146} │ │ │ │ +147 │ │ │ │ +149template │ │ │ │ +_1_5_0typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_1_1(Y (*h) │ │ │ │ +(const X&), const X& x, │ │ │ │ +151 double delta = 1e-5) { │ │ │ │ +152 return numericalDerivative11(std::bind(h, std::placeholders::_1), x, │ │ │ │ +153 delta); │ │ │ │ +154} │ │ │ │ +155 │ │ │ │ +165template::dimension> │ │ │ │ +_1_6_6typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_2_1(const │ │ │ │ +std::function& h, │ │ │ │ +167 const X1& x1, const X2& x2, double delta = 1e-5) { │ │ │ │ +168 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +169 "Template argument Y must be a manifold type."); │ │ │ │ +170 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +171 "Template argument X1 must be a manifold type."); │ │ │ │ +172 return numericalDerivative11( │ │ │ │ +173 std::bind(h, std::placeholders::_1, std::cref(x2)), x1, delta); │ │ │ │ +174} │ │ │ │ +175 │ │ │ │ +177template │ │ │ │ +_1_7_8typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_2_1(Y (*h) │ │ │ │ +(const X1&, const X2&), const X1& x1, │ │ │ │ +179 const X2& x2, double delta = 1e-5) { │ │ │ │ +180 return numericalDerivative21( │ │ │ │ +181 std::bind(h, std::placeholders::_1, std::placeholders::_2), x1, x2, │ │ │ │ +182 delta); │ │ │ │ +183} │ │ │ │ +184 │ │ │ │ +194template::dimension> │ │ │ │ +_1_9_5typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_2_2(std:: │ │ │ │ +function h, │ │ │ │ +196 const X1& x1, const X2& x2, double delta = 1e-5) { │ │ │ │ +197// BOOST_STATIC_ASSERT_MSG( (boost::is_base_of::structure_category>::value), │ │ │ │ +198// "Template argument X1 must be a manifold type."); │ │ │ │ +199 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_2_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +200 "Template argument X2 must be a manifold type."); │ │ │ │ +201 return numericalDerivative11( │ │ │ │ +202 std::bind(h, std::cref(x1), std::placeholders::_1), x2, delta); │ │ │ │ +203} │ │ │ │ +204 │ │ │ │ +206template │ │ │ │ +_2_0_7typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_2_2(Y (*h) │ │ │ │ +(const X1&, const X2&), const X1& x1, │ │ │ │ +208 const X2& x2, double delta = 1e-5) { │ │ │ │ +209 return numericalDerivative22( │ │ │ │ +210 std::bind(h, std::placeholders::_1, std::placeholders::_2), x1, x2, │ │ │ │ +211 delta); │ │ │ │ +212} │ │ │ │ +213 │ │ │ │ +225template:: │ │ │ │ +dimension> │ │ │ │ +_2_2_6typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_1( │ │ │ │ +227 std::function h, const X1& x1, │ │ │ │ +228 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +229 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +230 "Template argument Y must be a manifold type."); │ │ │ │ +231 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +232 "Template argument X1 must be a manifold type."); │ │ │ │ +233 return numericalDerivative11( │ │ │ │ +234 std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3)), │ │ │ │ +235 x1, delta); │ │ │ │ +236} │ │ │ │ +237 │ │ │ │ +238template │ │ │ │ +239typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_1(Y (*h) │ │ │ │ +(const X1&, const X2&, const X3&), │ │ │ │ +240 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +241 return numericalDerivative31( │ │ │ │ +242 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +243 std::placeholders::_3), │ │ │ │ +244 x1, x2, x3, delta); │ │ │ │ +245} │ │ │ │ +246 │ │ │ │ +258template:: │ │ │ │ +dimension> │ │ │ │ +_2_5_9typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_2( │ │ │ │ +260 std::function h, const X1& x1, │ │ │ │ +261 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +262 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +263 "Template argument Y must be a manifold type."); │ │ │ │ +264 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_2_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +265 "Template argument X2 must be a manifold type."); │ │ │ │ +266 return numericalDerivative11( │ │ │ │ +267 std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3)), │ │ │ │ +268 x2, delta); │ │ │ │ +269} │ │ │ │ +270 │ │ │ │ +271template │ │ │ │ +272inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_2 │ │ │ │ +(Y (*h)(const X1&, const X2&, const X3&), │ │ │ │ +273 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +274 return numericalDerivative32( │ │ │ │ +275 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +276 std::placeholders::_3), │ │ │ │ +277 x1, x2, x3, delta); │ │ │ │ +278} │ │ │ │ +279 │ │ │ │ +291template:: │ │ │ │ +dimension> │ │ │ │ +_2_9_2typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_3( │ │ │ │ +293 std::function h, const X1& x1, │ │ │ │ +294 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +295 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +296 "Template argument Y must be a manifold type."); │ │ │ │ +297 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_3_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +298 "Template argument X3 must be a manifold type."); │ │ │ │ +299 return numericalDerivative11( │ │ │ │ +300 std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1), │ │ │ │ +301 x3, delta); │ │ │ │ +302} │ │ │ │ +303 │ │ │ │ +304template │ │ │ │ +305inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_3 │ │ │ │ +(Y (*h)(const X1&, const X2&, const X3&), │ │ │ │ +306 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +307 return numericalDerivative33( │ │ │ │ +308 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +309 std::placeholders::_3), │ │ │ │ +310 x1, x2, x3, delta); │ │ │ │ +311} │ │ │ │ +312 │ │ │ │ +324template::dimension> │ │ │ │ +_3_2_5typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_1( │ │ │ │ +326 std::function h, const X1& │ │ │ │ +x1, │ │ │ │ +327 const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) { │ │ │ │ +328 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +329 "Template argument Y must be a manifold type."); │ │ │ │ +330 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +331 "Template argument X1 must be a manifold type."); │ │ │ │ +332 return numericalDerivative11( │ │ │ │ +333 std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3), │ │ │ │ +334 std::cref(x4)), │ │ │ │ +335 x1, delta); │ │ │ │ +336} │ │ │ │ +337 │ │ │ │ +338template │ │ │ │ +339inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_1 │ │ │ │ +(Y (*h)(const X1&, const X2&, const X3&, const X4&), │ │ │ │ +340 const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e- │ │ │ │ +5) { │ │ │ │ +341 return numericalDerivative41( │ │ │ │ +342 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +343 std::placeholders::_3, std::placeholders::_4), │ │ │ │ +344 x1, x2, x3, x4); │ │ │ │ +345} │ │ │ │ +346 │ │ │ │ +358template::dimension> │ │ │ │ +_3_5_9typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_2( │ │ │ │ +360 std::function h, const X1& │ │ │ │ +x1, │ │ │ │ +361 const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) { │ │ │ │ +362 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +363 "Template argument Y must be a manifold type."); │ │ │ │ +364 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_2_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +365 "Template argument X2 must be a manifold type."); │ │ │ │ +366 return numericalDerivative11( │ │ │ │ +367 std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3), │ │ │ │ +368 std::cref(x4)), │ │ │ │ +369 x2, delta); │ │ │ │ +370} │ │ │ │ +371 │ │ │ │ +372template │ │ │ │ +373inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_2 │ │ │ │ +(Y (*h)(const X1&, const X2&, const X3&, const X4&), │ │ │ │ +374 const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e- │ │ │ │ +5) { │ │ │ │ +375 return numericalDerivative42( │ │ │ │ +376 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +377 std::placeholders::_3, std::placeholders::_4), │ │ │ │ +378 x1, x2, x3, x4); │ │ │ │ +379} │ │ │ │ +380 │ │ │ │ +392template::dimension> │ │ │ │ +_3_9_3typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_3( │ │ │ │ +394 std::function h, const X1& │ │ │ │ +x1, │ │ │ │ +395 const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) { │ │ │ │ +396 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +397 "Template argument Y must be a manifold type."); │ │ │ │ +398 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_3_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +399 "Template argument X3 must be a manifold type."); │ │ │ │ +400 return numericalDerivative11( │ │ │ │ +401 std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1, │ │ │ │ +402 std::cref(x4)), │ │ │ │ +403 x3, delta); │ │ │ │ +404} │ │ │ │ +405 │ │ │ │ +406template │ │ │ │ +407inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_3 │ │ │ │ +(Y (*h)(const X1&, const X2&, const X3&, const X4&), │ │ │ │ +408 const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e- │ │ │ │ +5) { │ │ │ │ +409 return numericalDerivative43( │ │ │ │ +410 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +411 std::placeholders::_3, std::placeholders::_4), │ │ │ │ +412 x1, x2, x3, x4); │ │ │ │ +413} │ │ │ │ +414 │ │ │ │ +426template::dimension> │ │ │ │ +_4_2_7typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_4( │ │ │ │ +428 std::function h, const X1& │ │ │ │ +x1, │ │ │ │ +429 const X2& x2, const X3& x3, const X4& x4, double delta = 1e-5) { │ │ │ │ +430 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +431 "Template argument Y must be a manifold type."); │ │ │ │ +432 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_4_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +433 "Template argument X4 must be a manifold type."); │ │ │ │ +434 return numericalDerivative11( │ │ │ │ +435 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), │ │ │ │ +436 std::placeholders::_1), │ │ │ │ +437 x4, delta); │ │ │ │ +438} │ │ │ │ +439 │ │ │ │ +440template │ │ │ │ +441inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_4 │ │ │ │ +(Y (*h)(const X1&, const X2&, const X3&, const X4&), │ │ │ │ +442 const X1& x1, const X2& x2, const X3& x3, const X4& x4, double delta = 1e- │ │ │ │ +5) { │ │ │ │ +443 return numericalDerivative44( │ │ │ │ +444 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +445 std::placeholders::_3, std::placeholders::_4), │ │ │ │ +446 x1, x2, x3, x4); │ │ │ │ +447} │ │ │ │ +448 │ │ │ │ +461template::dimension> │ │ │ │ +_4_6_2typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_1( │ │ │ │ +463 std::function h, │ │ │ │ +const X1& x1, │ │ │ │ +464 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e- │ │ │ │ +5) { │ │ │ │ +465 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +466 "Template argument Y must be a manifold type."); │ │ │ │ +467 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +468 "Template argument X1 must be a manifold type."); │ │ │ │ +469 return numericalDerivative11( │ │ │ │ +470 std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3), │ │ │ │ +471 std::cref(x4), std::cref(x5)), │ │ │ │ +472 x1, delta); │ │ │ │ +473} │ │ │ │ +474 │ │ │ │ +475template │ │ │ │ +476inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_1 │ │ │ │ +(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&), │ │ │ │ +477 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, │ │ │ │ +double delta = 1e-5) { │ │ │ │ +478 return numericalDerivative51( │ │ │ │ +479 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +480 std::placeholders::_3, std::placeholders::_4, │ │ │ │ +481 std::placeholders::_5), │ │ │ │ +482 x1, x2, x3, x4, x5); │ │ │ │ +483} │ │ │ │ +484 │ │ │ │ +497template::dimension> │ │ │ │ +_4_9_8typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_2( │ │ │ │ +499 std::function h, │ │ │ │ +const X1& x1, │ │ │ │ +500 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e- │ │ │ │ +5) { │ │ │ │ +501 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +502 "Template argument Y must be a manifold type."); │ │ │ │ +503 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +504 "Template argument X1 must be a manifold type."); │ │ │ │ +505 return numericalDerivative11( │ │ │ │ +506 std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3), │ │ │ │ +507 std::cref(x4), std::cref(x5)), │ │ │ │ +508 x2, delta); │ │ │ │ +509} │ │ │ │ +510 │ │ │ │ +511template │ │ │ │ +512inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_2 │ │ │ │ +(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&), │ │ │ │ +513 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, │ │ │ │ +double delta = 1e-5) { │ │ │ │ +514 return numericalDerivative52( │ │ │ │ +515 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +516 std::placeholders::_3, std::placeholders::_4, │ │ │ │ +517 std::placeholders::_5), │ │ │ │ +518 x1, x2, x3, x4, x5); │ │ │ │ +519} │ │ │ │ +520 │ │ │ │ +533template::dimension> │ │ │ │ +_5_3_4typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_3( │ │ │ │ +535 std::function h, │ │ │ │ +const X1& x1, │ │ │ │ +536 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e- │ │ │ │ +5) { │ │ │ │ +537 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +538 "Template argument Y must be a manifold type."); │ │ │ │ +539 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +540 "Template argument X1 must be a manifold type."); │ │ │ │ +541 return numericalDerivative11( │ │ │ │ +542 std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1, │ │ │ │ +543 std::cref(x4), std::cref(x5)), │ │ │ │ +544 x3, delta); │ │ │ │ +545} │ │ │ │ +546 │ │ │ │ +547template │ │ │ │ +548inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_3 │ │ │ │ +(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&), │ │ │ │ +549 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, │ │ │ │ +double delta = 1e-5) { │ │ │ │ +550 return numericalDerivative53( │ │ │ │ +551 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +552 std::placeholders::_3, std::placeholders::_4, │ │ │ │ +553 std::placeholders::_5), │ │ │ │ +554 x1, x2, x3, x4, x5); │ │ │ │ +555} │ │ │ │ +556 │ │ │ │ +569template::dimension> │ │ │ │ +_5_7_0typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_4( │ │ │ │ +571 std::function h, │ │ │ │ +const X1& x1, │ │ │ │ +572 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e- │ │ │ │ +5) { │ │ │ │ +573 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +574 "Template argument Y must be a manifold type."); │ │ │ │ +575 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +576 "Template argument X1 must be a manifold type."); │ │ │ │ +577 return numericalDerivative11( │ │ │ │ +578 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), │ │ │ │ +579 std::placeholders::_1, std::cref(x5)), │ │ │ │ +580 x4, delta); │ │ │ │ +581} │ │ │ │ +582 │ │ │ │ +583template │ │ │ │ +584inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_4 │ │ │ │ +(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&), │ │ │ │ +585 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, │ │ │ │ +double delta = 1e-5) { │ │ │ │ +586 return numericalDerivative54( │ │ │ │ +587 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +588 std::placeholders::_3, std::placeholders::_4, │ │ │ │ +589 std::placeholders::_5), │ │ │ │ +590 x1, x2, x3, x4, x5); │ │ │ │ +591} │ │ │ │ +592 │ │ │ │ +605template::dimension> │ │ │ │ +_6_0_6typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_5( │ │ │ │ +607 std::function h, │ │ │ │ +const X1& x1, │ │ │ │ +608 const X2& x2, const X3& x3, const X4& x4, const X5& x5, double delta = 1e- │ │ │ │ +5) { │ │ │ │ +609 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +610 "Template argument Y must be a manifold type."); │ │ │ │ +611 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +612 "Template argument X1 must be a manifold type."); │ │ │ │ +613 return numericalDerivative11( │ │ │ │ +614 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), │ │ │ │ +615 std::cref(x4), std::placeholders::_1), │ │ │ │ +616 x5, delta); │ │ │ │ +617} │ │ │ │ +618 │ │ │ │ +619template │ │ │ │ +620inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_5 │ │ │ │ +(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&), │ │ │ │ +621 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, │ │ │ │ +double delta = 1e-5) { │ │ │ │ +622 return numericalDerivative55( │ │ │ │ +623 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +624 std::placeholders::_3, std::placeholders::_4, │ │ │ │ +625 std::placeholders::_5), │ │ │ │ +626 x1, x2, x3, x4, x5); │ │ │ │ +627} │ │ │ │ +628 │ │ │ │ +642template::dimension> │ │ │ │ +_6_4_3typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_1( │ │ │ │ +644 std::function h, const X1& x1, │ │ │ │ +645 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, │ │ │ │ +double delta = 1e-5) { │ │ │ │ +646 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +647 "Template argument Y must be a manifold type."); │ │ │ │ +648 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +649 "Template argument X1 must be a manifold type."); │ │ │ │ +650 return numericalDerivative11( │ │ │ │ +651 std::bind(h, std::placeholders::_1, std::cref(x2), std::cref(x3), │ │ │ │ +652 std::cref(x4), std::cref(x5), std::cref(x6)), │ │ │ │ +653 x1, delta); │ │ │ │ +654} │ │ │ │ +655 │ │ │ │ +656template │ │ │ │ +657inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_1 │ │ │ │ +(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&), │ │ │ │ +658 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const │ │ │ │ +X6& x6, double delta = 1e-5) { │ │ │ │ +659 return numericalDerivative61( │ │ │ │ +660 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +661 std::placeholders::_3, std::placeholders::_4, │ │ │ │ +662 std::placeholders::_5, std::placeholders::_6), │ │ │ │ +663 x1, x2, x3, x4, x5, x6); │ │ │ │ +664} │ │ │ │ +665 │ │ │ │ +679template::dimension> │ │ │ │ +_6_8_0typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_2( │ │ │ │ +681 std::function h, const X1& x1, │ │ │ │ +682 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, │ │ │ │ +double delta = 1e-5) { │ │ │ │ +683 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +684 "Template argument Y must be a manifold type."); │ │ │ │ +685 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +686 "Template argument X1 must be a manifold type."); │ │ │ │ +687 return numericalDerivative11( │ │ │ │ +688 std::bind(h, std::cref(x1), std::placeholders::_1, std::cref(x3), │ │ │ │ +689 std::cref(x4), std::cref(x5), std::cref(x6)), │ │ │ │ +690 x2, delta); │ │ │ │ +691} │ │ │ │ +692 │ │ │ │ +693template │ │ │ │ +694inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_2 │ │ │ │ +(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&), │ │ │ │ +695 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const │ │ │ │ +X6& x6, double delta = 1e-5) { │ │ │ │ +696 return numericalDerivative62( │ │ │ │ +697 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +698 std::placeholders::_3, std::placeholders::_4, │ │ │ │ +699 std::placeholders::_5, std::placeholders::_6), │ │ │ │ +700 x1, x2, x3, x4, x5, x6); │ │ │ │ +701} │ │ │ │ +702 │ │ │ │ +716template::dimension> │ │ │ │ +_7_1_7typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_3( │ │ │ │ +718 std::function h, const X1& x1, │ │ │ │ +719 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, │ │ │ │ +double delta = 1e-5) { │ │ │ │ +720 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +721 "Template argument Y must be a manifold type."); │ │ │ │ +722 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +723 "Template argument X1 must be a manifold type."); │ │ │ │ +724 return numericalDerivative11( │ │ │ │ +725 std::bind(h, std::cref(x1), std::cref(x2), std::placeholders::_1, │ │ │ │ +726 std::cref(x4), std::cref(x5), std::cref(x6)), │ │ │ │ +727 x3, delta); │ │ │ │ +728} │ │ │ │ +729 │ │ │ │ +730template │ │ │ │ +731inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_3 │ │ │ │ +(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&), │ │ │ │ +732 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const │ │ │ │ +X6& x6, double delta = 1e-5) { │ │ │ │ +733 return numericalDerivative63( │ │ │ │ +734 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +735 std::placeholders::_3, std::placeholders::_4, │ │ │ │ +736 std::placeholders::_5, std::placeholders::_6), │ │ │ │ +737 x1, x2, x3, x4, x5, x6); │ │ │ │ +738} │ │ │ │ +739 │ │ │ │ +753template::dimension> │ │ │ │ +_7_5_4typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_4( │ │ │ │ +755 std::function h, const X1& x1, │ │ │ │ +756 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, │ │ │ │ +double delta = 1e-5) { │ │ │ │ +757 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +758 "Template argument Y must be a manifold type."); │ │ │ │ +759 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +760 "Template argument X1 must be a manifold type."); │ │ │ │ +761 return numericalDerivative11( │ │ │ │ +762 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), │ │ │ │ +763 std::placeholders::_1, std::cref(x5), std::cref(x6)), │ │ │ │ +764 x4, delta); │ │ │ │ +765} │ │ │ │ +766 │ │ │ │ +767template │ │ │ │ +768inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_4 │ │ │ │ +(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&), │ │ │ │ +769 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const │ │ │ │ +X6& x6, double delta = 1e-5) { │ │ │ │ +770 return numericalDerivative64( │ │ │ │ +771 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +772 std::placeholders::_3, std::placeholders::_4, │ │ │ │ +773 std::placeholders::_5, std::placeholders::_6), │ │ │ │ +774 x1, x2, x3, x4, x5, x6); │ │ │ │ +775} │ │ │ │ +776 │ │ │ │ +790template::dimension> │ │ │ │ +_7_9_1typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_5( │ │ │ │ +792 std::function h, const X1& x1, │ │ │ │ +793 const X2& x2, const X3& x3, const X4& x4, const X5& x5, const X6& x6, │ │ │ │ +double delta = 1e-5) { │ │ │ │ +794 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +795 "Template argument Y must be a manifold type."); │ │ │ │ +796 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +797 "Template argument X1 must be a manifold type."); │ │ │ │ +798 return numericalDerivative11( │ │ │ │ +799 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), │ │ │ │ +800 std::cref(x4), std::placeholders::_1, std::cref(x6)), │ │ │ │ +801 x5, delta); │ │ │ │ +802} │ │ │ │ +803 │ │ │ │ +804template │ │ │ │ +805inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_5 │ │ │ │ +(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&), │ │ │ │ +806 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const │ │ │ │ +X6& x6, double delta = 1e-5) { │ │ │ │ +807 return numericalDerivative65( │ │ │ │ +808 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +809 std::placeholders::_3, std::placeholders::_4, │ │ │ │ +810 std::placeholders::_5, std::placeholders::_6), │ │ │ │ +811 x1, x2, x3, x4, x5, x6); │ │ │ │ +812} │ │ │ │ +813 │ │ │ │ +827template::dimension> │ │ │ │ +_8_2_8typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_6( │ │ │ │ +829 std::function h, │ │ │ │ +830 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const │ │ │ │ +X6& x6, │ │ │ │ +831 double delta = 1e-5) { │ │ │ │ +832 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_Y_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +833 "Template argument Y must be a manifold type."); │ │ │ │ +834 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_1_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +835 "Template argument X1 must be a manifold type."); │ │ │ │ +836 return numericalDerivative11( │ │ │ │ +837 std::bind(h, std::cref(x1), std::cref(x2), std::cref(x3), │ │ │ │ +838 std::cref(x4), std::cref(x5), std::placeholders::_1), │ │ │ │ +839 x6, delta); │ │ │ │ +840} │ │ │ │ +841 │ │ │ │ +842template │ │ │ │ +843inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_6 │ │ │ │ +(Y (*h)(const X1&, const X2&, const X3&, const X4&, const X5&, const X6&), │ │ │ │ +844 const X1& x1, const X2& x2, const X3& x3, const X4& x4, const X5& x5, const │ │ │ │ +X6& x6, double delta = 1e-5) { │ │ │ │ +845 return numericalDerivative66( │ │ │ │ +846 std::bind(h, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +847 std::placeholders::_3, std::placeholders::_4, │ │ │ │ +848 std::placeholders::_5, std::placeholders::_6), │ │ │ │ +849 x1, x2, x3, x4, x5, x6); │ │ │ │ +850} │ │ │ │ +851 │ │ │ │ +860template │ │ │ │ +_8_6_1inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n(std:: │ │ │ │ +function f, const X& x, │ │ │ │ +862 double delta = 1e-5) { │ │ │ │ +863 BOOST_STATIC_ASSERT_MSG( (boost::is_base_of<_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g, typename │ │ │ │ +_t_r_a_i_t_s_<_X_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y>::value), │ │ │ │ +864 "Template argument X must be a manifold type."); │ │ │ │ +865 typedef Eigen::Matrix::dimension, 1> VectorD; │ │ │ │ +866 typedef std::function F; │ │ │ │ +867 typedef std::function G; │ │ │ │ +868 G ng = static_cast(numericalGradient ); │ │ │ │ +869 return numericalDerivative11( │ │ │ │ +870 std::bind(ng, f, std::placeholders::_1, delta), x, delta); │ │ │ │ +871} │ │ │ │ +872 │ │ │ │ +873template │ │ │ │ +874inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n(double │ │ │ │ +(*f)(const X&), const X& x, double delta = │ │ │ │ +875 1e-5) { │ │ │ │ +876 return _n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n(std::function(f), x, delta); │ │ │ │ +877} │ │ │ │ +878 │ │ │ │ +882template │ │ │ │ +_8_8_3class _G___x_1 { │ │ │ │ +884 const std::function& f_; │ │ │ │ +885 X1 x1_; │ │ │ │ +886 double delta_; │ │ │ │ +887public: │ │ │ │ +888 typedef typename internal::FixedSizeMatrix::type Vector; │ │ │ │ +889 │ │ │ │ +890 _G___x_1(const std::function& f, const X1& x1, │ │ │ │ +891 double delta) : │ │ │ │ +892 f_(f), x1_(x1), delta_(delta) { │ │ │ │ +893 } │ │ │ │ +894 Vector operator()(const X2& x2) { │ │ │ │ +895 return numericalGradient( │ │ │ │ +896 std::bind(f_, std::placeholders::_1, std::cref(x2)), x1_, delta_); │ │ │ │ +897 } │ │ │ │ +898}; │ │ │ │ +899 │ │ │ │ +900template │ │ │ │ +901inline typename internal::FixedSizeMatrix::type numericalHessian212( │ │ │ │ +902 std::function f, const X1& x1, const X2& x2, │ │ │ │ +903 double delta = 1e-5) { │ │ │ │ +904 typedef typename internal::FixedSizeMatrix::type Vector; │ │ │ │ +905 _G___x_1_<_X_1_,_ _X_2_> g_x1(f, x1, delta); │ │ │ │ +906 return numericalDerivative11( │ │ │ │ +907 std::function( │ │ │ │ +908 std::bind(std::ref(g_x1), std::placeholders::_1)), │ │ │ │ +909 x2, delta); │ │ │ │ +910} │ │ │ │ +911 │ │ │ │ +912template │ │ │ │ +913inline typename internal::FixedSizeMatrix::type numericalHessian212 │ │ │ │ +(double (*f)(const X1&, const X2&), │ │ │ │ +914 const X1& x1, const X2& x2, double delta = 1e-5) { │ │ │ │ +915 return numericalHessian212(std::function(f), │ │ │ │ +916 x1, x2, delta); │ │ │ │ +917} │ │ │ │ +918 │ │ │ │ +919template │ │ │ │ +920inline typename internal::FixedSizeMatrix::type numericalHessian211( │ │ │ │ +921 std::function f, const X1& x1, const X2& x2, │ │ │ │ +922 double delta = 1e-5) { │ │ │ │ +923 │ │ │ │ +924 typedef typename internal::FixedSizeMatrix::type Vector; │ │ │ │ +925 │ │ │ │ +926 Vector (*numGrad)(std::function, const X1&, │ │ │ │ +927 double) = &numericalGradient; │ │ │ │ +928 std::function f2( │ │ │ │ +929 std::bind(f, std::placeholders::_1, std::cref(x2))); │ │ │ │ +930 │ │ │ │ +931 return numericalDerivative11( │ │ │ │ +932 std::function( │ │ │ │ +933 std::bind(numGrad, f2, std::placeholders::_1, delta)), │ │ │ │ +934 x1, delta); │ │ │ │ +935} │ │ │ │ +936 │ │ │ │ +937template │ │ │ │ +938inline typename internal::FixedSizeMatrix::type numericalHessian211 │ │ │ │ +(double (*f)(const X1&, const X2&), │ │ │ │ +939 const X1& x1, const X2& x2, double delta = 1e-5) { │ │ │ │ +940 return numericalHessian211(std::function(f), │ │ │ │ +941 x1, x2, delta); │ │ │ │ +942} │ │ │ │ +943 │ │ │ │ +944template │ │ │ │ +945inline typename internal::FixedSizeMatrix::type numericalHessian222( │ │ │ │ +946 std::function f, const X1& x1, const X2& x2, │ │ │ │ +947 double delta = 1e-5) { │ │ │ │ +948 typedef typename internal::FixedSizeMatrix::type Vector; │ │ │ │ +949 Vector (*numGrad)(std::function, const X2&, │ │ │ │ +950 double) = &numericalGradient; │ │ │ │ +951 std::function f2( │ │ │ │ +952 std::bind(f, std::cref(x1), std::placeholders::_1)); │ │ │ │ +953 │ │ │ │ +954 return numericalDerivative11( │ │ │ │ +955 std::function( │ │ │ │ +956 std::bind(numGrad, f2, std::placeholders::_1, delta)), │ │ │ │ +957 x2, delta); │ │ │ │ +958} │ │ │ │ +959 │ │ │ │ +960template │ │ │ │ +961inline typename internal::FixedSizeMatrix::type numericalHessian222 │ │ │ │ +(double (*f)(const X1&, const X2&), │ │ │ │ +962 const X1& x1, const X2& x2, double delta = 1e-5) { │ │ │ │ +963 return numericalHessian222(std::function(f), │ │ │ │ +964 x1, x2, delta); │ │ │ │ +965} │ │ │ │ +966 │ │ │ │ +970/* **************************************************************** */ │ │ │ │ +971template │ │ │ │ +_9_7_2inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n_3_1_1( │ │ │ │ +973 std::function f, const X1& x1, │ │ │ │ +974 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +975 typedef typename internal::FixedSizeMatrix::type Vector; │ │ │ │ +976 Vector (*numGrad)(std::function, const X1&, │ │ │ │ +977 double) = &numericalGradient; │ │ │ │ +978 std::function f2(std::bind( │ │ │ │ +979 f, std::placeholders::_1, std::cref(x2), std::cref(x3))); │ │ │ │ +980 │ │ │ │ +981 return numericalDerivative11( │ │ │ │ +982 std::function( │ │ │ │ +983 std::bind(numGrad, f2, std::placeholders::_1, delta)), │ │ │ │ +984 x1, delta); │ │ │ │ +985} │ │ │ │ +986 │ │ │ │ +987template │ │ │ │ +988inline typename internal::FixedSizeMatrix::type _n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n_3_1_1 │ │ │ │ +(double (*f)(const X1&, const X2&, const X3&), │ │ │ │ +989 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +990 return _n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n_3_1_1( │ │ │ │ +991 std::function(f), x1, x2, x3, │ │ │ │ +992 delta); │ │ │ │ +993} │ │ │ │ +994 │ │ │ │ +995/* **************************************************************** */ │ │ │ │ +996template │ │ │ │ +997inline typename internal::FixedSizeMatrix::type numericalHessian322( │ │ │ │ +998 std::function f, const X1& x1, │ │ │ │ +999 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +1000 typedef typename internal::FixedSizeMatrix::type Vector; │ │ │ │ +1001 Vector (*numGrad)(std::function, const X2&, │ │ │ │ +1002 double) = &numericalGradient; │ │ │ │ +1003 std::function f2(std::bind( │ │ │ │ +1004 f, std::cref(x1), std::placeholders::_1, std::cref(x3))); │ │ │ │ +1005 │ │ │ │ +1006 return numericalDerivative11( │ │ │ │ +1007 std::function( │ │ │ │ +1008 std::bind(numGrad, f2, std::placeholders::_1, delta)), │ │ │ │ +1009 x2, delta); │ │ │ │ +1010} │ │ │ │ +1011 │ │ │ │ +1012template │ │ │ │ +1013inline typename internal::FixedSizeMatrix::type numericalHessian322 │ │ │ │ +(double (*f)(const X1&, const X2&, const X3&), │ │ │ │ +1014 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +1015 return numericalHessian322( │ │ │ │ +1016 std::function(f), x1, x2, x3, │ │ │ │ +1017 delta); │ │ │ │ +1018} │ │ │ │ +1019 │ │ │ │ +1020/* **************************************************************** */ │ │ │ │ +1021template │ │ │ │ +1022inline typename internal::FixedSizeMatrix::type numericalHessian333( │ │ │ │ +1023 std::function f, const X1& x1, │ │ │ │ +1024 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +1025 typedef typename internal::FixedSizeMatrix::type Vector; │ │ │ │ +1026 Vector (*numGrad)(std::function, const X3&, │ │ │ │ +1027 double) = &numericalGradient; │ │ │ │ +1028 std::function f2(std::bind( │ │ │ │ +1029 f, std::cref(x1), std::cref(x2), std::placeholders::_1)); │ │ │ │ +1030 │ │ │ │ +1031 return numericalDerivative11( │ │ │ │ +1032 std::function( │ │ │ │ +1033 std::bind(numGrad, f2, std::placeholders::_1, delta)), │ │ │ │ +1034 x3, delta); │ │ │ │ +1035} │ │ │ │ +1036 │ │ │ │ +1037template │ │ │ │ +1038inline typename internal::FixedSizeMatrix::type numericalHessian333 │ │ │ │ +(double (*f)(const X1&, const X2&, const X3&), │ │ │ │ +1039 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +1040 return numericalHessian333( │ │ │ │ +1041 std::function(f), x1, x2, x3, │ │ │ │ +1042 delta); │ │ │ │ +1043} │ │ │ │ +1044 │ │ │ │ +1045/* **************************************************************** */ │ │ │ │ +1046template │ │ │ │ +1047inline typename internal::FixedSizeMatrix::type numericalHessian312( │ │ │ │ +1048 std::function f, const X1& x1, │ │ │ │ +1049 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +1050 return numericalHessian212( │ │ │ │ +1051 std::function( │ │ │ │ +1052 std::bind(f, std::placeholders::_1, std::placeholders::_2, │ │ │ │ +1053 std::cref(x3))), │ │ │ │ +1054 x1, x2, delta); │ │ │ │ +1055} │ │ │ │ +1056 │ │ │ │ +1057template │ │ │ │ +1058inline typename internal::FixedSizeMatrix::type numericalHessian313( │ │ │ │ +1059 std::function f, const X1& x1, │ │ │ │ +1060 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +1061 return numericalHessian212( │ │ │ │ +1062 std::function( │ │ │ │ +1063 std::bind(f, std::placeholders::_1, std::cref(x2), │ │ │ │ +1064 std::placeholders::_2)), │ │ │ │ +1065 x1, x3, delta); │ │ │ │ +1066} │ │ │ │ +1067 │ │ │ │ +1068template │ │ │ │ +1069inline typename internal::FixedSizeMatrix::type numericalHessian323( │ │ │ │ +1070 std::function f, const X1& x1, │ │ │ │ +1071 const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +1072 return numericalHessian212( │ │ │ │ +1073 std::function( │ │ │ │ +1074 std::bind(f, std::cref(x1), std::placeholders::_1, │ │ │ │ +1075 std::placeholders::_2)), │ │ │ │ +1076 x2, x3, delta); │ │ │ │ +1077} │ │ │ │ +1078 │ │ │ │ +1079/* **************************************************************** */ │ │ │ │ +1080template │ │ │ │ +1081inline typename internal::FixedSizeMatrix::type numericalHessian312 │ │ │ │ +(double (*f)(const X1&, const X2&, const X3&), │ │ │ │ +1082 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +1083 return numericalHessian312( │ │ │ │ +1084 std::function(f), x1, x2, x3, │ │ │ │ +1085 delta); │ │ │ │ +1086} │ │ │ │ +1087 │ │ │ │ +1088template │ │ │ │ +1089inline typename internal::FixedSizeMatrix::type numericalHessian313 │ │ │ │ +(double (*f)(const X1&, const X2&, const X3&), │ │ │ │ +1090 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +1091 return numericalHessian313( │ │ │ │ +1092 std::function(f), x1, x2, x3, │ │ │ │ +1093 delta); │ │ │ │ +1094} │ │ │ │ +1095 │ │ │ │ +1096template │ │ │ │ +1097inline typename internal::FixedSizeMatrix::type numericalHessian323 │ │ │ │ +(double (*f)(const X1&, const X2&, const X3&), │ │ │ │ +1098 const X1& x1, const X2& x2, const X3& x3, double delta = 1e-5) { │ │ │ │ +1099 return numericalHessian323( │ │ │ │ +1100 std::function(f), x1, x2, x3, │ │ │ │ +1101 delta); │ │ │ │ +1102} │ │ │ │ +1103 │ │ │ │ +1104} // namespace gtsam │ │ │ │ +1105 │ │ │ │ +_L_i_e_._h │ │ │ │ +Base class and basic functions for Lie types. │ │ │ │ +_V_e_c_t_o_r_V_a_l_u_e_s_._h │ │ │ │ +Factor Graph Values. │ │ │ │ +_J_a_c_o_b_i_a_n_F_a_c_t_o_r_._h │ │ │ │ +_V_a_l_u_e_s_._h │ │ │ │ +A non-templated config holding any types of Manifold-group elements. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_e_n_a_b_l_e___i_f___t │ │ │ │ -typename std::enable_if< B, T >::type enable_if_t │ │ │ │ -An shorthand alias for accessing the ::type inside std::enable_if that can be │ │ │ │ -used in a template dire... │ │ │ │ -DDeeffiinniittiioonn make_shared.h:31 │ │ │ │ -_g_t_s_a_m_:_:_m_a_k_e___s_h_a_r_e_d │ │ │ │ -gtsam::enable_if_t< needs_eigen_aligned_allocator< T >::value, boost:: │ │ │ │ -shared_ptr< T > > make_shared(Args &&... args) │ │ │ │ -Add our own make_shared as a layer of wrapping on boost::make_shared This │ │ │ │ -solves the problem with the... │ │ │ │ -DDeeffiinniittiioonn make_shared.h:57 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_1 │ │ │ │ +internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative61(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, │ │ │ │ +const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 │ │ │ │ +&x6, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 1 of 6-argument function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:643 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n_3_1_1 │ │ │ │ +internal::FixedSizeMatrix< X1, X1 >::type numericalHessian311(std::function< │ │ │ │ +double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, │ │ │ │ +const X3 &x3, double delta=1e-5) │ │ │ │ +Numerical Hessian for tenary functions. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:972 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_H_e_s_s_i_a_n │ │ │ │ +internal::FixedSizeMatrix< X, X >::type numericalHessian(std::function< double │ │ │ │ +(const X &)> f, const X &x, double delta=1e-5) │ │ │ │ +Compute numerical Hessian matrix. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:861 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_2_1 │ │ │ │ +internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative21(const std:: │ │ │ │ +function< Y(const X1 &, const X2 &)> &h, const X1 &x1, const X2 &x2, double │ │ │ │ +delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 1 of binary function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:166 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_3 │ │ │ │ +internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative63(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, │ │ │ │ +const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 │ │ │ │ +&x6, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 3 of 6-argument function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:717 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_1 │ │ │ │ +internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative51(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, │ │ │ │ +const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 1 of 5-argument function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:462 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_4 │ │ │ │ +internal::FixedSizeMatrix< Y, X4 >::type numericalDerivative54(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, │ │ │ │ +const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 4 of 5-argument function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:570 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_1 │ │ │ │ +internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative41(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 │ │ │ │ +&x2, const X3 &x3, const X4 &x4, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 1 of 4-argument function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:325 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_4 │ │ │ │ +internal::FixedSizeMatrix< Y, X4 >::type numericalDerivative64(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, │ │ │ │ +const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 │ │ │ │ +&x6, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 4 of 6-argument function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:754 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_6 │ │ │ │ +internal::FixedSizeMatrix< Y, X6 >::type numericalDerivative66(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, │ │ │ │ +const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 │ │ │ │ +&x6, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 6 of 6-argument function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:828 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_3 │ │ │ │ +internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative33(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 │ │ │ │ +&x3, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 3 of ternary function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:292 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_1_1 │ │ │ │ +internal::FixedSizeMatrix< Y, X >::type numericalDerivative11(std::function< Y │ │ │ │ +(const X &)> h, const X &x, double delta=1e-5) │ │ │ │ +New-style numerical derivatives using manifold_traits. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:110 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_2_2 │ │ │ │ +internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative22(std::function< Y │ │ │ │ +(const X1 &, const X2 &)> h, const X1 &x1, const X2 &x2, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 2 of binary function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:195 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_5 │ │ │ │ +internal::FixedSizeMatrix< Y, X5 >::type numericalDerivative55(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, │ │ │ │ +const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 5 of 5-argument function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:606 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_3 │ │ │ │ +internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative43(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 │ │ │ │ +&x2, const X3 &x3, const X4 &x4, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 3 of 4-argument function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:393 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_2 │ │ │ │ +internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative52(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, │ │ │ │ +const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 2 of 5-argument function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:498 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_5 │ │ │ │ +internal::FixedSizeMatrix< Y, X5 >::type numericalDerivative65(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, │ │ │ │ +const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 │ │ │ │ +&x6, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 5 of 6-argument function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:791 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_4 │ │ │ │ +internal::FixedSizeMatrix< Y, X4 >::type numericalDerivative44(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 │ │ │ │ +&x2, const X3 &x3, const X4 &x4, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 4 of 4-argument function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:427 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_1 │ │ │ │ +internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative31(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 │ │ │ │ +&x3, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 1 of ternary function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:226 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_6_2 │ │ │ │ +internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative62(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, │ │ │ │ +const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 │ │ │ │ +&x6, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 2 of 6-argument function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:680 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_5_3 │ │ │ │ +internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative53(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, │ │ │ │ +const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 3 of 5-argument function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:534 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_3_2 │ │ │ │ +internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative32(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 │ │ │ │ +&x3, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 2 of ternary function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:259 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_4_2 │ │ │ │ +internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative42(std::function< Y │ │ │ │ +(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 │ │ │ │ +&x2, const X3 &x3, const X4 &x4, double delta=1e-5) │ │ │ │ +Compute numerical derivative in argument 2 of 4-argument function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:359 │ │ │ │ +_g_t_s_a_m_:_:_n_u_m_e_r_i_c_a_l_G_r_a_d_i_e_n_t │ │ │ │ +Eigen::Matrix< double, N, 1 > numericalGradient(std::function< double(const X │ │ │ │ +&)> h, const X &x, double delta=1e-5) │ │ │ │ +Numerically compute gradient of scalar function. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:70 │ │ │ │ +_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ +A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ +that can be centered ... │ │ │ │ +DDeeffiinniittiioonn concepts.h:30 │ │ │ │ +_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g │ │ │ │ +tag to assert a type is a manifold │ │ │ │ +DDeeffiinniittiioonn Manifold.h:33 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_F_i_x_e_d_S_i_z_e_M_a_t_r_i_x │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:56 │ │ │ │ +_g_t_s_a_m_:_:_G___x_1 │ │ │ │ +Helper class that computes the derivative of f w.r.t. │ │ │ │ +DDeeffiinniittiioonn numericalDerivative.h:883 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _m_a_k_e___s_h_a_r_e_d_._h │ │ │ │ + * _n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00038.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/lieProxies.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/VectorSerialization.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,64 +94,51 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ Functions
│ │ │ -
lieProxies.h File Reference
│ │ │ +
VectorSerialization.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Provides convenient mappings of common member functions for testing. │ │ │ +

serialization for Vectors │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

│ │ │ -template<class T >
gtsam::testing::between (const T &t1, const T &t2)
 binary functions
 
│ │ │ -template<class T >
gtsam::testing::compose (const T &t1, const T &t2)
 
│ │ │ -template<class T >
gtsam::testing::inverse (const T &t)
 unary functions
 
│ │ │ -template<class T , class P >
gtsam::testing::rotate (const T &r, const P &pt)
 rotation functions
 
│ │ │ -template<class T , class P >
gtsam::testing::unrotate (const T &r, const P &pt)
 
│ │ │ +template<class Archive >
void boost::serialization::save (Archive &ar, const gtsam::Vector &v, unsigned int)
 
│ │ │ +template<class Archive >
void boost::serialization::load (Archive &ar, gtsam::Vector &v, unsigned int)
 
│ │ │ +template<class Archive , int D>
void boost::serialization::save (Archive &ar, const Eigen::Matrix< double, D, 1 > &v, unsigned int)
 
│ │ │ +template<class Archive , int D>
void boost::serialization::load (Archive &ar, Eigen::Matrix< double, D, 1 > &v, unsigned int)
 
│ │ │

Detailed Description

│ │ │ -

Provides convenient mappings of common member functions for testing.

│ │ │ -
Author
Alex Cunningham
│ │ │ +

serialization for Vectors

│ │ │ +
Author
Frank Dellaert
│ │ │ +
Date
February 2022
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,40 +1,35 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -lieProxies.h File Reference │ │ │ │ -Provides convenient mappings of common member functions for testing. _M_o_r_e_._._. │ │ │ │ +_F_u_n_c_t_i_o_n_s │ │ │ │ +VectorSerialization.h File Reference │ │ │ │ +serialization for Vectors _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -NNaammeessppaacceess │ │ │ │ -namespace   _g_t_s_a_m │ │ │ │ -  Global functions in a separate testing namespace. │ │ │ │ -  │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -T  ggttssaamm::::tteessttiinngg::::bbeettwweeeenn (const T &t1, const T &t2) │ │ │ │ -  binary functions │ │ │ │ -  │ │ │ │ -template │ │ │ │ -T  ggttssaamm::::tteessttiinngg::::ccoommppoossee (const T &t1, const T &t2) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -T  ggttssaamm::::tteessttiinngg::::iinnvveerrssee (const T &t) │ │ │ │ -  unary functions │ │ │ │ -  │ │ │ │ -template │ │ │ │ -P  ggttssaamm::::tteessttiinngg::::rroottaattee (const T &r, const P &pt) │ │ │ │ -  rotation functions │ │ │ │ -  │ │ │ │ -template │ │ │ │ -P  ggttssaamm::::tteessttiinngg::::uunnrroottaattee (const T &r, const P &pt) │ │ │ │ +template │ │ │ │ +void  bboooosstt::::sseerriiaalliizzaattiioonn::::ssaavvee (Archive &ar, const gtsam::Vector &v, unsigned │ │ │ │ + int) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +void  bboooosstt::::sseerriiaalliizzaattiioonn::::llooaadd (Archive &ar, gtsam::Vector &v, unsigned int) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +void  bboooosstt::::sseerriiaalliizzaattiioonn::::ssaavvee (Archive &ar, const Eigen::Matrix< double, D, │ │ │ │ + 1 > &v, unsigned int) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +void  bboooosstt::::sseerriiaalliizzaattiioonn::::llooaadd (Archive &ar, Eigen::Matrix< double, D, 1 > │ │ │ │ + &v, unsigned int) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Provides convenient mappings of common member functions for testing. │ │ │ │ +serialization for Vectors │ │ │ │ Author │ │ │ │ - Alex Cunningham │ │ │ │ + Frank Dellaert │ │ │ │ + Date │ │ │ │ + February 2022 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _l_i_e_P_r_o_x_i_e_s_._h │ │ │ │ + * _V_e_c_t_o_r_S_e_r_i_a_l_i_z_a_t_i_o_n_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00038_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/lieProxies.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/VectorSerialization.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,63 +98,81 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
lieProxies.h
│ │ │ +
VectorSerialization.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
18#pragma once
│ │ │ -
19
│ │ │ - │ │ │ -
21
│ │ │ -
31namespace gtsam {
│ │ │ -
32namespace testing {
│ │ │ -
33
│ │ │ -
35 template<class T>
│ │ │ -
36 T between(const T& t1, const T& t2) { return t1.between(t2); }
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ +
21#include <gtsam/base/Vector.h>
│ │ │ +
22
│ │ │ +
23#include <boost/serialization/array.hpp>
│ │ │ +
24#include <boost/serialization/nvp.hpp>
│ │ │ +
25#include <boost/serialization/split_free.hpp>
│ │ │ +
26
│ │ │ +
27namespace boost {
│ │ │ +
28namespace serialization {
│ │ │ +
29
│ │ │ +
30// split version - copies into an STL vector for serialization
│ │ │ +
31template <class Archive>
│ │ │ +
32void save(Archive& ar, const gtsam::Vector& v, unsigned int /*version*/) {
│ │ │ +
33 const size_t size = v.size();
│ │ │ +
34 ar << BOOST_SERIALIZATION_NVP(size);
│ │ │ +
35 ar << make_nvp("data", make_array(v.data(), v.size()));
│ │ │ +
36}
│ │ │
37
│ │ │ -
38 template<class T>
│ │ │ -
39 T compose(const T& t1, const T& t2) { return t1.compose(t2); }
│ │ │ -
40
│ │ │ -
42 template<class T>
│ │ │ -
43 T inverse(const T& t) { return t.inverse(); }
│ │ │ -
44
│ │ │ -
46 template<class T, class P>
│ │ │ -
47 P rotate(const T& r, const P& pt) { return r.rotate(pt); }
│ │ │ -
48
│ │ │ -
49 template<class T, class P>
│ │ │ -
50 P unrotate(const T& r, const P& pt) { return r.unrotate(pt); }
│ │ │ -
51
│ │ │ -
52} // \namespace testing
│ │ │ -
53} // \namespace gtsam
│ │ │ -
54
│ │ │ -
55
│ │ │ -
P rotate(const T &r, const P &pt)
rotation functions
Definition lieProxies.h:47
│ │ │ -
T between(const T &t1, const T &t2)
binary functions
Definition lieProxies.h:36
│ │ │ -
T inverse(const T &t)
unary functions
Definition lieProxies.h:43
│ │ │ -
Included from all GTSAM files.
│ │ │ -
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ +
38template <class Archive>
│ │ │ +
39void load(Archive& ar, gtsam::Vector& v, unsigned int /*version*/) {
│ │ │ +
40 size_t size;
│ │ │ +
41 ar >> BOOST_SERIALIZATION_NVP(size);
│ │ │ +
42 v.resize(size);
│ │ │ +
43 ar >> make_nvp("data", make_array(v.data(), v.size()));
│ │ │ +
44}
│ │ │ +
45
│ │ │ +
46// split version - copies into an STL vector for serialization
│ │ │ +
47template <class Archive, int D>
│ │ │ +
48void save(Archive& ar, const Eigen::Matrix<double, D, 1>& v,
│ │ │ +
49 unsigned int /*version*/) {
│ │ │ +
50 ar << make_nvp("data", make_array(v.data(), v.RowsAtCompileTime));
│ │ │ +
51}
│ │ │ +
52
│ │ │ +
53template <class Archive, int D>
│ │ │ +
54void load(Archive& ar, Eigen::Matrix<double, D, 1>& v,
│ │ │ +
55 unsigned int /*version*/) {
│ │ │ +
56 ar >> make_nvp("data", make_array(v.data(), v.RowsAtCompileTime));
│ │ │ +
57}
│ │ │ +
58
│ │ │ +
59} // namespace serialization
│ │ │ +
60} // namespace boost
│ │ │ +
61
│ │ │ +
62BOOST_SERIALIZATION_SPLIT_FREE(gtsam::Vector)
│ │ │ +
63BOOST_SERIALIZATION_SPLIT_FREE(gtsam::Vector2)
│ │ │ +
64BOOST_SERIALIZATION_SPLIT_FREE(gtsam::Vector3)
│ │ │ +
65BOOST_SERIALIZATION_SPLIT_FREE(gtsam::Vector6)
│ │ │ +
typedef and functions to augment Eigen's VectorXd
│ │ │ +
void save(const Matrix &A, const string &s, const string &filename)
save a matrix to file, which can be loaded by matlab
Definition Matrix.cpp:167
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,67 +1,77 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -lieProxies.h │ │ │ │ +VectorSerialization.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -18#pragma once │ │ │ │ -19 │ │ │ │ -20#include <_g_t_s_a_m_/_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h> │ │ │ │ -21 │ │ │ │ -31namespace _g_t_s_a_m { │ │ │ │ -32namespace testing { │ │ │ │ -33 │ │ │ │ -35 template │ │ │ │ -_3_6 T _b_e_t_w_e_e_n(const T& t1, const T& t2) { return t1.between(t2); } │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +21#include <_g_t_s_a_m_/_b_a_s_e_/_V_e_c_t_o_r_._h> │ │ │ │ +22 │ │ │ │ +23#include │ │ │ │ +24#include │ │ │ │ +25#include │ │ │ │ +26 │ │ │ │ +27namespace boost { │ │ │ │ +28namespace serialization { │ │ │ │ +29 │ │ │ │ +30// split version - copies into an STL vector for serialization │ │ │ │ +31template │ │ │ │ +32void _s_a_v_e(Archive& ar, const gtsam::Vector& v, unsigned int /*version*/) { │ │ │ │ +33 const size_t size = v.size(); │ │ │ │ +34 ar << BOOST_SERIALIZATION_NVP(size); │ │ │ │ +35 ar << make_nvp("data", make_array(v.data(), v.size())); │ │ │ │ +36} │ │ │ │ 37 │ │ │ │ -38 template │ │ │ │ -39 T compose(const T& t1, const T& t2) { return t1.compose(t2); } │ │ │ │ -40 │ │ │ │ -42 template │ │ │ │ -_4_3 T _i_n_v_e_r_s_e(const T& t) { return t.inverse(); } │ │ │ │ -44 │ │ │ │ -46 template │ │ │ │ -_4_7 P _r_o_t_a_t_e(const T& r, const P& pt) { return r.rotate(pt); } │ │ │ │ -48 │ │ │ │ -49 template │ │ │ │ -50 P unrotate(const T& r, const P& pt) { return r.unrotate(pt); } │ │ │ │ -51 │ │ │ │ -52} // \namespace testing │ │ │ │ -53} // \namespace gtsam │ │ │ │ -54 │ │ │ │ -55 │ │ │ │ -_g_t_s_a_m_:_:_t_e_s_t_i_n_g_:_:_r_o_t_a_t_e │ │ │ │ -P rotate(const T &r, const P &pt) │ │ │ │ -rotation functions │ │ │ │ -DDeeffiinniittiioonn lieProxies.h:47 │ │ │ │ -_g_t_s_a_m_:_:_t_e_s_t_i_n_g_:_:_b_e_t_w_e_e_n │ │ │ │ -T between(const T &t1, const T &t2) │ │ │ │ -binary functions │ │ │ │ -DDeeffiinniittiioonn lieProxies.h:36 │ │ │ │ -_g_t_s_a_m_:_:_t_e_s_t_i_n_g_:_:_i_n_v_e_r_s_e │ │ │ │ -T inverse(const T &t) │ │ │ │ -unary functions │ │ │ │ -DDeeffiinniittiioonn lieProxies.h:43 │ │ │ │ -_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h │ │ │ │ -Included from all GTSAM files. │ │ │ │ -_g_t_s_a_m │ │ │ │ -Global functions in a separate testing namespace. │ │ │ │ -DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ +38template │ │ │ │ +39void load(Archive& ar, gtsam::Vector& v, unsigned int /*version*/) { │ │ │ │ +40 size_t size; │ │ │ │ +41 ar >> BOOST_SERIALIZATION_NVP(size); │ │ │ │ +42 v.resize(size); │ │ │ │ +43 ar >> make_nvp("data", make_array(v.data(), v.size())); │ │ │ │ +44} │ │ │ │ +45 │ │ │ │ +46// split version - copies into an STL vector for serialization │ │ │ │ +47template │ │ │ │ +48void _s_a_v_e(Archive& ar, const Eigen::Matrix& v, │ │ │ │ +49 unsigned int /*version*/) { │ │ │ │ +50 ar << make_nvp("data", make_array(v.data(), v.RowsAtCompileTime)); │ │ │ │ +51} │ │ │ │ +52 │ │ │ │ +53template │ │ │ │ +54void load(Archive& ar, Eigen::Matrix& v, │ │ │ │ +55 unsigned int /*version*/) { │ │ │ │ +56 ar >> make_nvp("data", make_array(v.data(), v.RowsAtCompileTime)); │ │ │ │ +57} │ │ │ │ +58 │ │ │ │ +59} // namespace serialization │ │ │ │ +60} // namespace boost │ │ │ │ +61 │ │ │ │ +62BOOST_SERIALIZATION_SPLIT_FREE(gtsam::Vector) │ │ │ │ +63BOOST_SERIALIZATION_SPLIT_FREE(gtsam::Vector2) │ │ │ │ +64BOOST_SERIALIZATION_SPLIT_FREE(gtsam::Vector3) │ │ │ │ +65BOOST_SERIALIZATION_SPLIT_FREE(gtsam::Vector6) │ │ │ │ +_V_e_c_t_o_r_._h │ │ │ │ +typedef and functions to augment Eigen's VectorXd │ │ │ │ +_g_t_s_a_m_:_:_s_a_v_e │ │ │ │ +void save(const Matrix &A, const string &s, const string &filename) │ │ │ │ +save a matrix to file, which can be loaded by matlab │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:167 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _l_i_e_P_r_o_x_i_e_s_._h │ │ │ │ + * _V_e_c_t_o_r_S_e_r_i_a_l_i_z_a_t_i_o_n_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00041.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/debug.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/FastList.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,61 +94,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Macros | │ │ │ -Functions
│ │ │ -
debug.h File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
FastList.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Global debugging flags. │ │ │ +

A thin wrapper around std::list that uses boost's fast_pool_allocator. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

class  gtsam::FastList< VALUE >
 FastList is a thin wrapper around std::list that uses the boost fast_pool_allocator instead of the default STL allocator. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Macros

│ │ │ -#define ISDEBUG(S)   (gtsam::guardedIsDebug(S))
 
│ │ │ -#define SETDEBUG(S, V)   ((void)(gtsam::guardedSetDebug(S,V)))
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Functions

│ │ │ -bool gtsam::guardedIsDebug (const std::string &s)
 
│ │ │ -void gtsam::guardedSetDebug (const std::string &s, const bool v)
 
│ │ │ -bool gtsam::isDebugVersion ()
 
│ │ │

Detailed Description

│ │ │ -

Global debugging flags.

│ │ │ +

A thin wrapper around std::list that uses boost's fast_pool_allocator.

│ │ │
Author
Richard Roberts
│ │ │ -
Date
Feb 1, 2011
│ │ │ +
Date
Oct 22, 2010
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,35 +1,28 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -debug.h File Reference │ │ │ │ -Global debugging flags. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +FastList.h File Reference │ │ │ │ +A thin wrapper around std::list that uses boost's fast_pool_allocator. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +class   _g_t_s_a_m_:_:_F_a_s_t_L_i_s_t_<_ _V_A_L_U_E_ _> │ │ │ │ +  _F_a_s_t_L_i_s_t is a thin wrapper around std::list that uses the boost │ │ │ │ + fast_pool_allocator instead of the default STL allocator. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  IISSDDEEBBUUGG(S)   (gtsam::guardedIsDebug(S)) │ │ │ │ -  │ │ │ │ -#define  SSEETTDDEEBBUUGG(S, V)   ((void)(gtsam::guardedSetDebug(S,V))) │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -bool  ggttssaamm::::gguuaarrddeeddIIssDDeebbuugg (const std::string &s) │ │ │ │ -  │ │ │ │ -void  ggttssaamm::::gguuaarrddeeddSSeettDDeebbuugg (const std::string &s, const bool v) │ │ │ │ -  │ │ │ │ -bool  ggttssaamm::::iissDDeebbuuggVVeerrssiioonn () │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Global debugging flags. │ │ │ │ +A thin wrapper around std::list that uses boost's fast_pool_allocator. │ │ │ │ Author │ │ │ │ Richard Roberts │ │ │ │ Date │ │ │ │ - Feb 1, 2011 │ │ │ │ + Oct 22, 2010 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _d_e_b_u_g_._h │ │ │ │ + * _F_a_s_t_L_i_s_t_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00041_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/debug.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/FastList.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,86 +98,99 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
debug.h
│ │ │ +
FastList.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
19#include <gtsam/base/FastMap.h>
│ │ │ - │ │ │ -
21#include <string>
│ │ │ -
22
│ │ │ -
23
│ │ │ -
24// This file defines granular debugging flags that may be switched on and off
│ │ │ -
25// at run time. Typical usage is 'if(ISDEBUG("myFunction"))' to check if the
│ │ │ -
26// 'myFunction' flag is enabled, and SETDEBUG("myFunction", true) to enable
│ │ │ -
27// this flag, or SETDEBUG("myFunction", false) to disable it.
│ │ │ -
28//
│ │ │ -
29// Debug flags are created automatically as they are accessed, so they can be
│ │ │ -
30// used immediately without explicitly creating them. Each flag defaults to
│ │ │ -
31// 'false', i.e. disabled.
│ │ │ -
32//
│ │ │ -
33// For these macro to have any effect, granular debugging must be enabled by
│ │ │ -
34// defining GTSAM_ENABLE_DEBUG. If NDEBUG is not defined, then
│ │ │ -
35// GTSAM_ENABLE_DEBUG will be automatically defined and thus granular
│ │ │ -
36// debugging enabled.
│ │ │ -
37
│ │ │ -
38#ifndef NDEBUG
│ │ │ -
39#ifndef GTSAM_ENABLE_DEBUG
│ │ │ -
40#define GTSAM_ENABLE_DEBUG
│ │ │ -
41#endif
│ │ │ -
42#endif
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ + │ │ │ +
22#include <list>
│ │ │ +
23#include <boost/utility/enable_if.hpp>
│ │ │ +
24#include <boost/serialization/nvp.hpp>
│ │ │ +
25#include <boost/serialization/version.hpp>
│ │ │ +
26#include <boost/serialization/optional.hpp>
│ │ │ +
27#include <boost/serialization/list.hpp>
│ │ │ +
28
│ │ │ +
29namespace gtsam {
│ │ │ +
30
│ │ │ +
39template<typename VALUE>
│ │ │ +
│ │ │ +
40class FastList: public std::list<VALUE, typename internal::FastDefaultAllocator<VALUE>::type> {
│ │ │ +
41
│ │ │ +
42public:
│ │ │
43
│ │ │ -
44namespace gtsam {
│ │ │ -
45 GTSAM_EXTERN_EXPORT FastMap<std::string, ValueWithDefault<bool,false> > debugFlags;
│ │ │ -
46
│ │ │ -
47 // Non-guarded use led to crashes, and solved in commit cd35db2
│ │ │ -
48 bool GTSAM_EXPORT guardedIsDebug(const std::string& s);
│ │ │ -
49 void GTSAM_EXPORT guardedSetDebug(const std::string& s, const bool v);
│ │ │ -
50
│ │ │ -
51 // function to check if compiled version has debug information
│ │ │ -
52 bool GTSAM_EXPORT isDebugVersion();
│ │ │ -
53}
│ │ │ -
54
│ │ │ -
55#undef ISDEBUG
│ │ │ -
56#undef SETDEBUG
│ │ │ -
57
│ │ │ -
58#ifdef GTSAM_ENABLE_DEBUG
│ │ │ -
59
│ │ │ -
60#define ISDEBUG(S) (gtsam::guardedIsDebug(S))
│ │ │ -
61#define SETDEBUG(S,V) ((void)(gtsam::guardedSetDebug(S,V)))
│ │ │ -
62
│ │ │ -
63#else
│ │ │ -
64
│ │ │ -
65#define ISDEBUG(S) (false)
│ │ │ -
66#define SETDEBUG(S,V) ((void)false)
│ │ │ -
67
│ │ │ -
68#endif
│ │ │ -
69
│ │ │ -
A thin wrapper around std::map that uses boost's fast_pool_allocator.
│ │ │ -
Included from all GTSAM files.
│ │ │ +
44 typedef std::list<VALUE, typename internal::FastDefaultAllocator<VALUE>::type> Base;
│ │ │ +
45
│ │ │ + │ │ │ +
48
│ │ │ +
50 template<typename INPUTITERATOR>
│ │ │ +
51 explicit FastList(INPUTITERATOR first, INPUTITERATOR last) : Base(first, last) {}
│ │ │ +
52
│ │ │ +
54 FastList(const FastList<VALUE>& x) : Base(x) {}
│ │ │ +
55
│ │ │ +
57 FastList(const Base& x) : Base(x) {}
│ │ │ +
58
│ │ │ +
60 FastList(std::initializer_list<VALUE> l) : Base(l) {}
│ │ │ +
61
│ │ │ +
62#ifdef GTSAM_ALLOCATOR_BOOSTPOOL
│ │ │ +
64 FastList(const std::list<VALUE>& x) {
│ │ │ +
65 // This if statement works around a bug in boost pool allocator and/or
│ │ │ +
66 // STL vector where if the size is zero, the pool allocator will allocate
│ │ │ +
67 // huge amounts of memory.
│ │ │ +
68 if(x.size() > 0)
│ │ │ +
69 Base::assign(x.begin(), x.end());
│ │ │ +
70 }
│ │ │ +
71#endif
│ │ │ +
72
│ │ │ +
│ │ │ +
74 operator std::list<VALUE>() const {
│ │ │ +
75 return std::list<VALUE>(this->begin(), this->end());
│ │ │ +
76 }
│ │ │ +
│ │ │ +
77
│ │ │ +
78private:
│ │ │ + │ │ │ +
81 template<class ARCHIVE>
│ │ │ +
82 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
│ │ │ +
83 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
│ │ │ +
84 }
│ │ │ +
85
│ │ │ +
86};
│ │ │ +
│ │ │ +
87
│ │ │ +
88}
│ │ │ +
An easy way to control which allocator is used for Fast* collections.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ +
FastList is a thin wrapper around std::list that uses the boost fast_pool_allocator instead of the de...
Definition FastList.h:40
│ │ │ +
FastList(INPUTITERATOR first, INPUTITERATOR last)
Constructor from a range, passes through to base class.
Definition FastList.h:51
│ │ │ +
FastList()
Default constructor.
Definition FastList.h:47
│ │ │ +
FastList(std::initializer_list< VALUE > l)
Construct from c++11 initializer list:
Definition FastList.h:60
│ │ │ +
FastList(const FastList< VALUE > &x)
Copy constructor from another FastList.
Definition FastList.h:54
│ │ │ +
friend class boost::serialization::access
Serialization function.
Definition FastList.h:80
│ │ │ +
FastList(const Base &x)
Copy constructor from the base list class.
Definition FastList.h:57
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,83 +1,114 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -debug.h │ │ │ │ +FastList.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -19#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_M_a_p_._h> │ │ │ │ -20#include <_g_t_s_a_m_/_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h> │ │ │ │ -21#include │ │ │ │ -22 │ │ │ │ -23 │ │ │ │ -24// This file defines granular debugging flags that may be switched on and off │ │ │ │ -25// at run time. Typical usage is 'if(ISDEBUG("myFunction"))' to check if the │ │ │ │ -26// 'myFunction' flag is enabled, and SETDEBUG("myFunction", true) to enable │ │ │ │ -27// this flag, or SETDEBUG("myFunction", false) to disable it. │ │ │ │ -28// │ │ │ │ -29// Debug flags are created automatically as they are accessed, so they can be │ │ │ │ -30// used immediately without explicitly creating them. Each flag defaults to │ │ │ │ -31// 'false', i.e. disabled. │ │ │ │ -32// │ │ │ │ -33// For these macro to have any effect, granular debugging must be enabled by │ │ │ │ -34// defining GTSAM_ENABLE_DEBUG. If NDEBUG is not defined, then │ │ │ │ -35// GTSAM_ENABLE_DEBUG will be automatically defined and thus granular │ │ │ │ -36// debugging enabled. │ │ │ │ -37 │ │ │ │ -38#ifndef NDEBUG │ │ │ │ -39#ifndef GTSAM_ENABLE_DEBUG │ │ │ │ -40#define GTSAM_ENABLE_DEBUG │ │ │ │ -41#endif │ │ │ │ -42#endif │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +21#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r_._h> │ │ │ │ +22#include │ │ │ │ +23#include │ │ │ │ +24#include │ │ │ │ +25#include │ │ │ │ +26#include │ │ │ │ +27#include │ │ │ │ +28 │ │ │ │ +29namespace _g_t_s_a_m { │ │ │ │ +30 │ │ │ │ +39template │ │ │ │ +_4_0class _F_a_s_t_L_i_s_t: public std::list::type> { │ │ │ │ +41 │ │ │ │ +42public: │ │ │ │ 43 │ │ │ │ -44namespace _g_t_s_a_m { │ │ │ │ -45 GTSAM_EXTERN_EXPORT FastMap > │ │ │ │ -debugFlags; │ │ │ │ -46 │ │ │ │ -47 // Non-guarded use led to crashes, and solved in commit cd35db2 │ │ │ │ -48 bool GTSAM_EXPORT guardedIsDebug(const std::string& s); │ │ │ │ -49 void GTSAM_EXPORT guardedSetDebug(const std::string& s, const bool v); │ │ │ │ -50 │ │ │ │ -51 // function to check if compiled version has debug information │ │ │ │ -52 bool GTSAM_EXPORT isDebugVersion(); │ │ │ │ -53} │ │ │ │ -54 │ │ │ │ -55#undef ISDEBUG │ │ │ │ -56#undef SETDEBUG │ │ │ │ -57 │ │ │ │ -58#ifdef GTSAM_ENABLE_DEBUG │ │ │ │ -59 │ │ │ │ -60#define ISDEBUG(S) (gtsam::guardedIsDebug(S)) │ │ │ │ -61#define SETDEBUG(S,V) ((void)(gtsam::guardedSetDebug(S,V))) │ │ │ │ -62 │ │ │ │ -63#else │ │ │ │ -64 │ │ │ │ -65#define ISDEBUG(S) (false) │ │ │ │ -66#define SETDEBUG(S,V) ((void)false) │ │ │ │ -67 │ │ │ │ -68#endif │ │ │ │ -69 │ │ │ │ -_F_a_s_t_M_a_p_._h │ │ │ │ -A thin wrapper around std::map that uses boost's fast_pool_allocator. │ │ │ │ -_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h │ │ │ │ -Included from all GTSAM files. │ │ │ │ +44 typedef std::list:: │ │ │ │ +type> Base; │ │ │ │ +45 │ │ │ │ +_4_7 _F_a_s_t_L_i_s_t() {} │ │ │ │ +48 │ │ │ │ +50 template │ │ │ │ +_5_1 explicit _F_a_s_t_L_i_s_t(INPUTITERATOR first, INPUTITERATOR last) : Base(first, │ │ │ │ +last) {} │ │ │ │ +52 │ │ │ │ +_5_4 _F_a_s_t_L_i_s_t(const _F_a_s_t_L_i_s_t_<_V_A_L_U_E_>& x) : Base(x) {} │ │ │ │ +55 │ │ │ │ +_5_7 _F_a_s_t_L_i_s_t(const Base& x) : Base(x) {} │ │ │ │ +58 │ │ │ │ +_6_0 _F_a_s_t_L_i_s_t(std::initializer_list l) : Base(l) {} │ │ │ │ +61 │ │ │ │ +62#ifdef GTSAM_ALLOCATOR_BOOSTPOOL │ │ │ │ +64 _F_a_s_t_L_i_s_t(const std::list& x) { │ │ │ │ +65 // This if statement works around a bug in boost pool allocator and/or │ │ │ │ +66 // STL vector where if the size is zero, the pool allocator will allocate │ │ │ │ +67 // huge amounts of memory. │ │ │ │ +68 if(x.size() > 0) │ │ │ │ +69 Base::assign(x.begin(), x.end()); │ │ │ │ +70 } │ │ │ │ +71#endif │ │ │ │ +72 │ │ │ │ +_7_4 operator std::list() const { │ │ │ │ +75 return std::list(this->begin(), this->end()); │ │ │ │ +76 } │ │ │ │ +77 │ │ │ │ +78private: │ │ │ │ +_8_0 friend class _b_o_o_s_t_:_:_s_e_r_i_a_l_i_z_a_t_i_o_n_:_:_a_c_c_e_s_s; │ │ │ │ +81 template │ │ │ │ +82 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ +83 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base); │ │ │ │ +84 } │ │ │ │ +85 │ │ │ │ +86}; │ │ │ │ +87 │ │ │ │ +88} │ │ │ │ +_F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r_._h │ │ │ │ +An easy way to control which allocator is used for Fast* collections. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_L_i_s_t │ │ │ │ +FastList is a thin wrapper around std::list that uses the boost │ │ │ │ +fast_pool_allocator instead of the de... │ │ │ │ +DDeeffiinniittiioonn FastList.h:40 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_L_i_s_t_:_:_F_a_s_t_L_i_s_t │ │ │ │ +FastList(INPUTITERATOR first, INPUTITERATOR last) │ │ │ │ +Constructor from a range, passes through to base class. │ │ │ │ +DDeeffiinniittiioonn FastList.h:51 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_L_i_s_t_:_:_F_a_s_t_L_i_s_t │ │ │ │ +FastList() │ │ │ │ +Default constructor. │ │ │ │ +DDeeffiinniittiioonn FastList.h:47 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_L_i_s_t_:_:_F_a_s_t_L_i_s_t │ │ │ │ +FastList(std::initializer_list< VALUE > l) │ │ │ │ +Construct from c++11 initializer list: │ │ │ │ +DDeeffiinniittiioonn FastList.h:60 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_L_i_s_t_:_:_F_a_s_t_L_i_s_t │ │ │ │ +FastList(const FastList< VALUE > &x) │ │ │ │ +Copy constructor from another FastList. │ │ │ │ +DDeeffiinniittiioonn FastList.h:54 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_L_i_s_t_:_:_a_c_c_e_s_s │ │ │ │ +friend class boost::serialization::access │ │ │ │ +Serialization function. │ │ │ │ +DDeeffiinniittiioonn FastList.h:80 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_L_i_s_t_:_:_F_a_s_t_L_i_s_t │ │ │ │ +FastList(const Base &x) │ │ │ │ +Copy constructor from the base list class. │ │ │ │ +DDeeffiinniittiioonn FastList.h:57 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _d_e_b_u_g_._h │ │ │ │ + * _F_a_s_t_L_i_s_t_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00044.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/debug.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/WeightedSampler.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,56 +94,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions | │ │ │ -Variables
│ │ │ -
debug.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
WeightedSampler.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Global debugging flags. │ │ │ +

Fast sampling without replacement. │ │ │ More...

│ │ │ + │ │ │ +

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

class  gtsam::WeightedSampler< Engine >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Functions

│ │ │ -bool gtsam::guardedIsDebug (const std::string &s)
 
│ │ │ -void gtsam::guardedSetDebug (const std::string &s, const bool v)
 
│ │ │ -bool gtsam::isDebugVersion ()
 
│ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Variables

│ │ │ -GTSAM_EXPORT FastMap< std::string, ValueWithDefault< bool, false > > gtsam::debugFlags
 
│ │ │

Detailed Description

│ │ │ -

Global debugging flags.

│ │ │ -
Author
Richard Roberts
│ │ │ -
Date
Feb 1, 2011
│ │ │ +

Fast sampling without replacement.

│ │ │ +
Author
Frank Dellaert
│ │ │ +
Date
May 2019
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,33 +1,26 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ -debug.cpp File Reference │ │ │ │ -Global debugging flags. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +WeightedSampler.h File Reference │ │ │ │ +Fast sampling without replacement. _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +class   _g_t_s_a_m_:_:_W_e_i_g_h_t_e_d_S_a_m_p_l_e_r_<_ _E_n_g_i_n_e_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -bool  ggttssaamm::::gguuaarrddeeddIIssDDeebbuugg (const std::string &s) │ │ │ │ -  │ │ │ │ -void  ggttssaamm::::gguuaarrddeeddSSeettDDeebbuugg (const std::string &s, const bool v) │ │ │ │ -  │ │ │ │ -bool  ggttssaamm::::iissDDeebbuuggVVeerrssiioonn () │ │ │ │ -  │ │ │ │ -VVaarriiaabblleess │ │ │ │ -GTSAM_EXPORT _F_a_s_t_M_a_p< std::string, _V_a_l_u_e_W_i_t_h_D_e_f_a_u_l_t< bool, │ │ │ │ - false > >  ggttssaamm::::ddeebbuuggFFllaaggss │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Global debugging flags. │ │ │ │ +Fast sampling without replacement. │ │ │ │ Author │ │ │ │ - Richard Roberts │ │ │ │ + Frank Dellaert │ │ │ │ Date │ │ │ │ - Feb 1, 2011 │ │ │ │ + May 2019 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _d_e_b_u_g_._c_p_p │ │ │ │ + * _W_e_i_g_h_t_e_d_S_a_m_p_l_e_r_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00050.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/cholesky.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/VerticalBlockMatrix.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,48 +94,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
cholesky.h File Reference
│ │ │ +Namespaces
│ │ │ +
VerticalBlockMatrix.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Efficient incomplete Cholesky on rank-deficient matrices, todo: constrained Cholesky. │ │ │ +

A matrix with column blocks of pre-defined sizes. │ │ │ More...

│ │ │ - │ │ │ -

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Functions

pair< size_t, bool > gtsam::choleskyCareful (Matrix &ATA, int order=-1)
 "Careful" Cholesky computes the positive square-root of a positive symmetric semi-definite matrix (i.e.
 
bool gtsam::choleskyPartial (Matrix &ABC, size_t nFrontal, size_t topleft=0)
 Partial Cholesky computes a factor [R S such that [R' 0 [R S = [A B 0 L] S' I] 0 L] B' C].
 
│ │ │

Detailed Description

│ │ │ -

Efficient incomplete Cholesky on rank-deficient matrices, todo: constrained Cholesky.

│ │ │ -
Author
Richard Roberts
│ │ │ -
Date
Nov 5, 2010
│ │ │ +

A matrix with column blocks of pre-defined sizes.

│ │ │ +

Used in JacobianFactor and GaussianConditional.

Author
Richard Roberts
│ │ │ +
Date
Sep 18, 2010
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,35 +1,23 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -cholesky.h File Reference │ │ │ │ -Efficient incomplete Cholesky on rank-deficient matrices, todo: constrained │ │ │ │ -Cholesky. _M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +VerticalBlockMatrix.cpp File Reference │ │ │ │ +A matrix with column blocks of pre-defined sizes. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -pair< size_t, bool >  _g_t_s_a_m_:_:_c_h_o_l_e_s_k_y_C_a_r_e_f_u_l (Matrix &ATA, int order=-1) │ │ │ │ -  "Careful" Cholesky computes the positive square-root of a │ │ │ │ - positive symmetric semi-definite matrix (i.e. │ │ │ │ -  │ │ │ │ - bool  _g_t_s_a_m_:_:_c_h_o_l_e_s_k_y_P_a_r_t_i_a_l (Matrix &ABC, size_t nFrontal, │ │ │ │ - size_t topleft=0) │ │ │ │ -  Partial Cholesky computes a factor [R S such that [R' 0 │ │ │ │ - [R S = [A B 0 L] S' I] 0 L] B' C]. │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Efficient incomplete Cholesky on rank-deficient matrices, todo: constrained │ │ │ │ -Cholesky. │ │ │ │ +A matrix with column blocks of pre-defined sizes. │ │ │ │ +Used in _J_a_c_o_b_i_a_n_F_a_c_t_o_r and _G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l. │ │ │ │ Author │ │ │ │ Richard Roberts │ │ │ │ Date │ │ │ │ - Nov 5, 2010 │ │ │ │ + Sep 18, 2010 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _c_h_o_l_e_s_k_y_._h │ │ │ │ + * _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00053.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/cholesky.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/cholesky.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,20 +96,22 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ Functions
│ │ │ -
cholesky.cpp File Reference
│ │ │ +
cholesky.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Efficient incomplete Cholesky on rank-deficient matrices, todo: constrained Cholesky. │ │ │ More...

│ │ │ + │ │ │ +

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ @@ -120,22 +122,20 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
 
bool gtsam::choleskyPartial (Matrix &ABC, size_t nFrontal, size_t topleft=0)
 Partial Cholesky computes a factor [R S such that [R' 0 [R S = [A B 0 L] S' I] 0 L] B' C].
 
│ │ │

Detailed Description

│ │ │

Efficient incomplete Cholesky on rank-deficient matrices, todo: constrained Cholesky.

│ │ │ -
Author
Richard Roberts
│ │ │ -
│ │ │ -Frank Dellaert
│ │ │ +
Author
Richard Roberts
│ │ │
Date
Nov 5, 2010
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,16 +1,17 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -cholesky.cpp File Reference │ │ │ │ +cholesky.h File Reference │ │ │ │ Efficient incomplete Cholesky on rank-deficient matrices, todo: constrained │ │ │ │ Cholesky. _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ pair< size_t, bool >  _g_t_s_a_m_:_:_c_h_o_l_e_s_k_y_C_a_r_e_f_u_l (Matrix &ATA, int order=-1) │ │ │ │   "Careful" Cholesky computes the positive square-root of a │ │ │ │ @@ -22,14 +23,13 @@ │ │ │ │ [R S = [A B 0 L] S' I] 0 L] B' C]. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Efficient incomplete Cholesky on rank-deficient matrices, todo: constrained │ │ │ │ Cholesky. │ │ │ │ Author │ │ │ │ Richard Roberts │ │ │ │ - Frank Dellaert │ │ │ │ Date │ │ │ │ Nov 5, 2010 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _c_h_o_l_e_s_k_y_._c_p_p │ │ │ │ + * _c_h_o_l_e_s_k_y_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00056_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/chartTesting.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/OptionalJacobian.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,95 +98,292 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
chartTesting.h
│ │ │ +
OptionalJacobian.h
│ │ │
│ │ │
│ │ │ -
1/* ----------------------------------------------------------------------------
│ │ │ +Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
12/*
│ │ │ -
13 * @file chartTesting.h
│ │ │ -
14 * @brief
│ │ │ -
15 * @date November, 2014
│ │ │ -
16 * @author Paul Furgale
│ │ │ -
17 */
│ │ │ -
18
│ │ │ -
19#pragma once
│ │ │ -
20
│ │ │ -
21#include <gtsam/base/Matrix.h>
│ │ │ -
22#include <gtsam/base/Manifold.h>
│ │ │ -
23#include <gtsam/base/Testable.h>
│ │ │ -
24#include <CppUnitLite/TestResult.h>
│ │ │ -
25#include <CppUnitLite/Test.h>
│ │ │ -
26#include <CppUnitLite/Failure.h>
│ │ │ -
27
│ │ │ -
│ │ │ -
28namespace gtsam {
│ │ │ -
29// Do a full concept check and test the invertibility of local() vs. retract().
│ │ │ -
30template<typename T>
│ │ │ -
31void testDefaultChart(TestResult& result_,
│ │ │ -
32 const std::string& name_,
│ │ │ -
33 const T& value) {
│ │ │ -
34
│ │ │ -
35 GTSAM_CONCEPT_TESTABLE_TYPE(T)
│ │ │ -
36
│ │ │ -
37 typedef typename gtsam::DefaultChart<T> Chart;
│ │ │ -
38 typedef typename Chart::vector Vector;
│ │ │ -
39
│ │ │ -
40 // First, check the basic chart concept. This checks that the interface is satisfied.
│ │ │ -
41 // The rest of the function is even more detailed, checking the correctness of the chart.
│ │ │ -
42 BOOST_CONCEPT_ASSERT((ChartConcept<Chart>));
│ │ │ -
43
│ │ │ -
44 T other = value;
│ │ │ -
45
│ │ │ -
46 // Check that the dimension of the local value matches the chart dimension.
│ │ │ -
47 Vector dx = Chart::local(value, other);
│ │ │ -
48 EXPECT_LONGS_EQUAL(Chart::getDimension(value), dx.size());
│ │ │ -
49 // And that the "local" of a value vs. itself is zero.
│ │ │ -
50 EXPECT(assert_equal(Matrix(dx), Matrix(Eigen::VectorXd::Zero(dx.size()))));
│ │ │ -
51
│ │ │ -
52 // Test the invertibility of retract/local
│ │ │ -
53 dx.setRandom();
│ │ │ -
54 T updated = Chart::retract(value, dx);
│ │ │ -
55 Vector invdx = Chart::local(value, updated);
│ │ │ -
56 EXPECT(assert_equal(Matrix(dx), Matrix(invdx), 1e-9));
│ │ │ -
57
│ │ │ -
58 // And test that negative steps work as well.
│ │ │ -
59 dx = -dx;
│ │ │ -
60 updated = Chart::retract(value, dx);
│ │ │ -
61 invdx = Chart::local(value, updated);
│ │ │ -
62 EXPECT(assert_equal(Matrix(dx), Matrix(invdx), 1e-9));
│ │ │ -
63}
│ │ │ -
64} // namespace gtsam
│ │ │ -
│ │ │ -
65
│ │ │ -
68#define CHECK_CHART_CONCEPT(value) \
│ │ │ -
69 { gtsam::testDefaultChart(result_, name_, value); }
│ │ │ -
Concept check for values that can be used in unit tests.
│ │ │ -
typedef and functions to augment Eigen's MatrixXd
│ │ │ -
Base class and basic functions for Manifold types.
│ │ │ +
20#pragma once
│ │ │ +
21#include <gtsam/config.h> // Configuration from CMake
│ │ │ +
22#include <Eigen/Dense>
│ │ │ +
23#include <stdexcept>
│ │ │ +
24#include <string>
│ │ │ +
25
│ │ │ +
26#ifndef OPTIONALJACOBIAN_NOBOOST
│ │ │ +
27#include <boost/optional.hpp>
│ │ │ +
28#endif
│ │ │ +
29
│ │ │ +
30namespace gtsam {
│ │ │ +
31
│ │ │ +
40template<int Rows, int Cols>
│ │ │ +
│ │ │ + │ │ │ +
42
│ │ │ +
43public:
│ │ │ +
44
│ │ │ +
47 typedef Eigen::Matrix<double, Rows, Cols> Jacobian;
│ │ │ +
48
│ │ │ +
49private:
│ │ │ +
50
│ │ │ +
51 Eigen::Map<Jacobian> map_;
│ │ │ +
52
│ │ │ +
53 // Trick from http://eigen.tuxfamily.org/dox/group__TutorialMapClass.html
│ │ │ +
54 // uses "placement new" to make map_ usurp the memory of the fixed size matrix
│ │ │ +
55 void usurp(double* data) {
│ │ │ +
56 new (&map_) Eigen::Map<Jacobian>(data);
│ │ │ +
57 }
│ │ │ +
58
│ │ │ +
59 // Private and very dangerous constructor straight from memory
│ │ │ +
60 OptionalJacobian(double* data) : map_(nullptr) {
│ │ │ +
61 if (data) usurp(data);
│ │ │ +
62 }
│ │ │ +
63
│ │ │ +
64 template<int M, int N>
│ │ │ +
65 friend class OptionalJacobian;
│ │ │ +
66
│ │ │ +
67public:
│ │ │ +
68
│ │ │ +
│ │ │ + │ │ │ +
71 map_(nullptr) {
│ │ │ +
72 }
│ │ │ +
│ │ │ +
73
│ │ │ +
│ │ │ + │ │ │ +
76 map_(nullptr) {
│ │ │ +
77 usurp(fixed.data());
│ │ │ +
78 }
│ │ │ +
│ │ │ +
79
│ │ │ +
│ │ │ + │ │ │ +
82 map_(nullptr) {
│ │ │ +
83 if (fixedPtr)
│ │ │ +
84 usurp(fixedPtr->data());
│ │ │ +
85 }
│ │ │ +
│ │ │ +
86
│ │ │ +
│ │ │ +
88 OptionalJacobian(Eigen::MatrixXd& dynamic) :
│ │ │ +
89 map_(nullptr) {
│ │ │ +
90 dynamic.resize(Rows, Cols); // no malloc if correct size
│ │ │ +
91 usurp(dynamic.data());
│ │ │ +
92 }
│ │ │ +
│ │ │ +
93
│ │ │ +
│ │ │ +
95 OptionalJacobian(Eigen::MatrixXd* dynamic) :
│ │ │ +
96 map_(nullptr) {
│ │ │ +
97 dynamic->resize(Rows, Cols); // no malloc if correct size
│ │ │ +
98 usurp(dynamic->data());
│ │ │ +
99 }
│ │ │ +
│ │ │ +
100
│ │ │ +
105 template<class MATRIX>
│ │ │ +
│ │ │ +
106 OptionalJacobian(Eigen::Ref<MATRIX> dynamic_ref) :
│ │ │ +
107 map_(nullptr) {
│ │ │ +
108 if (dynamic_ref.rows() == Rows && dynamic_ref.cols() == Cols && !dynamic_ref.IsRowMajor) {
│ │ │ +
109 usurp(dynamic_ref.data());
│ │ │ +
110 } else {
│ │ │ +
111 throw std::invalid_argument(
│ │ │ +
112 std::string("OptionalJacobian called with wrong dimensions or "
│ │ │ +
113 "storage order.\n"
│ │ │ +
114 "Expected: ") +
│ │ │ +
115 "(" + std::to_string(Rows) + ", " + std::to_string(Cols) + ")");
│ │ │ +
116 }
│ │ │ +
117 }
│ │ │ +
│ │ │ +
118
│ │ │ +
119#ifndef OPTIONALJACOBIAN_NOBOOST
│ │ │ +
120
│ │ │ +
│ │ │ +
122 OptionalJacobian(boost::none_t /*none*/) :
│ │ │ +
123 map_(nullptr) {
│ │ │ +
124 }
│ │ │ +
│ │ │ +
125
│ │ │ +
│ │ │ +
127 OptionalJacobian(const boost::optional<Eigen::MatrixXd&> optional) :
│ │ │ +
128 map_(nullptr) {
│ │ │ +
129 if (optional) {
│ │ │ +
130 optional->resize(Rows, Cols);
│ │ │ +
131 usurp(optional->data());
│ │ │ +
132 }
│ │ │ +
133 }
│ │ │ +
│ │ │ +
134
│ │ │ +
135#endif
│ │ │ +
136
│ │ │ +
139 // template <typename Derived, bool InnerPanel>
│ │ │ +
140 // OptionalJacobian(Eigen::Block<Derived,Rows,Cols,InnerPanel> block) : map_(nullptr) { ?? }
│ │ │ +
141
│ │ │ +
│ │ │ +
143 operator bool() const {
│ │ │ +
144 return map_.data() != nullptr;
│ │ │ +
145 }
│ │ │ +
│ │ │ +
146
│ │ │ +
│ │ │ +
148 Eigen::Map<Jacobian>& operator*() {
│ │ │ +
149 return map_;
│ │ │ +
150 }
│ │ │ +
│ │ │ +
151
│ │ │ +
│ │ │ +
153 Eigen::Map<Jacobian>* operator->() {
│ │ │ +
154 return &map_;
│ │ │ +
155 }
│ │ │ +
│ │ │ +
156
│ │ │ +
159 // template <int M, int N>
│ │ │ +
160 // OptionalJacobian<M, N> block(int startRow, int startCol) {
│ │ │ +
161 // if (*this)
│ │ │ +
162 // OptionalJacobian<M, N>(map_.block<M, N>(startRow, startCol));
│ │ │ +
163 // else
│ │ │ +
164 // return OptionalJacobian<M, N>();
│ │ │ +
165 // }
│ │ │ +
166
│ │ │ +
170 template <int N>
│ │ │ +
│ │ │ + │ │ │ +
172 if (*this)
│ │ │ +
173 return OptionalJacobian<Rows, N>(&map_(0,startCol));
│ │ │ +
174 else
│ │ │ + │ │ │ +
176 }
│ │ │ +
│ │ │ +
177
│ │ │ +
182};
│ │ │ +
│ │ │ +
183
│ │ │ +
184// The pure dynamic specialization of this is needed to support
│ │ │ +
185// variable-sized types. Note that this is designed to work like the
│ │ │ +
186// boost optional scheme from GTSAM 3.
│ │ │ +
187template<>
│ │ │ +
│ │ │ +
188class OptionalJacobian<Eigen::Dynamic, Eigen::Dynamic> {
│ │ │ +
189
│ │ │ +
190public:
│ │ │ +
191
│ │ │ +
193 typedef Eigen::MatrixXd Jacobian;
│ │ │ +
194
│ │ │ +
195private:
│ │ │ +
196
│ │ │ +
197 Jacobian* pointer_;
│ │ │ +
198
│ │ │ +
199public:
│ │ │ +
200
│ │ │ +
│ │ │ + │ │ │ +
203 pointer_(nullptr) {
│ │ │ +
204 }
│ │ │ +
│ │ │ +
205
│ │ │ +
207 OptionalJacobian(Jacobian* pointer) : pointer_(pointer) {}
│ │ │ +
208
│ │ │ +
210 OptionalJacobian(Jacobian& dynamic) : pointer_(&dynamic) {}
│ │ │ +
211
│ │ │ +
212#ifndef OPTIONALJACOBIAN_NOBOOST
│ │ │ +
213
│ │ │ +
│ │ │ +
215 OptionalJacobian(boost::none_t /*none*/) :
│ │ │ +
216 pointer_(nullptr) {
│ │ │ +
217 }
│ │ │ +
│ │ │ +
218
│ │ │ +
│ │ │ +
220 OptionalJacobian(const boost::optional<Eigen::MatrixXd&> optional) :
│ │ │ +
221 pointer_(nullptr) {
│ │ │ +
222 if (optional) pointer_ = &(*optional);
│ │ │ +
223 }
│ │ │ +
│ │ │ +
224
│ │ │ +
225#endif
│ │ │ +
226
│ │ │ +
│ │ │ +
228 operator bool() const {
│ │ │ +
229 return pointer_!=nullptr;
│ │ │ +
230 }
│ │ │ +
│ │ │ +
231
│ │ │ +
│ │ │ + │ │ │ +
234 return *pointer_;
│ │ │ +
235 }
│ │ │ +
│ │ │ +
236
│ │ │ +
238 Jacobian* operator->(){ return pointer_; }
│ │ │ +
239};
│ │ │ +
│ │ │ +
240
│ │ │ +
241// forward declare
│ │ │ +
242template <typename T> struct traits;
│ │ │ +
243
│ │ │ +
249template <class T, class A>
│ │ │ +
│ │ │ + │ │ │ +
251 typedef Eigen::Matrix<double, traits<T>::dimension, traits<A>::dimension> type;
│ │ │ +
252};
│ │ │ +
│ │ │ +
253
│ │ │ +
260template<class T, class A>
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
264};
│ │ │ +
│ │ │ +
265
│ │ │ +
266} // namespace gtsam
│ │ │ +
267
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
equals with an tolerance, prints out message if unequal
Definition Matrix.cpp:43
│ │ │ +
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ +
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:41
│ │ │ +
OptionalJacobian(const boost::optional< Eigen::MatrixXd & > optional)
Constructor compatible with old-style derivatives.
Definition OptionalJacobian.h:127
│ │ │ +
OptionalJacobian(boost::none_t)
Constructor with boost::none just makes empty.
Definition OptionalJacobian.h:122
│ │ │ +
OptionalJacobian(Eigen::MatrixXd &dynamic)
Constructor that will resize a dynamic matrix (unless already correct)
Definition OptionalJacobian.h:88
│ │ │ +
Eigen::Map< Jacobian > & operator*()
De-reference, like boost optional.
Definition OptionalJacobian.h:148
│ │ │ +
OptionalJacobian()
Default constructor acts like boost::none.
Definition OptionalJacobian.h:70
│ │ │ +
OptionalJacobian(Jacobian &fixed)
Constructor that will usurp data of a fixed-size matrix.
Definition OptionalJacobian.h:75
│ │ │ +
OptionalJacobian(Eigen::Ref< MATRIX > dynamic_ref)
Constructor from an Eigen::Ref value.
Definition OptionalJacobian.h:106
│ │ │ +
OptionalJacobian(Eigen::MatrixXd *dynamic)
Constructor that will resize a dynamic matrix (unless already correct)
Definition OptionalJacobian.h:95
│ │ │ +
Eigen::Map< Jacobian > * operator->()
operator->()
Definition OptionalJacobian.h:153
│ │ │ +
Eigen::Matrix< double, Rows, Cols > Jacobian
Jacobian size type TODO(frank): how to enforce RowMajor? Or better, make it work with any storage ord...
Definition OptionalJacobian.h:47
│ │ │ +
OptionalJacobian(Jacobian *fixedPtr)
Constructor that will usurp data of a fixed-size matrix, pointer version.
Definition OptionalJacobian.h:81
│ │ │ +
OptionalJacobian< Rows, N > cols(int startCol)
Access M*N sub-block if we are allocated, otherwise none TODO(frank): this could work as is below if ...
Definition OptionalJacobian.h:171
│ │ │ +
OptionalJacobian()
View on constructor argument, if given.
Definition OptionalJacobian.h:202
│ │ │ +
OptionalJacobian(const boost::optional< Eigen::MatrixXd & > optional)
Constructor compatible with old-style derivatives.
Definition OptionalJacobian.h:220
│ │ │ +
Eigen::MatrixXd Jacobian
Jacobian size type.
Definition OptionalJacobian.h:193
│ │ │ +
Jacobian & operator*()
De-reference, like boost optional.
Definition OptionalJacobian.h:233
│ │ │ +
OptionalJacobian(boost::none_t)
Constructor with boost::none just makes empty.
Definition OptionalJacobian.h:215
│ │ │ +
OptionalJacobian(Jacobian *pointer)
Construct from pointer to dynamic matrix.
Definition OptionalJacobian.h:207
│ │ │ +
OptionalJacobian(Jacobian &dynamic)
Construct from refrence to dynamic matrix.
Definition OptionalJacobian.h:210
│ │ │ +
Jacobian * operator->()
TODO: operator->()
Definition OptionalJacobian.h:238
│ │ │ +
: meta-function to generate Jacobian
Definition OptionalJacobian.h:250
│ │ │ +
: meta-function to generate JacobianTA optional reference Used mainly by Expressions
Definition OptionalJacobian.h:261
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,95 +1,321 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -chartTesting.h │ │ │ │ +OptionalJacobian.h │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -12/* │ │ │ │ -13 * @file chartTesting.h │ │ │ │ -14 * @brief │ │ │ │ -15 * @date November, 2014 │ │ │ │ -16 * @author Paul Furgale │ │ │ │ -17 */ │ │ │ │ -18 │ │ │ │ -19#pragma once │ │ │ │ -20 │ │ │ │ -21#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_._h> │ │ │ │ -22#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_n_i_f_o_l_d_._h> │ │ │ │ -23#include <_g_t_s_a_m_/_b_a_s_e_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ -24#include │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27 │ │ │ │ -_2_8namespace _g_t_s_a_m { │ │ │ │ -29// Do a full concept check and test the invertibility of local() vs. retract │ │ │ │ -(). │ │ │ │ -30template │ │ │ │ -31void testDefaultChart(TestResult& result_, │ │ │ │ -32 const std::string& name_, │ │ │ │ -33 const T& value) { │ │ │ │ -34 │ │ │ │ -35 GTSAM_CONCEPT_TESTABLE_TYPE(T) │ │ │ │ -36 │ │ │ │ -37 typedef typename gtsam::DefaultChart Chart; │ │ │ │ -38 typedef typename Chart::vector Vector; │ │ │ │ -39 │ │ │ │ -40 // First, check the basic chart concept. This checks that the interface is │ │ │ │ -satisfied. │ │ │ │ -41 // The rest of the function is even more detailed, checking the correctness │ │ │ │ -of the chart. │ │ │ │ -42 BOOST_CONCEPT_ASSERT((ChartConcept)); │ │ │ │ -43 │ │ │ │ -44 T other = value; │ │ │ │ -45 │ │ │ │ -46 // Check that the dimension of the local value matches the chart dimension. │ │ │ │ -47 Vector dx = Chart::local(value, other); │ │ │ │ -48 EXPECT_LONGS_EQUAL(Chart::getDimension(value), dx.size()); │ │ │ │ -49 // And that the "local" of a value vs. itself is zero. │ │ │ │ -50 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(Matrix(dx), Matrix(Eigen::VectorXd::Zero(dx.size())))); │ │ │ │ -51 │ │ │ │ -52 // Test the invertibility of retract/local │ │ │ │ -53 dx.setRandom(); │ │ │ │ -54 T updated = Chart::retract(value, dx); │ │ │ │ -55 Vector invdx = Chart::local(value, updated); │ │ │ │ -56 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(Matrix(dx), Matrix(invdx), 1e-9)); │ │ │ │ -57 │ │ │ │ -58 // And test that negative steps work as well. │ │ │ │ -59 dx = -dx; │ │ │ │ -60 updated = Chart::retract(value, dx); │ │ │ │ -61 invdx = Chart::local(value, updated); │ │ │ │ -62 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(Matrix(dx), Matrix(invdx), 1e-9)); │ │ │ │ -63} │ │ │ │ -64} // namespace gtsam │ │ │ │ -65 │ │ │ │ -68#define CHECK_CHART_CONCEPT(value) \ │ │ │ │ -69 { gtsam::testDefaultChart(result_, name_, value); } │ │ │ │ -_T_e_s_t_a_b_l_e_._h │ │ │ │ -Concept check for values that can be used in unit tests. │ │ │ │ -_M_a_t_r_i_x_._h │ │ │ │ -typedef and functions to augment Eigen's MatrixXd │ │ │ │ -_M_a_n_i_f_o_l_d_._h │ │ │ │ -Base class and basic functions for Manifold types. │ │ │ │ +20#pragma once │ │ │ │ +21#include // Configuration from CMake │ │ │ │ +22#include │ │ │ │ +23#include │ │ │ │ +24#include │ │ │ │ +25 │ │ │ │ +26#ifndef OPTIONALJACOBIAN_NOBOOST │ │ │ │ +27#include │ │ │ │ +28#endif │ │ │ │ +29 │ │ │ │ +30namespace _g_t_s_a_m { │ │ │ │ +31 │ │ │ │ +40template │ │ │ │ +_4_1class _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n { │ │ │ │ +42 │ │ │ │ +43public: │ │ │ │ +44 │ │ │ │ +_4_7 typedef Eigen::Matrix _J_a_c_o_b_i_a_n; │ │ │ │ +48 │ │ │ │ +49private: │ │ │ │ +50 │ │ │ │ +51 Eigen::Map map_; │ │ │ │ +52 │ │ │ │ +53 // Trick from http://eigen.tuxfamily.org/dox/group__TutorialMapClass.html │ │ │ │ +54 // uses "placement new" to make map_ usurp the memory of the fixed size │ │ │ │ +matrix │ │ │ │ +55 void usurp(double* data) { │ │ │ │ +56 new (&map_) Eigen::Map(data); │ │ │ │ +57 } │ │ │ │ +58 │ │ │ │ +59 // Private and very dangerous constructor straight from memory │ │ │ │ +60 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n(double* data) : map_(nullptr) { │ │ │ │ +61 if (data) usurp(data); │ │ │ │ +62 } │ │ │ │ +63 │ │ │ │ +64 template │ │ │ │ +65 friend class OptionalJacobian; │ │ │ │ +66 │ │ │ │ +67public: │ │ │ │ +68 │ │ │ │ +_7_0 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n() : │ │ │ │ +71 map_(nullptr) { │ │ │ │ +72 } │ │ │ │ +73 │ │ │ │ +_7_5 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n(_J_a_c_o_b_i_a_n& fixed) : │ │ │ │ +76 map_(nullptr) { │ │ │ │ +77 usurp(fixed.data()); │ │ │ │ +78 } │ │ │ │ +79 │ │ │ │ +_8_1 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n(_J_a_c_o_b_i_a_n* fixedPtr) : │ │ │ │ +82 map_(nullptr) { │ │ │ │ +83 if (fixedPtr) │ │ │ │ +84 usurp(fixedPtr->data()); │ │ │ │ +85 } │ │ │ │ +86 │ │ │ │ +_8_8 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n(Eigen::MatrixXd& dynamic) : │ │ │ │ +89 map_(nullptr) { │ │ │ │ +90 dynamic.resize(Rows, Cols); // no malloc if correct size │ │ │ │ +91 usurp(dynamic.data()); │ │ │ │ +92 } │ │ │ │ +93 │ │ │ │ +_9_5 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n(Eigen::MatrixXd* dynamic) : │ │ │ │ +96 map_(nullptr) { │ │ │ │ +97 dynamic->resize(Rows, Cols); // no malloc if correct size │ │ │ │ +98 usurp(dynamic->data()); │ │ │ │ +99 } │ │ │ │ +100 │ │ │ │ +105 template │ │ │ │ +_1_0_6 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n(Eigen::Ref dynamic_ref) : │ │ │ │ +107 map_(nullptr) { │ │ │ │ +108 if (dynamic_ref.rows() == Rows && dynamic_ref.cols() == Cols && │ │ │ │ +!dynamic_ref.IsRowMajor) { │ │ │ │ +109 usurp(dynamic_ref.data()); │ │ │ │ +110 } else { │ │ │ │ +111 throw std::invalid_argument( │ │ │ │ +112 std::string("OptionalJacobian called with wrong dimensions or " │ │ │ │ +113 "storage order.\n" │ │ │ │ +114 "Expected: ") + │ │ │ │ +115 "(" + std::to_string(Rows) + ", " + std::to_string(Cols) + ")"); │ │ │ │ +116 } │ │ │ │ +117 } │ │ │ │ +118 │ │ │ │ +119#ifndef OPTIONALJACOBIAN_NOBOOST │ │ │ │ +120 │ │ │ │ +_1_2_2 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n(boost::none_t /*none*/) : │ │ │ │ +123 map_(nullptr) { │ │ │ │ +124 } │ │ │ │ +125 │ │ │ │ +_1_2_7 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n(const boost::optional optional) : │ │ │ │ +128 map_(nullptr) { │ │ │ │ +129 if (optional) { │ │ │ │ +130 optional->resize(Rows, Cols); │ │ │ │ +131 usurp(optional->data()); │ │ │ │ +132 } │ │ │ │ +133 } │ │ │ │ +134 │ │ │ │ +135#endif │ │ │ │ +136 │ │ │ │ +139 // template │ │ │ │ +140 // OptionalJacobian(Eigen::Block block) : │ │ │ │ +map_(nullptr) { ?? } │ │ │ │ +141 │ │ │ │ +_1_4_3 operator bool() const { │ │ │ │ +144 return map_.data() != nullptr; │ │ │ │ +145 } │ │ │ │ +146 │ │ │ │ +_1_4_8 Eigen::Map& _o_p_e_r_a_t_o_r_*() { │ │ │ │ +149 return map_; │ │ │ │ +150 } │ │ │ │ +151 │ │ │ │ +_1_5_3 Eigen::Map* _o_p_e_r_a_t_o_r_-_>() { │ │ │ │ +154 return &map_; │ │ │ │ +155 } │ │ │ │ +156 │ │ │ │ +159 // template │ │ │ │ +160 // OptionalJacobian block(int startRow, int startCol) { │ │ │ │ +161 // if (*this) │ │ │ │ +162 // OptionalJacobian(map_.block(startRow, startCol)); │ │ │ │ +163 // else │ │ │ │ +164 // return OptionalJacobian(); │ │ │ │ +165 // } │ │ │ │ +166 │ │ │ │ +170 template │ │ │ │ +_1_7_1 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_R_o_w_s_,_ _N_> _c_o_l_s(int startCol) { │ │ │ │ +172 if (*this) │ │ │ │ +173 return _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_R_o_w_s_,_ _N_>(&map_(0,startCol)); │ │ │ │ +174 else │ │ │ │ +175 return _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_R_o_w_s_,_ _N_>(); │ │ │ │ +176 } │ │ │ │ +177 │ │ │ │ +182}; │ │ │ │ +183 │ │ │ │ +184// The pure dynamic specialization of this is needed to support │ │ │ │ +185// variable-sized types. Note that this is designed to work like the │ │ │ │ +186// boost optional scheme from GTSAM 3. │ │ │ │ +187template<> │ │ │ │ +_1_8_8class _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n { │ │ │ │ +189 │ │ │ │ +190public: │ │ │ │ +191 │ │ │ │ +_1_9_3 typedef Eigen::MatrixXd _J_a_c_o_b_i_a_n; │ │ │ │ +194 │ │ │ │ +195private: │ │ │ │ +196 │ │ │ │ +197 _J_a_c_o_b_i_a_n* pointer_; │ │ │ │ +198 │ │ │ │ +199public: │ │ │ │ +200 │ │ │ │ +_2_0_2 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n() : │ │ │ │ +203 pointer_(nullptr) { │ │ │ │ +204 } │ │ │ │ +205 │ │ │ │ +_2_0_7 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n(_J_a_c_o_b_i_a_n* pointer) : pointer_(pointer) {} │ │ │ │ +208 │ │ │ │ +_2_1_0 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n(_J_a_c_o_b_i_a_n& dynamic) : pointer_(&dynamic) {} │ │ │ │ +211 │ │ │ │ +212#ifndef OPTIONALJACOBIAN_NOBOOST │ │ │ │ +213 │ │ │ │ +_2_1_5 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n(boost::none_t /*none*/) : │ │ │ │ +216 pointer_(nullptr) { │ │ │ │ +217 } │ │ │ │ +218 │ │ │ │ +_2_2_0 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n(const boost::optional optional) : │ │ │ │ +221 pointer_(nullptr) { │ │ │ │ +222 if (optional) pointer_ = &(*optional); │ │ │ │ +223 } │ │ │ │ +224 │ │ │ │ +225#endif │ │ │ │ +226 │ │ │ │ +_2_2_8 operator bool() const { │ │ │ │ +229 return pointer_!=nullptr; │ │ │ │ +230 } │ │ │ │ +231 │ │ │ │ +_2_3_3 _J_a_c_o_b_i_a_n& _o_p_e_r_a_t_o_r_*() { │ │ │ │ +234 return *pointer_; │ │ │ │ +235 } │ │ │ │ +236 │ │ │ │ +_2_3_8 _J_a_c_o_b_i_a_n* _o_p_e_r_a_t_o_r_-_>(){ return pointer_; } │ │ │ │ +239}; │ │ │ │ +240 │ │ │ │ +241// forward declare │ │ │ │ +242template struct traits; │ │ │ │ +243 │ │ │ │ +249template │ │ │ │ +_2_5_0struct _M_a_k_e_J_a_c_o_b_i_a_n { │ │ │ │ +251 typedef Eigen::Matrix::dimension, _t_r_a_i_t_s_<_A_>_:_:_d_i_m_e_n_s_i_o_n> │ │ │ │ +type; │ │ │ │ +252}; │ │ │ │ +253 │ │ │ │ +260template │ │ │ │ +_2_6_1struct _M_a_k_e_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n { │ │ │ │ +262 typedef _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_t_r_a_i_t_s_<_T_>_:_:_d_i_m_e_n_s_i_o_n, │ │ │ │ +263 _t_r_a_i_t_s_<_A_>_:_:_d_i_m_e_n_s_i_o_n> type; │ │ │ │ +264}; │ │ │ │ +265 │ │ │ │ +266} // namespace gtsam │ │ │ │ +267 │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_a_s_s_e_r_t___e_q_u_a_l │ │ │ │ -bool assert_equal(const Matrix &expected, const Matrix &actual, double tol) │ │ │ │ -equals with an tolerance, prints out message if unequal │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:43 │ │ │ │ +_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ +A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ +that can be centered ... │ │ │ │ +DDeeffiinniittiioonn concepts.h:30 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ +either a fixed size o... │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian(const boost::optional< Eigen::MatrixXd & > optional) │ │ │ │ +Constructor compatible with old-style derivatives. │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:127 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian(boost::none_t) │ │ │ │ +Constructor with boost::none just makes empty. │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:122 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian(Eigen::MatrixXd &dynamic) │ │ │ │ +Constructor that will resize a dynamic matrix (unless already correct) │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:88 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ +Eigen::Map< Jacobian > & operator*() │ │ │ │ +De-reference, like boost optional. │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:148 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian() │ │ │ │ +Default constructor acts like boost::none. │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:70 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian(Jacobian &fixed) │ │ │ │ +Constructor that will usurp data of a fixed-size matrix. │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:75 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian(Eigen::Ref< MATRIX > dynamic_ref) │ │ │ │ +Constructor from an Eigen::Ref value. │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:106 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian(Eigen::MatrixXd *dynamic) │ │ │ │ +Constructor that will resize a dynamic matrix (unless already correct) │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:95 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_:_:_o_p_e_r_a_t_o_r_-_> │ │ │ │ +Eigen::Map< Jacobian > * operator->() │ │ │ │ +operator->() │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:153 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_:_:_J_a_c_o_b_i_a_n │ │ │ │ +Eigen::Matrix< double, Rows, Cols > Jacobian │ │ │ │ +Jacobian size type TODO(frank): how to enforce RowMajor? Or better, make it │ │ │ │ +work with any storage ord... │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:47 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian(Jacobian *fixedPtr) │ │ │ │ +Constructor that will usurp data of a fixed-size matrix, pointer version. │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:81 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_:_:_c_o_l_s │ │ │ │ +OptionalJacobian< Rows, N > cols(int startCol) │ │ │ │ +Access M*N sub-block if we are allocated, otherwise none TODO(frank): this │ │ │ │ +could work as is below if ... │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:171 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_,_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_ _>_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian() │ │ │ │ +View on constructor argument, if given. │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:202 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_,_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_ _>_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian(const boost::optional< Eigen::MatrixXd & > optional) │ │ │ │ +Constructor compatible with old-style derivatives. │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:220 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_,_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_ _>_:_:_J_a_c_o_b_i_a_n │ │ │ │ +Eigen::MatrixXd Jacobian │ │ │ │ +Jacobian size type. │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:193 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_,_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_ _>_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ +Jacobian & operator*() │ │ │ │ +De-reference, like boost optional. │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:233 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_,_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_ _>_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian(boost::none_t) │ │ │ │ +Constructor with boost::none just makes empty. │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:215 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_,_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_ _>_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian(Jacobian *pointer) │ │ │ │ +Construct from pointer to dynamic matrix. │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:207 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_,_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_ _>_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian(Jacobian &dynamic) │ │ │ │ +Construct from refrence to dynamic matrix. │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:210 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_,_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_ _>_:_:_o_p_e_r_a_t_o_r_-_> │ │ │ │ +Jacobian * operator->() │ │ │ │ +TODO: operator->() │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:238 │ │ │ │ +_g_t_s_a_m_:_:_M_a_k_e_J_a_c_o_b_i_a_n │ │ │ │ +: meta-function to generate Jacobian │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:250 │ │ │ │ +_g_t_s_a_m_:_:_M_a_k_e_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +: meta-function to generate JacobianTA optional reference Used mainly by │ │ │ │ +Expressions │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:261 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * cchhaarrttTTeessttiinngg..hh │ │ │ │ + * _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00059.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/WeightedSampler.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/ProductLieGroup.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,42 +96,45 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
WeightedSampler.h File Reference
│ │ │ +
ProductLieGroup.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Fast sampling without replacement. │ │ │ +

Group product of two Lie Groups. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │

│ │ │ Classes

class  gtsam::WeightedSampler< Engine >
class  gtsam::ProductLieGroup< G, H >
 Template to construct the product Lie group of two other Lie groups Assumes Lie group structure for G and H. More...
 
struct  gtsam::traits< ProductLieGroup< G, H > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │

Detailed Description

│ │ │ -

Fast sampling without replacement.

│ │ │ +

Group product of two Lie Groups.

│ │ │ +
Date
May, 2015
│ │ │
Author
Frank Dellaert
│ │ │ -
Date
May 2019
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,26 +1,30 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -WeightedSampler.h File Reference │ │ │ │ -Fast sampling without replacement. _M_o_r_e_._._. │ │ │ │ +ProductLieGroup.h File Reference │ │ │ │ +Group product of two Lie Groups. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_W_e_i_g_h_t_e_d_S_a_m_p_l_e_r_<_ _E_n_g_i_n_e_ _> │ │ │ │ + class   _g_t_s_a_m_:_:_P_r_o_d_u_c_t_L_i_e_G_r_o_u_p_<_ _G_,_ _H_ _> │ │ │ │ +  Template to construct the product Lie group of two other Lie groups │ │ │ │ + Assumes Lie group structure for G and H. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p_<_ _G_,_ _H_ _>_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Fast sampling without replacement. │ │ │ │ +Group product of two Lie Groups. │ │ │ │ + Date │ │ │ │ + May, 2015 │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - Date │ │ │ │ - May 2019 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _W_e_i_g_h_t_e_d_S_a_m_p_l_e_r_._h │ │ │ │ + * _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00059.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,4 @@ │ │ │ │ var a00059 = [ │ │ │ │ - ["gtsam::WeightedSampler< Engine >", "a02664.html", "a02664"] │ │ │ │ + ["gtsam::ProductLieGroup< G, H >", "a02464.html", "a02464"], │ │ │ │ + ["gtsam::traits< ProductLieGroup< G, H > >", "a02468.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00059_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/WeightedSampler.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/ProductLieGroup.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,152 +98,193 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
WeightedSampler.h
│ │ │ +
ProductLieGroup.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │ -
10 * -------------------------------------------------------------------------- */
│ │ │ +
10 * -------------------------------1------------------------------------------- */
│ │ │
11
│ │ │
19#pragma once
│ │ │
20
│ │ │ -
21#include <cmath>
│ │ │ -
22#include <queue>
│ │ │ -
23#include <random>
│ │ │ -
24#include <stdexcept>
│ │ │ -
25#include <utility>
│ │ │ -
26#include <vector>
│ │ │ -
27
│ │ │ -
28namespace gtsam {
│ │ │ -
29/*
│ │ │ -
30 * Fast sampling without replacement.
│ │ │ -
31 * Example usage:
│ │ │ -
32 * std::mt19937 rng(42);
│ │ │ -
33 * WeightedSampler<std::mt19937> sampler(&rng);
│ │ │ -
34 * auto samples = sampler.sampleWithoutReplacement(5, weights);
│ │ │ -
35 */
│ │ │ -
36template <class Engine = std::mt19937>
│ │ │ -
│ │ │ - │ │ │ -
38 private:
│ │ │ -
39 Engine* engine_; // random number generation engine
│ │ │ -
40
│ │ │ -
41 public:
│ │ │ -
46 explicit WeightedSampler(Engine* engine) : engine_(engine) {}
│ │ │ +
21#include <gtsam/base/Lie.h>
│ │ │ +
22#include <utility> // pair
│ │ │ +
23
│ │ │ +
24namespace gtsam {
│ │ │ +
25
│ │ │ +
28template<typename G, typename H>
│ │ │ +
│ │ │ +
29class ProductLieGroup: public std::pair<G, H> {
│ │ │ +
30 BOOST_CONCEPT_ASSERT((IsLieGroup<G>));
│ │ │ +
31 BOOST_CONCEPT_ASSERT((IsLieGroup<H>));
│ │ │ +
32 typedef std::pair<G, H> Base;
│ │ │ +
33
│ │ │ +
34protected:
│ │ │ +
35 enum {dimension1 = traits<G>::dimension};
│ │ │ +
36 enum {dimension2 = traits<H>::dimension};
│ │ │ +
37
│ │ │ +
38public:
│ │ │ +
40 ProductLieGroup():Base(traits<G>::Identity(),traits<H>::Identity()) {}
│ │ │ +
41
│ │ │ +
42 // Construct from two subgroup elements
│ │ │ +
43 ProductLieGroup(const G& g, const H& h):Base(g,h) {}
│ │ │ +
44
│ │ │ +
45 // Construct from base
│ │ │ +
46 ProductLieGroup(const Base& base):Base(base) {}
│ │ │
47
│ │ │ -
48 std::vector<size_t> sampleWithoutReplacement(
│ │ │ -
49 size_t numSamples, const std::vector<double>& weights) {
│ │ │ -
50 // Implementation adapted from code accompanying paper at
│ │ │ -
51 // https://www.ethz.ch/content/dam/ethz/special-interest/baug/ivt/ivt-dam/vpl/reports/1101-1200/ab1141.pdf
│ │ │ -
52 const size_t n = weights.size();
│ │ │ -
53 if (n < numSamples) {
│ │ │ -
54 throw std::runtime_error(
│ │ │ -
55 "numSamples must be smaller than weights.size()");
│ │ │ -
56 }
│ │ │ -
57
│ │ │ -
58 // Return empty array if numSamples==0
│ │ │ -
59 std::vector<size_t> result(numSamples);
│ │ │ -
60 if (numSamples == 0) return result;
│ │ │ -
61
│ │ │ -
62 // Step 1: The first m items of V are inserted into reservoir
│ │ │ -
63 // Step 2: For each item v_i ∈ reservoir: Calculate a key k_i = u_i^(1/w),
│ │ │ -
64 // where u_i = random(0, 1)
│ │ │ -
65 // (Modification: Calculate and store -log k_i = e_i / w where e_i = exp(1),
│ │ │ -
66 // reservoir is a priority queue that pops the *maximum* elements)
│ │ │ -
67 std::priority_queue<std::pair<double, size_t> > reservoir;
│ │ │ -
68
│ │ │ -
69 static const double kexp1 = std::exp(1.0);
│ │ │ -
70 for (auto it = weights.begin(); it != weights.begin() + numSamples; ++it) {
│ │ │ -
71 const double k_i = kexp1 / *it;
│ │ │ -
72 reservoir.push(std::make_pair(k_i, it - weights.begin() + 1));
│ │ │ -
73 }
│ │ │ -
74
│ │ │ -
75 // Step 4: Repeat Steps 5–10 until the population is exhausted
│ │ │ -
76 {
│ │ │ -
77 // Step 3: The threshold T_w is the minimum key of reservoir
│ │ │ -
78 // (Modification: This is now the logarithm)
│ │ │ -
79 // Step 10: The new threshold T w is the new minimum key of reservoir
│ │ │ -
80 const std::pair<double, size_t>& T_w = reservoir.top();
│ │ │ -
81
│ │ │ -
82 // Incrementing it is part of Step 7
│ │ │ -
83 for (auto it = weights.begin() + numSamples; it != weights.end(); ++it) {
│ │ │ -
84 // Step 5: Let r = random(0, 1) and X_w = log(r) / log(T_w)
│ │ │ -
85 // (Modification: Use e = -exp(1) instead of log(r))
│ │ │ -
86 const double X_w = kexp1 / T_w.first;
│ │ │ -
87
│ │ │ -
88 // Step 6: From the current item v_c skip items until item v_i, such
│ │ │ -
89 // that:
│ │ │ -
90 double w = 0.0;
│ │ │ -
91
│ │ │ -
92 // Step 7: w_c + w_{c+1} + ··· + w_{i−1} < X_w <= w_c + w_{c+1} + ··· +
│ │ │ -
93 // w_{i−1} + w_i
│ │ │ -
94 for (; it != weights.end(); ++it) {
│ │ │ -
95 w += *it;
│ │ │ -
96 if (X_w <= w) break;
│ │ │ -
97 }
│ │ │ -
98
│ │ │ -
99 // Step 7: No such item, terminate
│ │ │ -
100 if (it == weights.end()) break;
│ │ │ +
50 typedef multiplicative_group_tag group_flavor;
│ │ │ +
51 static ProductLieGroup Identity() {return ProductLieGroup();}
│ │ │ +
52
│ │ │ +
53 ProductLieGroup operator*(const ProductLieGroup& other) const {
│ │ │ +
54 return ProductLieGroup(traits<G>::Compose(this->first,other.first),
│ │ │ +
55 traits<H>::Compose(this->second,other.second));
│ │ │ +
56 }
│ │ │ +
57 ProductLieGroup inverse() const {
│ │ │ +
58 return ProductLieGroup(traits<G>::Inverse(this->first), traits<H>::Inverse(this->second));
│ │ │ +
59 }
│ │ │ +
60 ProductLieGroup compose(const ProductLieGroup& g) const {
│ │ │ +
61 return (*this) * g;
│ │ │ +
62 }
│ │ │ +
63 ProductLieGroup between(const ProductLieGroup& g) const {
│ │ │ +
64 return this->inverse() * g;
│ │ │ +
65 }
│ │ │ +
67
│ │ │ +
70 enum {dimension = dimension1 + dimension2};
│ │ │ +
71 inline static size_t Dim() {return dimension;}
│ │ │ +
72 inline size_t dim() const {return dimension;}
│ │ │ +
73
│ │ │ +
74 typedef Eigen::Matrix<double, dimension, 1> TangentVector;
│ │ │ +
75 typedef OptionalJacobian<dimension, dimension> ChartJacobian;
│ │ │ +
76
│ │ │ +
77 ProductLieGroup retract(const TangentVector& v, //
│ │ │ +
78 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) const {
│ │ │ +
79 if (H1||H2) throw std::runtime_error("ProductLieGroup::retract derivatives not implemented yet");
│ │ │ +
80 G g = traits<G>::Retract(this->first, v.template head<dimension1>());
│ │ │ +
81 H h = traits<H>::Retract(this->second, v.template tail<dimension2>());
│ │ │ +
82 return ProductLieGroup(g,h);
│ │ │ +
83 }
│ │ │ +
84 TangentVector localCoordinates(const ProductLieGroup& g, //
│ │ │ +
85 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) const {
│ │ │ +
86 if (H1||H2) throw std::runtime_error("ProductLieGroup::localCoordinates derivatives not implemented yet");
│ │ │ +
87 typename traits<G>::TangentVector v1 = traits<G>::Local(this->first, g.first);
│ │ │ +
88 typename traits<H>::TangentVector v2 = traits<H>::Local(this->second, g.second);
│ │ │ +
89 TangentVector v;
│ │ │ +
90 v << v1, v2;
│ │ │ +
91 return v;
│ │ │ +
92 }
│ │ │ +
94
│ │ │ +
97protected:
│ │ │ +
98 typedef Eigen::Matrix<double, dimension, dimension> Jacobian;
│ │ │ +
99 typedef Eigen::Matrix<double, dimension1, dimension1> Jacobian1;
│ │ │ +
100 typedef Eigen::Matrix<double, dimension2, dimension2> Jacobian2;
│ │ │
101
│ │ │ -
102 // Step 9: Let t_w = T_w^{w_i}, r_2 = random(t_w, 1) and v_i’s key: k_i
│ │ │ -
103 // = (r_2)^{1/w_i} (Mod: Let t_w = log(T_w) * {w_i}, e_2 =
│ │ │ -
104 // log(random(e^{t_w}, 1)) and v_i’s key: k_i = -e_2 / w_i)
│ │ │ -
105 const double t_w = -T_w.first * *it;
│ │ │ -
106 std::uniform_real_distribution<double> randomAngle(std::exp(t_w), 1.0);
│ │ │ -
107 const double e_2 = std::log(randomAngle(*engine_));
│ │ │ -
108 const double k_i = -e_2 / *it;
│ │ │ -
109
│ │ │ -
110 // Step 8: The item in reservoir with the minimum key is replaced by
│ │ │ -
111 // item v_i
│ │ │ -
112 reservoir.pop();
│ │ │ -
113 reservoir.push(std::make_pair(k_i, it - weights.begin() + 1));
│ │ │ -
114 }
│ │ │ -
115 }
│ │ │ -
116
│ │ │ -
117 for (auto iret = result.end(); iret != result.begin();) {
│ │ │ -
118 --iret;
│ │ │ -
119
│ │ │ -
120 if (reservoir.empty()) {
│ │ │ -
121 throw std::runtime_error(
│ │ │ -
122 "Reservoir empty before all elements have been filled");
│ │ │ -
123 }
│ │ │ -
124
│ │ │ -
125 *iret = reservoir.top().second - 1;
│ │ │ -
126 reservoir.pop();
│ │ │ -
127 }
│ │ │ -
128
│ │ │ -
129 if (!reservoir.empty()) {
│ │ │ -
130 throw std::runtime_error(
│ │ │ -
131 "Reservoir not empty after all elements have been filled");
│ │ │ -
132 }
│ │ │ -
133
│ │ │ -
134 return result;
│ │ │ -
135 }
│ │ │ -
136}; // namespace gtsam
│ │ │ +
102public:
│ │ │ +
103 ProductLieGroup compose(const ProductLieGroup& other, ChartJacobian H1,
│ │ │ +
104 ChartJacobian H2 = boost::none) const {
│ │ │ +
105 Jacobian1 D_g_first; Jacobian2 D_h_second;
│ │ │ +
106 G g = traits<G>::Compose(this->first,other.first, H1 ? &D_g_first : 0);
│ │ │ +
107 H h = traits<H>::Compose(this->second,other.second, H1 ? &D_h_second : 0);
│ │ │ +
108 if (H1) {
│ │ │ +
109 H1->setZero();
│ │ │ +
110 H1->template topLeftCorner<dimension1,dimension1>() = D_g_first;
│ │ │ +
111 H1->template bottomRightCorner<dimension2,dimension2>() = D_h_second;
│ │ │ +
112 }
│ │ │ +
113 if (H2) *H2 = Jacobian::Identity();
│ │ │ +
114 return ProductLieGroup(g,h);
│ │ │ +
115 }
│ │ │ +
116 ProductLieGroup between(const ProductLieGroup& other, ChartJacobian H1,
│ │ │ +
117 ChartJacobian H2 = boost::none) const {
│ │ │ +
118 Jacobian1 D_g_first; Jacobian2 D_h_second;
│ │ │ +
119 G g = traits<G>::Between(this->first,other.first, H1 ? &D_g_first : 0);
│ │ │ +
120 H h = traits<H>::Between(this->second,other.second, H1 ? &D_h_second : 0);
│ │ │ +
121 if (H1) {
│ │ │ +
122 H1->setZero();
│ │ │ +
123 H1->template topLeftCorner<dimension1,dimension1>() = D_g_first;
│ │ │ +
124 H1->template bottomRightCorner<dimension2,dimension2>() = D_h_second;
│ │ │ +
125 }
│ │ │ +
126 if (H2) *H2 = Jacobian::Identity();
│ │ │ +
127 return ProductLieGroup(g,h);
│ │ │ +
128 }
│ │ │ +
129 ProductLieGroup inverse(ChartJacobian D) const {
│ │ │ +
130 Jacobian1 D_g_first; Jacobian2 D_h_second;
│ │ │ +
131 G g = traits<G>::Inverse(this->first, D ? &D_g_first : 0);
│ │ │ +
132 H h = traits<H>::Inverse(this->second, D ? &D_h_second : 0);
│ │ │ +
133 if (D) {
│ │ │ +
134 D->setZero();
│ │ │ +
135 D->template topLeftCorner<dimension1,dimension1>() = D_g_first;
│ │ │ +
136 D->template bottomRightCorner<dimension2,dimension2>() = D_h_second;
│ │ │ +
137 }
│ │ │ +
138 return ProductLieGroup(g,h);
│ │ │ +
139 }
│ │ │ +
140 static ProductLieGroup Expmap(const TangentVector& v, ChartJacobian Hv = boost::none) {
│ │ │ +
141 Jacobian1 D_g_first; Jacobian2 D_h_second;
│ │ │ +
142 G g = traits<G>::Expmap(v.template head<dimension1>(), Hv ? &D_g_first : 0);
│ │ │ +
143 H h = traits<H>::Expmap(v.template tail<dimension2>(), Hv ? &D_h_second : 0);
│ │ │ +
144 if (Hv) {
│ │ │ +
145 Hv->setZero();
│ │ │ +
146 Hv->template topLeftCorner<dimension1,dimension1>() = D_g_first;
│ │ │ +
147 Hv->template bottomRightCorner<dimension2,dimension2>() = D_h_second;
│ │ │ +
148 }
│ │ │ +
149 return ProductLieGroup(g,h);
│ │ │ +
150 }
│ │ │ +
151 static TangentVector Logmap(const ProductLieGroup& p, ChartJacobian Hp = boost::none) {
│ │ │ +
152 Jacobian1 D_g_first; Jacobian2 D_h_second;
│ │ │ +
153 typename traits<G>::TangentVector v1 = traits<G>::Logmap(p.first, Hp ? &D_g_first : 0);
│ │ │ +
154 typename traits<H>::TangentVector v2 = traits<H>::Logmap(p.second, Hp ? &D_h_second : 0);
│ │ │ +
155 TangentVector v;
│ │ │ +
156 v << v1, v2;
│ │ │ +
157 if (Hp) {
│ │ │ +
158 Hp->setZero();
│ │ │ +
159 Hp->template topLeftCorner<dimension1,dimension1>() = D_g_first;
│ │ │ +
160 Hp->template bottomRightCorner<dimension2,dimension2>() = D_h_second;
│ │ │ +
161 }
│ │ │ +
162 return v;
│ │ │ +
163 }
│ │ │ +
164 static TangentVector LocalCoordinates(const ProductLieGroup& p, ChartJacobian Hp = boost::none) {
│ │ │ +
165 return Logmap(p, Hp);
│ │ │ +
166 }
│ │ │ +
167 ProductLieGroup expmap(const TangentVector& v) const {
│ │ │ +
168 return compose(ProductLieGroup::Expmap(v));
│ │ │ +
169 }
│ │ │ +
170 TangentVector logmap(const ProductLieGroup& g) const {
│ │ │ +
171 return ProductLieGroup::Logmap(between(g));
│ │ │ +
172 }
│ │ │ +
174
│ │ │ +
175};
│ │ │
│ │ │ -
137} // namespace gtsam
│ │ │ +
176
│ │ │ +
177// Define any direct product group to be a model of the multiplicative Group concept
│ │ │ +
178template<typename G, typename H>
│ │ │ +
179struct traits<ProductLieGroup<G, H> > : internal::LieGroupTraits<ProductLieGroup<G, H> > {};
│ │ │ +
180
│ │ │ +
181} // namespace gtsam
│ │ │ +
182
│ │ │ +
Base class and basic functions for Lie types.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
Definition WeightedSampler.h:37
│ │ │ -
WeightedSampler(Engine *engine)
Construct from random number generation engine We only store a pointer to it.
Definition WeightedSampler.h:46
│ │ │ +
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ +
A helper class that implements the traits interface for GTSAM lie groups.
Definition Lie.h:174
│ │ │ +
Lie Group Concept.
Definition Lie.h:260
│ │ │ +
Template to construct the product Lie group of two other Lie groups Assumes Lie group structure for G...
Definition ProductLieGroup.h:29
│ │ │ +
ProductLieGroup()
Default constructor yields identity.
Definition ProductLieGroup.h:40
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ @@ -1 +1 @@ │ │ │ │ -utf-8 │ │ │ │ +us-ascii │ │ │ ├── html2text {} │ │ │ │ @@ -1,150 +1,213 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -WeightedSampler.h │ │ │ │ +ProductLieGroup.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ -10 * ------------------------------------------------------------------------- │ │ │ │ +10 * -------------------------------1------------------------------------------ │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ 19#pragma once │ │ │ │ 20 │ │ │ │ -21#include │ │ │ │ -22#include │ │ │ │ -23#include │ │ │ │ -24#include │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27 │ │ │ │ -28namespace _g_t_s_a_m { │ │ │ │ -29/* │ │ │ │ -30 * Fast sampling without replacement. │ │ │ │ -31 * Example usage: │ │ │ │ -32 * std::mt19937 rng(42); │ │ │ │ -33 * WeightedSampler sampler(&rng); │ │ │ │ -34 * auto samples = sampler.sampleWithoutReplacement(5, weights); │ │ │ │ -35 */ │ │ │ │ -36template │ │ │ │ -_3_7class _W_e_i_g_h_t_e_d_S_a_m_p_l_e_r { │ │ │ │ -38 private: │ │ │ │ -39 Engine* engine_; // random number generation engine │ │ │ │ -40 │ │ │ │ -41 public: │ │ │ │ -_4_6 explicit _W_e_i_g_h_t_e_d_S_a_m_p_l_e_r(Engine* engine) : engine_(engine) {} │ │ │ │ +21#include <_g_t_s_a_m_/_b_a_s_e_/_L_i_e_._h> │ │ │ │ +22#include // pair │ │ │ │ +23 │ │ │ │ +24namespace _g_t_s_a_m { │ │ │ │ +25 │ │ │ │ +28template │ │ │ │ +_2_9class _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p: public std::pair { │ │ │ │ +30 BOOST_CONCEPT_ASSERT((_I_s_L_i_e_G_r_o_u_p_<_G_>)); │ │ │ │ +31 BOOST_CONCEPT_ASSERT((_I_s_L_i_e_G_r_o_u_p_<_H_>)); │ │ │ │ +32 typedef std::pair Base; │ │ │ │ +33 │ │ │ │ +34protected: │ │ │ │ +35 enum {dimension1 = _t_r_a_i_t_s_<_G_>_:_:_d_i_m_e_n_s_i_o_n}; │ │ │ │ +36 enum {dimension2 = _t_r_a_i_t_s_<_H_>_:_:_d_i_m_e_n_s_i_o_n}; │ │ │ │ +37 │ │ │ │ +38public: │ │ │ │ +_4_0 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p():Base(_t_r_a_i_t_s::Identity(),_t_r_a_i_t_s::Identity()) {} │ │ │ │ +41 │ │ │ │ +42 // Construct from two subgroup elements │ │ │ │ +43 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(const G& g, const H& h):Base(g,h) {} │ │ │ │ +44 │ │ │ │ +45 // Construct from base │ │ │ │ +46 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(const Base& base):Base(base) {} │ │ │ │ 47 │ │ │ │ -48 std::vector sampleWithoutReplacement( │ │ │ │ -49 size_t numSamples, const std::vector& weights) { │ │ │ │ -50 // Implementation adapted from code accompanying paper at │ │ │ │ -51 // https://www.ethz.ch/content/dam/ethz/special-interest/baug/ivt/ivt-dam/ │ │ │ │ -vpl/reports/1101-1200/ab1141.pdf │ │ │ │ -52 const size_t n = weights.size(); │ │ │ │ -53 if (n < numSamples) { │ │ │ │ -54 throw std::runtime_error( │ │ │ │ -55 "numSamples must be smaller than weights.size()"); │ │ │ │ +50 typedef multiplicative_group_tag group_flavor; │ │ │ │ +51 static _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p Identity() {return _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p();} │ │ │ │ +52 │ │ │ │ +53 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p operator*(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& other) const { │ │ │ │ +54 return _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(traits::Compose(this->first,other.first), │ │ │ │ +55 traits::Compose(this->second,other.second)); │ │ │ │ 56 } │ │ │ │ -57 │ │ │ │ -58 // Return empty array if numSamples==0 │ │ │ │ -59 std::vector result(numSamples); │ │ │ │ -60 if (numSamples == 0) return result; │ │ │ │ -61 │ │ │ │ -62 // Step 1: The first m items of V are inserted into reservoir │ │ │ │ -63 // Step 2: For each item v_i ∈ reservoir: Calculate a key k_i = u_i^(1/w), │ │ │ │ -64 // where u_i = random(0, 1) │ │ │ │ -65 // (Modification: Calculate and store -log k_i = e_i / w where e_i = exp(1), │ │ │ │ -66 // reservoir is a priority queue that pops the *maximum* elements) │ │ │ │ -67 std::priority_queue > reservoir; │ │ │ │ -68 │ │ │ │ -69 static const double kexp1 = std::exp(1.0); │ │ │ │ -70 for (auto it = weights.begin(); it != weights.begin() + numSamples; ++it) { │ │ │ │ -71 const double k_i = kexp1 / *it; │ │ │ │ -72 reservoir.push(std::make_pair(k_i, it - weights.begin() + 1)); │ │ │ │ -73 } │ │ │ │ -74 │ │ │ │ -75 // Step 4: Repeat Steps 5–10 until the population is exhausted │ │ │ │ -76 { │ │ │ │ -77 // Step 3: The threshold T_w is the minimum key of reservoir │ │ │ │ -78 // (Modification: This is now the logarithm) │ │ │ │ -79 // Step 10: The new threshold T w is the new minimum key of reservoir │ │ │ │ -80 const std::pair& T_w = reservoir.top(); │ │ │ │ -81 │ │ │ │ -82 // Incrementing it is part of Step 7 │ │ │ │ -83 for (auto it = weights.begin() + numSamples; it != weights.end(); ++it) { │ │ │ │ -84 // Step 5: Let r = random(0, 1) and X_w = log(r) / log(T_w) │ │ │ │ -85 // (Modification: Use e = -exp(1) instead of log(r)) │ │ │ │ -86 const double X_w = kexp1 / T_w.first; │ │ │ │ -87 │ │ │ │ -88 // Step 6: From the current item v_c skip items until item v_i, such │ │ │ │ -89 // that: │ │ │ │ -90 double w = 0.0; │ │ │ │ -91 │ │ │ │ -92 // Step 7: w_c + w_{c+1} + ··· + w_{i−1} < X_w <= w_c + w_{c+1} + │ │ │ │ -··· + │ │ │ │ -93 // w_{i−1} + w_i │ │ │ │ -94 for (; it != weights.end(); ++it) { │ │ │ │ -95 w += *it; │ │ │ │ -96 if (X_w <= w) break; │ │ │ │ -97 } │ │ │ │ -98 │ │ │ │ -99 // Step 7: No such item, terminate │ │ │ │ -100 if (it == weights.end()) break; │ │ │ │ +57 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p inverse() const { │ │ │ │ +58 return _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(traits::Inverse(this->first), traits::Inverse │ │ │ │ +(this->second)); │ │ │ │ +59 } │ │ │ │ +60 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p compose(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& g) const { │ │ │ │ +61 return (*this) * g; │ │ │ │ +62 } │ │ │ │ +63 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p between(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& g) const { │ │ │ │ +64 return this->inverse() * g; │ │ │ │ +65 } │ │ │ │ +67 │ │ │ │ +70 enum {dimension = dimension1 + dimension2}; │ │ │ │ +71 inline static size_t Dim() {return dimension;} │ │ │ │ +72 inline size_t dim() const {return dimension;} │ │ │ │ +73 │ │ │ │ +74 typedef Eigen::Matrix TangentVector; │ │ │ │ +75 typedef OptionalJacobian ChartJacobian; │ │ │ │ +76 │ │ │ │ +77 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p retract(const TangentVector& v, // │ │ │ │ +78 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) const { │ │ │ │ +79 if (H1||H2) throw std::runtime_error("ProductLieGroup::retract derivatives │ │ │ │ +not implemented yet"); │ │ │ │ +80 G g = traits::Retract(this->first, v.template head()); │ │ │ │ +81 H h = traits::Retract(this->second, v.template tail()); │ │ │ │ +82 return _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(g,h); │ │ │ │ +83 } │ │ │ │ +84 TangentVector localCoordinates(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& g, // │ │ │ │ +85 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) const { │ │ │ │ +86 if (H1||H2) throw std::runtime_error("ProductLieGroup::localCoordinates │ │ │ │ +derivatives not implemented yet"); │ │ │ │ +87 typename traits::TangentVector v1 = traits::Local(this->first, │ │ │ │ +g.first); │ │ │ │ +88 typename traits::TangentVector v2 = traits::Local(this->second, │ │ │ │ +g.second); │ │ │ │ +89 TangentVector v; │ │ │ │ +90 v << v1, v2; │ │ │ │ +91 return v; │ │ │ │ +92 } │ │ │ │ +94 │ │ │ │ +97protected: │ │ │ │ +98 typedef Eigen::Matrix Jacobian; │ │ │ │ +99 typedef Eigen::Matrix Jacobian1; │ │ │ │ +100 typedef Eigen::Matrix Jacobian2; │ │ │ │ 101 │ │ │ │ -102 // Step 9: Let t_w = T_w^{w_i}, r_2 = random(t_w, 1) and v_i’s key: k_i │ │ │ │ -103 // = (r_2)^{1/w_i} (Mod: Let t_w = log(T_w) * {w_i}, e_2 = │ │ │ │ -104 // log(random(e^{t_w}, 1)) and v_i’s key: k_i = -e_2 / w_i) │ │ │ │ -105 const double t_w = -T_w.first * *it; │ │ │ │ -106 std::uniform_real_distribution randomAngle(std::exp(t_w), 1.0); │ │ │ │ -107 const double e_2 = std::log(randomAngle(*engine_)); │ │ │ │ -108 const double k_i = -e_2 / *it; │ │ │ │ -109 │ │ │ │ -110 // Step 8: The item in reservoir with the minimum key is replaced by │ │ │ │ -111 // item v_i │ │ │ │ -112 reservoir.pop(); │ │ │ │ -113 reservoir.push(std::make_pair(k_i, it - weights.begin() + 1)); │ │ │ │ -114 } │ │ │ │ +102public: │ │ │ │ +103 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p compose(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& other, ChartJacobian H1, │ │ │ │ +104 ChartJacobian H2 = boost::none) const { │ │ │ │ +105 Jacobian1 D_g_first; Jacobian2 D_h_second; │ │ │ │ +106 G g = traits::Compose(this->first,other.first, H1 ? &D_g_first : 0); │ │ │ │ +107 H h = traits::Compose(this->second,other.second, H1 ? &D_h_second : 0); │ │ │ │ +108 if (H1) { │ │ │ │ +109 H1->setZero(); │ │ │ │ +110 H1->template topLeftCorner() = D_g_first; │ │ │ │ +111 H1->template bottomRightCorner() = D_h_second; │ │ │ │ +112 } │ │ │ │ +113 if (H2) *H2 = Jacobian::Identity(); │ │ │ │ +114 return _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(g,h); │ │ │ │ 115 } │ │ │ │ -116 │ │ │ │ -117 for (auto iret = result.end(); iret != result.begin();) { │ │ │ │ -118 --iret; │ │ │ │ -119 │ │ │ │ -120 if (reservoir.empty()) { │ │ │ │ -121 throw std::runtime_error( │ │ │ │ -122 "Reservoir empty before all elements have been filled"); │ │ │ │ -123 } │ │ │ │ -124 │ │ │ │ -125 *iret = reservoir.top().second - 1; │ │ │ │ -126 reservoir.pop(); │ │ │ │ -127 } │ │ │ │ -128 │ │ │ │ -129 if (!reservoir.empty()) { │ │ │ │ -130 throw std::runtime_error( │ │ │ │ -131 "Reservoir not empty after all elements have been filled"); │ │ │ │ -132 } │ │ │ │ -133 │ │ │ │ -134 return result; │ │ │ │ -135 } │ │ │ │ -136}; // namespace gtsam │ │ │ │ -137} // namespace gtsam │ │ │ │ +116 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p between(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& other, ChartJacobian H1, │ │ │ │ +117 ChartJacobian H2 = boost::none) const { │ │ │ │ +118 Jacobian1 D_g_first; Jacobian2 D_h_second; │ │ │ │ +119 G g = traits::Between(this->first,other.first, H1 ? &D_g_first : 0); │ │ │ │ +120 H h = traits::Between(this->second,other.second, H1 ? &D_h_second : 0); │ │ │ │ +121 if (H1) { │ │ │ │ +122 H1->setZero(); │ │ │ │ +123 H1->template topLeftCorner() = D_g_first; │ │ │ │ +124 H1->template bottomRightCorner() = D_h_second; │ │ │ │ +125 } │ │ │ │ +126 if (H2) *H2 = Jacobian::Identity(); │ │ │ │ +127 return _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(g,h); │ │ │ │ +128 } │ │ │ │ +129 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p inverse(ChartJacobian D) const { │ │ │ │ +130 Jacobian1 D_g_first; Jacobian2 D_h_second; │ │ │ │ +131 G g = traits::Inverse(this->first, D ? &D_g_first : 0); │ │ │ │ +132 H h = traits::Inverse(this->second, D ? &D_h_second : 0); │ │ │ │ +133 if (D) { │ │ │ │ +134 D->setZero(); │ │ │ │ +135 D->template topLeftCorner() = D_g_first; │ │ │ │ +136 D->template bottomRightCorner() = D_h_second; │ │ │ │ +137 } │ │ │ │ +138 return _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(g,h); │ │ │ │ +139 } │ │ │ │ +140 static _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p Expmap(const TangentVector& v, ChartJacobian Hv = │ │ │ │ +boost::none) { │ │ │ │ +141 Jacobian1 D_g_first; Jacobian2 D_h_second; │ │ │ │ +142 G g = traits::Expmap(v.template head(), Hv ? &D_g_first : │ │ │ │ +0); │ │ │ │ +143 H h = traits::Expmap(v.template tail(), Hv ? &D_h_second : │ │ │ │ +0); │ │ │ │ +144 if (Hv) { │ │ │ │ +145 Hv->setZero(); │ │ │ │ +146 Hv->template topLeftCorner() = D_g_first; │ │ │ │ +147 Hv->template bottomRightCorner() = D_h_second; │ │ │ │ +148 } │ │ │ │ +149 return _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(g,h); │ │ │ │ +150 } │ │ │ │ +151 static TangentVector Logmap(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& p, ChartJacobian Hp = │ │ │ │ +boost::none) { │ │ │ │ +152 Jacobian1 D_g_first; Jacobian2 D_h_second; │ │ │ │ +153 typename traits::TangentVector v1 = traits::Logmap(p.first, Hp ? │ │ │ │ +&D_g_first : 0); │ │ │ │ +154 typename traits::TangentVector v2 = traits::Logmap(p.second, Hp ? │ │ │ │ +&D_h_second : 0); │ │ │ │ +155 TangentVector v; │ │ │ │ +156 v << v1, v2; │ │ │ │ +157 if (Hp) { │ │ │ │ +158 Hp->setZero(); │ │ │ │ +159 Hp->template topLeftCorner() = D_g_first; │ │ │ │ +160 Hp->template bottomRightCorner() = D_h_second; │ │ │ │ +161 } │ │ │ │ +162 return v; │ │ │ │ +163 } │ │ │ │ +164 static TangentVector LocalCoordinates(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& p, │ │ │ │ +ChartJacobian Hp = boost::none) { │ │ │ │ +165 return Logmap(p, Hp); │ │ │ │ +166 } │ │ │ │ +167 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p expmap(const TangentVector& v) const { │ │ │ │ +168 return compose(ProductLieGroup::Expmap(v)); │ │ │ │ +169 } │ │ │ │ +170 TangentVector logmap(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& g) const { │ │ │ │ +171 return ProductLieGroup::Logmap(between(g)); │ │ │ │ +172 } │ │ │ │ +174 │ │ │ │ +175}; │ │ │ │ +176 │ │ │ │ +177// Define any direct product group to be a model of the multiplicative Group │ │ │ │ +concept │ │ │ │ +178template │ │ │ │ +_1_7_9struct _t_r_a_i_t_s<_P_r_o_d_u_c_t_L_i_e_G_r_o_u_p > : _i_n_t_e_r_n_a_l_:_: │ │ │ │ +_L_i_e_G_r_o_u_p_T_r_a_i_t_s > {}; │ │ │ │ +180 │ │ │ │ +181} // namespace gtsam │ │ │ │ +182 │ │ │ │ +_L_i_e_._h │ │ │ │ +Base class and basic functions for Lie types. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_W_e_i_g_h_t_e_d_S_a_m_p_l_e_r │ │ │ │ -DDeeffiinniittiioonn WeightedSampler.h:37 │ │ │ │ -_g_t_s_a_m_:_:_W_e_i_g_h_t_e_d_S_a_m_p_l_e_r_:_:_W_e_i_g_h_t_e_d_S_a_m_p_l_e_r │ │ │ │ -WeightedSampler(Engine *engine) │ │ │ │ -Construct from random number generation engine We only store a pointer to it. │ │ │ │ -DDeeffiinniittiioonn WeightedSampler.h:46 │ │ │ │ +_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ +A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ +that can be centered ... │ │ │ │ +DDeeffiinniittiioonn concepts.h:30 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p_T_r_a_i_t_s │ │ │ │ +A helper class that implements the traits interface for GTSAM lie groups. │ │ │ │ +DDeeffiinniittiioonn Lie.h:174 │ │ │ │ +_g_t_s_a_m_:_:_I_s_L_i_e_G_r_o_u_p │ │ │ │ +Lie Group Concept. │ │ │ │ +DDeeffiinniittiioonn Lie.h:260 │ │ │ │ +_g_t_s_a_m_:_:_P_r_o_d_u_c_t_L_i_e_G_r_o_u_p │ │ │ │ +Template to construct the product Lie group of two other Lie groups Assumes Lie │ │ │ │ +group structure for G... │ │ │ │ +DDeeffiinniittiioonn ProductLieGroup.h:29 │ │ │ │ +_g_t_s_a_m_:_:_P_r_o_d_u_c_t_L_i_e_G_r_o_u_p_:_:_P_r_o_d_u_c_t_L_i_e_G_r_o_u_p │ │ │ │ +ProductLieGroup() │ │ │ │ +Default constructor yields identity. │ │ │ │ +DDeeffiinniittiioonn ProductLieGroup.h:40 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _W_e_i_g_h_t_e_d_S_a_m_p_l_e_r_._h │ │ │ │ + * _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00062.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/VerticalBlockMatrix.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/FastDefaultAllocator.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,44 +95,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
VerticalBlockMatrix.h File Reference
│ │ │ +Namespaces | │ │ │ +Macros
│ │ │ +
FastDefaultAllocator.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

A matrix with column blocks of pre-defined sizes. │ │ │ +

An easy way to control which allocator is used for Fast* collections. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │

│ │ │ Classes

class  gtsam::VerticalBlockMatrix
 This class stores a dense matrix and allows it to be accessed as a collection of vertical blocks. More...
struct  gtsam::internal::FastDefaultAllocator< T >
 Default allocator for list, map, and set types. More...
 
struct  gtsam::internal::FastDefaultVectorAllocator< T >
 Default allocator for vector types (we never use boost pool for vectors) More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │

Detailed Description

│ │ │ -

A matrix with column blocks of pre-defined sizes.

│ │ │ -

Used in JacobianFactor and GaussianConditional.

Author
Richard Roberts
│ │ │ -
Date
Sep 18, 2010
│ │ │ +

An easy way to control which allocator is used for Fast* collections.

│ │ │ +
Author
Richard Roberts
│ │ │ +
Date
Aug 15, 2013
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,29 +1,31 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -VerticalBlockMatrix.h File Reference │ │ │ │ -A matrix with column blocks of pre-defined sizes. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ +FastDefaultAllocator.h File Reference │ │ │ │ +An easy way to control which allocator is used for Fast* collections. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ -  This class stores a dense matrix and allows it to be accessed as a │ │ │ │ - collection of vertical blocks. _M_o_r_e_._._. │ │ │ │ +struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r_<_ _T_ _> │ │ │ │ +  Default allocator for list, map, and set types. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_F_a_s_t_D_e_f_a_u_l_t_V_e_c_t_o_r_A_l_l_o_c_a_t_o_r_<_ _T_ _> │ │ │ │ +  Default allocator for vector types (we never use boost pool for │ │ │ │ + vectors) _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A matrix with column blocks of pre-defined sizes. │ │ │ │ -Used in _J_a_c_o_b_i_a_n_F_a_c_t_o_r and _G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l. │ │ │ │ +An easy way to control which allocator is used for Fast* collections. │ │ │ │ Author │ │ │ │ Richard Roberts │ │ │ │ Date │ │ │ │ - Sep 18, 2010 │ │ │ │ + Aug 15, 2013 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_._h │ │ │ │ + * _F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00062_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/VerticalBlockMatrix.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/FastDefaultAllocator.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,252 +98,106 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
VerticalBlockMatrix.h
│ │ │ +
FastDefaultAllocator.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
18#pragma once
│ │ │ -
19
│ │ │ -
20#include <gtsam/base/Matrix.h>
│ │ │ - │ │ │ - │ │ │ -
23
│ │ │ -
24namespace gtsam {
│ │ │ -
25
│ │ │ -
26 // Forward declarations
│ │ │ -
27 class SymmetricBlockMatrix;
│ │ │ -
28
│ │ │ -
│ │ │ -
42 class GTSAM_EXPORT VerticalBlockMatrix
│ │ │ -
43 {
│ │ │ -
44 public:
│ │ │ - │ │ │ -
46 typedef Eigen::Block<Matrix> Block;
│ │ │ -
47 typedef Eigen::Block<const Matrix> constBlock;
│ │ │ -
48
│ │ │ -
49 protected:
│ │ │ -
50 Matrix matrix_;
│ │ │ - │ │ │ -
52
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
56
│ │ │ -
57 public:
│ │ │ -
58
│ │ │ -
│ │ │ - │ │ │ -
61 rowStart_(0), rowEnd_(0), blockStart_(0)
│ │ │ -
62 {
│ │ │ -
63 variableColOffsets_.push_back(0);
│ │ │ -
64 assertInvariants();
│ │ │ -
65 }
│ │ │ -
│ │ │ -
66
│ │ │ -
68 template<typename CONTAINER>
│ │ │ -
│ │ │ -
69 VerticalBlockMatrix(const CONTAINER& dimensions, DenseIndex height,
│ │ │ -
70 bool appendOneDimension = false) :
│ │ │ -
71 variableColOffsets_(dimensions.size() + (appendOneDimension ? 2 : 1)),
│ │ │ -
72 rowStart_(0), rowEnd_(height), blockStart_(0) {
│ │ │ -
73 fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension);
│ │ │ -
74 matrix_.resize(height, variableColOffsets_.back());
│ │ │ -
75 assertInvariants();
│ │ │ -
76 }
│ │ │ -
│ │ │ -
77
│ │ │ -
79 template<typename CONTAINER, typename DERIVED>
│ │ │ -
│ │ │ -
80 VerticalBlockMatrix(const CONTAINER& dimensions,
│ │ │ -
81 const Eigen::MatrixBase<DERIVED>& matrix, bool appendOneDimension = false) :
│ │ │ -
82 matrix_(matrix), variableColOffsets_(dimensions.size() + (appendOneDimension ? 2 : 1)),
│ │ │ -
83 rowStart_(0), rowEnd_(matrix.rows()), blockStart_(0) {
│ │ │ -
84 fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension);
│ │ │ -
85 if (variableColOffsets_.back() != matrix_.cols())
│ │ │ -
86 throw std::invalid_argument(
│ │ │ -
87 "Requested to create a VerticalBlockMatrix with dimensions that do not sum to the total columns of the provided matrix.");
│ │ │ -
88 assertInvariants();
│ │ │ -
89 }
│ │ │ -
│ │ │ -
90
│ │ │ -
92 template<typename ITERATOR>
│ │ │ -
│ │ │ -
93 VerticalBlockMatrix(ITERATOR firstBlockDim, ITERATOR lastBlockDim,
│ │ │ -
94 DenseIndex height, bool appendOneDimension = false) :
│ │ │ -
95 variableColOffsets_((lastBlockDim-firstBlockDim) + (appendOneDimension ? 2 : 1)),
│ │ │ -
96 rowStart_(0), rowEnd_(height), blockStart_(0) {
│ │ │ -
97 fillOffsets(firstBlockDim, lastBlockDim, appendOneDimension);
│ │ │ -
98 matrix_.resize(height, variableColOffsets_.back());
│ │ │ -
99 assertInvariants();
│ │ │ -
100 }
│ │ │ -
│ │ │ -
101
│ │ │ -
107 static VerticalBlockMatrix LikeActiveViewOf(const VerticalBlockMatrix& rhs);
│ │ │ -
108
│ │ │ -
112 static VerticalBlockMatrix LikeActiveViewOf(const SymmetricBlockMatrix& rhs, DenseIndex height);
│ │ │ -
113
│ │ │ -
115 DenseIndex rows() const { assertInvariants(); return rowEnd_ - rowStart_; }
│ │ │ -
116
│ │ │ -
118 DenseIndex cols() const { assertInvariants(); return variableColOffsets_.back() - variableColOffsets_[blockStart_]; }
│ │ │ -
119
│ │ │ -
121 DenseIndex nBlocks() const { assertInvariants(); return variableColOffsets_.size() - 1 - blockStart_; }
│ │ │ -
122
│ │ │ -
124 Block operator()(DenseIndex block) { return range(block, block+1); }
│ │ │ -
125
│ │ │ -
127 const constBlock operator()(DenseIndex block) const { return range(block, block+1); }
│ │ │ -
128
│ │ │ -
│ │ │ -
130 Block range(DenseIndex startBlock, DenseIndex endBlock) {
│ │ │ -
131 assertInvariants();
│ │ │ -
132 DenseIndex actualStartBlock = startBlock + blockStart_;
│ │ │ -
133 DenseIndex actualEndBlock = endBlock + blockStart_;
│ │ │ -
134 if(startBlock != 0 || endBlock != 0) {
│ │ │ -
135 checkBlock(actualStartBlock);
│ │ │ -
136 assert(actualEndBlock < (DenseIndex)variableColOffsets_.size());
│ │ │ -
137 }
│ │ │ -
138 const DenseIndex startCol = variableColOffsets_[actualStartBlock];
│ │ │ -
139 const DenseIndex rangeCols = variableColOffsets_[actualEndBlock] - startCol;
│ │ │ -
140 return matrix_.block(rowStart_, startCol, this->rows(), rangeCols);
│ │ │ -
141 }
│ │ │ -
│ │ │ -
142
│ │ │ -
143 const constBlock range(DenseIndex startBlock, DenseIndex endBlock) const {
│ │ │ -
144 assertInvariants();
│ │ │ -
145 DenseIndex actualStartBlock = startBlock + blockStart_;
│ │ │ -
146 DenseIndex actualEndBlock = endBlock + blockStart_;
│ │ │ -
147 if(startBlock != 0 || endBlock != 0) {
│ │ │ -
148 checkBlock(actualStartBlock);
│ │ │ -
149 assert(actualEndBlock < (DenseIndex)variableColOffsets_.size());
│ │ │ -
150 }
│ │ │ -
151 const DenseIndex startCol = variableColOffsets_[actualStartBlock];
│ │ │ -
152 const DenseIndex rangeCols = variableColOffsets_[actualEndBlock] - startCol;
│ │ │ -
153 return ((const Matrix&)matrix_).block(rowStart_, startCol, this->rows(), rangeCols);
│ │ │ -
154 }
│ │ │ -
155
│ │ │ -
157 Block full() { return range(0, nBlocks()); }
│ │ │ -
158
│ │ │ -
160 const constBlock full() const { return range(0, nBlocks()); }
│ │ │ -
161
│ │ │ -
162 DenseIndex offset(DenseIndex block) const {
│ │ │ -
163 assertInvariants();
│ │ │ -
164 DenseIndex actualBlock = block + blockStart_;
│ │ │ -
165 checkBlock(actualBlock);
│ │ │ -
166 return variableColOffsets_[actualBlock];
│ │ │ -
167 }
│ │ │ -
168
│ │ │ -
170 const DenseIndex& rowStart() const { return rowStart_; }
│ │ │ -
171
│ │ │ -
173 DenseIndex& rowStart() { return rowStart_; }
│ │ │ -
174
│ │ │ -
176 const DenseIndex& rowEnd() const { return rowEnd_; }
│ │ │ -
177
│ │ │ -
179 DenseIndex& rowEnd() { return rowEnd_; }
│ │ │ -
180
│ │ │ -
182 const DenseIndex& firstBlock() const { return blockStart_; }
│ │ │ -
183
│ │ │ -
185 DenseIndex& firstBlock() { return blockStart_; }
│ │ │ -
186
│ │ │ -
188 const Matrix& matrix() const { return matrix_; }
│ │ │ -
189
│ │ │ -
191 Matrix& matrix() { return matrix_; }
│ │ │ -
192
│ │ │ -
193 protected:
│ │ │ -
194 void assertInvariants() const {
│ │ │ -
195 assert(matrix_.cols() == variableColOffsets_.back());
│ │ │ -
196 assert(blockStart_ < (DenseIndex)variableColOffsets_.size());
│ │ │ -
197 assert(rowStart_ <= matrix_.rows());
│ │ │ -
198 assert(rowEnd_ <= matrix_.rows());
│ │ │ -
199 assert(rowStart_ <= rowEnd_);
│ │ │ -
200 }
│ │ │ -
201
│ │ │ -
202 void checkBlock(DenseIndex block) const {
│ │ │ -
203 static_cast<void>(block); //Disable unused varibale warnings.
│ │ │ -
204 assert(matrix_.cols() == variableColOffsets_.back());
│ │ │ -
205 assert(block < (DenseIndex)variableColOffsets_.size() - 1);
│ │ │ -
206 assert(variableColOffsets_[block] < matrix_.cols() && variableColOffsets_[block+1] <= matrix_.cols());
│ │ │ -
207 }
│ │ │ -
208
│ │ │ -
209 template<typename ITERATOR>
│ │ │ -
210 void fillOffsets(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool appendOneDimension) {
│ │ │ -
211 variableColOffsets_[0] = 0;
│ │ │ -
212 DenseIndex j=0;
│ │ │ -
213 for(ITERATOR dim=firstBlockDim; dim!=lastBlockDim; ++dim, ++j)
│ │ │ -
214 variableColOffsets_[j+1] = variableColOffsets_[j] + *dim;
│ │ │ -
215 if(appendOneDimension)
│ │ │ -
216 variableColOffsets_[j+1] = variableColOffsets_[j] + 1;
│ │ │ -
217 }
│ │ │ -
218
│ │ │ -
219 friend class SymmetricBlockMatrix;
│ │ │ -
220
│ │ │ -
221 private:
│ │ │ -
223 friend class boost::serialization::access;
│ │ │ -
224 template<class ARCHIVE>
│ │ │ -
225 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
│ │ │ -
226 ar & BOOST_SERIALIZATION_NVP(matrix_);
│ │ │ -
227 ar & BOOST_SERIALIZATION_NVP(variableColOffsets_);
│ │ │ -
228 ar & BOOST_SERIALIZATION_NVP(rowStart_);
│ │ │ -
229 ar & BOOST_SERIALIZATION_NVP(rowEnd_);
│ │ │ -
230 ar & BOOST_SERIALIZATION_NVP(blockStart_);
│ │ │ -
231 }
│ │ │ -
232 };
│ │ │ -
│ │ │ -
233
│ │ │ -
234}
│ │ │ -
Serialization for matrices.
│ │ │ -
typedef and functions to augment Eigen's MatrixXd
│ │ │ -
A thin wrapper around std::vector that uses a custom allocator.
│ │ │ -
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
FastVector is a type alias to a std::vector with a custom memory allocator.
Definition FastVector.h:34
│ │ │ +
19#pragma once
│ │ │ +
20#include <gtsam/config.h> // Configuration from CMake
│ │ │ +
21
│ │ │ +
22#if !defined GTSAM_ALLOCATOR_BOOSTPOOL && !defined GTSAM_ALLOCATOR_TBB && !defined GTSAM_ALLOCATOR_STL
│ │ │ +
23# ifdef GTSAM_USE_TBB
│ │ │ +
24// Use TBB allocator by default if we have TBB, otherwise boost pool
│ │ │ +
25# define GTSAM_ALLOCATOR_TBB
│ │ │ +
26# else
│ │ │ +
27# define GTSAM_ALLOCATOR_BOOSTPOOL
│ │ │ +
28# endif
│ │ │ +
29#endif
│ │ │ +
30
│ │ │ +
31#if defined GTSAM_ALLOCATOR_BOOSTPOOL
│ │ │ +
32# include <boost/pool/pool_alloc.hpp>
│ │ │ +
33#elif defined GTSAM_ALLOCATOR_TBB
│ │ │ +
34# include <tbb/tbb_allocator.h>
│ │ │ +
35# undef min // TBB seems to include Windows.h which defines these macros that cause problems
│ │ │ +
36# undef max
│ │ │ +
37# undef ERROR
│ │ │ +
38#elif defined GTSAM_ALLOCATOR_STL
│ │ │ +
39# include <memory>
│ │ │ +
40#endif
│ │ │ +
41
│ │ │ +
42namespace gtsam
│ │ │ +
43{
│ │ │ +
44
│ │ │ +
45 namespace internal
│ │ │ +
46 {
│ │ │ +
48 template<typename T>
│ │ │ +
│ │ │ + │ │ │ +
50 {
│ │ │ +
51#if defined GTSAM_ALLOCATOR_BOOSTPOOL
│ │ │ +
52 typedef boost::fast_pool_allocator<T> type;
│ │ │ +
53 static const bool isBoost = true;
│ │ │ +
54 static const bool isTBB = false;
│ │ │ +
55 static const bool isSTL = false;
│ │ │ +
56#elif defined GTSAM_ALLOCATOR_TBB
│ │ │ +
57 typedef tbb::tbb_allocator<T> type;
│ │ │ +
58 static const bool isBoost = false;
│ │ │ +
59 static const bool isTBB = true;
│ │ │ +
60 static const bool isSTL = false;
│ │ │ +
61#elif defined GTSAM_ALLOCATOR_STL
│ │ │ +
62 typedef std::allocator<T> type;
│ │ │ +
63 static const bool isBoost = false;
│ │ │ +
64 static const bool isTBB = false;
│ │ │ +
65 static const bool isSTL = true;
│ │ │ +
66#endif
│ │ │ +
67 };
│ │ │ +
│ │ │ +
68
│ │ │ +
70 template<typename T>
│ │ │ +
│ │ │ + │ │ │ +
72 {
│ │ │ +
73#if defined GTSAM_ALLOCATOR_TBB
│ │ │ +
74 typedef tbb::tbb_allocator<T> type;
│ │ │ +
75 static const bool isBoost = false;
│ │ │ +
76 static const bool isTBB = true;
│ │ │ +
77 static const bool isSTL = false;
│ │ │ +
78#else
│ │ │ +
79 typedef std::allocator<T> type;
│ │ │ +
80 static const bool isBoost = false;
│ │ │ +
81 static const bool isTBB = false;
│ │ │ +
82 static const bool isSTL = true;
│ │ │ +
83#endif
│ │ │ +
84 };
│ │ │ +
│ │ │ +
85 }
│ │ │ +
86
│ │ │ +
87}
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
ptrdiff_t DenseIndex
The index type for Eigen objects.
Definition types.h:106
│ │ │ -
This class stores a dense matrix and allows it to be accessed as a collection of blocks.
Definition SymmetricBlockMatrix.h:52
│ │ │ -
This class stores a dense matrix and allows it to be accessed as a collection of vertical blocks.
Definition VerticalBlockMatrix.h:43
│ │ │ -
VerticalBlockMatrix()
Construct an empty VerticalBlockMatrix.
Definition VerticalBlockMatrix.h:60
│ │ │ -
Block full()
Return the full matrix, not including any portions excluded by rowStart(), rowEnd(),...
Definition VerticalBlockMatrix.h:157
│ │ │ -
Block range(DenseIndex startBlock, DenseIndex endBlock)
access ranges of blocks at a time
Definition VerticalBlockMatrix.h:130
│ │ │ -
const DenseIndex & firstBlock() const
Get the apparent first block for all operations.
Definition VerticalBlockMatrix.h:182
│ │ │ -
const Matrix & matrix() const
Access to full matrix (including any portions excluded by rowStart(), rowEnd(), and firstBlock())
Definition VerticalBlockMatrix.h:188
│ │ │ -
VerticalBlockMatrix(const CONTAINER &dimensions, DenseIndex height, bool appendOneDimension=false)
Construct from a container of the sizes of each vertical block.
Definition VerticalBlockMatrix.h:69
│ │ │ -
DenseIndex rowEnd_
Changes apparent matrix view, see main class comment.
Definition VerticalBlockMatrix.h:54
│ │ │ -
const DenseIndex & rowEnd() const
Get the apparent last row (exclusive, i.e.
Definition VerticalBlockMatrix.h:176
│ │ │ -
DenseIndex rows() const
Row size.
Definition VerticalBlockMatrix.h:115
│ │ │ -
Block operator()(DenseIndex block)
Access a single block in the underlying matrix with read/write access.
Definition VerticalBlockMatrix.h:124
│ │ │ -
DenseIndex & firstBlock()
Get or set the apparent first block for all operations.
Definition VerticalBlockMatrix.h:185
│ │ │ -
DenseIndex cols() const
Column size.
Definition VerticalBlockMatrix.h:118
│ │ │ -
VerticalBlockMatrix(ITERATOR firstBlockDim, ITERATOR lastBlockDim, DenseIndex height, bool appendOneDimension=false)
Construct from iterator over the sizes of each vertical block.
Definition VerticalBlockMatrix.h:93
│ │ │ -
const constBlock operator()(DenseIndex block) const
Access a const block view.
Definition VerticalBlockMatrix.h:127
│ │ │ -
const DenseIndex & rowStart() const
Get the apparent first row of the underlying matrix for all operations.
Definition VerticalBlockMatrix.h:170
│ │ │ -
Matrix matrix_
The full matrix.
Definition VerticalBlockMatrix.h:50
│ │ │ -
DenseIndex nBlocks() const
Block count.
Definition VerticalBlockMatrix.h:121
│ │ │ -
const constBlock full() const
Return the full matrix, not including any portions excluded by rowStart(), rowEnd(),...
Definition VerticalBlockMatrix.h:160
│ │ │ -
DenseIndex & rowStart()
Get or set the apparent first row of the underlying matrix for all operations.
Definition VerticalBlockMatrix.h:173
│ │ │ -
Matrix & matrix()
Non-const access to full matrix (including any portions excluded by rowStart(), rowEnd(),...
Definition VerticalBlockMatrix.h:191
│ │ │ -
DenseIndex & rowEnd()
Get or set the apparent last row (exclusive, i.e.
Definition VerticalBlockMatrix.h:179
│ │ │ -
DenseIndex rowStart_
Changes apparent matrix view, see main class comment.
Definition VerticalBlockMatrix.h:53
│ │ │ -
VerticalBlockMatrix(const CONTAINER &dimensions, const Eigen::MatrixBase< DERIVED > &matrix, bool appendOneDimension=false)
Construct from a container of the sizes of each vertical block and a pre-prepared matrix.
Definition VerticalBlockMatrix.h:80
│ │ │ -
DenseIndex blockStart_
Changes apparent matrix view, see main class comment.
Definition VerticalBlockMatrix.h:55
│ │ │ -
FastVector< DenseIndex > variableColOffsets_
the starting columns of each block (0-based)
Definition VerticalBlockMatrix.h:51
│ │ │ +
Default allocator for list, map, and set types.
Definition FastDefaultAllocator.h:50
│ │ │ +
Default allocator for vector types (we never use boost pool for vectors)
Definition FastDefaultAllocator.h:72
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,346 +1,102 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -VerticalBlockMatrix.h │ │ │ │ +FastDefaultAllocator.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -18#pragma once │ │ │ │ -19 │ │ │ │ -20#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_._h> │ │ │ │ -21#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_S_e_r_i_a_l_i_z_a_t_i_o_n_._h> │ │ │ │ -22#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_V_e_c_t_o_r_._h> │ │ │ │ -23 │ │ │ │ -24namespace _g_t_s_a_m { │ │ │ │ -25 │ │ │ │ -26 // Forward declarations │ │ │ │ -27 class SymmetricBlockMatrix; │ │ │ │ -28 │ │ │ │ -_4_2 class GTSAM_EXPORT _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ -43 { │ │ │ │ -44 public: │ │ │ │ -45 typedef _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x _T_h_i_s; │ │ │ │ -46 typedef Eigen::Block Block; │ │ │ │ -47 typedef Eigen::Block constBlock; │ │ │ │ -48 │ │ │ │ -49 protected: │ │ │ │ -_5_0 Matrix _m_a_t_r_i_x__; │ │ │ │ -_5_1 _F_a_s_t_V_e_c_t_o_r_<_D_e_n_s_e_I_n_d_e_x_> _v_a_r_i_a_b_l_e_C_o_l_O_f_f_s_e_t_s__; │ │ │ │ -52 │ │ │ │ -_5_3 _D_e_n_s_e_I_n_d_e_x _r_o_w_S_t_a_r_t__; │ │ │ │ -_5_4 _D_e_n_s_e_I_n_d_e_x _r_o_w_E_n_d__; │ │ │ │ -_5_5 _D_e_n_s_e_I_n_d_e_x _b_l_o_c_k_S_t_a_r_t__; │ │ │ │ -56 │ │ │ │ -57 public: │ │ │ │ -58 │ │ │ │ -_6_0 _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x() : │ │ │ │ -61 rowStart_(0), rowEnd_(0), blockStart_(0) │ │ │ │ -62 { │ │ │ │ -63 variableColOffsets_.push_back(0); │ │ │ │ -64 assertInvariants(); │ │ │ │ -65 } │ │ │ │ -66 │ │ │ │ -68 template │ │ │ │ -_6_9 _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x(const CONTAINER& dimensions, _D_e_n_s_e_I_n_d_e_x height, │ │ │ │ -70 bool appendOneDimension = false) : │ │ │ │ -71 variableColOffsets_(dimensions.size() + (appendOneDimension ? 2 : 1)), │ │ │ │ -72 rowStart_(0), rowEnd_(height), blockStart_(0) { │ │ │ │ -73 fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension); │ │ │ │ -74 matrix_.resize(height, variableColOffsets_.back()); │ │ │ │ -75 assertInvariants(); │ │ │ │ -76 } │ │ │ │ -77 │ │ │ │ -79 template │ │ │ │ -_8_0 _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x(const CONTAINER& dimensions, │ │ │ │ -81 const Eigen::MatrixBase& matrix, bool appendOneDimension = false) : │ │ │ │ -82 matrix_(matrix), variableColOffsets_(dimensions.size() + (appendOneDimension │ │ │ │ -? 2 : 1)), │ │ │ │ -83 rowStart_(0), rowEnd_(matrix.rows()), blockStart_(0) { │ │ │ │ -84 fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension); │ │ │ │ -85 if (variableColOffsets_.back() != matrix_.cols()) │ │ │ │ -86 throw std::invalid_argument( │ │ │ │ -87 "Requested to create a VerticalBlockMatrix with dimensions that do not sum │ │ │ │ -to the total columns of the provided matrix."); │ │ │ │ -88 assertInvariants(); │ │ │ │ -89 } │ │ │ │ -90 │ │ │ │ -92 template │ │ │ │ -_9_3 _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x(ITERATOR firstBlockDim, ITERATOR lastBlockDim, │ │ │ │ -94 _D_e_n_s_e_I_n_d_e_x height, bool appendOneDimension = false) : │ │ │ │ -95 variableColOffsets_((lastBlockDim-firstBlockDim) + (appendOneDimension ? 2 : │ │ │ │ -1)), │ │ │ │ -96 rowStart_(0), rowEnd_(height), blockStart_(0) { │ │ │ │ -97 fillOffsets(firstBlockDim, lastBlockDim, appendOneDimension); │ │ │ │ -98 matrix_.resize(height, variableColOffsets_.back()); │ │ │ │ -99 assertInvariants(); │ │ │ │ -100 } │ │ │ │ -101 │ │ │ │ -107 static _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x LikeActiveViewOf(const _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x& │ │ │ │ -rhs); │ │ │ │ -108 │ │ │ │ -112 static _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x LikeActiveViewOf(const _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x& │ │ │ │ -rhs, _D_e_n_s_e_I_n_d_e_x height); │ │ │ │ -113 │ │ │ │ -_1_1_5 _D_e_n_s_e_I_n_d_e_x _r_o_w_s() const { assertInvariants(); return rowEnd_ - rowStart_; } │ │ │ │ -116 │ │ │ │ -_1_1_8 _D_e_n_s_e_I_n_d_e_x _c_o_l_s() const { assertInvariants(); return │ │ │ │ -variableColOffsets_.back() - variableColOffsets_[blockStart_]; } │ │ │ │ -119 │ │ │ │ -_1_2_1 _D_e_n_s_e_I_n_d_e_x _n_B_l_o_c_k_s() const { assertInvariants(); return │ │ │ │ -variableColOffsets_.size() - 1 - blockStart_; } │ │ │ │ -122 │ │ │ │ -_1_2_4 Block _o_p_e_r_a_t_o_r_(_)(_D_e_n_s_e_I_n_d_e_x block) { return range(block, block+1); } │ │ │ │ -125 │ │ │ │ -_1_2_7 const constBlock _o_p_e_r_a_t_o_r_(_)(_D_e_n_s_e_I_n_d_e_x block) const { return range(block, │ │ │ │ -block+1); } │ │ │ │ -128 │ │ │ │ -_1_3_0 Block _r_a_n_g_e(_D_e_n_s_e_I_n_d_e_x startBlock, _D_e_n_s_e_I_n_d_e_x endBlock) { │ │ │ │ -131 assertInvariants(); │ │ │ │ -132 _D_e_n_s_e_I_n_d_e_x actualStartBlock = startBlock + blockStart_; │ │ │ │ -133 _D_e_n_s_e_I_n_d_e_x actualEndBlock = endBlock + blockStart_; │ │ │ │ -134 if(startBlock != 0 || endBlock != 0) { │ │ │ │ -135 checkBlock(actualStartBlock); │ │ │ │ -136 assert(actualEndBlock < (_D_e_n_s_e_I_n_d_e_x)variableColOffsets_.size()); │ │ │ │ -137 } │ │ │ │ -138 const _D_e_n_s_e_I_n_d_e_x startCol = variableColOffsets_[actualStartBlock]; │ │ │ │ -139 const _D_e_n_s_e_I_n_d_e_x rangeCols = variableColOffsets_[actualEndBlock] - │ │ │ │ -startCol; │ │ │ │ -140 return matrix_.block(rowStart_, startCol, this->rows(), rangeCols); │ │ │ │ -141 } │ │ │ │ -142 │ │ │ │ -143 const constBlock range(_D_e_n_s_e_I_n_d_e_x startBlock, _D_e_n_s_e_I_n_d_e_x endBlock) const { │ │ │ │ -144 assertInvariants(); │ │ │ │ -145 _D_e_n_s_e_I_n_d_e_x actualStartBlock = startBlock + blockStart_; │ │ │ │ -146 _D_e_n_s_e_I_n_d_e_x actualEndBlock = endBlock + blockStart_; │ │ │ │ -147 if(startBlock != 0 || endBlock != 0) { │ │ │ │ -148 checkBlock(actualStartBlock); │ │ │ │ -149 assert(actualEndBlock < (_D_e_n_s_e_I_n_d_e_x)variableColOffsets_.size()); │ │ │ │ -150 } │ │ │ │ -151 const DenseIndex startCol = variableColOffsets_[actualStartBlock]; │ │ │ │ -152 const DenseIndex rangeCols = variableColOffsets_[actualEndBlock] - │ │ │ │ -startCol; │ │ │ │ -153 return ((const Matrix&)matrix_).block(rowStart_, startCol, this->rows(), │ │ │ │ -rangeCols); │ │ │ │ -154 } │ │ │ │ -155 │ │ │ │ -_1_5_7 Block _f_u_l_l() { return range(0, nBlocks()); } │ │ │ │ -158 │ │ │ │ -_1_6_0 const constBlock _f_u_l_l() const { return range(0, nBlocks()); } │ │ │ │ -161 │ │ │ │ -162 _D_e_n_s_e_I_n_d_e_x offset(_D_e_n_s_e_I_n_d_e_x block) const { │ │ │ │ -163 assertInvariants(); │ │ │ │ -164 _D_e_n_s_e_I_n_d_e_x actualBlock = block + blockStart_; │ │ │ │ -165 checkBlock(actualBlock); │ │ │ │ -166 return variableColOffsets_[actualBlock]; │ │ │ │ -167 } │ │ │ │ -168 │ │ │ │ -_1_7_0 const _D_e_n_s_e_I_n_d_e_x& _r_o_w_S_t_a_r_t() const { return rowStart_; } │ │ │ │ -171 │ │ │ │ -_1_7_3 _D_e_n_s_e_I_n_d_e_x& _r_o_w_S_t_a_r_t() { return rowStart_; } │ │ │ │ -174 │ │ │ │ -_1_7_6 const _D_e_n_s_e_I_n_d_e_x& _r_o_w_E_n_d() const { return rowEnd_; } │ │ │ │ -177 │ │ │ │ -_1_7_9 _D_e_n_s_e_I_n_d_e_x& _r_o_w_E_n_d() { return rowEnd_; } │ │ │ │ -180 │ │ │ │ -_1_8_2 const _D_e_n_s_e_I_n_d_e_x& _f_i_r_s_t_B_l_o_c_k() const { return blockStart_; } │ │ │ │ -183 │ │ │ │ -_1_8_5 _D_e_n_s_e_I_n_d_e_x& _f_i_r_s_t_B_l_o_c_k() { return blockStart_; } │ │ │ │ -186 │ │ │ │ -_1_8_8 const Matrix& _m_a_t_r_i_x() const { return matrix_; } │ │ │ │ -189 │ │ │ │ -_1_9_1 Matrix& _m_a_t_r_i_x() { return matrix_; } │ │ │ │ -192 │ │ │ │ -193 protected: │ │ │ │ -194 void assertInvariants() const { │ │ │ │ -195 assert(matrix_.cols() == variableColOffsets_.back()); │ │ │ │ -196 assert(blockStart_ < (_D_e_n_s_e_I_n_d_e_x)variableColOffsets_.size()); │ │ │ │ -197 assert(rowStart_ <= matrix_.rows()); │ │ │ │ -198 assert(rowEnd_ <= matrix_.rows()); │ │ │ │ -199 assert(rowStart_ <= rowEnd_); │ │ │ │ -200 } │ │ │ │ -201 │ │ │ │ -202 void checkBlock(DenseIndex block) const { │ │ │ │ -203 static_cast(block); //Disable unused varibale warnings. │ │ │ │ -204 assert(matrix_.cols() == variableColOffsets_.back()); │ │ │ │ -205 assert(block < (DenseIndex)variableColOffsets_.size() - 1); │ │ │ │ -206 assert(variableColOffsets_[block] < matrix_.cols() && variableColOffsets_ │ │ │ │ -[block+1] <= matrix_.cols()); │ │ │ │ -207 } │ │ │ │ -208 │ │ │ │ -209 template │ │ │ │ -210 void fillOffsets(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool │ │ │ │ -appendOneDimension) { │ │ │ │ -211 variableColOffsets_[0] = 0; │ │ │ │ -212 _D_e_n_s_e_I_n_d_e_x j=0; │ │ │ │ -213 for(ITERATOR dim=firstBlockDim; dim!=lastBlockDim; ++dim, ++j) │ │ │ │ -214 variableColOffsets_[j+1] = variableColOffsets_[j] + *dim; │ │ │ │ -215 if(appendOneDimension) │ │ │ │ -216 variableColOffsets_[j+1] = variableColOffsets_[j] + 1; │ │ │ │ -217 } │ │ │ │ -218 │ │ │ │ -219 friend class SymmetricBlockMatrix; │ │ │ │ -220 │ │ │ │ -221 private: │ │ │ │ -_2_2_3 friend class boost::serialization::access; │ │ │ │ -224 template │ │ │ │ -225 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ -226 ar & BOOST_SERIALIZATION_NVP(matrix_); │ │ │ │ -227 ar & BOOST_SERIALIZATION_NVP(variableColOffsets_); │ │ │ │ -228 ar & BOOST_SERIALIZATION_NVP(rowStart_); │ │ │ │ -229 ar & BOOST_SERIALIZATION_NVP(rowEnd_); │ │ │ │ -230 ar & BOOST_SERIALIZATION_NVP(blockStart_); │ │ │ │ -231 } │ │ │ │ -232 }; │ │ │ │ -233 │ │ │ │ -234} │ │ │ │ -_M_a_t_r_i_x_S_e_r_i_a_l_i_z_a_t_i_o_n_._h │ │ │ │ -Serialization for matrices. │ │ │ │ -_M_a_t_r_i_x_._h │ │ │ │ -typedef and functions to augment Eigen's MatrixXd │ │ │ │ -_F_a_s_t_V_e_c_t_o_r_._h │ │ │ │ -A thin wrapper around std::vector that uses a custom allocator. │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_V_e_c_t_o_r │ │ │ │ -std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > │ │ │ │ -FastVector │ │ │ │ -FastVector is a type alias to a std::vector with a custom memory allocator. │ │ │ │ -DDeeffiinniittiioonn FastVector.h:34 │ │ │ │ +19#pragma once │ │ │ │ +20#include // Configuration from CMake │ │ │ │ +21 │ │ │ │ +22#if !defined GTSAM_ALLOCATOR_BOOSTPOOL && !defined GTSAM_ALLOCATOR_TBB && │ │ │ │ +!defined GTSAM_ALLOCATOR_STL │ │ │ │ +23# ifdef GTSAM_USE_TBB │ │ │ │ +24// Use TBB allocator by default if we have TBB, otherwise boost pool │ │ │ │ +25# define GTSAM_ALLOCATOR_TBB │ │ │ │ +26# else │ │ │ │ +27# define GTSAM_ALLOCATOR_BOOSTPOOL │ │ │ │ +28# endif │ │ │ │ +29#endif │ │ │ │ +30 │ │ │ │ +31#if defined GTSAM_ALLOCATOR_BOOSTPOOL │ │ │ │ +32# include │ │ │ │ +33#elif defined GTSAM_ALLOCATOR_TBB │ │ │ │ +34# include │ │ │ │ +35# undef min // TBB seems to include Windows.h which defines these macros that │ │ │ │ +cause problems │ │ │ │ +36# undef max │ │ │ │ +37# undef ERROR │ │ │ │ +38#elif defined GTSAM_ALLOCATOR_STL │ │ │ │ +39# include │ │ │ │ +40#endif │ │ │ │ +41 │ │ │ │ +42namespace _g_t_s_a_m │ │ │ │ +43{ │ │ │ │ +44 │ │ │ │ +45 namespace internal │ │ │ │ +46 { │ │ │ │ +48 template │ │ │ │ +_4_9 struct _F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r │ │ │ │ +50 { │ │ │ │ +51#if defined GTSAM_ALLOCATOR_BOOSTPOOL │ │ │ │ +52 typedef boost::fast_pool_allocator type; │ │ │ │ +53 static const bool isBoost = true; │ │ │ │ +54 static const bool isTBB = false; │ │ │ │ +55 static const bool isSTL = false; │ │ │ │ +56#elif defined GTSAM_ALLOCATOR_TBB │ │ │ │ +57 typedef tbb::tbb_allocator type; │ │ │ │ +58 static const bool isBoost = false; │ │ │ │ +59 static const bool isTBB = true; │ │ │ │ +60 static const bool isSTL = false; │ │ │ │ +61#elif defined GTSAM_ALLOCATOR_STL │ │ │ │ +62 typedef std::allocator type; │ │ │ │ +63 static const bool isBoost = false; │ │ │ │ +64 static const bool isTBB = false; │ │ │ │ +65 static const bool isSTL = true; │ │ │ │ +66#endif │ │ │ │ +67 }; │ │ │ │ +68 │ │ │ │ +70 template │ │ │ │ +_7_1 struct _F_a_s_t_D_e_f_a_u_l_t_V_e_c_t_o_r_A_l_l_o_c_a_t_o_r │ │ │ │ +72 { │ │ │ │ +73#if defined GTSAM_ALLOCATOR_TBB │ │ │ │ +74 typedef tbb::tbb_allocator type; │ │ │ │ +75 static const bool isBoost = false; │ │ │ │ +76 static const bool isTBB = true; │ │ │ │ +77 static const bool isSTL = false; │ │ │ │ +78#else │ │ │ │ +79 typedef std::allocator type; │ │ │ │ +80 static const bool isBoost = false; │ │ │ │ +81 static const bool isTBB = false; │ │ │ │ +82 static const bool isSTL = true; │ │ │ │ +83#endif │ │ │ │ +84 }; │ │ │ │ +85 } │ │ │ │ +86 │ │ │ │ +87} │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_D_e_n_s_e_I_n_d_e_x │ │ │ │ -ptrdiff_t DenseIndex │ │ │ │ -The index type for Eigen objects. │ │ │ │ -DDeeffiinniittiioonn types.h:106 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ -This class stores a dense matrix and allows it to be accessed as a collection │ │ │ │ -of blocks. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:52 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ -This class stores a dense matrix and allows it to be accessed as a collection │ │ │ │ -of vertical blocks. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:43 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ -VerticalBlockMatrix() │ │ │ │ -Construct an empty VerticalBlockMatrix. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:60 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_f_u_l_l │ │ │ │ -Block full() │ │ │ │ -Return the full matrix, not including any portions excluded by rowStart(), │ │ │ │ -rowEnd(),... │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:157 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_r_a_n_g_e │ │ │ │ -Block range(DenseIndex startBlock, DenseIndex endBlock) │ │ │ │ -access ranges of blocks at a time │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:130 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_f_i_r_s_t_B_l_o_c_k │ │ │ │ -const DenseIndex & firstBlock() const │ │ │ │ -Get the apparent first block for all operations. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:182 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_m_a_t_r_i_x │ │ │ │ -const Matrix & matrix() const │ │ │ │ -Access to full matrix (including any portions excluded by rowStart(), rowEnd(), │ │ │ │ -and firstBlock()) │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:188 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ -VerticalBlockMatrix(const CONTAINER &dimensions, DenseIndex height, bool │ │ │ │ -appendOneDimension=false) │ │ │ │ -Construct from a container of the sizes of each vertical block. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:69 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_r_o_w_E_n_d__ │ │ │ │ -DenseIndex rowEnd_ │ │ │ │ -Changes apparent matrix view, see main class comment. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:54 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_r_o_w_E_n_d │ │ │ │ -const DenseIndex & rowEnd() const │ │ │ │ -Get the apparent last row (exclusive, i.e. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:176 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_r_o_w_s │ │ │ │ -DenseIndex rows() const │ │ │ │ -Row size. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:115 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -Block operator()(DenseIndex block) │ │ │ │ -Access a single block in the underlying matrix with read/write access. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:124 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_f_i_r_s_t_B_l_o_c_k │ │ │ │ -DenseIndex & firstBlock() │ │ │ │ -Get or set the apparent first block for all operations. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:185 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_c_o_l_s │ │ │ │ -DenseIndex cols() const │ │ │ │ -Column size. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:118 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ -VerticalBlockMatrix(ITERATOR firstBlockDim, ITERATOR lastBlockDim, DenseIndex │ │ │ │ -height, bool appendOneDimension=false) │ │ │ │ -Construct from iterator over the sizes of each vertical block. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:93 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -const constBlock operator()(DenseIndex block) const │ │ │ │ -Access a const block view. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:127 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_r_o_w_S_t_a_r_t │ │ │ │ -const DenseIndex & rowStart() const │ │ │ │ -Get the apparent first row of the underlying matrix for all operations. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:170 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_m_a_t_r_i_x__ │ │ │ │ -Matrix matrix_ │ │ │ │ -The full matrix. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:50 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_n_B_l_o_c_k_s │ │ │ │ -DenseIndex nBlocks() const │ │ │ │ -Block count. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:121 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_f_u_l_l │ │ │ │ -const constBlock full() const │ │ │ │ -Return the full matrix, not including any portions excluded by rowStart(), │ │ │ │ -rowEnd(),... │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:160 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_r_o_w_S_t_a_r_t │ │ │ │ -DenseIndex & rowStart() │ │ │ │ -Get or set the apparent first row of the underlying matrix for all operations. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:173 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_m_a_t_r_i_x │ │ │ │ -Matrix & matrix() │ │ │ │ -Non-const access to full matrix (including any portions excluded by rowStart(), │ │ │ │ -rowEnd(),... │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:191 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_r_o_w_E_n_d │ │ │ │ -DenseIndex & rowEnd() │ │ │ │ -Get or set the apparent last row (exclusive, i.e. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:179 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_r_o_w_S_t_a_r_t__ │ │ │ │ -DenseIndex rowStart_ │ │ │ │ -Changes apparent matrix view, see main class comment. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:53 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ -VerticalBlockMatrix(const CONTAINER &dimensions, const Eigen::MatrixBase< │ │ │ │ -DERIVED > &matrix, bool appendOneDimension=false) │ │ │ │ -Construct from a container of the sizes of each vertical block and a pre- │ │ │ │ -prepared matrix. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:80 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_b_l_o_c_k_S_t_a_r_t__ │ │ │ │ -DenseIndex blockStart_ │ │ │ │ -Changes apparent matrix view, see main class comment. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:55 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_v_a_r_i_a_b_l_e_C_o_l_O_f_f_s_e_t_s__ │ │ │ │ -FastVector< DenseIndex > variableColOffsets_ │ │ │ │ -the starting columns of each block (0-based) │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:51 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r │ │ │ │ +Default allocator for list, map, and set types. │ │ │ │ +DDeeffiinniittiioonn FastDefaultAllocator.h:50 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_F_a_s_t_D_e_f_a_u_l_t_V_e_c_t_o_r_A_l_l_o_c_a_t_o_r │ │ │ │ +Default allocator for vector types (we never use boost pool for vectors) │ │ │ │ +DDeeffiinniittiioonn FastDefaultAllocator.h:72 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_._h │ │ │ │ + * _F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00065.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/VerticalBlockMatrix.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Vector.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,36 +94,186 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
VerticalBlockMatrix.cpp File Reference
│ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Typedefs | │ │ │ +Functions
│ │ │ +
Vector.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

A matrix with column blocks of pre-defined sizes. │ │ │ +

typedef and functions to augment Eigen's VectorXd │ │ │ More...

│ │ │ + │ │ │ +

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Macros

│ │ │ +#define MKL_BLAS   MKL_DOMAIN_BLAS
 
#define GTSAM_MAKE_VECTOR_DEFS(N)
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Typedefs

│ │ │ +typedef Eigen::VectorXd gtsam::Vector
 
│ │ │ +typedef Eigen::Matrix< double, 1, 1 > gtsam::Vector1
 
│ │ │ +typedef Eigen::Vector2d gtsam::Vector2
 
│ │ │ +typedef Eigen::Vector3d gtsam::Vector3
 
│ │ │ +typedef Eigen::VectorBlock< Vector > gtsam::SubVector
 
│ │ │ +typedef Eigen::VectorBlock< const Vector > gtsam::ConstSubVector
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

bool gtsam::fpEqual (double a, double b, double tol, bool check_relative_also=true)
 Ensure we are not including a different version of Eigen in user code than while compiling gtsam, since it can lead to hard-to-understand runtime crashes.
 
│ │ │ +void gtsam::print (const Vector &v, const std::string &s, std::ostream &stream)
 print without optional string, must specify cout yourself
 
│ │ │ +void gtsam::print (const Vector &v, const std::string &s="")
 print with optional string to cout
 
│ │ │ +void gtsam::save (const Vector &A, const std::string &s, const std::string &filename)
 save a vector to file, which can be loaded by matlab
 
│ │ │ +bool gtsam::operator== (const Vector &vec1, const Vector &vec2)
 operator==()
 
│ │ │ +bool gtsam::greaterThanOrEqual (const Vector &v1, const Vector &v2)
 Greater than or equal to operation returns true if all elements in v1 are greater than corresponding elements in v2.
 
│ │ │ +bool gtsam::equal_with_abs_tol (const Vector &vec1, const Vector &vec2, double tol=1e-9)
 VecA == VecB up to tolerance.
 
│ │ │ +bool gtsam::equal_with_abs_tol (const SubVector &vec1, const SubVector &vec2, double tol)
 
│ │ │ +bool gtsam::equal (const Vector &vec1, const Vector &vec2, double tol)
 Override of equal in Lie.h.
 
│ │ │ +bool gtsam::equal (const Vector &vec1, const Vector &vec2)
 Override of equal in Lie.h.
 
bool gtsam::assert_equal (const Vector &vec1, const Vector &vec2, double tol=1e-9)
 Same, prints if error.
 
bool gtsam::assert_inequal (const Vector &vec1, const Vector &vec2, double tol=1e-9)
 Not the same, prints if error.
 
bool gtsam::assert_equal (const SubVector &vec1, const SubVector &vec2, double tol=1e-9)
 Same, prints if error.
 
│ │ │ +bool gtsam::assert_equal (const ConstSubVector &expected, const ConstSubVector &actual, double tol)
 
bool gtsam::linear_dependent (const Vector &vec1, const Vector &vec2, double tol=1e-9)
 check whether two vectors are linearly dependent
 
Vector gtsam::ediv_ (const Vector &a, const Vector &b)
 elementwise division, but 0/0 = 0, not inf
 
│ │ │ +template<class V1 , class V2 >
double gtsam::dot (const V1 &a, const V2 &b)
 Dot product.
 
│ │ │ +template<class V1 , class V2 >
double gtsam::inner_prod (const V1 &a, const V2 &b)
 compatibility version for ublas' inner_prod()
 
pair< double, Vector > gtsam::house (const Vector &x)
 house(x,j) computes HouseHolder vector v and scaling factor beta from x, such that the corresponding Householder reflection zeroes out all but x.
 
│ │ │ +double gtsam::houseInPlace (Vector &x)
 beta = house(x) computes the HouseHolder vector in place
 
pair< Vector, double > gtsam::weightedPseudoinverse (const Vector &v, const Vector &weights)
 Weighted Householder solution vector, a.k.a., the pseudoinverse of the column NOTE: if any sigmas are zero (indicating a constraint) the pseudoinverse will be a selection vector, and the variance will be zero.
 
│ │ │ +double gtsam::weightedPseudoinverse (const Vector &a, const Vector &weights, Vector &pseudo)
 
│ │ │ +Vector gtsam::concatVectors (const std::list< Vector > &vs)
 concatenate Vectors
 
│ │ │ +Vector gtsam::concatVectors (size_t nrVectors,...)
 concatenate Vectors
 
│ │ │

Detailed Description

│ │ │ -

A matrix with column blocks of pre-defined sizes.

│ │ │ -

Used in JacobianFactor and GaussianConditional.

Author
Richard Roberts
│ │ │ -
Date
Sep 18, 2010
│ │ │ -
│ │ │ +

typedef and functions to augment Eigen's VectorXd

│ │ │ +
Author
Kai Ni
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +
│ │ │ +Alex Hagiopol
│ │ │ +
│ │ │ +Varun Agrawal
│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ GTSAM_MAKE_VECTOR_DEFS

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define GTSAM_MAKE_VECTOR_DEFS( N)
│ │ │ +
│ │ │ +Value:
using Vector##N = Eigen::Matrix<double, N, 1>; \
│ │ │ +
static const Eigen::MatrixBase<Vector##N>::ConstantReturnType Z_##N##x1 = Vector##N::Zero();
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,147 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -VerticalBlockMatrix.cpp File Reference │ │ │ │ -A matrix with column blocks of pre-defined sizes. _M_o_r_e_._._. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Vector.h File Reference │ │ │ │ +typedef and functions to augment Eigen's VectorXd _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  MMKKLL__BBLLAASS   MKL_DOMAIN_BLAS │ │ │ │ +  │ │ │ │ +#define  _G_T_S_A_M___M_A_K_E___V_E_C_T_O_R___D_E_F_S(N) │ │ │ │ +  │ │ │ │ +TTyyppeeddeeffss │ │ │ │ + typedef Eigen::VectorXd  ggttssaamm::::VVeeccttoorr │ │ │ │ +  │ │ │ │ + typedef Eigen::Matrix< double, 1, 1 >  ggttssaamm::::VVeeccttoorr11 │ │ │ │ +  │ │ │ │ + typedef Eigen::Vector2d  ggttssaamm::::VVeeccttoorr22 │ │ │ │ +  │ │ │ │ + typedef Eigen::Vector3d  ggttssaamm::::VVeeccttoorr33 │ │ │ │ +  │ │ │ │ + typedef Eigen::VectorBlock< Vector >  ggttssaamm::::SSuubbVVeeccttoorr │ │ │ │ +  │ │ │ │ +typedef Eigen::VectorBlock< const Vector >  ggttssaamm::::CCoonnssttSSuubbVVeeccttoorr │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ + bool  _g_t_s_a_m_:_:_f_p_E_q_u_a_l (double a, double b, double tol, bool │ │ │ │ + check_relative_also=true) │ │ │ │ + Ensure we are not including a different version of │ │ │ │ +  Eigen in user code than while compiling gtsam, since it │ │ │ │ + can lead to hard-to-understand runtime crashes. │ │ │ │ +  │ │ │ │ + void  ggttssaamm::::pprriinntt (const Vector &v, const std::string &s, │ │ │ │ + std::ostream &stream) │ │ │ │ +  print without optional string, must specify cout │ │ │ │ + yourself │ │ │ │ +  │ │ │ │ + void  ggttssaamm::::pprriinntt (const Vector &v, const std::string &s="") │ │ │ │ +  print with optional string to cout │ │ │ │ +  │ │ │ │ + void  ggttssaamm::::ssaavvee (const Vector &A, const std::string &s, │ │ │ │ + const std::string &filename) │ │ │ │ +  save a vector to file, which can be loaded by matlab │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::ooppeerraattoorr==== (const Vector &vec1, const Vector │ │ │ │ + &vec2) │ │ │ │ +  _o_p_e_r_a_t_o_r_=_=_(_) │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::ggrreeaatteerrTThhaannOOrrEEqquuaall (const Vector &v1, const │ │ │ │ + Vector &v2) │ │ │ │ + Greater than or equal to operation returns true if all │ │ │ │ +  elements in v1 are greater than corresponding elements │ │ │ │ + in v2. │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::eeqquuaall__wwiitthh__aabbss__ttooll (const Vector &vec1, const │ │ │ │ + Vector &vec2, double tol=1e-9) │ │ │ │ +  VecA == VecB up to tolerance. │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::eeqquuaall__wwiitthh__aabbss__ttooll (const SubVector &vec1, const │ │ │ │ + SubVector &vec2, double tol) │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::eeqquuaall (const Vector &vec1, const Vector &vec2, │ │ │ │ + double tol) │ │ │ │ +  Override of equal in _L_i_e_._h. │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::eeqquuaall (const Vector &vec1, const Vector &vec2) │ │ │ │ +  Override of equal in _L_i_e_._h. │ │ │ │ +  │ │ │ │ + bool  _g_t_s_a_m_:_:_a_s_s_e_r_t___e_q_u_a_l (const Vector &vec1, const Vector │ │ │ │ + &vec2, double tol=1e-9) │ │ │ │ +  Same, prints if error. │ │ │ │ +  │ │ │ │ + bool  _g_t_s_a_m_:_:_a_s_s_e_r_t___i_n_e_q_u_a_l (const Vector &vec1, const Vector │ │ │ │ + &vec2, double tol=1e-9) │ │ │ │ +  Not the same, prints if error. │ │ │ │ +  │ │ │ │ + bool  _g_t_s_a_m_:_:_a_s_s_e_r_t___e_q_u_a_l (const SubVector &vec1, const │ │ │ │ + SubVector &vec2, double tol=1e-9) │ │ │ │ +  Same, prints if error. │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::aasssseerrtt__eeqquuaall (const ConstSubVector &expected, │ │ │ │ + const ConstSubVector &actual, double tol) │ │ │ │ +  │ │ │ │ + bool  _g_t_s_a_m_:_:_l_i_n_e_a_r___d_e_p_e_n_d_e_n_t (const Vector &vec1, const │ │ │ │ + Vector &vec2, double tol=1e-9) │ │ │ │ +  check whether two vectors are linearly dependent │ │ │ │ +  │ │ │ │ + Vector  _g_t_s_a_m_:_:_e_d_i_v__ (const Vector &a, const Vector &b) │ │ │ │ +  elementwise division, but 0/0 = 0, not inf │ │ │ │ +  │ │ │ │ +template │ │ │ │ + double  ggttssaamm::::ddoott (const V1 &a, const V2 &b) │ │ │ │ +  Dot product. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + double  ggttssaamm::::iinnnneerr__pprroodd (const V1 &a, const V2 &b) │ │ │ │ +  compatibility version for ublas' _i_n_n_e_r___p_r_o_d_(_) │ │ │ │ +  │ │ │ │ +pair< double, Vector >  _g_t_s_a_m_:_:_h_o_u_s_e (const Vector &x) │ │ │ │ + house(x,j) computes HouseHolder vector v and scaling │ │ │ │ +  factor beta from x, such that the corresponding │ │ │ │ + Householder reflection zeroes out all but x. │ │ │ │ +  │ │ │ │ + double  ggttssaamm::::hhoouusseeIInnPPllaaccee (Vector &x) │ │ │ │ +  beta = house(x) computes the HouseHolder vector in │ │ │ │ + place │ │ │ │ +  │ │ │ │ +pair< Vector, double >  _g_t_s_a_m_:_:_w_e_i_g_h_t_e_d_P_s_e_u_d_o_i_n_v_e_r_s_e (const Vector &v, const │ │ │ │ + Vector &weights) │ │ │ │ + Weighted Householder solution vector, a.k.a., the │ │ │ │ +  pseudoinverse of the column NOTE: if any sigmas are │ │ │ │ + zero (indicating a constraint) the pseudoinverse will │ │ │ │ + be a selection vector, and the variance will be zero. │ │ │ │ +  │ │ │ │ + double  ggttssaamm::::wweeiigghhtteeddPPsseeuuddooiinnvveerrssee (const Vector &a, const │ │ │ │ + Vector &weights, Vector &pseudo) │ │ │ │ +  │ │ │ │ + Vector  ggttssaamm::::ccoonnccaattVVeeccttoorrss (const std::list< Vector > &vs) │ │ │ │ +  concatenate Vectors │ │ │ │ +  │ │ │ │ + Vector  ggttssaamm::::ccoonnccaattVVeeccttoorrss (size_t nrVectors,...) │ │ │ │ +  concatenate Vectors │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A matrix with column blocks of pre-defined sizes. │ │ │ │ -Used in _J_a_c_o_b_i_a_n_F_a_c_t_o_r and _G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l. │ │ │ │ +typedef and functions to augment Eigen's VectorXd │ │ │ │ Author │ │ │ │ - Richard Roberts │ │ │ │ - Date │ │ │ │ - Sep 18, 2010 │ │ │ │ + Kai Ni │ │ │ │ + Frank Dellaert │ │ │ │ + Alex Hagiopol │ │ │ │ + Varun Agrawal │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? GGTTSSAAMM__MMAAKKEE__VVEECCTTOORR__DDEEFFSS ********** │ │ │ │ +#define GTSAM_MAKE_VECTOR_DEFS (   N ) │ │ │ │ +VVaalluuee:: │ │ │ │ +using Vector##N = Eigen::Matrix; \ │ │ │ │ +static const Eigen::MatrixBase::ConstantReturnType Z_##N##x1 = │ │ │ │ +Vector##N::Zero(); │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_._c_p_p │ │ │ │ + * _V_e_c_t_o_r_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00071.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/VectorSerialization.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/cholesky.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,51 +94,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Namespaces | │ │ │ Functions
│ │ │ -
VectorSerialization.h File Reference
│ │ │ +
cholesky.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

serialization for Vectors │ │ │ +

Efficient incomplete Cholesky on rank-deficient matrices, todo: constrained Cholesky. │ │ │ More...

│ │ │ - │ │ │ -

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

│ │ │ -template<class Archive >
void boost::serialization::save (Archive &ar, const gtsam::Vector &v, unsigned int)
 
│ │ │ -template<class Archive >
void boost::serialization::load (Archive &ar, gtsam::Vector &v, unsigned int)
 
│ │ │ -template<class Archive , int D>
void boost::serialization::save (Archive &ar, const Eigen::Matrix< double, D, 1 > &v, unsigned int)
 
│ │ │ -template<class Archive , int D>
void boost::serialization::load (Archive &ar, Eigen::Matrix< double, D, 1 > &v, unsigned int)
 
pair< size_t, bool > gtsam::choleskyCareful (Matrix &ATA, int order=-1)
 "Careful" Cholesky computes the positive square-root of a positive symmetric semi-definite matrix (i.e.
 
bool gtsam::choleskyPartial (Matrix &ABC, size_t nFrontal, size_t topleft=0)
 Partial Cholesky computes a factor [R S such that [R' 0 [R S = [A B 0 L] S' I] 0 L] B' C].
 
│ │ │

Detailed Description

│ │ │ -

serialization for Vectors

│ │ │ -
Author
Frank Dellaert
│ │ │ -
Date
February 2022
│ │ │ +

Efficient incomplete Cholesky on rank-deficient matrices, todo: constrained Cholesky.

│ │ │ +
Author
Richard Roberts
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +
Date
Nov 5, 2010
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,35 +1,35 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_F_u_n_c_t_i_o_n_s │ │ │ │ -VectorSerialization.h File Reference │ │ │ │ -serialization for Vectors _M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -void  bboooosstt::::sseerriiaalliizzaattiioonn::::ssaavvee (Archive &ar, const gtsam::Vector &v, unsigned │ │ │ │ - int) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -void  bboooosstt::::sseerriiaalliizzaattiioonn::::llooaadd (Archive &ar, gtsam::Vector &v, unsigned int) │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +cholesky.cpp File Reference │ │ │ │ +Efficient incomplete Cholesky on rank-deficient matrices, todo: constrained │ │ │ │ +Cholesky. _M_o_r_e_._._. │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _g_t_s_a_m │ │ │ │ +  Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -template │ │ │ │ -void  bboooosstt::::sseerriiaalliizzaattiioonn::::ssaavvee (Archive &ar, const Eigen::Matrix< double, D, │ │ │ │ - 1 > &v, unsigned int) │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +pair< size_t, bool >  _g_t_s_a_m_:_:_c_h_o_l_e_s_k_y_C_a_r_e_f_u_l (Matrix &ATA, int order=-1) │ │ │ │ +  "Careful" Cholesky computes the positive square-root of a │ │ │ │ + positive symmetric semi-definite matrix (i.e. │ │ │ │   │ │ │ │ -template │ │ │ │ -void  bboooosstt::::sseerriiaalliizzaattiioonn::::llooaadd (Archive &ar, Eigen::Matrix< double, D, 1 > │ │ │ │ - &v, unsigned int) │ │ │ │ + bool  _g_t_s_a_m_:_:_c_h_o_l_e_s_k_y_P_a_r_t_i_a_l (Matrix &ABC, size_t nFrontal, │ │ │ │ + size_t topleft=0) │ │ │ │ +  Partial Cholesky computes a factor [R S such that [R' 0 │ │ │ │ + [R S = [A B 0 L] S' I] 0 L] B' C]. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -serialization for Vectors │ │ │ │ +Efficient incomplete Cholesky on rank-deficient matrices, todo: constrained │ │ │ │ +Cholesky. │ │ │ │ Author │ │ │ │ + Richard Roberts │ │ │ │ Frank Dellaert │ │ │ │ Date │ │ │ │ - February 2022 │ │ │ │ + Nov 5, 2010 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _V_e_c_t_o_r_S_e_r_i_a_l_i_z_a_t_i_o_n_._h │ │ │ │ + * _c_h_o_l_e_s_k_y_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00074.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Vector.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Vector.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,61 +95,28 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ -Macros | │ │ │ -Typedefs | │ │ │ Functions
│ │ │ -
Vector.h File Reference
│ │ │ +
Vector.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

typedef and functions to augment Eigen's VectorXd │ │ │ +

typedef and functions to augment Eigen's Vectors │ │ │ More...

│ │ │ - │ │ │ -

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Macros

│ │ │ -#define MKL_BLAS   MKL_DOMAIN_BLAS
 
#define GTSAM_MAKE_VECTOR_DEFS(N)
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Typedefs

│ │ │ -typedef Eigen::VectorXd gtsam::Vector
 
│ │ │ -typedef Eigen::Matrix< double, 1, 1 > gtsam::Vector1
 
│ │ │ -typedef Eigen::Vector2d gtsam::Vector2
 
│ │ │ -typedef Eigen::Vector3d gtsam::Vector3
 
│ │ │ -typedef Eigen::VectorBlock< Vector > gtsam::SubVector
 
│ │ │ -typedef Eigen::VectorBlock< const Vector > gtsam::ConstSubVector
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -174,22 +141,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -200,80 +159,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Functions

bool gtsam::fpEqual (double a, double b, double tol, bool check_relative_also=true)
 Ensure we are not including a different version of Eigen in user code than while compiling gtsam, since it can lead to hard-to-understand runtime crashes.
 
│ │ │ void gtsam::print (const Vector &v, const std::string &s, std::ostream &stream)
│ │ │ bool gtsam::equal_with_abs_tol (const Vector &vec1, const Vector &vec2, double tol=1e-9)
 VecA == VecB up to tolerance.
 
│ │ │ bool gtsam::equal_with_abs_tol (const SubVector &vec1, const SubVector &vec2, double tol)
 
│ │ │ -bool gtsam::equal (const Vector &vec1, const Vector &vec2, double tol)
 Override of equal in Lie.h.
 
│ │ │ -bool gtsam::equal (const Vector &vec1, const Vector &vec2)
 Override of equal in Lie.h.
 
bool gtsam::assert_equal (const Vector &vec1, const Vector &vec2, double tol=1e-9)
 Same, prints if error.
 
bool gtsam::assert_inequal (const Vector &vec1, const Vector &vec2, double tol=1e-9)
 Not the same, prints if error.
 
bool gtsam::assert_equal (const SubVector &vec1, const SubVector &vec2, double tol=1e-9)
 
bool gtsam::linear_dependent (const Vector &vec1, const Vector &vec2, double tol=1e-9)
 check whether two vectors are linearly dependent
 
Vector gtsam::ediv_ (const Vector &a, const Vector &b)
 elementwise division, but 0/0 = 0, not inf
 
│ │ │ -template<class V1 , class V2 >
double gtsam::dot (const V1 &a, const V2 &b)
 Dot product.
 
│ │ │ -template<class V1 , class V2 >
double gtsam::inner_prod (const V1 &a, const V2 &b)
 compatibility version for ublas' inner_prod()
 
pair< double, Vector > gtsam::house (const Vector &x)
 house(x,j) computes HouseHolder vector v and scaling factor beta from x, such that the corresponding Householder reflection zeroes out all but x.
 
│ │ │ double gtsam::houseInPlace (Vector &x)
 beta = house(x) computes the HouseHolder vector in place
 
pair< Vector, double > gtsam::weightedPseudoinverse (const Vector &v, const Vector &weights)
 Weighted Householder solution vector, a.k.a., the pseudoinverse of the column NOTE: if any sigmas are zero (indicating a constraint) the pseudoinverse will be a selection vector, and the variance will be zero.
 
pair< double, Vector > gtsam::house (const Vector &x)
 house(x,j) computes HouseHolder vector v and scaling factor beta from x, such that the corresponding Householder reflection zeroes out all but x.
 
│ │ │ double gtsam::weightedPseudoinverse (const Vector &a, const Vector &weights, Vector &pseudo)
 
pair< Vector, double > gtsam::weightedPseudoinverse (const Vector &v, const Vector &weights)
 Weighted Householder solution vector, a.k.a., the pseudoinverse of the column NOTE: if any sigmas are zero (indicating a constraint) the pseudoinverse will be a selection vector, and the variance will be zero.
 
│ │ │ Vector gtsam::concatVectors (const std::list< Vector > &vs)
 concatenate Vectors
 
│ │ │ Vector gtsam::concatVectors (size_t nrVectors,...)
 concatenate Vectors
 
│ │ │

Detailed Description

│ │ │ -

typedef and functions to augment Eigen's VectorXd

│ │ │ +

typedef and functions to augment Eigen's Vectors

│ │ │
Author
Kai Ni
│ │ │
│ │ │ Frank Dellaert
│ │ │
│ │ │ -Alex Hagiopol
│ │ │ -
│ │ │ Varun Agrawal
│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ GTSAM_MAKE_VECTOR_DEFS

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define GTSAM_MAKE_VECTOR_DEFS( N)
│ │ │ -
│ │ │ -Value:
using Vector##N = Eigen::Matrix<double, N, 1>; \
│ │ │ -
static const Eigen::MatrixBase<Vector##N>::ConstantReturnType Z_##N##x1 = Vector##N::Zero();
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,38 +1,19 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Vector.h File Reference │ │ │ │ -typedef and functions to augment Eigen's VectorXd _M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Vector.cpp File Reference │ │ │ │ +typedef and functions to augment Eigen's Vectors _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  MMKKLL__BBLLAASS   MKL_DOMAIN_BLAS │ │ │ │ -  │ │ │ │ -#define  _G_T_S_A_M___M_A_K_E___V_E_C_T_O_R___D_E_F_S(N) │ │ │ │ -  │ │ │ │ -TTyyppeeddeeffss │ │ │ │ - typedef Eigen::VectorXd  ggttssaamm::::VVeeccttoorr │ │ │ │ -  │ │ │ │ - typedef Eigen::Matrix< double, 1, 1 >  ggttssaamm::::VVeeccttoorr11 │ │ │ │ -  │ │ │ │ - typedef Eigen::Vector2d  ggttssaamm::::VVeeccttoorr22 │ │ │ │ -  │ │ │ │ - typedef Eigen::Vector3d  ggttssaamm::::VVeeccttoorr33 │ │ │ │ -  │ │ │ │ - typedef Eigen::VectorBlock< Vector >  ggttssaamm::::SSuubbVVeeccttoorr │ │ │ │ -  │ │ │ │ -typedef Eigen::VectorBlock< const Vector >  ggttssaamm::::CCoonnssttSSuubbVVeeccttoorr │ │ │ │ -  │ │ │ │ FFuunnccttiioonnss │ │ │ │ bool  _g_t_s_a_m_:_:_f_p_E_q_u_a_l (double a, double b, double tol, bool │ │ │ │ check_relative_also=true) │ │ │ │ Ensure we are not including a different version of │ │ │ │   Eigen in user code than while compiling gtsam, since it │ │ │ │ can lead to hard-to-understand runtime crashes. │ │ │ │   │ │ │ │ @@ -61,21 +42,14 @@ │ │ │ │ bool  ggttssaamm::::eeqquuaall__wwiitthh__aabbss__ttooll (const Vector &vec1, const │ │ │ │ Vector &vec2, double tol=1e-9) │ │ │ │   VecA == VecB up to tolerance. │ │ │ │   │ │ │ │ bool  ggttssaamm::::eeqquuaall__wwiitthh__aabbss__ttooll (const SubVector &vec1, const │ │ │ │ SubVector &vec2, double tol) │ │ │ │   │ │ │ │ - bool  ggttssaamm::::eeqquuaall (const Vector &vec1, const Vector &vec2, │ │ │ │ - double tol) │ │ │ │ -  Override of equal in _L_i_e_._h. │ │ │ │ -  │ │ │ │ - bool  ggttssaamm::::eeqquuaall (const Vector &vec1, const Vector &vec2) │ │ │ │ -  Override of equal in _L_i_e_._h. │ │ │ │ -  │ │ │ │ bool  _g_t_s_a_m_:_:_a_s_s_e_r_t___e_q_u_a_l (const Vector &vec1, const Vector │ │ │ │ &vec2, double tol=1e-9) │ │ │ │   Same, prints if error. │ │ │ │   │ │ │ │ bool  _g_t_s_a_m_:_:_a_s_s_e_r_t___i_n_e_q_u_a_l (const Vector &vec1, const Vector │ │ │ │ &vec2, double tol=1e-9) │ │ │ │   Not the same, prints if error. │ │ │ │ @@ -90,58 +64,42 @@ │ │ │ │ bool  _g_t_s_a_m_:_:_l_i_n_e_a_r___d_e_p_e_n_d_e_n_t (const Vector &vec1, const │ │ │ │ Vector &vec2, double tol=1e-9) │ │ │ │   check whether two vectors are linearly dependent │ │ │ │   │ │ │ │ Vector  _g_t_s_a_m_:_:_e_d_i_v__ (const Vector &a, const Vector &b) │ │ │ │   elementwise division, but 0/0 = 0, not inf │ │ │ │   │ │ │ │ -template │ │ │ │ - double  ggttssaamm::::ddoott (const V1 &a, const V2 &b) │ │ │ │ -  Dot product. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - double  ggttssaamm::::iinnnneerr__pprroodd (const V1 &a, const V2 &b) │ │ │ │ -  compatibility version for ublas' _i_n_n_e_r___p_r_o_d_(_) │ │ │ │ + double  ggttssaamm::::hhoouusseeIInnPPllaaccee (Vector &x) │ │ │ │ +  beta = house(x) computes the HouseHolder vector in │ │ │ │ + place │ │ │ │   │ │ │ │ pair< double, Vector >  _g_t_s_a_m_:_:_h_o_u_s_e (const Vector &x) │ │ │ │ house(x,j) computes HouseHolder vector v and scaling │ │ │ │   factor beta from x, such that the corresponding │ │ │ │ Householder reflection zeroes out all but x. │ │ │ │   │ │ │ │ - double  ggttssaamm::::hhoouusseeIInnPPllaaccee (Vector &x) │ │ │ │ -  beta = house(x) computes the HouseHolder vector in │ │ │ │ - place │ │ │ │ + double  ggttssaamm::::wweeiigghhtteeddPPsseeuuddooiinnvveerrssee (const Vector &a, const │ │ │ │ + Vector &weights, Vector &pseudo) │ │ │ │   │ │ │ │ pair< Vector, double >  _g_t_s_a_m_:_:_w_e_i_g_h_t_e_d_P_s_e_u_d_o_i_n_v_e_r_s_e (const Vector &v, const │ │ │ │ Vector &weights) │ │ │ │ Weighted Householder solution vector, a.k.a., the │ │ │ │   pseudoinverse of the column NOTE: if any sigmas are │ │ │ │ zero (indicating a constraint) the pseudoinverse will │ │ │ │ be a selection vector, and the variance will be zero. │ │ │ │   │ │ │ │ - double  ggttssaamm::::wweeiigghhtteeddPPsseeuuddooiinnvveerrssee (const Vector &a, const │ │ │ │ - Vector &weights, Vector &pseudo) │ │ │ │ -  │ │ │ │ Vector  ggttssaamm::::ccoonnccaattVVeeccttoorrss (const std::list< Vector > &vs) │ │ │ │   concatenate Vectors │ │ │ │   │ │ │ │ Vector  ggttssaamm::::ccoonnccaattVVeeccttoorrss (size_t nrVectors,...) │ │ │ │   concatenate Vectors │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -typedef and functions to augment Eigen's VectorXd │ │ │ │ +typedef and functions to augment Eigen's Vectors │ │ │ │ Author │ │ │ │ Kai Ni │ │ │ │ Frank Dellaert │ │ │ │ - Alex Hagiopol │ │ │ │ Varun Agrawal │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? GGTTSSAAMM__MMAAKKEE__VVEECCTTOORR__DDEEFFSS ********** │ │ │ │ -#define GTSAM_MAKE_VECTOR_DEFS (   N ) │ │ │ │ -VVaalluuee:: │ │ │ │ -using Vector##N = Eigen::Matrix; \ │ │ │ │ -static const Eigen::MatrixBase::ConstantReturnType Z_##N##x1 = │ │ │ │ -Vector##N::Zero(); │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _V_e_c_t_o_r_._h │ │ │ │ + * _V_e_c_t_o_r_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00074.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,23 +1,19 @@ │ │ │ │ var a00074 = [ │ │ │ │ ["assert_equal", "a00074.html#ac3cf8e8e70cd696d9c789c31bc1e89a7", null], │ │ │ │ ["assert_equal", "a00074.html#a9f3ee662d25ffb8c04b4e35c4b02e90b", null], │ │ │ │ ["assert_inequal", "a00074.html#a2ca3db47b15350977c1f03c5560ab332", null], │ │ │ │ ["concatVectors", "a00074.html#ae1c88acfa9575bcea3f2e738cb637a85", null], │ │ │ │ ["concatVectors", "a00074.html#a09610ec69a8b3f3a00399bb378eda9cf", null], │ │ │ │ - ["dot", "a00074.html#ad80249acf12bbea741e755cd8fc73042", null], │ │ │ │ ["ediv_", "a00074.html#a14844c96706dc362917e0d5e76d65fbe", null], │ │ │ │ - ["equal", "a00074.html#a3d1cad2313f69f9fa5008fdc348d1526", null], │ │ │ │ - ["equal", "a00074.html#aa7ed1d4fe2dd6828cfeb2d8f488b818d", null], │ │ │ │ ["equal_with_abs_tol", "a00074.html#a8bdced1844ffd6a53af0396d82eaa6da", null], │ │ │ │ ["fpEqual", "a00074.html#ae19c359190a379cba44bf818a2293f7c", null], │ │ │ │ ["greaterThanOrEqual", "a00074.html#a368ee40bd9c0124d572d2e49bcb077bf", null], │ │ │ │ ["house", "a00074.html#afb77eefc25dea0fb3e0fcc8f246b617a", null], │ │ │ │ ["houseInPlace", "a00074.html#ac9c0c05b0198ec0fb6e4115edb755910", null], │ │ │ │ - ["inner_prod", "a00074.html#a4ca41ba9ec9d6d21a2b9f5e00f9f25ed", null], │ │ │ │ ["linear_dependent", "a00074.html#a2a0cfd7908b06491df49b6a9c9186775", null], │ │ │ │ ["operator==", "a00074.html#a64988014ab746343803620dc42513646", null], │ │ │ │ ["print", "a00074.html#a760cc36e9009b23cf564c436294b3504", null], │ │ │ │ ["print", "a00074.html#a5e5d8018a0f44a6a299406aeda27d44b", null], │ │ │ │ ["save", "a00074.html#a09f2bbdb9f9d633542362dbe8d79f9ab", null], │ │ │ │ ["weightedPseudoinverse", "a00074.html#aca1c56d11a05464a7a5458dc32ccc777", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00077.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Vector.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/timing.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,110 +96,53 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ Functions
│ │ │ -
Vector.cpp File Reference
│ │ │ +
timing.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

typedef and functions to augment Eigen's Vectors │ │ │ +

Timing utilities. │ │ │ More...

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

bool gtsam::fpEqual (double a, double b, double tol, bool check_relative_also=true)
 Ensure we are not including a different version of Eigen in user code than while compiling gtsam, since it can lead to hard-to-understand runtime crashes.
 
│ │ │ -void gtsam::print (const Vector &v, const std::string &s, std::ostream &stream)
 print without optional string, must specify cout yourself
 
│ │ │ -void gtsam::print (const Vector &v, const std::string &s="")
 print with optional string to cout
 
│ │ │ -void gtsam::save (const Vector &A, const std::string &s, const std::string &filename)
 save a vector to file, which can be loaded by matlab
 
│ │ │ -bool gtsam::operator== (const Vector &vec1, const Vector &vec2)
 operator==()
 
│ │ │ -bool gtsam::greaterThanOrEqual (const Vector &v1, const Vector &v2)
 Greater than or equal to operation returns true if all elements in v1 are greater than corresponding elements in v2.
 
│ │ │ -bool gtsam::equal_with_abs_tol (const Vector &vec1, const Vector &vec2, double tol=1e-9)
 VecA == VecB up to tolerance.
 
│ │ │ -bool gtsam::equal_with_abs_tol (const SubVector &vec1, const SubVector &vec2, double tol)
 
bool gtsam::assert_equal (const Vector &vec1, const Vector &vec2, double tol=1e-9)
 Same, prints if error.
 
bool gtsam::assert_inequal (const Vector &vec1, const Vector &vec2, double tol=1e-9)
 Not the same, prints if error.
 
bool gtsam::assert_equal (const SubVector &vec1, const SubVector &vec2, double tol=1e-9)
 Same, prints if error.
 
│ │ │ -bool gtsam::assert_equal (const ConstSubVector &expected, const ConstSubVector &actual, double tol)
 
bool gtsam::linear_dependent (const Vector &vec1, const Vector &vec2, double tol=1e-9)
 check whether two vectors are linearly dependent
 
Vector gtsam::ediv_ (const Vector &a, const Vector &b)
 elementwise division, but 0/0 = 0, not inf
 
│ │ │ -double gtsam::houseInPlace (Vector &x)
 beta = house(x) computes the HouseHolder vector in place
 
pair< double, Vector > gtsam::house (const Vector &x)
 house(x,j) computes HouseHolder vector v and scaling factor beta from x, such that the corresponding Householder reflection zeroes out all but x.
 
│ │ │ -double gtsam::weightedPseudoinverse (const Vector &a, const Vector &weights, Vector &pseudo)
 
pair< Vector, double > gtsam::weightedPseudoinverse (const Vector &v, const Vector &weights)
 Weighted Householder solution vector, a.k.a., the pseudoinverse of the column NOTE: if any sigmas are zero (indicating a constraint) the pseudoinverse will be a selection vector, and the variance will be zero.
 
│ │ │ -Vector gtsam::concatVectors (const std::list< Vector > &vs)
 concatenate Vectors
 
│ │ │ -Vector gtsam::concatVectors (size_t nrVectors,...)
 concatenate Vectors
 
│ │ │ +GTSAM_EXPORT boost::shared_ptr< TimingOutlinegtsam::internal::gTimingRoot (new TimingOutline("Total", getTicTocID("Total")))
 
│ │ │ +GTSAM_EXPORT boost::weak_ptr< TimingOutlinegtsam::internal::gCurrentTimer (gTimingRoot)
 
│ │ │ +size_t gtsam::internal::getTicTocID (const char *descriptionC)
 
│ │ │ +void gtsam::internal::tic (size_t id, const char *labelC)
 
│ │ │ +void gtsam::internal::toc (size_t id, const char *label)
 
│ │ │

Detailed Description

│ │ │ -

typedef and functions to augment Eigen's Vectors

│ │ │ -
Author
Kai Ni
│ │ │ -
│ │ │ -Frank Dellaert
│ │ │ -
│ │ │ -Varun Agrawal
│ │ │ +

Timing utilities.

│ │ │ +
Author
Richard Roberts, Michael Kaess
│ │ │ +
Date
Oct 5, 2010
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,105 +1,39 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Vector.cpp File Reference │ │ │ │ -typedef and functions to augment Eigen's Vectors _M_o_r_e_._._. │ │ │ │ +timing.cpp File Reference │ │ │ │ +Timing utilities. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ - bool  _g_t_s_a_m_:_:_f_p_E_q_u_a_l (double a, double b, double tol, bool │ │ │ │ - check_relative_also=true) │ │ │ │ - Ensure we are not including a different version of │ │ │ │ -  Eigen in user code than while compiling gtsam, since it │ │ │ │ - can lead to hard-to-understand runtime crashes. │ │ │ │ -  │ │ │ │ - void  ggttssaamm::::pprriinntt (const Vector &v, const std::string &s, │ │ │ │ - std::ostream &stream) │ │ │ │ -  print without optional string, must specify cout │ │ │ │ - yourself │ │ │ │ -  │ │ │ │ - void  ggttssaamm::::pprriinntt (const Vector &v, const std::string &s="") │ │ │ │ -  print with optional string to cout │ │ │ │ -  │ │ │ │ - void  ggttssaamm::::ssaavvee (const Vector &A, const std::string &s, │ │ │ │ - const std::string &filename) │ │ │ │ -  save a vector to file, which can be loaded by matlab │ │ │ │ -  │ │ │ │ - bool  ggttssaamm::::ooppeerraattoorr==== (const Vector &vec1, const Vector │ │ │ │ - &vec2) │ │ │ │ -  _o_p_e_r_a_t_o_r_=_=_(_) │ │ │ │ -  │ │ │ │ - bool  ggttssaamm::::ggrreeaatteerrTThhaannOOrrEEqquuaall (const Vector &v1, const │ │ │ │ - Vector &v2) │ │ │ │ - Greater than or equal to operation returns true if all │ │ │ │ -  elements in v1 are greater than corresponding elements │ │ │ │ - in v2. │ │ │ │ -  │ │ │ │ - bool  ggttssaamm::::eeqquuaall__wwiitthh__aabbss__ttooll (const Vector &vec1, const │ │ │ │ - Vector &vec2, double tol=1e-9) │ │ │ │ -  VecA == VecB up to tolerance. │ │ │ │ -  │ │ │ │ - bool  ggttssaamm::::eeqquuaall__wwiitthh__aabbss__ttooll (const SubVector &vec1, const │ │ │ │ - SubVector &vec2, double tol) │ │ │ │ -  │ │ │ │ - bool  _g_t_s_a_m_:_:_a_s_s_e_r_t___e_q_u_a_l (const Vector &vec1, const Vector │ │ │ │ - &vec2, double tol=1e-9) │ │ │ │ -  Same, prints if error. │ │ │ │ -  │ │ │ │ - bool  _g_t_s_a_m_:_:_a_s_s_e_r_t___i_n_e_q_u_a_l (const Vector &vec1, const Vector │ │ │ │ - &vec2, double tol=1e-9) │ │ │ │ -  Not the same, prints if error. │ │ │ │ -  │ │ │ │ - bool  _g_t_s_a_m_:_:_a_s_s_e_r_t___e_q_u_a_l (const SubVector &vec1, const │ │ │ │ - SubVector &vec2, double tol=1e-9) │ │ │ │ -  Same, prints if error. │ │ │ │ -  │ │ │ │ - bool  ggttssaamm::::aasssseerrtt__eeqquuaall (const ConstSubVector &expected, │ │ │ │ - const ConstSubVector &actual, double tol) │ │ │ │ -  │ │ │ │ - bool  _g_t_s_a_m_:_:_l_i_n_e_a_r___d_e_p_e_n_d_e_n_t (const Vector &vec1, const │ │ │ │ - Vector &vec2, double tol=1e-9) │ │ │ │ -  check whether two vectors are linearly dependent │ │ │ │ -  │ │ │ │ - Vector  _g_t_s_a_m_:_:_e_d_i_v__ (const Vector &a, const Vector &b) │ │ │ │ -  elementwise division, but 0/0 = 0, not inf │ │ │ │ -  │ │ │ │ - double  ggttssaamm::::hhoouusseeIInnPPllaaccee (Vector &x) │ │ │ │ -  beta = house(x) computes the HouseHolder vector in │ │ │ │ - place │ │ │ │ -  │ │ │ │ -pair< double, Vector >  _g_t_s_a_m_:_:_h_o_u_s_e (const Vector &x) │ │ │ │ - house(x,j) computes HouseHolder vector v and scaling │ │ │ │ -  factor beta from x, such that the corresponding │ │ │ │ - Householder reflection zeroes out all but x. │ │ │ │ -  │ │ │ │ - double  ggttssaamm::::wweeiigghhtteeddPPsseeuuddooiinnvveerrssee (const Vector &a, const │ │ │ │ - Vector &weights, Vector &pseudo) │ │ │ │ -  │ │ │ │ -pair< Vector, double >  _g_t_s_a_m_:_:_w_e_i_g_h_t_e_d_P_s_e_u_d_o_i_n_v_e_r_s_e (const Vector &v, const │ │ │ │ - Vector &weights) │ │ │ │ - Weighted Householder solution vector, a.k.a., the │ │ │ │ -  pseudoinverse of the column NOTE: if any sigmas are │ │ │ │ - zero (indicating a constraint) the pseudoinverse will │ │ │ │ - be a selection vector, and the variance will be zero. │ │ │ │ +GTSAM_EXPORT boost::shared_ptr< ggttssaamm::::iinntteerrnnaall::::ggTTiimmiinnggRRoooott (new │ │ │ │ + _T_i_m_i_n_g_O_u_t_l_i_n_e >  _T_i_m_i_n_g_O_u_t_l_i_n_e("Total", getTicTocID │ │ │ │ + ("Total"))) │ │ │ │   │ │ │ │ - Vector  ggttssaamm::::ccoonnccaattVVeeccttoorrss (const std::list< Vector > &vs) │ │ │ │ -  concatenate Vectors │ │ │ │ + GTSAM_EXPORT boost::weak_ptr< ggttssaamm::::iinntteerrnnaall::::ggCCuurrrreennttTTiimmeerr │ │ │ │ + _T_i_m_i_n_g_O_u_t_l_i_n_e >  (gTimingRoot) │ │ │ │   │ │ │ │ - Vector  ggttssaamm::::ccoonnccaattVVeeccttoorrss (size_t nrVectors,...) │ │ │ │ -  concatenate Vectors │ │ │ │ + size_t  ggttssaamm::::iinntteerrnnaall::::ggeettTTiiccTTooccIIDD (const char │ │ │ │ + *descriptionC) │ │ │ │ +  │ │ │ │ + void  ggttssaamm::::iinntteerrnnaall::::ttiicc (size_t id, const char │ │ │ │ + *labelC) │ │ │ │ +  │ │ │ │ + void  ggttssaamm::::iinntteerrnnaall::::ttoocc (size_t id, const char │ │ │ │ + *label) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -typedef and functions to augment Eigen's Vectors │ │ │ │ +Timing utilities. │ │ │ │ Author │ │ │ │ - Kai Ni │ │ │ │ - Frank Dellaert │ │ │ │ - Varun Agrawal │ │ │ │ + Richard Roberts, Michael Kaess │ │ │ │ + Date │ │ │ │ + Oct 5, 2010 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _V_e_c_t_o_r_._c_p_p │ │ │ │ + * _t_i_m_i_n_g_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00080.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Value.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/SymmetricBlockMatrix.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,43 +96,43 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
Value.h File Reference
│ │ │ +
SymmetricBlockMatrix.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

The base class for any variable that can be optimized or used in a factor. │ │ │ +

Access to matrices via blocks of pre-defined sizes. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │

│ │ │ Classes

class  gtsam::Value
 This is the base class for any type to be stored in Values. More...
class  gtsam::SymmetricBlockMatrix
 This class stores a dense matrix and allows it to be accessed as a collection of blocks. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │

Detailed Description

│ │ │ -

The base class for any variable that can be optimized or used in a factor.

│ │ │ -
Author
Richard Roberts
│ │ │ -
Date
Jan 14, 2012
│ │ │ +

Access to matrices via blocks of pre-defined sizes.

│ │ │ +

Used in GaussianFactor and GaussianConditional.

Author
Richard Roberts
│ │ │ +
Date
Sep 18, 2010
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +1,29 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -Value.h File Reference │ │ │ │ -The base class for any variable that can be optimized or used in a factor. │ │ │ │ -_M_o_r_e_._._. │ │ │ │ +SymmetricBlockMatrix.h File Reference │ │ │ │ +Access to matrices via blocks of pre-defined sizes. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_V_a_l_u_e │ │ │ │ -  This is the base class for any type to be stored in _V_a_l_u_e_s. _M_o_r_e_._._. │ │ │ │ +class   _g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ +  This class stores a dense matrix and allows it to be accessed as a │ │ │ │ + collection of blocks. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -The base class for any variable that can be optimized or used in a factor. │ │ │ │ +Access to matrices via blocks of pre-defined sizes. │ │ │ │ +Used in GaussianFactor and _G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l. │ │ │ │ Author │ │ │ │ Richard Roberts │ │ │ │ Date │ │ │ │ - Jan 14, 2012 │ │ │ │ + Sep 18, 2010 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _V_a_l_u_e_._h │ │ │ │ + * _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00080_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Value.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/SymmetricBlockMatrix.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,100 +98,439 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Value.h
│ │ │ +
SymmetricBlockMatrix.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │ -
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │ -
4 * Atlanta, Georgia 30332-0415
│ │ │ -
5 * All Rights Reserved
│ │ │ -
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │ +
3* GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │ +
4* Atlanta, Georgia 30332-0415
│ │ │ +
5* All Rights Reserved
│ │ │ +
6* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │ -
8 * See LICENSE for the license information
│ │ │ +
8* See LICENSE for the license information
│ │ │
9
│ │ │ -
10 * -------------------------------------------------------------------------- */
│ │ │ +
10* -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
19#pragma once
│ │ │ -
20
│ │ │ -
21#include <gtsam/config.h> // Configuration from CMake
│ │ │ -
22
│ │ │ -
23#include <gtsam/base/Vector.h>
│ │ │ +
18#pragma once
│ │ │ +
19
│ │ │ + │ │ │ +
21#include <gtsam/base/Matrix.h>
│ │ │ +
22#include <gtsam/base/types.h>
│ │ │ +
23#include <gtsam/dllexport.h>
│ │ │
24#include <boost/serialization/nvp.hpp>
│ │ │ -
25#include <boost/serialization/assume_abstract.hpp>
│ │ │ -
26#include <memory>
│ │ │ -
27
│ │ │ -
28namespace gtsam {
│ │ │ -
29
│ │ │ -
│ │ │ -
37 class GTSAM_EXPORT Value {
│ │ │ -
38 public:
│ │ │ +
25#include <cassert>
│ │ │ +
26#include <stdexcept>
│ │ │ +
27#include <array>
│ │ │ +
28
│ │ │ +
29namespace boost {
│ │ │ +
30namespace serialization {
│ │ │ +
31class access;
│ │ │ +
32} /* namespace serialization */
│ │ │ +
33} /* namespace boost */
│ │ │ +
34
│ │ │ +
35namespace gtsam {
│ │ │ +
36
│ │ │ +
37 // Forward declarations
│ │ │ +
38 class VerticalBlockMatrix;
│ │ │
39
│ │ │ -
41 virtual Value* clone_() const = 0;
│ │ │ -
42
│ │ │ -
44 virtual void deallocate_() const = 0;
│ │ │ -
45
│ │ │ -
47 virtual boost::shared_ptr<Value> clone() const = 0;
│ │ │ -
48
│ │ │ -
50 virtual bool equals_(const Value& other, double tol = 1e-9) const = 0;
│ │ │ -
51
│ │ │ -
53 virtual void print(const std::string& str = "") const = 0;
│ │ │ -
54
│ │ │ -
60 virtual size_t dim() const = 0;
│ │ │ +
│ │ │ +
51 class GTSAM_EXPORT SymmetricBlockMatrix
│ │ │ +
52 {
│ │ │ +
53 public:
│ │ │ + │ │ │ +
55 typedef Eigen::Block<Matrix> Block;
│ │ │ +
56 typedef Eigen::Block<const Matrix> constBlock;
│ │ │ +
57
│ │ │ +
58 protected:
│ │ │ +
59 Matrix matrix_;
│ │ │ + │ │ │
61
│ │ │ -
68 virtual Value* retract_(const Vector& delta) const = 0;
│ │ │ -
69
│ │ │ -
76 virtual Vector localCoordinates_(const Value& value) const = 0;
│ │ │ + │ │ │ +
63
│ │ │ +
64 public:
│ │ │ + │ │ │ +
67
│ │ │ +
69 template<typename CONTAINER>
│ │ │ +
│ │ │ +
70 SymmetricBlockMatrix(const CONTAINER& dimensions, bool appendOneDimension = false) :
│ │ │ +
71 blockStart_(0)
│ │ │ +
72 {
│ │ │ +
73 fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension);
│ │ │ +
74 matrix_.resize(variableColOffsets_.back(), variableColOffsets_.back());
│ │ │ +
75 assertInvariants();
│ │ │ +
76 }
│ │ │ +
│ │ │
77
│ │ │ -
│ │ │ -
79 virtual Value& operator=(const Value& /*rhs*/) {
│ │ │ -
80 //needs a empty definition so recursion in implicit derived assignment operators work
│ │ │ -
81 return *this;
│ │ │ -
82 }
│ │ │ -
│ │ │ -
83
│ │ │ -
85 template<typename ValueType>
│ │ │ -
86 const ValueType& cast() const;
│ │ │ +
79 template<typename ITERATOR>
│ │ │ +
│ │ │ +
80 SymmetricBlockMatrix(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool appendOneDimension = false) :
│ │ │ +
81 blockStart_(0)
│ │ │ +
82 {
│ │ │ +
83 fillOffsets(firstBlockDim, lastBlockDim, appendOneDimension);
│ │ │ +
84 matrix_.resize(variableColOffsets_.back(), variableColOffsets_.back());
│ │ │ +
85 assertInvariants();
│ │ │ +
86 }
│ │ │ +
│ │ │
87
│ │ │ -
89 virtual ~Value() {}
│ │ │ -
90
│ │ │ -
91 private:
│ │ │ -
122 friend class boost::serialization::access;
│ │ │ -
123 template<class ARCHIVE>
│ │ │ -
124 void serialize(ARCHIVE & /*ar*/, const unsigned int /*version*/) {
│ │ │ +
89 template<typename CONTAINER>
│ │ │ +
│ │ │ +
90 SymmetricBlockMatrix(const CONTAINER& dimensions, const Matrix& matrix, bool appendOneDimension = false) :
│ │ │ +
91 blockStart_(0)
│ │ │ +
92 {
│ │ │ +
93 matrix_.resize(matrix.rows(), matrix.cols());
│ │ │ +
94 matrix_.triangularView<Eigen::Upper>() = matrix.triangularView<Eigen::Upper>();
│ │ │ +
95 fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension);
│ │ │ +
96 if(matrix_.rows() != matrix_.cols())
│ │ │ +
97 throw std::invalid_argument("Requested to create a SymmetricBlockMatrix from a non-square matrix.");
│ │ │ +
98 if(variableColOffsets_.back() != matrix_.cols())
│ │ │ +
99 throw std::invalid_argument("Requested to create a SymmetricBlockMatrix with dimensions that do not sum to the total size of the provided matrix.");
│ │ │ +
100 assertInvariants();
│ │ │ +
101 }
│ │ │ +
│ │ │ +
102
│ │ │ +
106 static SymmetricBlockMatrix LikeActiveViewOf(const SymmetricBlockMatrix& other);
│ │ │ +
107
│ │ │ +
111 static SymmetricBlockMatrix LikeActiveViewOf(const VerticalBlockMatrix& other);
│ │ │ +
112
│ │ │ +
114 DenseIndex rows() const { assertInvariants(); return variableColOffsets_.back() - variableColOffsets_[blockStart_]; }
│ │ │ +
115
│ │ │ +
117 DenseIndex cols() const { return rows(); }
│ │ │ +
118
│ │ │ +
120 DenseIndex nBlocks() const { return nActualBlocks() - blockStart_; }
│ │ │ +
121
│ │ │ +
│ │ │ + │ │ │ +
124 return calcIndices(block, block, 1, 1)[2];
│ │ │
125 }
│ │ │ +
│ │ │
126
│ │ │ -
127 };
│ │ │ +
129
│ │ │ +
132 Matrix block(DenseIndex I, DenseIndex J) const;
│ │ │ +
133
│ │ │ +
│ │ │ +
135 Eigen::SelfAdjointView<Block, Eigen::Upper> diagonalBlock(DenseIndex J) {
│ │ │ +
136 return block_(J, J).selfadjointView<Eigen::Upper>();
│ │ │ +
137 }
│ │ │ +
│ │ │ +
138
│ │ │ +
│ │ │ +
140 Eigen::SelfAdjointView<constBlock, Eigen::Upper> diagonalBlock(DenseIndex J) const {
│ │ │ +
141 return block_(J, J).selfadjointView<Eigen::Upper>();
│ │ │ +
142 }
│ │ │ +
│ │ │ +
143
│ │ │ +
│ │ │ +
145 Vector diagonal(DenseIndex J) const {
│ │ │ +
146 return block_(J, J).diagonal();
│ │ │ +
147 }
│ │ │ +
│ │ │ +
148
│ │ │ +
│ │ │ +
150 constBlock aboveDiagonalBlock(DenseIndex I, DenseIndex J) const {
│ │ │ +
151 assert(I < J);
│ │ │ +
152 return block_(I, J);
│ │ │ +
153 }
│ │ │ +
│ │ │ +
154
│ │ │ +
│ │ │ +
156 Eigen::SelfAdjointView<constBlock, Eigen::Upper> selfadjointView(
│ │ │ +
157 DenseIndex I, DenseIndex J) const {
│ │ │ +
158 assert(J > I);
│ │ │ +
159 return block_(I, I, J - I, J - I).selfadjointView<Eigen::Upper>();
│ │ │ +
160 }
│ │ │ +
│ │ │ +
161
│ │ │ +
│ │ │ +
163 Eigen::TriangularView<constBlock, Eigen::Upper> triangularView(DenseIndex I,
│ │ │ +
164 DenseIndex J) const {
│ │ │ +
165 assert(J > I);
│ │ │ +
166 return block_(I, I, J - I, J - I).triangularView<Eigen::Upper>();
│ │ │ +
167 }
│ │ │ +
│ │ │ +
168
│ │ │ +
│ │ │ +
170 constBlock aboveDiagonalRange(DenseIndex i_startBlock,
│ │ │ +
171 DenseIndex i_endBlock,
│ │ │ +
172 DenseIndex j_startBlock,
│ │ │ +
173 DenseIndex j_endBlock) const {
│ │ │ +
174 assert(i_startBlock < j_startBlock);
│ │ │ +
175 assert(i_endBlock <= j_startBlock);
│ │ │ +
176 return block_(i_startBlock, j_startBlock, i_endBlock - i_startBlock,
│ │ │ +
177 j_endBlock - j_startBlock);
│ │ │ +
178 }
│ │ │ +
│ │ │ +
179
│ │ │ +
│ │ │ +
181 Block aboveDiagonalRange(DenseIndex i_startBlock, DenseIndex i_endBlock,
│ │ │ +
182 DenseIndex j_startBlock, DenseIndex j_endBlock) {
│ │ │ +
183 assert(i_startBlock < j_startBlock);
│ │ │ +
184 assert(i_endBlock <= j_startBlock);
│ │ │ +
185 return block_(i_startBlock, j_startBlock, i_endBlock - i_startBlock,
│ │ │ +
186 j_endBlock - j_startBlock);
│ │ │ +
187 }
│ │ │ +
│ │ │ +
188
│ │ │ +
192
│ │ │ +
194 template <typename XprType>
│ │ │ +
│ │ │ +
195 void setDiagonalBlock(DenseIndex I, const XprType& xpr) {
│ │ │ +
196 block_(I, I).triangularView<Eigen::Upper>() = xpr.template triangularView<Eigen::Upper>();
│ │ │ +
197 }
│ │ │ +
│ │ │ +
198
│ │ │ +
200 template <typename XprType>
│ │ │ +
│ │ │ +
201 void setOffDiagonalBlock(DenseIndex I, DenseIndex J, const XprType& xpr) {
│ │ │ +
202 assert(I != J);
│ │ │ +
203 if (I < J) {
│ │ │ +
204 block_(I, J) = xpr;
│ │ │ +
205 } else {
│ │ │ +
206 block_(J, I) = xpr.transpose();
│ │ │ +
207 }
│ │ │ +
208 }
│ │ │ +
│ │ │ +
209
│ │ │ +
211 template <typename XprType>
│ │ │ +
│ │ │ +
212 void updateDiagonalBlock(DenseIndex I, const XprType& xpr) {
│ │ │ +
213 // TODO(gareth): Eigen won't let us add triangular or self-adjoint views
│ │ │ +
214 // here, so we do it manually.
│ │ │ +
215 auto dest = block_(I, I);
│ │ │ +
216 assert(dest.rows() == xpr.rows());
│ │ │ +
217 assert(dest.cols() == xpr.cols());
│ │ │ +
218 for (DenseIndex col = 0; col < dest.cols(); ++col) {
│ │ │ +
219 for (DenseIndex row = 0; row <= col; ++row) {
│ │ │ +
220 dest(row, col) += xpr(row, col);
│ │ │ +
221 }
│ │ │ +
222 }
│ │ │ +
223 }
│ │ │ +
│ │ │ +
224
│ │ │ +
227 template <typename XprType>
│ │ │ +
│ │ │ +
228 void updateOffDiagonalBlock(DenseIndex I, DenseIndex J, const XprType& xpr) {
│ │ │ +
229 assert(I != J);
│ │ │ +
230 if (I < J) {
│ │ │ +
231 block_(I, J).noalias() += xpr;
│ │ │ +
232 } else {
│ │ │ +
233 block_(J, I).noalias() += xpr.transpose();
│ │ │ +
234 }
│ │ │ +
235 }
│ │ │ +
│ │ │ +
236
│ │ │ +
240
│ │ │ +
│ │ │ +
242 Eigen::SelfAdjointView<Block, Eigen::Upper> selfadjointView() {
│ │ │ +
243 return full().selfadjointView<Eigen::Upper>();
│ │ │ +
244 }
│ │ │ +
│ │ │ +
245
│ │ │ +
│ │ │ +
247 Eigen::SelfAdjointView<constBlock, Eigen::Upper> selfadjointView() const {
│ │ │ +
248 return full().selfadjointView<Eigen::Upper>();
│ │ │ +
249 }
│ │ │ +
│ │ │ +
250
│ │ │ +
252 template <typename XprType>
│ │ │ +
│ │ │ +
253 void setFullMatrix(const XprType& xpr) {
│ │ │ +
254 full().triangularView<Eigen::Upper>() = xpr.template triangularView<Eigen::Upper>();
│ │ │ +
255 }
│ │ │ +
│ │ │ +
256
│ │ │ +
│ │ │ +
258 void setZero() {
│ │ │ +
259 full().triangularView<Eigen::Upper>().setZero();
│ │ │ +
260 }
│ │ │ +
│ │ │ +
261
│ │ │ +
263 void negate();
│ │ │ +
264
│ │ │ +
266 void invertInPlace();
│ │ │ +
267
│ │ │ +
269
│ │ │ +
273 DenseIndex& blockStart() { return blockStart_; }
│ │ │ +
274
│ │ │ +
277 DenseIndex blockStart() const { return blockStart_; }
│ │ │ +
278
│ │ │ +
289 void choleskyPartial(DenseIndex nFrontals);
│ │ │ +
290
│ │ │ + │ │ │ +
297
│ │ │ +
298 protected:
│ │ │ +
299
│ │ │ +
│ │ │ + │ │ │ +
302 return variableColOffsets_.size();
│ │ │ +
303 }
│ │ │ +
│ │ │ +
304
│ │ │ +
│ │ │ + │ │ │ +
307 return nOffsets() - 1;
│ │ │ +
308 }
│ │ │ +
│ │ │ +
309
│ │ │ +
│ │ │ + │ │ │ +
312 assert(block >= 0);
│ │ │ +
313 const DenseIndex actual_index = block + blockStart();
│ │ │ +
314 assert(actual_index < nOffsets());
│ │ │ +
315 return variableColOffsets_[actual_index];
│ │ │ +
316 }
│ │ │ +
│ │ │ +
317
│ │ │ +
│ │ │ +
319 constBlock block_(DenseIndex iBlock, DenseIndex jBlock,
│ │ │ +
320 DenseIndex blockRows = 1, DenseIndex blockCols = 1) const {
│ │ │ +
321 const std::array<DenseIndex, 4> indices =
│ │ │ +
322 calcIndices(iBlock, jBlock, blockRows, blockCols);
│ │ │ +
323 return matrix_.block(indices[0], indices[1], indices[2], indices[3]);
│ │ │ +
324 }
│ │ │ +
│ │ │ +
325
│ │ │ +
│ │ │ +
327 Block block_(DenseIndex iBlock, DenseIndex jBlock, DenseIndex blockRows = 1,
│ │ │ +
328 DenseIndex blockCols = 1) {
│ │ │ +
329 const std::array<DenseIndex, 4> indices =
│ │ │ +
330 calcIndices(iBlock, jBlock, blockRows, blockCols);
│ │ │ +
331 return matrix_.block(indices[0], indices[1], indices[2], indices[3]);
│ │ │ +
332 }
│ │ │ +
│ │ │ +
333
│ │ │ +
│ │ │ +
335 constBlock full() const {
│ │ │ +
336 return block_(0, 0, nBlocks(), nBlocks());
│ │ │ +
337 }
│ │ │ +
│ │ │ +
338
│ │ │ +
│ │ │ +
340 Block full() {
│ │ │ +
341 return block_(0, 0, nBlocks(), nBlocks());
│ │ │ +
342 }
│ │ │ +
│ │ │ +
343
│ │ │ +
│ │ │ +
345 std::array<DenseIndex, 4> calcIndices(DenseIndex iBlock, DenseIndex jBlock,
│ │ │ +
346 DenseIndex blockRows,
│ │ │ +
347 DenseIndex blockCols) const {
│ │ │ +
348 assert(blockRows >= 0);
│ │ │ +
349 assert(blockCols >= 0);
│ │ │ +
350
│ │ │ +
351 // adjust indices to account for start and size of blocks
│ │ │ +
352 const DenseIndex denseI = offset(iBlock);
│ │ │ +
353 const DenseIndex denseJ = offset(jBlock);
│ │ │ +
354 const DenseIndex denseRows = offset(iBlock + blockRows) - denseI;
│ │ │ +
355 const DenseIndex denseCols = offset(jBlock + blockCols) - denseJ;
│ │ │ +
356 return {{denseI, denseJ, denseRows, denseCols}};
│ │ │ +
357 }
│ │ │ +
│ │ │ +
358
│ │ │ +
359 void assertInvariants() const
│ │ │ +
360 {
│ │ │ +
361 assert(matrix_.rows() == matrix_.cols());
│ │ │ +
362 assert(matrix_.cols() == variableColOffsets_.back());
│ │ │ +
363 assert(blockStart_ < (DenseIndex)variableColOffsets_.size());
│ │ │ +
364 }
│ │ │ +
365
│ │ │ +
366 template<typename ITERATOR>
│ │ │ +
367 void fillOffsets(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool appendOneDimension)
│ │ │ +
368 {
│ │ │ +
369 variableColOffsets_.resize((lastBlockDim-firstBlockDim) + 1 + (appendOneDimension ? 1 : 0));
│ │ │ +
370 variableColOffsets_[0] = 0;
│ │ │ +
371 DenseIndex j=0;
│ │ │ +
372 for(ITERATOR dim=firstBlockDim; dim!=lastBlockDim; ++dim) {
│ │ │ +
373 variableColOffsets_[j+1] = variableColOffsets_[j] + *dim;
│ │ │ +
374 ++ j;
│ │ │ +
375 }
│ │ │ +
376 if(appendOneDimension)
│ │ │ +
377 {
│ │ │ +
378 variableColOffsets_[j+1] = variableColOffsets_[j] + 1;
│ │ │ +
379 ++ j;
│ │ │ +
380 }
│ │ │ +
381 }
│ │ │ +
382
│ │ │ +
383 friend class VerticalBlockMatrix;
│ │ │ +
384 template<typename SymmetricBlockMatrixType> friend class SymmetricBlockMatrixBlockExpr;
│ │ │ +
385
│ │ │ +
386 private:
│ │ │ +
388 friend class boost::serialization::access;
│ │ │ +
389 template<class ARCHIVE>
│ │ │ +
390 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
│ │ │ +
391 // Fill in the lower triangle part of the matrix, so boost::serialization won't
│ │ │ +
392 // complain about uninitialized data with an input_stream_error exception
│ │ │ +
393 // http://www.boost.org/doc/libs/1_37_0/libs/serialization/doc/exceptions.html#stream_error
│ │ │ +
394 matrix_.triangularView<Eigen::Lower>() = matrix_.triangularView<Eigen::Upper>().transpose();
│ │ │ +
395 ar & BOOST_SERIALIZATION_NVP(matrix_);
│ │ │ +
396 ar & BOOST_SERIALIZATION_NVP(variableColOffsets_);
│ │ │ +
397 ar & BOOST_SERIALIZATION_NVP(blockStart_);
│ │ │ +
398 }
│ │ │ +
399 };
│ │ │
│ │ │ -
128
│ │ │ -
129} /* namespace gtsam */
│ │ │ -
130
│ │ │ -
131BOOST_SERIALIZATION_ASSUME_ABSTRACT(gtsam::Value)
│ │ │ -
typedef and functions to augment Eigen's VectorXd
│ │ │ +
400
│ │ │ +
402 class CholeskyFailed;
│ │ │ +
403
│ │ │ +
404}
│ │ │ +
typedef and functions to augment Eigen's MatrixXd
│ │ │ +
Typedefs for easier changing of types.
│ │ │ +
A thin wrapper around std::vector that uses a custom allocator.
│ │ │ +
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
FastVector is a type alias to a std::vector with a custom memory allocator.
Definition FastVector.h:34
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
This is the base class for any type to be stored in Values.
Definition Value.h:37
│ │ │ -
virtual size_t dim() const =0
Return the dimensionality of the tangent space of this value.
│ │ │ -
virtual Value * retract_(const Vector &delta) const =0
Increment the value, by mapping from the vector delta in the tangent space of the current value back ...
│ │ │ -
virtual void deallocate_() const =0
Deallocate a raw pointer of this value.
│ │ │ -
virtual ~Value()
Virutal destructor.
Definition Value.h:89
│ │ │ -
virtual bool equals_(const Value &other, double tol=1e-9) const =0
Compare this Value with another for equality.
│ │ │ -
virtual Vector localCoordinates_(const Value &value) const =0
Compute the coordinates in the tangent space of this value that retract() would map to value.
│ │ │ -
virtual Value & operator=(const Value &)
Assignment operator.
Definition Value.h:79
│ │ │ -
virtual void print(const std::string &str="") const =0
Print this value, for debugging and unit tests.
│ │ │ -
virtual Value * clone_() const =0
Clone this value in a special memory pool, must be deleted with Value::deallocate_,...
│ │ │ -
virtual boost::shared_ptr< Value > clone() const =0
Clone this value (normal clone on the heap, delete with 'delete' operator)
│ │ │ +
ptrdiff_t DenseIndex
The index type for Eigen objects.
Definition types.h:106
│ │ │ +
const MATRIX::ConstRowXpr row(const MATRIX &A, size_t j)
Extracts a row view from a matrix that avoids a copy.
Definition Matrix.h:222
│ │ │ +
void split(const G &g, const PredecessorMap< KEY > &tree, G &Ab1, G &Ab2)
Split the graph into two parts: one corresponds to the given spanning tree, and the other corresponds...
Definition graph-inl.h:255
│ │ │ +
bool choleskyPartial(Matrix &ABC, size_t nFrontal, size_t topleft)
Partial Cholesky computes a factor [R S such that [R' 0 [R S = [A B 0 L] S' I] 0 L] B' C].
Definition cholesky.cpp:108
│ │ │ +
This class stores a dense matrix and allows it to be accessed as a collection of blocks.
Definition SymmetricBlockMatrix.h:52
│ │ │ +
Block full()
Get the full matrix as a block.
Definition SymmetricBlockMatrix.h:340
│ │ │ +
DenseIndex blockStart_
Changes apparent matrix view, see main class comment.
Definition SymmetricBlockMatrix.h:62
│ │ │ +
void setDiagonalBlock(DenseIndex I, const XprType &xpr)
Set a diagonal block. Only the upper triangular portion of xpr is evaluated.
Definition SymmetricBlockMatrix.h:195
│ │ │ +
DenseIndex nActualBlocks() const
Number of actual blocks in the full matrix.
Definition SymmetricBlockMatrix.h:306
│ │ │ +
Vector diagonal(DenseIndex J) const
Get the diagonal of the J'th diagonal block.
Definition SymmetricBlockMatrix.h:145
│ │ │ +
Matrix matrix_
The full matrix.
Definition SymmetricBlockMatrix.h:59
│ │ │ +
DenseIndex cols() const
Column size.
Definition SymmetricBlockMatrix.h:117
│ │ │ +
DenseIndex getDim(DenseIndex block) const
Number of dimensions for variable on this diagonal block.
Definition SymmetricBlockMatrix.h:123
│ │ │ +
void setZero()
Set the entire active matrix zero.
Definition SymmetricBlockMatrix.h:258
│ │ │ +
void setOffDiagonalBlock(DenseIndex I, DenseIndex J, const XprType &xpr)
Set an off-diagonal block. Only the upper triangular portion of xpr is evaluated.
Definition SymmetricBlockMatrix.h:201
│ │ │ +
void setFullMatrix(const XprType &xpr)
Set the entire active matrix. Only reads the upper triangular part of xpr.
Definition SymmetricBlockMatrix.h:253
│ │ │ +
Eigen::SelfAdjointView< Block, Eigen::Upper > selfadjointView()
Get self adjoint view.
Definition SymmetricBlockMatrix.h:242
│ │ │ +
constBlock aboveDiagonalBlock(DenseIndex I, DenseIndex J) const
Get block above the diagonal (I, J).
Definition SymmetricBlockMatrix.h:150
│ │ │ +
constBlock block_(DenseIndex iBlock, DenseIndex jBlock, DenseIndex blockRows=1, DenseIndex blockCols=1) const
Get an arbitrary block from the matrix. Indices are in block units.
Definition SymmetricBlockMatrix.h:319
│ │ │ +
constBlock full() const
Get the full matrix as a block.
Definition SymmetricBlockMatrix.h:335
│ │ │ +
DenseIndex rows() const
Row size.
Definition SymmetricBlockMatrix.h:114
│ │ │ +
Block aboveDiagonalRange(DenseIndex i_startBlock, DenseIndex i_endBlock, DenseIndex j_startBlock, DenseIndex j_endBlock)
Get a range [i,j) from the matrix. Indices are in block units.
Definition SymmetricBlockMatrix.h:181
│ │ │ +
Eigen::TriangularView< constBlock, Eigen::Upper > triangularView(DenseIndex I, DenseIndex J) const
Return the square sub-matrix that contains blocks(i:j, i:j) as a triangular view.
Definition SymmetricBlockMatrix.h:163
│ │ │ +
Eigen::SelfAdjointView< constBlock, Eigen::Upper > diagonalBlock(DenseIndex J) const
Return the J'th diagonal block as a self adjoint view.
Definition SymmetricBlockMatrix.h:140
│ │ │ +
SymmetricBlockMatrix(const CONTAINER &dimensions, const Matrix &matrix, bool appendOneDimension=false)
Construct from a container of the sizes of each vertical block and a pre-prepared matrix.
Definition SymmetricBlockMatrix.h:90
│ │ │ +
DenseIndex blockStart() const
Retrieve the first logical block, i.e.
Definition SymmetricBlockMatrix.h:277
│ │ │ +
Eigen::SelfAdjointView< constBlock, Eigen::Upper > selfadjointView() const
Get self adjoint view.
Definition SymmetricBlockMatrix.h:247
│ │ │ +
void updateOffDiagonalBlock(DenseIndex I, DenseIndex J, const XprType &xpr)
Update an off diagonal block.
Definition SymmetricBlockMatrix.h:228
│ │ │ +
SymmetricBlockMatrix(const CONTAINER &dimensions, bool appendOneDimension=false)
Construct from a container of the sizes of each block.
Definition SymmetricBlockMatrix.h:70
│ │ │ +
SymmetricBlockMatrix(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool appendOneDimension=false)
Construct from iterator over the sizes of each vertical block.
Definition SymmetricBlockMatrix.h:80
│ │ │ +
DenseIndex & blockStart()
Retrieve or modify the first logical block, i.e.
Definition SymmetricBlockMatrix.h:273
│ │ │ +
constBlock aboveDiagonalRange(DenseIndex i_startBlock, DenseIndex i_endBlock, DenseIndex j_startBlock, DenseIndex j_endBlock) const
Get a range [i,j) from the matrix. Indices are in block units.
Definition SymmetricBlockMatrix.h:170
│ │ │ +
Eigen::SelfAdjointView< Block, Eigen::Upper > diagonalBlock(DenseIndex J)
Return the J'th diagonal block as a self adjoint view.
Definition SymmetricBlockMatrix.h:135
│ │ │ +
Block block_(DenseIndex iBlock, DenseIndex jBlock, DenseIndex blockRows=1, DenseIndex blockCols=1)
Get an arbitrary block from the matrix. Indices are in block units.
Definition SymmetricBlockMatrix.h:327
│ │ │ +
void updateDiagonalBlock(DenseIndex I, const XprType &xpr)
Increment the diagonal block by the values in xpr. Only reads the upper triangular part of xpr.
Definition SymmetricBlockMatrix.h:212
│ │ │ +
DenseIndex nOffsets() const
Number of offsets in the full matrix.
Definition SymmetricBlockMatrix.h:301
│ │ │ +
std::array< DenseIndex, 4 > calcIndices(DenseIndex iBlock, DenseIndex jBlock, DenseIndex blockRows, DenseIndex blockCols) const
Compute the indices into the underlying matrix for a given block.
Definition SymmetricBlockMatrix.h:345
│ │ │ +
DenseIndex nBlocks() const
Block count.
Definition SymmetricBlockMatrix.h:120
│ │ │ +
FastVector< DenseIndex > variableColOffsets_
the starting columns of each block (0-based)
Definition SymmetricBlockMatrix.h:60
│ │ │ +
Eigen::SelfAdjointView< constBlock, Eigen::Upper > selfadjointView(DenseIndex I, DenseIndex J) const
Return the square sub-matrix that contains blocks(i:j, i:j).
Definition SymmetricBlockMatrix.h:156
│ │ │ +
DenseIndex offset(DenseIndex block) const
Get an offset for a block index (in the active view).
Definition SymmetricBlockMatrix.h:311
│ │ │ +
This class stores a dense matrix and allows it to be accessed as a collection of vertical blocks.
Definition VerticalBlockMatrix.h:43
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,119 +1,546 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Value.h │ │ │ │ +SymmetricBlockMatrix.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ -3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ -4 * Atlanta, Georgia 30332-0415 │ │ │ │ -5 * All Rights Reserved │ │ │ │ -6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ +3* GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ +4* Atlanta, Georgia 30332-0415 │ │ │ │ +5* All Rights Reserved │ │ │ │ +6* Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ -8 * See LICENSE for the license information │ │ │ │ +8* See LICENSE for the license information │ │ │ │ 9 │ │ │ │ -10 * ------------------------------------------------------------------------- │ │ │ │ +10* ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -19#pragma once │ │ │ │ -20 │ │ │ │ -21#include // Configuration from CMake │ │ │ │ -22 │ │ │ │ -23#include <_g_t_s_a_m_/_b_a_s_e_/_V_e_c_t_o_r_._h> │ │ │ │ +18#pragma once │ │ │ │ +19 │ │ │ │ +20#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_V_e_c_t_o_r_._h> │ │ │ │ +21#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_._h> │ │ │ │ +22#include <_g_t_s_a_m_/_b_a_s_e_/_t_y_p_e_s_._h> │ │ │ │ +23#include │ │ │ │ 24#include │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27 │ │ │ │ -28namespace _g_t_s_a_m { │ │ │ │ -29 │ │ │ │ -_3_7 class GTSAM_EXPORT _V_a_l_u_e { │ │ │ │ -38 public: │ │ │ │ +25#include │ │ │ │ +26#include │ │ │ │ +27#include │ │ │ │ +28 │ │ │ │ +29namespace boost { │ │ │ │ +30namespace serialization { │ │ │ │ +31class access; │ │ │ │ +32} /* namespace serialization */ │ │ │ │ +33} /* namespace boost */ │ │ │ │ +34 │ │ │ │ +35namespace _g_t_s_a_m { │ │ │ │ +36 │ │ │ │ +37 // Forward declarations │ │ │ │ +38 class VerticalBlockMatrix; │ │ │ │ 39 │ │ │ │ -_4_1 virtual _V_a_l_u_e* _c_l_o_n_e__() const = 0; │ │ │ │ -42 │ │ │ │ -_4_4 virtual void _d_e_a_l_l_o_c_a_t_e__() const = 0; │ │ │ │ -45 │ │ │ │ -_4_7 virtual boost::shared_ptr _c_l_o_n_e() const = 0; │ │ │ │ -48 │ │ │ │ -_5_0 virtual bool _e_q_u_a_l_s__(const _V_a_l_u_e& other, double tol = 1e-9) const = 0; │ │ │ │ -51 │ │ │ │ -_5_3 virtual void _p_r_i_n_t(const std::string& str = "") const = 0; │ │ │ │ -54 │ │ │ │ -_6_0 virtual size_t _d_i_m() const = 0; │ │ │ │ +_5_1 class GTSAM_EXPORT _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ +52 { │ │ │ │ +53 public: │ │ │ │ +54 typedef _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x _T_h_i_s; │ │ │ │ +55 typedef Eigen::Block Block; │ │ │ │ +56 typedef Eigen::Block constBlock; │ │ │ │ +57 │ │ │ │ +58 protected: │ │ │ │ +_5_9 Matrix _m_a_t_r_i_x__; │ │ │ │ +_6_0 _F_a_s_t_V_e_c_t_o_r_<_D_e_n_s_e_I_n_d_e_x_> _v_a_r_i_a_b_l_e_C_o_l_O_f_f_s_e_t_s__; │ │ │ │ 61 │ │ │ │ -_6_8 virtual _V_a_l_u_e* _r_e_t_r_a_c_t__(const Vector& delta) const = 0; │ │ │ │ -69 │ │ │ │ -_7_6 virtual Vector _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s__(const _V_a_l_u_e& value) const = 0; │ │ │ │ +_6_2 _D_e_n_s_e_I_n_d_e_x _b_l_o_c_k_S_t_a_r_t__; │ │ │ │ +63 │ │ │ │ +64 public: │ │ │ │ +66 _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x(); │ │ │ │ +67 │ │ │ │ +69 template │ │ │ │ +_7_0 _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x(const CONTAINER& dimensions, bool appendOneDimension = │ │ │ │ +false) : │ │ │ │ +71 blockStart_(0) │ │ │ │ +72 { │ │ │ │ +73 fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension); │ │ │ │ +74 matrix_.resize(variableColOffsets_.back(), variableColOffsets_.back()); │ │ │ │ +75 assertInvariants(); │ │ │ │ +76 } │ │ │ │ 77 │ │ │ │ -_7_9 virtual _V_a_l_u_e& _o_p_e_r_a_t_o_r_=(const _V_a_l_u_e& /*rhs*/) { │ │ │ │ -80 //needs a empty definition so recursion in implicit derived assignment │ │ │ │ -operators work │ │ │ │ -81 return *this; │ │ │ │ -82 } │ │ │ │ -83 │ │ │ │ -85 template │ │ │ │ -86 const ValueType& cast() const; │ │ │ │ +79 template │ │ │ │ +_8_0 _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool │ │ │ │ +appendOneDimension = false) : │ │ │ │ +81 blockStart_(0) │ │ │ │ +82 { │ │ │ │ +83 fillOffsets(firstBlockDim, lastBlockDim, appendOneDimension); │ │ │ │ +84 matrix_.resize(variableColOffsets_.back(), variableColOffsets_.back()); │ │ │ │ +85 assertInvariants(); │ │ │ │ +86 } │ │ │ │ 87 │ │ │ │ -_8_9 virtual _~_V_a_l_u_e() {} │ │ │ │ -90 │ │ │ │ -91 private: │ │ │ │ -_1_2_2 friend class boost::serialization::access; │ │ │ │ -123 template │ │ │ │ -124 void serialize(ARCHIVE & /*ar*/, const unsigned int /*version*/) { │ │ │ │ +89 template │ │ │ │ +_9_0 _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x(const CONTAINER& dimensions, const Matrix& matrix, bool │ │ │ │ +appendOneDimension = false) : │ │ │ │ +91 blockStart_(0) │ │ │ │ +92 { │ │ │ │ +93 matrix_.resize(matrix.rows(), matrix.cols()); │ │ │ │ +94 matrix_.triangularView() = matrix.triangularView │ │ │ │ +(); │ │ │ │ +95 fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension); │ │ │ │ +96 if(matrix_.rows() != matrix_.cols()) │ │ │ │ +97 throw std::invalid_argument("Requested to create a SymmetricBlockMatrix from │ │ │ │ +a non-square matrix."); │ │ │ │ +98 if(variableColOffsets_.back() != matrix_.cols()) │ │ │ │ +99 throw std::invalid_argument("Requested to create a SymmetricBlockMatrix with │ │ │ │ +dimensions that do not sum to the total size of the provided matrix."); │ │ │ │ +100 assertInvariants(); │ │ │ │ +101 } │ │ │ │ +102 │ │ │ │ +106 static _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x LikeActiveViewOf(const _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x& │ │ │ │ +other); │ │ │ │ +107 │ │ │ │ +111 static _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x LikeActiveViewOf(const _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x& │ │ │ │ +other); │ │ │ │ +112 │ │ │ │ +_1_1_4 _D_e_n_s_e_I_n_d_e_x _r_o_w_s() const { assertInvariants(); return │ │ │ │ +variableColOffsets_.back() - variableColOffsets_[blockStart_]; } │ │ │ │ +115 │ │ │ │ +_1_1_7 _D_e_n_s_e_I_n_d_e_x _c_o_l_s() const { return rows(); } │ │ │ │ +118 │ │ │ │ +_1_2_0 _D_e_n_s_e_I_n_d_e_x _n_B_l_o_c_k_s() const { return nActualBlocks() - blockStart_; } │ │ │ │ +121 │ │ │ │ +_1_2_3 _D_e_n_s_e_I_n_d_e_x _g_e_t_D_i_m(_D_e_n_s_e_I_n_d_e_x block) const { │ │ │ │ +124 return calcIndices(block, block, 1, 1)[2]; │ │ │ │ 125 } │ │ │ │ 126 │ │ │ │ -127 }; │ │ │ │ -128 │ │ │ │ -129} /* namespace gtsam */ │ │ │ │ -130 │ │ │ │ -131BOOST_SERIALIZATION_ASSUME_ABSTRACT(_g_t_s_a_m_:_:_V_a_l_u_e) │ │ │ │ -_V_e_c_t_o_r_._h │ │ │ │ -typedef and functions to augment Eigen's VectorXd │ │ │ │ +129 │ │ │ │ +132 Matrix block(_D_e_n_s_e_I_n_d_e_x I, _D_e_n_s_e_I_n_d_e_x J) const; │ │ │ │ +133 │ │ │ │ +_1_3_5 Eigen::SelfAdjointView _d_i_a_g_o_n_a_l_B_l_o_c_k(_D_e_n_s_e_I_n_d_e_x J) { │ │ │ │ +136 return block_(J, J).selfadjointView(); │ │ │ │ +137 } │ │ │ │ +138 │ │ │ │ +_1_4_0 Eigen::SelfAdjointView _d_i_a_g_o_n_a_l_B_l_o_c_k(_D_e_n_s_e_I_n_d_e_x │ │ │ │ +J) const { │ │ │ │ +141 return block_(J, J).selfadjointView(); │ │ │ │ +142 } │ │ │ │ +143 │ │ │ │ +_1_4_5 Vector _d_i_a_g_o_n_a_l(_D_e_n_s_e_I_n_d_e_x J) const { │ │ │ │ +146 return block_(J, J).diagonal(); │ │ │ │ +147 } │ │ │ │ +148 │ │ │ │ +_1_5_0 constBlock _a_b_o_v_e_D_i_a_g_o_n_a_l_B_l_o_c_k(_D_e_n_s_e_I_n_d_e_x I, _D_e_n_s_e_I_n_d_e_x J) const { │ │ │ │ +151 assert(I < J); │ │ │ │ +152 return block_(I, J); │ │ │ │ +153 } │ │ │ │ +154 │ │ │ │ +_1_5_6 Eigen::SelfAdjointView _s_e_l_f_a_d_j_o_i_n_t_V_i_e_w( │ │ │ │ +157 _D_e_n_s_e_I_n_d_e_x I, _D_e_n_s_e_I_n_d_e_x J) const { │ │ │ │ +158 assert(J > I); │ │ │ │ +159 return block_(I, I, J - I, J - I).selfadjointView(); │ │ │ │ +160 } │ │ │ │ +161 │ │ │ │ +_1_6_3 Eigen::TriangularView _t_r_i_a_n_g_u_l_a_r_V_i_e_w(_D_e_n_s_e_I_n_d_e_x │ │ │ │ +I, │ │ │ │ +164 _D_e_n_s_e_I_n_d_e_x J) const { │ │ │ │ +165 assert(J > I); │ │ │ │ +166 return block_(I, I, J - I, J - I).triangularView(); │ │ │ │ +167 } │ │ │ │ +168 │ │ │ │ +_1_7_0 constBlock _a_b_o_v_e_D_i_a_g_o_n_a_l_R_a_n_g_e(_D_e_n_s_e_I_n_d_e_x i_startBlock, │ │ │ │ +171 _D_e_n_s_e_I_n_d_e_x i_endBlock, │ │ │ │ +172 _D_e_n_s_e_I_n_d_e_x j_startBlock, │ │ │ │ +173 _D_e_n_s_e_I_n_d_e_x j_endBlock) const { │ │ │ │ +174 assert(i_startBlock < j_startBlock); │ │ │ │ +175 assert(i_endBlock <= j_startBlock); │ │ │ │ +176 return block_(i_startBlock, j_startBlock, i_endBlock - i_startBlock, │ │ │ │ +177 j_endBlock - j_startBlock); │ │ │ │ +178 } │ │ │ │ +179 │ │ │ │ +_1_8_1 Block _a_b_o_v_e_D_i_a_g_o_n_a_l_R_a_n_g_e(_D_e_n_s_e_I_n_d_e_x i_startBlock, _D_e_n_s_e_I_n_d_e_x i_endBlock, │ │ │ │ +182 _D_e_n_s_e_I_n_d_e_x j_startBlock, _D_e_n_s_e_I_n_d_e_x j_endBlock) { │ │ │ │ +183 assert(i_startBlock < j_startBlock); │ │ │ │ +184 assert(i_endBlock <= j_startBlock); │ │ │ │ +185 return block_(i_startBlock, j_startBlock, i_endBlock - i_startBlock, │ │ │ │ +186 j_endBlock - j_startBlock); │ │ │ │ +187 } │ │ │ │ +188 │ │ │ │ +192 │ │ │ │ +194 template │ │ │ │ +_1_9_5 void _s_e_t_D_i_a_g_o_n_a_l_B_l_o_c_k(_D_e_n_s_e_I_n_d_e_x I, const XprType& xpr) { │ │ │ │ +196 block_(I, I).triangularView() = xpr.template │ │ │ │ +triangularView(); │ │ │ │ +197 } │ │ │ │ +198 │ │ │ │ +200 template │ │ │ │ +_2_0_1 void _s_e_t_O_f_f_D_i_a_g_o_n_a_l_B_l_o_c_k(_D_e_n_s_e_I_n_d_e_x I, _D_e_n_s_e_I_n_d_e_x J, const XprType& xpr) { │ │ │ │ +202 assert(I != J); │ │ │ │ +203 if (I < J) { │ │ │ │ +204 block_(I, J) = xpr; │ │ │ │ +205 } else { │ │ │ │ +206 block_(J, I) = xpr.transpose(); │ │ │ │ +207 } │ │ │ │ +208 } │ │ │ │ +209 │ │ │ │ +211 template │ │ │ │ +_2_1_2 void _u_p_d_a_t_e_D_i_a_g_o_n_a_l_B_l_o_c_k(_D_e_n_s_e_I_n_d_e_x I, const XprType& xpr) { │ │ │ │ +213 // TODO(gareth): Eigen won't let us add triangular or self-adjoint views │ │ │ │ +214 // here, so we do it manually. │ │ │ │ +215 auto dest = block_(I, I); │ │ │ │ +216 assert(dest.rows() == xpr.rows()); │ │ │ │ +217 assert(dest.cols() == xpr.cols()); │ │ │ │ +218 for (_D_e_n_s_e_I_n_d_e_x col = 0; col < dest.cols(); ++col) { │ │ │ │ +219 for (_D_e_n_s_e_I_n_d_e_x _r_o_w = 0; _r_o_w <= col; ++_r_o_w) { │ │ │ │ +220 dest(_r_o_w, col) += xpr(_r_o_w, col); │ │ │ │ +221 } │ │ │ │ +222 } │ │ │ │ +223 } │ │ │ │ +224 │ │ │ │ +227 template │ │ │ │ +_2_2_8 void _u_p_d_a_t_e_O_f_f_D_i_a_g_o_n_a_l_B_l_o_c_k(_D_e_n_s_e_I_n_d_e_x I, _D_e_n_s_e_I_n_d_e_x J, const XprType& xpr) │ │ │ │ +{ │ │ │ │ +229 assert(I != J); │ │ │ │ +230 if (I < J) { │ │ │ │ +231 block_(I, J).noalias() += xpr; │ │ │ │ +232 } else { │ │ │ │ +233 block_(J, I).noalias() += xpr.transpose(); │ │ │ │ +234 } │ │ │ │ +235 } │ │ │ │ +236 │ │ │ │ +240 │ │ │ │ +_2_4_2 Eigen::SelfAdjointView _s_e_l_f_a_d_j_o_i_n_t_V_i_e_w() { │ │ │ │ +243 return full().selfadjointView(); │ │ │ │ +244 } │ │ │ │ +245 │ │ │ │ +_2_4_7 Eigen::SelfAdjointView _s_e_l_f_a_d_j_o_i_n_t_V_i_e_w() const { │ │ │ │ +248 return full().selfadjointView(); │ │ │ │ +249 } │ │ │ │ +250 │ │ │ │ +252 template │ │ │ │ +_2_5_3 void _s_e_t_F_u_l_l_M_a_t_r_i_x(const XprType& xpr) { │ │ │ │ +254 full().triangularView() = xpr.template triangularView(); │ │ │ │ +255 } │ │ │ │ +256 │ │ │ │ +_2_5_8 void _s_e_t_Z_e_r_o() { │ │ │ │ +259 full().triangularView().setZero(); │ │ │ │ +260 } │ │ │ │ +261 │ │ │ │ +263 void negate(); │ │ │ │ +264 │ │ │ │ +266 void invertInPlace(); │ │ │ │ +267 │ │ │ │ +269 │ │ │ │ +_2_7_3 _D_e_n_s_e_I_n_d_e_x& _b_l_o_c_k_S_t_a_r_t() { return blockStart_; } │ │ │ │ +274 │ │ │ │ +_2_7_7 _D_e_n_s_e_I_n_d_e_x _b_l_o_c_k_S_t_a_r_t() const { return blockStart_; } │ │ │ │ +278 │ │ │ │ +289 void _c_h_o_l_e_s_k_y_P_a_r_t_i_a_l(_D_e_n_s_e_I_n_d_e_x nFrontals); │ │ │ │ +290 │ │ │ │ +296 _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x _s_p_l_i_t(_D_e_n_s_e_I_n_d_e_x nFrontals); │ │ │ │ +297 │ │ │ │ +298 protected: │ │ │ │ +299 │ │ │ │ +_3_0_1 _D_e_n_s_e_I_n_d_e_x _n_O_f_f_s_e_t_s() const { │ │ │ │ +302 return variableColOffsets_.size(); │ │ │ │ +303 } │ │ │ │ +304 │ │ │ │ +_3_0_6 _D_e_n_s_e_I_n_d_e_x _n_A_c_t_u_a_l_B_l_o_c_k_s() const { │ │ │ │ +307 return nOffsets() - 1; │ │ │ │ +308 } │ │ │ │ +309 │ │ │ │ +_3_1_1 _D_e_n_s_e_I_n_d_e_x _o_f_f_s_e_t(_D_e_n_s_e_I_n_d_e_x block) const { │ │ │ │ +312 assert(block >= 0); │ │ │ │ +313 const _D_e_n_s_e_I_n_d_e_x actual_index = block + blockStart(); │ │ │ │ +314 assert(actual_index < nOffsets()); │ │ │ │ +315 return variableColOffsets_[actual_index]; │ │ │ │ +316 } │ │ │ │ +317 │ │ │ │ +_3_1_9 constBlock _b_l_o_c_k__(_D_e_n_s_e_I_n_d_e_x iBlock, _D_e_n_s_e_I_n_d_e_x jBlock, │ │ │ │ +320 _D_e_n_s_e_I_n_d_e_x blockRows = 1, _D_e_n_s_e_I_n_d_e_x blockCols = 1) const { │ │ │ │ +321 const std::array indices = │ │ │ │ +322 calcIndices(iBlock, jBlock, blockRows, blockCols); │ │ │ │ +323 return matrix_.block(indices[0], indices[1], indices[2], indices[3]); │ │ │ │ +324 } │ │ │ │ +325 │ │ │ │ +_3_2_7 Block _b_l_o_c_k__(_D_e_n_s_e_I_n_d_e_x iBlock, _D_e_n_s_e_I_n_d_e_x jBlock, _D_e_n_s_e_I_n_d_e_x blockRows = │ │ │ │ +1, │ │ │ │ +328 _D_e_n_s_e_I_n_d_e_x blockCols = 1) { │ │ │ │ +329 const std::array indices = │ │ │ │ +330 calcIndices(iBlock, jBlock, blockRows, blockCols); │ │ │ │ +331 return matrix_.block(indices[0], indices[1], indices[2], indices[3]); │ │ │ │ +332 } │ │ │ │ +333 │ │ │ │ +_3_3_5 constBlock _f_u_l_l() const { │ │ │ │ +336 return block_(0, 0, nBlocks(), nBlocks()); │ │ │ │ +337 } │ │ │ │ +338 │ │ │ │ +_3_4_0 Block _f_u_l_l() { │ │ │ │ +341 return block_(0, 0, nBlocks(), nBlocks()); │ │ │ │ +342 } │ │ │ │ +343 │ │ │ │ +_3_4_5 std::array _c_a_l_c_I_n_d_i_c_e_s(_D_e_n_s_e_I_n_d_e_x iBlock, _D_e_n_s_e_I_n_d_e_x jBlock, │ │ │ │ +346 _D_e_n_s_e_I_n_d_e_x blockRows, │ │ │ │ +347 _D_e_n_s_e_I_n_d_e_x blockCols) const { │ │ │ │ +348 assert(blockRows >= 0); │ │ │ │ +349 assert(blockCols >= 0); │ │ │ │ +350 │ │ │ │ +351 // adjust indices to account for start and size of blocks │ │ │ │ +352 const _D_e_n_s_e_I_n_d_e_x denseI = offset(iBlock); │ │ │ │ +353 const _D_e_n_s_e_I_n_d_e_x denseJ = offset(jBlock); │ │ │ │ +354 const _D_e_n_s_e_I_n_d_e_x denseRows = offset(iBlock + blockRows) - denseI; │ │ │ │ +355 const _D_e_n_s_e_I_n_d_e_x denseCols = offset(jBlock + blockCols) - denseJ; │ │ │ │ +356 return {{denseI, denseJ, denseRows, denseCols}}; │ │ │ │ +357 } │ │ │ │ +358 │ │ │ │ +359 void assertInvariants() const │ │ │ │ +360 { │ │ │ │ +361 assert(matrix_.rows() == matrix_.cols()); │ │ │ │ +362 assert(matrix_.cols() == variableColOffsets_.back()); │ │ │ │ +363 assert(blockStart_ < (_D_e_n_s_e_I_n_d_e_x)variableColOffsets_.size()); │ │ │ │ +364 } │ │ │ │ +365 │ │ │ │ +366 template │ │ │ │ +367 void fillOffsets(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool │ │ │ │ +appendOneDimension) │ │ │ │ +368 { │ │ │ │ +369 variableColOffsets_.resize((lastBlockDim-firstBlockDim) + 1 + │ │ │ │ +(appendOneDimension ? 1 : 0)); │ │ │ │ +370 variableColOffsets_[0] = 0; │ │ │ │ +371 DenseIndex j=0; │ │ │ │ +372 for(ITERATOR dim=firstBlockDim; dim!=lastBlockDim; ++dim) { │ │ │ │ +373 variableColOffsets_[j+1] = variableColOffsets_[j] + *dim; │ │ │ │ +374 ++ j; │ │ │ │ +375 } │ │ │ │ +376 if(appendOneDimension) │ │ │ │ +377 { │ │ │ │ +378 variableColOffsets_[j+1] = variableColOffsets_[j] + 1; │ │ │ │ +379 ++ j; │ │ │ │ +380 } │ │ │ │ +381 } │ │ │ │ +382 │ │ │ │ +383 friend class VerticalBlockMatrix; │ │ │ │ +384 template friend class │ │ │ │ +SymmetricBlockMatrixBlockExpr; │ │ │ │ +385 │ │ │ │ +386 private: │ │ │ │ +_3_8_8 friend class boost::serialization::access; │ │ │ │ +389 template │ │ │ │ +390 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ +391 // Fill in the lower triangle part of the matrix, so boost::serialization │ │ │ │ +won't │ │ │ │ +392 // complain about uninitialized data with an input_stream_error exception │ │ │ │ +393 // http://www.boost.org/doc/libs/1_37_0/libs/serialization/doc/ │ │ │ │ +exceptions.html#stream_error │ │ │ │ +394 matrix_.triangularView() = matrix_.triangularView().transpose(); │ │ │ │ +395 ar & BOOST_SERIALIZATION_NVP(matrix_); │ │ │ │ +396 ar & BOOST_SERIALIZATION_NVP(variableColOffsets_); │ │ │ │ +397 ar & BOOST_SERIALIZATION_NVP(blockStart_); │ │ │ │ +398 } │ │ │ │ +399 }; │ │ │ │ +400 │ │ │ │ +402 class CholeskyFailed; │ │ │ │ +403 │ │ │ │ +404} │ │ │ │ +_M_a_t_r_i_x_._h │ │ │ │ +typedef and functions to augment Eigen's MatrixXd │ │ │ │ +_t_y_p_e_s_._h │ │ │ │ +Typedefs for easier changing of types. │ │ │ │ +_F_a_s_t_V_e_c_t_o_r_._h │ │ │ │ +A thin wrapper around std::vector that uses a custom allocator. │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_V_e_c_t_o_r │ │ │ │ +std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > │ │ │ │ +FastVector │ │ │ │ +FastVector is a type alias to a std::vector with a custom memory allocator. │ │ │ │ +DDeeffiinniittiioonn FastVector.h:34 │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e │ │ │ │ -This is the base class for any type to be stored in Values. │ │ │ │ -DDeeffiinniittiioonn Value.h:37 │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e_:_:_d_i_m │ │ │ │ -virtual size_t dim() const =0 │ │ │ │ -Return the dimensionality of the tangent space of this value. │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e_:_:_r_e_t_r_a_c_t__ │ │ │ │ -virtual Value * retract_(const Vector &delta) const =0 │ │ │ │ -Increment the value, by mapping from the vector delta in the tangent space of │ │ │ │ -the current value back ... │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e_:_:_d_e_a_l_l_o_c_a_t_e__ │ │ │ │ -virtual void deallocate_() const =0 │ │ │ │ -Deallocate a raw pointer of this value. │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e_:_:_~_V_a_l_u_e │ │ │ │ -virtual ~Value() │ │ │ │ -Virutal destructor. │ │ │ │ -DDeeffiinniittiioonn Value.h:89 │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e_:_:_e_q_u_a_l_s__ │ │ │ │ -virtual bool equals_(const Value &other, double tol=1e-9) const =0 │ │ │ │ -Compare this Value with another for equality. │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s__ │ │ │ │ -virtual Vector localCoordinates_(const Value &value) const =0 │ │ │ │ -Compute the coordinates in the tangent space of this value that retract() would │ │ │ │ -map to value. │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -virtual Value & operator=(const Value &) │ │ │ │ -Assignment operator. │ │ │ │ -DDeeffiinniittiioonn Value.h:79 │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e_:_:_p_r_i_n_t │ │ │ │ -virtual void print(const std::string &str="") const =0 │ │ │ │ -Print this value, for debugging and unit tests. │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e_:_:_c_l_o_n_e__ │ │ │ │ -virtual Value * clone_() const =0 │ │ │ │ -Clone this value in a special memory pool, must be deleted with Value:: │ │ │ │ -deallocate_,... │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e_:_:_c_l_o_n_e │ │ │ │ -virtual boost::shared_ptr< Value > clone() const =0 │ │ │ │ -Clone this value (normal clone on the heap, delete with 'delete' operator) │ │ │ │ +_g_t_s_a_m_:_:_D_e_n_s_e_I_n_d_e_x │ │ │ │ +ptrdiff_t DenseIndex │ │ │ │ +The index type for Eigen objects. │ │ │ │ +DDeeffiinniittiioonn types.h:106 │ │ │ │ +_g_t_s_a_m_:_:_r_o_w │ │ │ │ +const MATRIX::ConstRowXpr row(const MATRIX &A, size_t j) │ │ │ │ +Extracts a row view from a matrix that avoids a copy. │ │ │ │ +DDeeffiinniittiioonn Matrix.h:222 │ │ │ │ +_g_t_s_a_m_:_:_s_p_l_i_t │ │ │ │ +void split(const G &g, const PredecessorMap< KEY > &tree, G &Ab1, G &Ab2) │ │ │ │ +Split the graph into two parts: one corresponds to the given spanning tree, and │ │ │ │ +the other corresponds... │ │ │ │ +DDeeffiinniittiioonn graph-inl.h:255 │ │ │ │ +_g_t_s_a_m_:_:_c_h_o_l_e_s_k_y_P_a_r_t_i_a_l │ │ │ │ +bool choleskyPartial(Matrix &ABC, size_t nFrontal, size_t topleft) │ │ │ │ +Partial Cholesky computes a factor [R S such that [R' 0 [R S = [A B 0 L] S' I] │ │ │ │ +0 L] B' C]. │ │ │ │ +DDeeffiinniittiioonn cholesky.cpp:108 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ +This class stores a dense matrix and allows it to be accessed as a collection │ │ │ │ +of blocks. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:52 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_f_u_l_l │ │ │ │ +Block full() │ │ │ │ +Get the full matrix as a block. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:340 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_b_l_o_c_k_S_t_a_r_t__ │ │ │ │ +DenseIndex blockStart_ │ │ │ │ +Changes apparent matrix view, see main class comment. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:62 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_s_e_t_D_i_a_g_o_n_a_l_B_l_o_c_k │ │ │ │ +void setDiagonalBlock(DenseIndex I, const XprType &xpr) │ │ │ │ +Set a diagonal block. Only the upper triangular portion of xpr is evaluated. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:195 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_n_A_c_t_u_a_l_B_l_o_c_k_s │ │ │ │ +DenseIndex nActualBlocks() const │ │ │ │ +Number of actual blocks in the full matrix. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:306 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_d_i_a_g_o_n_a_l │ │ │ │ +Vector diagonal(DenseIndex J) const │ │ │ │ +Get the diagonal of the J'th diagonal block. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:145 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_m_a_t_r_i_x__ │ │ │ │ +Matrix matrix_ │ │ │ │ +The full matrix. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:59 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_c_o_l_s │ │ │ │ +DenseIndex cols() const │ │ │ │ +Column size. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:117 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_g_e_t_D_i_m │ │ │ │ +DenseIndex getDim(DenseIndex block) const │ │ │ │ +Number of dimensions for variable on this diagonal block. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:123 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_s_e_t_Z_e_r_o │ │ │ │ +void setZero() │ │ │ │ +Set the entire active matrix zero. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:258 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_s_e_t_O_f_f_D_i_a_g_o_n_a_l_B_l_o_c_k │ │ │ │ +void setOffDiagonalBlock(DenseIndex I, DenseIndex J, const XprType &xpr) │ │ │ │ +Set an off-diagonal block. Only the upper triangular portion of xpr is │ │ │ │ +evaluated. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:201 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_s_e_t_F_u_l_l_M_a_t_r_i_x │ │ │ │ +void setFullMatrix(const XprType &xpr) │ │ │ │ +Set the entire active matrix. Only reads the upper triangular part of xpr. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:253 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_s_e_l_f_a_d_j_o_i_n_t_V_i_e_w │ │ │ │ +Eigen::SelfAdjointView< Block, Eigen::Upper > selfadjointView() │ │ │ │ +Get self adjoint view. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:242 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_a_b_o_v_e_D_i_a_g_o_n_a_l_B_l_o_c_k │ │ │ │ +constBlock aboveDiagonalBlock(DenseIndex I, DenseIndex J) const │ │ │ │ +Get block above the diagonal (I, J). │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:150 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_b_l_o_c_k__ │ │ │ │ +constBlock block_(DenseIndex iBlock, DenseIndex jBlock, DenseIndex blockRows=1, │ │ │ │ +DenseIndex blockCols=1) const │ │ │ │ +Get an arbitrary block from the matrix. Indices are in block units. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:319 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_f_u_l_l │ │ │ │ +constBlock full() const │ │ │ │ +Get the full matrix as a block. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:335 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_r_o_w_s │ │ │ │ +DenseIndex rows() const │ │ │ │ +Row size. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:114 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_a_b_o_v_e_D_i_a_g_o_n_a_l_R_a_n_g_e │ │ │ │ +Block aboveDiagonalRange(DenseIndex i_startBlock, DenseIndex i_endBlock, │ │ │ │ +DenseIndex j_startBlock, DenseIndex j_endBlock) │ │ │ │ +Get a range [i,j) from the matrix. Indices are in block units. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:181 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_t_r_i_a_n_g_u_l_a_r_V_i_e_w │ │ │ │ +Eigen::TriangularView< constBlock, Eigen::Upper > triangularView(DenseIndex I, │ │ │ │ +DenseIndex J) const │ │ │ │ +Return the square sub-matrix that contains blocks(i:j, i:j) as a triangular │ │ │ │ +view. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:163 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_d_i_a_g_o_n_a_l_B_l_o_c_k │ │ │ │ +Eigen::SelfAdjointView< constBlock, Eigen::Upper > diagonalBlock(DenseIndex J) │ │ │ │ +const │ │ │ │ +Return the J'th diagonal block as a self adjoint view. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:140 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ +SymmetricBlockMatrix(const CONTAINER &dimensions, const Matrix &matrix, bool │ │ │ │ +appendOneDimension=false) │ │ │ │ +Construct from a container of the sizes of each vertical block and a pre- │ │ │ │ +prepared matrix. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:90 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_b_l_o_c_k_S_t_a_r_t │ │ │ │ +DenseIndex blockStart() const │ │ │ │ +Retrieve the first logical block, i.e. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:277 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_s_e_l_f_a_d_j_o_i_n_t_V_i_e_w │ │ │ │ +Eigen::SelfAdjointView< constBlock, Eigen::Upper > selfadjointView() const │ │ │ │ +Get self adjoint view. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:247 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_u_p_d_a_t_e_O_f_f_D_i_a_g_o_n_a_l_B_l_o_c_k │ │ │ │ +void updateOffDiagonalBlock(DenseIndex I, DenseIndex J, const XprType &xpr) │ │ │ │ +Update an off diagonal block. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:228 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ +SymmetricBlockMatrix(const CONTAINER &dimensions, bool │ │ │ │ +appendOneDimension=false) │ │ │ │ +Construct from a container of the sizes of each block. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:70 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ +SymmetricBlockMatrix(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool │ │ │ │ +appendOneDimension=false) │ │ │ │ +Construct from iterator over the sizes of each vertical block. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:80 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_b_l_o_c_k_S_t_a_r_t │ │ │ │ +DenseIndex & blockStart() │ │ │ │ +Retrieve or modify the first logical block, i.e. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:273 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_a_b_o_v_e_D_i_a_g_o_n_a_l_R_a_n_g_e │ │ │ │ +constBlock aboveDiagonalRange(DenseIndex i_startBlock, DenseIndex i_endBlock, │ │ │ │ +DenseIndex j_startBlock, DenseIndex j_endBlock) const │ │ │ │ +Get a range [i,j) from the matrix. Indices are in block units. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:170 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_d_i_a_g_o_n_a_l_B_l_o_c_k │ │ │ │ +Eigen::SelfAdjointView< Block, Eigen::Upper > diagonalBlock(DenseIndex J) │ │ │ │ +Return the J'th diagonal block as a self adjoint view. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:135 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_b_l_o_c_k__ │ │ │ │ +Block block_(DenseIndex iBlock, DenseIndex jBlock, DenseIndex blockRows=1, │ │ │ │ +DenseIndex blockCols=1) │ │ │ │ +Get an arbitrary block from the matrix. Indices are in block units. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:327 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_u_p_d_a_t_e_D_i_a_g_o_n_a_l_B_l_o_c_k │ │ │ │ +void updateDiagonalBlock(DenseIndex I, const XprType &xpr) │ │ │ │ +Increment the diagonal block by the values in xpr. Only reads the upper │ │ │ │ +triangular part of xpr. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:212 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_n_O_f_f_s_e_t_s │ │ │ │ +DenseIndex nOffsets() const │ │ │ │ +Number of offsets in the full matrix. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:301 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_c_a_l_c_I_n_d_i_c_e_s │ │ │ │ +std::array< DenseIndex, 4 > calcIndices(DenseIndex iBlock, DenseIndex jBlock, │ │ │ │ +DenseIndex blockRows, DenseIndex blockCols) const │ │ │ │ +Compute the indices into the underlying matrix for a given block. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:345 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_n_B_l_o_c_k_s │ │ │ │ +DenseIndex nBlocks() const │ │ │ │ +Block count. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:120 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_v_a_r_i_a_b_l_e_C_o_l_O_f_f_s_e_t_s__ │ │ │ │ +FastVector< DenseIndex > variableColOffsets_ │ │ │ │ +the starting columns of each block (0-based) │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:60 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_s_e_l_f_a_d_j_o_i_n_t_V_i_e_w │ │ │ │ +Eigen::SelfAdjointView< constBlock, Eigen::Upper > selfadjointView(DenseIndex │ │ │ │ +I, DenseIndex J) const │ │ │ │ +Return the square sub-matrix that contains blocks(i:j, i:j). │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:156 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_o_f_f_s_e_t │ │ │ │ +DenseIndex offset(DenseIndex block) const │ │ │ │ +Get an offset for a block index (in the active view). │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:311 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ +This class stores a dense matrix and allows it to be accessed as a collection │ │ │ │ +of vertical blocks. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:43 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _V_a_l_u_e_._h │ │ │ │ + * _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00083.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/ThreadsafeException.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/VerticalBlockMatrix.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,55 +96,43 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
ThreadsafeException.h File Reference
│ │ │ +
VerticalBlockMatrix.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Base exception type that uses tbb_allocator if GTSAM is compiled with TBB. │ │ │ +

A matrix with column blocks of pre-defined sizes. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │

│ │ │ Classes

class  gtsam::ThreadsafeException< DERIVED >
 Base exception type that uses tbb_allocator if GTSAM is compiled with TBB. More...
 
class  gtsam::RuntimeErrorThreadsafe
 Thread-safe runtime error exception. More...
 
class  gtsam::OutOfRangeThreadsafe
 Thread-safe out of range exception. More...
 
class  gtsam::InvalidArgumentThreadsafe
 Thread-safe invalid argument exception. More...
 
class  gtsam::CholeskyFailed
 Indicate Cholesky factorization failure. More...
class  gtsam::VerticalBlockMatrix
 This class stores a dense matrix and allows it to be accessed as a collection of vertical blocks. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │

Detailed Description

│ │ │ -

Base exception type that uses tbb_allocator if GTSAM is compiled with TBB.

│ │ │ -
Author
Richard Roberts
│ │ │ -
Date
Aug 21, 2010
│ │ │ +

A matrix with column blocks of pre-defined sizes.

│ │ │ +

Used in JacobianFactor and GaussianConditional.

Author
Richard Roberts
│ │ │ +
Date
Sep 18, 2010
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,42 +1,29 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -ThreadsafeException.h File Reference │ │ │ │ -_B_a_s_e │ │ │ │ -Base exception type that uses tbb_allocator if GTSAM is compiled with TBB. │ │ │ │ -_M_o_r_e_._._. │ │ │ │ +VerticalBlockMatrix.h File Reference │ │ │ │ +A matrix with column blocks of pre-defined sizes. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_<_ _D_E_R_I_V_E_D_ _> │ │ │ │ -  Base exception type that uses tbb_allocator if GTSAM is compiled with │ │ │ │ - TBB. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_R_u_n_t_i_m_e_E_r_r_o_r_T_h_r_e_a_d_s_a_f_e │ │ │ │ -  Thread-safe runtime error exception. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_O_u_t_O_f_R_a_n_g_e_T_h_r_e_a_d_s_a_f_e │ │ │ │ -  Thread-safe out of range exception. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_I_n_v_a_l_i_d_A_r_g_u_m_e_n_t_T_h_r_e_a_d_s_a_f_e │ │ │ │ -  Thread-safe invalid argument exception. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_C_h_o_l_e_s_k_y_F_a_i_l_e_d │ │ │ │ -  Indicate Cholesky factorization failure. _M_o_r_e_._._. │ │ │ │ +class   _g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ +  This class stores a dense matrix and allows it to be accessed as a │ │ │ │ + collection of vertical blocks. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Base exception type that uses tbb_allocator if GTSAM is compiled with TBB. │ │ │ │ +A matrix with column blocks of pre-defined sizes. │ │ │ │ +Used in _J_a_c_o_b_i_a_n_F_a_c_t_o_r and _G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l. │ │ │ │ Author │ │ │ │ Richard Roberts │ │ │ │ Date │ │ │ │ - Aug 21, 2010 │ │ │ │ + Sep 18, 2010 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_._h │ │ │ │ + * _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00083_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/ThreadsafeException.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/VerticalBlockMatrix.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,160 +98,252 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
ThreadsafeException.h
│ │ │ +
VerticalBlockMatrix.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
20#pragma once
│ │ │ -
21
│ │ │ -
22#include <gtsam/config.h> // for GTSAM_USE_TBB
│ │ │ +
18#pragma once
│ │ │ +
19
│ │ │ +
20#include <gtsam/base/Matrix.h>
│ │ │ + │ │ │ + │ │ │
23
│ │ │ -
24#include <boost/optional/optional.hpp>
│ │ │ -
25#include <gtsam/dllexport.h>
│ │ │ -
26#include <string>
│ │ │ -
27#include <typeinfo>
│ │ │ -
28#include <exception>
│ │ │ -
29
│ │ │ -
30#ifdef GTSAM_USE_TBB
│ │ │ -
31#include <tbb/tbb_allocator.h>
│ │ │ -
32#include <tbb/scalable_allocator.h>
│ │ │ -
33#include <iostream>
│ │ │ -
34#endif
│ │ │ -
35
│ │ │ -
36namespace gtsam {
│ │ │ -
37
│ │ │ -
39template<class DERIVED>
│ │ │ -
│ │ │ - │ │ │ -
41public std::exception
│ │ │ -
42{
│ │ │ -
43private:
│ │ │ -
44 typedef std::exception Base;
│ │ │ -
45#ifdef GTSAM_USE_TBB
│ │ │ -
46protected:
│ │ │ -
47 typedef std::basic_string<char, std::char_traits<char>,
│ │ │ -
48 tbb::tbb_allocator<char> > String;
│ │ │ -
49#else
│ │ │ -
50protected:
│ │ │ -
51 typedef std::string String;
│ │ │ -
52#endif
│ │ │ -
53
│ │ │ -
54protected:
│ │ │ -
55 bool dynamic_;
│ │ │ -
56 mutable boost::optional<String> description_;
│ │ │ -
57
│ │ │ -
│ │ │ - │ │ │ -
60 dynamic_(false) {
│ │ │ -
61 }
│ │ │ -
│ │ │ -
62
│ │ │ -
│ │ │ - │ │ │ -
65 Base(other), dynamic_(false) {
│ │ │ -
66 }
│ │ │ +
24namespace gtsam {
│ │ │ +
25
│ │ │ +
26 // Forward declarations
│ │ │ +
27 class SymmetricBlockMatrix;
│ │ │ +
28
│ │ │ +
│ │ │ +
42 class GTSAM_EXPORT VerticalBlockMatrix
│ │ │ +
43 {
│ │ │ +
44 public:
│ │ │ + │ │ │ +
46 typedef Eigen::Block<Matrix> Block;
│ │ │ +
47 typedef Eigen::Block<const Matrix> constBlock;
│ │ │ +
48
│ │ │ +
49 protected:
│ │ │ +
50 Matrix matrix_;
│ │ │ + │ │ │ +
52
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
56
│ │ │ +
57 public:
│ │ │ +
58
│ │ │ +
│ │ │ + │ │ │ +
61 rowStart_(0), rowEnd_(0), blockStart_(0)
│ │ │ +
62 {
│ │ │ +
63 variableColOffsets_.push_back(0);
│ │ │ +
64 assertInvariants();
│ │ │ +
65 }
│ │ │
│ │ │ -
67
│ │ │ +
66
│ │ │ +
68 template<typename CONTAINER>
│ │ │
│ │ │ -
69 ThreadsafeException(const std::string& description) :
│ │ │ -
70 dynamic_(false), description_(
│ │ │ -
71 String(description.begin(), description.end())) {
│ │ │ -
72 }
│ │ │ -
│ │ │ -
73
│ │ │ -
│ │ │ -
75 ~ThreadsafeException() noexcept override {
│ │ │ -
76 }
│ │ │ +
69 VerticalBlockMatrix(const CONTAINER& dimensions, DenseIndex height,
│ │ │ +
70 bool appendOneDimension = false) :
│ │ │ +
71 variableColOffsets_(dimensions.size() + (appendOneDimension ? 2 : 1)),
│ │ │ +
72 rowStart_(0), rowEnd_(height), blockStart_(0) {
│ │ │ +
73 fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension);
│ │ │ +
74 matrix_.resize(height, variableColOffsets_.back());
│ │ │ +
75 assertInvariants();
│ │ │ +
76 }
│ │ │
│ │ │
77
│ │ │ -
78public:
│ │ │ -
79 const char* what() const noexcept override {
│ │ │ -
80 return description_ ? description_->c_str() : "";
│ │ │ -
81 }
│ │ │ -
82};
│ │ │ -
│ │ │ -
83
│ │ │ -
│ │ │ -
85class GTSAM_EXPORT RuntimeErrorThreadsafe: public ThreadsafeException<RuntimeErrorThreadsafe> {
│ │ │ -
86public:
│ │ │ -
│ │ │ -
88 RuntimeErrorThreadsafe(const std::string& description) :
│ │ │ - │ │ │ -
90 }
│ │ │ -
│ │ │ -
91};
│ │ │ -
│ │ │ -
92
│ │ │ -
│ │ │ -
94class OutOfRangeThreadsafe: public ThreadsafeException<OutOfRangeThreadsafe> {
│ │ │ -
95public:
│ │ │ -
│ │ │ -
97 OutOfRangeThreadsafe(const std::string& description) :
│ │ │ - │ │ │ -
99 }
│ │ │ -
│ │ │ -
100};
│ │ │ +
79 template<typename CONTAINER, typename DERIVED>
│ │ │ +
│ │ │ +
80 VerticalBlockMatrix(const CONTAINER& dimensions,
│ │ │ +
81 const Eigen::MatrixBase<DERIVED>& matrix, bool appendOneDimension = false) :
│ │ │ +
82 matrix_(matrix), variableColOffsets_(dimensions.size() + (appendOneDimension ? 2 : 1)),
│ │ │ +
83 rowStart_(0), rowEnd_(matrix.rows()), blockStart_(0) {
│ │ │ +
84 fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension);
│ │ │ +
85 if (variableColOffsets_.back() != matrix_.cols())
│ │ │ +
86 throw std::invalid_argument(
│ │ │ +
87 "Requested to create a VerticalBlockMatrix with dimensions that do not sum to the total columns of the provided matrix.");
│ │ │ +
88 assertInvariants();
│ │ │ +
89 }
│ │ │ +
│ │ │ +
90
│ │ │ +
92 template<typename ITERATOR>
│ │ │ +
│ │ │ +
93 VerticalBlockMatrix(ITERATOR firstBlockDim, ITERATOR lastBlockDim,
│ │ │ +
94 DenseIndex height, bool appendOneDimension = false) :
│ │ │ +
95 variableColOffsets_((lastBlockDim-firstBlockDim) + (appendOneDimension ? 2 : 1)),
│ │ │ +
96 rowStart_(0), rowEnd_(height), blockStart_(0) {
│ │ │ +
97 fillOffsets(firstBlockDim, lastBlockDim, appendOneDimension);
│ │ │ +
98 matrix_.resize(height, variableColOffsets_.back());
│ │ │ +
99 assertInvariants();
│ │ │ +
100 }
│ │ │
│ │ │
101
│ │ │ -
│ │ │ - │ │ │ -
104 InvalidArgumentThreadsafe> {
│ │ │ -
105public:
│ │ │ -
│ │ │ -
107 InvalidArgumentThreadsafe(const std::string& description) :
│ │ │ - │ │ │ -
109 }
│ │ │ -
│ │ │ -
110};
│ │ │ -
│ │ │ -
111
│ │ │ -
│ │ │ -
113class CholeskyFailed : public gtsam::ThreadsafeException<CholeskyFailed>
│ │ │ -
114{
│ │ │ -
115public:
│ │ │ -
116 CholeskyFailed() noexcept {}
│ │ │ -
117 ~CholeskyFailed() noexcept override {}
│ │ │ -
118};
│ │ │ -
│ │ │ +
107 static VerticalBlockMatrix LikeActiveViewOf(const VerticalBlockMatrix& rhs);
│ │ │ +
108
│ │ │ +
112 static VerticalBlockMatrix LikeActiveViewOf(const SymmetricBlockMatrix& rhs, DenseIndex height);
│ │ │ +
113
│ │ │ +
115 DenseIndex rows() const { assertInvariants(); return rowEnd_ - rowStart_; }
│ │ │ +
116
│ │ │ +
118 DenseIndex cols() const { assertInvariants(); return variableColOffsets_.back() - variableColOffsets_[blockStart_]; }
│ │ │
119
│ │ │ -
120} // namespace gtsam
│ │ │ +
121 DenseIndex nBlocks() const { assertInvariants(); return variableColOffsets_.size() - 1 - blockStart_; }
│ │ │ +
122
│ │ │ +
124 Block operator()(DenseIndex block) { return range(block, block+1); }
│ │ │ +
125
│ │ │ +
127 const constBlock operator()(DenseIndex block) const { return range(block, block+1); }
│ │ │ +
128
│ │ │ +
│ │ │ +
130 Block range(DenseIndex startBlock, DenseIndex endBlock) {
│ │ │ +
131 assertInvariants();
│ │ │ +
132 DenseIndex actualStartBlock = startBlock + blockStart_;
│ │ │ +
133 DenseIndex actualEndBlock = endBlock + blockStart_;
│ │ │ +
134 if(startBlock != 0 || endBlock != 0) {
│ │ │ +
135 checkBlock(actualStartBlock);
│ │ │ +
136 assert(actualEndBlock < (DenseIndex)variableColOffsets_.size());
│ │ │ +
137 }
│ │ │ +
138 const DenseIndex startCol = variableColOffsets_[actualStartBlock];
│ │ │ +
139 const DenseIndex rangeCols = variableColOffsets_[actualEndBlock] - startCol;
│ │ │ +
140 return matrix_.block(rowStart_, startCol, this->rows(), rangeCols);
│ │ │ +
141 }
│ │ │ +
│ │ │ +
142
│ │ │ +
143 const constBlock range(DenseIndex startBlock, DenseIndex endBlock) const {
│ │ │ +
144 assertInvariants();
│ │ │ +
145 DenseIndex actualStartBlock = startBlock + blockStart_;
│ │ │ +
146 DenseIndex actualEndBlock = endBlock + blockStart_;
│ │ │ +
147 if(startBlock != 0 || endBlock != 0) {
│ │ │ +
148 checkBlock(actualStartBlock);
│ │ │ +
149 assert(actualEndBlock < (DenseIndex)variableColOffsets_.size());
│ │ │ +
150 }
│ │ │ +
151 const DenseIndex startCol = variableColOffsets_[actualStartBlock];
│ │ │ +
152 const DenseIndex rangeCols = variableColOffsets_[actualEndBlock] - startCol;
│ │ │ +
153 return ((const Matrix&)matrix_).block(rowStart_, startCol, this->rows(), rangeCols);
│ │ │ +
154 }
│ │ │ +
155
│ │ │ +
157 Block full() { return range(0, nBlocks()); }
│ │ │ +
158
│ │ │ +
160 const constBlock full() const { return range(0, nBlocks()); }
│ │ │ +
161
│ │ │ +
162 DenseIndex offset(DenseIndex block) const {
│ │ │ +
163 assertInvariants();
│ │ │ +
164 DenseIndex actualBlock = block + blockStart_;
│ │ │ +
165 checkBlock(actualBlock);
│ │ │ +
166 return variableColOffsets_[actualBlock];
│ │ │ +
167 }
│ │ │ +
168
│ │ │ +
170 const DenseIndex& rowStart() const { return rowStart_; }
│ │ │ +
171
│ │ │ +
173 DenseIndex& rowStart() { return rowStart_; }
│ │ │ +
174
│ │ │ +
176 const DenseIndex& rowEnd() const { return rowEnd_; }
│ │ │ +
177
│ │ │ +
179 DenseIndex& rowEnd() { return rowEnd_; }
│ │ │ +
180
│ │ │ +
182 const DenseIndex& firstBlock() const { return blockStart_; }
│ │ │ +
183
│ │ │ +
185 DenseIndex& firstBlock() { return blockStart_; }
│ │ │ +
186
│ │ │ +
188 const Matrix& matrix() const { return matrix_; }
│ │ │ +
189
│ │ │ +
191 Matrix& matrix() { return matrix_; }
│ │ │ +
192
│ │ │ +
193 protected:
│ │ │ +
194 void assertInvariants() const {
│ │ │ +
195 assert(matrix_.cols() == variableColOffsets_.back());
│ │ │ +
196 assert(blockStart_ < (DenseIndex)variableColOffsets_.size());
│ │ │ +
197 assert(rowStart_ <= matrix_.rows());
│ │ │ +
198 assert(rowEnd_ <= matrix_.rows());
│ │ │ +
199 assert(rowStart_ <= rowEnd_);
│ │ │ +
200 }
│ │ │ +
201
│ │ │ +
202 void checkBlock(DenseIndex block) const {
│ │ │ +
203 static_cast<void>(block); //Disable unused varibale warnings.
│ │ │ +
204 assert(matrix_.cols() == variableColOffsets_.back());
│ │ │ +
205 assert(block < (DenseIndex)variableColOffsets_.size() - 1);
│ │ │ +
206 assert(variableColOffsets_[block] < matrix_.cols() && variableColOffsets_[block+1] <= matrix_.cols());
│ │ │ +
207 }
│ │ │ +
208
│ │ │ +
209 template<typename ITERATOR>
│ │ │ +
210 void fillOffsets(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool appendOneDimension) {
│ │ │ +
211 variableColOffsets_[0] = 0;
│ │ │ +
212 DenseIndex j=0;
│ │ │ +
213 for(ITERATOR dim=firstBlockDim; dim!=lastBlockDim; ++dim, ++j)
│ │ │ +
214 variableColOffsets_[j+1] = variableColOffsets_[j] + *dim;
│ │ │ +
215 if(appendOneDimension)
│ │ │ +
216 variableColOffsets_[j+1] = variableColOffsets_[j] + 1;
│ │ │ +
217 }
│ │ │ +
218
│ │ │ +
219 friend class SymmetricBlockMatrix;
│ │ │ +
220
│ │ │ +
221 private:
│ │ │ +
223 friend class boost::serialization::access;
│ │ │ +
224 template<class ARCHIVE>
│ │ │ +
225 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
│ │ │ +
226 ar & BOOST_SERIALIZATION_NVP(matrix_);
│ │ │ +
227 ar & BOOST_SERIALIZATION_NVP(variableColOffsets_);
│ │ │ +
228 ar & BOOST_SERIALIZATION_NVP(rowStart_);
│ │ │ +
229 ar & BOOST_SERIALIZATION_NVP(rowEnd_);
│ │ │ +
230 ar & BOOST_SERIALIZATION_NVP(blockStart_);
│ │ │ +
231 }
│ │ │ +
232 };
│ │ │ +
│ │ │ +
233
│ │ │ +
234}
│ │ │ +
Serialization for matrices.
│ │ │ +
typedef and functions to augment Eigen's MatrixXd
│ │ │ +
A thin wrapper around std::vector that uses a custom allocator.
│ │ │ +
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
FastVector is a type alias to a std::vector with a custom memory allocator.
Definition FastVector.h:34
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
Base exception type that uses tbb_allocator if GTSAM is compiled with TBB.
Definition ThreadsafeException.h:42
│ │ │ -
~ThreadsafeException() noexcept override
Default destructor doesn't have the noexcept.
Definition ThreadsafeException.h:75
│ │ │ -
bool dynamic_
Whether this object was moved.
Definition ThreadsafeException.h:55
│ │ │ -
ThreadsafeException()
Default constructor is protected - may only be created from derived classes.
Definition ThreadsafeException.h:59
│ │ │ -
ThreadsafeException(const ThreadsafeException &other)
Copy constructor is protected - may only be created from derived classes.
Definition ThreadsafeException.h:64
│ │ │ -
ThreadsafeException(const std::string &description)
Construct with description string.
Definition ThreadsafeException.h:69
│ │ │ -
boost::optional< String > description_
Optional description.
Definition ThreadsafeException.h:56
│ │ │ -
Thread-safe runtime error exception.
Definition ThreadsafeException.h:85
│ │ │ -
RuntimeErrorThreadsafe(const std::string &description)
Construct with a string describing the exception.
Definition ThreadsafeException.h:88
│ │ │ -
Thread-safe out of range exception.
Definition ThreadsafeException.h:94
│ │ │ -
OutOfRangeThreadsafe(const std::string &description)
Construct with a string describing the exception.
Definition ThreadsafeException.h:97
│ │ │ -
Thread-safe invalid argument exception.
Definition ThreadsafeException.h:104
│ │ │ -
InvalidArgumentThreadsafe(const std::string &description)
Construct with a string describing the exception.
Definition ThreadsafeException.h:107
│ │ │ -
Indicate Cholesky factorization failure.
Definition ThreadsafeException.h:114
│ │ │ +
ptrdiff_t DenseIndex
The index type for Eigen objects.
Definition types.h:106
│ │ │ +
This class stores a dense matrix and allows it to be accessed as a collection of blocks.
Definition SymmetricBlockMatrix.h:52
│ │ │ +
This class stores a dense matrix and allows it to be accessed as a collection of vertical blocks.
Definition VerticalBlockMatrix.h:43
│ │ │ +
VerticalBlockMatrix()
Construct an empty VerticalBlockMatrix.
Definition VerticalBlockMatrix.h:60
│ │ │ +
Block full()
Return the full matrix, not including any portions excluded by rowStart(), rowEnd(),...
Definition VerticalBlockMatrix.h:157
│ │ │ +
Block range(DenseIndex startBlock, DenseIndex endBlock)
access ranges of blocks at a time
Definition VerticalBlockMatrix.h:130
│ │ │ +
const DenseIndex & firstBlock() const
Get the apparent first block for all operations.
Definition VerticalBlockMatrix.h:182
│ │ │ +
const Matrix & matrix() const
Access to full matrix (including any portions excluded by rowStart(), rowEnd(), and firstBlock())
Definition VerticalBlockMatrix.h:188
│ │ │ +
VerticalBlockMatrix(const CONTAINER &dimensions, DenseIndex height, bool appendOneDimension=false)
Construct from a container of the sizes of each vertical block.
Definition VerticalBlockMatrix.h:69
│ │ │ +
DenseIndex rowEnd_
Changes apparent matrix view, see main class comment.
Definition VerticalBlockMatrix.h:54
│ │ │ +
const DenseIndex & rowEnd() const
Get the apparent last row (exclusive, i.e.
Definition VerticalBlockMatrix.h:176
│ │ │ +
DenseIndex rows() const
Row size.
Definition VerticalBlockMatrix.h:115
│ │ │ +
Block operator()(DenseIndex block)
Access a single block in the underlying matrix with read/write access.
Definition VerticalBlockMatrix.h:124
│ │ │ +
DenseIndex & firstBlock()
Get or set the apparent first block for all operations.
Definition VerticalBlockMatrix.h:185
│ │ │ +
DenseIndex cols() const
Column size.
Definition VerticalBlockMatrix.h:118
│ │ │ +
VerticalBlockMatrix(ITERATOR firstBlockDim, ITERATOR lastBlockDim, DenseIndex height, bool appendOneDimension=false)
Construct from iterator over the sizes of each vertical block.
Definition VerticalBlockMatrix.h:93
│ │ │ +
const constBlock operator()(DenseIndex block) const
Access a const block view.
Definition VerticalBlockMatrix.h:127
│ │ │ +
const DenseIndex & rowStart() const
Get the apparent first row of the underlying matrix for all operations.
Definition VerticalBlockMatrix.h:170
│ │ │ +
Matrix matrix_
The full matrix.
Definition VerticalBlockMatrix.h:50
│ │ │ +
DenseIndex nBlocks() const
Block count.
Definition VerticalBlockMatrix.h:121
│ │ │ +
const constBlock full() const
Return the full matrix, not including any portions excluded by rowStart(), rowEnd(),...
Definition VerticalBlockMatrix.h:160
│ │ │ +
DenseIndex & rowStart()
Get or set the apparent first row of the underlying matrix for all operations.
Definition VerticalBlockMatrix.h:173
│ │ │ +
Matrix & matrix()
Non-const access to full matrix (including any portions excluded by rowStart(), rowEnd(),...
Definition VerticalBlockMatrix.h:191
│ │ │ +
DenseIndex & rowEnd()
Get or set the apparent last row (exclusive, i.e.
Definition VerticalBlockMatrix.h:179
│ │ │ +
DenseIndex rowStart_
Changes apparent matrix view, see main class comment.
Definition VerticalBlockMatrix.h:53
│ │ │ +
VerticalBlockMatrix(const CONTAINER &dimensions, const Eigen::MatrixBase< DERIVED > &matrix, bool appendOneDimension=false)
Construct from a container of the sizes of each vertical block and a pre-prepared matrix.
Definition VerticalBlockMatrix.h:80
│ │ │ +
DenseIndex blockStart_
Changes apparent matrix view, see main class comment.
Definition VerticalBlockMatrix.h:55
│ │ │ +
FastVector< DenseIndex > variableColOffsets_
the starting columns of each block (0-based)
Definition VerticalBlockMatrix.h:51
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,169 +1,346 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -ThreadsafeException.h │ │ │ │ +VerticalBlockMatrix.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -20#pragma once │ │ │ │ -21 │ │ │ │ -22#include // for GTSAM_USE_TBB │ │ │ │ +18#pragma once │ │ │ │ +19 │ │ │ │ +20#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_._h> │ │ │ │ +21#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_S_e_r_i_a_l_i_z_a_t_i_o_n_._h> │ │ │ │ +22#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_V_e_c_t_o_r_._h> │ │ │ │ 23 │ │ │ │ -24#include │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27#include │ │ │ │ -28#include │ │ │ │ -29 │ │ │ │ -30#ifdef GTSAM_USE_TBB │ │ │ │ -31#include │ │ │ │ -32#include │ │ │ │ -33#include │ │ │ │ -34#endif │ │ │ │ -35 │ │ │ │ -36namespace _g_t_s_a_m { │ │ │ │ -37 │ │ │ │ -39template │ │ │ │ -_4_0class _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n: │ │ │ │ -41public std::exception │ │ │ │ -42{ │ │ │ │ -43private: │ │ │ │ -44 typedef std::exception Base; │ │ │ │ -45#ifdef GTSAM_USE_TBB │ │ │ │ -46protected: │ │ │ │ -47 typedef std::basic_string, │ │ │ │ -48 tbb::tbb_allocator > String; │ │ │ │ -49#else │ │ │ │ -50protected: │ │ │ │ -51 typedef std::string String; │ │ │ │ -52#endif │ │ │ │ -53 │ │ │ │ -54protected: │ │ │ │ -_5_5 bool _d_y_n_a_m_i_c__; │ │ │ │ -_5_6 mutable boost::optional _d_e_s_c_r_i_p_t_i_o_n__; │ │ │ │ -57 │ │ │ │ -_5_9 _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n() : │ │ │ │ -60 _d_y_n_a_m_i_c__(false) { │ │ │ │ -61 } │ │ │ │ -62 │ │ │ │ -_6_4 _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n(const _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n& other) : │ │ │ │ -65 Base(other), _d_y_n_a_m_i_c__(false) { │ │ │ │ -66 } │ │ │ │ -67 │ │ │ │ -_6_9 _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n(const std::string& description) : │ │ │ │ -70 _d_y_n_a_m_i_c__(false), _d_e_s_c_r_i_p_t_i_o_n__( │ │ │ │ -71 String(description.begin(), description.end())) { │ │ │ │ -72 } │ │ │ │ -73 │ │ │ │ -_7_5 _~_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n() noexcept override { │ │ │ │ +24namespace _g_t_s_a_m { │ │ │ │ +25 │ │ │ │ +26 // Forward declarations │ │ │ │ +27 class SymmetricBlockMatrix; │ │ │ │ +28 │ │ │ │ +_4_2 class GTSAM_EXPORT _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ +43 { │ │ │ │ +44 public: │ │ │ │ +45 typedef _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x _T_h_i_s; │ │ │ │ +46 typedef Eigen::Block Block; │ │ │ │ +47 typedef Eigen::Block constBlock; │ │ │ │ +48 │ │ │ │ +49 protected: │ │ │ │ +_5_0 Matrix _m_a_t_r_i_x__; │ │ │ │ +_5_1 _F_a_s_t_V_e_c_t_o_r_<_D_e_n_s_e_I_n_d_e_x_> _v_a_r_i_a_b_l_e_C_o_l_O_f_f_s_e_t_s__; │ │ │ │ +52 │ │ │ │ +_5_3 _D_e_n_s_e_I_n_d_e_x _r_o_w_S_t_a_r_t__; │ │ │ │ +_5_4 _D_e_n_s_e_I_n_d_e_x _r_o_w_E_n_d__; │ │ │ │ +_5_5 _D_e_n_s_e_I_n_d_e_x _b_l_o_c_k_S_t_a_r_t__; │ │ │ │ +56 │ │ │ │ +57 public: │ │ │ │ +58 │ │ │ │ +_6_0 _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x() : │ │ │ │ +61 rowStart_(0), rowEnd_(0), blockStart_(0) │ │ │ │ +62 { │ │ │ │ +63 variableColOffsets_.push_back(0); │ │ │ │ +64 assertInvariants(); │ │ │ │ +65 } │ │ │ │ +66 │ │ │ │ +68 template │ │ │ │ +_6_9 _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x(const CONTAINER& dimensions, _D_e_n_s_e_I_n_d_e_x height, │ │ │ │ +70 bool appendOneDimension = false) : │ │ │ │ +71 variableColOffsets_(dimensions.size() + (appendOneDimension ? 2 : 1)), │ │ │ │ +72 rowStart_(0), rowEnd_(height), blockStart_(0) { │ │ │ │ +73 fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension); │ │ │ │ +74 matrix_.resize(height, variableColOffsets_.back()); │ │ │ │ +75 assertInvariants(); │ │ │ │ 76 } │ │ │ │ 77 │ │ │ │ -78public: │ │ │ │ -79 const char* what() const noexcept override { │ │ │ │ -80 return _d_e_s_c_r_i_p_t_i_o_n__ ? _d_e_s_c_r_i_p_t_i_o_n__->c_str() : ""; │ │ │ │ -81 } │ │ │ │ -82}; │ │ │ │ -83 │ │ │ │ -_8_5class GTSAM_EXPORT _R_u_n_t_i_m_e_E_r_r_o_r_T_h_r_e_a_d_s_a_f_e: public │ │ │ │ -_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n { │ │ │ │ -86public: │ │ │ │ -_8_8 _R_u_n_t_i_m_e_E_r_r_o_r_T_h_r_e_a_d_s_a_f_e(const std::string& description) : │ │ │ │ -89 _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n<_R_u_n_t_i_m_e_E_r_r_o_r_T_h_r_e_a_d_s_a_f_e>(description) { │ │ │ │ -90 } │ │ │ │ -91}; │ │ │ │ -92 │ │ │ │ -_9_4class _O_u_t_O_f_R_a_n_g_e_T_h_r_e_a_d_s_a_f_e: public _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n │ │ │ │ -{ │ │ │ │ -95public: │ │ │ │ -_9_7 _O_u_t_O_f_R_a_n_g_e_T_h_r_e_a_d_s_a_f_e(const std::string& description) : │ │ │ │ -98 _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n<_O_u_t_O_f_R_a_n_g_e_T_h_r_e_a_d_s_a_f_e>(description) { │ │ │ │ -99 } │ │ │ │ -100}; │ │ │ │ +79 template │ │ │ │ +_8_0 _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x(const CONTAINER& dimensions, │ │ │ │ +81 const Eigen::MatrixBase& matrix, bool appendOneDimension = false) : │ │ │ │ +82 matrix_(matrix), variableColOffsets_(dimensions.size() + (appendOneDimension │ │ │ │ +? 2 : 1)), │ │ │ │ +83 rowStart_(0), rowEnd_(matrix.rows()), blockStart_(0) { │ │ │ │ +84 fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension); │ │ │ │ +85 if (variableColOffsets_.back() != matrix_.cols()) │ │ │ │ +86 throw std::invalid_argument( │ │ │ │ +87 "Requested to create a VerticalBlockMatrix with dimensions that do not sum │ │ │ │ +to the total columns of the provided matrix."); │ │ │ │ +88 assertInvariants(); │ │ │ │ +89 } │ │ │ │ +90 │ │ │ │ +92 template │ │ │ │ +_9_3 _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x(ITERATOR firstBlockDim, ITERATOR lastBlockDim, │ │ │ │ +94 _D_e_n_s_e_I_n_d_e_x height, bool appendOneDimension = false) : │ │ │ │ +95 variableColOffsets_((lastBlockDim-firstBlockDim) + (appendOneDimension ? 2 : │ │ │ │ +1)), │ │ │ │ +96 rowStart_(0), rowEnd_(height), blockStart_(0) { │ │ │ │ +97 fillOffsets(firstBlockDim, lastBlockDim, appendOneDimension); │ │ │ │ +98 matrix_.resize(height, variableColOffsets_.back()); │ │ │ │ +99 assertInvariants(); │ │ │ │ +100 } │ │ │ │ 101 │ │ │ │ -_1_0_3class _I_n_v_a_l_i_d_A_r_g_u_m_e_n_t_T_h_r_e_a_d_s_a_f_e: public _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n< │ │ │ │ -104 InvalidArgumentThreadsafe> { │ │ │ │ -105public: │ │ │ │ -_1_0_7 _I_n_v_a_l_i_d_A_r_g_u_m_e_n_t_T_h_r_e_a_d_s_a_f_e(const std::string& description) : │ │ │ │ -108 _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n<_I_n_v_a_l_i_d_A_r_g_u_m_e_n_t_T_h_r_e_a_d_s_a_f_e>(description) { │ │ │ │ -109 } │ │ │ │ -110}; │ │ │ │ -111 │ │ │ │ -_1_1_3class _C_h_o_l_e_s_k_y_F_a_i_l_e_d : public _g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n │ │ │ │ -114{ │ │ │ │ -115public: │ │ │ │ -116 _C_h_o_l_e_s_k_y_F_a_i_l_e_d() noexcept {} │ │ │ │ -117 _~_C_h_o_l_e_s_k_y_F_a_i_l_e_d() noexcept override {} │ │ │ │ -118}; │ │ │ │ +107 static _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x LikeActiveViewOf(const _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x& │ │ │ │ +rhs); │ │ │ │ +108 │ │ │ │ +112 static _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x LikeActiveViewOf(const _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x& │ │ │ │ +rhs, _D_e_n_s_e_I_n_d_e_x height); │ │ │ │ +113 │ │ │ │ +_1_1_5 _D_e_n_s_e_I_n_d_e_x _r_o_w_s() const { assertInvariants(); return rowEnd_ - rowStart_; } │ │ │ │ +116 │ │ │ │ +_1_1_8 _D_e_n_s_e_I_n_d_e_x _c_o_l_s() const { assertInvariants(); return │ │ │ │ +variableColOffsets_.back() - variableColOffsets_[blockStart_]; } │ │ │ │ 119 │ │ │ │ -120} // namespace gtsam │ │ │ │ +_1_2_1 _D_e_n_s_e_I_n_d_e_x _n_B_l_o_c_k_s() const { assertInvariants(); return │ │ │ │ +variableColOffsets_.size() - 1 - blockStart_; } │ │ │ │ +122 │ │ │ │ +_1_2_4 Block _o_p_e_r_a_t_o_r_(_)(_D_e_n_s_e_I_n_d_e_x block) { return range(block, block+1); } │ │ │ │ +125 │ │ │ │ +_1_2_7 const constBlock _o_p_e_r_a_t_o_r_(_)(_D_e_n_s_e_I_n_d_e_x block) const { return range(block, │ │ │ │ +block+1); } │ │ │ │ +128 │ │ │ │ +_1_3_0 Block _r_a_n_g_e(_D_e_n_s_e_I_n_d_e_x startBlock, _D_e_n_s_e_I_n_d_e_x endBlock) { │ │ │ │ +131 assertInvariants(); │ │ │ │ +132 _D_e_n_s_e_I_n_d_e_x actualStartBlock = startBlock + blockStart_; │ │ │ │ +133 _D_e_n_s_e_I_n_d_e_x actualEndBlock = endBlock + blockStart_; │ │ │ │ +134 if(startBlock != 0 || endBlock != 0) { │ │ │ │ +135 checkBlock(actualStartBlock); │ │ │ │ +136 assert(actualEndBlock < (_D_e_n_s_e_I_n_d_e_x)variableColOffsets_.size()); │ │ │ │ +137 } │ │ │ │ +138 const _D_e_n_s_e_I_n_d_e_x startCol = variableColOffsets_[actualStartBlock]; │ │ │ │ +139 const _D_e_n_s_e_I_n_d_e_x rangeCols = variableColOffsets_[actualEndBlock] - │ │ │ │ +startCol; │ │ │ │ +140 return matrix_.block(rowStart_, startCol, this->rows(), rangeCols); │ │ │ │ +141 } │ │ │ │ +142 │ │ │ │ +143 const constBlock range(_D_e_n_s_e_I_n_d_e_x startBlock, _D_e_n_s_e_I_n_d_e_x endBlock) const { │ │ │ │ +144 assertInvariants(); │ │ │ │ +145 _D_e_n_s_e_I_n_d_e_x actualStartBlock = startBlock + blockStart_; │ │ │ │ +146 _D_e_n_s_e_I_n_d_e_x actualEndBlock = endBlock + blockStart_; │ │ │ │ +147 if(startBlock != 0 || endBlock != 0) { │ │ │ │ +148 checkBlock(actualStartBlock); │ │ │ │ +149 assert(actualEndBlock < (_D_e_n_s_e_I_n_d_e_x)variableColOffsets_.size()); │ │ │ │ +150 } │ │ │ │ +151 const DenseIndex startCol = variableColOffsets_[actualStartBlock]; │ │ │ │ +152 const DenseIndex rangeCols = variableColOffsets_[actualEndBlock] - │ │ │ │ +startCol; │ │ │ │ +153 return ((const Matrix&)matrix_).block(rowStart_, startCol, this->rows(), │ │ │ │ +rangeCols); │ │ │ │ +154 } │ │ │ │ +155 │ │ │ │ +_1_5_7 Block _f_u_l_l() { return range(0, nBlocks()); } │ │ │ │ +158 │ │ │ │ +_1_6_0 const constBlock _f_u_l_l() const { return range(0, nBlocks()); } │ │ │ │ +161 │ │ │ │ +162 _D_e_n_s_e_I_n_d_e_x offset(_D_e_n_s_e_I_n_d_e_x block) const { │ │ │ │ +163 assertInvariants(); │ │ │ │ +164 _D_e_n_s_e_I_n_d_e_x actualBlock = block + blockStart_; │ │ │ │ +165 checkBlock(actualBlock); │ │ │ │ +166 return variableColOffsets_[actualBlock]; │ │ │ │ +167 } │ │ │ │ +168 │ │ │ │ +_1_7_0 const _D_e_n_s_e_I_n_d_e_x& _r_o_w_S_t_a_r_t() const { return rowStart_; } │ │ │ │ +171 │ │ │ │ +_1_7_3 _D_e_n_s_e_I_n_d_e_x& _r_o_w_S_t_a_r_t() { return rowStart_; } │ │ │ │ +174 │ │ │ │ +_1_7_6 const _D_e_n_s_e_I_n_d_e_x& _r_o_w_E_n_d() const { return rowEnd_; } │ │ │ │ +177 │ │ │ │ +_1_7_9 _D_e_n_s_e_I_n_d_e_x& _r_o_w_E_n_d() { return rowEnd_; } │ │ │ │ +180 │ │ │ │ +_1_8_2 const _D_e_n_s_e_I_n_d_e_x& _f_i_r_s_t_B_l_o_c_k() const { return blockStart_; } │ │ │ │ +183 │ │ │ │ +_1_8_5 _D_e_n_s_e_I_n_d_e_x& _f_i_r_s_t_B_l_o_c_k() { return blockStart_; } │ │ │ │ +186 │ │ │ │ +_1_8_8 const Matrix& _m_a_t_r_i_x() const { return matrix_; } │ │ │ │ +189 │ │ │ │ +_1_9_1 Matrix& _m_a_t_r_i_x() { return matrix_; } │ │ │ │ +192 │ │ │ │ +193 protected: │ │ │ │ +194 void assertInvariants() const { │ │ │ │ +195 assert(matrix_.cols() == variableColOffsets_.back()); │ │ │ │ +196 assert(blockStart_ < (_D_e_n_s_e_I_n_d_e_x)variableColOffsets_.size()); │ │ │ │ +197 assert(rowStart_ <= matrix_.rows()); │ │ │ │ +198 assert(rowEnd_ <= matrix_.rows()); │ │ │ │ +199 assert(rowStart_ <= rowEnd_); │ │ │ │ +200 } │ │ │ │ +201 │ │ │ │ +202 void checkBlock(DenseIndex block) const { │ │ │ │ +203 static_cast(block); //Disable unused varibale warnings. │ │ │ │ +204 assert(matrix_.cols() == variableColOffsets_.back()); │ │ │ │ +205 assert(block < (DenseIndex)variableColOffsets_.size() - 1); │ │ │ │ +206 assert(variableColOffsets_[block] < matrix_.cols() && variableColOffsets_ │ │ │ │ +[block+1] <= matrix_.cols()); │ │ │ │ +207 } │ │ │ │ +208 │ │ │ │ +209 template │ │ │ │ +210 void fillOffsets(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool │ │ │ │ +appendOneDimension) { │ │ │ │ +211 variableColOffsets_[0] = 0; │ │ │ │ +212 _D_e_n_s_e_I_n_d_e_x j=0; │ │ │ │ +213 for(ITERATOR dim=firstBlockDim; dim!=lastBlockDim; ++dim, ++j) │ │ │ │ +214 variableColOffsets_[j+1] = variableColOffsets_[j] + *dim; │ │ │ │ +215 if(appendOneDimension) │ │ │ │ +216 variableColOffsets_[j+1] = variableColOffsets_[j] + 1; │ │ │ │ +217 } │ │ │ │ +218 │ │ │ │ +219 friend class SymmetricBlockMatrix; │ │ │ │ +220 │ │ │ │ +221 private: │ │ │ │ +_2_2_3 friend class boost::serialization::access; │ │ │ │ +224 template │ │ │ │ +225 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ +226 ar & BOOST_SERIALIZATION_NVP(matrix_); │ │ │ │ +227 ar & BOOST_SERIALIZATION_NVP(variableColOffsets_); │ │ │ │ +228 ar & BOOST_SERIALIZATION_NVP(rowStart_); │ │ │ │ +229 ar & BOOST_SERIALIZATION_NVP(rowEnd_); │ │ │ │ +230 ar & BOOST_SERIALIZATION_NVP(blockStart_); │ │ │ │ +231 } │ │ │ │ +232 }; │ │ │ │ +233 │ │ │ │ +234} │ │ │ │ +_M_a_t_r_i_x_S_e_r_i_a_l_i_z_a_t_i_o_n_._h │ │ │ │ +Serialization for matrices. │ │ │ │ +_M_a_t_r_i_x_._h │ │ │ │ +typedef and functions to augment Eigen's MatrixXd │ │ │ │ +_F_a_s_t_V_e_c_t_o_r_._h │ │ │ │ +A thin wrapper around std::vector that uses a custom allocator. │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_V_e_c_t_o_r │ │ │ │ +std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > │ │ │ │ +FastVector │ │ │ │ +FastVector is a type alias to a std::vector with a custom memory allocator. │ │ │ │ +DDeeffiinniittiioonn FastVector.h:34 │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n │ │ │ │ -Base exception type that uses tbb_allocator if GTSAM is compiled with TBB. │ │ │ │ -DDeeffiinniittiioonn ThreadsafeException.h:42 │ │ │ │ -_g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_:_:_~_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n │ │ │ │ -~ThreadsafeException() noexcept override │ │ │ │ -Default destructor doesn't have the noexcept. │ │ │ │ -DDeeffiinniittiioonn ThreadsafeException.h:75 │ │ │ │ -_g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_:_:_d_y_n_a_m_i_c__ │ │ │ │ -bool dynamic_ │ │ │ │ -Whether this object was moved. │ │ │ │ -DDeeffiinniittiioonn ThreadsafeException.h:55 │ │ │ │ -_g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n │ │ │ │ -ThreadsafeException() │ │ │ │ -Default constructor is protected - may only be created from derived classes. │ │ │ │ -DDeeffiinniittiioonn ThreadsafeException.h:59 │ │ │ │ -_g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n │ │ │ │ -ThreadsafeException(const ThreadsafeException &other) │ │ │ │ -Copy constructor is protected - may only be created from derived classes. │ │ │ │ -DDeeffiinniittiioonn ThreadsafeException.h:64 │ │ │ │ -_g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n │ │ │ │ -ThreadsafeException(const std::string &description) │ │ │ │ -Construct with description string. │ │ │ │ -DDeeffiinniittiioonn ThreadsafeException.h:69 │ │ │ │ -_g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_:_:_d_e_s_c_r_i_p_t_i_o_n__ │ │ │ │ -boost::optional< String > description_ │ │ │ │ -Optional description. │ │ │ │ -DDeeffiinniittiioonn ThreadsafeException.h:56 │ │ │ │ -_g_t_s_a_m_:_:_R_u_n_t_i_m_e_E_r_r_o_r_T_h_r_e_a_d_s_a_f_e │ │ │ │ -Thread-safe runtime error exception. │ │ │ │ -DDeeffiinniittiioonn ThreadsafeException.h:85 │ │ │ │ -_g_t_s_a_m_:_:_R_u_n_t_i_m_e_E_r_r_o_r_T_h_r_e_a_d_s_a_f_e_:_:_R_u_n_t_i_m_e_E_r_r_o_r_T_h_r_e_a_d_s_a_f_e │ │ │ │ -RuntimeErrorThreadsafe(const std::string &description) │ │ │ │ -Construct with a string describing the exception. │ │ │ │ -DDeeffiinniittiioonn ThreadsafeException.h:88 │ │ │ │ -_g_t_s_a_m_:_:_O_u_t_O_f_R_a_n_g_e_T_h_r_e_a_d_s_a_f_e │ │ │ │ -Thread-safe out of range exception. │ │ │ │ -DDeeffiinniittiioonn ThreadsafeException.h:94 │ │ │ │ -_g_t_s_a_m_:_:_O_u_t_O_f_R_a_n_g_e_T_h_r_e_a_d_s_a_f_e_:_:_O_u_t_O_f_R_a_n_g_e_T_h_r_e_a_d_s_a_f_e │ │ │ │ -OutOfRangeThreadsafe(const std::string &description) │ │ │ │ -Construct with a string describing the exception. │ │ │ │ -DDeeffiinniittiioonn ThreadsafeException.h:97 │ │ │ │ -_g_t_s_a_m_:_:_I_n_v_a_l_i_d_A_r_g_u_m_e_n_t_T_h_r_e_a_d_s_a_f_e │ │ │ │ -Thread-safe invalid argument exception. │ │ │ │ -DDeeffiinniittiioonn ThreadsafeException.h:104 │ │ │ │ -_g_t_s_a_m_:_:_I_n_v_a_l_i_d_A_r_g_u_m_e_n_t_T_h_r_e_a_d_s_a_f_e_:_:_I_n_v_a_l_i_d_A_r_g_u_m_e_n_t_T_h_r_e_a_d_s_a_f_e │ │ │ │ -InvalidArgumentThreadsafe(const std::string &description) │ │ │ │ -Construct with a string describing the exception. │ │ │ │ -DDeeffiinniittiioonn ThreadsafeException.h:107 │ │ │ │ -_g_t_s_a_m_:_:_C_h_o_l_e_s_k_y_F_a_i_l_e_d │ │ │ │ -Indicate Cholesky factorization failure. │ │ │ │ -DDeeffiinniittiioonn ThreadsafeException.h:114 │ │ │ │ +_g_t_s_a_m_:_:_D_e_n_s_e_I_n_d_e_x │ │ │ │ +ptrdiff_t DenseIndex │ │ │ │ +The index type for Eigen objects. │ │ │ │ +DDeeffiinniittiioonn types.h:106 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ +This class stores a dense matrix and allows it to be accessed as a collection │ │ │ │ +of blocks. │ │ │ │ +DDeeffiinniittiioonn SymmetricBlockMatrix.h:52 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ +This class stores a dense matrix and allows it to be accessed as a collection │ │ │ │ +of vertical blocks. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:43 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ +VerticalBlockMatrix() │ │ │ │ +Construct an empty VerticalBlockMatrix. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:60 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_f_u_l_l │ │ │ │ +Block full() │ │ │ │ +Return the full matrix, not including any portions excluded by rowStart(), │ │ │ │ +rowEnd(),... │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:157 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_r_a_n_g_e │ │ │ │ +Block range(DenseIndex startBlock, DenseIndex endBlock) │ │ │ │ +access ranges of blocks at a time │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:130 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_f_i_r_s_t_B_l_o_c_k │ │ │ │ +const DenseIndex & firstBlock() const │ │ │ │ +Get the apparent first block for all operations. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:182 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_m_a_t_r_i_x │ │ │ │ +const Matrix & matrix() const │ │ │ │ +Access to full matrix (including any portions excluded by rowStart(), rowEnd(), │ │ │ │ +and firstBlock()) │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:188 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ +VerticalBlockMatrix(const CONTAINER &dimensions, DenseIndex height, bool │ │ │ │ +appendOneDimension=false) │ │ │ │ +Construct from a container of the sizes of each vertical block. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:69 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_r_o_w_E_n_d__ │ │ │ │ +DenseIndex rowEnd_ │ │ │ │ +Changes apparent matrix view, see main class comment. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:54 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_r_o_w_E_n_d │ │ │ │ +const DenseIndex & rowEnd() const │ │ │ │ +Get the apparent last row (exclusive, i.e. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:176 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_r_o_w_s │ │ │ │ +DenseIndex rows() const │ │ │ │ +Row size. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:115 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ +Block operator()(DenseIndex block) │ │ │ │ +Access a single block in the underlying matrix with read/write access. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:124 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_f_i_r_s_t_B_l_o_c_k │ │ │ │ +DenseIndex & firstBlock() │ │ │ │ +Get or set the apparent first block for all operations. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:185 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_c_o_l_s │ │ │ │ +DenseIndex cols() const │ │ │ │ +Column size. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:118 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ +VerticalBlockMatrix(ITERATOR firstBlockDim, ITERATOR lastBlockDim, DenseIndex │ │ │ │ +height, bool appendOneDimension=false) │ │ │ │ +Construct from iterator over the sizes of each vertical block. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:93 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ +const constBlock operator()(DenseIndex block) const │ │ │ │ +Access a const block view. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:127 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_r_o_w_S_t_a_r_t │ │ │ │ +const DenseIndex & rowStart() const │ │ │ │ +Get the apparent first row of the underlying matrix for all operations. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:170 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_m_a_t_r_i_x__ │ │ │ │ +Matrix matrix_ │ │ │ │ +The full matrix. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:50 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_n_B_l_o_c_k_s │ │ │ │ +DenseIndex nBlocks() const │ │ │ │ +Block count. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:121 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_f_u_l_l │ │ │ │ +const constBlock full() const │ │ │ │ +Return the full matrix, not including any portions excluded by rowStart(), │ │ │ │ +rowEnd(),... │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:160 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_r_o_w_S_t_a_r_t │ │ │ │ +DenseIndex & rowStart() │ │ │ │ +Get or set the apparent first row of the underlying matrix for all operations. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:173 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_m_a_t_r_i_x │ │ │ │ +Matrix & matrix() │ │ │ │ +Non-const access to full matrix (including any portions excluded by rowStart(), │ │ │ │ +rowEnd(),... │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:191 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_r_o_w_E_n_d │ │ │ │ +DenseIndex & rowEnd() │ │ │ │ +Get or set the apparent last row (exclusive, i.e. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:179 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_r_o_w_S_t_a_r_t__ │ │ │ │ +DenseIndex rowStart_ │ │ │ │ +Changes apparent matrix view, see main class comment. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:53 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ +VerticalBlockMatrix(const CONTAINER &dimensions, const Eigen::MatrixBase< │ │ │ │ +DERIVED > &matrix, bool appendOneDimension=false) │ │ │ │ +Construct from a container of the sizes of each vertical block and a pre- │ │ │ │ +prepared matrix. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:80 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_b_l_o_c_k_S_t_a_r_t__ │ │ │ │ +DenseIndex blockStart_ │ │ │ │ +Changes apparent matrix view, see main class comment. │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:55 │ │ │ │ +_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_:_:_v_a_r_i_a_b_l_e_C_o_l_O_f_f_s_e_t_s__ │ │ │ │ +FastVector< DenseIndex > variableColOffsets_ │ │ │ │ +the starting columns of each block (0-based) │ │ │ │ +DDeeffiinniittiioonn VerticalBlockMatrix.h:51 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_._h │ │ │ │ + * _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00086_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/TestableAssertions.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/VectorSpace.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,399 +98,487 @@ │ │ │
No Matches
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
TestableAssertions.h
│ │ │ +
VectorSpace.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │ -
2
│ │ │ -
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │ -
4 * Atlanta, Georgia 30332-0415
│ │ │ -
5 * All Rights Reserved
│ │ │ -
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │ -
7
│ │ │ -
8 * See LICENSE for the license information
│ │ │ -
9
│ │ │ -
10 * -------------------------------------------------------------------------- */
│ │ │ -
11
│ │ │ -
18#pragma once
│ │ │ -
19
│ │ │ -
20#include <gtsam/base/Testable.h>
│ │ │ - │ │ │ +
1/*
│ │ │ +
2 * VectorSpace.h
│ │ │ +
3 *
│ │ │ +
4 * @date December 21, 2014
│ │ │ +
5 * @author Mike Bosse
│ │ │ +
6 * @author Frank Dellaert
│ │ │ +
7 */
│ │ │ +
8
│ │ │ +
9#pragma once
│ │ │ +
10
│ │ │ +
11#include <gtsam/base/Lie.h>
│ │ │ +
12
│ │ │ +
13namespace gtsam {
│ │ │ +
14
│ │ │ +
│ │ │ + │ │ │ +
17};
│ │ │ +
│ │ │ +
18
│ │ │ +
19template<typename T> struct traits;
│ │ │ +
20
│ │ │ +
21namespace internal {
│ │ │
22
│ │ │ -
23#include <boost/optional.hpp>
│ │ │ -
24#include <map>
│ │ │ -
25#include <iostream>
│ │ │ -
26#include <sstream>
│ │ │ -
27#include <vector>
│ │ │ -
28
│ │ │ -
29namespace gtsam {
│ │ │ -
30
│ │ │ -
│ │ │ -
34inline bool assert_equal(const Key& expected, const Key& actual, double tol = 0.0) {
│ │ │ -
35 if(expected != actual) {
│ │ │ -
36 std::cout << "Not equal:\nexpected: " << expected << "\nactual: " << actual << std::endl;
│ │ │ -
37 return false;
│ │ │ -
38 }
│ │ │ -
39 return true;
│ │ │ -
40}
│ │ │ -
│ │ │ +
24template<class Class, int N>
│ │ │ +
│ │ │ + │ │ │ +
26
│ │ │ +
29 typedef Eigen::Matrix<double, N, 1> TangentVector;
│ │ │ +
30 typedef OptionalJacobian<N, N> ChartJacobian;
│ │ │ +
31 typedef Eigen::Matrix<double, N, N> Jacobian;
│ │ │ +
32 static int GetDimension(const Class&) { return N;}
│ │ │ +
33
│ │ │ +
34 static TangentVector Local(const Class& origin, const Class& other,
│ │ │ +
35 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
│ │ │ +
36 if (H1) *H1 = - Jacobian::Identity();
│ │ │ +
37 if (H2) *H2 = Jacobian::Identity();
│ │ │ +
38 Class v = other-origin;
│ │ │ +
39 return v.vector();
│ │ │ +
40 }
│ │ │
41
│ │ │ -
49template<class V>
│ │ │ -
│ │ │ -
50bool assert_equal(const boost::optional<V>& expected,
│ │ │ -
51 const boost::optional<V>& actual, double tol = 1e-9) {
│ │ │ -
52 if (!expected && actual) {
│ │ │ -
53 std::cout << "expected is boost::none, while actual is not" << std::endl;
│ │ │ -
54 return false;
│ │ │ -
55 }
│ │ │ -
56 if (expected && !actual) {
│ │ │ -
57 std::cout << "actual is boost::none, while expected is not" << std::endl;
│ │ │ -
58 return false;
│ │ │ -
59 }
│ │ │ -
60 if (!expected && !actual)
│ │ │ -
61 return true;
│ │ │ -
62 return assert_equal(*expected, *actual, tol);
│ │ │ -
63}
│ │ │ -
│ │ │ -
64
│ │ │ -
65template<class V>
│ │ │ -
66bool assert_equal(const V& expected, const boost::optional<V>& actual, double tol = 1e-9) {
│ │ │ -
67 if (!actual) {
│ │ │ -
68 std::cout << "actual is boost::none" << std::endl;
│ │ │ -
69 return false;
│ │ │ -
70 }
│ │ │ -
71 return assert_equal(expected, *actual, tol);
│ │ │ -
72}
│ │ │ -
73
│ │ │ -
74template<class V>
│ │ │ -
75bool assert_equal(const V& expected, const boost::optional<const V&>& actual, double tol = 1e-9) {
│ │ │ -
76 if (!actual) {
│ │ │ -
77 std::cout << "actual is boost::none" << std::endl;
│ │ │ -
78 return false;
│ │ │ -
79 }
│ │ │ -
80 return assert_equal(expected, *actual, tol);
│ │ │ -
81}
│ │ │ +
42 static Class Retract(const Class& origin, const TangentVector& v,
│ │ │ +
43 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
│ │ │ +
44 if (H1) *H1 = Jacobian::Identity();
│ │ │ +
45 if (H2) *H2 = Jacobian::Identity();
│ │ │ +
46 return origin + v;
│ │ │ +
47 }
│ │ │ +
48
│ │ │ +
50
│ │ │ +
53
│ │ │ +
54 static TangentVector Logmap(const Class& m, ChartJacobian Hm = boost::none) {
│ │ │ +
55 if (Hm) *Hm = Jacobian::Identity();
│ │ │ +
56 return m.vector();
│ │ │ +
57 }
│ │ │ +
58
│ │ │ +
59 static Class Expmap(const TangentVector& v, ChartJacobian Hv = boost::none) {
│ │ │ +
60 if (Hv) *Hv = Jacobian::Identity();
│ │ │ +
61 return Class(v);
│ │ │ +
62 }
│ │ │ +
63
│ │ │ +
64 static Class Compose(const Class& v1, const Class& v2, ChartJacobian H1 = boost::none,
│ │ │ +
65 ChartJacobian H2 = boost::none) {
│ │ │ +
66 if (H1) *H1 = Jacobian::Identity();
│ │ │ +
67 if (H2) *H2 = Jacobian::Identity();
│ │ │ +
68 return v1 + v2;
│ │ │ +
69 }
│ │ │ +
70
│ │ │ +
71 static Class Between(const Class& v1, const Class& v2, ChartJacobian H1 = boost::none,
│ │ │ +
72 ChartJacobian H2 = boost::none) {
│ │ │ +
73 if (H1) *H1 = - Jacobian::Identity();
│ │ │ +
74 if (H2) *H2 = Jacobian::Identity();
│ │ │ +
75 return v2 - v1;
│ │ │ +
76 }
│ │ │ +
77
│ │ │ +
78 static Class Inverse(const Class& v, ChartJacobian H = boost::none) {
│ │ │ +
79 if (H) *H = - Jacobian::Identity();
│ │ │ +
80 return -v;
│ │ │ +
81 }
│ │ │
82
│ │ │ -
83#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
│ │ │ -
88template<class V>
│ │ │ -
89bool GTSAM_DEPRECATED assert_equal(const std::vector<V>& expected, const std::vector<V>& actual, double tol = 1e-9) {
│ │ │ -
90 bool match = true;
│ │ │ -
91 if (expected.size() != actual.size())
│ │ │ -
92 match = false;
│ │ │ -
93 if(match) {
│ │ │ -
94 size_t i = 0;
│ │ │ -
95 for(const V& a: expected) {
│ │ │ -
96 if (!assert_equal(a, actual[i++], tol)) {
│ │ │ -
97 match = false;
│ │ │ -
98 break;
│ │ │ -
99 }
│ │ │ -
100 }
│ │ │ -
101 }
│ │ │ -
102 if(!match) {
│ │ │ -
103 std::cout << "expected: " << std::endl;
│ │ │ -
104 for(const V& a: expected) { std::cout << a << " "; }
│ │ │ -
105 std::cout << "\nactual: " << std::endl;
│ │ │ -
106 for(const V& a: actual) { std::cout << a << " "; }
│ │ │ -
107 std::cout << std::endl;
│ │ │ -
108 return false;
│ │ │ -
109 }
│ │ │ -
110 return true;
│ │ │ -
111}
│ │ │ -
112#endif
│ │ │ -
113
│ │ │ -
118template<class V1, class V2>
│ │ │ -
│ │ │ -
119bool assert_container_equal(const std::map<V1,V2>& expected, const std::map<V1,V2>& actual, double tol = 1e-9) {
│ │ │ -
120 typedef typename std::map<V1,V2> Map;
│ │ │ -
121 bool match = true;
│ │ │ -
122 if (expected.size() != actual.size())
│ │ │ -
123 match = false;
│ │ │ -
124 typename Map::const_iterator
│ │ │ -
125 itExp = expected.begin(),
│ │ │ -
126 itAct = actual.begin();
│ │ │ -
127 if(match) {
│ │ │ -
128 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) {
│ │ │ -
129 if (!assert_equal(itExp->first, itAct->first, tol) ||
│ │ │ -
130 !assert_equal(itExp->second, itAct->second, tol)) {
│ │ │ -
131 match = false;
│ │ │ -
132 break;
│ │ │ -
133 }
│ │ │ -
134 }
│ │ │ -
135 }
│ │ │ -
136 if(!match) {
│ │ │ -
137 std::cout << "expected: " << std::endl;
│ │ │ -
138 for(const typename Map::value_type& a: expected) {
│ │ │ -
139 a.first.print("key");
│ │ │ -
140 a.second.print(" value");
│ │ │ -
141 }
│ │ │ -
142 std::cout << "\nactual: " << std::endl;
│ │ │ -
143 for(const typename Map::value_type& a: actual) {
│ │ │ -
144 a.first.print("key");
│ │ │ -
145 a.second.print(" value");
│ │ │ -
146 }
│ │ │ -
147 std::cout << std::endl;
│ │ │ -
148 return false;
│ │ │ -
149 }
│ │ │ -
150 return true;
│ │ │ -
151}
│ │ │ -
│ │ │ -
152
│ │ │ -
156template<class V2>
│ │ │ -
│ │ │ -
157bool assert_container_equal(const std::map<size_t,V2>& expected, const std::map<size_t,V2>& actual, double tol = 1e-9) {
│ │ │ -
158 typedef typename std::map<size_t,V2> Map;
│ │ │ -
159 bool match = true;
│ │ │ -
160 if (expected.size() != actual.size())
│ │ │ -
161 match = false;
│ │ │ -
162 typename Map::const_iterator
│ │ │ -
163 itExp = expected.begin(),
│ │ │ -
164 itAct = actual.begin();
│ │ │ -
165 if(match) {
│ │ │ -
166 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) {
│ │ │ -
167 if (itExp->first != itAct->first ||
│ │ │ -
168 !assert_equal(itExp->second, itAct->second, tol)) {
│ │ │ -
169 match = false;
│ │ │ -
170 break;
│ │ │ -
171 }
│ │ │ -
172 }
│ │ │ -
173 }
│ │ │ -
174 if(!match) {
│ │ │ -
175 std::cout << "expected: " << std::endl;
│ │ │ -
176 for(const typename Map::value_type& a: expected) {
│ │ │ -
177 std::cout << "Key: " << a.first << std::endl;
│ │ │ -
178 a.second.print(" value");
│ │ │ -
179 }
│ │ │ -
180 std::cout << "\nactual: " << std::endl;
│ │ │ -
181 for(const typename Map::value_type& a: actual) {
│ │ │ -
182 std::cout << "Key: " << a.first << std::endl;
│ │ │ -
183 a.second.print(" value");
│ │ │ -
184 }
│ │ │ -
185 std::cout << std::endl;
│ │ │ -
186 return false;
│ │ │ -
187 }
│ │ │ -
188 return true;
│ │ │ -
189}
│ │ │ -
│ │ │ -
190
│ │ │ -
194template<class V1, class V2>
│ │ │ -
│ │ │ -
195bool assert_container_equal(const std::vector<std::pair<V1,V2> >& expected,
│ │ │ -
196 const std::vector<std::pair<V1,V2> >& actual, double tol = 1e-9) {
│ │ │ -
197 typedef typename std::vector<std::pair<V1,V2> > VectorPair;
│ │ │ -
198 bool match = true;
│ │ │ -
199 if (expected.size() != actual.size())
│ │ │ -
200 match = false;
│ │ │ -
201 typename VectorPair::const_iterator
│ │ │ -
202 itExp = expected.begin(),
│ │ │ -
203 itAct = actual.begin();
│ │ │ -
204 if(match) {
│ │ │ -
205 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) {
│ │ │ -
206 if (!assert_equal(itExp->first, itAct->first, tol) ||
│ │ │ -
207 !assert_equal(itExp->second, itAct->second, tol)) {
│ │ │ -
208 match = false;
│ │ │ -
209 break;
│ │ │ -
210 }
│ │ │ -
211 }
│ │ │ -
212 }
│ │ │ -
213 if(!match) {
│ │ │ -
214 std::cout << "expected: " << std::endl;
│ │ │ -
215 for(const typename VectorPair::value_type& a: expected) {
│ │ │ -
216 a.first.print( " first ");
│ │ │ -
217 a.second.print(" second");
│ │ │ -
218 }
│ │ │ -
219 std::cout << "\nactual: " << std::endl;
│ │ │ -
220 for(const typename VectorPair::value_type& a: actual) {
│ │ │ -
221 a.first.print( " first ");
│ │ │ -
222 a.second.print(" second");
│ │ │ -
223 }
│ │ │ -
224 std::cout << std::endl;
│ │ │ -
225 return false;
│ │ │ -
226 }
│ │ │ -
227 return true;
│ │ │ -
228}
│ │ │ -
│ │ │ -
229
│ │ │ -
230
│ │ │ -
234template<class V>
│ │ │ -
│ │ │ -
235bool assert_container_equal(const V& expected, const V& actual, double tol = 1e-9) {
│ │ │ -
236 bool match = true;
│ │ │ -
237 typename V::const_iterator
│ │ │ -
238 itExp = expected.begin(),
│ │ │ -
239 itAct = actual.begin();
│ │ │ -
240 if(match) {
│ │ │ -
241 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) {
│ │ │ -
242 if (!assert_equal(*itExp, *itAct, tol)) {
│ │ │ -
243 match = false;
│ │ │ -
244 break;
│ │ │ -
245 }
│ │ │ -
246 }
│ │ │ -
247 if(itExp != expected.end() || itAct != actual.end())
│ │ │ -
248 match = false;
│ │ │ -
249 }
│ │ │ -
250 if(!match) {
│ │ │ -
251 std::cout << "expected: " << std::endl;
│ │ │ -
252 for(const typename V::value_type& a: expected) { a.print(" "); }
│ │ │ -
253 std::cout << "\nactual: " << std::endl;
│ │ │ -
254 for(const typename V::value_type& a: actual) { a.print(" "); }
│ │ │ -
255 std::cout << std::endl;
│ │ │ -
256 return false;
│ │ │ -
257 }
│ │ │ -
258 return true;
│ │ │ -
259}
│ │ │ -
│ │ │ -
260
│ │ │ -
265template<class V2>
│ │ │ -
│ │ │ -
266bool assert_container_equality(const std::map<size_t,V2>& expected, const std::map<size_t,V2>& actual) {
│ │ │ -
267 typedef typename std::map<size_t,V2> Map;
│ │ │ -
268 bool match = true;
│ │ │ -
269 if (expected.size() != actual.size())
│ │ │ -
270 match = false;
│ │ │ -
271 typename Map::const_iterator
│ │ │ -
272 itExp = expected.begin(),
│ │ │ -
273 itAct = actual.begin();
│ │ │ -
274 if(match) {
│ │ │ -
275 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) {
│ │ │ -
276 if (itExp->first != itAct->first || itExp->second != itAct->second) {
│ │ │ -
277 match = false;
│ │ │ -
278 break;
│ │ │ -
279 }
│ │ │ -
280 }
│ │ │ -
281 }
│ │ │ -
282 if(!match) {
│ │ │ -
283 std::cout << "expected: " << std::endl;
│ │ │ -
284 for(const typename Map::value_type& a: expected) {
│ │ │ -
285 std::cout << "Key: " << a.first << std::endl;
│ │ │ -
286 std::cout << "Value: " << a.second << std::endl;
│ │ │ -
287 }
│ │ │ -
288 std::cout << "\nactual: " << std::endl;
│ │ │ -
289 for(const typename Map::value_type& a: actual) {
│ │ │ -
290 std::cout << "Key: " << a.first << std::endl;
│ │ │ -
291 std::cout << "Value: " << a.second << std::endl;
│ │ │ -
292 }
│ │ │ -
293 std::cout << std::endl;
│ │ │ -
294 return false;
│ │ │ -
295 }
│ │ │ -
296 return true;
│ │ │ -
297}
│ │ │ +
84};
│ │ │
│ │ │ -
298
│ │ │ +
85
│ │ │ +
87template<class Class>
│ │ │ +
│ │ │ +
88struct VectorSpaceImpl<Class,Eigen::Dynamic> {
│ │ │ +
89
│ │ │ +
92 static Class Compose(const Class& v1, const Class& v2) { return v1+v2;}
│ │ │ +
93 static Class Between(const Class& v1, const Class& v2) { return v2-v1;}
│ │ │ +
94 static Class Inverse(const Class& m) { return -m;}
│ │ │ +
96
│ │ │ +
99 typedef Eigen::VectorXd TangentVector;
│ │ │ + │ │ │ +
101 static int GetDimension(const Class& m) { return m.dim();}
│ │ │ +
102
│ │ │ +
103 static Eigen::MatrixXd Eye(const Class& m) {
│ │ │ +
104 int dim = GetDimension(m);
│ │ │ +
105 return Eigen::MatrixXd::Identity(dim, dim);
│ │ │ +
106 }
│ │ │ +
107
│ │ │ +
108 static TangentVector Local(const Class& origin, const Class& other,
│ │ │ +
109 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
│ │ │ +
110 if (H1) *H1 = - Eye(origin);
│ │ │ +
111 if (H2) *H2 = Eye(other);
│ │ │ +
112 Class v = other-origin;
│ │ │ +
113 return v.vector();
│ │ │ +
114 }
│ │ │ +
115
│ │ │ +
116 static Class Retract(const Class& origin, const TangentVector& v,
│ │ │ +
117 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
│ │ │ +
118 if (H1) *H1 = Eye(origin);
│ │ │ +
119 if (H2) *H2 = Eye(origin);
│ │ │ +
120 return origin + v;
│ │ │ +
121 }
│ │ │ +
122
│ │ │ +
124
│ │ │ +
127
│ │ │ +
128 static TangentVector Logmap(const Class& m, ChartJacobian Hm = boost::none) {
│ │ │ +
129 if (Hm) *Hm = Eye(m);
│ │ │ +
130 return m.vector();
│ │ │ +
131 }
│ │ │ +
132
│ │ │ +
133 static Class Expmap(const TangentVector& v, ChartJacobian Hv = boost::none) {
│ │ │ +
134 Class result(v);
│ │ │ +
135 if (Hv)
│ │ │ +
136 *Hv = Eye(v);
│ │ │ +
137 return result;
│ │ │ +
138 }
│ │ │ +
139
│ │ │ +
140 static Class Compose(const Class& v1, const Class& v2, ChartJacobian H1,
│ │ │ +
141 ChartJacobian H2 = boost::none) {
│ │ │ +
142 if (H1) *H1 = Eye(v1);
│ │ │ +
143 if (H2) *H2 = Eye(v2);
│ │ │ +
144 return v1 + v2;
│ │ │ +
145 }
│ │ │ +
146
│ │ │ +
147 static Class Between(const Class& v1, const Class& v2, ChartJacobian H1,
│ │ │ +
148 ChartJacobian H2 = boost::none) {
│ │ │ +
149 if (H1) *H1 = - Eye(v1);
│ │ │ +
150 if (H2) *H2 = Eye(v2);
│ │ │ +
151 return v2 - v1;
│ │ │ +
152 }
│ │ │ +
153
│ │ │ +
154 static Class Inverse(const Class& v, ChartJacobian H) {
│ │ │ +
155 if (H) *H = -Eye(v);
│ │ │ +
156 return -v;
│ │ │ +
157 }
│ │ │ +
158
│ │ │ +
160};
│ │ │ +
│ │ │ +
161
│ │ │ +
163template<class Class>
│ │ │ +
│ │ │ + │ │ │ +
165
│ │ │ +
166 enum { dim = Class::dimension };
│ │ │ +
167
│ │ │ +
168 Class p, q;
│ │ │ +
169 Vector v;
│ │ │ +
170
│ │ │ +
171 BOOST_CONCEPT_USAGE(HasVectorSpacePrereqs) {
│ │ │ +
172 p = Class::Identity(); // identity
│ │ │ +
173 q = p + p; // addition
│ │ │ +
174 q = p - p; // subtraction
│ │ │ +
175 v = p.vector(); // conversion to vector
│ │ │ +
176 q = p + v; // addition of a vector on the right
│ │ │ +
177 }
│ │ │ +
178};
│ │ │ +
│ │ │ +
179
│ │ │ +
184template<class Class>
│ │ │ +
│ │ │ +
185struct VectorSpaceTraits: VectorSpaceImpl<Class, Class::dimension> {
│ │ │ +
186
│ │ │ +
187 // Check that Class has the necessary machinery
│ │ │ +
188 BOOST_CONCEPT_ASSERT((HasVectorSpacePrereqs<Class>));
│ │ │ +
189
│ │ │ + │ │ │ +
191
│ │ │ + │ │ │ +
195 static Class Identity() { return Class::Identity();}
│ │ │ +
197
│ │ │ +
200 enum { dimension = Class::dimension};
│ │ │ +
201 typedef Class ManifoldType;
│ │ │ +
203};
│ │ │ +
│ │ │ +
204
│ │ │ +
206template<class Class>
│ │ │ +
207struct VectorSpace: Testable<Class>, VectorSpaceTraits<Class> {};
│ │ │ +
208
│ │ │ +
211template<typename Scalar>
│ │ │ +
│ │ │ +
212struct ScalarTraits : VectorSpaceImpl<Scalar, 1> {
│ │ │ +
213
│ │ │ + │ │ │ +
215
│ │ │ +
218 static void Print(Scalar m, const std::string& str = "") {
│ │ │ +
219 gtsam::print(m, str);
│ │ │ +
220 }
│ │ │ +
221 static bool Equals(Scalar v1, Scalar v2, double tol = 1e-8) {
│ │ │ +
222 return std::abs(v1 - v2) < tol;
│ │ │ +
223 }
│ │ │ +
225
│ │ │ + │ │ │ +
229 static Scalar Identity() { return 0;}
│ │ │ +
231
│ │ │ +
234 typedef Scalar ManifoldType;
│ │ │ +
235 enum { dimension = 1 };
│ │ │ +
236 typedef Eigen::Matrix<double, 1, 1> TangentVector;
│ │ │ +
237 typedef OptionalJacobian<1, 1> ChartJacobian;
│ │ │ +
238
│ │ │ +
239 static TangentVector Local(Scalar origin, Scalar other,
│ │ │ +
240 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
│ │ │ +
241 if (H1) (*H1)[0] = -1.0;
│ │ │ +
242 if (H2) (*H2)[0] = 1.0;
│ │ │ +
243 TangentVector result;
│ │ │ +
244 result(0) = other - origin;
│ │ │ +
245 return result;
│ │ │ +
246 }
│ │ │ +
247
│ │ │ +
248 static Scalar Retract(Scalar origin, const TangentVector& v,
│ │ │ +
249 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
│ │ │ +
250 if (H1) (*H1)[0] = 1.0;
│ │ │ +
251 if (H2) (*H2)[0] = 1.0;
│ │ │ +
252 return origin + v[0];
│ │ │ +
253 }
│ │ │ +
255
│ │ │ +
258 static TangentVector Logmap(Scalar m, ChartJacobian H = boost::none) {
│ │ │ +
259 if (H) (*H)[0] = 1.0;
│ │ │ +
260 return Local(0, m);
│ │ │ +
261 }
│ │ │ +
262
│ │ │ +
263 static Scalar Expmap(const TangentVector& v, ChartJacobian H = boost::none) {
│ │ │ +
264 if (H) (*H)[0] = 1.0;
│ │ │ +
265 return v[0];
│ │ │ +
266 }
│ │ │ +
268
│ │ │ +
269};
│ │ │ +
│ │ │ +
270
│ │ │ +
271} // namespace internal
│ │ │ +
272
│ │ │ +
│ │ │ +
274template<> struct traits<double> : public internal::ScalarTraits<double> {
│ │ │ +
275};
│ │ │ +
│ │ │ +
276
│ │ │ +
│ │ │ +
278template<> struct traits<float> : public internal::ScalarTraits<float> {
│ │ │ +
279};
│ │ │ +
│ │ │ +
280
│ │ │ +
281// traits for any fixed double Eigen matrix
│ │ │ +
282template<int M, int N, int Options, int MaxRows, int MaxCols>
│ │ │ +
│ │ │ +
283struct traits<Eigen::Matrix<double, M, N, Options, MaxRows, MaxCols> > :
│ │ │ + │ │ │ +
285 Eigen::Matrix<double, M, N, Options, MaxRows, MaxCols>, M * N> {
│ │ │ +
286
│ │ │ + │ │ │ +
288 typedef Eigen::Matrix<double, M, N, Options, MaxRows, MaxCols> Fixed;
│ │ │ +
289
│ │ │ +
292 static void Print(const Fixed& m, const std::string& str = "") {
│ │ │ +
293 gtsam::print(Eigen::MatrixXd(m), str);
│ │ │ +
294 }
│ │ │ +
295 static bool Equals(const Fixed& v1, const Fixed& v2, double tol = 1e-8) {
│ │ │ +
296 return equal_with_abs_tol(v1, v2, tol);
│ │ │ +
297 }
│ │ │
299
│ │ │ -
303template<class V>
│ │ │ -
│ │ │ -
304bool assert_container_equality(const V& expected, const V& actual) {
│ │ │ -
305 bool match = true;
│ │ │ -
306 if (expected.size() != actual.size())
│ │ │ -
307 match = false;
│ │ │ -
308 typename V::const_iterator
│ │ │ -
309 itExp = expected.begin(),
│ │ │ -
310 itAct = actual.begin();
│ │ │ -
311 if(match) {
│ │ │ -
312 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) {
│ │ │ -
313 if (*itExp != *itAct) {
│ │ │ -
314 match = false;
│ │ │ -
315 break;
│ │ │ -
316 }
│ │ │ -
317 }
│ │ │ -
318 }
│ │ │ -
319 if(!match) {
│ │ │ -
320 std::cout << "expected: " << std::endl;
│ │ │ -
321 for(const typename V::value_type& a: expected) { std::cout << a << " "; }
│ │ │ -
322 std::cout << "\nactual: " << std::endl;
│ │ │ -
323 for(const typename V::value_type& a: actual) { std::cout << a << " "; }
│ │ │ -
324 std::cout << std::endl;
│ │ │ -
325 return false;
│ │ │ -
326 }
│ │ │ -
327 return true;
│ │ │ -
328}
│ │ │ -
│ │ │ -
329
│ │ │ -
│ │ │ -
333inline bool assert_equal(const std::string& expected, const std::string& actual) {
│ │ │ -
334 if (expected == actual)
│ │ │ -
335 return true;
│ │ │ -
336 printf("Not equal:\n");
│ │ │ -
337 std::cout << "expected: [" << expected << "]\n";
│ │ │ -
338 std::cout << "actual: [" << actual << "]" << std::endl;
│ │ │ -
339 return false;
│ │ │ -
340}
│ │ │ -
│ │ │ -
341
│ │ │ -
345template<class V>
│ │ │ -
│ │ │ -
346bool assert_inequal(const V& expected, const V& actual, double tol = 1e-9) {
│ │ │ -
347 if (!actual.equals(expected, tol))
│ │ │ -
348 return true;
│ │ │ -
349 printf("Erroneously equal:\n");
│ │ │ -
350 expected.print("expected");
│ │ │ -
351 actual.print("actual");
│ │ │ -
352 return false;
│ │ │ -
353}
│ │ │ -
│ │ │ -
354
│ │ │ -
358template<class V>
│ │ │ -
│ │ │ -
359bool assert_stdout_equal(const std::string& expected, const V& actual) {
│ │ │ -
360 // Redirect output to buffer so we can compare
│ │ │ -
361 std::stringstream buffer;
│ │ │ -
362 // Save the original output stream so we can reset later
│ │ │ -
363 std::streambuf* old = std::cout.rdbuf(buffer.rdbuf());
│ │ │ -
364
│ │ │ -
365 // We test against actual std::cout for faithful reproduction
│ │ │ -
366 std::cout << actual;
│ │ │ -
367
│ │ │ -
368 // Get output string and reset stdout
│ │ │ -
369 std::string actual_ = buffer.str();
│ │ │ -
370 std::cout.rdbuf(old);
│ │ │ -
371
│ │ │ -
372 return assert_equal(expected, actual_);
│ │ │ -
373}
│ │ │ -
│ │ │ -
374
│ │ │ -
380template <class V>
│ │ │ -
│ │ │ -
381bool assert_print_equal(const std::string& expected, const V& actual,
│ │ │ -
382 const std::string& s = "") {
│ │ │ -
383 // Redirect output to buffer so we can compare
│ │ │ -
384 std::stringstream buffer;
│ │ │ -
385 // Save the original output stream so we can reset later
│ │ │ -
386 std::streambuf* old = std::cout.rdbuf(buffer.rdbuf());
│ │ │ -
387
│ │ │ -
388 // We test against actual std::cout for faithful reproduction
│ │ │ -
389 actual.print(s);
│ │ │ -
390
│ │ │ -
391 // Get output string and reset stdout
│ │ │ -
392 std::string actual_ = buffer.str();
│ │ │ -
393 std::cout.rdbuf(old);
│ │ │ + │ │ │ +
303 static Fixed Identity() { return Fixed::Zero();}
│ │ │ +
305
│ │ │ +
308 enum { dimension = M*N};
│ │ │ +
309 typedef Fixed ManifoldType;
│ │ │ +
310 typedef Eigen::Matrix<double, dimension, 1> TangentVector;
│ │ │ +
311 typedef Eigen::Matrix<double, dimension, dimension> Jacobian;
│ │ │ + │ │ │ +
313
│ │ │ +
314 static TangentVector Local(const Fixed& origin, const Fixed& other,
│ │ │ +
315 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
│ │ │ +
316 if (H1) (*H1) = -Jacobian::Identity();
│ │ │ +
317 if (H2) (*H2) = Jacobian::Identity();
│ │ │ +
318 TangentVector result;
│ │ │ +
319 Eigen::Map<Fixed>(result.data()) = other - origin;
│ │ │ +
320 return result;
│ │ │ +
321 }
│ │ │ +
322
│ │ │ +
323 static Fixed Retract(const Fixed& origin, const TangentVector& v,
│ │ │ +
324 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
│ │ │ +
325 if (H1) (*H1) = Jacobian::Identity();
│ │ │ +
326 if (H2) (*H2) = Jacobian::Identity();
│ │ │ +
327 return origin + Eigen::Map<const Fixed>(v.data());
│ │ │ +
328 }
│ │ │ +
330
│ │ │ +
333 static TangentVector Logmap(const Fixed& m, ChartJacobian H = boost::none) {
│ │ │ +
334 if (H) *H = Jacobian::Identity();
│ │ │ +
335 TangentVector result;
│ │ │ +
336 Eigen::Map<Fixed>(result.data()) = m;
│ │ │ +
337 return result;
│ │ │ +
338 }
│ │ │ +
339
│ │ │ +
340 static Fixed Expmap(const TangentVector& v, ChartJacobian H = boost::none) {
│ │ │ +
341 Fixed m;
│ │ │ +
342 m.setZero();
│ │ │ +
343 if (H) *H = Jacobian::Identity();
│ │ │ +
344 return m + Eigen::Map<const Fixed>(v.data());
│ │ │ +
345 }
│ │ │ +
347};
│ │ │ +
│ │ │ +
348
│ │ │ +
349
│ │ │ +
350namespace internal {
│ │ │ +
351
│ │ │ +
352// traits for dynamic Eigen matrices
│ │ │ +
353template<int M, int N, int Options, int MaxRows, int MaxCols>
│ │ │ +
│ │ │ + │ │ │ +
355
│ │ │ + │ │ │ +
357 typedef Eigen::Matrix<double, M, N, Options, MaxRows, MaxCols> Dynamic;
│ │ │ +
358
│ │ │ +
361 static void Print(const Dynamic& m, const std::string& str = "") {
│ │ │ +
362 gtsam::print(Eigen::MatrixXd(m), str);
│ │ │ +
363 }
│ │ │ +
364 static bool Equals(const Dynamic& v1, const Dynamic& v2,
│ │ │ +
365 double tol = 1e-8) {
│ │ │ +
366 return equal_with_abs_tol(v1, v2, tol);
│ │ │ +
367 }
│ │ │ +
369
│ │ │ + │ │ │ +
373 static Dynamic Identity() {
│ │ │ +
374 throw std::runtime_error("Identity not defined for dynamic types");
│ │ │ +
375 }
│ │ │ +
377
│ │ │ +
380 enum { dimension = Eigen::Dynamic };
│ │ │ +
381 typedef Eigen::VectorXd TangentVector;
│ │ │ +
382 typedef Eigen::MatrixXd Jacobian;
│ │ │ +
383 typedef OptionalJacobian<dimension, dimension> ChartJacobian;
│ │ │ +
384 typedef Dynamic ManifoldType;
│ │ │ +
385
│ │ │ +
386 static int GetDimension(const Dynamic& m) {
│ │ │ +
387 return m.rows() * m.cols();
│ │ │ +
388 }
│ │ │ +
389
│ │ │ +
390 static Jacobian Eye(const Dynamic& m) {
│ │ │ +
391 int dim = GetDimension(m);
│ │ │ +
392 return Eigen::Matrix<double, dimension, dimension>::Identity(dim, dim);
│ │ │ +
393 }
│ │ │
394
│ │ │ -
395 return assert_equal(expected, actual_);
│ │ │ -
396}
│ │ │ -
│ │ │ -
397
│ │ │ -
398} // \namespace gtsam
│ │ │ -
Concept check for values that can be used in unit tests.
│ │ │ -
Included from all GTSAM files.
│ │ │ +
395 static TangentVector Local(const Dynamic& m, const Dynamic& other, //
│ │ │ +
396 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
│ │ │ +
397 if (H1) *H1 = -Eye(m);
│ │ │ +
398 if (H2) *H2 = Eye(m);
│ │ │ +
399 TangentVector v(GetDimension(m));
│ │ │ +
400 Eigen::Map<Dynamic>(v.data(), m.rows(), m.cols()) = other - m;
│ │ │ +
401 return v;
│ │ │ +
402 }
│ │ │ +
403
│ │ │ +
404 static Dynamic Retract(const Dynamic& m, const TangentVector& v, //
│ │ │ +
405 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
│ │ │ +
406 if (H1) *H1 = Eye(m);
│ │ │ +
407 if (H2) *H2 = Eye(m);
│ │ │ +
408 return m + Eigen::Map<const Dynamic>(v.data(), m.rows(), m.cols());
│ │ │ +
409 }
│ │ │ +
411
│ │ │ +
414 static TangentVector Logmap(const Dynamic& m, ChartJacobian H = boost::none) {
│ │ │ +
415 if (H) *H = Eye(m);
│ │ │ +
416 TangentVector result(GetDimension(m));
│ │ │ +
417 Eigen::Map<Dynamic>(result.data(), m.cols(), m.rows()) = m;
│ │ │ +
418 return result;
│ │ │ +
419 }
│ │ │ +
420
│ │ │ +
421 static Dynamic Expmap(const TangentVector& /*v*/, ChartJacobian H = boost::none) {
│ │ │ +
422 static_cast<void>(H);
│ │ │ +
423 throw std::runtime_error("Expmap not defined for dynamic types");
│ │ │ +
424 }
│ │ │ +
425
│ │ │ +
426 static Dynamic Inverse(const Dynamic& m, ChartJacobian H = boost::none) {
│ │ │ +
427 if (H) *H = -Eye(m);
│ │ │ +
428 return -m;
│ │ │ +
429 }
│ │ │ +
430
│ │ │ +
431 static Dynamic Compose(const Dynamic& v1, const Dynamic& v2,
│ │ │ +
432 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
│ │ │ +
433 if (H1) *H1 = Eye(v1);
│ │ │ +
434 if (H2) *H2 = Eye(v1);
│ │ │ +
435 return v1 + v2;
│ │ │ +
436 }
│ │ │ +
437
│ │ │ +
438 static Dynamic Between(const Dynamic& v1, const Dynamic& v2,
│ │ │ +
439 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
│ │ │ +
440 if (H1) *H1 = -Eye(v1);
│ │ │ +
441 if (H2) *H2 = Eye(v1);
│ │ │ +
442 return v2 - v1;
│ │ │ +
443 }
│ │ │ +
445
│ │ │ +
446};
│ │ │ +
│ │ │ +
447
│ │ │ +
448} // \ internal
│ │ │ +
449
│ │ │ +
450// traits for fully dynamic matrix
│ │ │ +
451template<int Options, int MaxRows, int MaxCols>
│ │ │ +
│ │ │ +
452struct traits<Eigen::Matrix<double, -1, -1, Options, MaxRows, MaxCols> > :
│ │ │ +
453 public internal::DynamicTraits<-1, -1, Options, MaxRows, MaxCols> {
│ │ │ +
454};
│ │ │ +
│ │ │ +
455
│ │ │ +
456// traits for dynamic column vector
│ │ │ +
457template<int Options, int MaxRows, int MaxCols>
│ │ │ +
│ │ │ +
458struct traits<Eigen::Matrix<double, -1, 1, Options, MaxRows, MaxCols> > :
│ │ │ +
459 public internal::DynamicTraits<-1, 1, Options, MaxRows, MaxCols> {
│ │ │ +
460};
│ │ │ +
│ │ │ +
461
│ │ │ +
462// traits for dynamic row vector
│ │ │ +
463template<int Options, int MaxRows, int MaxCols>
│ │ │ +
│ │ │ +
464struct traits<Eigen::Matrix<double, 1, -1, Options, MaxRows, MaxCols> > :
│ │ │ +
465 public internal::DynamicTraits<1, -1, Options, MaxRows, MaxCols> {
│ │ │ +
466};
│ │ │ +
│ │ │ +
467
│ │ │ +
469template<typename T>
│ │ │ +
│ │ │ +
470class IsVectorSpace: public IsLieGroup<T> {
│ │ │ +
471public:
│ │ │ +
472
│ │ │ +
473 typedef typename traits<T>::structure_category structure_category_tag;
│ │ │ +
474
│ │ │ +
475 BOOST_CONCEPT_USAGE(IsVectorSpace) {
│ │ │ +
476 BOOST_STATIC_ASSERT_MSG(
│ │ │ +
477 (boost::is_base_of<vector_space_tag, structure_category_tag>::value),
│ │ │ +
478 "This type's trait does not assert it as a vector space (or derived)");
│ │ │ +
479 r = p + q;
│ │ │ +
480 r = -p;
│ │ │ +
481 r = p - q;
│ │ │ +
482 }
│ │ │ +
483
│ │ │ +
484private:
│ │ │ +
485 T p, q, r;
│ │ │ +
486};
│ │ │ +
│ │ │ +
487
│ │ │ +
488} // namespace gtsam
│ │ │ +
489
│ │ │ +
Base class and basic functions for Lie types.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
bool assert_stdout_equal(const std::string &expected, const V &actual)
Capture std out via cout stream and compare against string.
Definition TestableAssertions.h:359
│ │ │ -
bool assert_container_equal(const std::map< V1, V2 > &expected, const std::map< V1, V2 > &actual, double tol=1e-9)
Function for comparing maps of testable->testable TODO: replace with more generalized version.
Definition TestableAssertions.h:119
│ │ │ -
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
equals with an tolerance, prints out message if unequal
Definition Matrix.cpp:43
│ │ │ -
bool assert_container_equality(const std::map< size_t, V2 > &expected, const std::map< size_t, V2 > &actual)
Function for comparing maps of size_t->testable Types are assumed to have operator ==.
Definition TestableAssertions.h:266
│ │ │ -
bool assert_inequal(const Matrix &A, const Matrix &B, double tol)
inequals with an tolerance, prints out message if within tolerance
Definition Matrix.cpp:63
│ │ │ -
bool assert_print_equal(const std::string &expected, const V &actual, const std::string &s="")
Capture print function output and compare against string.
Definition TestableAssertions.h:381
│ │ │ -
std::uint64_t Key
Integer nonlinear key type.
Definition types.h:100
│ │ │ +
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:156
│ │ │ +
bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen::DenseBase< MATRIX > &B, double tol=1e-9)
equals with a tolerance
Definition Matrix.h:81
│ │ │ +
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ +
Definition Group.h:38
│ │ │ +
tag to assert a type is a Lie group
Definition Lie.h:164
│ │ │ +
Lie Group Concept.
Definition Lie.h:260
│ │ │ +
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:41
│ │ │ +
OptionalJacobian< Rows, N > cols(int startCol)
Access M*N sub-block if we are allocated, otherwise none TODO(frank): this could work as is below if ...
Definition OptionalJacobian.h:171
│ │ │ + │ │ │ +
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:151
│ │ │ +
tag to assert a type is a vector space
Definition VectorSpace.h:16
│ │ │ +
VectorSpaceTraits Implementation for Fixed sizes.
Definition VectorSpace.h:25
│ │ │ +
Requirements on type to pass it to Manifold template below.
Definition VectorSpace.h:164
│ │ │ +
A helper that implements the traits interface for classes that define vector spaces To use this for y...
Definition VectorSpace.h:185
│ │ │ +
VectorSpace provides both Testable and VectorSpaceTraits.
Definition VectorSpace.h:207
│ │ │ +
A helper that implements the traits interface for scalar vector spaces.
Definition VectorSpace.h:212
│ │ │ +
Definition VectorSpace.h:354
│ │ │ +
Vector Space concept.
Definition VectorSpace.h:470
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,407 +1,503 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -TestableAssertions.h │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1/* --------------------------------------------------------------------------- │ │ │ │ -- │ │ │ │ -2 │ │ │ │ -3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ -4 * Atlanta, Georgia 30332-0415 │ │ │ │ -5 * All Rights Reserved │ │ │ │ -6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ -7 │ │ │ │ -8 * See LICENSE for the license information │ │ │ │ -9 │ │ │ │ -10 * ------------------------------------------------------------------------- │ │ │ │ -- */ │ │ │ │ -11 │ │ │ │ -18#pragma once │ │ │ │ -19 │ │ │ │ -20#include <_g_t_s_a_m_/_b_a_s_e_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ -21#include <_g_t_s_a_m_/_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h> │ │ │ │ +VectorSpace.h │ │ │ │ +1/* │ │ │ │ +2 * VectorSpace.h │ │ │ │ +3 * │ │ │ │ +4 * @date December 21, 2014 │ │ │ │ +5 * @author Mike Bosse │ │ │ │ +6 * @author Frank Dellaert │ │ │ │ +7 */ │ │ │ │ +8 │ │ │ │ +9#pragma once │ │ │ │ +10 │ │ │ │ +11#include <_g_t_s_a_m_/_b_a_s_e_/_L_i_e_._h> │ │ │ │ +12 │ │ │ │ +13namespace _g_t_s_a_m { │ │ │ │ +14 │ │ │ │ +_1_6struct _v_e_c_t_o_r___s_p_a_c_e___t_a_g: public _l_i_e___g_r_o_u_p___t_a_g { │ │ │ │ +17}; │ │ │ │ +18 │ │ │ │ +19template struct _t_r_a_i_t_s; │ │ │ │ +20 │ │ │ │ +21namespace internal { │ │ │ │ 22 │ │ │ │ -23#include │ │ │ │ -24#include │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27#include │ │ │ │ -28 │ │ │ │ -29namespace _g_t_s_a_m { │ │ │ │ -30 │ │ │ │ -_3_4inline bool _a_s_s_e_r_t___e_q_u_a_l(const _K_e_y& expected, const _K_e_y& actual, double tol = │ │ │ │ -0.0) { │ │ │ │ -35 if(expected != actual) { │ │ │ │ -36 std::cout << "Not equal:\nexpected: " << expected << "\nactual: " << actual │ │ │ │ -<< std::endl; │ │ │ │ -37 return false; │ │ │ │ -38 } │ │ │ │ -39 return true; │ │ │ │ -40} │ │ │ │ +24template │ │ │ │ +_2_5struct _V_e_c_t_o_r_S_p_a_c_e_I_m_p_l { │ │ │ │ +26 │ │ │ │ +29 typedef Eigen::Matrix TangentVector; │ │ │ │ +30 typedef _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_N_,_ _N_> ChartJacobian; │ │ │ │ +31 typedef Eigen::Matrix Jacobian; │ │ │ │ +32 static int GetDimension(const Class&) { return N;} │ │ │ │ +33 │ │ │ │ +34 static TangentVector Local(const Class& origin, const Class& other, │ │ │ │ +35 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) { │ │ │ │ +36 if (H1) *H1 = - Jacobian::Identity(); │ │ │ │ +37 if (H2) *H2 = Jacobian::Identity(); │ │ │ │ +38 Class v = other-origin; │ │ │ │ +39 return v.vector(); │ │ │ │ +40 } │ │ │ │ 41 │ │ │ │ -49template │ │ │ │ -_5_0bool _a_s_s_e_r_t___e_q_u_a_l(const boost::optional& expected, │ │ │ │ -51 const boost::optional& actual, double tol = 1e-9) { │ │ │ │ -52 if (!expected && actual) { │ │ │ │ -53 std::cout << "expected is boost::none, while actual is not" << std::endl; │ │ │ │ -54 return false; │ │ │ │ -55 } │ │ │ │ -56 if (expected && !actual) { │ │ │ │ -57 std::cout << "actual is boost::none, while expected is not" << std::endl; │ │ │ │ -58 return false; │ │ │ │ -59 } │ │ │ │ -60 if (!expected && !actual) │ │ │ │ -61 return true; │ │ │ │ -62 return _a_s_s_e_r_t___e_q_u_a_l(*expected, *actual, tol); │ │ │ │ -63} │ │ │ │ -64 │ │ │ │ -65template │ │ │ │ -66bool _a_s_s_e_r_t___e_q_u_a_l(const V& expected, const boost::optional& actual, double │ │ │ │ -tol = 1e-9) { │ │ │ │ -67 if (!actual) { │ │ │ │ -68 std::cout << "actual is boost::none" << std::endl; │ │ │ │ -69 return false; │ │ │ │ -70 } │ │ │ │ -71 return _a_s_s_e_r_t___e_q_u_a_l(expected, *actual, tol); │ │ │ │ -72} │ │ │ │ -73 │ │ │ │ -74template │ │ │ │ -75bool _a_s_s_e_r_t___e_q_u_a_l(const V& expected, const boost::optional& actual, │ │ │ │ -double tol = 1e-9) { │ │ │ │ -76 if (!actual) { │ │ │ │ -77 std::cout << "actual is boost::none" << std::endl; │ │ │ │ -78 return false; │ │ │ │ -79 } │ │ │ │ -80 return _a_s_s_e_r_t___e_q_u_a_l(expected, *actual, tol); │ │ │ │ -81} │ │ │ │ +42 static Class Retract(const Class& origin, const TangentVector& v, │ │ │ │ +43 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) { │ │ │ │ +44 if (H1) *H1 = Jacobian::Identity(); │ │ │ │ +45 if (H2) *H2 = Jacobian::Identity(); │ │ │ │ +46 return origin + v; │ │ │ │ +47 } │ │ │ │ +48 │ │ │ │ +50 │ │ │ │ +53 │ │ │ │ +54 static TangentVector Logmap(const Class& m, ChartJacobian Hm = boost::none) │ │ │ │ +{ │ │ │ │ +55 if (Hm) *Hm = Jacobian::Identity(); │ │ │ │ +56 return m.vector(); │ │ │ │ +57 } │ │ │ │ +58 │ │ │ │ +59 static Class Expmap(const TangentVector& v, ChartJacobian Hv = boost::none) │ │ │ │ +{ │ │ │ │ +60 if (Hv) *Hv = Jacobian::Identity(); │ │ │ │ +61 return Class(v); │ │ │ │ +62 } │ │ │ │ +63 │ │ │ │ +64 static Class Compose(const Class& v1, const Class& v2, ChartJacobian H1 = │ │ │ │ +boost::none, │ │ │ │ +65 ChartJacobian H2 = boost::none) { │ │ │ │ +66 if (H1) *H1 = Jacobian::Identity(); │ │ │ │ +67 if (H2) *H2 = Jacobian::Identity(); │ │ │ │ +68 return v1 + v2; │ │ │ │ +69 } │ │ │ │ +70 │ │ │ │ +71 static Class Between(const Class& v1, const Class& v2, ChartJacobian H1 = │ │ │ │ +boost::none, │ │ │ │ +72 ChartJacobian H2 = boost::none) { │ │ │ │ +73 if (H1) *H1 = - Jacobian::Identity(); │ │ │ │ +74 if (H2) *H2 = Jacobian::Identity(); │ │ │ │ +75 return v2 - v1; │ │ │ │ +76 } │ │ │ │ +77 │ │ │ │ +78 static Class Inverse(const Class& v, ChartJacobian H = boost::none) { │ │ │ │ +79 if (H) *H = - Jacobian::Identity(); │ │ │ │ +80 return -v; │ │ │ │ +81 } │ │ │ │ 82 │ │ │ │ -83#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42 │ │ │ │ -88template │ │ │ │ -89bool GTSAM_DEPRECATED _a_s_s_e_r_t___e_q_u_a_l(const std::vector& expected, const │ │ │ │ -std::vector& actual, double tol = 1e-9) { │ │ │ │ -90 bool match = true; │ │ │ │ -91 if (expected.size() != actual.size()) │ │ │ │ -92 match = false; │ │ │ │ -93 if(match) { │ │ │ │ -94 size_t i = 0; │ │ │ │ -95 for(const V& a: expected) { │ │ │ │ -96 if (!_a_s_s_e_r_t___e_q_u_a_l(a, actual[i++], tol)) { │ │ │ │ -97 match = false; │ │ │ │ -98 break; │ │ │ │ -99 } │ │ │ │ -100 } │ │ │ │ -101 } │ │ │ │ -102 if(!match) { │ │ │ │ -103 std::cout << "expected: " << std::endl; │ │ │ │ -104 for(const V& a: expected) { std::cout << a << " "; } │ │ │ │ -105 std::cout << "\nactual: " << std::endl; │ │ │ │ -106 for(const V& a: actual) { std::cout << a << " "; } │ │ │ │ -107 std::cout << std::endl; │ │ │ │ -108 return false; │ │ │ │ -109 } │ │ │ │ -110 return true; │ │ │ │ -111} │ │ │ │ -112#endif │ │ │ │ -113 │ │ │ │ -118template │ │ │ │ -_1_1_9bool _a_s_s_e_r_t___c_o_n_t_a_i_n_e_r___e_q_u_a_l(const std::map& expected, const std:: │ │ │ │ -map& actual, double tol = 1e-9) { │ │ │ │ -120 typedef typename std::map Map; │ │ │ │ -121 bool match = true; │ │ │ │ -122 if (expected.size() != actual.size()) │ │ │ │ -123 match = false; │ │ │ │ -124 typename Map::const_iterator │ │ │ │ -125 itExp = expected.begin(), │ │ │ │ -126 itAct = actual.begin(); │ │ │ │ -127 if(match) { │ │ │ │ -128 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) { │ │ │ │ -129 if (!_a_s_s_e_r_t___e_q_u_a_l(itExp->first, itAct->first, tol) || │ │ │ │ -130 !_a_s_s_e_r_t___e_q_u_a_l(itExp->second, itAct->second, tol)) { │ │ │ │ -131 match = false; │ │ │ │ -132 break; │ │ │ │ -133 } │ │ │ │ -134 } │ │ │ │ -135 } │ │ │ │ -136 if(!match) { │ │ │ │ -137 std::cout << "expected: " << std::endl; │ │ │ │ -138 for(const typename Map::value_type& a: expected) { │ │ │ │ -139 a.first.print("key"); │ │ │ │ -140 a.second.print(" value"); │ │ │ │ -141 } │ │ │ │ -142 std::cout << "\nactual: " << std::endl; │ │ │ │ -143 for(const typename Map::value_type& a: actual) { │ │ │ │ -144 a.first.print("key"); │ │ │ │ -145 a.second.print(" value"); │ │ │ │ -146 } │ │ │ │ -147 std::cout << std::endl; │ │ │ │ -148 return false; │ │ │ │ -149 } │ │ │ │ -150 return true; │ │ │ │ -151} │ │ │ │ -152 │ │ │ │ -156template │ │ │ │ -_1_5_7bool _a_s_s_e_r_t___c_o_n_t_a_i_n_e_r___e_q_u_a_l(const std::map& expected, const std:: │ │ │ │ -map& actual, double tol = 1e-9) { │ │ │ │ -158 typedef typename std::map Map; │ │ │ │ -159 bool match = true; │ │ │ │ -160 if (expected.size() != actual.size()) │ │ │ │ -161 match = false; │ │ │ │ -162 typename Map::const_iterator │ │ │ │ -163 itExp = expected.begin(), │ │ │ │ -164 itAct = actual.begin(); │ │ │ │ -165 if(match) { │ │ │ │ -166 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) { │ │ │ │ -167 if (itExp->first != itAct->first || │ │ │ │ -168 !_a_s_s_e_r_t___e_q_u_a_l(itExp->second, itAct->second, tol)) { │ │ │ │ -169 match = false; │ │ │ │ -170 break; │ │ │ │ -171 } │ │ │ │ -172 } │ │ │ │ -173 } │ │ │ │ -174 if(!match) { │ │ │ │ -175 std::cout << "expected: " << std::endl; │ │ │ │ -176 for(const typename Map::value_type& a: expected) { │ │ │ │ -177 std::cout << "Key: " << a.first << std::endl; │ │ │ │ -178 a.second.print(" value"); │ │ │ │ -179 } │ │ │ │ -180 std::cout << "\nactual: " << std::endl; │ │ │ │ -181 for(const typename Map::value_type& a: actual) { │ │ │ │ -182 std::cout << "Key: " << a.first << std::endl; │ │ │ │ -183 a.second.print(" value"); │ │ │ │ -184 } │ │ │ │ -185 std::cout << std::endl; │ │ │ │ -186 return false; │ │ │ │ -187 } │ │ │ │ -188 return true; │ │ │ │ -189} │ │ │ │ -190 │ │ │ │ -194template │ │ │ │ -_1_9_5bool _a_s_s_e_r_t___c_o_n_t_a_i_n_e_r___e_q_u_a_l(const std::vector >& expected, │ │ │ │ -196 const std::vector >& actual, double tol = 1e-9) { │ │ │ │ -197 typedef typename std::vector > VectorPair; │ │ │ │ -198 bool match = true; │ │ │ │ -199 if (expected.size() != actual.size()) │ │ │ │ -200 match = false; │ │ │ │ -201 typename VectorPair::const_iterator │ │ │ │ -202 itExp = expected.begin(), │ │ │ │ -203 itAct = actual.begin(); │ │ │ │ -204 if(match) { │ │ │ │ -205 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) { │ │ │ │ -206 if (!_a_s_s_e_r_t___e_q_u_a_l(itExp->first, itAct->first, tol) || │ │ │ │ -207 !_a_s_s_e_r_t___e_q_u_a_l(itExp->second, itAct->second, tol)) { │ │ │ │ -208 match = false; │ │ │ │ -209 break; │ │ │ │ -210 } │ │ │ │ -211 } │ │ │ │ -212 } │ │ │ │ -213 if(!match) { │ │ │ │ -214 std::cout << "expected: " << std::endl; │ │ │ │ -215 for(const typename VectorPair::value_type& a: expected) { │ │ │ │ -216 a.first.print( " first "); │ │ │ │ -217 a.second.print(" second"); │ │ │ │ -218 } │ │ │ │ -219 std::cout << "\nactual: " << std::endl; │ │ │ │ -220 for(const typename VectorPair::value_type& a: actual) { │ │ │ │ -221 a.first.print( " first "); │ │ │ │ -222 a.second.print(" second"); │ │ │ │ +84}; │ │ │ │ +85 │ │ │ │ +87template │ │ │ │ +_8_8struct _V_e_c_t_o_r_S_p_a_c_e_I_m_p_l { │ │ │ │ +89 │ │ │ │ +92 static Class Compose(const Class& v1, const Class& v2) { return v1+v2;} │ │ │ │ +93 static Class Between(const Class& v1, const Class& v2) { return v2-v1;} │ │ │ │ +94 static Class Inverse(const Class& m) { return -m;} │ │ │ │ +96 │ │ │ │ +99 typedef Eigen::VectorXd TangentVector; │ │ │ │ +100 typedef _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_E_i_g_e_n_:_:_D_y_n_a_m_i_c_,_E_i_g_e_n_:_:_D_y_n_a_m_i_c_> _C_h_a_r_t_J_a_c_o_b_i_a_n; │ │ │ │ +101 static int GetDimension(const Class& m) { return m.dim();} │ │ │ │ +102 │ │ │ │ +103 static Eigen::MatrixXd Eye(const Class& m) { │ │ │ │ +104 int dim = GetDimension(m); │ │ │ │ +105 return Eigen::MatrixXd::Identity(dim, dim); │ │ │ │ +106 } │ │ │ │ +107 │ │ │ │ +108 static TangentVector Local(const Class& origin, const Class& other, │ │ │ │ +109 _C_h_a_r_t_J_a_c_o_b_i_a_n H1 = boost::none, _C_h_a_r_t_J_a_c_o_b_i_a_n H2 = boost::none) { │ │ │ │ +110 if (H1) *H1 = - Eye(origin); │ │ │ │ +111 if (H2) *H2 = Eye(other); │ │ │ │ +112 Class v = other-origin; │ │ │ │ +113 return v.vector(); │ │ │ │ +114 } │ │ │ │ +115 │ │ │ │ +116 static Class Retract(const Class& origin, const TangentVector& v, │ │ │ │ +117 _C_h_a_r_t_J_a_c_o_b_i_a_n H1 = boost::none, _C_h_a_r_t_J_a_c_o_b_i_a_n H2 = boost::none) { │ │ │ │ +118 if (H1) *H1 = Eye(origin); │ │ │ │ +119 if (H2) *H2 = Eye(origin); │ │ │ │ +120 return origin + v; │ │ │ │ +121 } │ │ │ │ +122 │ │ │ │ +124 │ │ │ │ +127 │ │ │ │ +128 static TangentVector Logmap(const Class& m, _C_h_a_r_t_J_a_c_o_b_i_a_n Hm = boost::none) │ │ │ │ +{ │ │ │ │ +129 if (Hm) *Hm = Eye(m); │ │ │ │ +130 return m.vector(); │ │ │ │ +131 } │ │ │ │ +132 │ │ │ │ +133 static Class Expmap(const TangentVector& v, _C_h_a_r_t_J_a_c_o_b_i_a_n Hv = boost::none) │ │ │ │ +{ │ │ │ │ +134 Class result(v); │ │ │ │ +135 if (Hv) │ │ │ │ +136 *Hv = Eye(v); │ │ │ │ +137 return result; │ │ │ │ +138 } │ │ │ │ +139 │ │ │ │ +140 static Class Compose(const Class& v1, const Class& v2, _C_h_a_r_t_J_a_c_o_b_i_a_n H1, │ │ │ │ +141 _C_h_a_r_t_J_a_c_o_b_i_a_n H2 = boost::none) { │ │ │ │ +142 if (H1) *H1 = Eye(v1); │ │ │ │ +143 if (H2) *H2 = Eye(v2); │ │ │ │ +144 return v1 + v2; │ │ │ │ +145 } │ │ │ │ +146 │ │ │ │ +147 static Class Between(const Class& v1, const Class& v2, _C_h_a_r_t_J_a_c_o_b_i_a_n H1, │ │ │ │ +148 _C_h_a_r_t_J_a_c_o_b_i_a_n H2 = boost::none) { │ │ │ │ +149 if (H1) *H1 = - Eye(v1); │ │ │ │ +150 if (H2) *H2 = Eye(v2); │ │ │ │ +151 return v2 - v1; │ │ │ │ +152 } │ │ │ │ +153 │ │ │ │ +154 static Class Inverse(const Class& v, _C_h_a_r_t_J_a_c_o_b_i_a_n H) { │ │ │ │ +155 if (H) *H = -Eye(v); │ │ │ │ +156 return -v; │ │ │ │ +157 } │ │ │ │ +158 │ │ │ │ +160}; │ │ │ │ +161 │ │ │ │ +163template │ │ │ │ +_1_6_4struct _H_a_s_V_e_c_t_o_r_S_p_a_c_e_P_r_e_r_e_q_s { │ │ │ │ +165 │ │ │ │ +166 enum { dim = Class::dimension }; │ │ │ │ +167 │ │ │ │ +168 Class p, q; │ │ │ │ +169 Vector v; │ │ │ │ +170 │ │ │ │ +171 BOOST_CONCEPT_USAGE(_H_a_s_V_e_c_t_o_r_S_p_a_c_e_P_r_e_r_e_q_s) { │ │ │ │ +172 p = Class::Identity(); // identity │ │ │ │ +173 q = p + p; // addition │ │ │ │ +174 q = p - p; // subtraction │ │ │ │ +175 v = p.vector(); // conversion to vector │ │ │ │ +176 q = p + v; // addition of a vector on the right │ │ │ │ +177 } │ │ │ │ +178}; │ │ │ │ +179 │ │ │ │ +184template │ │ │ │ +_1_8_5struct _V_e_c_t_o_r_S_p_a_c_e_T_r_a_i_t_s: _V_e_c_t_o_r_S_p_a_c_e_I_m_p_l { │ │ │ │ +186 │ │ │ │ +187 // Check that Class has the necessary machinery │ │ │ │ +188 BOOST_CONCEPT_ASSERT((_H_a_s_V_e_c_t_o_r_S_p_a_c_e_P_r_e_r_e_q_s_<_C_l_a_s_s_>)); │ │ │ │ +189 │ │ │ │ +190 typedef _v_e_c_t_o_r___s_p_a_c_e___t_a_g _s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y; │ │ │ │ +191 │ │ │ │ +194 typedef _a_d_d_i_t_i_v_e___g_r_o_u_p___t_a_g _g_r_o_u_p___f_l_a_v_o_r; │ │ │ │ +195 static Class Identity() { return Class::Identity();} │ │ │ │ +197 │ │ │ │ +200 enum { dimension = Class::dimension}; │ │ │ │ +201 typedef Class ManifoldType; │ │ │ │ +203}; │ │ │ │ +204 │ │ │ │ +206template │ │ │ │ +_2_0_7struct _V_e_c_t_o_r_S_p_a_c_e: _T_e_s_t_a_b_l_e, _V_e_c_t_o_r_S_p_a_c_e_T_r_a_i_t_s {}; │ │ │ │ +208 │ │ │ │ +211template │ │ │ │ +_2_1_2struct _S_c_a_l_a_r_T_r_a_i_t_s : _V_e_c_t_o_r_S_p_a_c_e_I_m_p_l { │ │ │ │ +213 │ │ │ │ +214 typedef _v_e_c_t_o_r___s_p_a_c_e___t_a_g _s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y; │ │ │ │ +215 │ │ │ │ +218 static void Print(Scalar m, const std::string& str = "") { │ │ │ │ +219 _g_t_s_a_m_:_:_p_r_i_n_t(m, str); │ │ │ │ +220 } │ │ │ │ +221 static bool Equals(Scalar v1, Scalar v2, double tol = 1e-8) { │ │ │ │ +222 return std::abs(v1 - v2) < tol; │ │ │ │ 223 } │ │ │ │ -224 std::cout << std::endl; │ │ │ │ -225 return false; │ │ │ │ -226 } │ │ │ │ -227 return true; │ │ │ │ -228} │ │ │ │ -229 │ │ │ │ -230 │ │ │ │ -234template │ │ │ │ -_2_3_5bool _a_s_s_e_r_t___c_o_n_t_a_i_n_e_r___e_q_u_a_l(const V& expected, const V& actual, double tol = │ │ │ │ -1e-9) { │ │ │ │ -236 bool match = true; │ │ │ │ -237 typename V::const_iterator │ │ │ │ -238 itExp = expected.begin(), │ │ │ │ -239 itAct = actual.begin(); │ │ │ │ -240 if(match) { │ │ │ │ -241 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) { │ │ │ │ -242 if (!_a_s_s_e_r_t___e_q_u_a_l(*itExp, *itAct, tol)) { │ │ │ │ -243 match = false; │ │ │ │ -244 break; │ │ │ │ -245 } │ │ │ │ +225 │ │ │ │ +228 typedef _a_d_d_i_t_i_v_e___g_r_o_u_p___t_a_g _g_r_o_u_p___f_l_a_v_o_r; │ │ │ │ +229 static Scalar Identity() { return 0;} │ │ │ │ +231 │ │ │ │ +234 typedef Scalar ManifoldType; │ │ │ │ +235 enum { dimension = 1 }; │ │ │ │ +236 typedef Eigen::Matrix TangentVector; │ │ │ │ +237 typedef _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _1_> ChartJacobian; │ │ │ │ +238 │ │ │ │ +239 static TangentVector Local(Scalar origin, Scalar other, │ │ │ │ +240 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) { │ │ │ │ +241 if (H1) (*H1)[0] = -1.0; │ │ │ │ +242 if (H2) (*H2)[0] = 1.0; │ │ │ │ +243 TangentVector result; │ │ │ │ +244 result(0) = other - origin; │ │ │ │ +245 return result; │ │ │ │ 246 } │ │ │ │ -247 if(itExp != expected.end() || itAct != actual.end()) │ │ │ │ -248 match = false; │ │ │ │ -249 } │ │ │ │ -250 if(!match) { │ │ │ │ -251 std::cout << "expected: " << std::endl; │ │ │ │ -252 for(const typename V::value_type& a: expected) { a.print(" "); } │ │ │ │ -253 std::cout << "\nactual: " << std::endl; │ │ │ │ -254 for(const typename V::value_type& a: actual) { a.print(" "); } │ │ │ │ -255 std::cout << std::endl; │ │ │ │ -256 return false; │ │ │ │ -257 } │ │ │ │ -258 return true; │ │ │ │ -259} │ │ │ │ -260 │ │ │ │ -265template │ │ │ │ -_2_6_6bool _a_s_s_e_r_t___c_o_n_t_a_i_n_e_r___e_q_u_a_l_i_t_y(const std::map& expected, const │ │ │ │ -std::map& actual) { │ │ │ │ -267 typedef typename std::map Map; │ │ │ │ -268 bool match = true; │ │ │ │ -269 if (expected.size() != actual.size()) │ │ │ │ -270 match = false; │ │ │ │ -271 typename Map::const_iterator │ │ │ │ -272 itExp = expected.begin(), │ │ │ │ -273 itAct = actual.begin(); │ │ │ │ -274 if(match) { │ │ │ │ -275 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) { │ │ │ │ -276 if (itExp->first != itAct->first || itExp->second != itAct->second) { │ │ │ │ -277 match = false; │ │ │ │ -278 break; │ │ │ │ -279 } │ │ │ │ -280 } │ │ │ │ -281 } │ │ │ │ -282 if(!match) { │ │ │ │ -283 std::cout << "expected: " << std::endl; │ │ │ │ -284 for(const typename Map::value_type& a: expected) { │ │ │ │ -285 std::cout << "Key: " << a.first << std::endl; │ │ │ │ -286 std::cout << "Value: " << a.second << std::endl; │ │ │ │ -287 } │ │ │ │ -288 std::cout << "\nactual: " << std::endl; │ │ │ │ -289 for(const typename Map::value_type& a: actual) { │ │ │ │ -290 std::cout << "Key: " << a.first << std::endl; │ │ │ │ -291 std::cout << "Value: " << a.second << std::endl; │ │ │ │ -292 } │ │ │ │ -293 std::cout << std::endl; │ │ │ │ -294 return false; │ │ │ │ -295 } │ │ │ │ -296 return true; │ │ │ │ -297} │ │ │ │ -298 │ │ │ │ +247 │ │ │ │ +248 static Scalar Retract(Scalar origin, const TangentVector& v, │ │ │ │ +249 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) { │ │ │ │ +250 if (H1) (*H1)[0] = 1.0; │ │ │ │ +251 if (H2) (*H2)[0] = 1.0; │ │ │ │ +252 return origin + v[0]; │ │ │ │ +253 } │ │ │ │ +255 │ │ │ │ +258 static TangentVector Logmap(Scalar m, ChartJacobian H = boost::none) { │ │ │ │ +259 if (H) (*H)[0] = 1.0; │ │ │ │ +260 return Local(0, m); │ │ │ │ +261 } │ │ │ │ +262 │ │ │ │ +263 static Scalar Expmap(const TangentVector& v, ChartJacobian H = boost::none) │ │ │ │ +{ │ │ │ │ +264 if (H) (*H)[0] = 1.0; │ │ │ │ +265 return v[0]; │ │ │ │ +266 } │ │ │ │ +268 │ │ │ │ +269}; │ │ │ │ +270 │ │ │ │ +271} // namespace internal │ │ │ │ +272 │ │ │ │ +_2_7_4template<> struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_S_c_a_l_a_r_T_r_a_i_t_s { │ │ │ │ +275}; │ │ │ │ +276 │ │ │ │ +_2_7_8template<> struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_S_c_a_l_a_r_T_r_a_i_t_s { │ │ │ │ +279}; │ │ │ │ +280 │ │ │ │ +281// traits for any fixed double Eigen matrix │ │ │ │ +282template │ │ │ │ +_2_8_3struct _t_r_a_i_t_s > : │ │ │ │ +284 _i_n_t_e_r_n_a_l_:_:_V_e_c_t_o_r_S_p_a_c_e_I_m_p_l< │ │ │ │ +285 Eigen::Matrix, M * N> { │ │ │ │ +286 │ │ │ │ +287 typedef _v_e_c_t_o_r___s_p_a_c_e___t_a_g _s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y; │ │ │ │ +288 typedef Eigen::Matrix Fixed; │ │ │ │ +289 │ │ │ │ +292 static void Print(const Fixed& m, const std::string& str = "") { │ │ │ │ +293 _g_t_s_a_m_:_:_p_r_i_n_t(Eigen::MatrixXd(m), str); │ │ │ │ +294 } │ │ │ │ +295 static bool Equals(const Fixed& v1, const Fixed& v2, double tol = 1e-8) { │ │ │ │ +296 return _e_q_u_a_l___w_i_t_h___a_b_s___t_o_l(v1, v2, tol); │ │ │ │ +297 } │ │ │ │ 299 │ │ │ │ -303template │ │ │ │ -_3_0_4bool _a_s_s_e_r_t___c_o_n_t_a_i_n_e_r___e_q_u_a_l_i_t_y(const V& expected, const V& actual) { │ │ │ │ -305 bool match = true; │ │ │ │ -306 if (expected.size() != actual.size()) │ │ │ │ -307 match = false; │ │ │ │ -308 typename V::const_iterator │ │ │ │ -309 itExp = expected.begin(), │ │ │ │ -310 itAct = actual.begin(); │ │ │ │ -311 if(match) { │ │ │ │ -312 for (; itExp!=expected.end() && itAct!=actual.end(); ++itExp, ++itAct) { │ │ │ │ -313 if (*itExp != *itAct) { │ │ │ │ -314 match = false; │ │ │ │ -315 break; │ │ │ │ -316 } │ │ │ │ -317 } │ │ │ │ -318 } │ │ │ │ -319 if(!match) { │ │ │ │ -320 std::cout << "expected: " << std::endl; │ │ │ │ -321 for(const typename V::value_type& a: expected) { std::cout << a << " "; } │ │ │ │ -322 std::cout << "\nactual: " << std::endl; │ │ │ │ -323 for(const typename V::value_type& a: actual) { std::cout << a << " "; } │ │ │ │ -324 std::cout << std::endl; │ │ │ │ -325 return false; │ │ │ │ -326 } │ │ │ │ -327 return true; │ │ │ │ -328} │ │ │ │ -329 │ │ │ │ -_3_3_3inline bool _a_s_s_e_r_t___e_q_u_a_l(const std::string& expected, const std::string& │ │ │ │ -actual) { │ │ │ │ -334 if (expected == actual) │ │ │ │ -335 return true; │ │ │ │ -336 printf("Not equal:\n"); │ │ │ │ -337 std::cout << "expected: [" << expected << "]\n"; │ │ │ │ -338 std::cout << "actual: [" << actual << "]" << std::endl; │ │ │ │ -339 return false; │ │ │ │ -340} │ │ │ │ -341 │ │ │ │ -345template │ │ │ │ -_3_4_6bool _a_s_s_e_r_t___i_n_e_q_u_a_l(const V& expected, const V& actual, double tol = 1e-9) { │ │ │ │ -347 if (!actual.equals(expected, tol)) │ │ │ │ -348 return true; │ │ │ │ -349 printf("Erroneously equal:\n"); │ │ │ │ -350 expected.print("expected"); │ │ │ │ -351 actual.print("actual"); │ │ │ │ -352 return false; │ │ │ │ -353} │ │ │ │ -354 │ │ │ │ -358template │ │ │ │ -_3_5_9bool _a_s_s_e_r_t___s_t_d_o_u_t___e_q_u_a_l(const std::string& expected, const V& actual) { │ │ │ │ -360 // Redirect output to buffer so we can compare │ │ │ │ -361 std::stringstream buffer; │ │ │ │ -362 // Save the original output stream so we can reset later │ │ │ │ -363 std::streambuf* old = std::cout.rdbuf(buffer.rdbuf()); │ │ │ │ -364 │ │ │ │ -365 // We test against actual std::cout for faithful reproduction │ │ │ │ -366 std::cout << actual; │ │ │ │ -367 │ │ │ │ -368 // Get output string and reset stdout │ │ │ │ -369 std::string actual_ = buffer.str(); │ │ │ │ -370 std::cout.rdbuf(old); │ │ │ │ -371 │ │ │ │ -372 return _a_s_s_e_r_t___e_q_u_a_l(expected, actual_); │ │ │ │ -373} │ │ │ │ -374 │ │ │ │ -380template │ │ │ │ -_3_8_1bool _a_s_s_e_r_t___p_r_i_n_t___e_q_u_a_l(const std::string& expected, const V& actual, │ │ │ │ -382 const std::string& s = "") { │ │ │ │ -383 // Redirect output to buffer so we can compare │ │ │ │ -384 std::stringstream buffer; │ │ │ │ -385 // Save the original output stream so we can reset later │ │ │ │ -386 std::streambuf* old = std::cout.rdbuf(buffer.rdbuf()); │ │ │ │ -387 │ │ │ │ -388 // We test against actual std::cout for faithful reproduction │ │ │ │ -389 actual.print(s); │ │ │ │ -390 │ │ │ │ -391 // Get output string and reset stdout │ │ │ │ -392 std::string actual_ = buffer.str(); │ │ │ │ -393 std::cout.rdbuf(old); │ │ │ │ +302 typedef _a_d_d_i_t_i_v_e___g_r_o_u_p___t_a_g _g_r_o_u_p___f_l_a_v_o_r; │ │ │ │ +303 static Fixed Identity() { return Fixed::Zero();} │ │ │ │ +305 │ │ │ │ +308 enum { dimension = M*N}; │ │ │ │ +309 typedef Fixed ManifoldType; │ │ │ │ +310 typedef Eigen::Matrix TangentVector; │ │ │ │ +311 typedef Eigen::Matrix Jacobian; │ │ │ │ +312 typedef _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_d_i_m_e_n_s_i_o_n_,_ _d_i_m_e_n_s_i_o_n_> _C_h_a_r_t_J_a_c_o_b_i_a_n; │ │ │ │ +313 │ │ │ │ +314 static TangentVector Local(const Fixed& origin, const Fixed& other, │ │ │ │ +315 _C_h_a_r_t_J_a_c_o_b_i_a_n H1 = boost::none, _C_h_a_r_t_J_a_c_o_b_i_a_n H2 = boost::none) { │ │ │ │ +316 if (H1) (*H1) = -Jacobian::Identity(); │ │ │ │ +317 if (H2) (*H2) = Jacobian::Identity(); │ │ │ │ +318 TangentVector result; │ │ │ │ +319 Eigen::Map(result.data()) = other - origin; │ │ │ │ +320 return result; │ │ │ │ +321 } │ │ │ │ +322 │ │ │ │ +323 static Fixed Retract(const Fixed& origin, const TangentVector& v, │ │ │ │ +324 _C_h_a_r_t_J_a_c_o_b_i_a_n H1 = boost::none, _C_h_a_r_t_J_a_c_o_b_i_a_n H2 = boost::none) { │ │ │ │ +325 if (H1) (*H1) = Jacobian::Identity(); │ │ │ │ +326 if (H2) (*H2) = Jacobian::Identity(); │ │ │ │ +327 return origin + Eigen::Map(v.data()); │ │ │ │ +328 } │ │ │ │ +330 │ │ │ │ +333 static TangentVector Logmap(const Fixed& m, _C_h_a_r_t_J_a_c_o_b_i_a_n H = boost::none) │ │ │ │ +{ │ │ │ │ +334 if (H) *H = Jacobian::Identity(); │ │ │ │ +335 TangentVector result; │ │ │ │ +336 Eigen::Map(result.data()) = m; │ │ │ │ +337 return result; │ │ │ │ +338 } │ │ │ │ +339 │ │ │ │ +340 static Fixed Expmap(const TangentVector& v, _C_h_a_r_t_J_a_c_o_b_i_a_n H = boost::none) │ │ │ │ +{ │ │ │ │ +341 Fixed m; │ │ │ │ +342 m.setZero(); │ │ │ │ +343 if (H) *H = Jacobian::Identity(); │ │ │ │ +344 return m + Eigen::Map(v.data()); │ │ │ │ +345 } │ │ │ │ +347}; │ │ │ │ +348 │ │ │ │ +349 │ │ │ │ +350namespace internal { │ │ │ │ +351 │ │ │ │ +352// traits for dynamic Eigen matrices │ │ │ │ +353template │ │ │ │ +_3_5_4struct _D_y_n_a_m_i_c_T_r_a_i_t_s { │ │ │ │ +355 │ │ │ │ +356 typedef _v_e_c_t_o_r___s_p_a_c_e___t_a_g _s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y; │ │ │ │ +357 typedef Eigen::Matrix Dynamic; │ │ │ │ +358 │ │ │ │ +361 static void Print(const Dynamic& m, const std::string& str = "") { │ │ │ │ +362 _g_t_s_a_m_:_:_p_r_i_n_t(Eigen::MatrixXd(m), str); │ │ │ │ +363 } │ │ │ │ +364 static bool Equals(const Dynamic& v1, const Dynamic& v2, │ │ │ │ +365 double tol = 1e-8) { │ │ │ │ +366 return _e_q_u_a_l___w_i_t_h___a_b_s___t_o_l(v1, v2, tol); │ │ │ │ +367 } │ │ │ │ +369 │ │ │ │ +372 typedef _a_d_d_i_t_i_v_e___g_r_o_u_p___t_a_g _g_r_o_u_p___f_l_a_v_o_r; │ │ │ │ +373 static Dynamic Identity() { │ │ │ │ +374 throw std::runtime_error("Identity not defined for dynamic types"); │ │ │ │ +375 } │ │ │ │ +377 │ │ │ │ +380 enum { dimension = Eigen::Dynamic }; │ │ │ │ +381 typedef Eigen::VectorXd TangentVector; │ │ │ │ +382 typedef Eigen::MatrixXd Jacobian; │ │ │ │ +383 typedef _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_d_i_m_e_n_s_i_o_n_,_ _d_i_m_e_n_s_i_o_n_> ChartJacobian; │ │ │ │ +384 typedef Dynamic ManifoldType; │ │ │ │ +385 │ │ │ │ +386 static int GetDimension(const Dynamic& m) { │ │ │ │ +387 return m.rows() * m._c_o_l_s(); │ │ │ │ +388 } │ │ │ │ +389 │ │ │ │ +390 static Jacobian Eye(const Dynamic& m) { │ │ │ │ +391 int dim = GetDimension(m); │ │ │ │ +392 return Eigen::Matrix::Identity(dim, dim); │ │ │ │ +393 } │ │ │ │ 394 │ │ │ │ -395 return _a_s_s_e_r_t___e_q_u_a_l(expected, actual_); │ │ │ │ -396} │ │ │ │ -397 │ │ │ │ -398} // \namespace gtsam │ │ │ │ -_T_e_s_t_a_b_l_e_._h │ │ │ │ -Concept check for values that can be used in unit tests. │ │ │ │ -_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h │ │ │ │ -Included from all GTSAM files. │ │ │ │ +395 static TangentVector Local(const Dynamic& m, const Dynamic& other, // │ │ │ │ +396 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) { │ │ │ │ +397 if (H1) *H1 = -Eye(m); │ │ │ │ +398 if (H2) *H2 = Eye(m); │ │ │ │ +399 TangentVector v(GetDimension(m)); │ │ │ │ +400 Eigen::Map(v.data(), m.rows(), m.cols()) = other - m; │ │ │ │ +401 return v; │ │ │ │ +402 } │ │ │ │ +403 │ │ │ │ +404 static Dynamic Retract(const Dynamic& m, const TangentVector& v, // │ │ │ │ +405 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) { │ │ │ │ +406 if (H1) *H1 = Eye(m); │ │ │ │ +407 if (H2) *H2 = Eye(m); │ │ │ │ +408 return m + Eigen::Map(v.data(), m.rows(), m.cols()); │ │ │ │ +409 } │ │ │ │ +411 │ │ │ │ +414 static TangentVector Logmap(const Dynamic& m, ChartJacobian H = boost:: │ │ │ │ +none) { │ │ │ │ +415 if (H) *H = Eye(m); │ │ │ │ +416 TangentVector result(GetDimension(m)); │ │ │ │ +417 Eigen::Map(result.data(), m.cols(), m.rows()) = m; │ │ │ │ +418 return result; │ │ │ │ +419 } │ │ │ │ +420 │ │ │ │ +421 static Dynamic Expmap(const TangentVector& /*v*/, ChartJacobian H = boost:: │ │ │ │ +none) { │ │ │ │ +422 static_cast(H); │ │ │ │ +423 throw std::runtime_error("Expmap not defined for dynamic types"); │ │ │ │ +424 } │ │ │ │ +425 │ │ │ │ +426 static Dynamic Inverse(const Dynamic& m, ChartJacobian H = boost::none) { │ │ │ │ +427 if (H) *H = -Eye(m); │ │ │ │ +428 return -m; │ │ │ │ +429 } │ │ │ │ +430 │ │ │ │ +431 static Dynamic Compose(const Dynamic& v1, const Dynamic& v2, │ │ │ │ +432 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) { │ │ │ │ +433 if (H1) *H1 = Eye(v1); │ │ │ │ +434 if (H2) *H2 = Eye(v1); │ │ │ │ +435 return v1 + v2; │ │ │ │ +436 } │ │ │ │ +437 │ │ │ │ +438 static Dynamic Between(const Dynamic& v1, const Dynamic& v2, │ │ │ │ +439 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) { │ │ │ │ +440 if (H1) *H1 = -Eye(v1); │ │ │ │ +441 if (H2) *H2 = Eye(v1); │ │ │ │ +442 return v2 - v1; │ │ │ │ +443 } │ │ │ │ +445 │ │ │ │ +446}; │ │ │ │ +447 │ │ │ │ +448} // \ internal │ │ │ │ +449 │ │ │ │ +450// traits for fully dynamic matrix │ │ │ │ +451template │ │ │ │ +_4_5_2struct _t_r_a_i_t_s > : │ │ │ │ +453 public _i_n_t_e_r_n_a_l_:_:_D_y_n_a_m_i_c_T_r_a_i_t_s<-1, -1, Options, MaxRows, MaxCols> { │ │ │ │ +454}; │ │ │ │ +455 │ │ │ │ +456// traits for dynamic column vector │ │ │ │ +457template │ │ │ │ +_4_5_8struct _t_r_a_i_t_s > : │ │ │ │ +459 public _i_n_t_e_r_n_a_l_:_:_D_y_n_a_m_i_c_T_r_a_i_t_s<-1, 1, Options, MaxRows, MaxCols> { │ │ │ │ +460}; │ │ │ │ +461 │ │ │ │ +462// traits for dynamic row vector │ │ │ │ +463template │ │ │ │ +_4_6_4struct _t_r_a_i_t_s > : │ │ │ │ +465 public _i_n_t_e_r_n_a_l_:_:_D_y_n_a_m_i_c_T_r_a_i_t_s<1, -1, Options, MaxRows, MaxCols> { │ │ │ │ +466}; │ │ │ │ +467 │ │ │ │ +469template │ │ │ │ +_4_7_0class _I_s_V_e_c_t_o_r_S_p_a_c_e: public _I_s_L_i_e_G_r_o_u_p { │ │ │ │ +471public: │ │ │ │ +472 │ │ │ │ +473 typedef typename _t_r_a_i_t_s_<_T_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y structure_category_tag; │ │ │ │ +474 │ │ │ │ +475 BOOST_CONCEPT_USAGE(_I_s_V_e_c_t_o_r_S_p_a_c_e) { │ │ │ │ +476 BOOST_STATIC_ASSERT_MSG( │ │ │ │ +477 (boost::is_base_of::value), │ │ │ │ +478 "This type's trait does not assert it as a vector space (or derived)"); │ │ │ │ +479 r = p + q; │ │ │ │ +480 r = -p; │ │ │ │ +481 r = p - q; │ │ │ │ +482 } │ │ │ │ +483 │ │ │ │ +484private: │ │ │ │ +485 T p, q, r; │ │ │ │ +486}; │ │ │ │ +487 │ │ │ │ +488} // namespace gtsam │ │ │ │ +489 │ │ │ │ +_L_i_e_._h │ │ │ │ +Base class and basic functions for Lie types. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_a_s_s_e_r_t___s_t_d_o_u_t___e_q_u_a_l │ │ │ │ -bool assert_stdout_equal(const std::string &expected, const V &actual) │ │ │ │ -Capture std out via cout stream and compare against string. │ │ │ │ -DDeeffiinniittiioonn TestableAssertions.h:359 │ │ │ │ -_g_t_s_a_m_:_:_a_s_s_e_r_t___c_o_n_t_a_i_n_e_r___e_q_u_a_l │ │ │ │ -bool assert_container_equal(const std::map< V1, V2 > &expected, const std::map< │ │ │ │ -V1, V2 > &actual, double tol=1e-9) │ │ │ │ -Function for comparing maps of testable->testable TODO: replace with more │ │ │ │ -generalized version. │ │ │ │ -DDeeffiinniittiioonn TestableAssertions.h:119 │ │ │ │ -_g_t_s_a_m_:_:_a_s_s_e_r_t___e_q_u_a_l │ │ │ │ -bool assert_equal(const Matrix &expected, const Matrix &actual, double tol) │ │ │ │ -equals with an tolerance, prints out message if unequal │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:43 │ │ │ │ -_g_t_s_a_m_:_:_a_s_s_e_r_t___c_o_n_t_a_i_n_e_r___e_q_u_a_l_i_t_y │ │ │ │ -bool assert_container_equality(const std::map< size_t, V2 > &expected, const │ │ │ │ -std::map< size_t, V2 > &actual) │ │ │ │ -Function for comparing maps of size_t->testable Types are assumed to have │ │ │ │ -operator ==. │ │ │ │ -DDeeffiinniittiioonn TestableAssertions.h:266 │ │ │ │ -_g_t_s_a_m_:_:_a_s_s_e_r_t___i_n_e_q_u_a_l │ │ │ │ -bool assert_inequal(const Matrix &A, const Matrix &B, double tol) │ │ │ │ -inequals with an tolerance, prints out message if within tolerance │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:63 │ │ │ │ -_g_t_s_a_m_:_:_a_s_s_e_r_t___p_r_i_n_t___e_q_u_a_l │ │ │ │ -bool assert_print_equal(const std::string &expected, const V &actual, const │ │ │ │ -std::string &s="") │ │ │ │ -Capture print function output and compare against string. │ │ │ │ -DDeeffiinniittiioonn TestableAssertions.h:381 │ │ │ │ -_g_t_s_a_m_:_:_K_e_y │ │ │ │ -std::uint64_t Key │ │ │ │ -Integer nonlinear key type. │ │ │ │ -DDeeffiinniittiioonn types.h:100 │ │ │ │ +_g_t_s_a_m_:_:_p_r_i_n_t │ │ │ │ +void print(const Matrix &A, const string &s, ostream &stream) │ │ │ │ +print without optional string, must specify cout yourself │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:156 │ │ │ │ +_g_t_s_a_m_:_:_e_q_u_a_l___w_i_t_h___a_b_s___t_o_l │ │ │ │ +bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen:: │ │ │ │ +DenseBase< MATRIX > &B, double tol=1e-9) │ │ │ │ +equals with a tolerance │ │ │ │ +DDeeffiinniittiioonn Matrix.h:81 │ │ │ │ +_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ +A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ +that can be centered ... │ │ │ │ +DDeeffiinniittiioonn concepts.h:30 │ │ │ │ +_g_t_s_a_m_:_:_a_d_d_i_t_i_v_e___g_r_o_u_p___t_a_g │ │ │ │ +DDeeffiinniittiioonn Group.h:38 │ │ │ │ +_g_t_s_a_m_:_:_l_i_e___g_r_o_u_p___t_a_g │ │ │ │ +tag to assert a type is a Lie group │ │ │ │ +DDeeffiinniittiioonn Lie.h:164 │ │ │ │ +_g_t_s_a_m_:_:_I_s_L_i_e_G_r_o_u_p │ │ │ │ +Lie Group Concept. │ │ │ │ +DDeeffiinniittiioonn Lie.h:260 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ +either a fixed size o... │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_:_:_c_o_l_s │ │ │ │ +OptionalJacobian< Rows, N > cols(int startCol) │ │ │ │ +Access M*N sub-block if we are allocated, otherwise none TODO(frank): this │ │ │ │ +could work as is below if ... │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:171 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_,_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_ _> │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:188 │ │ │ │ +_g_t_s_a_m_:_:_T_e_s_t_a_b_l_e │ │ │ │ +A helper that implements the traits interface for GTSAM types. │ │ │ │ +DDeeffiinniittiioonn Testable.h:151 │ │ │ │ +_g_t_s_a_m_:_:_v_e_c_t_o_r___s_p_a_c_e___t_a_g │ │ │ │ +tag to assert a type is a vector space │ │ │ │ +DDeeffiinniittiioonn VectorSpace.h:16 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_V_e_c_t_o_r_S_p_a_c_e_I_m_p_l │ │ │ │ +VectorSpaceTraits Implementation for Fixed sizes. │ │ │ │ +DDeeffiinniittiioonn VectorSpace.h:25 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_H_a_s_V_e_c_t_o_r_S_p_a_c_e_P_r_e_r_e_q_s │ │ │ │ +Requirements on type to pass it to Manifold template below. │ │ │ │ +DDeeffiinniittiioonn VectorSpace.h:164 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_V_e_c_t_o_r_S_p_a_c_e_T_r_a_i_t_s │ │ │ │ +A helper that implements the traits interface for classes that define vector │ │ │ │ +spaces To use this for y... │ │ │ │ +DDeeffiinniittiioonn VectorSpace.h:185 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_V_e_c_t_o_r_S_p_a_c_e │ │ │ │ +VectorSpace provides both Testable and VectorSpaceTraits. │ │ │ │ +DDeeffiinniittiioonn VectorSpace.h:207 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_S_c_a_l_a_r_T_r_a_i_t_s │ │ │ │ +A helper that implements the traits interface for scalar vector spaces. │ │ │ │ +DDeeffiinniittiioonn VectorSpace.h:212 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_D_y_n_a_m_i_c_T_r_a_i_t_s │ │ │ │ +DDeeffiinniittiioonn VectorSpace.h:354 │ │ │ │ +_g_t_s_a_m_:_:_I_s_V_e_c_t_o_r_S_p_a_c_e │ │ │ │ +Vector Space concept. │ │ │ │ +DDeeffiinniittiioonn VectorSpace.h:470 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _T_e_s_t_a_b_l_e_A_s_s_e_r_t_i_o_n_s_._h │ │ │ │ + * VVeeccttoorrSSppaaccee..hh │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00089.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Testable.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/serialization.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,123 +94,166 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Macros | │ │ │ -Functions
│ │ │ -
Testable.h File Reference
│ │ │ +Namespaces
│ │ │ +
serialization.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Concept check for values that can be used in unit tests. │ │ │ +

Convenience functions for serializing data structures via boost.serialization. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  gtsam::IsTestable< T >
 A testable concept check that should be placed in applicable unit tests and in generic algorithms. More...
 
struct  gtsam::equals< V >
 Template to create a binary predicate. More...
 
struct  gtsam::equals_star< V >
 Binary predicate on shared pointers. More...
 
struct  gtsam::HasTestablePrereqs< T >
 Requirements on type to pass it to Testable template below. More...
 
struct  gtsam::Testable< T >
 A helper that implements the traits interface for GTSAM types. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Macros

│ │ │ -#define GTSAM_PRINT(x)   ((x).print(#x))
 
#define GTSAM_CONCEPT_TESTABLE_INST(T)   template class gtsam::IsTestable<T>;
 Macros for using the TestableConcept.
 
│ │ │ -#define GTSAM_CONCEPT_TESTABLE_TYPE(T)   using _gtsam_Testable_##T = gtsam::IsTestable<T>;
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

│ │ │ -void gtsam::print (float v, const std::string &s="")
 
│ │ │ -void gtsam::print (double v, const std::string &s="")
 
│ │ │ -template<class T >
bool gtsam::equal (const T &obj1, const T &obj2, double tol)
 Call equal on the object.
 
│ │ │ -template<class T >
bool gtsam::equal (const T &obj1, const T &obj2)
 Call equal without tolerance (use default tolerance)
 
│ │ │ -template<class V >
bool gtsam::assert_equal (const V &expected, const V &actual, double tol=1e-9)
 This template works for any type with equals.
 
Standard serialization

Serialization in default compressed format

│ │ │ +
template<class T >
void gtsam::serializeToStream (const T &input, std::ostream &out_archive_stream)
 
│ │ │ +template<class T >
void gtsam::deserializeFromStream (std::istream &in_archive_stream, T &output)
 deserializes from a stream
 
│ │ │ +template<class T >
std::string gtsam::serializeToString (const T &input)
 serializes to a string
 
│ │ │ +template<class T >
void gtsam::deserializeFromString (const std::string &serialized, T &output)
 deserializes from a string
 
│ │ │ +template<class T >
bool gtsam::serializeToFile (const T &input, const std::string &filename)
 serializes to a file
 
│ │ │ +template<class T >
bool gtsam::deserializeFromFile (const std::string &filename, T &output)
 deserializes from a file
 
│ │ │ +template<class T >
std::string gtsam::serialize (const T &input)
 serializes to a string
 
│ │ │ +template<class T >
void gtsam::deserialize (const std::string &serialized, T &output)
 deserializes from a string
 
XML Serialization

Serialization to XML format with named structures

│ │ │ +
template<class T >
void gtsam::serializeToXMLStream (const T &input, std::ostream &out_archive_stream, const std::string &name="data")
 
│ │ │ +template<class T >
void gtsam::deserializeFromXMLStream (std::istream &in_archive_stream, T &output, const std::string &name="data")
 deserializes from a stream in XML
 
│ │ │ +template<class T >
std::string gtsam::serializeToXMLString (const T &input, const std::string &name="data")
 serializes to a string in XML
 
│ │ │ +template<class T >
void gtsam::deserializeFromXMLString (const std::string &serialized, T &output, const std::string &name="data")
 deserializes from a string in XML
 
│ │ │ +template<class T >
bool gtsam::serializeToXMLFile (const T &input, const std::string &filename, const std::string &name="data")
 serializes to an XML file
 
│ │ │ +template<class T >
bool gtsam::deserializeFromXMLFile (const std::string &filename, T &output, const std::string &name="data")
 deserializes from an XML file
 
│ │ │ +template<class T >
std::string gtsam::serializeXML (const T &input, const std::string &name="data")
 serializes to a string in XML
 
│ │ │ +template<class T >
void gtsam::deserializeXML (const std::string &serialized, T &output, const std::string &name="data")
 deserializes from a string in XML
 
Binary Serialization

Serialization to binary format with named structures

│ │ │ +
template<class T >
void gtsam::serializeToBinaryStream (const T &input, std::ostream &out_archive_stream, const std::string &name="data")
 
│ │ │ +template<class T >
void gtsam::deserializeFromBinaryStream (std::istream &in_archive_stream, T &output, const std::string &name="data")
 deserializes from a stream in binary
 
│ │ │ +template<class T >
std::string gtsam::serializeToBinaryString (const T &input, const std::string &name="data")
 serializes to a string in binary
 
│ │ │ +template<class T >
void gtsam::deserializeFromBinaryString (const std::string &serialized, T &output, const std::string &name="data")
 deserializes from a string in binary
 
│ │ │ +template<class T >
bool gtsam::serializeToBinaryFile (const T &input, const std::string &filename, const std::string &name="data")
 serializes to a binary file
 
│ │ │ +template<class T >
bool gtsam::deserializeFromBinaryFile (const std::string &filename, T &output, const std::string &name="data")
 deserializes from a binary file
 
│ │ │ +template<class T >
std::string gtsam::serializeBinary (const T &input, const std::string &name="data")
 serializes to a string in binary
 
│ │ │ +template<class T >
void gtsam::deserializeBinary (const std::string &serialized, T &output, const std::string &name="data")
 deserializes from a string in binary
 
│ │ │

Detailed Description

│ │ │ -

Concept check for values that can be used in unit tests.

│ │ │ -
Author
Frank Dellaert
│ │ │ -

The necessary functions to implement for Testable are defined below with additional details as to the interface. The concept checking function will check whether or not the function exists in derived class and throw compile-time errors.

│ │ │ -

print with optional string naming the object void print(const std::string& name) const = 0;

│ │ │ -

equality up to tolerance tricky to implement, see PriorFactor for an example equals is not supposed to print out anything, just return true|false bool equals(const Derived& expected, double tol) const = 0;

│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ GTSAM_CONCEPT_TESTABLE_INST

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define GTSAM_CONCEPT_TESTABLE_INST( T)   template class gtsam::IsTestable<T>;
│ │ │ -
│ │ │ - │ │ │ -

Macros for using the TestableConcept.

│ │ │ -
    │ │ │ -
  • An instantiation for use inside unit tests
  • │ │ │ -
  • A typedef for use inside generic algorithms
  • │ │ │ -
│ │ │ -

NOTE: intentionally not in the gtsam namespace to allow for classes not in the gtsam namespace to be more easily enforced as testable

Deprecated:
please use BOOST_CONCEPT_ASSERT and
│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +

Convenience functions for serializing data structures via boost.serialization.

│ │ │ +
Author
Alex Cunningham
│ │ │ +
│ │ │ +Richard Roberts
│ │ │ +
Date
Feb 7, 2012
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,84 +1,146 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Testable.h File Reference │ │ │ │ -Concept check for values that can be used in unit tests. _M_o_r_e_._._. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +serialization.h File Reference │ │ │ │ +Convenience functions for serializing data structures via boost.serialization. │ │ │ │ +_M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_I_s_T_e_s_t_a_b_l_e_<_ _T_ _> │ │ │ │ -  A testable concept check that should be placed in applicable unit │ │ │ │ - tests and in generic algorithms. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_e_q_u_a_l_s_<_ _V_ _> │ │ │ │ -  Template to create a binary predicate. _M_o_r_e_._._. │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _g_t_s_a_m │ │ │ │ +  Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_e_q_u_a_l_s___s_t_a_r_<_ _V_ _> │ │ │ │ -  Binary predicate on shared pointers. _M_o_r_e_._._. │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +Standard serialization │ │ │ │ +Serialization in default compressed format │ │ │ │ +template │ │ │ │ + void  _g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_S_t_r_e_a_m (const T &input, std::ostream │ │ │ │ + &out_archive_stream) │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_H_a_s_T_e_s_t_a_b_l_e_P_r_e_r_e_q_s_<_ _T_ _> │ │ │ │ -  Requirements on type to pass it to _T_e_s_t_a_b_l_e template below. _M_o_r_e_._._. │ │ │ │ +template │ │ │ │ + void  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommSSttrreeaamm (std::istream &in_archive_stream, T │ │ │ │ + &output) │ │ │ │ +  deserializes from a stream │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_T_e_s_t_a_b_l_e_<_ _T_ _> │ │ │ │ -  A helper that implements the traits interface for GTSAM types. _M_o_r_e_._._. │ │ │ │ +template │ │ │ │ +std::string  ggttssaamm::::sseerriiaalliizzeeTTooSSttrriinngg (const T &input) │ │ │ │ +  serializes to a string │ │ │ │   │ │ │ │ -NNaammeessppaacceess │ │ │ │ -namespace   _g_t_s_a_m │ │ │ │ -  Global functions in a separate testing namespace. │ │ │ │ +template │ │ │ │ + void  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommSSttrriinngg (const std::string &serialized, T │ │ │ │ + &output) │ │ │ │ +  deserializes from a string │ │ │ │   │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  GGTTSSAAMM__PPRRIINNTT(x)   ((x).print(#x)) │ │ │ │ +template │ │ │ │ + bool  ggttssaamm::::sseerriiaalliizzeeTTooFFiillee (const T &input, const std::string │ │ │ │ + &filename) │ │ │ │ +  serializes to a file │ │ │ │   │ │ │ │ -#define  _G_T_S_A_M___C_O_N_C_E_P_T___T_E_S_T_A_B_L_E___I_N_S_T(T)   template class _g_t_s_a_m_:_:_I_s_T_e_s_t_a_b_l_e; │ │ │ │ -  Macros for using the TestableConcept. │ │ │ │ +template │ │ │ │ + bool  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommFFiillee (const std::string &filename, T │ │ │ │ + &output) │ │ │ │ +  deserializes from a file │ │ │ │   │ │ │ │ -#define  GGTTSSAAMM__CCOONNCCEEPPTT__TTEESSTTAABBLLEE__TTYYPPEE(T)   using _gtsam_Testable_##T = _g_t_s_a_m_:_: │ │ │ │ - _I_s_T_e_s_t_a_b_l_e; │ │ │ │ +template │ │ │ │ +std::string  ggttssaamm::::sseerriiaalliizzee (const T &input) │ │ │ │ +  serializes to a string │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -void  ggttssaamm::::pprriinntt (float v, const std::string &s="") │ │ │ │ +template │ │ │ │ + void  ggttssaamm::::ddeesseerriiaalliizzee (const std::string &serialized, T &output) │ │ │ │ +  deserializes from a string │ │ │ │ +  │ │ │ │ +XML Serialization │ │ │ │ +Serialization to XML format with named structures │ │ │ │ +template │ │ │ │ + void  _g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_X_M_L_S_t_r_e_a_m (const T &input, std::ostream │ │ │ │ + &out_archive_stream, const std::string &name="data") │ │ │ │ +  │ │ │ │ +template │ │ │ │ + void  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommXXMMLLSSttrreeaamm (std::istream &in_archive_stream, │ │ │ │ + T &output, const std::string &name="data") │ │ │ │ +  deserializes from a stream in XML │ │ │ │ +  │ │ │ │ +template │ │ │ │ +std::string  ggttssaamm::::sseerriiaalliizzeeTTooXXMMLLSSttrriinngg (const T &input, const std::string │ │ │ │ + &name="data") │ │ │ │ +  serializes to a string in XML │ │ │ │ +  │ │ │ │ +template │ │ │ │ + void  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommXXMMLLSSttrriinngg (const std::string &serialized, T │ │ │ │ + &output, const std::string &name="data") │ │ │ │ +  deserializes from a string in XML │ │ │ │   │ │ │ │ -void  ggttssaamm::::pprriinntt (double v, const std::string &s="") │ │ │ │ +template │ │ │ │ + bool  ggttssaamm::::sseerriiaalliizzeeTTooXXMMLLFFiillee (const T &input, const std::string │ │ │ │ + &filename, const std::string &name="data") │ │ │ │ +  serializes to an XML file │ │ │ │ +  │ │ │ │ +template │ │ │ │ + bool  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommXXMMLLFFiillee (const std::string &filename, T │ │ │ │ + &output, const std::string &name="data") │ │ │ │ +  deserializes from an XML file │ │ │ │   │ │ │ │ template │ │ │ │ -bool  ggttssaamm::::eeqquuaall (const T &obj1, const T &obj2, double tol) │ │ │ │ -  Call equal on the object. │ │ │ │ +std::string  ggttssaamm::::sseerriiaalliizzeeXXMMLL (const T &input, const std::string │ │ │ │ + &name="data") │ │ │ │ +  serializes to a string in XML │ │ │ │   │ │ │ │ template │ │ │ │ -bool  ggttssaamm::::eeqquuaall (const T &obj1, const T &obj2) │ │ │ │ -  Call equal without tolerance (use default tolerance) │ │ │ │ + void  ggttssaamm::::ddeesseerriiaalliizzeeXXMMLL (const std::string &serialized, T &output, │ │ │ │ + const std::string &name="data") │ │ │ │ +  deserializes from a string in XML │ │ │ │   │ │ │ │ -template │ │ │ │ -bool  ggttssaamm::::aasssseerrtt__eeqquuaall (const V &expected, const V &actual, double tol=1e-9) │ │ │ │ -  This template works for any type with equals. │ │ │ │ +Binary Serialization │ │ │ │ +Serialization to binary format with named structures │ │ │ │ +template │ │ │ │ + void  _g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_S_t_r_e_a_m (const T &input, std::ostream │ │ │ │ + &out_archive_stream, const std::string &name="data") │ │ │ │ +  │ │ │ │ +template │ │ │ │ + void  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommBBiinnaarryySSttrreeaamm (std::istream │ │ │ │ + &in_archive_stream, T &output, const std::string &name="data") │ │ │ │ +  deserializes from a stream in binary │ │ │ │ +  │ │ │ │ +template │ │ │ │ +std::string  ggttssaamm::::sseerriiaalliizzeeTTooBBiinnaarryySSttrriinngg (const T &input, const std::string │ │ │ │ + &name="data") │ │ │ │ +  serializes to a string in binary │ │ │ │ +  │ │ │ │ +template │ │ │ │ + void  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommBBiinnaarryySSttrriinngg (const std::string &serialized, │ │ │ │ + T &output, const std::string &name="data") │ │ │ │ +  deserializes from a string in binary │ │ │ │ +  │ │ │ │ +template │ │ │ │ + bool  ggttssaamm::::sseerriiaalliizzeeTTooBBiinnaarryyFFiillee (const T &input, const std::string │ │ │ │ + &filename, const std::string &name="data") │ │ │ │ +  serializes to a binary file │ │ │ │ +  │ │ │ │ +template │ │ │ │ + bool  ggttssaamm::::ddeesseerriiaalliizzeeFFrroommBBiinnaarryyFFiillee (const std::string &filename, T │ │ │ │ + &output, const std::string &name="data") │ │ │ │ +  deserializes from a binary file │ │ │ │ +  │ │ │ │ +template │ │ │ │ +std::string  ggttssaamm::::sseerriiaalliizzeeBBiinnaarryy (const T &input, const std::string │ │ │ │ + &name="data") │ │ │ │ +  serializes to a string in binary │ │ │ │ +  │ │ │ │ +template │ │ │ │ + void  ggttssaamm::::ddeesseerriiaalliizzeeBBiinnaarryy (const std::string &serialized, T │ │ │ │ + &output, const std::string &name="data") │ │ │ │ +  deserializes from a string in binary │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Concept check for values that can be used in unit tests. │ │ │ │ +Convenience functions for serializing data structures via boost.serialization. │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ -The necessary functions to implement for Testable are defined below with │ │ │ │ -additional details as to the interface. The concept checking function will │ │ │ │ -check whether or not the function exists in derived class and throw compile- │ │ │ │ -time errors. │ │ │ │ -print with optional string naming the object void print(const std::string& │ │ │ │ -name) const = 0; │ │ │ │ -equality up to tolerance tricky to implement, see PriorFactor for an example │ │ │ │ -equals is not supposed to print out aannyytthhiinngg, just return true|false bool │ │ │ │ -equals(const Derived& expected, double tol) const = 0; │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? GGTTSSAAMM__CCOONNCCEEPPTT__TTEESSTTAABBLLEE__IINNSSTT ********** │ │ │ │ -#define GTSAM_CONCEPT_TESTABLE_INST (   T )    template class _g_t_s_a_m_:_: │ │ │ │ - _I_s_T_e_s_t_a_b_l_e; │ │ │ │ -Macros for using the TestableConcept. │ │ │ │ - * An instantiation for use inside unit tests │ │ │ │ - * A typedef for use inside generic algorithms │ │ │ │ -NOTE: intentionally not in the gtsam namespace to allow for classes not in the │ │ │ │ -gtsam namespace to be more easily enforced as testable │ │ │ │ - _DD_ee_pp_rr_ee_cc_aa_tt_ee_dd_:: │ │ │ │ - please use BOOST_CONCEPT_ASSERT and │ │ │ │ + Alex Cunningham │ │ │ │ + Richard Roberts │ │ │ │ + Date │ │ │ │ + Feb 7, 2012 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _T_e_s_t_a_b_l_e_._h │ │ │ │ + * _s_e_r_i_a_l_i_z_a_t_i_o_n_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00089.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,10 +1,26 @@ │ │ │ │ var a00089 = [ │ │ │ │ - ["gtsam::equals< V >", "a02480.html", null], │ │ │ │ - ["gtsam::equals_star< V >", "a02484.html", null], │ │ │ │ - ["gtsam::HasTestablePrereqs< T >", "a02488.html", null], │ │ │ │ - ["gtsam::Testable< T >", "a02492.html", null], │ │ │ │ - ["GTSAM_CONCEPT_TESTABLE_INST", "a00089.html#abe0a238cdd07d484ff0be56ae945b182", null], │ │ │ │ - ["assert_equal", "a00089.html#a659619cca082d1c10b07c033d48c54da", null], │ │ │ │ - ["equal", "a00089.html#a1f3dc67ad88b799c469088e428c583b1", null], │ │ │ │ - ["equal", "a00089.html#ad2dbee4a72127938c79162cc8b6d5152", null] │ │ │ │ + ["deserialize", "a00089.html#aa4d516d0d98946341ad2766521011d1b", null], │ │ │ │ + ["deserializeBinary", "a00089.html#a56c41958e57a4bc7361ab593011462fd", null], │ │ │ │ + ["deserializeFromBinaryFile", "a00089.html#aefeb77f2324e4bbfca2c8152c49a4565", null], │ │ │ │ + ["deserializeFromBinaryStream", "a00089.html#a8eb16192d8ebe2532d8a69c9f2bf15b2", null], │ │ │ │ + ["deserializeFromBinaryString", "a00089.html#a349b7ed4a67a8c3d80737e5383507bc4", null], │ │ │ │ + ["deserializeFromFile", "a00089.html#adbb4a71187706918faca3a11519b62f6", null], │ │ │ │ + ["deserializeFromStream", "a00089.html#ab181d2a3de466fc0c87bd29501bbc7ab", null], │ │ │ │ + ["deserializeFromString", "a00089.html#a262487af458d1f48dd7d3bc549caae00", null], │ │ │ │ + ["deserializeFromXMLFile", "a00089.html#a0d8faf2bb0a908ff484677bb2fcf707c", null], │ │ │ │ + ["deserializeFromXMLStream", "a00089.html#a8d7ea177ef3e93af15a4a77c2bd7fa8b", null], │ │ │ │ + ["deserializeFromXMLString", "a00089.html#a5f2fe2bfc17737ff9ae1fb8b210604f0", null], │ │ │ │ + ["deserializeXML", "a00089.html#a85ab51b2e8f4cea69f72e06a5c136e85", null], │ │ │ │ + ["serialize", "a00089.html#a332bad7d1e70d3c04ceca35adce7a134", null], │ │ │ │ + ["serializeBinary", "a00089.html#abb476c3e77878f7e0f70dd51871f48e7", null], │ │ │ │ + ["serializeToBinaryFile", "a00089.html#abdff0a4b4fdf0e609aa62fb8d8b1dbba", null], │ │ │ │ + ["serializeToBinaryStream", "a00089.html#aa5d177a3bf16f9f5acf45ee62c816479", null], │ │ │ │ + ["serializeToBinaryString", "a00089.html#a7fad959f63f2eac1478c5ede7b9ae4db", null], │ │ │ │ + ["serializeToFile", "a00089.html#aa3261c2d455f892dae1921f8c3a39267", null], │ │ │ │ + ["serializeToStream", "a00089.html#a007080ca4741cc3d3d6a209b0ae3fe61", null], │ │ │ │ + ["serializeToString", "a00089.html#aa12c78301a9d2968afe5a1a14baa7e90", null], │ │ │ │ + ["serializeToXMLFile", "a00089.html#a89449123a746480a1d668cecb5576708", null], │ │ │ │ + ["serializeToXMLStream", "a00089.html#ae2e939177cf58b42d7ed4c9856d536c5", null], │ │ │ │ + ["serializeToXMLString", "a00089.html#a16c154fe5e35242e26af8286e77eea11", null], │ │ │ │ + ["serializeXML", "a00089.html#a976ff7999fcc13ef602b6ece1b078bca", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00089_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Testable.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/serialization.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,171 +98,319 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Testable.h
│ │ │ +
serialization.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
32// \callgraph
│ │ │ -
33
│ │ │ -
34#pragma once
│ │ │ -
35
│ │ │ -
36#include <boost/concept_check.hpp>
│ │ │ -
37#include <functional>
│ │ │ -
38#include <iostream>
│ │ │ -
39#include <memory>
│ │ │ -
40#include <string>
│ │ │ -
41
│ │ │ -
42#define GTSAM_PRINT(x)((x).print(#x))
│ │ │ -
43
│ │ │ -
44namespace gtsam {
│ │ │ -
45
│ │ │ -
46 // Forward declaration
│ │ │ -
47 template <typename T> struct traits;
│ │ │ -
48
│ │ │ -
57 template <class T>
│ │ │ -
│ │ │ -
58 class IsTestable {
│ │ │ -
59 T t;
│ │ │ -
60 bool r1,r2;
│ │ │ -
61 public:
│ │ │ -
62
│ │ │ -
63 BOOST_CONCEPT_USAGE(IsTestable) {
│ │ │ -
64 // check print function, with optional string
│ │ │ -
65 traits<T>::Print(t, std::string());
│ │ │ - │ │ │ -
67
│ │ │ -
68 // check print, with optional threshold
│ │ │ -
69 double tol = 1.0;
│ │ │ -
70 r1 = traits<T>::Equals(t,t,tol);
│ │ │ -
71 r2 = traits<T>::Equals(t,t);
│ │ │ -
72 }
│ │ │ -
73 }; // \ Testable
│ │ │ -
│ │ │ -
74
│ │ │ -
75 inline void print(float v, const std::string& s = "") {
│ │ │ -
76 std::cout << (s.empty() ? s : s + " ") << v << std::endl;
│ │ │ -
77 }
│ │ │ -
78 inline void print(double v, const std::string& s = "") {
│ │ │ -
79 std::cout << (s.empty() ? s : s + " ") << v << std::endl;
│ │ │ -
80 }
│ │ │ -
81
│ │ │ -
83 template<class T>
│ │ │ -
│ │ │ -
84 inline bool equal(const T& obj1, const T& obj2, double tol) {
│ │ │ -
85 return traits<T>::Equals(obj1,obj2, tol);
│ │ │ -
86 }
│ │ │ -
│ │ │ -
87
│ │ │ -
89 template<class T>
│ │ │ -
│ │ │ -
90 inline bool equal(const T& obj1, const T& obj2) {
│ │ │ -
91 return traits<T>::Equals(obj1,obj2);
│ │ │ -
92 }
│ │ │ -
│ │ │ -
93
│ │ │ -
97 template<class V>
│ │ │ -
│ │ │ -
98 bool assert_equal(const V& expected, const V& actual, double tol = 1e-9) {
│ │ │ -
99 if (traits<V>::Equals(actual,expected, tol))
│ │ │ -
100 return true;
│ │ │ -
101 printf("Not equal:\n");
│ │ │ -
102 traits<V>::Print(expected,"expected:\n");
│ │ │ -
103 traits<V>::Print(actual,"actual:\n");
│ │ │ -
104 return false;
│ │ │ -
105 }
│ │ │ -
│ │ │ -
106
│ │ │ -
110 template<class V>
│ │ │ -
│ │ │ -
111 struct equals : public std::function<bool(const V&, const V&)> {
│ │ │ -
112 double tol_;
│ │ │ -
113 equals(double tol = 1e-9) : tol_(tol) {}
│ │ │ -
114 bool operator()(const V& expected, const V& actual) {
│ │ │ -
115 return (traits<V>::Equals(actual, expected, tol_));
│ │ │ -
116 }
│ │ │ -
117 };
│ │ │ -
│ │ │ -
118
│ │ │ -
122 template<class V>
│ │ │ -
│ │ │ -
123 struct equals_star : public std::function<bool(const std::shared_ptr<V>&, const std::shared_ptr<V>&)> {
│ │ │ -
124 double tol_;
│ │ │ -
125 equals_star(double tol = 1e-9) : tol_(tol) {}
│ │ │ -
126 bool operator()(const std::shared_ptr<V>& expected, const std::shared_ptr<V>& actual) {
│ │ │ -
127 if (!actual && !expected) return true;
│ │ │ -
128 return actual && expected && traits<V>::Equals(*actual,*expected, tol_);
│ │ │ -
129 }
│ │ │ -
130 };
│ │ │ -
│ │ │ -
131
│ │ │ -
133 template<typename T>
│ │ │ -
│ │ │ - │ │ │ +
20#pragma once
│ │ │ +
21
│ │ │ +
22#include <Eigen/Core>
│ │ │ +
23#include <fstream>
│ │ │ +
24#include <sstream>
│ │ │ +
25#include <string>
│ │ │ +
26
│ │ │ +
27// includes for standard serialization types
│ │ │ +
28#include <boost/serialization/version.hpp>
│ │ │ +
29#include <boost/serialization/optional.hpp>
│ │ │ +
30#include <boost/serialization/shared_ptr.hpp>
│ │ │ +
31#include <boost/serialization/vector.hpp>
│ │ │ +
32#include <boost/serialization/map.hpp>
│ │ │ +
33#include <boost/serialization/list.hpp>
│ │ │ +
34#include <boost/serialization/deque.hpp>
│ │ │ +
35#include <boost/serialization/weak_ptr.hpp>
│ │ │ +
36
│ │ │ +
37#include <boost/archive/text_oarchive.hpp>
│ │ │ +
38#include <boost/archive/text_iarchive.hpp>
│ │ │ +
39#include <boost/archive/xml_iarchive.hpp>
│ │ │ +
40#include <boost/archive/xml_oarchive.hpp>
│ │ │ +
41#include <boost/archive/binary_iarchive.hpp>
│ │ │ +
42#include <boost/archive/binary_oarchive.hpp>
│ │ │ +
43#include <boost/serialization/export.hpp>
│ │ │ +
44
│ │ │ +
45// Workaround a bug in GCC >= 7 and C++17
│ │ │ +
46// ref. https://gitlab.com/libeigen/eigen/-/issues/1676
│ │ │ +
47#ifdef __GNUC__
│ │ │ +
48#if __GNUC__ >= 7 && __cplusplus >= 201703L
│ │ │ +
49namespace boost { namespace serialization { struct U; } }
│ │ │ +
50namespace Eigen { namespace internal {
│ │ │ +
51template<> struct traits<boost::serialization::U> {enum {Flags=0};};
│ │ │ +
52} }
│ │ │ +
53#endif
│ │ │ +
54#endif
│ │ │ +
55
│ │ │ +
56namespace gtsam {
│ │ │ +
57
│ │ │ +
63template <class T>
│ │ │ +
│ │ │ +
64void serializeToStream(const T& input, std::ostream& out_archive_stream) {
│ │ │ +
65 boost::archive::text_oarchive out_archive(out_archive_stream);
│ │ │ +
66 out_archive << input;
│ │ │ +
67}
│ │ │ +
│ │ │ +
68
│ │ │ +
70template <class T>
│ │ │ +
│ │ │ +
71void deserializeFromStream(std::istream& in_archive_stream, T& output) {
│ │ │ +
72 boost::archive::text_iarchive in_archive(in_archive_stream);
│ │ │ +
73 in_archive >> output;
│ │ │ +
74}
│ │ │ +
│ │ │ +
75
│ │ │ +
77template <class T>
│ │ │ +
│ │ │ +
78std::string serializeToString(const T& input) {
│ │ │ +
79 std::ostringstream out_archive_stream;
│ │ │ +
80 serializeToStream(input, out_archive_stream);
│ │ │ +
81 return out_archive_stream.str();
│ │ │ +
82}
│ │ │ +
│ │ │ +
83
│ │ │ +
85template <class T>
│ │ │ +
│ │ │ +
86void deserializeFromString(const std::string& serialized, T& output) {
│ │ │ +
87 std::istringstream in_archive_stream(serialized);
│ │ │ +
88 deserializeFromStream(in_archive_stream, output);
│ │ │ +
89}
│ │ │ +
│ │ │ +
90
│ │ │ +
92template <class T>
│ │ │ +
│ │ │ +
93bool serializeToFile(const T& input, const std::string& filename) {
│ │ │ +
94 std::ofstream out_archive_stream(filename.c_str());
│ │ │ +
95 if (!out_archive_stream.is_open()) return false;
│ │ │ +
96 serializeToStream(input, out_archive_stream);
│ │ │ +
97 out_archive_stream.close();
│ │ │ +
98 return true;
│ │ │ +
99}
│ │ │ +
│ │ │ +
100
│ │ │ +
102template <class T>
│ │ │ +
│ │ │ +
103bool deserializeFromFile(const std::string& filename, T& output) {
│ │ │ +
104 std::ifstream in_archive_stream(filename.c_str());
│ │ │ +
105 if (!in_archive_stream.is_open()) return false;
│ │ │ +
106 deserializeFromStream(in_archive_stream, output);
│ │ │ +
107 in_archive_stream.close();
│ │ │ +
108 return true;
│ │ │ +
109}
│ │ │ +
│ │ │ +
110
│ │ │ +
112template <class T>
│ │ │ +
│ │ │ +
113std::string serialize(const T& input) {
│ │ │ +
114 return serializeToString(input);
│ │ │ +
115}
│ │ │ +
│ │ │ +
116
│ │ │ +
118template <class T>
│ │ │ +
│ │ │ +
119void deserialize(const std::string& serialized, T& output) {
│ │ │ +
120 deserializeFromString(serialized, output);
│ │ │ +
121}
│ │ │ +
│ │ │ +
123
│ │ │ +
129template <class T>
│ │ │ +
│ │ │ +
130void serializeToXMLStream(const T& input, std::ostream& out_archive_stream,
│ │ │ +
131 const std::string& name = "data") {
│ │ │ +
132 boost::archive::xml_oarchive out_archive(out_archive_stream);
│ │ │ +
133 out_archive << boost::serialization::make_nvp(name.c_str(), input);
│ │ │ +
134}
│ │ │ +
│ │ │
135
│ │ │ -
136 BOOST_CONCEPT_USAGE(HasTestablePrereqs) {
│ │ │ -
137 t->print(str);
│ │ │ -
138 b = t->equals(*s,tol);
│ │ │ -
139 }
│ │ │ -
140
│ │ │ -
141 T *t, *s; // Pointer is to allow abstract classes
│ │ │ -
142 bool b;
│ │ │ -
143 double tol;
│ │ │ -
144 std::string str;
│ │ │ -
145 };
│ │ │ -
│ │ │ -
146
│ │ │ -
150 template<typename T>
│ │ │ -
│ │ │ -
151 struct Testable {
│ │ │ +
137template <class T>
│ │ │ +
│ │ │ +
138void deserializeFromXMLStream(std::istream& in_archive_stream, T& output,
│ │ │ +
139 const std::string& name = "data") {
│ │ │ +
140 boost::archive::xml_iarchive in_archive(in_archive_stream);
│ │ │ +
141 in_archive >> boost::serialization::make_nvp(name.c_str(), output);
│ │ │ +
142}
│ │ │ +
│ │ │ +
143
│ │ │ +
145template <class T>
│ │ │ +
│ │ │ +
146std::string serializeToXMLString(const T& input,
│ │ │ +
147 const std::string& name = "data") {
│ │ │ +
148 std::ostringstream out_archive_stream;
│ │ │ +
149 serializeToXMLStream(input, out_archive_stream, name);
│ │ │ +
150 return out_archive_stream.str();
│ │ │ +
151}
│ │ │ +
│ │ │
152
│ │ │ -
153 // Check that T has the necessary methods
│ │ │ -
154 BOOST_CONCEPT_ASSERT((HasTestablePrereqs<T>));
│ │ │ -
155
│ │ │ -
156 static void Print(const T& m, const std::string& str = "") {
│ │ │ -
157 m.print(str);
│ │ │ -
158 }
│ │ │ -
159 static bool Equals(const T& m1, const T& m2, double tol = 1e-8) {
│ │ │ -
160 return m1.equals(m2, tol);
│ │ │ -
161 }
│ │ │ -
162 };
│ │ │ -
│ │ │ -
163
│ │ │ -
164} // \namespace gtsam
│ │ │ -
165
│ │ │ -
175#define GTSAM_CONCEPT_TESTABLE_INST(T) template class gtsam::IsTestable<T>;
│ │ │ -
176#define GTSAM_CONCEPT_TESTABLE_TYPE(T) using _gtsam_Testable_##T = gtsam::IsTestable<T>;
│ │ │ +
154template <class T>
│ │ │ +
│ │ │ +
155void deserializeFromXMLString(const std::string& serialized, T& output,
│ │ │ +
156 const std::string& name = "data") {
│ │ │ +
157 std::istringstream in_archive_stream(serialized);
│ │ │ +
158 deserializeFromXMLStream(in_archive_stream, output, name);
│ │ │ +
159}
│ │ │ +
│ │ │ +
160
│ │ │ +
162template <class T>
│ │ │ +
│ │ │ +
163bool serializeToXMLFile(const T& input, const std::string& filename,
│ │ │ +
164 const std::string& name = "data") {
│ │ │ +
165 std::ofstream out_archive_stream(filename.c_str());
│ │ │ +
166 if (!out_archive_stream.is_open()) return false;
│ │ │ +
167 serializeToXMLStream(input, out_archive_stream, name);
│ │ │ +
168 out_archive_stream.close();
│ │ │ +
169 return true;
│ │ │ +
170}
│ │ │ +
│ │ │ +
171
│ │ │ +
173template <class T>
│ │ │ +
│ │ │ +
174bool deserializeFromXMLFile(const std::string& filename, T& output,
│ │ │ +
175 const std::string& name = "data") {
│ │ │ +
176 std::ifstream in_archive_stream(filename.c_str());
│ │ │ +
177 if (!in_archive_stream.is_open()) return false;
│ │ │ +
178 deserializeFromXMLStream(in_archive_stream, output, name);
│ │ │ +
179 in_archive_stream.close();
│ │ │ +
180 return true;
│ │ │ +
181}
│ │ │ +
│ │ │ +
182
│ │ │ +
184template <class T>
│ │ │ +
│ │ │ +
185std::string serializeXML(const T& input,
│ │ │ +
186 const std::string& name = "data") {
│ │ │ +
187 return serializeToXMLString(input, name);
│ │ │ +
188}
│ │ │ +
│ │ │ +
189
│ │ │ +
191template <class T>
│ │ │ +
│ │ │ +
192void deserializeXML(const std::string& serialized, T& output,
│ │ │ +
193 const std::string& name = "data") {
│ │ │ +
194 deserializeFromXMLString(serialized, output, name);
│ │ │ +
195}
│ │ │ +
│ │ │ +
197
│ │ │ +
203template <class T>
│ │ │ +
│ │ │ +
204void serializeToBinaryStream(const T& input, std::ostream& out_archive_stream,
│ │ │ +
205 const std::string& name = "data") {
│ │ │ +
206 boost::archive::binary_oarchive out_archive(out_archive_stream);
│ │ │ +
207 out_archive << boost::serialization::make_nvp(name.c_str(), input);
│ │ │ +
208}
│ │ │ +
│ │ │ +
209
│ │ │ +
211template <class T>
│ │ │ +
│ │ │ +
212void deserializeFromBinaryStream(std::istream& in_archive_stream, T& output,
│ │ │ +
213 const std::string& name = "data") {
│ │ │ +
214 boost::archive::binary_iarchive in_archive(in_archive_stream);
│ │ │ +
215 in_archive >> boost::serialization::make_nvp(name.c_str(), output);
│ │ │ +
216}
│ │ │ +
│ │ │ +
217
│ │ │ +
219template <class T>
│ │ │ +
│ │ │ +
220std::string serializeToBinaryString(const T& input,
│ │ │ +
221 const std::string& name = "data") {
│ │ │ +
222 std::ostringstream out_archive_stream;
│ │ │ +
223 serializeToBinaryStream(input, out_archive_stream, name);
│ │ │ +
224 return out_archive_stream.str();
│ │ │ +
225}
│ │ │ +
│ │ │ +
226
│ │ │ +
228template <class T>
│ │ │ +
│ │ │ +
229void deserializeFromBinaryString(const std::string& serialized, T& output,
│ │ │ +
230 const std::string& name = "data") {
│ │ │ +
231 std::istringstream in_archive_stream(serialized);
│ │ │ +
232 deserializeFromBinaryStream(in_archive_stream, output, name);
│ │ │ +
233}
│ │ │ +
│ │ │ +
234
│ │ │ +
236template <class T>
│ │ │ +
│ │ │ +
237bool serializeToBinaryFile(const T& input, const std::string& filename,
│ │ │ +
238 const std::string& name = "data") {
│ │ │ +
239 std::ofstream out_archive_stream(filename.c_str());
│ │ │ +
240 if (!out_archive_stream.is_open()) return false;
│ │ │ +
241 serializeToBinaryStream(input, out_archive_stream, name);
│ │ │ +
242 out_archive_stream.close();
│ │ │ +
243 return true;
│ │ │ +
244}
│ │ │ +
│ │ │ +
245
│ │ │ +
247template <class T>
│ │ │ +
│ │ │ +
248bool deserializeFromBinaryFile(const std::string& filename, T& output,
│ │ │ +
249 const std::string& name = "data") {
│ │ │ +
250 std::ifstream in_archive_stream(filename.c_str());
│ │ │ +
251 if (!in_archive_stream.is_open()) return false;
│ │ │ +
252 deserializeFromBinaryStream(in_archive_stream, output, name);
│ │ │ +
253 in_archive_stream.close();
│ │ │ +
254 return true;
│ │ │ +
255}
│ │ │ +
│ │ │ +
256
│ │ │ +
258template <class T>
│ │ │ +
│ │ │ +
259std::string serializeBinary(const T& input,
│ │ │ +
260 const std::string& name = "data") {
│ │ │ +
261 return serializeToBinaryString(input, name);
│ │ │ +
262}
│ │ │ +
│ │ │ +
263
│ │ │ +
265template <class T>
│ │ │ +
│ │ │ +
266void deserializeBinary(const std::string& serialized, T& output,
│ │ │ +
267 const std::string& name = "data") {
│ │ │ +
268 deserializeFromBinaryString(serialized, output, name);
│ │ │ +
269}
│ │ │ +
│ │ │ +
271
│ │ │ +
272} // namespace gtsam
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
equals with an tolerance, prints out message if unequal
Definition Matrix.cpp:43
│ │ │ -
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:156
│ │ │ -
bool equal(const T &obj1, const T &obj2, double tol)
Call equal on the object.
Definition Testable.h:84
│ │ │ -
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ -
A testable concept check that should be placed in applicable unit tests and in generic algorithms.
Definition Testable.h:58
│ │ │ -
Template to create a binary predicate.
Definition Testable.h:111
│ │ │ -
Binary predicate on shared pointers.
Definition Testable.h:123
│ │ │ -
Requirements on type to pass it to Testable template below.
Definition Testable.h:134
│ │ │ -
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:151
│ │ │ +
void serializeToStream(const T &input, std::ostream &out_archive_stream)
Definition serialization.h:64
│ │ │ +
bool deserializeFromXMLFile(const std::string &filename, T &output, const std::string &name="data")
deserializes from an XML file
Definition serialization.h:174
│ │ │ +
std::string serializeToXMLString(const T &input, const std::string &name="data")
serializes to a string in XML
Definition serialization.h:146
│ │ │ +
void deserializeFromString(const std::string &serialized, T &output)
deserializes from a string
Definition serialization.h:86
│ │ │ +
std::string serialize(const T &input)
serializes to a string
Definition serialization.h:113
│ │ │ +
void deserializeFromBinaryString(const std::string &serialized, T &output, const std::string &name="data")
deserializes from a string in binary
Definition serialization.h:229
│ │ │ +
void deserializeBinary(const std::string &serialized, T &output, const std::string &name="data")
deserializes from a string in binary
Definition serialization.h:266
│ │ │ +
void deserializeFromXMLString(const std::string &serialized, T &output, const std::string &name="data")
deserializes from a string in XML
Definition serialization.h:155
│ │ │ +
std::string serializeToBinaryString(const T &input, const std::string &name="data")
serializes to a string in binary
Definition serialization.h:220
│ │ │ +
void deserializeXML(const std::string &serialized, T &output, const std::string &name="data")
deserializes from a string in XML
Definition serialization.h:192
│ │ │ +
bool serializeToXMLFile(const T &input, const std::string &filename, const std::string &name="data")
serializes to an XML file
Definition serialization.h:163
│ │ │ +
void deserializeFromXMLStream(std::istream &in_archive_stream, T &output, const std::string &name="data")
deserializes from a stream in XML
Definition serialization.h:138
│ │ │ +
void deserializeFromBinaryStream(std::istream &in_archive_stream, T &output, const std::string &name="data")
deserializes from a stream in binary
Definition serialization.h:212
│ │ │ +
std::string serializeXML(const T &input, const std::string &name="data")
serializes to a string in XML
Definition serialization.h:185
│ │ │ +
std::string serializeToString(const T &input)
serializes to a string
Definition serialization.h:78
│ │ │ +
bool serializeToFile(const T &input, const std::string &filename)
serializes to a file
Definition serialization.h:93
│ │ │ +
void deserialize(const std::string &serialized, T &output)
deserializes from a string
Definition serialization.h:119
│ │ │ +
void serializeToBinaryStream(const T &input, std::ostream &out_archive_stream, const std::string &name="data")
Definition serialization.h:204
│ │ │ +
void deserializeFromStream(std::istream &in_archive_stream, T &output)
deserializes from a stream
Definition serialization.h:71
│ │ │ +
std::string serializeBinary(const T &input, const std::string &name="data")
serializes to a string in binary
Definition serialization.h:259
│ │ │ +
bool serializeToBinaryFile(const T &input, const std::string &filename, const std::string &name="data")
serializes to a binary file
Definition serialization.h:237
│ │ │ +
bool deserializeFromFile(const std::string &filename, T &output)
deserializes from a file
Definition serialization.h:103
│ │ │ +
void serializeToXMLStream(const T &input, std::ostream &out_archive_stream, const std::string &name="data")
Definition serialization.h:130
│ │ │ +
bool deserializeFromBinaryFile(const std::string &filename, T &output, const std::string &name="data")
deserializes from a binary file
Definition serialization.h:248
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,175 +1,349 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Testable.h │ │ │ │ +serialization.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -32// \callgraph │ │ │ │ -33 │ │ │ │ -34#pragma once │ │ │ │ -35 │ │ │ │ -36#include │ │ │ │ -37#include │ │ │ │ -38#include │ │ │ │ -39#include │ │ │ │ -40#include │ │ │ │ -41 │ │ │ │ -42#define GTSAM_PRINT(x)((x).print(#x)) │ │ │ │ -43 │ │ │ │ -44namespace _g_t_s_a_m { │ │ │ │ -45 │ │ │ │ -46 // Forward declaration │ │ │ │ -47 template struct traits; │ │ │ │ -48 │ │ │ │ -57 template │ │ │ │ -_5_8 class _I_s_T_e_s_t_a_b_l_e { │ │ │ │ -59 T t; │ │ │ │ -60 bool r1,r2; │ │ │ │ -61 public: │ │ │ │ -62 │ │ │ │ -63 BOOST_CONCEPT_USAGE(_I_s_T_e_s_t_a_b_l_e) { │ │ │ │ -64 // check print function, with optional string │ │ │ │ -65 _t_r_a_i_t_s_<_T_>_:_:_P_r_i_n_t(t, std::string()); │ │ │ │ -66 _t_r_a_i_t_s_<_T_>_:_:_P_r_i_n_t(t); │ │ │ │ -67 │ │ │ │ -68 // check print, with optional threshold │ │ │ │ -69 double tol = 1.0; │ │ │ │ -70 r1 = _t_r_a_i_t_s_<_T_>_:_:_E_q_u_a_l_s(t,t,tol); │ │ │ │ -71 r2 = _t_r_a_i_t_s_<_T_>_:_:_E_q_u_a_l_s(t,t); │ │ │ │ -72 } │ │ │ │ -73 }; // \ Testable │ │ │ │ -74 │ │ │ │ -75 inline void _p_r_i_n_t(float v, const std::string& s = "") { │ │ │ │ -76 std::cout << (s.empty() ? s : s + " ") << v << std::endl; │ │ │ │ -77 } │ │ │ │ -78 inline void _p_r_i_n_t(double v, const std::string& s = "") { │ │ │ │ -79 std::cout << (s.empty() ? s : s + " ") << v << std::endl; │ │ │ │ -80 } │ │ │ │ -81 │ │ │ │ -83 template │ │ │ │ -_8_4 inline bool _e_q_u_a_l(const T& obj1, const T& obj2, double tol) { │ │ │ │ -85 return _t_r_a_i_t_s_<_T_>_:_:_E_q_u_a_l_s(obj1,obj2, tol); │ │ │ │ -86 } │ │ │ │ -87 │ │ │ │ -89 template │ │ │ │ -_9_0 inline bool _e_q_u_a_l(const T& obj1, const T& obj2) { │ │ │ │ -91 return _t_r_a_i_t_s_<_T_>_:_:_E_q_u_a_l_s(obj1,obj2); │ │ │ │ -92 } │ │ │ │ -93 │ │ │ │ -97 template │ │ │ │ -_9_8 bool _a_s_s_e_r_t___e_q_u_a_l(const V& expected, const V& actual, double tol = 1e-9) { │ │ │ │ -99 if (_t_r_a_i_t_s_<_V_>_:_:_E_q_u_a_l_s(actual,expected, tol)) │ │ │ │ -100 return true; │ │ │ │ -101 printf("Not equal:\n"); │ │ │ │ -102 _t_r_a_i_t_s_<_V_>_:_:_P_r_i_n_t(expected,"expected:\n"); │ │ │ │ -103 _t_r_a_i_t_s_<_V_>_:_:_P_r_i_n_t(actual,"actual:\n"); │ │ │ │ -104 return false; │ │ │ │ -105 } │ │ │ │ -106 │ │ │ │ -110 template │ │ │ │ -_1_1_1 struct _e_q_u_a_l_s : public std::function { │ │ │ │ -112 double tol_; │ │ │ │ -113 _e_q_u_a_l_s(double tol = 1e-9) : tol_(tol) {} │ │ │ │ -114 bool operator()(const V& expected, const V& actual) { │ │ │ │ -115 return (_t_r_a_i_t_s_<_V_>_:_:_E_q_u_a_l_s(actual, expected, tol_)); │ │ │ │ -116 } │ │ │ │ -117 }; │ │ │ │ -118 │ │ │ │ -122 template │ │ │ │ -_1_2_3 struct _e_q_u_a_l_s___s_t_a_r : public std::function&, │ │ │ │ -const std::shared_ptr&)> { │ │ │ │ -124 double tol_; │ │ │ │ -125 _e_q_u_a_l_s___s_t_a_r(double tol = 1e-9) : tol_(tol) {} │ │ │ │ -126 bool operator()(const std::shared_ptr& expected, const std:: │ │ │ │ -shared_ptr& actual) { │ │ │ │ -127 if (!actual && !expected) return true; │ │ │ │ -128 return actual && expected && _t_r_a_i_t_s_<_V_>_:_:_E_q_u_a_l_s(*actual,*expected, tol_); │ │ │ │ -129 } │ │ │ │ -130 }; │ │ │ │ -131 │ │ │ │ -133 template │ │ │ │ -_1_3_4 struct _H_a_s_T_e_s_t_a_b_l_e_P_r_e_r_e_q_s { │ │ │ │ +20#pragma once │ │ │ │ +21 │ │ │ │ +22#include │ │ │ │ +23#include │ │ │ │ +24#include │ │ │ │ +25#include │ │ │ │ +26 │ │ │ │ +27// includes for standard serialization types │ │ │ │ +28#include │ │ │ │ +29#include │ │ │ │ +30#include │ │ │ │ +31#include │ │ │ │ +32#include │ │ │ │ +33#include │ │ │ │ +34#include │ │ │ │ +35#include │ │ │ │ +36 │ │ │ │ +37#include │ │ │ │ +38#include │ │ │ │ +39#include │ │ │ │ +40#include │ │ │ │ +41#include │ │ │ │ +42#include │ │ │ │ +43#include │ │ │ │ +44 │ │ │ │ +45// Workaround a bug in GCC >= 7 and C++17 │ │ │ │ +46// ref. https://gitlab.com/libeigen/eigen/-/issues/1676 │ │ │ │ +47#ifdef __GNUC__ │ │ │ │ +48#if __GNUC__ >= 7 && __cplusplus >= 201703L │ │ │ │ +49namespace boost { namespace serialization { struct U; } } │ │ │ │ +50namespace Eigen { namespace internal { │ │ │ │ +51template<> struct traits {enum {Flags=0};}; │ │ │ │ +52} } │ │ │ │ +53#endif │ │ │ │ +54#endif │ │ │ │ +55 │ │ │ │ +56namespace _g_t_s_a_m { │ │ │ │ +57 │ │ │ │ +63template │ │ │ │ +_6_4void _s_e_r_i_a_l_i_z_e_T_o_S_t_r_e_a_m(const T& input, std::ostream& out_archive_stream) { │ │ │ │ +65 boost::archive::text_oarchive out_archive(out_archive_stream); │ │ │ │ +66 out_archive << input; │ │ │ │ +67} │ │ │ │ +68 │ │ │ │ +70template │ │ │ │ +_7_1void _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_S_t_r_e_a_m(std::istream& in_archive_stream, T& output) { │ │ │ │ +72 boost::archive::text_iarchive in_archive(in_archive_stream); │ │ │ │ +73 in_archive >> output; │ │ │ │ +74} │ │ │ │ +75 │ │ │ │ +77template │ │ │ │ +_7_8std::string _s_e_r_i_a_l_i_z_e_T_o_S_t_r_i_n_g(const T& input) { │ │ │ │ +79 std::ostringstream out_archive_stream; │ │ │ │ +80 _s_e_r_i_a_l_i_z_e_T_o_S_t_r_e_a_m(input, out_archive_stream); │ │ │ │ +81 return out_archive_stream.str(); │ │ │ │ +82} │ │ │ │ +83 │ │ │ │ +85template │ │ │ │ +_8_6void _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_S_t_r_i_n_g(const std::string& serialized, T& output) { │ │ │ │ +87 std::istringstream in_archive_stream(serialized); │ │ │ │ +88 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_S_t_r_e_a_m(in_archive_stream, output); │ │ │ │ +89} │ │ │ │ +90 │ │ │ │ +92template │ │ │ │ +_9_3bool _s_e_r_i_a_l_i_z_e_T_o_F_i_l_e(const T& input, const std::string& filename) { │ │ │ │ +94 std::ofstream out_archive_stream(filename.c_str()); │ │ │ │ +95 if (!out_archive_stream.is_open()) return false; │ │ │ │ +96 _s_e_r_i_a_l_i_z_e_T_o_S_t_r_e_a_m(input, out_archive_stream); │ │ │ │ +97 out_archive_stream.close(); │ │ │ │ +98 return true; │ │ │ │ +99} │ │ │ │ +100 │ │ │ │ +102template │ │ │ │ +_1_0_3bool _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_F_i_l_e(const std::string& filename, T& output) { │ │ │ │ +104 std::ifstream in_archive_stream(filename.c_str()); │ │ │ │ +105 if (!in_archive_stream.is_open()) return false; │ │ │ │ +106 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_S_t_r_e_a_m(in_archive_stream, output); │ │ │ │ +107 in_archive_stream.close(); │ │ │ │ +108 return true; │ │ │ │ +109} │ │ │ │ +110 │ │ │ │ +112template │ │ │ │ +_1_1_3std::string _s_e_r_i_a_l_i_z_e(const T& input) { │ │ │ │ +114 return _s_e_r_i_a_l_i_z_e_T_o_S_t_r_i_n_g(input); │ │ │ │ +115} │ │ │ │ +116 │ │ │ │ +118template │ │ │ │ +_1_1_9void _d_e_s_e_r_i_a_l_i_z_e(const std::string& serialized, T& output) { │ │ │ │ +120 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_S_t_r_i_n_g(serialized, output); │ │ │ │ +121} │ │ │ │ +123 │ │ │ │ +129template │ │ │ │ +_1_3_0void _s_e_r_i_a_l_i_z_e_T_o_X_M_L_S_t_r_e_a_m(const T& input, std::ostream& out_archive_stream, │ │ │ │ +131 const std::string& name = "data") { │ │ │ │ +132 boost::archive::xml_oarchive out_archive(out_archive_stream); │ │ │ │ +133 out_archive << boost::serialization::make_nvp(name.c_str(), input); │ │ │ │ +134} │ │ │ │ 135 │ │ │ │ -136 BOOST_CONCEPT_USAGE(_H_a_s_T_e_s_t_a_b_l_e_P_r_e_r_e_q_s) { │ │ │ │ -137 t->print(str); │ │ │ │ -138 b = t->equals(*s,tol); │ │ │ │ -139 } │ │ │ │ -140 │ │ │ │ -141 T *t, *s; // Pointer is to allow abstract classes │ │ │ │ -142 bool b; │ │ │ │ -143 double tol; │ │ │ │ -144 std::string str; │ │ │ │ -145 }; │ │ │ │ -146 │ │ │ │ -150 template │ │ │ │ -_1_5_1 struct _T_e_s_t_a_b_l_e { │ │ │ │ +137template │ │ │ │ +_1_3_8void _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_S_t_r_e_a_m(std::istream& in_archive_stream, T& output, │ │ │ │ +139 const std::string& name = "data") { │ │ │ │ +140 boost::archive::xml_iarchive in_archive(in_archive_stream); │ │ │ │ +141 in_archive >> boost::serialization::make_nvp(name.c_str(), output); │ │ │ │ +142} │ │ │ │ +143 │ │ │ │ +145template │ │ │ │ +_1_4_6std::string _s_e_r_i_a_l_i_z_e_T_o_X_M_L_S_t_r_i_n_g(const T& input, │ │ │ │ +147 const std::string& name = "data") { │ │ │ │ +148 std::ostringstream out_archive_stream; │ │ │ │ +149 _s_e_r_i_a_l_i_z_e_T_o_X_M_L_S_t_r_e_a_m(input, out_archive_stream, name); │ │ │ │ +150 return out_archive_stream.str(); │ │ │ │ +151} │ │ │ │ 152 │ │ │ │ -153 // Check that T has the necessary methods │ │ │ │ -154 BOOST_CONCEPT_ASSERT((_H_a_s_T_e_s_t_a_b_l_e_P_r_e_r_e_q_s_<_T_>)); │ │ │ │ -155 │ │ │ │ -156 static void Print(const T& m, const std::string& str = "") { │ │ │ │ -157 m.print(str); │ │ │ │ -158 } │ │ │ │ -159 static bool Equals(const T& m1, const T& m2, double tol = 1e-8) { │ │ │ │ -160 return m1.equals(m2, tol); │ │ │ │ -161 } │ │ │ │ -162 }; │ │ │ │ -163 │ │ │ │ -164} // \namespace gtsam │ │ │ │ -165 │ │ │ │ -_1_7_5#define GTSAM_CONCEPT_TESTABLE_INST(T) template class gtsam::IsTestable; │ │ │ │ -176#define GTSAM_CONCEPT_TESTABLE_TYPE(T) using _gtsam_Testable_##T = gtsam:: │ │ │ │ -IsTestable; │ │ │ │ +154template │ │ │ │ +_1_5_5void _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_S_t_r_i_n_g(const std::string& serialized, T& output, │ │ │ │ +156 const std::string& name = "data") { │ │ │ │ +157 std::istringstream in_archive_stream(serialized); │ │ │ │ +158 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_S_t_r_e_a_m(in_archive_stream, output, name); │ │ │ │ +159} │ │ │ │ +160 │ │ │ │ +162template │ │ │ │ +_1_6_3bool _s_e_r_i_a_l_i_z_e_T_o_X_M_L_F_i_l_e(const T& input, const std::string& filename, │ │ │ │ +164 const std::string& name = "data") { │ │ │ │ +165 std::ofstream out_archive_stream(filename.c_str()); │ │ │ │ +166 if (!out_archive_stream.is_open()) return false; │ │ │ │ +167 _s_e_r_i_a_l_i_z_e_T_o_X_M_L_S_t_r_e_a_m(input, out_archive_stream, name); │ │ │ │ +168 out_archive_stream.close(); │ │ │ │ +169 return true; │ │ │ │ +170} │ │ │ │ +171 │ │ │ │ +173template │ │ │ │ +_1_7_4bool _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_F_i_l_e(const std::string& filename, T& output, │ │ │ │ +175 const std::string& name = "data") { │ │ │ │ +176 std::ifstream in_archive_stream(filename.c_str()); │ │ │ │ +177 if (!in_archive_stream.is_open()) return false; │ │ │ │ +178 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_S_t_r_e_a_m(in_archive_stream, output, name); │ │ │ │ +179 in_archive_stream.close(); │ │ │ │ +180 return true; │ │ │ │ +181} │ │ │ │ +182 │ │ │ │ +184template │ │ │ │ +_1_8_5std::string _s_e_r_i_a_l_i_z_e_X_M_L(const T& input, │ │ │ │ +186 const std::string& name = "data") { │ │ │ │ +187 return _s_e_r_i_a_l_i_z_e_T_o_X_M_L_S_t_r_i_n_g(input, name); │ │ │ │ +188} │ │ │ │ +189 │ │ │ │ +191template │ │ │ │ +_1_9_2void _d_e_s_e_r_i_a_l_i_z_e_X_M_L(const std::string& serialized, T& output, │ │ │ │ +193 const std::string& name = "data") { │ │ │ │ +194 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_S_t_r_i_n_g(serialized, output, name); │ │ │ │ +195} │ │ │ │ +197 │ │ │ │ +203template │ │ │ │ +_2_0_4void _s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_S_t_r_e_a_m(const T& input, std::ostream& │ │ │ │ +out_archive_stream, │ │ │ │ +205 const std::string& name = "data") { │ │ │ │ +206 boost::archive::binary_oarchive out_archive(out_archive_stream); │ │ │ │ +207 out_archive << boost::serialization::make_nvp(name.c_str(), input); │ │ │ │ +208} │ │ │ │ +209 │ │ │ │ +211template │ │ │ │ +_2_1_2void _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_S_t_r_e_a_m(std::istream& in_archive_stream, T& output, │ │ │ │ +213 const std::string& name = "data") { │ │ │ │ +214 boost::archive::binary_iarchive in_archive(in_archive_stream); │ │ │ │ +215 in_archive >> boost::serialization::make_nvp(name.c_str(), output); │ │ │ │ +216} │ │ │ │ +217 │ │ │ │ +219template │ │ │ │ +_2_2_0std::string _s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_S_t_r_i_n_g(const T& input, │ │ │ │ +221 const std::string& name = "data") { │ │ │ │ +222 std::ostringstream out_archive_stream; │ │ │ │ +223 _s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_S_t_r_e_a_m(input, out_archive_stream, name); │ │ │ │ +224 return out_archive_stream.str(); │ │ │ │ +225} │ │ │ │ +226 │ │ │ │ +228template │ │ │ │ +_2_2_9void _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_S_t_r_i_n_g(const std::string& serialized, T& output, │ │ │ │ +230 const std::string& name = "data") { │ │ │ │ +231 std::istringstream in_archive_stream(serialized); │ │ │ │ +232 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_S_t_r_e_a_m(in_archive_stream, output, name); │ │ │ │ +233} │ │ │ │ +234 │ │ │ │ +236template │ │ │ │ +_2_3_7bool _s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_F_i_l_e(const T& input, const std::string& filename, │ │ │ │ +238 const std::string& name = "data") { │ │ │ │ +239 std::ofstream out_archive_stream(filename.c_str()); │ │ │ │ +240 if (!out_archive_stream.is_open()) return false; │ │ │ │ +241 _s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_S_t_r_e_a_m(input, out_archive_stream, name); │ │ │ │ +242 out_archive_stream.close(); │ │ │ │ +243 return true; │ │ │ │ +244} │ │ │ │ +245 │ │ │ │ +247template │ │ │ │ +_2_4_8bool _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_F_i_l_e(const std::string& filename, T& output, │ │ │ │ +249 const std::string& name = "data") { │ │ │ │ +250 std::ifstream in_archive_stream(filename.c_str()); │ │ │ │ +251 if (!in_archive_stream.is_open()) return false; │ │ │ │ +252 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_S_t_r_e_a_m(in_archive_stream, output, name); │ │ │ │ +253 in_archive_stream.close(); │ │ │ │ +254 return true; │ │ │ │ +255} │ │ │ │ +256 │ │ │ │ +258template │ │ │ │ +_2_5_9std::string _s_e_r_i_a_l_i_z_e_B_i_n_a_r_y(const T& input, │ │ │ │ +260 const std::string& name = "data") { │ │ │ │ +261 return _s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_S_t_r_i_n_g(input, name); │ │ │ │ +262} │ │ │ │ +263 │ │ │ │ +265template │ │ │ │ +_2_6_6void _d_e_s_e_r_i_a_l_i_z_e_B_i_n_a_r_y(const std::string& serialized, T& output, │ │ │ │ +267 const std::string& name = "data") { │ │ │ │ +268 _d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_S_t_r_i_n_g(serialized, output, name); │ │ │ │ +269} │ │ │ │ +271 │ │ │ │ +272} // namespace gtsam │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_a_s_s_e_r_t___e_q_u_a_l │ │ │ │ -bool assert_equal(const Matrix &expected, const Matrix &actual, double tol) │ │ │ │ -equals with an tolerance, prints out message if unequal │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:43 │ │ │ │ -_g_t_s_a_m_:_:_p_r_i_n_t │ │ │ │ -void print(const Matrix &A, const string &s, ostream &stream) │ │ │ │ -print without optional string, must specify cout yourself │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:156 │ │ │ │ -_g_t_s_a_m_:_:_e_q_u_a_l │ │ │ │ -bool equal(const T &obj1, const T &obj2, double tol) │ │ │ │ -Call equal on the object. │ │ │ │ -DDeeffiinniittiioonn Testable.h:84 │ │ │ │ -_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ -A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ -that can be centered ... │ │ │ │ -DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_I_s_T_e_s_t_a_b_l_e │ │ │ │ -A testable concept check that should be placed in applicable unit tests and in │ │ │ │ -generic algorithms. │ │ │ │ -DDeeffiinniittiioonn Testable.h:58 │ │ │ │ -_g_t_s_a_m_:_:_e_q_u_a_l_s │ │ │ │ -Template to create a binary predicate. │ │ │ │ -DDeeffiinniittiioonn Testable.h:111 │ │ │ │ -_g_t_s_a_m_:_:_e_q_u_a_l_s___s_t_a_r │ │ │ │ -Binary predicate on shared pointers. │ │ │ │ -DDeeffiinniittiioonn Testable.h:123 │ │ │ │ -_g_t_s_a_m_:_:_H_a_s_T_e_s_t_a_b_l_e_P_r_e_r_e_q_s │ │ │ │ -Requirements on type to pass it to Testable template below. │ │ │ │ -DDeeffiinniittiioonn Testable.h:134 │ │ │ │ -_g_t_s_a_m_:_:_T_e_s_t_a_b_l_e │ │ │ │ -A helper that implements the traits interface for GTSAM types. │ │ │ │ -DDeeffiinniittiioonn Testable.h:151 │ │ │ │ +_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_S_t_r_e_a_m │ │ │ │ +void serializeToStream(const T &input, std::ostream &out_archive_stream) │ │ │ │ +DDeeffiinniittiioonn serialization.h:64 │ │ │ │ +_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_F_i_l_e │ │ │ │ +bool deserializeFromXMLFile(const std::string &filename, T &output, const std:: │ │ │ │ +string &name="data") │ │ │ │ +deserializes from an XML file │ │ │ │ +DDeeffiinniittiioonn serialization.h:174 │ │ │ │ +_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_X_M_L_S_t_r_i_n_g │ │ │ │ +std::string serializeToXMLString(const T &input, const std::string │ │ │ │ +&name="data") │ │ │ │ +serializes to a string in XML │ │ │ │ +DDeeffiinniittiioonn serialization.h:146 │ │ │ │ +_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_S_t_r_i_n_g │ │ │ │ +void deserializeFromString(const std::string &serialized, T &output) │ │ │ │ +deserializes from a string │ │ │ │ +DDeeffiinniittiioonn serialization.h:86 │ │ │ │ +_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e │ │ │ │ +std::string serialize(const T &input) │ │ │ │ +serializes to a string │ │ │ │ +DDeeffiinniittiioonn serialization.h:113 │ │ │ │ +_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_S_t_r_i_n_g │ │ │ │ +void deserializeFromBinaryString(const std::string &serialized, T &output, │ │ │ │ +const std::string &name="data") │ │ │ │ +deserializes from a string in binary │ │ │ │ +DDeeffiinniittiioonn serialization.h:229 │ │ │ │ +_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_B_i_n_a_r_y │ │ │ │ +void deserializeBinary(const std::string &serialized, T &output, const std:: │ │ │ │ +string &name="data") │ │ │ │ +deserializes from a string in binary │ │ │ │ +DDeeffiinniittiioonn serialization.h:266 │ │ │ │ +_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_S_t_r_i_n_g │ │ │ │ +void deserializeFromXMLString(const std::string &serialized, T &output, const │ │ │ │ +std::string &name="data") │ │ │ │ +deserializes from a string in XML │ │ │ │ +DDeeffiinniittiioonn serialization.h:155 │ │ │ │ +_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_S_t_r_i_n_g │ │ │ │ +std::string serializeToBinaryString(const T &input, const std::string │ │ │ │ +&name="data") │ │ │ │ +serializes to a string in binary │ │ │ │ +DDeeffiinniittiioonn serialization.h:220 │ │ │ │ +_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_X_M_L │ │ │ │ +void deserializeXML(const std::string &serialized, T &output, const std::string │ │ │ │ +&name="data") │ │ │ │ +deserializes from a string in XML │ │ │ │ +DDeeffiinniittiioonn serialization.h:192 │ │ │ │ +_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_X_M_L_F_i_l_e │ │ │ │ +bool serializeToXMLFile(const T &input, const std::string &filename, const │ │ │ │ +std::string &name="data") │ │ │ │ +serializes to an XML file │ │ │ │ +DDeeffiinniittiioonn serialization.h:163 │ │ │ │ +_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_X_M_L_S_t_r_e_a_m │ │ │ │ +void deserializeFromXMLStream(std::istream &in_archive_stream, T &output, const │ │ │ │ +std::string &name="data") │ │ │ │ +deserializes from a stream in XML │ │ │ │ +DDeeffiinniittiioonn serialization.h:138 │ │ │ │ +_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_S_t_r_e_a_m │ │ │ │ +void deserializeFromBinaryStream(std::istream &in_archive_stream, T &output, │ │ │ │ +const std::string &name="data") │ │ │ │ +deserializes from a stream in binary │ │ │ │ +DDeeffiinniittiioonn serialization.h:212 │ │ │ │ +_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_X_M_L │ │ │ │ +std::string serializeXML(const T &input, const std::string &name="data") │ │ │ │ +serializes to a string in XML │ │ │ │ +DDeeffiinniittiioonn serialization.h:185 │ │ │ │ +_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_S_t_r_i_n_g │ │ │ │ +std::string serializeToString(const T &input) │ │ │ │ +serializes to a string │ │ │ │ +DDeeffiinniittiioonn serialization.h:78 │ │ │ │ +_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_F_i_l_e │ │ │ │ +bool serializeToFile(const T &input, const std::string &filename) │ │ │ │ +serializes to a file │ │ │ │ +DDeeffiinniittiioonn serialization.h:93 │ │ │ │ +_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e │ │ │ │ +void deserialize(const std::string &serialized, T &output) │ │ │ │ +deserializes from a string │ │ │ │ +DDeeffiinniittiioonn serialization.h:119 │ │ │ │ +_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_S_t_r_e_a_m │ │ │ │ +void serializeToBinaryStream(const T &input, std::ostream &out_archive_stream, │ │ │ │ +const std::string &name="data") │ │ │ │ +DDeeffiinniittiioonn serialization.h:204 │ │ │ │ +_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_S_t_r_e_a_m │ │ │ │ +void deserializeFromStream(std::istream &in_archive_stream, T &output) │ │ │ │ +deserializes from a stream │ │ │ │ +DDeeffiinniittiioonn serialization.h:71 │ │ │ │ +_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_B_i_n_a_r_y │ │ │ │ +std::string serializeBinary(const T &input, const std::string &name="data") │ │ │ │ +serializes to a string in binary │ │ │ │ +DDeeffiinniittiioonn serialization.h:259 │ │ │ │ +_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_B_i_n_a_r_y_F_i_l_e │ │ │ │ +bool serializeToBinaryFile(const T &input, const std::string &filename, const │ │ │ │ +std::string &name="data") │ │ │ │ +serializes to a binary file │ │ │ │ +DDeeffiinniittiioonn serialization.h:237 │ │ │ │ +_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_F_i_l_e │ │ │ │ +bool deserializeFromFile(const std::string &filename, T &output) │ │ │ │ +deserializes from a file │ │ │ │ +DDeeffiinniittiioonn serialization.h:103 │ │ │ │ +_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e_T_o_X_M_L_S_t_r_e_a_m │ │ │ │ +void serializeToXMLStream(const T &input, std::ostream &out_archive_stream, │ │ │ │ +const std::string &name="data") │ │ │ │ +DDeeffiinniittiioonn serialization.h:130 │ │ │ │ +_g_t_s_a_m_:_:_d_e_s_e_r_i_a_l_i_z_e_F_r_o_m_B_i_n_a_r_y_F_i_l_e │ │ │ │ +bool deserializeFromBinaryFile(const std::string &filename, T &output, const │ │ │ │ +std::string &name="data") │ │ │ │ +deserializes from a binary file │ │ │ │ +DDeeffiinniittiioonn serialization.h:248 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _T_e_s_t_a_b_l_e_._h │ │ │ │ + * _s_e_r_i_a_l_i_z_a_t_i_o_n_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00092.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/SymmetricBlockMatrix.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Matrix.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,44 +95,298 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
SymmetricBlockMatrix.h File Reference
│ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Typedefs | │ │ │ +Functions
│ │ │ +
Matrix.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Access to matrices via blocks of pre-defined sizes. │ │ │ +

typedef and functions to augment Eigen's MatrixXd │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │

│ │ │ Classes

class  gtsam::SymmetricBlockMatrix
 This class stores a dense matrix and allows it to be accessed as a collection of blocks. More...
struct  gtsam::Reshape< OutM, OutN, OutOptions, InM, InN, InOptions >
 Reshape functor. More...
 
struct  gtsam::Reshape< M, M, InOptions, M, M, InOptions >
 Reshape specialization that does nothing as shape stays the same (needed to not be ambiguous for square input equals square output) More...
 
struct  gtsam::Reshape< M, N, InOptions, M, N, InOptions >
 Reshape specialization that does nothing as shape stays the same. More...
 
struct  gtsam::Reshape< N, M, InOptions, M, N, InOptions >
 Reshape specialization that does transpose. More...
 
struct  gtsam::MultiplyWithInverse< N >
 Functor that implements multiplication of a vector b with the inverse of a matrix A. More...
 
struct  gtsam::MultiplyWithInverseFunction< T, N >
 Functor that implements multiplication with the inverse of a matrix, itself the result of a function f. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Macros

#define GTSAM_MAKE_MATRIX_DEFS(N)
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Typedefs

│ │ │ +typedef Eigen::MatrixXd gtsam::Matrix
 
│ │ │ +typedef Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > gtsam::MatrixRowMajor
 
│ │ │ +typedef Eigen::Block< Matrix > gtsam::SubMatrix
 
│ │ │ +typedef Eigen::Block< const Matrix > gtsam::ConstSubMatrix
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

│ │ │ +const Eigen::IOFormat & gtsam::matlabFormat ()
 
│ │ │ +template<class MATRIX >
bool gtsam::equal_with_abs_tol (const Eigen::DenseBase< MATRIX > &A, const Eigen::DenseBase< MATRIX > &B, double tol=1e-9)
 equals with a tolerance
 
│ │ │ +bool gtsam::operator== (const Matrix &A, const Matrix &B)
 equality is just equal_with_abs_tol 1e-9
 
│ │ │ +bool gtsam::operator!= (const Matrix &A, const Matrix &B)
 inequality
 
│ │ │ +bool gtsam::assert_equal (const Matrix &A, const Matrix &B, double tol=1e-9)
 equals with an tolerance, prints out message if unequal
 
│ │ │ +bool gtsam::assert_inequal (const Matrix &A, const Matrix &B, double tol=1e-9)
 inequals with an tolerance, prints out message if within tolerance
 
│ │ │ +bool gtsam::assert_equal (const std::list< Matrix > &As, const std::list< Matrix > &Bs, double tol=1e-9)
 equals with an tolerance, prints out message if unequal
 
│ │ │ +bool gtsam::linear_independent (const Matrix &A, const Matrix &B, double tol=1e-9)
 check whether the rows of two matrices are linear independent
 
│ │ │ +bool gtsam::linear_dependent (const Matrix &A, const Matrix &B, double tol=1e-9)
 check whether the rows of two matrices are linear dependent
 
│ │ │ +Vector gtsam::operator^ (const Matrix &A, const Vector &v)
 overload ^ for trans(A)*v We transpose the vectors for speed.
 
│ │ │ +template<class MATRIX >
MATRIX gtsam::prod (const MATRIX &A, const MATRIX &B)
 products using old-style format to improve compatibility
 
│ │ │ +void gtsam::print (const Matrix &A, const std::string &s, std::ostream &stream)
 print without optional string, must specify cout yourself
 
│ │ │ +void gtsam::print (const Matrix &A, const std::string &s="")
 print with optional string to cout
 
│ │ │ +void gtsam::save (const Matrix &A, const std::string &s, const std::string &filename)
 save a matrix to file, which can be loaded by matlab
 
istream & gtsam::operator>> (std::istream &inputStream, Matrix &destinationMatrix)
 Read a matrix from an input stream, such as a file.
 
template<class MATRIX >
Eigen::Block< const MATRIX > gtsam::sub (const MATRIX &A, size_t i1, size_t i2, size_t j1, size_t j2)
 extract submatrix, slice semantics, i.e.
 
template<typename Derived1 , typename Derived2 >
void gtsam::insertSub (Eigen::MatrixBase< Derived1 > &fullMatrix, const Eigen::MatrixBase< Derived2 > &subMatrix, size_t i, size_t j)
 insert a submatrix IN PLACE at a specified location in a larger matrix NOTE: there is no size checking
 
│ │ │ +Matrix gtsam::diag (const std::vector< Matrix > &Hs)
 Create a matrix with submatrices along its diagonal.
 
template<class MATRIX >
const MATRIX::ConstColXpr gtsam::column (const MATRIX &A, size_t j)
 Extracts a column view from a matrix that avoids a copy.
 
template<class MATRIX >
const MATRIX::ConstRowXpr gtsam::row (const MATRIX &A, size_t j)
 Extracts a row view from a matrix that avoids a copy.
 
template<class MATRIX >
void gtsam::zeroBelowDiagonal (MATRIX &A, size_t cols=0)
 Zeros all of the elements below the diagonal of a matrix, in place.
 
│ │ │ +Matrix gtsam::trans (const Matrix &A)
 static transpose function, just calls Eigen transpose member function
 
│ │ │ +template<int OutM, int OutN, int OutOptions, int InM, int InN, int InOptions>
Reshape< OutM, OutN, OutOptions, InM, InN, InOptions >::ReshapedType gtsam::reshape (const Eigen::Matrix< double, InM, InN, InOptions > &m)
 
pair< Matrix, Matrix > gtsam::qr (const Matrix &A)
 Householder QR factorization, Golub & Van Loan p 224, explicit version
│ │ │ +
 
void gtsam::inplace_QR (Matrix &A)
 QR factorization using Eigen's internal block QR algorithm.
 
list< boost::tuple< Vector, double, double > > gtsam::weighted_eliminate (Matrix &A, Vector &b, const Vector &sigmas)
 Imperative algorithm for in-place full elimination with weights and constraint handling.
 
void gtsam::householder_ (Matrix &A, size_t k, bool copy_vectors)
 Imperative version of Householder QR factorization, Golub & Van Loan p 224 version with Householder vectors below diagonal, as in GVL.
 
void gtsam::householder (Matrix &A, size_t k)
 Householder tranformation, zeros below diagonal.
 
Vector gtsam::backSubstituteUpper (const Matrix &U, const Vector &b, bool unit=false)
 backSubstitute U*x=b
 
Vector gtsam::backSubstituteUpper (const Vector &b, const Matrix &U, bool unit=false)
 backSubstitute x'*U=b'
 
Vector gtsam::backSubstituteLower (const Matrix &L, const Vector &b, bool unit=false)
 backSubstitute L*x=b
 
Matrix gtsam::stack (size_t nrMatrices,...)
 create a matrix by stacking other matrices Given a set of matrices: A1, A2, A3...
 
│ │ │ +Matrix gtsam::stack (const std::vector< Matrix > &blocks)
 
Matrix gtsam::collect (const std::vector< const Matrix * > &matrices, size_t m=0, size_t n=0)
 create a matrix by concatenating Given a set of matrices: A1, A2, A3... If all matrices have the same size, specifying single matrix dimensions will avoid the lookup of dimensions
 
│ │ │ +Matrix gtsam::collect (size_t nrMatrices,...)
 
void gtsam::vector_scale_inplace (const Vector &v, Matrix &A, bool inf_mask=false)
 scales a matrix row or column by the values in a vector Arguments (Matrix, Vector) scales the columns, (Vector, Matrix) scales the rows
 
│ │ │ +Matrix gtsam::vector_scale (const Vector &v, const Matrix &A, bool inf_mask)
 
│ │ │ +Matrix gtsam::vector_scale (const Matrix &A, const Vector &v, bool inf_mask)
 
Matrix3 gtsam::skewSymmetric (double wx, double wy, double wz)
 skew symmetric matrix returns this: 0 -wz wy wz 0 -wx -wy wx 0
 
│ │ │ +template<class Derived >
Matrix3 gtsam::skewSymmetric (const Eigen::MatrixBase< Derived > &w)
 
│ │ │ +Matrix gtsam::inverse_square_root (const Matrix &A)
 Use Cholesky to calculate inverse square root of a matrix.
 
Matrix gtsam::cholesky_inverse (const Matrix &A)
 Return the inverse of a S.P.D.
 
void gtsam::svd (const Matrix &A, Matrix &U, Vector &S, Matrix &V)
 SVD computes economy SVD A=U*S*V'.
 
boost::tuple< int, double, Vector > gtsam::DLT (const Matrix &A, double rank_tol=1e-9)
 Direct linear transform algorithm that calls svd to find a vector v that minimizes the algebraic error A*v.
 
Matrix gtsam::expm (const Matrix &A, size_t K=7)
 Numerical exponential map, naive approach, not industrial strength !!!
 
│ │ │ +std::string gtsam::formatMatrixIndented (const std::string &label, const Matrix &matrix, bool makeVectorHorizontal)
 
│ │ │ +Matrix gtsam::LLt (const Matrix &A)
 
│ │ │ +Matrix gtsam::RtR (const Matrix &A)
 
│ │ │ +Vector gtsam::columnNormSquare (const Matrix &A)
 
│ │ │

Detailed Description

│ │ │ -

Access to matrices via blocks of pre-defined sizes.

│ │ │ -

Used in GaussianFactor and GaussianConditional.

Author
Richard Roberts
│ │ │ -
Date
Sep 18, 2010
│ │ │ -
│ │ │ +

typedef and functions to augment Eigen's MatrixXd

│ │ │ +
Author
Christian Potthast
│ │ │ +
│ │ │ +Kai Ni
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +
│ │ │ +Alex Cunningham
│ │ │ +
│ │ │ +Alex Hagiopol
│ │ │ +
│ │ │ +Varun Agrawal
│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ GTSAM_MAKE_MATRIX_DEFS

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define GTSAM_MAKE_MATRIX_DEFS( N)
│ │ │ +
│ │ │ +Value:
using Matrix##N = Eigen::Matrix<double, N, N>; \
│ │ │ +
using Matrix1##N = Eigen::Matrix<double, 1, N>; \
│ │ │ +
using Matrix2##N = Eigen::Matrix<double, 2, N>; \
│ │ │ +
using Matrix3##N = Eigen::Matrix<double, 3, N>; \
│ │ │ +
using Matrix4##N = Eigen::Matrix<double, 4, N>; \
│ │ │ +
using Matrix5##N = Eigen::Matrix<double, 5, N>; \
│ │ │ +
using Matrix6##N = Eigen::Matrix<double, 6, N>; \
│ │ │ +
using Matrix7##N = Eigen::Matrix<double, 7, N>; \
│ │ │ +
using Matrix8##N = Eigen::Matrix<double, 8, N>; \
│ │ │ +
using Matrix9##N = Eigen::Matrix<double, 9, N>; \
│ │ │ +
static const Eigen::MatrixBase<Matrix##N>::IdentityReturnType I_##N##x##N = Matrix##N::Identity(); \
│ │ │ +
static const Eigen::MatrixBase<Matrix##N>::ConstantReturnType Z_##N##x##N = Matrix##N::Zero();
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,29 +1,308 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -SymmetricBlockMatrix.h File Reference │ │ │ │ -Access to matrices via blocks of pre-defined sizes. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Matrix.h File Reference │ │ │ │ +typedef and functions to augment Eigen's MatrixXd _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ -  This class stores a dense matrix and allows it to be accessed as a │ │ │ │ - collection of blocks. _M_o_r_e_._._. │ │ │ │ +struct   _g_t_s_a_m_:_:_R_e_s_h_a_p_e_<_ _O_u_t_M_,_ _O_u_t_N_,_ _O_u_t_O_p_t_i_o_n_s_,_ _I_n_M_,_ _I_n_N_,_ _I_n_O_p_t_i_o_n_s_ _> │ │ │ │ +  _R_e_s_h_a_p_e functor. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_R_e_s_h_a_p_e_<_ _M_,_ _M_,_ _I_n_O_p_t_i_o_n_s_,_ _M_,_ _M_,_ _I_n_O_p_t_i_o_n_s_ _> │ │ │ │ + _R_e_s_h_a_p_e specialization that does nothing as shape stays the same │ │ │ │ +  (needed to not be ambiguous for square input equals square output) │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_R_e_s_h_a_p_e_<_ _M_,_ _N_,_ _I_n_O_p_t_i_o_n_s_,_ _M_,_ _N_,_ _I_n_O_p_t_i_o_n_s_ _> │ │ │ │ +  _R_e_s_h_a_p_e specialization that does nothing as shape stays the same. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_R_e_s_h_a_p_e_<_ _N_,_ _M_,_ _I_n_O_p_t_i_o_n_s_,_ _M_,_ _N_,_ _I_n_O_p_t_i_o_n_s_ _> │ │ │ │ +  _R_e_s_h_a_p_e specialization that does transpose. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e_<_ _N_ _> │ │ │ │ +  Functor that implements multiplication of a vector b with the inverse │ │ │ │ + of a matrix A. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e_F_u_n_c_t_i_o_n_<_ _T_,_ _N_ _> │ │ │ │ +  Functor that implements multiplication with the inverse of a matrix, │ │ │ │ + itself the result of a function f. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  _G_T_S_A_M___M_A_K_E___M_A_T_R_I_X___D_E_F_S(N) │ │ │ │ +  │ │ │ │ +TTyyppeeddeeffss │ │ │ │ + typedef Eigen::MatrixXd  ggttssaamm::::MMaattrriixx │ │ │ │ +  │ │ │ │ +typedef Eigen::Matrix< double, Eigen::Dynamic, Eigen:: │ │ │ │ + Dynamic, Eigen::RowMajor >  ggttssaamm::::MMaattrriixxRRoowwMMaajjoorr │ │ │ │ +  │ │ │ │ + typedef Eigen::Block< Matrix >  ggttssaamm::::SSuubbMMaattrriixx │ │ │ │ +  │ │ │ │ + typedef Eigen::Block< const Matrix >  ggttssaamm::::CCoonnssttSSuubbMMaattrriixx │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ + const Eigen::IOFormat &  ggttssaamm::::mmaattllaabbFFoorrmmaatt () │ │ │ │ +  │ │ │ │ +template │ │ │ │ + bool  ggttssaamm::::eeqquuaall__wwiitthh__aabbss__ttooll (const Eigen:: │ │ │ │ + DenseBase< MATRIX > &A, const Eigen:: │ │ │ │ + DenseBase< MATRIX > &B, double tol=1e-9) │ │ │ │ +  equals with a tolerance │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::ooppeerraattoorr==== (const Matrix &A, const │ │ │ │ + Matrix &B) │ │ │ │ +  equality is just equal_with_abs_tol 1e-9 │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::ooppeerraattoorr!!== (const Matrix &A, const │ │ │ │ + Matrix &B) │ │ │ │ +  inequality │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::aasssseerrtt__eeqquuaall (const Matrix &A, │ │ │ │ + const Matrix &B, double tol=1e-9) │ │ │ │ +  equals with an tolerance, prints out │ │ │ │ + message if unequal │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::aasssseerrtt__iinneeqquuaall (const Matrix &A, │ │ │ │ + const Matrix &B, double tol=1e-9) │ │ │ │ +  inequals with an tolerance, prints out │ │ │ │ + message if within tolerance │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::aasssseerrtt__eeqquuaall (const std::list< │ │ │ │ + Matrix > &As, const std::list< Matrix > │ │ │ │ + &Bs, double tol=1e-9) │ │ │ │ +  equals with an tolerance, prints out │ │ │ │ + message if unequal │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::lliinneeaarr__iinnddeeppeennddeenntt (const Matrix │ │ │ │ + &A, const Matrix &B, double tol=1e-9) │ │ │ │ +  check whether the rows of two matrices │ │ │ │ + are linear independent │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::lliinneeaarr__ddeeppeennddeenntt (const Matrix &A, │ │ │ │ + const Matrix &B, double tol=1e-9) │ │ │ │ +  check whether the rows of two matrices │ │ │ │ + are linear dependent │ │ │ │ +  │ │ │ │ + Vector  ggttssaamm::::ooppeerraattoorr^^ (const Matrix &A, const │ │ │ │ + Vector &v) │ │ │ │ +  overload ^ for trans(A)*v We transpose │ │ │ │ + the vectors for speed. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + MATRIX  ggttssaamm::::pprroodd (const MATRIX &A, const │ │ │ │ + MATRIX &B) │ │ │ │ +  products using old-style format to │ │ │ │ + improve compatibility │ │ │ │ +  │ │ │ │ + void  ggttssaamm::::pprriinntt (const Matrix &A, const │ │ │ │ + std::string &s, std::ostream &stream) │ │ │ │ +  print without optional string, must │ │ │ │ + specify cout yourself │ │ │ │ +  │ │ │ │ + void  ggttssaamm::::pprriinntt (const Matrix &A, const │ │ │ │ + std::string &s="") │ │ │ │ +  print with optional string to cout │ │ │ │ +  │ │ │ │ + void  ggttssaamm::::ssaavvee (const Matrix &A, const std:: │ │ │ │ + string &s, const std::string &filename) │ │ │ │ +  save a matrix to file, which can be │ │ │ │ + loaded by matlab │ │ │ │ +  │ │ │ │ + istream &  _g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_>_> (std::istream │ │ │ │ + &inputStream, Matrix &destinationMatrix) │ │ │ │ +  Read a matrix from an input stream, such │ │ │ │ + as a file. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + Eigen::Block< const MATRIX >  _g_t_s_a_m_:_:_s_u_b (const MATRIX &A, size_t i1, │ │ │ │ + size_t i2, size_t j1, size_t j2) │ │ │ │ +  extract submatrix, slice semantics, i.e. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + void  _g_t_s_a_m_:_:_i_n_s_e_r_t_S_u_b (Eigen::MatrixBase< │ │ │ │ + Derived1 > &fullMatrix, const Eigen:: │ │ │ │ + MatrixBase< Derived2 > &subMatrix, size_t │ │ │ │ + i, size_t j) │ │ │ │ + insert a submatrix IN PLACE at a │ │ │ │ +  specified location in a larger matrix │ │ │ │ + NOTE: there is no size checking │ │ │ │ +  │ │ │ │ + Matrix  ggttssaamm::::ddiiaagg (const std::vector< Matrix > │ │ │ │ + &Hs) │ │ │ │ +  Create a matrix with submatrices along │ │ │ │ + its diagonal. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + const MATRIX::ConstColXpr  _g_t_s_a_m_:_:_c_o_l_u_m_n (const MATRIX &A, size_t j) │ │ │ │ +  Extracts a column view from a matrix that │ │ │ │ + avoids a copy. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + const MATRIX::ConstRowXpr  _g_t_s_a_m_:_:_r_o_w (const MATRIX &A, size_t j) │ │ │ │ +  Extracts a row view from a matrix that │ │ │ │ + avoids a copy. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + void  _g_t_s_a_m_:_:_z_e_r_o_B_e_l_o_w_D_i_a_g_o_n_a_l (MATRIX &A, │ │ │ │ + size_t cols=0) │ │ │ │ +  Zeros all of the elements below the │ │ │ │ + diagonal of a matrix, in place. │ │ │ │ +  │ │ │ │ + Matrix  ggttssaamm::::ttrraannss (const Matrix &A) │ │ │ │ +  static transpose function, just calls │ │ │ │ + Eigen transpose member function │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_R_e_s_h_a_p_e< OutM, OutN, OutOptions, InM, ggttssaamm::::rreesshhaappee (const Eigen::Matrix< │ │ │ │ + InN, InOptions >::ReshapedType  double, InM, InN, InOptions > &m) │ │ │ │ +  │ │ │ │ + pair< Matrix, Matrix >  _g_t_s_a_m_:_:_q_r (const Matrix &A) │ │ │ │ + Householder QR factorization, Golub & Van │ │ │ │ +  Loan p 224, explicit version │ │ │ │ + │ │ │ │ +  │ │ │ │ + void  _g_t_s_a_m_:_:_i_n_p_l_a_c_e___Q_R (Matrix &A) │ │ │ │ +  QR factorization using Eigen's internal │ │ │ │ + block QR algorithm. │ │ │ │ +  │ │ │ │ + list< boost::tuple< Vector, double, _g_t_s_a_m_:_:_w_e_i_g_h_t_e_d___e_l_i_m_i_n_a_t_e (Matrix &A, │ │ │ │ + double > >  Vector &b, const Vector &sigmas) │ │ │ │ + Imperative algorithm for in-place full │ │ │ │ +  elimination with weights and constraint │ │ │ │ + handling. │ │ │ │ +  │ │ │ │ + void  _g_t_s_a_m_:_:_h_o_u_s_e_h_o_l_d_e_r__ (Matrix &A, size_t k, │ │ │ │ + bool copy_vectors) │ │ │ │ + Imperative version of Householder QR │ │ │ │ +  factorization, Golub & Van Loan p 224 │ │ │ │ + version with Householder vectors below │ │ │ │ + diagonal, as in GVL. │ │ │ │ +  │ │ │ │ + void  _g_t_s_a_m_:_:_h_o_u_s_e_h_o_l_d_e_r (Matrix &A, size_t k) │ │ │ │ +  Householder tranformation, zeros below │ │ │ │ + diagonal. │ │ │ │ +  │ │ │ │ + Vector  _g_t_s_a_m_:_:_b_a_c_k_S_u_b_s_t_i_t_u_t_e_U_p_p_e_r (const Matrix │ │ │ │ + &U, const Vector &b, bool unit=false) │ │ │ │ +  backSubstitute U*x=b │ │ │ │ +  │ │ │ │ + Vector  _g_t_s_a_m_:_:_b_a_c_k_S_u_b_s_t_i_t_u_t_e_U_p_p_e_r (const Vector │ │ │ │ + &b, const Matrix &U, bool unit=false) │ │ │ │ +  backSubstitute x'*U=b' │ │ │ │ +  │ │ │ │ + Vector  _g_t_s_a_m_:_:_b_a_c_k_S_u_b_s_t_i_t_u_t_e_L_o_w_e_r (const Matrix │ │ │ │ + &L, const Vector &b, bool unit=false) │ │ │ │ +  backSubstitute L*x=b │ │ │ │ +  │ │ │ │ + Matrix  _g_t_s_a_m_:_:_s_t_a_c_k (size_t nrMatrices,...) │ │ │ │ + create a matrix by stacking other │ │ │ │ +  matrices Given a set of matrices: A1, A2, │ │ │ │ + A3... │ │ │ │ +  │ │ │ │ + Matrix  ggttssaamm::::ssttaacckk (const std::vector< Matrix > │ │ │ │ + &blocks) │ │ │ │ +  │ │ │ │ + Matrix  _g_t_s_a_m_:_:_c_o_l_l_e_c_t (const std::vector< const │ │ │ │ + Matrix * > &matrices, size_t m=0, size_t │ │ │ │ + n=0) │ │ │ │ + create a matrix by concatenating Given a │ │ │ │ + set of matrices: A1, A2, A3... If all │ │ │ │ +  matrices have the same size, specifying │ │ │ │ + single matrix dimensions will avoid the │ │ │ │ + lookup of dimensions │ │ │ │ +  │ │ │ │ + Matrix  ggttssaamm::::ccoolllleecctt (size_t nrMatrices,...) │ │ │ │ +  │ │ │ │ + void  _g_t_s_a_m_:_:_v_e_c_t_o_r___s_c_a_l_e___i_n_p_l_a_c_e (const Vector │ │ │ │ + &v, Matrix &A, bool inf_mask=false) │ │ │ │ + scales a matrix row or column by the │ │ │ │ +  values in a vector Arguments (Matrix, │ │ │ │ + Vector) scales the columns, (Vector, │ │ │ │ + Matrix) scales the rows │ │ │ │ +  │ │ │ │ + Matrix  ggttssaamm::::vveeccttoorr__ssccaallee (const Vector &v, │ │ │ │ + const Matrix &A, bool inf_mask) │ │ │ │ +  │ │ │ │ + Matrix  ggttssaamm::::vveeccttoorr__ssccaallee (const Matrix &A, │ │ │ │ + const Vector &v, bool inf_mask) │ │ │ │ +  │ │ │ │ + Matrix3  _g_t_s_a_m_:_:_s_k_e_w_S_y_m_m_e_t_r_i_c (double wx, double │ │ │ │ + wy, double wz) │ │ │ │ +  skew symmetric matrix returns this: 0 -wz │ │ │ │ + wy wz 0 -wx -wy wx 0 │ │ │ │ +  │ │ │ │ +template │ │ │ │ + Matrix3  ggttssaamm::::sskkeewwSSyymmmmeettrriicc (const Eigen:: │ │ │ │ + MatrixBase< Derived > &w) │ │ │ │ +  │ │ │ │ + Matrix  ggttssaamm::::iinnvveerrssee__ssqquuaarree__rroooott (const Matrix │ │ │ │ + &A) │ │ │ │ +  Use Cholesky to calculate inverse square │ │ │ │ + root of a matrix. │ │ │ │ +  │ │ │ │ + Matrix  _g_t_s_a_m_:_:_c_h_o_l_e_s_k_y___i_n_v_e_r_s_e (const Matrix &A) │ │ │ │ +  Return the inverse of a S.P.D. │ │ │ │ +  │ │ │ │ + void  _g_t_s_a_m_:_:_s_v_d (const Matrix &A, Matrix &U, │ │ │ │ + Vector &S, Matrix &V) │ │ │ │ +  SVD computes economy SVD A=U*S*V'. │ │ │ │ +  │ │ │ │ + boost::tuple< int, double, Vector >  _g_t_s_a_m_:_:_D_L_T (const Matrix &A, double │ │ │ │ + rank_tol=1e-9) │ │ │ │ + Direct linear transform algorithm that │ │ │ │ +  calls svd to find a vector v that │ │ │ │ + minimizes the algebraic error A*v. │ │ │ │ +  │ │ │ │ + Matrix  _g_t_s_a_m_:_:_e_x_p_m (const Matrix &A, size_t K=7) │ │ │ │ +  Numerical exponential map, naive │ │ │ │ + approach, not industrial strength !!! │ │ │ │ +  │ │ │ │ + std::string  ggttssaamm::::ffoorrmmaattMMaattrriixxIInnddeenntteedd (const std:: │ │ │ │ + string &label, const Matrix &matrix, bool │ │ │ │ + makeVectorHorizontal) │ │ │ │ +  │ │ │ │ + Matrix  ggttssaamm::::LLLLtt (const Matrix &A) │ │ │ │ +  │ │ │ │ + Matrix  ggttssaamm::::RRttRR (const Matrix &A) │ │ │ │ +  │ │ │ │ + Vector  ggttssaamm::::ccoolluummnnNNoorrmmSSqquuaarree (const Matrix &A) │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Access to matrices via blocks of pre-defined sizes. │ │ │ │ -Used in GaussianFactor and _G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l. │ │ │ │ +typedef and functions to augment Eigen's MatrixXd │ │ │ │ Author │ │ │ │ - Richard Roberts │ │ │ │ - Date │ │ │ │ - Sep 18, 2010 │ │ │ │ + Christian Potthast │ │ │ │ + Kai Ni │ │ │ │ + Frank Dellaert │ │ │ │ + Alex Cunningham │ │ │ │ + Alex Hagiopol │ │ │ │ + Varun Agrawal │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? GGTTSSAAMM__MMAAKKEE__MMAATTRRIIXX__DDEEFFSS ********** │ │ │ │ +#define GTSAM_MAKE_MATRIX_DEFS (   N ) │ │ │ │ +VVaalluuee:: │ │ │ │ +using Matrix##N = Eigen::Matrix; \ │ │ │ │ +using Matrix1##N = Eigen::Matrix; \ │ │ │ │ +using Matrix2##N = Eigen::Matrix; \ │ │ │ │ +using Matrix3##N = Eigen::Matrix; \ │ │ │ │ +using Matrix4##N = Eigen::Matrix; \ │ │ │ │ +using Matrix5##N = Eigen::Matrix; \ │ │ │ │ +using Matrix6##N = Eigen::Matrix; \ │ │ │ │ +using Matrix7##N = Eigen::Matrix; \ │ │ │ │ +using Matrix8##N = Eigen::Matrix; \ │ │ │ │ +using Matrix9##N = Eigen::Matrix; \ │ │ │ │ +static const Eigen::MatrixBase::IdentityReturnType I_##N##x##N = │ │ │ │ +Matrix##N::Identity(); \ │ │ │ │ +static const Eigen::MatrixBase::ConstantReturnType Z_##N##x##N = │ │ │ │ +Matrix##N::Zero(); │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_._h │ │ │ │ + * _M_a_t_r_i_x_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00092_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/SymmetricBlockMatrix.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Matrix.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,439 +98,397 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
SymmetricBlockMatrix.h
│ │ │ +
Matrix.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │ -
3* GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │ -
4* Atlanta, Georgia 30332-0415
│ │ │ -
5* All Rights Reserved
│ │ │ -
6* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │ +
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │ +
4 * Atlanta, Georgia 30332-0415
│ │ │ +
5 * All Rights Reserved
│ │ │ +
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │ -
8* See LICENSE for the license information
│ │ │ +
8 * See LICENSE for the license information
│ │ │
9
│ │ │ -
10* -------------------------------------------------------------------------- */
│ │ │ +
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
18#pragma once
│ │ │ -
19
│ │ │ - │ │ │ -
21#include <gtsam/base/Matrix.h>
│ │ │ -
22#include <gtsam/base/types.h>
│ │ │ -
23#include <gtsam/dllexport.h>
│ │ │ -
24#include <boost/serialization/nvp.hpp>
│ │ │ -
25#include <cassert>
│ │ │ -
26#include <stdexcept>
│ │ │ -
27#include <array>
│ │ │ -
28
│ │ │ -
29namespace boost {
│ │ │ -
30namespace serialization {
│ │ │ -
31class access;
│ │ │ -
32} /* namespace serialization */
│ │ │ -
33} /* namespace boost */
│ │ │ -
34
│ │ │ -
35namespace gtsam {
│ │ │ -
36
│ │ │ -
37 // Forward declarations
│ │ │ -
38 class VerticalBlockMatrix;
│ │ │ +
23// \callgraph
│ │ │ +
24
│ │ │ +
25#pragma once
│ │ │ +
26
│ │ │ + │ │ │ +
28#include <gtsam/base/Vector.h>
│ │ │ +
29#include <boost/tuple/tuple.hpp>
│ │ │ +
30
│ │ │ +
31#include <vector>
│ │ │ +
32
│ │ │ +
38namespace gtsam {
│ │ │
39
│ │ │ -
│ │ │ -
51 class GTSAM_EXPORT SymmetricBlockMatrix
│ │ │ -
52 {
│ │ │ -
53 public:
│ │ │ - │ │ │ -
55 typedef Eigen::Block<Matrix> Block;
│ │ │ -
56 typedef Eigen::Block<const Matrix> constBlock;
│ │ │ -
57
│ │ │ -
58 protected:
│ │ │ -
59 Matrix matrix_;
│ │ │ - │ │ │ -
61
│ │ │ - │ │ │ -
63
│ │ │ -
64 public:
│ │ │ - │ │ │ -
67
│ │ │ -
69 template<typename CONTAINER>
│ │ │ -
│ │ │ -
70 SymmetricBlockMatrix(const CONTAINER& dimensions, bool appendOneDimension = false) :
│ │ │ -
71 blockStart_(0)
│ │ │ -
72 {
│ │ │ -
73 fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension);
│ │ │ -
74 matrix_.resize(variableColOffsets_.back(), variableColOffsets_.back());
│ │ │ -
75 assertInvariants();
│ │ │ -
76 }
│ │ │ -
│ │ │ -
77
│ │ │ -
79 template<typename ITERATOR>
│ │ │ -
│ │ │ -
80 SymmetricBlockMatrix(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool appendOneDimension = false) :
│ │ │ -
81 blockStart_(0)
│ │ │ -
82 {
│ │ │ -
83 fillOffsets(firstBlockDim, lastBlockDim, appendOneDimension);
│ │ │ -
84 matrix_.resize(variableColOffsets_.back(), variableColOffsets_.back());
│ │ │ -
85 assertInvariants();
│ │ │ -
86 }
│ │ │ -
│ │ │ +
40typedef Eigen::MatrixXd Matrix;
│ │ │ +
41typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> MatrixRowMajor;
│ │ │ +
42
│ │ │ +
43// Create handy typedefs and constants for square-size matrices
│ │ │ +
44// MatrixMN, MatrixN = MatrixNN, I_NxN, and Z_NxN, for M,N=1..9
│ │ │ +
45#define GTSAM_MAKE_MATRIX_DEFS(N) \
│ │ │ +
46using Matrix##N = Eigen::Matrix<double, N, N>; \
│ │ │ +
47using Matrix1##N = Eigen::Matrix<double, 1, N>; \
│ │ │ +
48using Matrix2##N = Eigen::Matrix<double, 2, N>; \
│ │ │ +
49using Matrix3##N = Eigen::Matrix<double, 3, N>; \
│ │ │ +
50using Matrix4##N = Eigen::Matrix<double, 4, N>; \
│ │ │ +
51using Matrix5##N = Eigen::Matrix<double, 5, N>; \
│ │ │ +
52using Matrix6##N = Eigen::Matrix<double, 6, N>; \
│ │ │ +
53using Matrix7##N = Eigen::Matrix<double, 7, N>; \
│ │ │ +
54using Matrix8##N = Eigen::Matrix<double, 8, N>; \
│ │ │ +
55using Matrix9##N = Eigen::Matrix<double, 9, N>; \
│ │ │ +
56static const Eigen::MatrixBase<Matrix##N>::IdentityReturnType I_##N##x##N = Matrix##N::Identity(); \
│ │ │ +
57static const Eigen::MatrixBase<Matrix##N>::ConstantReturnType Z_##N##x##N = Matrix##N::Zero();
│ │ │ +
58
│ │ │ +
59GTSAM_MAKE_MATRIX_DEFS(1)
│ │ │ +
60GTSAM_MAKE_MATRIX_DEFS(2)
│ │ │ +
61GTSAM_MAKE_MATRIX_DEFS(3)
│ │ │ +
62GTSAM_MAKE_MATRIX_DEFS(4)
│ │ │ +
63GTSAM_MAKE_MATRIX_DEFS(5)
│ │ │ +
64GTSAM_MAKE_MATRIX_DEFS(6)
│ │ │ +
65GTSAM_MAKE_MATRIX_DEFS(7)
│ │ │ +
66GTSAM_MAKE_MATRIX_DEFS(8)
│ │ │ +
67GTSAM_MAKE_MATRIX_DEFS(9)
│ │ │ +
68
│ │ │ +
69// Matrix expressions for accessing parts of matrices
│ │ │ +
70typedef Eigen::Block<Matrix> SubMatrix;
│ │ │ +
71typedef Eigen::Block<const Matrix> ConstSubMatrix;
│ │ │ +
72
│ │ │ +
73// Matrix formatting arguments when printing.
│ │ │ +
74// Akin to Matlab style.
│ │ │ +
75const Eigen::IOFormat& matlabFormat();
│ │ │ +
76
│ │ │ +
80template <class MATRIX>
│ │ │ +
│ │ │ +
81bool equal_with_abs_tol(const Eigen::DenseBase<MATRIX>& A, const Eigen::DenseBase<MATRIX>& B, double tol = 1e-9) {
│ │ │ +
82
│ │ │ +
83 const size_t n1 = A.cols(), m1 = A.rows();
│ │ │ +
84 const size_t n2 = B.cols(), m2 = B.rows();
│ │ │ +
85
│ │ │ +
86 if(m1!=m2 || n1!=n2) return false;
│ │ │
87
│ │ │ -
89 template<typename CONTAINER>
│ │ │ -
│ │ │ -
90 SymmetricBlockMatrix(const CONTAINER& dimensions, const Matrix& matrix, bool appendOneDimension = false) :
│ │ │ -
91 blockStart_(0)
│ │ │ -
92 {
│ │ │ -
93 matrix_.resize(matrix.rows(), matrix.cols());
│ │ │ -
94 matrix_.triangularView<Eigen::Upper>() = matrix.triangularView<Eigen::Upper>();
│ │ │ -
95 fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension);
│ │ │ -
96 if(matrix_.rows() != matrix_.cols())
│ │ │ -
97 throw std::invalid_argument("Requested to create a SymmetricBlockMatrix from a non-square matrix.");
│ │ │ -
98 if(variableColOffsets_.back() != matrix_.cols())
│ │ │ -
99 throw std::invalid_argument("Requested to create a SymmetricBlockMatrix with dimensions that do not sum to the total size of the provided matrix.");
│ │ │ -
100 assertInvariants();
│ │ │ -
101 }
│ │ │ -
│ │ │ -
102
│ │ │ -
106 static SymmetricBlockMatrix LikeActiveViewOf(const SymmetricBlockMatrix& other);
│ │ │ -
107
│ │ │ -
111 static SymmetricBlockMatrix LikeActiveViewOf(const VerticalBlockMatrix& other);
│ │ │ -
112
│ │ │ -
114 DenseIndex rows() const { assertInvariants(); return variableColOffsets_.back() - variableColOffsets_[blockStart_]; }
│ │ │ +
88 for(size_t i=0; i<m1; i++)
│ │ │ +
89 for(size_t j=0; j<n1; j++) {
│ │ │ +
90 if(!fpEqual(A(i,j), B(i,j), tol, false)) {
│ │ │ +
91 return false;
│ │ │ +
92 }
│ │ │ +
93 }
│ │ │ +
94 return true;
│ │ │ +
95}
│ │ │ +
│ │ │ +
96
│ │ │ +
│ │ │ +
100inline bool operator==(const Matrix& A, const Matrix& B) {
│ │ │ +
101 return equal_with_abs_tol(A,B,1e-9);
│ │ │ +
102}
│ │ │ +
│ │ │ +
103
│ │ │ +
│ │ │ +
107inline bool operator!=(const Matrix& A, const Matrix& B) {
│ │ │ +
108 return !(A==B);
│ │ │ +
109 }
│ │ │ +
│ │ │ +
110
│ │ │ +
114GTSAM_EXPORT bool assert_equal(const Matrix& A, const Matrix& B, double tol = 1e-9);
│ │ │
115
│ │ │ -
117 DenseIndex cols() const { return rows(); }
│ │ │ -
118
│ │ │ -
120 DenseIndex nBlocks() const { return nActualBlocks() - blockStart_; }
│ │ │ -
121
│ │ │ -
│ │ │ - │ │ │ -
124 return calcIndices(block, block, 1, 1)[2];
│ │ │ -
125 }
│ │ │ -
│ │ │ -
126
│ │ │ -
129
│ │ │ -
132 Matrix block(DenseIndex I, DenseIndex J) const;
│ │ │ -
133
│ │ │ -
│ │ │ -
135 Eigen::SelfAdjointView<Block, Eigen::Upper> diagonalBlock(DenseIndex J) {
│ │ │ -
136 return block_(J, J).selfadjointView<Eigen::Upper>();
│ │ │ -
137 }
│ │ │ -
│ │ │ -
138
│ │ │ -
│ │ │ -
140 Eigen::SelfAdjointView<constBlock, Eigen::Upper> diagonalBlock(DenseIndex J) const {
│ │ │ -
141 return block_(J, J).selfadjointView<Eigen::Upper>();
│ │ │ -
142 }
│ │ │ -
│ │ │ -
143
│ │ │ -
│ │ │ -
145 Vector diagonal(DenseIndex J) const {
│ │ │ -
146 return block_(J, J).diagonal();
│ │ │ -
147 }
│ │ │ +
119GTSAM_EXPORT bool assert_inequal(const Matrix& A, const Matrix& B, double tol = 1e-9);
│ │ │ +
120
│ │ │ +
124GTSAM_EXPORT bool assert_equal(const std::list<Matrix>& As, const std::list<Matrix>& Bs, double tol = 1e-9);
│ │ │ +
125
│ │ │ +
129GTSAM_EXPORT bool linear_independent(const Matrix& A, const Matrix& B, double tol = 1e-9);
│ │ │ +
130
│ │ │ +
134GTSAM_EXPORT bool linear_dependent(const Matrix& A, const Matrix& B, double tol = 1e-9);
│ │ │ +
135
│ │ │ +
140GTSAM_EXPORT Vector operator^(const Matrix& A, const Vector & v);
│ │ │ +
141
│ │ │ +
143template<class MATRIX>
│ │ │ +
│ │ │ +
144inline MATRIX prod(const MATRIX& A, const MATRIX&B) {
│ │ │ +
145 MATRIX result = A * B;
│ │ │ +
146 return result;
│ │ │ +
147}
│ │ │
│ │ │
148
│ │ │ -
│ │ │ -
150 constBlock aboveDiagonalBlock(DenseIndex I, DenseIndex J) const {
│ │ │ -
151 assert(I < J);
│ │ │ -
152 return block_(I, J);
│ │ │ -
153 }
│ │ │ -
│ │ │ -
154
│ │ │ -
│ │ │ -
156 Eigen::SelfAdjointView<constBlock, Eigen::Upper> selfadjointView(
│ │ │ -
157 DenseIndex I, DenseIndex J) const {
│ │ │ -
158 assert(J > I);
│ │ │ -
159 return block_(I, I, J - I, J - I).selfadjointView<Eigen::Upper>();
│ │ │ -
160 }
│ │ │ -
│ │ │ -
161
│ │ │ -
│ │ │ -
163 Eigen::TriangularView<constBlock, Eigen::Upper> triangularView(DenseIndex I,
│ │ │ -
164 DenseIndex J) const {
│ │ │ -
165 assert(J > I);
│ │ │ -
166 return block_(I, I, J - I, J - I).triangularView<Eigen::Upper>();
│ │ │ -
167 }
│ │ │ -
│ │ │ -
168
│ │ │ -
│ │ │ -
170 constBlock aboveDiagonalRange(DenseIndex i_startBlock,
│ │ │ -
171 DenseIndex i_endBlock,
│ │ │ -
172 DenseIndex j_startBlock,
│ │ │ -
173 DenseIndex j_endBlock) const {
│ │ │ -
174 assert(i_startBlock < j_startBlock);
│ │ │ -
175 assert(i_endBlock <= j_startBlock);
│ │ │ -
176 return block_(i_startBlock, j_startBlock, i_endBlock - i_startBlock,
│ │ │ -
177 j_endBlock - j_startBlock);
│ │ │ -
178 }
│ │ │ -
│ │ │ -
179
│ │ │ +
152GTSAM_EXPORT void print(const Matrix& A, const std::string& s, std::ostream& stream);
│ │ │ +
153
│ │ │ +
157GTSAM_EXPORT void print(const Matrix& A, const std::string& s = "");
│ │ │ +
158
│ │ │ +
162GTSAM_EXPORT void save(const Matrix& A, const std::string &s, const std::string& filename);
│ │ │ +
163
│ │ │ +
169GTSAM_EXPORT std::istream& operator>>(std::istream& inputStream, Matrix& destinationMatrix);
│ │ │ +
170
│ │ │ +
180template<class MATRIX>
│ │ │
│ │ │ -
181 Block aboveDiagonalRange(DenseIndex i_startBlock, DenseIndex i_endBlock,
│ │ │ -
182 DenseIndex j_startBlock, DenseIndex j_endBlock) {
│ │ │ -
183 assert(i_startBlock < j_startBlock);
│ │ │ -
184 assert(i_endBlock <= j_startBlock);
│ │ │ -
185 return block_(i_startBlock, j_startBlock, i_endBlock - i_startBlock,
│ │ │ -
186 j_endBlock - j_startBlock);
│ │ │ -
187 }
│ │ │ -
│ │ │ -
188
│ │ │ -
192
│ │ │ -
194 template <typename XprType>
│ │ │ +
181Eigen::Block<const MATRIX> sub(const MATRIX& A, size_t i1, size_t i2, size_t j1, size_t j2) {
│ │ │ +
182 size_t m=i2-i1, n=j2-j1;
│ │ │ +
183 return A.block(i1,j1,m,n);
│ │ │ +
184}
│ │ │ +
│ │ │ +
185
│ │ │ +
194template <typename Derived1, typename Derived2>
│ │ │
│ │ │ -
195 void setDiagonalBlock(DenseIndex I, const XprType& xpr) {
│ │ │ -
196 block_(I, I).triangularView<Eigen::Upper>() = xpr.template triangularView<Eigen::Upper>();
│ │ │ -
197 }
│ │ │ +
195void insertSub(Eigen::MatrixBase<Derived1>& fullMatrix, const Eigen::MatrixBase<Derived2>& subMatrix, size_t i, size_t j) {
│ │ │ +
196 fullMatrix.block(i, j, subMatrix.rows(), subMatrix.cols()) = subMatrix;
│ │ │ +
197}
│ │ │
│ │ │
198
│ │ │ -
200 template <typename XprType>
│ │ │ -
│ │ │ -
201 void setOffDiagonalBlock(DenseIndex I, DenseIndex J, const XprType& xpr) {
│ │ │ -
202 assert(I != J);
│ │ │ -
203 if (I < J) {
│ │ │ -
204 block_(I, J) = xpr;
│ │ │ -
205 } else {
│ │ │ -
206 block_(J, I) = xpr.transpose();
│ │ │ -
207 }
│ │ │ -
208 }
│ │ │ -
│ │ │ -
209
│ │ │ -
211 template <typename XprType>
│ │ │ -
│ │ │ -
212 void updateDiagonalBlock(DenseIndex I, const XprType& xpr) {
│ │ │ -
213 // TODO(gareth): Eigen won't let us add triangular or self-adjoint views
│ │ │ -
214 // here, so we do it manually.
│ │ │ -
215 auto dest = block_(I, I);
│ │ │ -
216 assert(dest.rows() == xpr.rows());
│ │ │ -
217 assert(dest.cols() == xpr.cols());
│ │ │ -
218 for (DenseIndex col = 0; col < dest.cols(); ++col) {
│ │ │ -
219 for (DenseIndex row = 0; row <= col; ++row) {
│ │ │ -
220 dest(row, col) += xpr(row, col);
│ │ │ -
221 }
│ │ │ -
222 }
│ │ │ -
223 }
│ │ │ -
│ │ │ -
224
│ │ │ -
227 template <typename XprType>
│ │ │ -
│ │ │ -
228 void updateOffDiagonalBlock(DenseIndex I, DenseIndex J, const XprType& xpr) {
│ │ │ -
229 assert(I != J);
│ │ │ -
230 if (I < J) {
│ │ │ -
231 block_(I, J).noalias() += xpr;
│ │ │ -
232 } else {
│ │ │ -
233 block_(J, I).noalias() += xpr.transpose();
│ │ │ -
234 }
│ │ │ -
235 }
│ │ │ -
│ │ │ -
236
│ │ │ -
240
│ │ │ -
│ │ │ -
242 Eigen::SelfAdjointView<Block, Eigen::Upper> selfadjointView() {
│ │ │ -
243 return full().selfadjointView<Eigen::Upper>();
│ │ │ -
244 }
│ │ │ -
│ │ │ -
245
│ │ │ -
│ │ │ -
247 Eigen::SelfAdjointView<constBlock, Eigen::Upper> selfadjointView() const {
│ │ │ -
248 return full().selfadjointView<Eigen::Upper>();
│ │ │ -
249 }
│ │ │ -
│ │ │ -
250
│ │ │ -
252 template <typename XprType>
│ │ │ -
│ │ │ -
253 void setFullMatrix(const XprType& xpr) {
│ │ │ -
254 full().triangularView<Eigen::Upper>() = xpr.template triangularView<Eigen::Upper>();
│ │ │ -
255 }
│ │ │ -
│ │ │ -
256
│ │ │ -
│ │ │ -
258 void setZero() {
│ │ │ -
259 full().triangularView<Eigen::Upper>().setZero();
│ │ │ -
260 }
│ │ │ -
│ │ │ -
261
│ │ │ -
263 void negate();
│ │ │ -
264
│ │ │ -
266 void invertInPlace();
│ │ │ -
267
│ │ │ -
269
│ │ │ -
273 DenseIndex& blockStart() { return blockStart_; }
│ │ │ -
274
│ │ │ -
277 DenseIndex blockStart() const { return blockStart_; }
│ │ │ -
278
│ │ │ -
289 void choleskyPartial(DenseIndex nFrontals);
│ │ │ -
290
│ │ │ - │ │ │ -
297
│ │ │ -
298 protected:
│ │ │ -
299
│ │ │ -
│ │ │ - │ │ │ -
302 return variableColOffsets_.size();
│ │ │ -
303 }
│ │ │ -
│ │ │ -
304
│ │ │ -
│ │ │ - │ │ │ -
307 return nOffsets() - 1;
│ │ │ -
308 }
│ │ │ -
│ │ │ -
309
│ │ │ -
│ │ │ - │ │ │ -
312 assert(block >= 0);
│ │ │ -
313 const DenseIndex actual_index = block + blockStart();
│ │ │ -
314 assert(actual_index < nOffsets());
│ │ │ -
315 return variableColOffsets_[actual_index];
│ │ │ -
316 }
│ │ │ -
│ │ │ -
317
│ │ │ -
│ │ │ -
319 constBlock block_(DenseIndex iBlock, DenseIndex jBlock,
│ │ │ -
320 DenseIndex blockRows = 1, DenseIndex blockCols = 1) const {
│ │ │ -
321 const std::array<DenseIndex, 4> indices =
│ │ │ -
322 calcIndices(iBlock, jBlock, blockRows, blockCols);
│ │ │ -
323 return matrix_.block(indices[0], indices[1], indices[2], indices[3]);
│ │ │ -
324 }
│ │ │ -
│ │ │ -
325
│ │ │ -
│ │ │ -
327 Block block_(DenseIndex iBlock, DenseIndex jBlock, DenseIndex blockRows = 1,
│ │ │ -
328 DenseIndex blockCols = 1) {
│ │ │ -
329 const std::array<DenseIndex, 4> indices =
│ │ │ -
330 calcIndices(iBlock, jBlock, blockRows, blockCols);
│ │ │ -
331 return matrix_.block(indices[0], indices[1], indices[2], indices[3]);
│ │ │ -
332 }
│ │ │ -
│ │ │ -
333
│ │ │ -
│ │ │ -
335 constBlock full() const {
│ │ │ -
336 return block_(0, 0, nBlocks(), nBlocks());
│ │ │ -
337 }
│ │ │ -
│ │ │ +
202GTSAM_EXPORT Matrix diag(const std::vector<Matrix>& Hs);
│ │ │ +
203
│ │ │ +
210template<class MATRIX>
│ │ │ +
│ │ │ +
211const typename MATRIX::ConstColXpr column(const MATRIX& A, size_t j) {
│ │ │ +
212 return A.col(j);
│ │ │ +
213}
│ │ │ +
│ │ │ +
214
│ │ │ +
221template<class MATRIX>
│ │ │ +
│ │ │ +
222const typename MATRIX::ConstRowXpr row(const MATRIX& A, size_t j) {
│ │ │ +
223 return A.row(j);
│ │ │ +
224}
│ │ │ +
│ │ │ +
225
│ │ │ +
231template<class MATRIX>
│ │ │ +
│ │ │ +
232void zeroBelowDiagonal(MATRIX& A, size_t cols=0) {
│ │ │ +
233 const size_t m = A.rows(), n = A.cols();
│ │ │ +
234 const size_t k = (cols) ? std::min(cols, std::min(m,n)) : std::min(m,n);
│ │ │ +
235 for (size_t j=0; j<k; ++j)
│ │ │ +
236 A.col(j).segment(j+1, m-(j+1)).setZero();
│ │ │ +
237}
│ │ │ +
│ │ │ +
238
│ │ │ +
242inline Matrix trans(const Matrix& A) { return A.transpose(); }
│ │ │ +
243
│ │ │ +
245template <int OutM, int OutN, int OutOptions, int InM, int InN, int InOptions>
│ │ │ +
│ │ │ +
246struct Reshape {
│ │ │ +
247 //TODO replace this with Eigen's reshape function as soon as available. (There is a PR already pending : https://bitbucket.org/eigen/eigen/pull-request/41/reshape/diff)
│ │ │ +
248 typedef Eigen::Map<const Eigen::Matrix<double, OutM, OutN, OutOptions> > ReshapedType;
│ │ │ +
249 static inline ReshapedType reshape(const Eigen::Matrix<double, InM, InN, InOptions> & in) {
│ │ │ +
250 return in.data();
│ │ │ +
251 }
│ │ │ +
252};
│ │ │ +
│ │ │ +
253
│ │ │ +
255template <int M, int InOptions>
│ │ │ +
│ │ │ +
256struct Reshape<M, M, InOptions, M, M, InOptions> {
│ │ │ +
257 typedef const Eigen::Matrix<double, M, M, InOptions> & ReshapedType;
│ │ │ +
258 static inline ReshapedType reshape(const Eigen::Matrix<double, M, M, InOptions> & in) {
│ │ │ +
259 return in;
│ │ │ +
260 }
│ │ │ +
261};
│ │ │ +
│ │ │ +
262
│ │ │ +
264template <int M, int N, int InOptions>
│ │ │ +
│ │ │ +
265struct Reshape<M, N, InOptions, M, N, InOptions> {
│ │ │ +
266 typedef const Eigen::Matrix<double, M, N, InOptions> & ReshapedType;
│ │ │ +
267 static inline ReshapedType reshape(const Eigen::Matrix<double, M, N, InOptions> & in) {
│ │ │ +
268 return in;
│ │ │ +
269 }
│ │ │ +
270};
│ │ │ +
│ │ │ +
271
│ │ │ +
273template <int M, int N, int InOptions>
│ │ │ +
│ │ │ +
274struct Reshape<N, M, InOptions, M, N, InOptions> {
│ │ │ +
275 typedef typename Eigen::Matrix<double, M, N, InOptions>::ConstTransposeReturnType ReshapedType;
│ │ │ +
276 static inline ReshapedType reshape(const Eigen::Matrix<double, M, N, InOptions> & in) {
│ │ │ +
277 return in.transpose();
│ │ │ +
278 }
│ │ │ +
279};
│ │ │ +
│ │ │ +
280
│ │ │ +
281template <int OutM, int OutN, int OutOptions, int InM, int InN, int InOptions>
│ │ │ +
282inline typename Reshape<OutM, OutN, OutOptions, InM, InN, InOptions>::ReshapedType reshape(const Eigen::Matrix<double, InM, InN, InOptions> & m){
│ │ │ +
283 BOOST_STATIC_ASSERT(InM * InN == OutM * OutN);
│ │ │ + │ │ │ +
285}
│ │ │ +
286
│ │ │ +
293GTSAM_EXPORT std::pair<Matrix,Matrix> qr(const Matrix& A);
│ │ │ +
294
│ │ │ +
300GTSAM_EXPORT void inplace_QR(Matrix& A);
│ │ │ +
301
│ │ │ +
310GTSAM_EXPORT std::list<boost::tuple<Vector, double, double> >
│ │ │ +
311weighted_eliminate(Matrix& A, Vector& b, const Vector& sigmas);
│ │ │ +
312
│ │ │ +
320GTSAM_EXPORT void householder_(Matrix& A, size_t k, bool copy_vectors=true);
│ │ │ +
321
│ │ │ +
328GTSAM_EXPORT void householder(Matrix& A, size_t k);
│ │ │ +
329
│ │ │ +
337GTSAM_EXPORT Vector backSubstituteUpper(const Matrix& U, const Vector& b, bool unit=false);
│ │ │
338
│ │ │ -
│ │ │ -
340 Block full() {
│ │ │ -
341 return block_(0, 0, nBlocks(), nBlocks());
│ │ │ -
342 }
│ │ │ -
│ │ │ -
343
│ │ │ -
│ │ │ -
345 std::array<DenseIndex, 4> calcIndices(DenseIndex iBlock, DenseIndex jBlock,
│ │ │ -
346 DenseIndex blockRows,
│ │ │ -
347 DenseIndex blockCols) const {
│ │ │ -
348 assert(blockRows >= 0);
│ │ │ -
349 assert(blockCols >= 0);
│ │ │ -
350
│ │ │ -
351 // adjust indices to account for start and size of blocks
│ │ │ -
352 const DenseIndex denseI = offset(iBlock);
│ │ │ -
353 const DenseIndex denseJ = offset(jBlock);
│ │ │ -
354 const DenseIndex denseRows = offset(iBlock + blockRows) - denseI;
│ │ │ -
355 const DenseIndex denseCols = offset(jBlock + blockCols) - denseJ;
│ │ │ -
356 return {{denseI, denseJ, denseRows, denseCols}};
│ │ │ -
357 }
│ │ │ -
│ │ │ -
358
│ │ │ -
359 void assertInvariants() const
│ │ │ -
360 {
│ │ │ -
361 assert(matrix_.rows() == matrix_.cols());
│ │ │ -
362 assert(matrix_.cols() == variableColOffsets_.back());
│ │ │ -
363 assert(blockStart_ < (DenseIndex)variableColOffsets_.size());
│ │ │ -
364 }
│ │ │ -
365
│ │ │ -
366 template<typename ITERATOR>
│ │ │ -
367 void fillOffsets(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool appendOneDimension)
│ │ │ -
368 {
│ │ │ -
369 variableColOffsets_.resize((lastBlockDim-firstBlockDim) + 1 + (appendOneDimension ? 1 : 0));
│ │ │ -
370 variableColOffsets_[0] = 0;
│ │ │ -
371 DenseIndex j=0;
│ │ │ -
372 for(ITERATOR dim=firstBlockDim; dim!=lastBlockDim; ++dim) {
│ │ │ -
373 variableColOffsets_[j+1] = variableColOffsets_[j] + *dim;
│ │ │ -
374 ++ j;
│ │ │ -
375 }
│ │ │ -
376 if(appendOneDimension)
│ │ │ -
377 {
│ │ │ -
378 variableColOffsets_[j+1] = variableColOffsets_[j] + 1;
│ │ │ -
379 ++ j;
│ │ │ -
380 }
│ │ │ -
381 }
│ │ │ -
382
│ │ │ -
383 friend class VerticalBlockMatrix;
│ │ │ -
384 template<typename SymmetricBlockMatrixType> friend class SymmetricBlockMatrixBlockExpr;
│ │ │ -
385
│ │ │ -
386 private:
│ │ │ -
388 friend class boost::serialization::access;
│ │ │ -
389 template<class ARCHIVE>
│ │ │ -
390 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
│ │ │ -
391 // Fill in the lower triangle part of the matrix, so boost::serialization won't
│ │ │ -
392 // complain about uninitialized data with an input_stream_error exception
│ │ │ -
393 // http://www.boost.org/doc/libs/1_37_0/libs/serialization/doc/exceptions.html#stream_error
│ │ │ -
394 matrix_.triangularView<Eigen::Lower>() = matrix_.triangularView<Eigen::Upper>().transpose();
│ │ │ -
395 ar & BOOST_SERIALIZATION_NVP(matrix_);
│ │ │ -
396 ar & BOOST_SERIALIZATION_NVP(variableColOffsets_);
│ │ │ -
397 ar & BOOST_SERIALIZATION_NVP(blockStart_);
│ │ │ -
398 }
│ │ │ -
399 };
│ │ │ -
│ │ │ -
400
│ │ │ -
402 class CholeskyFailed;
│ │ │ -
403
│ │ │ -
404}
│ │ │ -
Typedefs for easier changing of types.
│ │ │ -
typedef and functions to augment Eigen's MatrixXd
│ │ │ -
A thin wrapper around std::vector that uses a custom allocator.
│ │ │ -
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
FastVector is a type alias to a std::vector with a custom memory allocator.
Definition FastVector.h:34
│ │ │ +
346//TODO: is this function necessary? it isn't used
│ │ │ +
347GTSAM_EXPORT Vector backSubstituteUpper(const Vector& b, const Matrix& U, bool unit=false);
│ │ │ +
348
│ │ │ +
356GTSAM_EXPORT Vector backSubstituteLower(const Matrix& L, const Vector& b, bool unit=false);
│ │ │ +
357
│ │ │ +
364GTSAM_EXPORT Matrix stack(size_t nrMatrices, ...);
│ │ │ +
365GTSAM_EXPORT Matrix stack(const std::vector<Matrix>& blocks);
│ │ │ +
366
│ │ │ +
377GTSAM_EXPORT Matrix collect(const std::vector<const Matrix *>& matrices, size_t m = 0, size_t n = 0);
│ │ │ +
378GTSAM_EXPORT Matrix collect(size_t nrMatrices, ...);
│ │ │ +
379
│ │ │ +
386GTSAM_EXPORT void vector_scale_inplace(const Vector& v, Matrix& A, bool inf_mask = false); // row
│ │ │ +
387GTSAM_EXPORT Matrix vector_scale(const Vector& v, const Matrix& A, bool inf_mask = false); // row
│ │ │ +
388GTSAM_EXPORT Matrix vector_scale(const Matrix& A, const Vector& v, bool inf_mask = false); // column
│ │ │ +
389
│ │ │ +
│ │ │ +
401inline Matrix3 skewSymmetric(double wx, double wy, double wz) {
│ │ │ +
402 return (Matrix3() << 0.0, -wz, +wy, +wz, 0.0, -wx, -wy, +wx, 0.0).finished();
│ │ │ +
403}
│ │ │ +
│ │ │ +
404
│ │ │ +
405template <class Derived>
│ │ │ +
406inline Matrix3 skewSymmetric(const Eigen::MatrixBase<Derived>& w) {
│ │ │ +
407 return skewSymmetric(w(0), w(1), w(2));
│ │ │ +
408}
│ │ │ +
409
│ │ │ +
411GTSAM_EXPORT Matrix inverse_square_root(const Matrix& A);
│ │ │ +
412
│ │ │ +
414GTSAM_EXPORT Matrix cholesky_inverse(const Matrix &A);
│ │ │ +
415
│ │ │ +
428GTSAM_EXPORT void svd(const Matrix& A, Matrix& U, Vector& S, Matrix& V);
│ │ │ +
429
│ │ │ +
437GTSAM_EXPORT boost::tuple<int, double, Vector>
│ │ │ +
438DLT(const Matrix& A, double rank_tol = 1e-9);
│ │ │ +
439
│ │ │ +
445GTSAM_EXPORT Matrix expm(const Matrix& A, size_t K=7);
│ │ │ +
446
│ │ │ +
447std::string formatMatrixIndented(const std::string& label, const Matrix& matrix, bool makeVectorHorizontal = false);
│ │ │ +
448
│ │ │ +
455template <int N>
│ │ │ +
│ │ │ + │ │ │ +
457 typedef Eigen::Matrix<double, N, 1> VectorN;
│ │ │ +
458 typedef Eigen::Matrix<double, N, N> MatrixN;
│ │ │ +
459
│ │ │ +
│ │ │ +
461 VectorN operator()(const MatrixN& A, const VectorN& b,
│ │ │ +
462 OptionalJacobian<N, N* N> H1 = boost::none,
│ │ │ +
463 OptionalJacobian<N, N> H2 = boost::none) const {
│ │ │ +
464 const MatrixN invA = A.inverse();
│ │ │ +
465 const VectorN c = invA * b;
│ │ │ +
466 // The derivative in A is just -[c[0]*invA c[1]*invA ... c[N-1]*invA]
│ │ │ +
467 if (H1)
│ │ │ +
468 for (size_t j = 0; j < N; j++)
│ │ │ +
469 H1->template middleCols<N>(N * j) = -c[j] * invA;
│ │ │ +
470 // The derivative in b is easy, as invA*b is just a linear map:
│ │ │ +
471 if (H2) *H2 = invA;
│ │ │ +
472 return c;
│ │ │ +
473 }
│ │ │ +
│ │ │ +
474};
│ │ │ +
│ │ │ +
475
│ │ │ +
481template <typename T, int N>
│ │ │ +
│ │ │ + │ │ │ +
483 enum { M = traits<T>::dimension };
│ │ │ +
484 typedef Eigen::Matrix<double, N, 1> VectorN;
│ │ │ +
485 typedef Eigen::Matrix<double, N, N> MatrixN;
│ │ │ +
486
│ │ │ +
487 // The function phi should calculate f(a)*b, with derivatives in a and b.
│ │ │ +
488 // Naturally, the derivative in b is f(a).
│ │ │ +
489 typedef std::function<VectorN(
│ │ │ +
490 const T&, const VectorN&, OptionalJacobian<N, M>, OptionalJacobian<N, N>)>
│ │ │ +
491 Operator;
│ │ │ +
492
│ │ │ +
494 MultiplyWithInverseFunction(const Operator& phi) : phi_(phi) {}
│ │ │ +
495
│ │ │ +
│ │ │ +
497 VectorN operator()(const T& a, const VectorN& b,
│ │ │ +
498 OptionalJacobian<N, M> H1 = boost::none,
│ │ │ +
499 OptionalJacobian<N, N> H2 = boost::none) const {
│ │ │ +
500 MatrixN A;
│ │ │ +
501 phi_(a, b, boost::none, A); // get A = f(a) by calling f once
│ │ │ +
502 const MatrixN invA = A.inverse();
│ │ │ +
503 const VectorN c = invA * b;
│ │ │ +
504
│ │ │ +
505 if (H1) {
│ │ │ +
506 Eigen::Matrix<double, N, M> H;
│ │ │ +
507 phi_(a, c, H, boost::none); // get derivative H of forward mapping
│ │ │ +
508 *H1 = -invA* H;
│ │ │ +
509 }
│ │ │ +
510 if (H2) *H2 = invA;
│ │ │ +
511 return c;
│ │ │ +
512 }
│ │ │ +
│ │ │ +
513
│ │ │ +
514 private:
│ │ │ +
515 const Operator phi_;
│ │ │ +
516};
│ │ │ +
│ │ │ +
517
│ │ │ +
518GTSAM_EXPORT Matrix LLt(const Matrix& A);
│ │ │ +
519
│ │ │ +
520GTSAM_EXPORT Matrix RtR(const Matrix& A);
│ │ │ +
521
│ │ │ +
522GTSAM_EXPORT Vector columnNormSquare(const Matrix &A);
│ │ │ +
523} // namespace gtsam
│ │ │ +
Special class for optional Jacobian arguments.
│ │ │ +
typedef and functions to augment Eigen's VectorXd
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
ptrdiff_t DenseIndex
The index type for Eigen objects.
Definition types.h:106
│ │ │ +
Vector backSubstituteLower(const Matrix &L, const Vector &b, bool unit)
backSubstitute L*x=b
Definition Matrix.cpp:367
│ │ │ +
Vector operator^(const Matrix &A, const Vector &v)
overload ^ for trans(A)*v We transpose the vectors for speed.
Definition Matrix.cpp:131
│ │ │ +
void vector_scale_inplace(const Vector &v, Matrix &A, bool inf_mask)
scales a matrix row or column by the values in a vector Arguments (Matrix, Vector) scales the columns...
Definition Matrix.cpp:482
│ │ │
const MATRIX::ConstRowXpr row(const MATRIX &A, size_t j)
Extracts a row view from a matrix that avoids a copy.
Definition Matrix.h:222
│ │ │ -
void split(const G &g, const PredecessorMap< KEY > &tree, G &Ab1, G &Ab2)
Split the graph into two parts: one corresponds to the given spanning tree, and the other corresponds...
Definition graph-inl.h:255
│ │ │ -
bool choleskyPartial(Matrix &ABC, size_t nFrontal, size_t topleft)
Partial Cholesky computes a factor [R S such that [R' 0 [R S = [A B 0 L] S' I] 0 L] B' C].
Definition cholesky.cpp:108
│ │ │ -
This class stores a dense matrix and allows it to be accessed as a collection of blocks.
Definition SymmetricBlockMatrix.h:52
│ │ │ -
Block full()
Get the full matrix as a block.
Definition SymmetricBlockMatrix.h:340
│ │ │ -
DenseIndex blockStart_
Changes apparent matrix view, see main class comment.
Definition SymmetricBlockMatrix.h:62
│ │ │ -
void setDiagonalBlock(DenseIndex I, const XprType &xpr)
Set a diagonal block. Only the upper triangular portion of xpr is evaluated.
Definition SymmetricBlockMatrix.h:195
│ │ │ -
DenseIndex nActualBlocks() const
Number of actual blocks in the full matrix.
Definition SymmetricBlockMatrix.h:306
│ │ │ -
Vector diagonal(DenseIndex J) const
Get the diagonal of the J'th diagonal block.
Definition SymmetricBlockMatrix.h:145
│ │ │ -
Matrix matrix_
The full matrix.
Definition SymmetricBlockMatrix.h:59
│ │ │ -
DenseIndex cols() const
Column size.
Definition SymmetricBlockMatrix.h:117
│ │ │ -
DenseIndex getDim(DenseIndex block) const
Number of dimensions for variable on this diagonal block.
Definition SymmetricBlockMatrix.h:123
│ │ │ -
void setZero()
Set the entire active matrix zero.
Definition SymmetricBlockMatrix.h:258
│ │ │ -
void setOffDiagonalBlock(DenseIndex I, DenseIndex J, const XprType &xpr)
Set an off-diagonal block. Only the upper triangular portion of xpr is evaluated.
Definition SymmetricBlockMatrix.h:201
│ │ │ -
void setFullMatrix(const XprType &xpr)
Set the entire active matrix. Only reads the upper triangular part of xpr.
Definition SymmetricBlockMatrix.h:253
│ │ │ -
Eigen::SelfAdjointView< Block, Eigen::Upper > selfadjointView()
Get self adjoint view.
Definition SymmetricBlockMatrix.h:242
│ │ │ -
constBlock aboveDiagonalBlock(DenseIndex I, DenseIndex J) const
Get block above the diagonal (I, J).
Definition SymmetricBlockMatrix.h:150
│ │ │ -
constBlock block_(DenseIndex iBlock, DenseIndex jBlock, DenseIndex blockRows=1, DenseIndex blockCols=1) const
Get an arbitrary block from the matrix. Indices are in block units.
Definition SymmetricBlockMatrix.h:319
│ │ │ -
constBlock full() const
Get the full matrix as a block.
Definition SymmetricBlockMatrix.h:335
│ │ │ -
DenseIndex rows() const
Row size.
Definition SymmetricBlockMatrix.h:114
│ │ │ -
Block aboveDiagonalRange(DenseIndex i_startBlock, DenseIndex i_endBlock, DenseIndex j_startBlock, DenseIndex j_endBlock)
Get a range [i,j) from the matrix. Indices are in block units.
Definition SymmetricBlockMatrix.h:181
│ │ │ -
Eigen::TriangularView< constBlock, Eigen::Upper > triangularView(DenseIndex I, DenseIndex J) const
Return the square sub-matrix that contains blocks(i:j, i:j) as a triangular view.
Definition SymmetricBlockMatrix.h:163
│ │ │ -
Eigen::SelfAdjointView< constBlock, Eigen::Upper > diagonalBlock(DenseIndex J) const
Return the J'th diagonal block as a self adjoint view.
Definition SymmetricBlockMatrix.h:140
│ │ │ -
SymmetricBlockMatrix(const CONTAINER &dimensions, const Matrix &matrix, bool appendOneDimension=false)
Construct from a container of the sizes of each vertical block and a pre-prepared matrix.
Definition SymmetricBlockMatrix.h:90
│ │ │ -
DenseIndex blockStart() const
Retrieve the first logical block, i.e.
Definition SymmetricBlockMatrix.h:277
│ │ │ -
Eigen::SelfAdjointView< constBlock, Eigen::Upper > selfadjointView() const
Get self adjoint view.
Definition SymmetricBlockMatrix.h:247
│ │ │ -
void updateOffDiagonalBlock(DenseIndex I, DenseIndex J, const XprType &xpr)
Update an off diagonal block.
Definition SymmetricBlockMatrix.h:228
│ │ │ -
SymmetricBlockMatrix(const CONTAINER &dimensions, bool appendOneDimension=false)
Construct from a container of the sizes of each block.
Definition SymmetricBlockMatrix.h:70
│ │ │ -
SymmetricBlockMatrix(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool appendOneDimension=false)
Construct from iterator over the sizes of each vertical block.
Definition SymmetricBlockMatrix.h:80
│ │ │ -
DenseIndex & blockStart()
Retrieve or modify the first logical block, i.e.
Definition SymmetricBlockMatrix.h:273
│ │ │ -
constBlock aboveDiagonalRange(DenseIndex i_startBlock, DenseIndex i_endBlock, DenseIndex j_startBlock, DenseIndex j_endBlock) const
Get a range [i,j) from the matrix. Indices are in block units.
Definition SymmetricBlockMatrix.h:170
│ │ │ -
Eigen::SelfAdjointView< Block, Eigen::Upper > diagonalBlock(DenseIndex J)
Return the J'th diagonal block as a self adjoint view.
Definition SymmetricBlockMatrix.h:135
│ │ │ -
Block block_(DenseIndex iBlock, DenseIndex jBlock, DenseIndex blockRows=1, DenseIndex blockCols=1)
Get an arbitrary block from the matrix. Indices are in block units.
Definition SymmetricBlockMatrix.h:327
│ │ │ -
void updateDiagonalBlock(DenseIndex I, const XprType &xpr)
Increment the diagonal block by the values in xpr. Only reads the upper triangular part of xpr.
Definition SymmetricBlockMatrix.h:212
│ │ │ -
DenseIndex nOffsets() const
Number of offsets in the full matrix.
Definition SymmetricBlockMatrix.h:301
│ │ │ -
std::array< DenseIndex, 4 > calcIndices(DenseIndex iBlock, DenseIndex jBlock, DenseIndex blockRows, DenseIndex blockCols) const
Compute the indices into the underlying matrix for a given block.
Definition SymmetricBlockMatrix.h:345
│ │ │ -
DenseIndex nBlocks() const
Block count.
Definition SymmetricBlockMatrix.h:120
│ │ │ -
FastVector< DenseIndex > variableColOffsets_
the starting columns of each block (0-based)
Definition SymmetricBlockMatrix.h:60
│ │ │ -
Eigen::SelfAdjointView< constBlock, Eigen::Upper > selfadjointView(DenseIndex I, DenseIndex J) const
Return the square sub-matrix that contains blocks(i:j, i:j).
Definition SymmetricBlockMatrix.h:156
│ │ │ -
DenseIndex offset(DenseIndex block) const
Get an offset for a block index (in the active view).
Definition SymmetricBlockMatrix.h:311
│ │ │ -
This class stores a dense matrix and allows it to be accessed as a collection of vertical blocks.
Definition VerticalBlockMatrix.h:43
│ │ │ +
T expm(const Vector &x, int K=7)
Exponential map given exponential coordinates class T needs a wedge<> function and a constructor from...
Definition Lie.h:317
│ │ │ +
void save(const Matrix &A, const string &s, const string &filename)
save a matrix to file, which can be loaded by matlab
Definition Matrix.cpp:167
│ │ │ +
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
equals with an tolerance, prints out message if unequal
Definition Matrix.cpp:43
│ │ │ +
bool linear_dependent(const Matrix &A, const Matrix &B, double tol)
check whether the rows of two matrices are linear dependent
Definition Matrix.cpp:117
│ │ │ +
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:156
│ │ │ +
const MATRIX::ConstColXpr column(const MATRIX &A, size_t j)
Extracts a column view from a matrix that avoids a copy.
Definition Matrix.h:211
│ │ │ +
void zeroBelowDiagonal(MATRIX &A, size_t cols=0)
Zeros all of the elements below the diagonal of a matrix, in place.
Definition Matrix.h:232
│ │ │ +
list< boost::tuple< Vector, double, double > > weighted_eliminate(Matrix &A, Vector &b, const Vector &sigmas)
Imperative algorithm for in-place full elimination with weights and constraint handling.
Definition Matrix.cpp:273
│ │ │ +
Vector backSubstituteUpper(const Matrix &U, const Vector &b, bool unit)
backSubstitute U*x=b
Definition Matrix.cpp:377
│ │ │ +
bool assert_inequal(const Matrix &A, const Matrix &B, double tol)
inequals with an tolerance, prints out message if within tolerance
Definition Matrix.cpp:63
│ │ │ +
void householder(Matrix &A, size_t k)
Householder tranformation, zeros below diagonal.
Definition Matrix.cpp:354
│ │ │ +
istream & operator>>(istream &inputStream, Matrix &destinationMatrix)
Read a matrix from an input stream, such as a file.
Definition Matrix.cpp:174
│ │ │ +
void inplace_QR(Matrix &A)
QR factorization using Eigen's internal block QR algorithm.
Definition Matrix.cpp:636
│ │ │ +
void svd(const Matrix &A, Matrix &U, Vector &S, Matrix &V)
SVD computes economy SVD A=U*S*V'.
Definition Matrix.cpp:560
│ │ │ +
Matrix3 skewSymmetric(double wx, double wy, double wz)
skew symmetric matrix returns this: 0 -wz wy wz 0 -wx -wy wx 0
Definition Matrix.h:401
│ │ │ +
Eigen::Block< const MATRIX > sub(const MATRIX &A, size_t i1, size_t i2, size_t j1, size_t j2)
extract submatrix, slice semantics, i.e.
Definition Matrix.h:181
│ │ │ +
Matrix trans(const Matrix &A)
static transpose function, just calls Eigen transpose member function
Definition Matrix.h:242
│ │ │ +
bool operator!=(const Matrix &A, const Matrix &B)
inequality
Definition Matrix.h:107
│ │ │ +
boost::tuple< int, double, Vector > DLT(const Matrix &A, double rank_tol)
Direct linear transform algorithm that calls svd to find a vector v that minimizes the algebraic erro...
Definition Matrix.cpp:568
│ │ │ +
Matrix cholesky_inverse(const Matrix &A)
Return the inverse of a S.P.D.
Definition Matrix.cpp:539
│ │ │ +
MATRIX prod(const MATRIX &A, const MATRIX &B)
products using old-style format to improve compatibility
Definition Matrix.h:144
│ │ │ +
void householder_(Matrix &A, size_t k, bool copy_vectors)
Imperative version of Householder QR factorization, Golub & Van Loan p 224 version with Householder v...
Definition Matrix.cpp:327
│ │ │ +
void insertSub(Eigen::MatrixBase< Derived1 > &fullMatrix, const Eigen::MatrixBase< Derived2 > &subMatrix, size_t i, size_t j)
insert a submatrix IN PLACE at a specified location in a larger matrix NOTE: there is no size checkin...
Definition Matrix.h:195
│ │ │ +
Matrix collect(const std::vector< const Matrix * > &matrices, size_t m, size_t n)
create a matrix by concatenating Given a set of matrices: A1, A2, A3... If all matrices have the same...
Definition Matrix.cpp:443
│ │ │ +
bool linear_independent(const Matrix &A, const Matrix &B, double tol)
check whether the rows of two matrices are linear independent
Definition Matrix.cpp:103
│ │ │ +
bool fpEqual(double a, double b, double tol, bool check_relative_also)
Ensure we are not including a different version of Eigen in user code than while compiling gtsam,...
Definition Vector.cpp:42
│ │ │ +
pair< Matrix, Matrix > qr(const Matrix &A)
Householder QR factorization, Golub & Van Loan p 224, explicit version
Definition Matrix.cpp:235
│ │ │ +
Matrix diag(const std::vector< Matrix > &Hs)
Create a matrix with submatrices along its diagonal.
Definition Matrix.cpp:207
│ │ │ +
bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen::DenseBase< MATRIX > &B, double tol=1e-9)
equals with a tolerance
Definition Matrix.h:81
│ │ │ +
bool operator==(const Matrix &A, const Matrix &B)
equality is just equal_with_abs_tol 1e-9
Definition Matrix.h:100
│ │ │ +
Matrix inverse_square_root(const Matrix &A)
Use Cholesky to calculate inverse square root of a matrix.
Definition Matrix.cpp:552
│ │ │ +
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ +
Reshape functor.
Definition Matrix.h:246
│ │ │ +
Functor that implements multiplication of a vector b with the inverse of a matrix A.
Definition Matrix.h:456
│ │ │ +
VectorN operator()(const MatrixN &A, const VectorN &b, OptionalJacobian< N, N *N > H1=boost::none, OptionalJacobian< N, N > H2=boost::none) const
A.inverse() * b, with optional derivatives.
Definition Matrix.h:461
│ │ │ +
Functor that implements multiplication with the inverse of a matrix, itself the result of a function ...
Definition Matrix.h:482
│ │ │ +
VectorN operator()(const T &a, const VectorN &b, OptionalJacobian< N, M > H1=boost::none, OptionalJacobian< N, N > H2=boost::none) const
f(a).inverse() * b, with optional derivatives
Definition Matrix.h:497
│ │ │ +
MultiplyWithInverseFunction(const Operator &phi)
Construct with function as explained above.
Definition Matrix.h:494
│ │ │ +
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:41
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,546 +1,534 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -SymmetricBlockMatrix.h │ │ │ │ +Matrix.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ -3* GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ -4* Atlanta, Georgia 30332-0415 │ │ │ │ -5* All Rights Reserved │ │ │ │ -6* Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ +3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ +4 * Atlanta, Georgia 30332-0415 │ │ │ │ +5 * All Rights Reserved │ │ │ │ +6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ -8* See LICENSE for the license information │ │ │ │ +8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ -10* ------------------------------------------------------------------------- │ │ │ │ +10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -18#pragma once │ │ │ │ -19 │ │ │ │ -20#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_V_e_c_t_o_r_._h> │ │ │ │ -21#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_._h> │ │ │ │ -22#include <_g_t_s_a_m_/_b_a_s_e_/_t_y_p_e_s_._h> │ │ │ │ -23#include │ │ │ │ -24#include │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27#include │ │ │ │ -28 │ │ │ │ -29namespace boost { │ │ │ │ -30namespace serialization { │ │ │ │ -31class access; │ │ │ │ -32} /* namespace serialization */ │ │ │ │ -33} /* namespace boost */ │ │ │ │ -34 │ │ │ │ -35namespace _g_t_s_a_m { │ │ │ │ -36 │ │ │ │ -37 // Forward declarations │ │ │ │ -38 class VerticalBlockMatrix; │ │ │ │ +23// \callgraph │ │ │ │ +24 │ │ │ │ +25#pragma once │ │ │ │ +26 │ │ │ │ +27#include <_g_t_s_a_m_/_b_a_s_e_/_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h> │ │ │ │ +28#include <_g_t_s_a_m_/_b_a_s_e_/_V_e_c_t_o_r_._h> │ │ │ │ +29#include │ │ │ │ +30 │ │ │ │ +31#include │ │ │ │ +32 │ │ │ │ +38namespace _g_t_s_a_m { │ │ │ │ 39 │ │ │ │ -_5_1 class GTSAM_EXPORT _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ -52 { │ │ │ │ -53 public: │ │ │ │ -54 typedef _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x _T_h_i_s; │ │ │ │ -55 typedef Eigen::Block Block; │ │ │ │ -56 typedef Eigen::Block constBlock; │ │ │ │ -57 │ │ │ │ -58 protected: │ │ │ │ -_5_9 Matrix _m_a_t_r_i_x__; │ │ │ │ -_6_0 _F_a_s_t_V_e_c_t_o_r_<_D_e_n_s_e_I_n_d_e_x_> _v_a_r_i_a_b_l_e_C_o_l_O_f_f_s_e_t_s__; │ │ │ │ -61 │ │ │ │ -_6_2 _D_e_n_s_e_I_n_d_e_x _b_l_o_c_k_S_t_a_r_t__; │ │ │ │ -63 │ │ │ │ -64 public: │ │ │ │ -66 _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x(); │ │ │ │ -67 │ │ │ │ -69 template │ │ │ │ -_7_0 _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x(const CONTAINER& dimensions, bool appendOneDimension = │ │ │ │ -false) : │ │ │ │ -71 blockStart_(0) │ │ │ │ -72 { │ │ │ │ -73 fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension); │ │ │ │ -74 matrix_.resize(variableColOffsets_.back(), variableColOffsets_.back()); │ │ │ │ -75 assertInvariants(); │ │ │ │ -76 } │ │ │ │ -77 │ │ │ │ -79 template │ │ │ │ -_8_0 _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool │ │ │ │ -appendOneDimension = false) : │ │ │ │ -81 blockStart_(0) │ │ │ │ -82 { │ │ │ │ -83 fillOffsets(firstBlockDim, lastBlockDim, appendOneDimension); │ │ │ │ -84 matrix_.resize(variableColOffsets_.back(), variableColOffsets_.back()); │ │ │ │ -85 assertInvariants(); │ │ │ │ -86 } │ │ │ │ +40typedef Eigen::MatrixXd Matrix; │ │ │ │ +41typedef Eigen::Matrix MatrixRowMajor; │ │ │ │ +42 │ │ │ │ +43// Create handy typedefs and constants for square-size matrices │ │ │ │ +44// MatrixMN, MatrixN = MatrixNN, I_NxN, and Z_NxN, for M,N=1..9 │ │ │ │ +45#define GTSAM_MAKE_MATRIX_DEFS(N) \ │ │ │ │ +46using Matrix##N = Eigen::Matrix; \ │ │ │ │ +47using Matrix1##N = Eigen::Matrix; \ │ │ │ │ +48using Matrix2##N = Eigen::Matrix; \ │ │ │ │ +49using Matrix3##N = Eigen::Matrix; \ │ │ │ │ +50using Matrix4##N = Eigen::Matrix; \ │ │ │ │ +51using Matrix5##N = Eigen::Matrix; \ │ │ │ │ +52using Matrix6##N = Eigen::Matrix; \ │ │ │ │ +53using Matrix7##N = Eigen::Matrix; \ │ │ │ │ +54using Matrix8##N = Eigen::Matrix; \ │ │ │ │ +55using Matrix9##N = Eigen::Matrix; \ │ │ │ │ +56static const Eigen::MatrixBase::IdentityReturnType I_##N##x##N = │ │ │ │ +Matrix##N::Identity(); \ │ │ │ │ +57static const Eigen::MatrixBase::ConstantReturnType Z_##N##x##N = │ │ │ │ +Matrix##N::Zero(); │ │ │ │ +58 │ │ │ │ +59GTSAM_MAKE_MATRIX_DEFS(1) │ │ │ │ +60GTSAM_MAKE_MATRIX_DEFS(2) │ │ │ │ +61GTSAM_MAKE_MATRIX_DEFS(3) │ │ │ │ +62GTSAM_MAKE_MATRIX_DEFS(4) │ │ │ │ +63GTSAM_MAKE_MATRIX_DEFS(5) │ │ │ │ +64GTSAM_MAKE_MATRIX_DEFS(6) │ │ │ │ +65GTSAM_MAKE_MATRIX_DEFS(7) │ │ │ │ +66GTSAM_MAKE_MATRIX_DEFS(8) │ │ │ │ +67GTSAM_MAKE_MATRIX_DEFS(9) │ │ │ │ +68 │ │ │ │ +69// Matrix expressions for accessing parts of matrices │ │ │ │ +70typedef Eigen::Block SubMatrix; │ │ │ │ +71typedef Eigen::Block ConstSubMatrix; │ │ │ │ +72 │ │ │ │ +73// Matrix formatting arguments when printing. │ │ │ │ +74// Akin to Matlab style. │ │ │ │ +75const Eigen::IOFormat& matlabFormat(); │ │ │ │ +76 │ │ │ │ +80template │ │ │ │ +_8_1bool _e_q_u_a_l___w_i_t_h___a_b_s___t_o_l(const Eigen::DenseBase& A, const Eigen:: │ │ │ │ +DenseBase& B, double tol = 1e-9) { │ │ │ │ +82 │ │ │ │ +83 const size_t n1 = A.cols(), m1 = A.rows(); │ │ │ │ +84 const size_t n2 = B.cols(), m2 = B.rows(); │ │ │ │ +85 │ │ │ │ +86 if(m1!=m2 || n1!=n2) return false; │ │ │ │ 87 │ │ │ │ -89 template │ │ │ │ -_9_0 _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x(const CONTAINER& dimensions, const Matrix& matrix, bool │ │ │ │ -appendOneDimension = false) : │ │ │ │ -91 blockStart_(0) │ │ │ │ -92 { │ │ │ │ -93 matrix_.resize(matrix.rows(), matrix.cols()); │ │ │ │ -94 matrix_.triangularView() = matrix.triangularView │ │ │ │ -(); │ │ │ │ -95 fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension); │ │ │ │ -96 if(matrix_.rows() != matrix_.cols()) │ │ │ │ -97 throw std::invalid_argument("Requested to create a SymmetricBlockMatrix from │ │ │ │ -a non-square matrix."); │ │ │ │ -98 if(variableColOffsets_.back() != matrix_.cols()) │ │ │ │ -99 throw std::invalid_argument("Requested to create a SymmetricBlockMatrix with │ │ │ │ -dimensions that do not sum to the total size of the provided matrix."); │ │ │ │ -100 assertInvariants(); │ │ │ │ -101 } │ │ │ │ -102 │ │ │ │ -106 static _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x LikeActiveViewOf(const _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x& │ │ │ │ -other); │ │ │ │ -107 │ │ │ │ -111 static _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x LikeActiveViewOf(const _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x& │ │ │ │ -other); │ │ │ │ -112 │ │ │ │ -_1_1_4 _D_e_n_s_e_I_n_d_e_x _r_o_w_s() const { assertInvariants(); return │ │ │ │ -variableColOffsets_.back() - variableColOffsets_[blockStart_]; } │ │ │ │ +88 for(size_t i=0; i _d_i_a_g_o_n_a_l_B_l_o_c_k(_D_e_n_s_e_I_n_d_e_x J) { │ │ │ │ -136 return block_(J, J).selfadjointView(); │ │ │ │ -137 } │ │ │ │ -138 │ │ │ │ -_1_4_0 Eigen::SelfAdjointView _d_i_a_g_o_n_a_l_B_l_o_c_k(_D_e_n_s_e_I_n_d_e_x │ │ │ │ -J) const { │ │ │ │ -141 return block_(J, J).selfadjointView(); │ │ │ │ -142 } │ │ │ │ -143 │ │ │ │ -_1_4_5 Vector _d_i_a_g_o_n_a_l(_D_e_n_s_e_I_n_d_e_x J) const { │ │ │ │ -146 return block_(J, J).diagonal(); │ │ │ │ -147 } │ │ │ │ +119GTSAM_EXPORT bool _a_s_s_e_r_t___i_n_e_q_u_a_l(const Matrix& A, const Matrix& B, double │ │ │ │ +tol = 1e-9); │ │ │ │ +120 │ │ │ │ +124GTSAM_EXPORT bool _a_s_s_e_r_t___e_q_u_a_l(const std::list& As, const std:: │ │ │ │ +list& Bs, double tol = 1e-9); │ │ │ │ +125 │ │ │ │ +129GTSAM_EXPORT bool _l_i_n_e_a_r___i_n_d_e_p_e_n_d_e_n_t(const Matrix& A, const Matrix& B, │ │ │ │ +double tol = 1e-9); │ │ │ │ +130 │ │ │ │ +134GTSAM_EXPORT bool _l_i_n_e_a_r___d_e_p_e_n_d_e_n_t(const Matrix& A, const Matrix& B, double │ │ │ │ +tol = 1e-9); │ │ │ │ +135 │ │ │ │ +140GTSAM_EXPORT Vector _o_p_e_r_a_t_o_r_^(const Matrix& A, const Vector & v); │ │ │ │ +141 │ │ │ │ +143template │ │ │ │ +_1_4_4inline MATRIX _p_r_o_d(const MATRIX& A, const MATRIX&B) { │ │ │ │ +145 MATRIX result = A * B; │ │ │ │ +146 return result; │ │ │ │ +147} │ │ │ │ 148 │ │ │ │ -_1_5_0 constBlock _a_b_o_v_e_D_i_a_g_o_n_a_l_B_l_o_c_k(_D_e_n_s_e_I_n_d_e_x I, _D_e_n_s_e_I_n_d_e_x J) const { │ │ │ │ -151 assert(I < J); │ │ │ │ -152 return block_(I, J); │ │ │ │ -153 } │ │ │ │ -154 │ │ │ │ -_1_5_6 Eigen::SelfAdjointView _s_e_l_f_a_d_j_o_i_n_t_V_i_e_w( │ │ │ │ -157 _D_e_n_s_e_I_n_d_e_x I, _D_e_n_s_e_I_n_d_e_x J) const { │ │ │ │ -158 assert(J > I); │ │ │ │ -159 return block_(I, I, J - I, J - I).selfadjointView(); │ │ │ │ -160 } │ │ │ │ -161 │ │ │ │ -_1_6_3 Eigen::TriangularView _t_r_i_a_n_g_u_l_a_r_V_i_e_w(_D_e_n_s_e_I_n_d_e_x │ │ │ │ -I, │ │ │ │ -164 _D_e_n_s_e_I_n_d_e_x J) const { │ │ │ │ -165 assert(J > I); │ │ │ │ -166 return block_(I, I, J - I, J - I).triangularView(); │ │ │ │ -167 } │ │ │ │ -168 │ │ │ │ -_1_7_0 constBlock _a_b_o_v_e_D_i_a_g_o_n_a_l_R_a_n_g_e(_D_e_n_s_e_I_n_d_e_x i_startBlock, │ │ │ │ -171 _D_e_n_s_e_I_n_d_e_x i_endBlock, │ │ │ │ -172 _D_e_n_s_e_I_n_d_e_x j_startBlock, │ │ │ │ -173 _D_e_n_s_e_I_n_d_e_x j_endBlock) const { │ │ │ │ -174 assert(i_startBlock < j_startBlock); │ │ │ │ -175 assert(i_endBlock <= j_startBlock); │ │ │ │ -176 return block_(i_startBlock, j_startBlock, i_endBlock - i_startBlock, │ │ │ │ -177 j_endBlock - j_startBlock); │ │ │ │ -178 } │ │ │ │ -179 │ │ │ │ -_1_8_1 Block _a_b_o_v_e_D_i_a_g_o_n_a_l_R_a_n_g_e(_D_e_n_s_e_I_n_d_e_x i_startBlock, _D_e_n_s_e_I_n_d_e_x i_endBlock, │ │ │ │ -182 _D_e_n_s_e_I_n_d_e_x j_startBlock, _D_e_n_s_e_I_n_d_e_x j_endBlock) { │ │ │ │ -183 assert(i_startBlock < j_startBlock); │ │ │ │ -184 assert(i_endBlock <= j_startBlock); │ │ │ │ -185 return block_(i_startBlock, j_startBlock, i_endBlock - i_startBlock, │ │ │ │ -186 j_endBlock - j_startBlock); │ │ │ │ -187 } │ │ │ │ -188 │ │ │ │ -192 │ │ │ │ -194 template │ │ │ │ -_1_9_5 void _s_e_t_D_i_a_g_o_n_a_l_B_l_o_c_k(_D_e_n_s_e_I_n_d_e_x I, const XprType& xpr) { │ │ │ │ -196 block_(I, I).triangularView() = xpr.template │ │ │ │ -triangularView(); │ │ │ │ -197 } │ │ │ │ +152GTSAM_EXPORT void _p_r_i_n_t(const Matrix& A, const std::string& s, std::ostream& │ │ │ │ +stream); │ │ │ │ +153 │ │ │ │ +157GTSAM_EXPORT void _p_r_i_n_t(const Matrix& A, const std::string& s = ""); │ │ │ │ +158 │ │ │ │ +162GTSAM_EXPORT void _s_a_v_e(const Matrix& A, const std::string &s, const std:: │ │ │ │ +string& filename); │ │ │ │ +163 │ │ │ │ +169GTSAM_EXPORT std::istream& _o_p_e_r_a_t_o_r_>_>(std::istream& inputStream, Matrix& │ │ │ │ +destinationMatrix); │ │ │ │ +170 │ │ │ │ +180template │ │ │ │ +_1_8_1Eigen::Block _s_u_b(const MATRIX& A, size_t i1, size_t i2, size_t │ │ │ │ +j1, size_t j2) { │ │ │ │ +182 size_t m=i2-i1, n=j2-j1; │ │ │ │ +183 return A.block(i1,j1,m,n); │ │ │ │ +184} │ │ │ │ +185 │ │ │ │ +194template │ │ │ │ +_1_9_5void _i_n_s_e_r_t_S_u_b(Eigen::MatrixBase& fullMatrix, const Eigen:: │ │ │ │ +MatrixBase& subMatrix, size_t i, size_t j) { │ │ │ │ +196 fullMatrix.block(i, j, subMatrix.rows(), subMatrix.cols()) = subMatrix; │ │ │ │ +197} │ │ │ │ 198 │ │ │ │ -200 template │ │ │ │ -_2_0_1 void _s_e_t_O_f_f_D_i_a_g_o_n_a_l_B_l_o_c_k(_D_e_n_s_e_I_n_d_e_x I, _D_e_n_s_e_I_n_d_e_x J, const XprType& xpr) { │ │ │ │ -202 assert(I != J); │ │ │ │ -203 if (I < J) { │ │ │ │ -204 block_(I, J) = xpr; │ │ │ │ -205 } else { │ │ │ │ -206 block_(J, I) = xpr.transpose(); │ │ │ │ -207 } │ │ │ │ -208 } │ │ │ │ -209 │ │ │ │ -211 template │ │ │ │ -_2_1_2 void _u_p_d_a_t_e_D_i_a_g_o_n_a_l_B_l_o_c_k(_D_e_n_s_e_I_n_d_e_x I, const XprType& xpr) { │ │ │ │ -213 // TODO(gareth): Eigen won't let us add triangular or self-adjoint views │ │ │ │ -214 // here, so we do it manually. │ │ │ │ -215 auto dest = block_(I, I); │ │ │ │ -216 assert(dest.rows() == xpr.rows()); │ │ │ │ -217 assert(dest.cols() == xpr.cols()); │ │ │ │ -218 for (_D_e_n_s_e_I_n_d_e_x col = 0; col < dest.cols(); ++col) { │ │ │ │ -219 for (_D_e_n_s_e_I_n_d_e_x _r_o_w = 0; _r_o_w <= col; ++_r_o_w) { │ │ │ │ -220 dest(_r_o_w, col) += xpr(_r_o_w, col); │ │ │ │ -221 } │ │ │ │ -222 } │ │ │ │ -223 } │ │ │ │ -224 │ │ │ │ -227 template │ │ │ │ -_2_2_8 void _u_p_d_a_t_e_O_f_f_D_i_a_g_o_n_a_l_B_l_o_c_k(_D_e_n_s_e_I_n_d_e_x I, _D_e_n_s_e_I_n_d_e_x J, const XprType& xpr) │ │ │ │ -{ │ │ │ │ -229 assert(I != J); │ │ │ │ -230 if (I < J) { │ │ │ │ -231 block_(I, J).noalias() += xpr; │ │ │ │ -232 } else { │ │ │ │ -233 block_(J, I).noalias() += xpr.transpose(); │ │ │ │ -234 } │ │ │ │ -235 } │ │ │ │ -236 │ │ │ │ -240 │ │ │ │ -_2_4_2 Eigen::SelfAdjointView _s_e_l_f_a_d_j_o_i_n_t_V_i_e_w() { │ │ │ │ -243 return full().selfadjointView(); │ │ │ │ -244 } │ │ │ │ -245 │ │ │ │ -_2_4_7 Eigen::SelfAdjointView _s_e_l_f_a_d_j_o_i_n_t_V_i_e_w() const { │ │ │ │ -248 return full().selfadjointView(); │ │ │ │ -249 } │ │ │ │ -250 │ │ │ │ -252 template │ │ │ │ -_2_5_3 void _s_e_t_F_u_l_l_M_a_t_r_i_x(const XprType& xpr) { │ │ │ │ -254 full().triangularView() = xpr.template triangularView(); │ │ │ │ -255 } │ │ │ │ -256 │ │ │ │ -_2_5_8 void _s_e_t_Z_e_r_o() { │ │ │ │ -259 full().triangularView().setZero(); │ │ │ │ +202GTSAM_EXPORT Matrix _d_i_a_g(const std::vector& Hs); │ │ │ │ +203 │ │ │ │ +210template │ │ │ │ +_2_1_1const typename MATRIX::ConstColXpr _c_o_l_u_m_n(const MATRIX& A, size_t j) { │ │ │ │ +212 return A.col(j); │ │ │ │ +213} │ │ │ │ +214 │ │ │ │ +221template │ │ │ │ +_2_2_2const typename MATRIX::ConstRowXpr _r_o_w(const MATRIX& A, size_t j) { │ │ │ │ +223 return A.row(j); │ │ │ │ +224} │ │ │ │ +225 │ │ │ │ +231template │ │ │ │ +_2_3_2void _z_e_r_o_B_e_l_o_w_D_i_a_g_o_n_a_l(MATRIX& A, size_t cols=0) { │ │ │ │ +233 const size_t m = A.rows(), n = A.cols(); │ │ │ │ +234 const size_t k = (cols) ? std::min(cols, std::min(m,n)) : std::min(m,n); │ │ │ │ +235 for (size_t j=0; j │ │ │ │ +_2_4_6struct _R_e_s_h_a_p_e { │ │ │ │ +247 //TODO replace this with Eigen's reshape function as soon as available. │ │ │ │ +(There is a PR already pending : https://bitbucket.org/eigen/eigen/pull- │ │ │ │ +request/41/reshape/diff) │ │ │ │ +248 typedef Eigen::Map > │ │ │ │ +ReshapedType; │ │ │ │ +249 static inline ReshapedType reshape(const Eigen::Matrix & in) { │ │ │ │ +250 return in.data(); │ │ │ │ +251 } │ │ │ │ +252}; │ │ │ │ +253 │ │ │ │ +255template │ │ │ │ +_2_5_6struct _R_e_s_h_a_p_e { │ │ │ │ +257 typedef const Eigen::Matrix & ReshapedType; │ │ │ │ +258 static inline ReshapedType reshape(const Eigen::Matrix & in) { │ │ │ │ +259 return in; │ │ │ │ 260 } │ │ │ │ -261 │ │ │ │ -263 void negate(); │ │ │ │ -264 │ │ │ │ -266 void invertInPlace(); │ │ │ │ -267 │ │ │ │ -269 │ │ │ │ -_2_7_3 _D_e_n_s_e_I_n_d_e_x& _b_l_o_c_k_S_t_a_r_t() { return blockStart_; } │ │ │ │ -274 │ │ │ │ -_2_7_7 _D_e_n_s_e_I_n_d_e_x _b_l_o_c_k_S_t_a_r_t() const { return blockStart_; } │ │ │ │ -278 │ │ │ │ -289 void _c_h_o_l_e_s_k_y_P_a_r_t_i_a_l(_D_e_n_s_e_I_n_d_e_x nFrontals); │ │ │ │ -290 │ │ │ │ -296 _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x _s_p_l_i_t(_D_e_n_s_e_I_n_d_e_x nFrontals); │ │ │ │ -297 │ │ │ │ -298 protected: │ │ │ │ -299 │ │ │ │ -_3_0_1 _D_e_n_s_e_I_n_d_e_x _n_O_f_f_s_e_t_s() const { │ │ │ │ -302 return variableColOffsets_.size(); │ │ │ │ -303 } │ │ │ │ -304 │ │ │ │ -_3_0_6 _D_e_n_s_e_I_n_d_e_x _n_A_c_t_u_a_l_B_l_o_c_k_s() const { │ │ │ │ -307 return nOffsets() - 1; │ │ │ │ -308 } │ │ │ │ -309 │ │ │ │ -_3_1_1 _D_e_n_s_e_I_n_d_e_x _o_f_f_s_e_t(_D_e_n_s_e_I_n_d_e_x block) const { │ │ │ │ -312 assert(block >= 0); │ │ │ │ -313 const _D_e_n_s_e_I_n_d_e_x actual_index = block + blockStart(); │ │ │ │ -314 assert(actual_index < nOffsets()); │ │ │ │ -315 return variableColOffsets_[actual_index]; │ │ │ │ -316 } │ │ │ │ -317 │ │ │ │ -_3_1_9 constBlock _b_l_o_c_k__(_D_e_n_s_e_I_n_d_e_x iBlock, _D_e_n_s_e_I_n_d_e_x jBlock, │ │ │ │ -320 _D_e_n_s_e_I_n_d_e_x blockRows = 1, _D_e_n_s_e_I_n_d_e_x blockCols = 1) const { │ │ │ │ -321 const std::array indices = │ │ │ │ -322 calcIndices(iBlock, jBlock, blockRows, blockCols); │ │ │ │ -323 return matrix_.block(indices[0], indices[1], indices[2], indices[3]); │ │ │ │ -324 } │ │ │ │ -325 │ │ │ │ -_3_2_7 Block _b_l_o_c_k__(_D_e_n_s_e_I_n_d_e_x iBlock, _D_e_n_s_e_I_n_d_e_x jBlock, _D_e_n_s_e_I_n_d_e_x blockRows = │ │ │ │ -1, │ │ │ │ -328 _D_e_n_s_e_I_n_d_e_x blockCols = 1) { │ │ │ │ -329 const std::array indices = │ │ │ │ -330 calcIndices(iBlock, jBlock, blockRows, blockCols); │ │ │ │ -331 return matrix_.block(indices[0], indices[1], indices[2], indices[3]); │ │ │ │ -332 } │ │ │ │ -333 │ │ │ │ -_3_3_5 constBlock _f_u_l_l() const { │ │ │ │ -336 return block_(0, 0, nBlocks(), nBlocks()); │ │ │ │ -337 } │ │ │ │ +261}; │ │ │ │ +262 │ │ │ │ +264template │ │ │ │ +_2_6_5struct _R_e_s_h_a_p_e { │ │ │ │ +266 typedef const Eigen::Matrix & ReshapedType; │ │ │ │ +267 static inline ReshapedType reshape(const Eigen::Matrix & in) { │ │ │ │ +268 return in; │ │ │ │ +269 } │ │ │ │ +270}; │ │ │ │ +271 │ │ │ │ +273template │ │ │ │ +_2_7_4struct _R_e_s_h_a_p_e { │ │ │ │ +275 typedef typename Eigen::Matrix:: │ │ │ │ +ConstTransposeReturnType ReshapedType; │ │ │ │ +276 static inline ReshapedType reshape(const Eigen::Matrix & in) { │ │ │ │ +277 return in.transpose(); │ │ │ │ +278 } │ │ │ │ +279}; │ │ │ │ +280 │ │ │ │ +281template │ │ │ │ +282inline typename Reshape:: │ │ │ │ +ReshapedType reshape(const Eigen::Matrix & m){ │ │ │ │ +283 BOOST_STATIC_ASSERT(InM * InN == OutM * OutN); │ │ │ │ +284 return _R_e_s_h_a_p_e_<_O_u_t_M_,_ _O_u_t_N_,_ _O_u_t_O_p_t_i_o_n_s_,_ _I_n_M_,_ _I_n_N_,_ _I_n_O_p_t_i_o_n_s_>_:_:_r_e_s_h_a_p_e(m); │ │ │ │ +285} │ │ │ │ +286 │ │ │ │ +293GTSAM_EXPORT std::pair _q_r(const Matrix& A); │ │ │ │ +294 │ │ │ │ +300GTSAM_EXPORT void _i_n_p_l_a_c_e___Q_R(Matrix& A); │ │ │ │ +301 │ │ │ │ +310GTSAM_EXPORT std::list > │ │ │ │ +311_w_e_i_g_h_t_e_d___e_l_i_m_i_n_a_t_e(Matrix& A, Vector& b, const Vector& sigmas); │ │ │ │ +312 │ │ │ │ +320GTSAM_EXPORT void _h_o_u_s_e_h_o_l_d_e_r__(Matrix& A, size_t k, bool copy_vectors=true); │ │ │ │ +321 │ │ │ │ +328GTSAM_EXPORT void _h_o_u_s_e_h_o_l_d_e_r(Matrix& A, size_t k); │ │ │ │ +329 │ │ │ │ +337GTSAM_EXPORT Vector _b_a_c_k_S_u_b_s_t_i_t_u_t_e_U_p_p_e_r(const Matrix& U, const Vector& b, │ │ │ │ +bool unit=false); │ │ │ │ 338 │ │ │ │ -_3_4_0 Block _f_u_l_l() { │ │ │ │ -341 return block_(0, 0, nBlocks(), nBlocks()); │ │ │ │ -342 } │ │ │ │ -343 │ │ │ │ -_3_4_5 std::array _c_a_l_c_I_n_d_i_c_e_s(_D_e_n_s_e_I_n_d_e_x iBlock, _D_e_n_s_e_I_n_d_e_x jBlock, │ │ │ │ -346 _D_e_n_s_e_I_n_d_e_x blockRows, │ │ │ │ -347 _D_e_n_s_e_I_n_d_e_x blockCols) const { │ │ │ │ -348 assert(blockRows >= 0); │ │ │ │ -349 assert(blockCols >= 0); │ │ │ │ -350 │ │ │ │ -351 // adjust indices to account for start and size of blocks │ │ │ │ -352 const _D_e_n_s_e_I_n_d_e_x denseI = offset(iBlock); │ │ │ │ -353 const _D_e_n_s_e_I_n_d_e_x denseJ = offset(jBlock); │ │ │ │ -354 const _D_e_n_s_e_I_n_d_e_x denseRows = offset(iBlock + blockRows) - denseI; │ │ │ │ -355 const _D_e_n_s_e_I_n_d_e_x denseCols = offset(jBlock + blockCols) - denseJ; │ │ │ │ -356 return {{denseI, denseJ, denseRows, denseCols}}; │ │ │ │ -357 } │ │ │ │ -358 │ │ │ │ -359 void assertInvariants() const │ │ │ │ -360 { │ │ │ │ -361 assert(matrix_.rows() == matrix_.cols()); │ │ │ │ -362 assert(matrix_.cols() == variableColOffsets_.back()); │ │ │ │ -363 assert(blockStart_ < (_D_e_n_s_e_I_n_d_e_x)variableColOffsets_.size()); │ │ │ │ -364 } │ │ │ │ -365 │ │ │ │ -366 template │ │ │ │ -367 void fillOffsets(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool │ │ │ │ -appendOneDimension) │ │ │ │ -368 { │ │ │ │ -369 variableColOffsets_.resize((lastBlockDim-firstBlockDim) + 1 + │ │ │ │ -(appendOneDimension ? 1 : 0)); │ │ │ │ -370 variableColOffsets_[0] = 0; │ │ │ │ -371 DenseIndex j=0; │ │ │ │ -372 for(ITERATOR dim=firstBlockDim; dim!=lastBlockDim; ++dim) { │ │ │ │ -373 variableColOffsets_[j+1] = variableColOffsets_[j] + *dim; │ │ │ │ -374 ++ j; │ │ │ │ -375 } │ │ │ │ -376 if(appendOneDimension) │ │ │ │ -377 { │ │ │ │ -378 variableColOffsets_[j+1] = variableColOffsets_[j] + 1; │ │ │ │ -379 ++ j; │ │ │ │ -380 } │ │ │ │ -381 } │ │ │ │ -382 │ │ │ │ -383 friend class VerticalBlockMatrix; │ │ │ │ -384 template friend class │ │ │ │ -SymmetricBlockMatrixBlockExpr; │ │ │ │ -385 │ │ │ │ -386 private: │ │ │ │ -_3_8_8 friend class boost::serialization::access; │ │ │ │ -389 template │ │ │ │ -390 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ -391 // Fill in the lower triangle part of the matrix, so boost::serialization │ │ │ │ -won't │ │ │ │ -392 // complain about uninitialized data with an input_stream_error exception │ │ │ │ -393 // http://www.boost.org/doc/libs/1_37_0/libs/serialization/doc/ │ │ │ │ -exceptions.html#stream_error │ │ │ │ -394 matrix_.triangularView() = matrix_.triangularView().transpose(); │ │ │ │ -395 ar & BOOST_SERIALIZATION_NVP(matrix_); │ │ │ │ -396 ar & BOOST_SERIALIZATION_NVP(variableColOffsets_); │ │ │ │ -397 ar & BOOST_SERIALIZATION_NVP(blockStart_); │ │ │ │ -398 } │ │ │ │ -399 }; │ │ │ │ -400 │ │ │ │ -402 class CholeskyFailed; │ │ │ │ -403 │ │ │ │ -404} │ │ │ │ -_t_y_p_e_s_._h │ │ │ │ -Typedefs for easier changing of types. │ │ │ │ -_M_a_t_r_i_x_._h │ │ │ │ -typedef and functions to augment Eigen's MatrixXd │ │ │ │ -_F_a_s_t_V_e_c_t_o_r_._h │ │ │ │ -A thin wrapper around std::vector that uses a custom allocator. │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_V_e_c_t_o_r │ │ │ │ -std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > │ │ │ │ -FastVector │ │ │ │ -FastVector is a type alias to a std::vector with a custom memory allocator. │ │ │ │ -DDeeffiinniittiioonn FastVector.h:34 │ │ │ │ +346//TODO: is this function necessary? it isn't used │ │ │ │ +347GTSAM_EXPORT Vector _b_a_c_k_S_u_b_s_t_i_t_u_t_e_U_p_p_e_r(const Vector& b, const Matrix& U, │ │ │ │ +bool unit=false); │ │ │ │ +348 │ │ │ │ +356GTSAM_EXPORT Vector _b_a_c_k_S_u_b_s_t_i_t_u_t_e_L_o_w_e_r(const Matrix& L, const Vector& b, │ │ │ │ +bool unit=false); │ │ │ │ +357 │ │ │ │ +364GTSAM_EXPORT Matrix stack(size_t nrMatrices, ...); │ │ │ │ +365GTSAM_EXPORT Matrix stack(const std::vector& blocks); │ │ │ │ +366 │ │ │ │ +377GTSAM_EXPORT Matrix _c_o_l_l_e_c_t(const std::vector& matrices, │ │ │ │ +size_t m = 0, size_t n = 0); │ │ │ │ +378GTSAM_EXPORT Matrix _c_o_l_l_e_c_t(size_t nrMatrices, ...); │ │ │ │ +379 │ │ │ │ +386GTSAM_EXPORT void _v_e_c_t_o_r___s_c_a_l_e___i_n_p_l_a_c_e(const Vector& v, Matrix& A, bool │ │ │ │ +inf_mask = false); // row │ │ │ │ +387GTSAM_EXPORT Matrix vector_scale(const Vector& v, const Matrix& A, bool │ │ │ │ +inf_mask = false); // row │ │ │ │ +388GTSAM_EXPORT Matrix vector_scale(const Matrix& A, const Vector& v, bool │ │ │ │ +inf_mask = false); // column │ │ │ │ +389 │ │ │ │ +_4_0_1inline Matrix3 _s_k_e_w_S_y_m_m_e_t_r_i_c(double wx, double wy, double wz) { │ │ │ │ +402 return (Matrix3() << 0.0, -wz, +wy, +wz, 0.0, -wx, -wy, +wx, 0.0).finished │ │ │ │ +(); │ │ │ │ +403} │ │ │ │ +404 │ │ │ │ +405template │ │ │ │ +406inline Matrix3 _s_k_e_w_S_y_m_m_e_t_r_i_c(const Eigen::MatrixBase& w) { │ │ │ │ +407 return _s_k_e_w_S_y_m_m_e_t_r_i_c(w(0), w(1), w(2)); │ │ │ │ +408} │ │ │ │ +409 │ │ │ │ +411GTSAM_EXPORT Matrix _i_n_v_e_r_s_e___s_q_u_a_r_e___r_o_o_t(const Matrix& A); │ │ │ │ +412 │ │ │ │ +414GTSAM_EXPORT Matrix _c_h_o_l_e_s_k_y___i_n_v_e_r_s_e(const Matrix &A); │ │ │ │ +415 │ │ │ │ +428GTSAM_EXPORT void _s_v_d(const Matrix& A, Matrix& U, Vector& S, Matrix& V); │ │ │ │ +429 │ │ │ │ +437GTSAM_EXPORT boost::tuple │ │ │ │ +438_D_L_T(const Matrix& A, double rank_tol = 1e-9); │ │ │ │ +439 │ │ │ │ +445GTSAM_EXPORT Matrix _e_x_p_m(const Matrix& A, size_t K=7); │ │ │ │ +446 │ │ │ │ +447std::string formatMatrixIndented(const std::string& label, const Matrix& │ │ │ │ +matrix, bool makeVectorHorizontal = false); │ │ │ │ +448 │ │ │ │ +455template │ │ │ │ +_4_5_6struct _M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e { │ │ │ │ +457 typedef Eigen::Matrix VectorN; │ │ │ │ +458 typedef Eigen::Matrix MatrixN; │ │ │ │ +459 │ │ │ │ +_4_6_1 VectorN _o_p_e_r_a_t_o_r_(_)(const MatrixN& A, const VectorN& b, │ │ │ │ +462 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_N_,_ _N_*_ _N_> H1 = boost::none, │ │ │ │ +463 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_N_,_ _N_> H2 = boost::none) const { │ │ │ │ +464 const MatrixN invA = A.inverse(); │ │ │ │ +465 const VectorN c = invA * b; │ │ │ │ +466 // The derivative in A is just -[c[0]*invA c[1]*invA ... c[N-1]*invA] │ │ │ │ +467 if (H1) │ │ │ │ +468 for (size_t j = 0; j < N; j++) │ │ │ │ +469 H1->template middleCols(N * j) = -c[j] * invA; │ │ │ │ +470 // The derivative in b is easy, as invA*b is just a linear map: │ │ │ │ +471 if (H2) *H2 = invA; │ │ │ │ +472 return c; │ │ │ │ +473 } │ │ │ │ +474}; │ │ │ │ +475 │ │ │ │ +481template │ │ │ │ +_4_8_2struct _M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e_F_u_n_c_t_i_o_n { │ │ │ │ +483 enum { M = _t_r_a_i_t_s_<_T_>_:_:_d_i_m_e_n_s_i_o_n }; │ │ │ │ +484 typedef Eigen::Matrix VectorN; │ │ │ │ +485 typedef Eigen::Matrix MatrixN; │ │ │ │ +486 │ │ │ │ +487 // The function phi should calculate f(a)*b, with derivatives in a and b. │ │ │ │ +488 // Naturally, the derivative in b is f(a). │ │ │ │ +489 typedef std::function, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_N_,_ _N_>)> │ │ │ │ +491 Operator; │ │ │ │ +492 │ │ │ │ +_4_9_4 _M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e_F_u_n_c_t_i_o_n(const Operator& phi) : phi_(phi) {} │ │ │ │ +495 │ │ │ │ +_4_9_7 VectorN _o_p_e_r_a_t_o_r_(_)(const T& a, const VectorN& b, │ │ │ │ +498 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_N_,_ _M_> H1 = boost::none, │ │ │ │ +499 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_N_,_ _N_> H2 = boost::none) const { │ │ │ │ +500 MatrixN A; │ │ │ │ +501 phi_(a, b, boost::none, A); // get A = f(a) by calling f once │ │ │ │ +502 const MatrixN invA = A.inverse(); │ │ │ │ +503 const VectorN c = invA * b; │ │ │ │ +504 │ │ │ │ +505 if (H1) { │ │ │ │ +506 Eigen::Matrix H; │ │ │ │ +507 phi_(a, c, H, boost::none); // get derivative H of forward mapping │ │ │ │ +508 *H1 = -invA* H; │ │ │ │ +509 } │ │ │ │ +510 if (H2) *H2 = invA; │ │ │ │ +511 return c; │ │ │ │ +512 } │ │ │ │ +513 │ │ │ │ +514 private: │ │ │ │ +515 const Operator phi_; │ │ │ │ +516}; │ │ │ │ +517 │ │ │ │ +518GTSAM_EXPORT Matrix LLt(const Matrix& A); │ │ │ │ +519 │ │ │ │ +520GTSAM_EXPORT Matrix RtR(const Matrix& A); │ │ │ │ +521 │ │ │ │ +522GTSAM_EXPORT Vector columnNormSquare(const Matrix &A); │ │ │ │ +523} // namespace gtsam │ │ │ │ +_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h │ │ │ │ +Special class for optional Jacobian arguments. │ │ │ │ +_V_e_c_t_o_r_._h │ │ │ │ +typedef and functions to augment Eigen's VectorXd │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_D_e_n_s_e_I_n_d_e_x │ │ │ │ -ptrdiff_t DenseIndex │ │ │ │ -The index type for Eigen objects. │ │ │ │ -DDeeffiinniittiioonn types.h:106 │ │ │ │ +_g_t_s_a_m_:_:_b_a_c_k_S_u_b_s_t_i_t_u_t_e_L_o_w_e_r │ │ │ │ +Vector backSubstituteLower(const Matrix &L, const Vector &b, bool unit) │ │ │ │ +backSubstitute L*x=b │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:367 │ │ │ │ +_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_^ │ │ │ │ +Vector operator^(const Matrix &A, const Vector &v) │ │ │ │ +overload ^ for trans(A)*v We transpose the vectors for speed. │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:131 │ │ │ │ +_g_t_s_a_m_:_:_v_e_c_t_o_r___s_c_a_l_e___i_n_p_l_a_c_e │ │ │ │ +void vector_scale_inplace(const Vector &v, Matrix &A, bool inf_mask) │ │ │ │ +scales a matrix row or column by the values in a vector Arguments (Matrix, │ │ │ │ +Vector) scales the columns... │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:482 │ │ │ │ _g_t_s_a_m_:_:_r_o_w │ │ │ │ const MATRIX::ConstRowXpr row(const MATRIX &A, size_t j) │ │ │ │ Extracts a row view from a matrix that avoids a copy. │ │ │ │ DDeeffiinniittiioonn Matrix.h:222 │ │ │ │ -_g_t_s_a_m_:_:_s_p_l_i_t │ │ │ │ -void split(const G &g, const PredecessorMap< KEY > &tree, G &Ab1, G &Ab2) │ │ │ │ -Split the graph into two parts: one corresponds to the given spanning tree, and │ │ │ │ -the other corresponds... │ │ │ │ -DDeeffiinniittiioonn graph-inl.h:255 │ │ │ │ -_g_t_s_a_m_:_:_c_h_o_l_e_s_k_y_P_a_r_t_i_a_l │ │ │ │ -bool choleskyPartial(Matrix &ABC, size_t nFrontal, size_t topleft) │ │ │ │ -Partial Cholesky computes a factor [R S such that [R' 0 [R S = [A B 0 L] S' I] │ │ │ │ -0 L] B' C]. │ │ │ │ -DDeeffiinniittiioonn cholesky.cpp:108 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ -This class stores a dense matrix and allows it to be accessed as a collection │ │ │ │ -of blocks. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:52 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_f_u_l_l │ │ │ │ -Block full() │ │ │ │ -Get the full matrix as a block. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:340 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_b_l_o_c_k_S_t_a_r_t__ │ │ │ │ -DenseIndex blockStart_ │ │ │ │ -Changes apparent matrix view, see main class comment. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:62 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_s_e_t_D_i_a_g_o_n_a_l_B_l_o_c_k │ │ │ │ -void setDiagonalBlock(DenseIndex I, const XprType &xpr) │ │ │ │ -Set a diagonal block. Only the upper triangular portion of xpr is evaluated. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:195 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_n_A_c_t_u_a_l_B_l_o_c_k_s │ │ │ │ -DenseIndex nActualBlocks() const │ │ │ │ -Number of actual blocks in the full matrix. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:306 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_d_i_a_g_o_n_a_l │ │ │ │ -Vector diagonal(DenseIndex J) const │ │ │ │ -Get the diagonal of the J'th diagonal block. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:145 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_m_a_t_r_i_x__ │ │ │ │ -Matrix matrix_ │ │ │ │ -The full matrix. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:59 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_c_o_l_s │ │ │ │ -DenseIndex cols() const │ │ │ │ -Column size. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:117 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_g_e_t_D_i_m │ │ │ │ -DenseIndex getDim(DenseIndex block) const │ │ │ │ -Number of dimensions for variable on this diagonal block. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:123 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_s_e_t_Z_e_r_o │ │ │ │ -void setZero() │ │ │ │ -Set the entire active matrix zero. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:258 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_s_e_t_O_f_f_D_i_a_g_o_n_a_l_B_l_o_c_k │ │ │ │ -void setOffDiagonalBlock(DenseIndex I, DenseIndex J, const XprType &xpr) │ │ │ │ -Set an off-diagonal block. Only the upper triangular portion of xpr is │ │ │ │ -evaluated. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:201 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_s_e_t_F_u_l_l_M_a_t_r_i_x │ │ │ │ -void setFullMatrix(const XprType &xpr) │ │ │ │ -Set the entire active matrix. Only reads the upper triangular part of xpr. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:253 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_s_e_l_f_a_d_j_o_i_n_t_V_i_e_w │ │ │ │ -Eigen::SelfAdjointView< Block, Eigen::Upper > selfadjointView() │ │ │ │ -Get self adjoint view. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:242 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_a_b_o_v_e_D_i_a_g_o_n_a_l_B_l_o_c_k │ │ │ │ -constBlock aboveDiagonalBlock(DenseIndex I, DenseIndex J) const │ │ │ │ -Get block above the diagonal (I, J). │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:150 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_b_l_o_c_k__ │ │ │ │ -constBlock block_(DenseIndex iBlock, DenseIndex jBlock, DenseIndex blockRows=1, │ │ │ │ -DenseIndex blockCols=1) const │ │ │ │ -Get an arbitrary block from the matrix. Indices are in block units. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:319 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_f_u_l_l │ │ │ │ -constBlock full() const │ │ │ │ -Get the full matrix as a block. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:335 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_r_o_w_s │ │ │ │ -DenseIndex rows() const │ │ │ │ -Row size. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:114 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_a_b_o_v_e_D_i_a_g_o_n_a_l_R_a_n_g_e │ │ │ │ -Block aboveDiagonalRange(DenseIndex i_startBlock, DenseIndex i_endBlock, │ │ │ │ -DenseIndex j_startBlock, DenseIndex j_endBlock) │ │ │ │ -Get a range [i,j) from the matrix. Indices are in block units. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:181 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_t_r_i_a_n_g_u_l_a_r_V_i_e_w │ │ │ │ -Eigen::TriangularView< constBlock, Eigen::Upper > triangularView(DenseIndex I, │ │ │ │ -DenseIndex J) const │ │ │ │ -Return the square sub-matrix that contains blocks(i:j, i:j) as a triangular │ │ │ │ -view. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:163 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_d_i_a_g_o_n_a_l_B_l_o_c_k │ │ │ │ -Eigen::SelfAdjointView< constBlock, Eigen::Upper > diagonalBlock(DenseIndex J) │ │ │ │ -const │ │ │ │ -Return the J'th diagonal block as a self adjoint view. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:140 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ -SymmetricBlockMatrix(const CONTAINER &dimensions, const Matrix &matrix, bool │ │ │ │ -appendOneDimension=false) │ │ │ │ -Construct from a container of the sizes of each vertical block and a pre- │ │ │ │ -prepared matrix. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:90 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_b_l_o_c_k_S_t_a_r_t │ │ │ │ -DenseIndex blockStart() const │ │ │ │ -Retrieve the first logical block, i.e. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:277 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_s_e_l_f_a_d_j_o_i_n_t_V_i_e_w │ │ │ │ -Eigen::SelfAdjointView< constBlock, Eigen::Upper > selfadjointView() const │ │ │ │ -Get self adjoint view. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:247 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_u_p_d_a_t_e_O_f_f_D_i_a_g_o_n_a_l_B_l_o_c_k │ │ │ │ -void updateOffDiagonalBlock(DenseIndex I, DenseIndex J, const XprType &xpr) │ │ │ │ -Update an off diagonal block. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:228 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ -SymmetricBlockMatrix(const CONTAINER &dimensions, bool │ │ │ │ -appendOneDimension=false) │ │ │ │ -Construct from a container of the sizes of each block. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:70 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ -SymmetricBlockMatrix(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool │ │ │ │ -appendOneDimension=false) │ │ │ │ -Construct from iterator over the sizes of each vertical block. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:80 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_b_l_o_c_k_S_t_a_r_t │ │ │ │ -DenseIndex & blockStart() │ │ │ │ -Retrieve or modify the first logical block, i.e. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:273 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_a_b_o_v_e_D_i_a_g_o_n_a_l_R_a_n_g_e │ │ │ │ -constBlock aboveDiagonalRange(DenseIndex i_startBlock, DenseIndex i_endBlock, │ │ │ │ -DenseIndex j_startBlock, DenseIndex j_endBlock) const │ │ │ │ -Get a range [i,j) from the matrix. Indices are in block units. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:170 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_d_i_a_g_o_n_a_l_B_l_o_c_k │ │ │ │ -Eigen::SelfAdjointView< Block, Eigen::Upper > diagonalBlock(DenseIndex J) │ │ │ │ -Return the J'th diagonal block as a self adjoint view. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:135 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_b_l_o_c_k__ │ │ │ │ -Block block_(DenseIndex iBlock, DenseIndex jBlock, DenseIndex blockRows=1, │ │ │ │ -DenseIndex blockCols=1) │ │ │ │ -Get an arbitrary block from the matrix. Indices are in block units. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:327 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_u_p_d_a_t_e_D_i_a_g_o_n_a_l_B_l_o_c_k │ │ │ │ -void updateDiagonalBlock(DenseIndex I, const XprType &xpr) │ │ │ │ -Increment the diagonal block by the values in xpr. Only reads the upper │ │ │ │ -triangular part of xpr. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:212 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_n_O_f_f_s_e_t_s │ │ │ │ -DenseIndex nOffsets() const │ │ │ │ -Number of offsets in the full matrix. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:301 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_c_a_l_c_I_n_d_i_c_e_s │ │ │ │ -std::array< DenseIndex, 4 > calcIndices(DenseIndex iBlock, DenseIndex jBlock, │ │ │ │ -DenseIndex blockRows, DenseIndex blockCols) const │ │ │ │ -Compute the indices into the underlying matrix for a given block. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:345 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_n_B_l_o_c_k_s │ │ │ │ -DenseIndex nBlocks() const │ │ │ │ -Block count. │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:120 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_v_a_r_i_a_b_l_e_C_o_l_O_f_f_s_e_t_s__ │ │ │ │ -FastVector< DenseIndex > variableColOffsets_ │ │ │ │ -the starting columns of each block (0-based) │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:60 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_s_e_l_f_a_d_j_o_i_n_t_V_i_e_w │ │ │ │ -Eigen::SelfAdjointView< constBlock, Eigen::Upper > selfadjointView(DenseIndex │ │ │ │ -I, DenseIndex J) const │ │ │ │ -Return the square sub-matrix that contains blocks(i:j, i:j). │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:156 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_:_:_o_f_f_s_e_t │ │ │ │ -DenseIndex offset(DenseIndex block) const │ │ │ │ -Get an offset for a block index (in the active view). │ │ │ │ -DDeeffiinniittiioonn SymmetricBlockMatrix.h:311 │ │ │ │ -_g_t_s_a_m_:_:_V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x │ │ │ │ -This class stores a dense matrix and allows it to be accessed as a collection │ │ │ │ -of vertical blocks. │ │ │ │ -DDeeffiinniittiioonn VerticalBlockMatrix.h:43 │ │ │ │ +_g_t_s_a_m_:_:_e_x_p_m │ │ │ │ +T expm(const Vector &x, int K=7) │ │ │ │ +Exponential map given exponential coordinates class T needs a wedge<> function │ │ │ │ +and a constructor from... │ │ │ │ +DDeeffiinniittiioonn Lie.h:317 │ │ │ │ +_g_t_s_a_m_:_:_s_a_v_e │ │ │ │ +void save(const Matrix &A, const string &s, const string &filename) │ │ │ │ +save a matrix to file, which can be loaded by matlab │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:167 │ │ │ │ +_g_t_s_a_m_:_:_a_s_s_e_r_t___e_q_u_a_l │ │ │ │ +bool assert_equal(const Matrix &expected, const Matrix &actual, double tol) │ │ │ │ +equals with an tolerance, prints out message if unequal │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:43 │ │ │ │ +_g_t_s_a_m_:_:_l_i_n_e_a_r___d_e_p_e_n_d_e_n_t │ │ │ │ +bool linear_dependent(const Matrix &A, const Matrix &B, double tol) │ │ │ │ +check whether the rows of two matrices are linear dependent │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:117 │ │ │ │ +_g_t_s_a_m_:_:_p_r_i_n_t │ │ │ │ +void print(const Matrix &A, const string &s, ostream &stream) │ │ │ │ +print without optional string, must specify cout yourself │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:156 │ │ │ │ +_g_t_s_a_m_:_:_c_o_l_u_m_n │ │ │ │ +const MATRIX::ConstColXpr column(const MATRIX &A, size_t j) │ │ │ │ +Extracts a column view from a matrix that avoids a copy. │ │ │ │ +DDeeffiinniittiioonn Matrix.h:211 │ │ │ │ +_g_t_s_a_m_:_:_z_e_r_o_B_e_l_o_w_D_i_a_g_o_n_a_l │ │ │ │ +void zeroBelowDiagonal(MATRIX &A, size_t cols=0) │ │ │ │ +Zeros all of the elements below the diagonal of a matrix, in place. │ │ │ │ +DDeeffiinniittiioonn Matrix.h:232 │ │ │ │ +_g_t_s_a_m_:_:_w_e_i_g_h_t_e_d___e_l_i_m_i_n_a_t_e │ │ │ │ +list< boost::tuple< Vector, double, double > > weighted_eliminate(Matrix &A, │ │ │ │ +Vector &b, const Vector &sigmas) │ │ │ │ +Imperative algorithm for in-place full elimination with weights and constraint │ │ │ │ +handling. │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:273 │ │ │ │ +_g_t_s_a_m_:_:_b_a_c_k_S_u_b_s_t_i_t_u_t_e_U_p_p_e_r │ │ │ │ +Vector backSubstituteUpper(const Matrix &U, const Vector &b, bool unit) │ │ │ │ +backSubstitute U*x=b │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:377 │ │ │ │ +_g_t_s_a_m_:_:_a_s_s_e_r_t___i_n_e_q_u_a_l │ │ │ │ +bool assert_inequal(const Matrix &A, const Matrix &B, double tol) │ │ │ │ +inequals with an tolerance, prints out message if within tolerance │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:63 │ │ │ │ +_g_t_s_a_m_:_:_h_o_u_s_e_h_o_l_d_e_r │ │ │ │ +void householder(Matrix &A, size_t k) │ │ │ │ +Householder tranformation, zeros below diagonal. │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:354 │ │ │ │ +_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_>_> │ │ │ │ +istream & operator>>(istream &inputStream, Matrix &destinationMatrix) │ │ │ │ +Read a matrix from an input stream, such as a file. │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:174 │ │ │ │ +_g_t_s_a_m_:_:_i_n_p_l_a_c_e___Q_R │ │ │ │ +void inplace_QR(Matrix &A) │ │ │ │ +QR factorization using Eigen's internal block QR algorithm. │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:636 │ │ │ │ +_g_t_s_a_m_:_:_s_v_d │ │ │ │ +void svd(const Matrix &A, Matrix &U, Vector &S, Matrix &V) │ │ │ │ +SVD computes economy SVD A=U*S*V'. │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:560 │ │ │ │ +_g_t_s_a_m_:_:_s_k_e_w_S_y_m_m_e_t_r_i_c │ │ │ │ +Matrix3 skewSymmetric(double wx, double wy, double wz) │ │ │ │ +skew symmetric matrix returns this: 0 -wz wy wz 0 -wx -wy wx 0 │ │ │ │ +DDeeffiinniittiioonn Matrix.h:401 │ │ │ │ +_g_t_s_a_m_:_:_s_u_b │ │ │ │ +Eigen::Block< const MATRIX > sub(const MATRIX &A, size_t i1, size_t i2, size_t │ │ │ │ +j1, size_t j2) │ │ │ │ +extract submatrix, slice semantics, i.e. │ │ │ │ +DDeeffiinniittiioonn Matrix.h:181 │ │ │ │ +_g_t_s_a_m_:_:_t_r_a_n_s │ │ │ │ +Matrix trans(const Matrix &A) │ │ │ │ +static transpose function, just calls Eigen transpose member function │ │ │ │ +DDeeffiinniittiioonn Matrix.h:242 │ │ │ │ +_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ +bool operator!=(const Matrix &A, const Matrix &B) │ │ │ │ +inequality │ │ │ │ +DDeeffiinniittiioonn Matrix.h:107 │ │ │ │ +_g_t_s_a_m_:_:_D_L_T │ │ │ │ +boost::tuple< int, double, Vector > DLT(const Matrix &A, double rank_tol) │ │ │ │ +Direct linear transform algorithm that calls svd to find a vector v that │ │ │ │ +minimizes the algebraic erro... │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:568 │ │ │ │ +_g_t_s_a_m_:_:_c_h_o_l_e_s_k_y___i_n_v_e_r_s_e │ │ │ │ +Matrix cholesky_inverse(const Matrix &A) │ │ │ │ +Return the inverse of a S.P.D. │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:539 │ │ │ │ +_g_t_s_a_m_:_:_p_r_o_d │ │ │ │ +MATRIX prod(const MATRIX &A, const MATRIX &B) │ │ │ │ +products using old-style format to improve compatibility │ │ │ │ +DDeeffiinniittiioonn Matrix.h:144 │ │ │ │ +_g_t_s_a_m_:_:_h_o_u_s_e_h_o_l_d_e_r__ │ │ │ │ +void householder_(Matrix &A, size_t k, bool copy_vectors) │ │ │ │ +Imperative version of Householder QR factorization, Golub & Van Loan p 224 │ │ │ │ +version with Householder v... │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:327 │ │ │ │ +_g_t_s_a_m_:_:_i_n_s_e_r_t_S_u_b │ │ │ │ +void insertSub(Eigen::MatrixBase< Derived1 > &fullMatrix, const Eigen:: │ │ │ │ +MatrixBase< Derived2 > &subMatrix, size_t i, size_t j) │ │ │ │ +insert a submatrix IN PLACE at a specified location in a larger matrix NOTE: │ │ │ │ +there is no size checkin... │ │ │ │ +DDeeffiinniittiioonn Matrix.h:195 │ │ │ │ +_g_t_s_a_m_:_:_c_o_l_l_e_c_t │ │ │ │ +Matrix collect(const std::vector< const Matrix * > &matrices, size_t m, size_t │ │ │ │ +n) │ │ │ │ +create a matrix by concatenating Given a set of matrices: A1, A2, A3... If all │ │ │ │ +matrices have the same... │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:443 │ │ │ │ +_g_t_s_a_m_:_:_l_i_n_e_a_r___i_n_d_e_p_e_n_d_e_n_t │ │ │ │ +bool linear_independent(const Matrix &A, const Matrix &B, double tol) │ │ │ │ +check whether the rows of two matrices are linear independent │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:103 │ │ │ │ +_g_t_s_a_m_:_:_f_p_E_q_u_a_l │ │ │ │ +bool fpEqual(double a, double b, double tol, bool check_relative_also) │ │ │ │ +Ensure we are not including a different version of Eigen in user code than │ │ │ │ +while compiling gtsam,... │ │ │ │ +DDeeffiinniittiioonn Vector.cpp:42 │ │ │ │ +_g_t_s_a_m_:_:_q_r │ │ │ │ +pair< Matrix, Matrix > qr(const Matrix &A) │ │ │ │ +Householder QR factorization, Golub & Van Loan p 224, explicit version │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:235 │ │ │ │ +_g_t_s_a_m_:_:_d_i_a_g │ │ │ │ +Matrix diag(const std::vector< Matrix > &Hs) │ │ │ │ +Create a matrix with submatrices along its diagonal. │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:207 │ │ │ │ +_g_t_s_a_m_:_:_e_q_u_a_l___w_i_t_h___a_b_s___t_o_l │ │ │ │ +bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen:: │ │ │ │ +DenseBase< MATRIX > &B, double tol=1e-9) │ │ │ │ +equals with a tolerance │ │ │ │ +DDeeffiinniittiioonn Matrix.h:81 │ │ │ │ +_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ +bool operator==(const Matrix &A, const Matrix &B) │ │ │ │ +equality is just equal_with_abs_tol 1e-9 │ │ │ │ +DDeeffiinniittiioonn Matrix.h:100 │ │ │ │ +_g_t_s_a_m_:_:_i_n_v_e_r_s_e___s_q_u_a_r_e___r_o_o_t │ │ │ │ +Matrix inverse_square_root(const Matrix &A) │ │ │ │ +Use Cholesky to calculate inverse square root of a matrix. │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:552 │ │ │ │ +_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ +A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ +that can be centered ... │ │ │ │ +DDeeffiinniittiioonn concepts.h:30 │ │ │ │ +_g_t_s_a_m_:_:_R_e_s_h_a_p_e │ │ │ │ +Reshape functor. │ │ │ │ +DDeeffiinniittiioonn Matrix.h:246 │ │ │ │ +_g_t_s_a_m_:_:_M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e │ │ │ │ +Functor that implements multiplication of a vector b with the inverse of a │ │ │ │ +matrix A. │ │ │ │ +DDeeffiinniittiioonn Matrix.h:456 │ │ │ │ +_g_t_s_a_m_:_:_M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ +VectorN operator()(const MatrixN &A, const VectorN &b, OptionalJacobian< N, N │ │ │ │ +*N > H1=boost::none, OptionalJacobian< N, N > H2=boost::none) const │ │ │ │ +A.inverse() * b, with optional derivatives. │ │ │ │ +DDeeffiinniittiioonn Matrix.h:461 │ │ │ │ +_g_t_s_a_m_:_:_M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e_F_u_n_c_t_i_o_n │ │ │ │ +Functor that implements multiplication with the inverse of a matrix, itself the │ │ │ │ +result of a function ... │ │ │ │ +DDeeffiinniittiioonn Matrix.h:482 │ │ │ │ +_g_t_s_a_m_:_:_M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e_F_u_n_c_t_i_o_n_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ +VectorN operator()(const T &a, const VectorN &b, OptionalJacobian< N, M > │ │ │ │ +H1=boost::none, OptionalJacobian< N, N > H2=boost::none) const │ │ │ │ +f(a).inverse() * b, with optional derivatives │ │ │ │ +DDeeffiinniittiioonn Matrix.h:497 │ │ │ │ +_g_t_s_a_m_:_:_M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e_F_u_n_c_t_i_o_n_:_:_M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e_F_u_n_c_t_i_o_n │ │ │ │ +MultiplyWithInverseFunction(const Operator &phi) │ │ │ │ +Construct with function as explained above. │ │ │ │ +DDeeffiinniittiioonn Matrix.h:494 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ +either a fixed size o... │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_._h │ │ │ │ + * _M_a_t_r_i_x_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00095.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/SymmetricBlockMatrix.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/types.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,36 +94,208 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
SymmetricBlockMatrix.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Typedefs | │ │ │ +Functions
│ │ │ +
types.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Access to matrices via blocks of pre-defined sizes. │ │ │ +

Typedefs for easier changing of types. │ │ │ More...

│ │ │ + │ │ │ +

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

struct  gtsam::const_selector< TEST_TYPE, BASIC_TYPE, AS_NON_CONST, AS_CONST >
 Helper class that uses templates to select between two types based on whether TEST_TYPE is const or not. More...
 
struct  gtsam::const_selector< BASIC_TYPE, BASIC_TYPE, AS_NON_CONST, AS_CONST >
 Specialization for the non-const version. More...
 
struct  gtsam::const_selector< const BASIC_TYPE, BASIC_TYPE, AS_NON_CONST, AS_CONST >
 Specialization for the const version. More...
 
struct  gtsam::ValueWithDefault< T, defaultValue >
 Helper struct that encapsulates a value with a default, this is just used as a member object so you don't have to specify defaults in the class constructor. More...
 
class  gtsam::ListOfOneContainer< T >
 A helper class that behaves as a container with one element, and works with boost::range. More...
 
class  gtsam::TbbOpenMPMixedScope
 An object whose scope defines a block where TBB and OpenMP parallelism are mixed. More...
 
struct  gtsam::needs_eigen_aligned_allocator< typename, typename >
 A SFINAE trait to mark classes that need special alignment. More...
 
struct  gtsam::needs_eigen_aligned_allocator< T, void_t< typename T::_eigen_aligned_allocator_trait > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Macros

│ │ │ +#define GTSAM_DEPRECATED
 
│ │ │ +#define DO_PRAGMA(x)   _Pragma (#x)
 
│ │ │ +#define CLANG_DIAGNOSTIC_PUSH_IGNORE(diag)
 
│ │ │ +#define GCC_DIAGNOSTIC_PUSH_IGNORE(diag)
 
│ │ │ +#define MSVC_DIAGNOSTIC_PUSH_IGNORE(code)
 
│ │ │ +#define DIAGNOSTIC_POP()
 
#define assert_throw(CONDITION, EXCEPTION)
 An assertion that throws an exception if NDEBUG is not defined and evaluates to an empty statement otherwise.
 
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
 This marks a GTSAM object to require alignment.
 
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
 This marks a GTSAM object to require alignment.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Typedefs

│ │ │ +typedef std::uint64_t gtsam::Key
 Integer nonlinear key type.
 
│ │ │ +typedef std::uint64_t gtsam::FactorIndex
 Integer nonlinear factor index type.
 
│ │ │ +typedef ptrdiff_t gtsam::DenseIndex
 The index type for Eigen objects.
 
│ │ │ +template<typename ... >
using gtsam::void_t = void
 Convenience void_t as we assume C++11, it will not conflict the std one in C++17 as this is in gtsam::
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

std::string gtsam::demangle (const char *name)
 Pretty print Value type name.
 
│ │ │ + gtsam::BOOST_CONCEPT_ASSERT ((boost::RandomAccessRangeConcept< ListOfOneContainer< int > >))
 
│ │ │ +template<typename T >
ListOfOneContainer< T > gtsam::ListOfOne (const T &element)
 Factory function for ListOfOneContainer to enable ListOfOne(e) syntax.
 
│ │ │

Detailed Description

│ │ │ -

Access to matrices via blocks of pre-defined sizes.

│ │ │ -

Used in GaussianFactor and GaussianConditional.

Author
Richard Roberts
│ │ │ -
Date
Sep 18, 2010
│ │ │ -
│ │ │ +

Typedefs for easier changing of types.

│ │ │ +
Author
Richard Roberts
│ │ │ +
Date
Aug 21, 2010
│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ assert_throw

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define assert_throw( CONDITION,
 EXCEPTION 
)
│ │ │ +
│ │ │ +Value:
if (!(CONDITION)) { \
│ │ │ +
throw (EXCEPTION); \
│ │ │ +
}
│ │ │ +
│ │ │ +

An assertion that throws an exception if NDEBUG is not defined and evaluates to an empty statement otherwise.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ GTSAM_MAKE_ALIGNED_OPERATOR_NEW

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
│ │ │ +
│ │ │ +Value:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW \
│ │ │ +
using _eigen_aligned_allocator_trait = void;
│ │ │ +
│ │ │ +

This marks a GTSAM object to require alignment.

│ │ │ +

With this macro an object will automatically be allocated in aligned memory when one uses gtsam::make_shared. It reduces future misalignment problems that is hard to debug. See https://eigen.tuxfamily.org/dox/group__DenseMatrixManipulation__Alignement.html for detailed explanation.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF( NeedsToAlign)
│ │ │ +
│ │ │ +Value:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) \
│ │ │ +
using _eigen_aligned_allocator_trait = void;
│ │ │ +
│ │ │ +

This marks a GTSAM object to require alignment.

│ │ │ +

With this macro an object will automatically be allocated in aligned memory when one uses gtsam::make_shared. It reduces future misalignment problems that is hard to debug. See https://eigen.tuxfamily.org/dox/group__DenseMatrixManipulation__Alignement.html for detailed explanation.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,138 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -SymmetricBlockMatrix.cpp File Reference │ │ │ │ -Access to matrices via blocks of pre-defined sizes. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +types.h File Reference │ │ │ │ +_B_a_s_e │ │ │ │ +Typedefs for easier changing of types. _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +struct   _g_t_s_a_m_:_:_c_o_n_s_t___s_e_l_e_c_t_o_r_<_ _T_E_S_T___T_Y_P_E_,_ _B_A_S_I_C___T_Y_P_E_,_ _A_S___N_O_N___C_O_N_S_T_,_ _A_S___C_O_N_S_T_ _> │ │ │ │ +  Helper class that uses templates to select between two types based on │ │ │ │ + whether TEST_TYPE is const or not. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_c_o_n_s_t___s_e_l_e_c_t_o_r_<_ _B_A_S_I_C___T_Y_P_E_,_ _B_A_S_I_C___T_Y_P_E_,_ _A_S___N_O_N___C_O_N_S_T_,_ _A_S___C_O_N_S_T │ │ │ │ + _> │ │ │ │ +  Specialization for the non-const version. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_c_o_n_s_t___s_e_l_e_c_t_o_r_<_ _c_o_n_s_t_ _B_A_S_I_C___T_Y_P_E_,_ _B_A_S_I_C___T_Y_P_E_,_ _A_S___N_O_N___C_O_N_S_T_, │ │ │ │ + _A_S___C_O_N_S_T_ _> │ │ │ │ +  Specialization for the const version. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_V_a_l_u_e_W_i_t_h_D_e_f_a_u_l_t_<_ _T_,_ _d_e_f_a_u_l_t_V_a_l_u_e_ _> │ │ │ │ + Helper struct that encapsulates a value with a default, this is just │ │ │ │ +  used as a member object so you don't have to specify defaults in the │ │ │ │ + class constructor. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ + class   _g_t_s_a_m_:_:_L_i_s_t_O_f_O_n_e_C_o_n_t_a_i_n_e_r_<_ _T_ _> │ │ │ │ +  A helper class that behaves as a container with one element, and works │ │ │ │ + with boost::range. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ + class   _g_t_s_a_m_:_:_T_b_b_O_p_e_n_M_P_M_i_x_e_d_S_c_o_p_e │ │ │ │ +  An object whose scope defines a block where TBB and OpenMP parallelism │ │ │ │ + are mixed. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_n_e_e_d_s___e_i_g_e_n___a_l_i_g_n_e_d___a_l_l_o_c_a_t_o_r_<_ _t_y_p_e_n_a_m_e_,_ _t_y_p_e_n_a_m_e_ _> │ │ │ │ +  A SFINAE trait to mark classes that need special alignment. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_n_e_e_d_s___e_i_g_e_n___a_l_i_g_n_e_d___a_l_l_o_c_a_t_o_r_<_ _T_,_ _v_o_i_d___t_<_ _t_y_p_e_n_a_m_e_ _T_:_: │ │ │ │ + ___e_i_g_e_n___a_l_i_g_n_e_d___a_l_l_o_c_a_t_o_r___t_r_a_i_t_ _>_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  GGTTSSAAMM__DDEEPPRREECCAATTEEDD │ │ │ │ +  │ │ │ │ +#define  DDOO__PPRRAAGGMMAA(x)   _Pragma (#x) │ │ │ │ +  │ │ │ │ +#define  CCLLAANNGG__DDIIAAGGNNOOSSTTIICC__PPUUSSHH__IIGGNNOORREE(diag) │ │ │ │ +  │ │ │ │ +#define  GGCCCC__DDIIAAGGNNOOSSTTIICC__PPUUSSHH__IIGGNNOORREE(diag) │ │ │ │ +  │ │ │ │ +#define  MMSSVVCC__DDIIAAGGNNOOSSTTIICC__PPUUSSHH__IIGGNNOORREE(code) │ │ │ │ +  │ │ │ │ +#define  DDIIAAGGNNOOSSTTIICC__PPOOPP() │ │ │ │ +  │ │ │ │ +#define  _a_s_s_e_r_t___t_h_r_o_w(CONDITION, EXCEPTION) │ │ │ │ +  An assertion that throws an exception if NDEBUG is not defined and │ │ │ │ + evaluates to an empty statement otherwise. │ │ │ │ +  │ │ │ │ +#define  _G_T_S_A_M___M_A_K_E___A_L_I_G_N_E_D___O_P_E_R_A_T_O_R___N_E_W │ │ │ │ +  This marks a GTSAM object to require alignment. │ │ │ │ +  │ │ │ │ +#define  _G_T_S_A_M___M_A_K_E___A_L_I_G_N_E_D___O_P_E_R_A_T_O_R___N_E_W___I_F(NeedsToAlign) │ │ │ │ +  This marks a GTSAM object to require alignment. │ │ │ │ +  │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +typedef std::uint64_t  ggttssaamm::::KKeeyy │ │ │ │ +  Integer nonlinear key type. │ │ │ │ +  │ │ │ │ +typedef std::uint64_t  ggttssaamm::::FFaaccttoorrIInnddeexx │ │ │ │ +  Integer nonlinear factor index type. │ │ │ │ +  │ │ │ │ + typedef ptrdiff_t  ggttssaamm::::DDeennsseeIInnddeexx │ │ │ │ +  The index type for Eigen objects. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + using  ggttssaamm::::vvooiidd__tt = void │ │ │ │ +  Convenience void_t as we assume C++11, it will not │ │ │ │ + conflict the std one in C++17 as this is in gtsam:: │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ + std::string  _g_t_s_a_m_:_:_d_e_m_a_n_g_l_e (const char *name) │ │ │ │ +  Pretty print _V_a_l_u_e type name. │ │ │ │ +  │ │ │ │ +   ggttssaamm::::BBOOOOSSTT__CCOONNCCEEPPTT__AASSSSEERRTT ((boost:: │ │ │ │ + RandomAccessRangeConcept< _L_i_s_t_O_f_O_n_e_C_o_n_t_a_i_n_e_r< int > │ │ │ │ + >)) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_L_i_s_t_O_f_O_n_e_C_o_n_t_a_i_n_e_r< T >  ggttssaamm::::LLiissttOOffOOnnee (const T &element) │ │ │ │ +  Factory function for _L_i_s_t_O_f_O_n_e_C_o_n_t_a_i_n_e_r to enable │ │ │ │ + ListOfOne(e) syntax. │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Access to matrices via blocks of pre-defined sizes. │ │ │ │ -Used in GaussianFactor and _G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l. │ │ │ │ +Typedefs for easier changing of types. │ │ │ │ Author │ │ │ │ Richard Roberts │ │ │ │ Date │ │ │ │ - Sep 18, 2010 │ │ │ │ + Aug 21, 2010 │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? aasssseerrtt__tthhrrooww ********** │ │ │ │ +#define assert_throw (   CONDITION, │ │ │ │ +   EXCEPTION  │ │ │ │ + ) │ │ │ │ +VVaalluuee:: │ │ │ │ +if (!(CONDITION)) { \ │ │ │ │ +throw (EXCEPTION); \ │ │ │ │ +} │ │ │ │ +An assertion that throws an exception if NDEBUG is not defined and evaluates to │ │ │ │ +an empty statement otherwise. │ │ │ │ +********** _?◆_? GGTTSSAAMM__MMAAKKEE__AALLIIGGNNEEDD__OOPPEERRAATTOORR__NNEEWW ********** │ │ │ │ +#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW │ │ │ │ +VVaalluuee:: │ │ │ │ +EIGEN_MAKE_ALIGNED_OPERATOR_NEW \ │ │ │ │ +using _eigen_aligned_allocator_trait = void; │ │ │ │ +This marks a GTSAM object to require alignment. │ │ │ │ +With this macro an object will automatically be allocated in aligned memory │ │ │ │ +when one uses _g_t_s_a_m_:_:_m_a_k_e___s_h_a_r_e_d. It reduces future misalignment problems that │ │ │ │ +is hard to debug. See _h_t_t_p_s_:_/_/_e_i_g_e_n_._t_u_x_f_a_m_i_l_y_._o_r_g_/_d_o_x_/ │ │ │ │ +_g_r_o_u_p_____D_e_n_s_e_M_a_t_r_i_x_M_a_n_i_p_u_l_a_t_i_o_n_____A_l_i_g_n_e_m_e_n_t_._h_t_m_l for detailed explanation. │ │ │ │ +********** _?◆_? GGTTSSAAMM__MMAAKKEE__AALLIIGGNNEEDD__OOPPEERRAATTOORR__NNEEWW__IIFF ********** │ │ │ │ +#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF (   NeedsToAlign ) │ │ │ │ +VVaalluuee:: │ │ │ │ +EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) \ │ │ │ │ +using _eigen_aligned_allocator_trait = void; │ │ │ │ +This marks a GTSAM object to require alignment. │ │ │ │ +With this macro an object will automatically be allocated in aligned memory │ │ │ │ +when one uses _g_t_s_a_m_:_:_m_a_k_e___s_h_a_r_e_d. It reduces future misalignment problems that │ │ │ │ +is hard to debug. See _h_t_t_p_s_:_/_/_e_i_g_e_n_._t_u_x_f_a_m_i_l_y_._o_r_g_/_d_o_x_/ │ │ │ │ +_g_r_o_u_p_____D_e_n_s_e_M_a_t_r_i_x_M_a_n_i_p_u_l_a_t_i_o_n_____A_l_i_g_n_e_m_e_n_t_._h_t_m_l for detailed explanation. │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_._c_p_p │ │ │ │ + * _t_y_p_e_s_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00098.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/ProductLieGroup.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Testable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,46 +95,122 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
ProductLieGroup.h File Reference
│ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Functions
│ │ │ +
Testable.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Group product of two Lie Groups. │ │ │ +

Concept check for values that can be used in unit tests. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │

│ │ │ Classes

class  gtsam::ProductLieGroup< G, H >
 Template to construct the product Lie group of two other Lie groups Assumes Lie group structure for G and H. More...
class  gtsam::IsTestable< T >
 A testable concept check that should be placed in applicable unit tests and in generic algorithms. More...
 
struct  gtsam::traits< ProductLieGroup< G, H > >
struct  gtsam::equals< V >
 Template to create a binary predicate. More...
 
struct  gtsam::equals_star< V >
 Binary predicate on shared pointers. More...
 
struct  gtsam::HasTestablePrereqs< T >
 Requirements on type to pass it to Testable template below. More...
 
struct  gtsam::Testable< T >
 A helper that implements the traits interface for GTSAM types. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Macros

│ │ │ +#define GTSAM_PRINT(x)   ((x).print(#x))
 
#define GTSAM_CONCEPT_TESTABLE_INST(T)   template class gtsam::IsTestable<T>;
 Macros for using the TestableConcept.
 
│ │ │ +#define GTSAM_CONCEPT_TESTABLE_TYPE(T)   using _gtsam_Testable_##T = gtsam::IsTestable<T>;
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

│ │ │ +void gtsam::print (float v, const std::string &s="")
 
│ │ │ +void gtsam::print (double v, const std::string &s="")
 
│ │ │ +template<class T >
bool gtsam::equal (const T &obj1, const T &obj2, double tol)
 Call equal on the object.
 
│ │ │ +template<class T >
bool gtsam::equal (const T &obj1, const T &obj2)
 Call equal without tolerance (use default tolerance)
 
│ │ │ +template<class V >
bool gtsam::assert_equal (const V &expected, const V &actual, double tol=1e-9)
 This template works for any type with equals.
 
│ │ │

Detailed Description

│ │ │ -

Group product of two Lie Groups.

│ │ │ -
Date
May, 2015
│ │ │ -
Author
Frank Dellaert
│ │ │ -
│ │ │ +

Concept check for values that can be used in unit tests.

│ │ │ +
Author
Frank Dellaert
│ │ │ +

The necessary functions to implement for Testable are defined below with additional details as to the interface. The concept checking function will check whether or not the function exists in derived class and throw compile-time errors.

│ │ │ +

print with optional string naming the object void print(const std::string& name) const = 0;

│ │ │ +

equality up to tolerance tricky to implement, see PriorFactor for an example equals is not supposed to print out anything, just return true|false bool equals(const Derived& expected, double tol) const = 0;

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ GTSAM_CONCEPT_TESTABLE_INST

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define GTSAM_CONCEPT_TESTABLE_INST( T)   template class gtsam::IsTestable<T>;
│ │ │ +
│ │ │ + │ │ │ +

Macros for using the TestableConcept.

│ │ │ +
    │ │ │ +
  • An instantiation for use inside unit tests
  • │ │ │ +
  • A typedef for use inside generic algorithms
  • │ │ │ +
│ │ │ +

NOTE: intentionally not in the gtsam namespace to allow for classes not in the gtsam namespace to be more easily enforced as testable

Deprecated:
please use BOOST_CONCEPT_ASSERT and
│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,30 +1,84 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -ProductLieGroup.h File Reference │ │ │ │ -Group product of two Lie Groups. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Testable.h File Reference │ │ │ │ +Concept check for values that can be used in unit tests. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_P_r_o_d_u_c_t_L_i_e_G_r_o_u_p_<_ _G_,_ _H_ _> │ │ │ │ -  Template to construct the product Lie group of two other Lie groups │ │ │ │ - Assumes Lie group structure for G and H. _M_o_r_e_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_I_s_T_e_s_t_a_b_l_e_<_ _T_ _> │ │ │ │ +  A testable concept check that should be placed in applicable unit │ │ │ │ + tests and in generic algorithms. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p_<_ _G_,_ _H_ _>_ _> │ │ │ │ +struct   _g_t_s_a_m_:_:_e_q_u_a_l_s_<_ _V_ _> │ │ │ │ +  Template to create a binary predicate. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_e_q_u_a_l_s___s_t_a_r_<_ _V_ _> │ │ │ │ +  Binary predicate on shared pointers. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_H_a_s_T_e_s_t_a_b_l_e_P_r_e_r_e_q_s_<_ _T_ _> │ │ │ │ +  Requirements on type to pass it to _T_e_s_t_a_b_l_e template below. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_T_e_s_t_a_b_l_e_<_ _T_ _> │ │ │ │ +  A helper that implements the traits interface for GTSAM types. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  GGTTSSAAMM__PPRRIINNTT(x)   ((x).print(#x)) │ │ │ │ +  │ │ │ │ +#define  _G_T_S_A_M___C_O_N_C_E_P_T___T_E_S_T_A_B_L_E___I_N_S_T(T)   template class _g_t_s_a_m_:_:_I_s_T_e_s_t_a_b_l_e; │ │ │ │ +  Macros for using the TestableConcept. │ │ │ │ +  │ │ │ │ +#define  GGTTSSAAMM__CCOONNCCEEPPTT__TTEESSTTAABBLLEE__TTYYPPEE(T)   using _gtsam_Testable_##T = _g_t_s_a_m_:_: │ │ │ │ + _I_s_T_e_s_t_a_b_l_e; │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +void  ggttssaamm::::pprriinntt (float v, const std::string &s="") │ │ │ │ +  │ │ │ │ +void  ggttssaamm::::pprriinntt (double v, const std::string &s="") │ │ │ │ +  │ │ │ │ +template │ │ │ │ +bool  ggttssaamm::::eeqquuaall (const T &obj1, const T &obj2, double tol) │ │ │ │ +  Call equal on the object. │ │ │ │ +  │ │ │ │ +template │ │ │ │ +bool  ggttssaamm::::eeqquuaall (const T &obj1, const T &obj2) │ │ │ │ +  Call equal without tolerance (use default tolerance) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +bool  ggttssaamm::::aasssseerrtt__eeqquuaall (const V &expected, const V &actual, double tol=1e-9) │ │ │ │ +  This template works for any type with equals. │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Group product of two Lie Groups. │ │ │ │ - Date │ │ │ │ - May, 2015 │ │ │ │ +Concept check for values that can be used in unit tests. │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ +The necessary functions to implement for Testable are defined below with │ │ │ │ +additional details as to the interface. The concept checking function will │ │ │ │ +check whether or not the function exists in derived class and throw compile- │ │ │ │ +time errors. │ │ │ │ +print with optional string naming the object void print(const std::string& │ │ │ │ +name) const = 0; │ │ │ │ +equality up to tolerance tricky to implement, see PriorFactor for an example │ │ │ │ +equals is not supposed to print out aannyytthhiinngg, just return true|false bool │ │ │ │ +equals(const Derived& expected, double tol) const = 0; │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? GGTTSSAAMM__CCOONNCCEEPPTT__TTEESSTTAABBLLEE__IINNSSTT ********** │ │ │ │ +#define GTSAM_CONCEPT_TESTABLE_INST (   T )    template class _g_t_s_a_m_:_: │ │ │ │ + _I_s_T_e_s_t_a_b_l_e; │ │ │ │ +Macros for using the TestableConcept. │ │ │ │ + * An instantiation for use inside unit tests │ │ │ │ + * A typedef for use inside generic algorithms │ │ │ │ +NOTE: intentionally not in the gtsam namespace to allow for classes not in the │ │ │ │ +gtsam namespace to be more easily enforced as testable │ │ │ │ + _DD_ee_pp_rr_ee_cc_aa_tt_ee_dd_:: │ │ │ │ + please use BOOST_CONCEPT_ASSERT and │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p_._h │ │ │ │ + * _T_e_s_t_a_b_l_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00098.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,10 @@ │ │ │ │ var a00098 = [ │ │ │ │ - ["gtsam::ProductLieGroup< G, H >", "a02464.html", "a02464"], │ │ │ │ - ["gtsam::traits< ProductLieGroup< G, H > >", "a02468.html", null] │ │ │ │ + ["gtsam::equals< V >", "a02480.html", null], │ │ │ │ + ["gtsam::equals_star< V >", "a02484.html", null], │ │ │ │ + ["gtsam::HasTestablePrereqs< T >", "a02488.html", null], │ │ │ │ + ["gtsam::Testable< T >", "a02492.html", null], │ │ │ │ + ["GTSAM_CONCEPT_TESTABLE_INST", "a00098.html#abe0a238cdd07d484ff0be56ae945b182", null], │ │ │ │ + ["assert_equal", "a00098.html#a659619cca082d1c10b07c033d48c54da", null], │ │ │ │ + ["equal", "a00098.html#a1f3dc67ad88b799c469088e428c583b1", null], │ │ │ │ + ["equal", "a00098.html#ad2dbee4a72127938c79162cc8b6d5152", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00098_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/ProductLieGroup.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Testable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,193 +98,171 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
ProductLieGroup.h
│ │ │ +
Testable.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │ -
10 * -------------------------------1------------------------------------------- */
│ │ │ +
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
19#pragma once
│ │ │ -
20
│ │ │ -
21#include <gtsam/base/Lie.h>
│ │ │ -
22#include <utility> // pair
│ │ │ -
23
│ │ │ -
24namespace gtsam {
│ │ │ -
25
│ │ │ -
28template<typename G, typename H>
│ │ │ -
│ │ │ -
29class ProductLieGroup: public std::pair<G, H> {
│ │ │ -
30 BOOST_CONCEPT_ASSERT((IsLieGroup<G>));
│ │ │ -
31 BOOST_CONCEPT_ASSERT((IsLieGroup<H>));
│ │ │ -
32 typedef std::pair<G, H> Base;
│ │ │ +
32// \callgraph
│ │ │
33
│ │ │ -
34protected:
│ │ │ -
35 enum {dimension1 = traits<G>::dimension};
│ │ │ -
36 enum {dimension2 = traits<H>::dimension};
│ │ │ -
37
│ │ │ -
38public:
│ │ │ -
40 ProductLieGroup():Base(traits<G>::Identity(),traits<H>::Identity()) {}
│ │ │ +
34#pragma once
│ │ │ +
35
│ │ │ +
36#include <boost/concept_check.hpp>
│ │ │ +
37#include <functional>
│ │ │ +
38#include <iostream>
│ │ │ +
39#include <memory>
│ │ │ +
40#include <string>
│ │ │
41
│ │ │ -
42 // Construct from two subgroup elements
│ │ │ -
43 ProductLieGroup(const G& g, const H& h):Base(g,h) {}
│ │ │ -
44
│ │ │ -
45 // Construct from base
│ │ │ -
46 ProductLieGroup(const Base& base):Base(base) {}
│ │ │ -
47
│ │ │ -
50 typedef multiplicative_group_tag group_flavor;
│ │ │ -
51 static ProductLieGroup Identity() {return ProductLieGroup();}
│ │ │ -
52
│ │ │ -
53 ProductLieGroup operator*(const ProductLieGroup& other) const {
│ │ │ -
54 return ProductLieGroup(traits<G>::Compose(this->first,other.first),
│ │ │ -
55 traits<H>::Compose(this->second,other.second));
│ │ │ -
56 }
│ │ │ -
57 ProductLieGroup inverse() const {
│ │ │ -
58 return ProductLieGroup(traits<G>::Inverse(this->first), traits<H>::Inverse(this->second));
│ │ │ -
59 }
│ │ │ -
60 ProductLieGroup compose(const ProductLieGroup& g) const {
│ │ │ -
61 return (*this) * g;
│ │ │ -
62 }
│ │ │ -
63 ProductLieGroup between(const ProductLieGroup& g) const {
│ │ │ -
64 return this->inverse() * g;
│ │ │ -
65 }
│ │ │ +
42#define GTSAM_PRINT(x)((x).print(#x))
│ │ │ +
43
│ │ │ +
44namespace gtsam {
│ │ │ +
45
│ │ │ +
46 // Forward declaration
│ │ │ +
47 template <typename T> struct traits;
│ │ │ +
48
│ │ │ +
57 template <class T>
│ │ │ +
│ │ │ +
58 class IsTestable {
│ │ │ +
59 T t;
│ │ │ +
60 bool r1,r2;
│ │ │ +
61 public:
│ │ │ +
62
│ │ │ +
63 BOOST_CONCEPT_USAGE(IsTestable) {
│ │ │ +
64 // check print function, with optional string
│ │ │ +
65 traits<T>::Print(t, std::string());
│ │ │ + │ │ │
67
│ │ │ -
70 enum {dimension = dimension1 + dimension2};
│ │ │ -
71 inline static size_t Dim() {return dimension;}
│ │ │ -
72 inline size_t dim() const {return dimension;}
│ │ │ -
73
│ │ │ -
74 typedef Eigen::Matrix<double, dimension, 1> TangentVector;
│ │ │ -
75 typedef OptionalJacobian<dimension, dimension> ChartJacobian;
│ │ │ -
76
│ │ │ -
77 ProductLieGroup retract(const TangentVector& v, //
│ │ │ -
78 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) const {
│ │ │ -
79 if (H1||H2) throw std::runtime_error("ProductLieGroup::retract derivatives not implemented yet");
│ │ │ -
80 G g = traits<G>::Retract(this->first, v.template head<dimension1>());
│ │ │ -
81 H h = traits<H>::Retract(this->second, v.template tail<dimension2>());
│ │ │ -
82 return ProductLieGroup(g,h);
│ │ │ -
83 }
│ │ │ -
84 TangentVector localCoordinates(const ProductLieGroup& g, //
│ │ │ -
85 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) const {
│ │ │ -
86 if (H1||H2) throw std::runtime_error("ProductLieGroup::localCoordinates derivatives not implemented yet");
│ │ │ -
87 typename traits<G>::TangentVector v1 = traits<G>::Local(this->first, g.first);
│ │ │ -
88 typename traits<H>::TangentVector v2 = traits<H>::Local(this->second, g.second);
│ │ │ -
89 TangentVector v;
│ │ │ -
90 v << v1, v2;
│ │ │ -
91 return v;
│ │ │ +
68 // check print, with optional threshold
│ │ │ +
69 double tol = 1.0;
│ │ │ +
70 r1 = traits<T>::Equals(t,t,tol);
│ │ │ +
71 r2 = traits<T>::Equals(t,t);
│ │ │ +
72 }
│ │ │ +
73 }; // \ Testable
│ │ │ +
│ │ │ +
74
│ │ │ +
75 inline void print(float v, const std::string& s = "") {
│ │ │ +
76 std::cout << (s.empty() ? s : s + " ") << v << std::endl;
│ │ │ +
77 }
│ │ │ +
78 inline void print(double v, const std::string& s = "") {
│ │ │ +
79 std::cout << (s.empty() ? s : s + " ") << v << std::endl;
│ │ │ +
80 }
│ │ │ +
81
│ │ │ +
83 template<class T>
│ │ │ +
│ │ │ +
84 inline bool equal(const T& obj1, const T& obj2, double tol) {
│ │ │ +
85 return traits<T>::Equals(obj1,obj2, tol);
│ │ │ +
86 }
│ │ │ +
│ │ │ +
87
│ │ │ +
89 template<class T>
│ │ │ +
│ │ │ +
90 inline bool equal(const T& obj1, const T& obj2) {
│ │ │ +
91 return traits<T>::Equals(obj1,obj2);
│ │ │
92 }
│ │ │ -
94
│ │ │ -
97protected:
│ │ │ -
98 typedef Eigen::Matrix<double, dimension, dimension> Jacobian;
│ │ │ -
99 typedef Eigen::Matrix<double, dimension1, dimension1> Jacobian1;
│ │ │ -
100 typedef Eigen::Matrix<double, dimension2, dimension2> Jacobian2;
│ │ │ -
101
│ │ │ -
102public:
│ │ │ -
103 ProductLieGroup compose(const ProductLieGroup& other, ChartJacobian H1,
│ │ │ -
104 ChartJacobian H2 = boost::none) const {
│ │ │ -
105 Jacobian1 D_g_first; Jacobian2 D_h_second;
│ │ │ -
106 G g = traits<G>::Compose(this->first,other.first, H1 ? &D_g_first : 0);
│ │ │ -
107 H h = traits<H>::Compose(this->second,other.second, H1 ? &D_h_second : 0);
│ │ │ -
108 if (H1) {
│ │ │ -
109 H1->setZero();
│ │ │ -
110 H1->template topLeftCorner<dimension1,dimension1>() = D_g_first;
│ │ │ -
111 H1->template bottomRightCorner<dimension2,dimension2>() = D_h_second;
│ │ │ -
112 }
│ │ │ -
113 if (H2) *H2 = Jacobian::Identity();
│ │ │ -
114 return ProductLieGroup(g,h);
│ │ │ -
115 }
│ │ │ -
116 ProductLieGroup between(const ProductLieGroup& other, ChartJacobian H1,
│ │ │ -
117 ChartJacobian H2 = boost::none) const {
│ │ │ -
118 Jacobian1 D_g_first; Jacobian2 D_h_second;
│ │ │ -
119 G g = traits<G>::Between(this->first,other.first, H1 ? &D_g_first : 0);
│ │ │ -
120 H h = traits<H>::Between(this->second,other.second, H1 ? &D_h_second : 0);
│ │ │ -
121 if (H1) {
│ │ │ -
122 H1->setZero();
│ │ │ -
123 H1->template topLeftCorner<dimension1,dimension1>() = D_g_first;
│ │ │ -
124 H1->template bottomRightCorner<dimension2,dimension2>() = D_h_second;
│ │ │ -
125 }
│ │ │ -
126 if (H2) *H2 = Jacobian::Identity();
│ │ │ -
127 return ProductLieGroup(g,h);
│ │ │ -
128 }
│ │ │ -
129 ProductLieGroup inverse(ChartJacobian D) const {
│ │ │ -
130 Jacobian1 D_g_first; Jacobian2 D_h_second;
│ │ │ -
131 G g = traits<G>::Inverse(this->first, D ? &D_g_first : 0);
│ │ │ -
132 H h = traits<H>::Inverse(this->second, D ? &D_h_second : 0);
│ │ │ -
133 if (D) {
│ │ │ -
134 D->setZero();
│ │ │ -
135 D->template topLeftCorner<dimension1,dimension1>() = D_g_first;
│ │ │ -
136 D->template bottomRightCorner<dimension2,dimension2>() = D_h_second;
│ │ │ -
137 }
│ │ │ -
138 return ProductLieGroup(g,h);
│ │ │ -
139 }
│ │ │ -
140 static ProductLieGroup Expmap(const TangentVector& v, ChartJacobian Hv = boost::none) {
│ │ │ -
141 Jacobian1 D_g_first; Jacobian2 D_h_second;
│ │ │ -
142 G g = traits<G>::Expmap(v.template head<dimension1>(), Hv ? &D_g_first : 0);
│ │ │ -
143 H h = traits<H>::Expmap(v.template tail<dimension2>(), Hv ? &D_h_second : 0);
│ │ │ -
144 if (Hv) {
│ │ │ -
145 Hv->setZero();
│ │ │ -
146 Hv->template topLeftCorner<dimension1,dimension1>() = D_g_first;
│ │ │ -
147 Hv->template bottomRightCorner<dimension2,dimension2>() = D_h_second;
│ │ │ -
148 }
│ │ │ -
149 return ProductLieGroup(g,h);
│ │ │ -
150 }
│ │ │ -
151 static TangentVector Logmap(const ProductLieGroup& p, ChartJacobian Hp = boost::none) {
│ │ │ -
152 Jacobian1 D_g_first; Jacobian2 D_h_second;
│ │ │ -
153 typename traits<G>::TangentVector v1 = traits<G>::Logmap(p.first, Hp ? &D_g_first : 0);
│ │ │ -
154 typename traits<H>::TangentVector v2 = traits<H>::Logmap(p.second, Hp ? &D_h_second : 0);
│ │ │ -
155 TangentVector v;
│ │ │ -
156 v << v1, v2;
│ │ │ -
157 if (Hp) {
│ │ │ -
158 Hp->setZero();
│ │ │ -
159 Hp->template topLeftCorner<dimension1,dimension1>() = D_g_first;
│ │ │ -
160 Hp->template bottomRightCorner<dimension2,dimension2>() = D_h_second;
│ │ │ +
│ │ │ +
93
│ │ │ +
97 template<class V>
│ │ │ +
│ │ │ +
98 bool assert_equal(const V& expected, const V& actual, double tol = 1e-9) {
│ │ │ +
99 if (traits<V>::Equals(actual,expected, tol))
│ │ │ +
100 return true;
│ │ │ +
101 printf("Not equal:\n");
│ │ │ +
102 traits<V>::Print(expected,"expected:\n");
│ │ │ +
103 traits<V>::Print(actual,"actual:\n");
│ │ │ +
104 return false;
│ │ │ +
105 }
│ │ │ +
│ │ │ +
106
│ │ │ +
110 template<class V>
│ │ │ +
│ │ │ +
111 struct equals : public std::function<bool(const V&, const V&)> {
│ │ │ +
112 double tol_;
│ │ │ +
113 equals(double tol = 1e-9) : tol_(tol) {}
│ │ │ +
114 bool operator()(const V& expected, const V& actual) {
│ │ │ +
115 return (traits<V>::Equals(actual, expected, tol_));
│ │ │ +
116 }
│ │ │ +
117 };
│ │ │ +
│ │ │ +
118
│ │ │ +
122 template<class V>
│ │ │ +
│ │ │ +
123 struct equals_star : public std::function<bool(const std::shared_ptr<V>&, const std::shared_ptr<V>&)> {
│ │ │ +
124 double tol_;
│ │ │ +
125 equals_star(double tol = 1e-9) : tol_(tol) {}
│ │ │ +
126 bool operator()(const std::shared_ptr<V>& expected, const std::shared_ptr<V>& actual) {
│ │ │ +
127 if (!actual && !expected) return true;
│ │ │ +
128 return actual && expected && traits<V>::Equals(*actual,*expected, tol_);
│ │ │ +
129 }
│ │ │ +
130 };
│ │ │ +
│ │ │ +
131
│ │ │ +
133 template<typename T>
│ │ │ +
│ │ │ + │ │ │ +
135
│ │ │ +
136 BOOST_CONCEPT_USAGE(HasTestablePrereqs) {
│ │ │ +
137 t->print(str);
│ │ │ +
138 b = t->equals(*s,tol);
│ │ │ +
139 }
│ │ │ +
140
│ │ │ +
141 T *t, *s; // Pointer is to allow abstract classes
│ │ │ +
142 bool b;
│ │ │ +
143 double tol;
│ │ │ +
144 std::string str;
│ │ │ +
145 };
│ │ │ +
│ │ │ +
146
│ │ │ +
150 template<typename T>
│ │ │ +
│ │ │ +
151 struct Testable {
│ │ │ +
152
│ │ │ +
153 // Check that T has the necessary methods
│ │ │ +
154 BOOST_CONCEPT_ASSERT((HasTestablePrereqs<T>));
│ │ │ +
155
│ │ │ +
156 static void Print(const T& m, const std::string& str = "") {
│ │ │ +
157 m.print(str);
│ │ │ +
158 }
│ │ │ +
159 static bool Equals(const T& m1, const T& m2, double tol = 1e-8) {
│ │ │ +
160 return m1.equals(m2, tol);
│ │ │
161 }
│ │ │ -
162 return v;
│ │ │ -
163 }
│ │ │ -
164 static TangentVector LocalCoordinates(const ProductLieGroup& p, ChartJacobian Hp = boost::none) {
│ │ │ -
165 return Logmap(p, Hp);
│ │ │ -
166 }
│ │ │ -
167 ProductLieGroup expmap(const TangentVector& v) const {
│ │ │ -
168 return compose(ProductLieGroup::Expmap(v));
│ │ │ -
169 }
│ │ │ -
170 TangentVector logmap(const ProductLieGroup& g) const {
│ │ │ -
171 return ProductLieGroup::Logmap(between(g));
│ │ │ -
172 }
│ │ │ -
174
│ │ │ -
175};
│ │ │ -
│ │ │ -
176
│ │ │ -
177// Define any direct product group to be a model of the multiplicative Group concept
│ │ │ -
178template<typename G, typename H>
│ │ │ -
179struct traits<ProductLieGroup<G, H> > : internal::LieGroupTraits<ProductLieGroup<G, H> > {};
│ │ │ -
180
│ │ │ -
181} // namespace gtsam
│ │ │ -
182
│ │ │ -
Base class and basic functions for Lie types.
│ │ │ +
162 };
│ │ │ +
│ │ │ +
163
│ │ │ +
164} // \namespace gtsam
│ │ │ +
165
│ │ │ +
175#define GTSAM_CONCEPT_TESTABLE_INST(T) template class gtsam::IsTestable<T>;
│ │ │ +
176#define GTSAM_CONCEPT_TESTABLE_TYPE(T) using _gtsam_Testable_##T = gtsam::IsTestable<T>;
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ +
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
equals with an tolerance, prints out message if unequal
Definition Matrix.cpp:43
│ │ │ +
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:156
│ │ │ +
bool equal(const T &obj1, const T &obj2, double tol)
Call equal on the object.
Definition Testable.h:84
│ │ │
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ -
A helper class that implements the traits interface for GTSAM lie groups.
Definition Lie.h:174
│ │ │ -
Lie Group Concept.
Definition Lie.h:260
│ │ │ -
Template to construct the product Lie group of two other Lie groups Assumes Lie group structure for G...
Definition ProductLieGroup.h:29
│ │ │ -
ProductLieGroup()
Default constructor yields identity.
Definition ProductLieGroup.h:40
│ │ │ +
A testable concept check that should be placed in applicable unit tests and in generic algorithms.
Definition Testable.h:58
│ │ │ +
Template to create a binary predicate.
Definition Testable.h:111
│ │ │ +
Binary predicate on shared pointers.
Definition Testable.h:123
│ │ │ +
Requirements on type to pass it to Testable template below.
Definition Testable.h:134
│ │ │ +
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:151
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,213 +1,175 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -ProductLieGroup.h │ │ │ │ +Testable.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ -10 * -------------------------------1------------------------------------------ │ │ │ │ +10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -19#pragma once │ │ │ │ -20 │ │ │ │ -21#include <_g_t_s_a_m_/_b_a_s_e_/_L_i_e_._h> │ │ │ │ -22#include // pair │ │ │ │ -23 │ │ │ │ -24namespace _g_t_s_a_m { │ │ │ │ -25 │ │ │ │ -28template │ │ │ │ -_2_9class _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p: public std::pair { │ │ │ │ -30 BOOST_CONCEPT_ASSERT((_I_s_L_i_e_G_r_o_u_p_<_G_>)); │ │ │ │ -31 BOOST_CONCEPT_ASSERT((_I_s_L_i_e_G_r_o_u_p_<_H_>)); │ │ │ │ -32 typedef std::pair Base; │ │ │ │ +32// \callgraph │ │ │ │ 33 │ │ │ │ -34protected: │ │ │ │ -35 enum {dimension1 = _t_r_a_i_t_s_<_G_>_:_:_d_i_m_e_n_s_i_o_n}; │ │ │ │ -36 enum {dimension2 = _t_r_a_i_t_s_<_H_>_:_:_d_i_m_e_n_s_i_o_n}; │ │ │ │ -37 │ │ │ │ -38public: │ │ │ │ -_4_0 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p():Base(_t_r_a_i_t_s::Identity(),_t_r_a_i_t_s::Identity()) {} │ │ │ │ +34#pragma once │ │ │ │ +35 │ │ │ │ +36#include │ │ │ │ +37#include │ │ │ │ +38#include │ │ │ │ +39#include │ │ │ │ +40#include │ │ │ │ 41 │ │ │ │ -42 // Construct from two subgroup elements │ │ │ │ -43 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(const G& g, const H& h):Base(g,h) {} │ │ │ │ -44 │ │ │ │ -45 // Construct from base │ │ │ │ -46 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(const Base& base):Base(base) {} │ │ │ │ -47 │ │ │ │ -50 typedef multiplicative_group_tag group_flavor; │ │ │ │ -51 static _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p Identity() {return _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p();} │ │ │ │ -52 │ │ │ │ -53 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p operator*(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& other) const { │ │ │ │ -54 return _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(traits::Compose(this->first,other.first), │ │ │ │ -55 traits::Compose(this->second,other.second)); │ │ │ │ -56 } │ │ │ │ -57 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p inverse() const { │ │ │ │ -58 return _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(traits::Inverse(this->first), traits::Inverse │ │ │ │ -(this->second)); │ │ │ │ -59 } │ │ │ │ -60 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p compose(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& g) const { │ │ │ │ -61 return (*this) * g; │ │ │ │ -62 } │ │ │ │ -63 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p between(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& g) const { │ │ │ │ -64 return this->inverse() * g; │ │ │ │ -65 } │ │ │ │ +42#define GTSAM_PRINT(x)((x).print(#x)) │ │ │ │ +43 │ │ │ │ +44namespace _g_t_s_a_m { │ │ │ │ +45 │ │ │ │ +46 // Forward declaration │ │ │ │ +47 template struct traits; │ │ │ │ +48 │ │ │ │ +57 template │ │ │ │ +_5_8 class _I_s_T_e_s_t_a_b_l_e { │ │ │ │ +59 T t; │ │ │ │ +60 bool r1,r2; │ │ │ │ +61 public: │ │ │ │ +62 │ │ │ │ +63 BOOST_CONCEPT_USAGE(_I_s_T_e_s_t_a_b_l_e) { │ │ │ │ +64 // check print function, with optional string │ │ │ │ +65 _t_r_a_i_t_s_<_T_>_:_:_P_r_i_n_t(t, std::string()); │ │ │ │ +66 _t_r_a_i_t_s_<_T_>_:_:_P_r_i_n_t(t); │ │ │ │ 67 │ │ │ │ -70 enum {dimension = dimension1 + dimension2}; │ │ │ │ -71 inline static size_t Dim() {return dimension;} │ │ │ │ -72 inline size_t dim() const {return dimension;} │ │ │ │ -73 │ │ │ │ -74 typedef Eigen::Matrix TangentVector; │ │ │ │ -75 typedef OptionalJacobian ChartJacobian; │ │ │ │ -76 │ │ │ │ -77 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p retract(const TangentVector& v, // │ │ │ │ -78 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) const { │ │ │ │ -79 if (H1||H2) throw std::runtime_error("ProductLieGroup::retract derivatives │ │ │ │ -not implemented yet"); │ │ │ │ -80 G g = traits::Retract(this->first, v.template head()); │ │ │ │ -81 H h = traits::Retract(this->second, v.template tail()); │ │ │ │ -82 return _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(g,h); │ │ │ │ -83 } │ │ │ │ -84 TangentVector localCoordinates(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& g, // │ │ │ │ -85 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) const { │ │ │ │ -86 if (H1||H2) throw std::runtime_error("ProductLieGroup::localCoordinates │ │ │ │ -derivatives not implemented yet"); │ │ │ │ -87 typename traits::TangentVector v1 = traits::Local(this->first, │ │ │ │ -g.first); │ │ │ │ -88 typename traits::TangentVector v2 = traits::Local(this->second, │ │ │ │ -g.second); │ │ │ │ -89 TangentVector v; │ │ │ │ -90 v << v1, v2; │ │ │ │ -91 return v; │ │ │ │ +68 // check print, with optional threshold │ │ │ │ +69 double tol = 1.0; │ │ │ │ +70 r1 = _t_r_a_i_t_s_<_T_>_:_:_E_q_u_a_l_s(t,t,tol); │ │ │ │ +71 r2 = _t_r_a_i_t_s_<_T_>_:_:_E_q_u_a_l_s(t,t); │ │ │ │ +72 } │ │ │ │ +73 }; // \ Testable │ │ │ │ +74 │ │ │ │ +75 inline void _p_r_i_n_t(float v, const std::string& s = "") { │ │ │ │ +76 std::cout << (s.empty() ? s : s + " ") << v << std::endl; │ │ │ │ +77 } │ │ │ │ +78 inline void _p_r_i_n_t(double v, const std::string& s = "") { │ │ │ │ +79 std::cout << (s.empty() ? s : s + " ") << v << std::endl; │ │ │ │ +80 } │ │ │ │ +81 │ │ │ │ +83 template │ │ │ │ +_8_4 inline bool _e_q_u_a_l(const T& obj1, const T& obj2, double tol) { │ │ │ │ +85 return _t_r_a_i_t_s_<_T_>_:_:_E_q_u_a_l_s(obj1,obj2, tol); │ │ │ │ +86 } │ │ │ │ +87 │ │ │ │ +89 template │ │ │ │ +_9_0 inline bool _e_q_u_a_l(const T& obj1, const T& obj2) { │ │ │ │ +91 return _t_r_a_i_t_s_<_T_>_:_:_E_q_u_a_l_s(obj1,obj2); │ │ │ │ 92 } │ │ │ │ -94 │ │ │ │ -97protected: │ │ │ │ -98 typedef Eigen::Matrix Jacobian; │ │ │ │ -99 typedef Eigen::Matrix Jacobian1; │ │ │ │ -100 typedef Eigen::Matrix Jacobian2; │ │ │ │ -101 │ │ │ │ -102public: │ │ │ │ -103 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p compose(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& other, ChartJacobian H1, │ │ │ │ -104 ChartJacobian H2 = boost::none) const { │ │ │ │ -105 Jacobian1 D_g_first; Jacobian2 D_h_second; │ │ │ │ -106 G g = traits::Compose(this->first,other.first, H1 ? &D_g_first : 0); │ │ │ │ -107 H h = traits::Compose(this->second,other.second, H1 ? &D_h_second : 0); │ │ │ │ -108 if (H1) { │ │ │ │ -109 H1->setZero(); │ │ │ │ -110 H1->template topLeftCorner() = D_g_first; │ │ │ │ -111 H1->template bottomRightCorner() = D_h_second; │ │ │ │ -112 } │ │ │ │ -113 if (H2) *H2 = Jacobian::Identity(); │ │ │ │ -114 return _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(g,h); │ │ │ │ -115 } │ │ │ │ -116 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p between(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& other, ChartJacobian H1, │ │ │ │ -117 ChartJacobian H2 = boost::none) const { │ │ │ │ -118 Jacobian1 D_g_first; Jacobian2 D_h_second; │ │ │ │ -119 G g = traits::Between(this->first,other.first, H1 ? &D_g_first : 0); │ │ │ │ -120 H h = traits::Between(this->second,other.second, H1 ? &D_h_second : 0); │ │ │ │ -121 if (H1) { │ │ │ │ -122 H1->setZero(); │ │ │ │ -123 H1->template topLeftCorner() = D_g_first; │ │ │ │ -124 H1->template bottomRightCorner() = D_h_second; │ │ │ │ -125 } │ │ │ │ -126 if (H2) *H2 = Jacobian::Identity(); │ │ │ │ -127 return _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(g,h); │ │ │ │ -128 } │ │ │ │ -129 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p inverse(ChartJacobian D) const { │ │ │ │ -130 Jacobian1 D_g_first; Jacobian2 D_h_second; │ │ │ │ -131 G g = traits::Inverse(this->first, D ? &D_g_first : 0); │ │ │ │ -132 H h = traits::Inverse(this->second, D ? &D_h_second : 0); │ │ │ │ -133 if (D) { │ │ │ │ -134 D->setZero(); │ │ │ │ -135 D->template topLeftCorner() = D_g_first; │ │ │ │ -136 D->template bottomRightCorner() = D_h_second; │ │ │ │ -137 } │ │ │ │ -138 return _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(g,h); │ │ │ │ +93 │ │ │ │ +97 template │ │ │ │ +_9_8 bool _a_s_s_e_r_t___e_q_u_a_l(const V& expected, const V& actual, double tol = 1e-9) { │ │ │ │ +99 if (_t_r_a_i_t_s_<_V_>_:_:_E_q_u_a_l_s(actual,expected, tol)) │ │ │ │ +100 return true; │ │ │ │ +101 printf("Not equal:\n"); │ │ │ │ +102 _t_r_a_i_t_s_<_V_>_:_:_P_r_i_n_t(expected,"expected:\n"); │ │ │ │ +103 _t_r_a_i_t_s_<_V_>_:_:_P_r_i_n_t(actual,"actual:\n"); │ │ │ │ +104 return false; │ │ │ │ +105 } │ │ │ │ +106 │ │ │ │ +110 template │ │ │ │ +_1_1_1 struct _e_q_u_a_l_s : public std::function { │ │ │ │ +112 double tol_; │ │ │ │ +113 _e_q_u_a_l_s(double tol = 1e-9) : tol_(tol) {} │ │ │ │ +114 bool operator()(const V& expected, const V& actual) { │ │ │ │ +115 return (_t_r_a_i_t_s_<_V_>_:_:_E_q_u_a_l_s(actual, expected, tol_)); │ │ │ │ +116 } │ │ │ │ +117 }; │ │ │ │ +118 │ │ │ │ +122 template │ │ │ │ +_1_2_3 struct _e_q_u_a_l_s___s_t_a_r : public std::function&, │ │ │ │ +const std::shared_ptr&)> { │ │ │ │ +124 double tol_; │ │ │ │ +125 _e_q_u_a_l_s___s_t_a_r(double tol = 1e-9) : tol_(tol) {} │ │ │ │ +126 bool operator()(const std::shared_ptr& expected, const std:: │ │ │ │ +shared_ptr& actual) { │ │ │ │ +127 if (!actual && !expected) return true; │ │ │ │ +128 return actual && expected && _t_r_a_i_t_s_<_V_>_:_:_E_q_u_a_l_s(*actual,*expected, tol_); │ │ │ │ +129 } │ │ │ │ +130 }; │ │ │ │ +131 │ │ │ │ +133 template │ │ │ │ +_1_3_4 struct _H_a_s_T_e_s_t_a_b_l_e_P_r_e_r_e_q_s { │ │ │ │ +135 │ │ │ │ +136 BOOST_CONCEPT_USAGE(_H_a_s_T_e_s_t_a_b_l_e_P_r_e_r_e_q_s) { │ │ │ │ +137 t->print(str); │ │ │ │ +138 b = t->equals(*s,tol); │ │ │ │ 139 } │ │ │ │ -140 static _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p Expmap(const TangentVector& v, ChartJacobian Hv = │ │ │ │ -boost::none) { │ │ │ │ -141 Jacobian1 D_g_first; Jacobian2 D_h_second; │ │ │ │ -142 G g = traits::Expmap(v.template head(), Hv ? &D_g_first : │ │ │ │ -0); │ │ │ │ -143 H h = traits::Expmap(v.template tail(), Hv ? &D_h_second : │ │ │ │ -0); │ │ │ │ -144 if (Hv) { │ │ │ │ -145 Hv->setZero(); │ │ │ │ -146 Hv->template topLeftCorner() = D_g_first; │ │ │ │ -147 Hv->template bottomRightCorner() = D_h_second; │ │ │ │ -148 } │ │ │ │ -149 return _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p(g,h); │ │ │ │ -150 } │ │ │ │ -151 static TangentVector Logmap(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& p, ChartJacobian Hp = │ │ │ │ -boost::none) { │ │ │ │ -152 Jacobian1 D_g_first; Jacobian2 D_h_second; │ │ │ │ -153 typename traits::TangentVector v1 = traits::Logmap(p.first, Hp ? │ │ │ │ -&D_g_first : 0); │ │ │ │ -154 typename traits::TangentVector v2 = traits::Logmap(p.second, Hp ? │ │ │ │ -&D_h_second : 0); │ │ │ │ -155 TangentVector v; │ │ │ │ -156 v << v1, v2; │ │ │ │ -157 if (Hp) { │ │ │ │ -158 Hp->setZero(); │ │ │ │ -159 Hp->template topLeftCorner() = D_g_first; │ │ │ │ -160 Hp->template bottomRightCorner() = D_h_second; │ │ │ │ +140 │ │ │ │ +141 T *t, *s; // Pointer is to allow abstract classes │ │ │ │ +142 bool b; │ │ │ │ +143 double tol; │ │ │ │ +144 std::string str; │ │ │ │ +145 }; │ │ │ │ +146 │ │ │ │ +150 template │ │ │ │ +_1_5_1 struct _T_e_s_t_a_b_l_e { │ │ │ │ +152 │ │ │ │ +153 // Check that T has the necessary methods │ │ │ │ +154 BOOST_CONCEPT_ASSERT((_H_a_s_T_e_s_t_a_b_l_e_P_r_e_r_e_q_s_<_T_>)); │ │ │ │ +155 │ │ │ │ +156 static void Print(const T& m, const std::string& str = "") { │ │ │ │ +157 m.print(str); │ │ │ │ +158 } │ │ │ │ +159 static bool Equals(const T& m1, const T& m2, double tol = 1e-8) { │ │ │ │ +160 return m1.equals(m2, tol); │ │ │ │ 161 } │ │ │ │ -162 return v; │ │ │ │ -163 } │ │ │ │ -164 static TangentVector LocalCoordinates(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& p, │ │ │ │ -ChartJacobian Hp = boost::none) { │ │ │ │ -165 return Logmap(p, Hp); │ │ │ │ -166 } │ │ │ │ -167 _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p expmap(const TangentVector& v) const { │ │ │ │ -168 return compose(ProductLieGroup::Expmap(v)); │ │ │ │ -169 } │ │ │ │ -170 TangentVector logmap(const _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p& g) const { │ │ │ │ -171 return ProductLieGroup::Logmap(between(g)); │ │ │ │ -172 } │ │ │ │ -174 │ │ │ │ -175}; │ │ │ │ -176 │ │ │ │ -177// Define any direct product group to be a model of the multiplicative Group │ │ │ │ -concept │ │ │ │ -178template │ │ │ │ -_1_7_9struct _t_r_a_i_t_s<_P_r_o_d_u_c_t_L_i_e_G_r_o_u_p > : _i_n_t_e_r_n_a_l_:_: │ │ │ │ -_L_i_e_G_r_o_u_p_T_r_a_i_t_s > {}; │ │ │ │ -180 │ │ │ │ -181} // namespace gtsam │ │ │ │ -182 │ │ │ │ -_L_i_e_._h │ │ │ │ -Base class and basic functions for Lie types. │ │ │ │ +162 }; │ │ │ │ +163 │ │ │ │ +164} // \namespace gtsam │ │ │ │ +165 │ │ │ │ +_1_7_5#define GTSAM_CONCEPT_TESTABLE_INST(T) template class gtsam::IsTestable; │ │ │ │ +176#define GTSAM_CONCEPT_TESTABLE_TYPE(T) using _gtsam_Testable_##T = gtsam:: │ │ │ │ +IsTestable; │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ +_g_t_s_a_m_:_:_a_s_s_e_r_t___e_q_u_a_l │ │ │ │ +bool assert_equal(const Matrix &expected, const Matrix &actual, double tol) │ │ │ │ +equals with an tolerance, prints out message if unequal │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:43 │ │ │ │ +_g_t_s_a_m_:_:_p_r_i_n_t │ │ │ │ +void print(const Matrix &A, const string &s, ostream &stream) │ │ │ │ +print without optional string, must specify cout yourself │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:156 │ │ │ │ +_g_t_s_a_m_:_:_e_q_u_a_l │ │ │ │ +bool equal(const T &obj1, const T &obj2, double tol) │ │ │ │ +Call equal on the object. │ │ │ │ +DDeeffiinniittiioonn Testable.h:84 │ │ │ │ _g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ that can be centered ... │ │ │ │ DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p_T_r_a_i_t_s │ │ │ │ -A helper class that implements the traits interface for GTSAM lie groups. │ │ │ │ -DDeeffiinniittiioonn Lie.h:174 │ │ │ │ -_g_t_s_a_m_:_:_I_s_L_i_e_G_r_o_u_p │ │ │ │ -Lie Group Concept. │ │ │ │ -DDeeffiinniittiioonn Lie.h:260 │ │ │ │ -_g_t_s_a_m_:_:_P_r_o_d_u_c_t_L_i_e_G_r_o_u_p │ │ │ │ -Template to construct the product Lie group of two other Lie groups Assumes Lie │ │ │ │ -group structure for G... │ │ │ │ -DDeeffiinniittiioonn ProductLieGroup.h:29 │ │ │ │ -_g_t_s_a_m_:_:_P_r_o_d_u_c_t_L_i_e_G_r_o_u_p_:_:_P_r_o_d_u_c_t_L_i_e_G_r_o_u_p │ │ │ │ -ProductLieGroup() │ │ │ │ -Default constructor yields identity. │ │ │ │ -DDeeffiinniittiioonn ProductLieGroup.h:40 │ │ │ │ +_g_t_s_a_m_:_:_I_s_T_e_s_t_a_b_l_e │ │ │ │ +A testable concept check that should be placed in applicable unit tests and in │ │ │ │ +generic algorithms. │ │ │ │ +DDeeffiinniittiioonn Testable.h:58 │ │ │ │ +_g_t_s_a_m_:_:_e_q_u_a_l_s │ │ │ │ +Template to create a binary predicate. │ │ │ │ +DDeeffiinniittiioonn Testable.h:111 │ │ │ │ +_g_t_s_a_m_:_:_e_q_u_a_l_s___s_t_a_r │ │ │ │ +Binary predicate on shared pointers. │ │ │ │ +DDeeffiinniittiioonn Testable.h:123 │ │ │ │ +_g_t_s_a_m_:_:_H_a_s_T_e_s_t_a_b_l_e_P_r_e_r_e_q_s │ │ │ │ +Requirements on type to pass it to Testable template below. │ │ │ │ +DDeeffiinniittiioonn Testable.h:134 │ │ │ │ +_g_t_s_a_m_:_:_T_e_s_t_a_b_l_e │ │ │ │ +A helper that implements the traits interface for GTSAM types. │ │ │ │ +DDeeffiinniittiioonn Testable.h:151 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _P_r_o_d_u_c_t_L_i_e_G_r_o_u_p_._h │ │ │ │ + * _T_e_s_t_a_b_l_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00101.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/OptionalJacobian.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Matrix.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,55 +94,159 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
OptionalJacobian.h File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
Matrix.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Special class for optional Jacobian arguments. │ │ │ +

matrix class │ │ │ More...

│ │ │ - │ │ │ -

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  gtsam::OptionalJacobian< Rows, Cols >
 OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size or dynamic Eigen matrix. More...
 
class  gtsam::OptionalJacobian< Eigen::Dynamic, Eigen::Dynamic >
 
struct  gtsam::MakeJacobian< T, A >
 : meta-function to generate Jacobian More...
 
struct  gtsam::MakeOptionalJacobian< T, A >
 : meta-function to generate JacobianTA optional reference Used mainly by Expressions More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

│ │ │ +bool gtsam::assert_equal (const Matrix &A, const Matrix &B, double tol=1e-9)
 equals with an tolerance, prints out message if unequal
 
│ │ │ +bool gtsam::assert_inequal (const Matrix &A, const Matrix &B, double tol=1e-9)
 inequals with an tolerance, prints out message if within tolerance
 
│ │ │ +bool gtsam::assert_equal (const std::list< Matrix > &As, const std::list< Matrix > &Bs, double tol=1e-9)
 equals with an tolerance, prints out message if unequal
 
│ │ │ +bool gtsam::linear_independent (const Matrix &A, const Matrix &B, double tol=1e-9)
 check whether the rows of two matrices are linear independent
 
│ │ │ +bool gtsam::linear_dependent (const Matrix &A, const Matrix &B, double tol=1e-9)
 check whether the rows of two matrices are linear dependent
 
│ │ │ +Vector gtsam::operator^ (const Matrix &A, const Vector &v)
 overload ^ for trans(A)*v We transpose the vectors for speed.
 
│ │ │ +const Eigen::IOFormat & gtsam::matlabFormat ()
 
│ │ │ +void gtsam::print (const Matrix &A, const std::string &s, std::ostream &stream)
 print without optional string, must specify cout yourself
 
│ │ │ +void gtsam::print (const Matrix &A, const std::string &s="")
 print with optional string to cout
 
│ │ │ +void gtsam::save (const Matrix &A, const std::string &s, const std::string &filename)
 save a matrix to file, which can be loaded by matlab
 
istream & gtsam::operator>> (std::istream &inputStream, Matrix &destinationMatrix)
 Read a matrix from an input stream, such as a file.
 
│ │ │ +Matrix gtsam::diag (const std::vector< Matrix > &Hs)
 Create a matrix with submatrices along its diagonal.
 
│ │ │ +Vector gtsam::columnNormSquare (const Matrix &A)
 
pair< Matrix, Matrix > gtsam::qr (const Matrix &A)
 Householder QR factorization, Golub & Van Loan p 224, explicit version
│ │ │ +
 
list< boost::tuple< Vector, double, double > > gtsam::weighted_eliminate (Matrix &A, Vector &b, const Vector &sigmas)
 Imperative algorithm for in-place full elimination with weights and constraint handling.
 
void gtsam::householder_ (Matrix &A, size_t k, bool copy_vectors)
 Imperative version of Householder QR factorization, Golub & Van Loan p 224 version with Householder vectors below diagonal, as in GVL.
 
void gtsam::householder (Matrix &A, size_t k)
 Householder tranformation, zeros below diagonal.
 
Vector gtsam::backSubstituteLower (const Matrix &L, const Vector &b, bool unit=false)
 backSubstitute L*x=b
 
Vector gtsam::backSubstituteUpper (const Matrix &U, const Vector &b, bool unit=false)
 backSubstitute U*x=b
 
Vector gtsam::backSubstituteUpper (const Vector &b, const Matrix &U, bool unit=false)
 backSubstitute x'*U=b'
 
Matrix gtsam::stack (size_t nrMatrices,...)
 create a matrix by stacking other matrices Given a set of matrices: A1, A2, A3...
 
│ │ │ +Matrix gtsam::stack (const std::vector< Matrix > &blocks)
 
Matrix gtsam::collect (const std::vector< const Matrix * > &matrices, size_t m=0, size_t n=0)
 create a matrix by concatenating Given a set of matrices: A1, A2, A3... If all matrices have the same size, specifying single matrix dimensions will avoid the lookup of dimensions
 
│ │ │ +Matrix gtsam::collect (size_t nrMatrices,...)
 
void gtsam::vector_scale_inplace (const Vector &v, Matrix &A, bool inf_mask=false)
 scales a matrix row or column by the values in a vector Arguments (Matrix, Vector) scales the columns, (Vector, Matrix) scales the rows
 
│ │ │ +Matrix gtsam::vector_scale (const Vector &v, const Matrix &A, bool inf_mask)
 
│ │ │ +Matrix gtsam::vector_scale (const Matrix &A, const Vector &v, bool inf_mask)
 
│ │ │ +Matrix gtsam::LLt (const Matrix &A)
 
│ │ │ +Matrix gtsam::RtR (const Matrix &A)
 
Matrix gtsam::cholesky_inverse (const Matrix &A)
 Return the inverse of a S.P.D.
 
│ │ │ +Matrix gtsam::inverse_square_root (const Matrix &A)
 Use Cholesky to calculate inverse square root of a matrix.
 
void gtsam::svd (const Matrix &A, Matrix &U, Vector &S, Matrix &V)
 SVD computes economy SVD A=U*S*V'.
 
boost::tuple< int, double, Vector > gtsam::DLT (const Matrix &A, double rank_tol=1e-9)
 Direct linear transform algorithm that calls svd to find a vector v that minimizes the algebraic error A*v.
 
Matrix gtsam::expm (const Matrix &A, size_t K=7)
 Numerical exponential map, naive approach, not industrial strength !!!
 
│ │ │ +std::string gtsam::formatMatrixIndented (const std::string &label, const Matrix &matrix, bool makeVectorHorizontal)
 
void gtsam::inplace_QR (Matrix &A)
 QR factorization using Eigen's internal block QR algorithm.
 
│ │ │

Detailed Description

│ │ │ -

Special class for optional Jacobian arguments.

│ │ │ -
Author
Frank Dellaert
│ │ │ -
│ │ │ -Natesh Srinivasan
│ │ │ -
Date
Nov 28, 2014
│ │ │ +

matrix class

│ │ │ +
Author
Christian Potthast
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,38 +1,179 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -OptionalJacobian.h File Reference │ │ │ │ -Special class for optional Jacobian arguments. _M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_ _R_o_w_s_,_ _C_o_l_s_ _> │ │ │ │ -  _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n is an Eigen::Ref like class that can take be │ │ │ │ - constructed using either a fixed size or dynamic Eigen matrix. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ - class   _g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_,_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_M_a_k_e_J_a_c_o_b_i_a_n_<_ _T_,_ _A_ _> │ │ │ │ -  : meta-function to generate Jacobian _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_M_a_k_e_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_ _T_,_ _A_ _> │ │ │ │ -  : meta-function to generate JacobianTA optional reference Used mainly │ │ │ │ - by Expressions _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Matrix.cpp File Reference │ │ │ │ +matrix class _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +FFuunnccttiioonnss │ │ │ │ + bool  ggttssaamm::::aasssseerrtt__eeqquuaall (const Matrix &A, │ │ │ │ + const Matrix &B, double tol=1e-9) │ │ │ │ +  equals with an tolerance, prints out │ │ │ │ + message if unequal │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::aasssseerrtt__iinneeqquuaall (const Matrix &A, │ │ │ │ + const Matrix &B, double tol=1e-9) │ │ │ │ +  inequals with an tolerance, prints out │ │ │ │ + message if within tolerance │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::aasssseerrtt__eeqquuaall (const std::list< │ │ │ │ + Matrix > &As, const std::list< Matrix > │ │ │ │ + &Bs, double tol=1e-9) │ │ │ │ +  equals with an tolerance, prints out │ │ │ │ + message if unequal │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::lliinneeaarr__iinnddeeppeennddeenntt (const Matrix │ │ │ │ + &A, const Matrix &B, double tol=1e-9) │ │ │ │ +  check whether the rows of two matrices are │ │ │ │ + linear independent │ │ │ │ +  │ │ │ │ + bool  ggttssaamm::::lliinneeaarr__ddeeppeennddeenntt (const Matrix &A, │ │ │ │ + const Matrix &B, double tol=1e-9) │ │ │ │ +  check whether the rows of two matrices are │ │ │ │ + linear dependent │ │ │ │ +  │ │ │ │ + Vector  ggttssaamm::::ooppeerraattoorr^^ (const Matrix &A, const │ │ │ │ + Vector &v) │ │ │ │ +  overload ^ for trans(A)*v We transpose the │ │ │ │ + vectors for speed. │ │ │ │ +  │ │ │ │ + const Eigen::IOFormat &  ggttssaamm::::mmaattllaabbFFoorrmmaatt () │ │ │ │ +  │ │ │ │ + void  ggttssaamm::::pprriinntt (const Matrix &A, const std:: │ │ │ │ + string &s, std::ostream &stream) │ │ │ │ +  print without optional string, must │ │ │ │ + specify cout yourself │ │ │ │ +  │ │ │ │ + void  ggttssaamm::::pprriinntt (const Matrix &A, const std:: │ │ │ │ + string &s="") │ │ │ │ +  print with optional string to cout │ │ │ │ +  │ │ │ │ + void  ggttssaamm::::ssaavvee (const Matrix &A, const std:: │ │ │ │ + string &s, const std::string &filename) │ │ │ │ +  save a matrix to file, which can be loaded │ │ │ │ + by matlab │ │ │ │ +  │ │ │ │ + istream &  _g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_>_> (std::istream │ │ │ │ + &inputStream, Matrix &destinationMatrix) │ │ │ │ +  Read a matrix from an input stream, such │ │ │ │ + as a file. │ │ │ │ +  │ │ │ │ + Matrix  ggttssaamm::::ddiiaagg (const std::vector< Matrix > │ │ │ │ + &Hs) │ │ │ │ +  Create a matrix with submatrices along its │ │ │ │ + diagonal. │ │ │ │ +  │ │ │ │ + Vector  ggttssaamm::::ccoolluummnnNNoorrmmSSqquuaarree (const Matrix &A) │ │ │ │ +  │ │ │ │ + pair< Matrix, Matrix >  _g_t_s_a_m_:_:_q_r (const Matrix &A) │ │ │ │ + Householder QR factorization, Golub & Van │ │ │ │ +  Loan p 224, explicit version │ │ │ │ + │ │ │ │ +  │ │ │ │ + list< boost::tuple< Vector, double, _g_t_s_a_m_:_:_w_e_i_g_h_t_e_d___e_l_i_m_i_n_a_t_e (Matrix &A, │ │ │ │ + double > >  Vector &b, const Vector &sigmas) │ │ │ │ + Imperative algorithm for in-place full │ │ │ │ +  elimination with weights and constraint │ │ │ │ + handling. │ │ │ │ +  │ │ │ │ + void  _g_t_s_a_m_:_:_h_o_u_s_e_h_o_l_d_e_r__ (Matrix &A, size_t k, │ │ │ │ + bool copy_vectors) │ │ │ │ + Imperative version of Householder QR │ │ │ │ +  factorization, Golub & Van Loan p 224 │ │ │ │ + version with Householder vectors below │ │ │ │ + diagonal, as in GVL. │ │ │ │ +  │ │ │ │ + void  _g_t_s_a_m_:_:_h_o_u_s_e_h_o_l_d_e_r (Matrix &A, size_t k) │ │ │ │ +  Householder tranformation, zeros below │ │ │ │ + diagonal. │ │ │ │ +  │ │ │ │ + Vector  _g_t_s_a_m_:_:_b_a_c_k_S_u_b_s_t_i_t_u_t_e_L_o_w_e_r (const Matrix │ │ │ │ + &L, const Vector &b, bool unit=false) │ │ │ │ +  backSubstitute L*x=b │ │ │ │ +  │ │ │ │ + Vector  _g_t_s_a_m_:_:_b_a_c_k_S_u_b_s_t_i_t_u_t_e_U_p_p_e_r (const Matrix │ │ │ │ + &U, const Vector &b, bool unit=false) │ │ │ │ +  backSubstitute U*x=b │ │ │ │ +  │ │ │ │ + Vector  _g_t_s_a_m_:_:_b_a_c_k_S_u_b_s_t_i_t_u_t_e_U_p_p_e_r (const Vector │ │ │ │ + &b, const Matrix &U, bool unit=false) │ │ │ │ +  backSubstitute x'*U=b' │ │ │ │ +  │ │ │ │ + Matrix  _g_t_s_a_m_:_:_s_t_a_c_k (size_t nrMatrices,...) │ │ │ │ +  create a matrix by stacking other matrices │ │ │ │ + Given a set of matrices: A1, A2, A3... │ │ │ │ +  │ │ │ │ + Matrix  ggttssaamm::::ssttaacckk (const std::vector< Matrix > │ │ │ │ + &blocks) │ │ │ │ +  │ │ │ │ + Matrix  _g_t_s_a_m_:_:_c_o_l_l_e_c_t (const std::vector< const │ │ │ │ + Matrix * > &matrices, size_t m=0, size_t │ │ │ │ + n=0) │ │ │ │ + create a matrix by concatenating Given a │ │ │ │ + set of matrices: A1, A2, A3... If all │ │ │ │ +  matrices have the same size, specifying │ │ │ │ + single matrix dimensions will avoid the │ │ │ │ + lookup of dimensions │ │ │ │ +  │ │ │ │ + Matrix  ggttssaamm::::ccoolllleecctt (size_t nrMatrices,...) │ │ │ │ +  │ │ │ │ + void  _g_t_s_a_m_:_:_v_e_c_t_o_r___s_c_a_l_e___i_n_p_l_a_c_e (const Vector │ │ │ │ + &v, Matrix &A, bool inf_mask=false) │ │ │ │ + scales a matrix row or column by the │ │ │ │ +  values in a vector Arguments (Matrix, │ │ │ │ + Vector) scales the columns, (Vector, │ │ │ │ + Matrix) scales the rows │ │ │ │ +  │ │ │ │ + Matrix  ggttssaamm::::vveeccttoorr__ssccaallee (const Vector &v, │ │ │ │ + const Matrix &A, bool inf_mask) │ │ │ │ +  │ │ │ │ + Matrix  ggttssaamm::::vveeccttoorr__ssccaallee (const Matrix &A, │ │ │ │ + const Vector &v, bool inf_mask) │ │ │ │ +  │ │ │ │ + Matrix  ggttssaamm::::LLLLtt (const Matrix &A) │ │ │ │ +  │ │ │ │ + Matrix  ggttssaamm::::RRttRR (const Matrix &A) │ │ │ │ +  │ │ │ │ + Matrix  _g_t_s_a_m_:_:_c_h_o_l_e_s_k_y___i_n_v_e_r_s_e (const Matrix &A) │ │ │ │ +  Return the inverse of a S.P.D. │ │ │ │ +  │ │ │ │ + Matrix  ggttssaamm::::iinnvveerrssee__ssqquuaarree__rroooott (const Matrix │ │ │ │ + &A) │ │ │ │ +  Use Cholesky to calculate inverse square │ │ │ │ + root of a matrix. │ │ │ │ +  │ │ │ │ + void  _g_t_s_a_m_:_:_s_v_d (const Matrix &A, Matrix &U, │ │ │ │ + Vector &S, Matrix &V) │ │ │ │ +  SVD computes economy SVD A=U*S*V'. │ │ │ │ +  │ │ │ │ +boost::tuple< int, double, Vector >  _g_t_s_a_m_:_:_D_L_T (const Matrix &A, double │ │ │ │ + rank_tol=1e-9) │ │ │ │ + Direct linear transform algorithm that │ │ │ │ +  calls svd to find a vector v that │ │ │ │ + minimizes the algebraic error A*v. │ │ │ │ +  │ │ │ │ + Matrix  _g_t_s_a_m_:_:_e_x_p_m (const Matrix &A, size_t K=7) │ │ │ │ +  Numerical exponential map, naive approach, │ │ │ │ + not industrial strength !!! │ │ │ │ +  │ │ │ │ + std::string  ggttssaamm::::ffoorrmmaattMMaattrriixxIInnddeenntteedd (const std:: │ │ │ │ + string &label, const Matrix &matrix, bool │ │ │ │ + makeVectorHorizontal) │ │ │ │ +  │ │ │ │ + void  _g_t_s_a_m_:_:_i_n_p_l_a_c_e___Q_R (Matrix &A) │ │ │ │ +  QR factorization using Eigen's internal │ │ │ │ + block QR algorithm. │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Special class for optional Jacobian arguments. │ │ │ │ +matrix class │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ - Natesh Srinivasan │ │ │ │ - Date │ │ │ │ - Nov 28, 2014 │ │ │ │ + Christian Potthast │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h │ │ │ │ + * _M_a_t_r_i_x_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00101.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,6 +1,29 @@ │ │ │ │ var a00101 = [ │ │ │ │ - ["gtsam::OptionalJacobian< Rows, Cols >", "a02448.html", "a02448"], │ │ │ │ - ["gtsam::OptionalJacobian< Eigen::Dynamic, Eigen::Dynamic >", "a02452.html", "a02452"], │ │ │ │ - ["gtsam::MakeJacobian< T, A >", "a02456.html", null], │ │ │ │ - ["gtsam::MakeOptionalJacobian< T, A >", "a02460.html", null] │ │ │ │ + ["assert_equal", "a00101.html#a3f9622226dfe06908f11b42bf0bdd22d", null], │ │ │ │ + ["assert_equal", "a00101.html#abb0e19bbbeaca95843e8161b89a12fda", null], │ │ │ │ + ["assert_inequal", "a00101.html#a7a116d0643f123ef3b15d91056506492", null], │ │ │ │ + ["backSubstituteLower", "a00101.html#a0d998e1b770c9864946ddb031b1c4522", null], │ │ │ │ + ["backSubstituteUpper", "a00101.html#a6c4876cbe85d5651a52eda0e97c60f2f", null], │ │ │ │ + ["backSubstituteUpper", "a00101.html#a8b0bf332d52b333dab2b20d763c8925b", null], │ │ │ │ + ["cholesky_inverse", "a00101.html#aba542e2cd85f08b76f80a0871a4ea713", null], │ │ │ │ + ["collect", "a00101.html#ad8b524ba6c9aed0d21a020999c9b5d88", null], │ │ │ │ + ["diag", "a00101.html#af1c32907adce74cf9edd6ee5bba5a085", null], │ │ │ │ + ["DLT", "a00101.html#ab2c65f1a69009a306b6a5f9ef31dcee2", null], │ │ │ │ + ["expm", "a00101.html#ab15462d8c16813d0a7a5b1f76a2f64b7", null], │ │ │ │ + ["householder", "a00101.html#a7baa2f3184a444adce108633c0265e0c", null], │ │ │ │ + ["householder_", "a00101.html#abdd1ab05e8ac90b340fbd8f3b322dc6d", null], │ │ │ │ + ["inplace_QR", "a00101.html#a7eec9339ab5a008a28ddfaa6b2c94611", null], │ │ │ │ + ["inverse_square_root", "a00101.html#aff78dee59ac0250432081f39deb5f6d1", null], │ │ │ │ + ["linear_dependent", "a00101.html#a4b81794af72954abafbb726fc712f5db", null], │ │ │ │ + ["linear_independent", "a00101.html#ad8f0349471464c1fb515819d9503849a", null], │ │ │ │ + ["operator>>", "a00101.html#a7d85957bab2d18cf56ab9aaf95a106de", null], │ │ │ │ + ["operator^", "a00101.html#a2218e53a2b99c449e70aa5b7805895fc", null], │ │ │ │ + ["print", "a00101.html#a54fa43c89c5334314c8c75939dd5c2d7", null], │ │ │ │ + ["print", "a00101.html#a44ead03912d5dcf094d8421e1702ee71", null], │ │ │ │ + ["qr", "a00101.html#ae32c295e2c40c1e85f146a8a6266eaa8", null], │ │ │ │ + ["save", "a00101.html#a3eb7eed9019d3fda8fcf74fbf85b85c9", null], │ │ │ │ + ["stack", "a00101.html#a5c82884a356ddd09229a5283aed04df9", null], │ │ │ │ + ["svd", "a00101.html#a8d7e46204d953f64a39445599dbd7eee", null], │ │ │ │ + ["vector_scale_inplace", "a00101.html#a24d3ad0252f91f0ec301593c45cf5af7", null], │ │ │ │ + ["weighted_eliminate", "a00101.html#a60019a03f26b92c6b2a08e43d153d4c0", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00104.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/MatrixSerialization.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Group.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,94 +94,119 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Functions
│ │ │ -
MatrixSerialization.h File Reference
│ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Functions | │ │ │ +Variables
│ │ │ +
Group.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Serialization for matrices. │ │ │ +

Concept check class for variable types with Group properties. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

struct  gtsam::group_tag
 tag to assert a type is a group More...
 
struct  gtsam::multiplicative_group_tag
 Group operator syntax flavors. More...
 
struct  gtsam::additive_group_tag
 
class  gtsam::IsGroup< G >
 Group Concept. More...
 
class  gtsam::DirectProduct
 
struct  gtsam::traits< DirectProduct< G, H > >
 
class  gtsam::DirectSum< G, H >
 Template to construct the direct sum of two additive groups Assumes existence of three additive operators for both groups. More...
 
struct  gtsam::traits< DirectSum< G, H > >
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Macros

#define GTSAM_CONCEPT_GROUP_INST(T)   template class gtsam::IsGroup<T>;
 Macros for using the IsGroup.
 
│ │ │ +#define GTSAM_CONCEPT_GROUP_TYPE(T)   typedef gtsam::IsGroup<T> _gtsam_IsGroup_##T;
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ Functions

template<class Archive , typename Scalar_ , int Rows_, int Cols_, int Ops_, int MaxRows_, int MaxCols_>
void boost::serialization::save (Archive &ar, const Eigen::Matrix< Scalar_, Rows_, Cols_, Ops_, MaxRows_, MaxCols_ > &m, const unsigned int)
 Ref.
 
│ │ │ -template<class Archive , typename Scalar_ , int Rows_, int Cols_, int Ops_, int MaxRows_, int MaxCols_>
void boost::serialization::load (Archive &ar, Eigen::Matrix< Scalar_, Rows_, Cols_, Ops_, MaxRows_, MaxCols_ > &m, const unsigned int)
 
│ │ │ -template<class Archive , typename Scalar_ , int Rows_, int Cols_, int Ops_, int MaxRows_, int MaxCols_>
void boost::serialization::serialize (Archive &ar, Eigen::Matrix< Scalar_, Rows_, Cols_, Ops_, MaxRows_, MaxCols_ > &m, const unsigned int version)
 
│ │ │ -template<class Archive >
void boost::serialization::serialize (Archive &ar, gtsam::Matrix &m, const unsigned int version)
 
│ │ │ +template<typename G >
 gtsam::BOOST_CONCEPT_REQUIRES (((IsGroup< G >)),(bool)) check_group_invariants(const G &a
 Check invariants.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Variables

│ │ │ +const G & gtsam::b
 
│ │ │ +const G double gtsam::tol
 
│ │ │

Detailed Description

│ │ │ -

Serialization for matrices.

│ │ │ -
Author
Frank Dellaert
│ │ │ -
Date
February 2022
│ │ │ -

Function Documentation

│ │ │ - │ │ │ -

◆ save()

│ │ │ +

Concept check class for variable types with Group properties.

│ │ │ +
Date
November, 2011
│ │ │ +
Author
Alex Cunningham
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ GTSAM_CONCEPT_GROUP_INST

│ │ │ │ │ │
│ │ │
│ │ │ -
│ │ │ -template<class Archive , typename Scalar_ , int Rows_, int Cols_, int Ops_, int MaxRows_, int MaxCols_>
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │
void boost::serialization::save #define GTSAM_CONCEPT_GROUP_INST(Archive & ar,
const Eigen::Matrix< Scalar_, Rows_, Cols_, Ops_, MaxRows_, MaxCols_ > & m,
const unsigned int  
) T)   template class gtsam::IsGroup<T>;
│ │ │
│ │ │ │ │ │ -

Ref.

│ │ │ -

https://stackoverflow.com/questions/18382457/eigen-and-boostserialize/22903063#22903063

│ │ │ -

Eigen supports calling resize() on both static and dynamic matrices. This allows for a uniform API, with resize having no effect if the static matrix is already the correct size. https://eigen.tuxfamily.org/dox/group__TutorialMatrixClass.html#TutorialMatrixSizesResizing

│ │ │ -

We use all the Matrix template parameters to ensure wide compatibility.

│ │ │ -

eigen_typekit in ROS uses the same code http://docs.ros.org/lunar/api/eigen_typekit/html/eigen__mqueue_8cpp_source.html

│ │ │ +

Macros for using the IsGroup.

│ │ │ +
    │ │ │ +
  • An instantiation for use inside unit tests
  • │ │ │ +
  • A typedef for use inside generic algorithms
  • │ │ │ +
│ │ │ +

NOTE: intentionally not in the gtsam namespace to allow for classes not in the gtsam namespace to be more easily enforced as testable

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,59 +1,72 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_F_u_n_c_t_i_o_n_s │ │ │ │ -MatrixSerialization.h File Reference │ │ │ │ -Serialization for matrices. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ +Group.h File Reference │ │ │ │ +Concept check class for variable types with Group properties. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +struct   _g_t_s_a_m_:_:_g_r_o_u_p___t_a_g │ │ │ │ +  tag to assert a type is a group _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_m_u_l_t_i_p_l_i_c_a_t_i_v_e___g_r_o_u_p___t_a_g │ │ │ │ +  Group operator syntax flavors. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_a_d_d_i_t_i_v_e___g_r_o_u_p___t_a_g │ │ │ │ +  │ │ │ │ + class   _g_t_s_a_m_:_:_I_s_G_r_o_u_p_<_ _G_ _> │ │ │ │ +  Group Concept. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ + class   _g_t_s_a_m_:_:_D_i_r_e_c_t_P_r_o_d_u_c_t │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_i_r_e_c_t_P_r_o_d_u_c_t_<_ _G_,_ _H_ _>_ _> │ │ │ │ +  │ │ │ │ + class   _g_t_s_a_m_:_:_D_i_r_e_c_t_S_u_m_<_ _G_,_ _H_ _> │ │ │ │ +  Template to construct the direct sum of two additive groups Assumes │ │ │ │ + existence of three additive operators for both groups. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_i_r_e_c_t_S_u_m_<_ _G_,_ _H_ _>_ _> │ │ │ │ +  │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _g_t_s_a_m │ │ │ │ +  Global functions in a separate testing namespace. │ │ │ │ +  │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  _G_T_S_A_M___C_O_N_C_E_P_T___G_R_O_U_P___I_N_S_T(T)   template class _g_t_s_a_m_:_:_I_s_G_r_o_u_p; │ │ │ │ +  Macros for using the IsGroup. │ │ │ │ +  │ │ │ │ +#define  GGTTSSAAMM__CCOONNCCEEPPTT__GGRROOUUPP__TTYYPPEE(T)   typedef _g_t_s_a_m_:_:_I_s_G_r_o_u_p │ │ │ │ + _gtsam_IsGroup_##T; │ │ │ │ +  │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -void  _b_o_o_s_t_:_:_s_e_r_i_a_l_i_z_a_t_i_o_n_:_:_s_a_v_e (Archive &ar, const Eigen::Matrix< Scalar_, │ │ │ │ - Rows_, Cols_, Ops_, MaxRows_, MaxCols_ > &m, const unsigned int) │ │ │ │ -  Ref. │ │ │ │ -  │ │ │ │ -template │ │ │ │ -void  bboooosstt::::sseerriiaalliizzaattiioonn::::llooaadd (Archive &ar, Eigen::Matrix< Scalar_, Rows_, │ │ │ │ - Cols_, Ops_, MaxRows_, MaxCols_ > &m, const unsigned int) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -void  bboooosstt::::sseerriiaalliizzaattiioonn::::sseerriiaalliizzee (Archive &ar, Eigen::Matrix< Scalar_, │ │ │ │ - Rows_, Cols_, Ops_, MaxRows_, MaxCols_ > &m, const unsigned int version) │ │ │ │ -  │ │ │ │ -template │ │ │ │ -void  bboooosstt::::sseerriiaalliizzaattiioonn::::sseerriiaalliizzee (Archive &ar, gtsam::Matrix &m, const │ │ │ │ - unsigned int version) │ │ │ │ +template │ │ │ │ +  ggttssaamm::::BBOOOOSSTT__CCOONNCCEEPPTT__RREEQQUUIIRREESS (((_I_s_G_r_o_u_p< G >)),(bool)) │ │ │ │ + check_group_invariants(const G &a │ │ │ │ +  Check invariants. │ │ │ │ +  │ │ │ │ +VVaarriiaabblleess │ │ │ │ + const G &  ggttssaamm::::bb │ │ │ │ +  │ │ │ │ +const G double  ggttssaamm::::ttooll │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Serialization for matrices. │ │ │ │ +Concept check class for variable types with Group properties. │ │ │ │ + Date │ │ │ │ + November, 2011 │ │ │ │ Author │ │ │ │ + Alex Cunningham │ │ │ │ Frank Dellaert │ │ │ │ - Date │ │ │ │ - February 2022 │ │ │ │ -********** FFuunnccttiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? ssaavvee(()) ********** │ │ │ │ -template │ │ │ │ -void boost::serialization::save ( Archive &  aarr, │ │ │ │ - const Eigen::Matrix< Scalar_, Rows_, mm, │ │ │ │ - Cols_, Ops_, MaxRows_, MaxCols_ > &  │ │ │ │ - const unsigned int    │ │ │ │ - ) │ │ │ │ -Ref. │ │ │ │ -_h_t_t_p_s_:_/_/_s_t_a_c_k_o_v_e_r_f_l_o_w_._c_o_m_/_q_u_e_s_t_i_o_n_s_/_1_8_3_8_2_4_5_7_/_e_i_g_e_n_-_a_n_d_-_b_o_o_s_t_s_e_r_i_a_l_i_z_e_/ │ │ │ │ -_2_2_9_0_3_0_6_3_#_2_2_9_0_3_0_6_3 │ │ │ │ -Eigen supports calling resize() on both static and dynamic matrices. This │ │ │ │ -allows for a uniform API, with resize having no effect if the static matrix is │ │ │ │ -already the correct size. _h_t_t_p_s_:_/_/_e_i_g_e_n_._t_u_x_f_a_m_i_l_y_._o_r_g_/_d_o_x_/ │ │ │ │ -_g_r_o_u_p_____T_u_t_o_r_i_a_l_M_a_t_r_i_x_C_l_a_s_s_._h_t_m_l_#_T_u_t_o_r_i_a_l_M_a_t_r_i_x_S_i_z_e_s_R_e_s_i_z_i_n_g │ │ │ │ -We use all the Matrix template parameters to ensure wide compatibility. │ │ │ │ -eigen_typekit in ROS uses the same code _h_t_t_p_:_/_/_d_o_c_s_._r_o_s_._o_r_g_/_l_u_n_a_r_/_a_p_i_/ │ │ │ │ -_e_i_g_e_n___t_y_p_e_k_i_t_/_h_t_m_l_/_e_i_g_e_n_____m_q_u_e_u_e___8_c_p_p___s_o_u_r_c_e_._h_t_m_l │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? GGTTSSAAMM__CCOONNCCEEPPTT__GGRROOUUPP__IINNSSTT ********** │ │ │ │ +#define GTSAM_CONCEPT_GROUP_INST (   T )    template class _g_t_s_a_m_:_:_I_s_G_r_o_u_p; │ │ │ │ +Macros for using the IsGroup. │ │ │ │ + * An instantiation for use inside unit tests │ │ │ │ + * A typedef for use inside generic algorithms │ │ │ │ +NOTE: intentionally not in the gtsam namespace to allow for classes not in the │ │ │ │ +gtsam namespace to be more easily enforced as testable │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _M_a_t_r_i_x_S_e_r_i_a_l_i_z_a_t_i_o_n_._h │ │ │ │ + * _G_r_o_u_p_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00104.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,12 @@ │ │ │ │ var a00104 = [ │ │ │ │ - ["save", "a00104.html#a068f1f8df2afd609744bc82386259e71", null] │ │ │ │ + ["gtsam::group_tag", "a02332.html", null], │ │ │ │ + ["gtsam::multiplicative_group_tag", "a02336.html", null], │ │ │ │ + ["gtsam::additive_group_tag", "a02340.html", null], │ │ │ │ + ["gtsam::IsGroup< G >", "a02344.html", null], │ │ │ │ + ["gtsam::DirectProduct", "a02348.html", "a02348"], │ │ │ │ + ["gtsam::traits< DirectProduct< G, H > >", "a02352.html", null], │ │ │ │ + ["gtsam::DirectSum< G, H >", "a02356.html", "a02356"], │ │ │ │ + ["gtsam::traits< DirectSum< G, H > >", "a02360.html", null], │ │ │ │ + ["GTSAM_CONCEPT_GROUP_INST", "a00104.html#aac1ea136475ea605715c809f4b3f0156", null], │ │ │ │ + ["BOOST_CONCEPT_REQUIRES", "a00104.html#a2e95b5b5508cf3284107e979401bd1a4", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00104_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/MatrixSerialization.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Group.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,91 +98,220 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
MatrixSerialization.h
│ │ │ +
Group.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
19// \callgraph
│ │ │ -
20
│ │ │
21#pragma once
│ │ │
22
│ │ │ -
23#include <gtsam/base/Matrix.h>
│ │ │ +
23#include <gtsam/base/Testable.h>
│ │ │
24
│ │ │ -
25#include <boost/serialization/array.hpp>
│ │ │ -
26#include <boost/serialization/nvp.hpp>
│ │ │ -
27#include <boost/serialization/split_free.hpp>
│ │ │ -
28
│ │ │ -
29namespace boost {
│ │ │ -
30namespace serialization {
│ │ │ -
31
│ │ │ -
47// split version - sends sizes ahead
│ │ │ -
48template <class Archive, typename Scalar_, int Rows_, int Cols_, int Ops_,
│ │ │ -
49 int MaxRows_, int MaxCols_>
│ │ │ -
│ │ │ -
50void save(
│ │ │ -
51 Archive& ar,
│ │ │ -
52 const Eigen::Matrix<Scalar_, Rows_, Cols_, Ops_, MaxRows_, MaxCols_>& m,
│ │ │ -
53 const unsigned int /*version*/) {
│ │ │ -
54 const size_t rows = m.rows(), cols = m.cols();
│ │ │ -
55 ar << BOOST_SERIALIZATION_NVP(rows);
│ │ │ -
56 ar << BOOST_SERIALIZATION_NVP(cols);
│ │ │ -
57 ar << make_nvp("data", make_array(m.data(), m.size()));
│ │ │ -
58}
│ │ │ -
│ │ │ -
59
│ │ │ -
60template <class Archive, typename Scalar_, int Rows_, int Cols_, int Ops_,
│ │ │ -
61 int MaxRows_, int MaxCols_>
│ │ │ -
62void load(Archive& ar,
│ │ │ -
63 Eigen::Matrix<Scalar_, Rows_, Cols_, Ops_, MaxRows_, MaxCols_>& m,
│ │ │ -
64 const unsigned int /*version*/) {
│ │ │ -
65 size_t rows, cols;
│ │ │ -
66 ar >> BOOST_SERIALIZATION_NVP(rows);
│ │ │ -
67 ar >> BOOST_SERIALIZATION_NVP(cols);
│ │ │ -
68 m.resize(rows, cols);
│ │ │ -
69 ar >> make_nvp("data", make_array(m.data(), m.size()));
│ │ │ -
70}
│ │ │ -
71
│ │ │ -
72// templated version of BOOST_SERIALIZATION_SPLIT_FREE(Eigen::Matrix);
│ │ │ -
73template <class Archive, typename Scalar_, int Rows_, int Cols_, int Ops_,
│ │ │ -
74 int MaxRows_, int MaxCols_>
│ │ │ -
75void serialize(
│ │ │ -
76 Archive& ar,
│ │ │ -
77 Eigen::Matrix<Scalar_, Rows_, Cols_, Ops_, MaxRows_, MaxCols_>& m,
│ │ │ -
78 const unsigned int version) {
│ │ │ -
79 split_free(ar, m, version);
│ │ │ -
80}
│ │ │ -
81
│ │ │ -
82// specialized to Matrix for MATLAB wrapper
│ │ │ -
83template <class Archive>
│ │ │ -
84void serialize(Archive& ar, gtsam::Matrix& m, const unsigned int version) {
│ │ │ -
85 split_free(ar, m, version);
│ │ │ -
86}
│ │ │ -
87
│ │ │ -
88} // namespace serialization
│ │ │ -
89} // namespace boost
│ │ │ -
typedef and functions to augment Eigen's MatrixXd
│ │ │ +
25#include <boost/concept_check.hpp>
│ │ │ +
26#include <boost/concept/requires.hpp>
│ │ │ +
27#include <boost/type_traits/is_base_of.hpp>
│ │ │ +
28#include <boost/static_assert.hpp>
│ │ │ +
29#include <utility>
│ │ │ +
30
│ │ │ +
31namespace gtsam {
│ │ │ +
32
│ │ │ +
34struct group_tag {};
│ │ │ +
35
│ │ │ + │ │ │ + │ │ │ +
39
│ │ │ +
40template <typename T> struct traits;
│ │ │ +
41
│ │ │ +
45template<typename G>
│ │ │ +
│ │ │ +
46class IsGroup {
│ │ │ +
47public:
│ │ │ +
48 typedef typename traits<G>::structure_category structure_category_tag;
│ │ │ +
49 typedef typename traits<G>::group_flavor flavor_tag;
│ │ │ +
50 //typedef typename traits<G>::identity::value_type identity_value_type;
│ │ │ +
51
│ │ │ +
52 BOOST_CONCEPT_USAGE(IsGroup) {
│ │ │ +
53 BOOST_STATIC_ASSERT_MSG(
│ │ │ +
54 (boost::is_base_of<group_tag, structure_category_tag>::value),
│ │ │ +
55 "This type's structure_category trait does not assert it as a group (or derived)");
│ │ │ + │ │ │ +
57 e = traits<G>::Compose(g, h);
│ │ │ +
58 e = traits<G>::Between(g, h);
│ │ │ +
59 e = traits<G>::Inverse(g);
│ │ │ +
60 operator_usage(flavor);
│ │ │ +
61 // todo: how do we test the act concept? or do we even need to?
│ │ │ +
62 }
│ │ │ +
63
│ │ │ +
64private:
│ │ │ +
65 void operator_usage(multiplicative_group_tag) {
│ │ │ +
66 e = g * h;
│ │ │ +
67 //e = -g; // todo this should work, but it is failing for Quaternions
│ │ │ +
68 }
│ │ │ +
69 void operator_usage(additive_group_tag) {
│ │ │ +
70 e = g + h;
│ │ │ +
71 e = h - g;
│ │ │ +
72 e = -g;
│ │ │ +
73 }
│ │ │ +
74
│ │ │ +
75 flavor_tag flavor;
│ │ │ +
76 G e, g, h;
│ │ │ +
77 bool b;
│ │ │ +
78};
│ │ │ +
│ │ │ +
79
│ │ │ +
81template<typename G>
│ │ │ + │ │ │ +
83check_group_invariants(const G& a, const G& b, double tol = 1e-9) {
│ │ │ +
84 G e = traits<G>::Identity();
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
88}
│ │ │ +
89
│ │ │ +
90namespace internal {
│ │ │ +
91
│ │ │ +
94template<class Class>
│ │ │ +
95struct MultiplicativeGroupTraits {
│ │ │ +
96 typedef group_tag structure_category;
│ │ │ +
97 typedef multiplicative_group_tag group_flavor;
│ │ │ +
98 static Class Identity() { return Class::Identity(); }
│ │ │ +
99 static Class Compose(const Class &g, const Class & h) { return g * h;}
│ │ │ +
100 static Class Between(const Class &g, const Class & h) { return g.inverse() * h;}
│ │ │ +
101 static Class Inverse(const Class &g) { return g.inverse();}
│ │ │ +
102};
│ │ │ +
103
│ │ │ +
105template<class Class>
│ │ │ +
106struct MultiplicativeGroup : MultiplicativeGroupTraits<Class>, Testable<Class> {};
│ │ │ +
107
│ │ │ +
110template<class Class>
│ │ │ +
111struct AdditiveGroupTraits {
│ │ │ +
112 typedef group_tag structure_category;
│ │ │ +
113 typedef additive_group_tag group_flavor;
│ │ │ +
114 static Class Identity() { return Class::Identity(); }
│ │ │ +
115 static Class Compose(const Class &g, const Class & h) { return g + h;}
│ │ │ +
116 static Class Between(const Class &g, const Class & h) { return h - g;}
│ │ │ +
117 static Class Inverse(const Class &g) { return -g;}
│ │ │ +
118};
│ │ │ +
119
│ │ │ +
121template<class Class>
│ │ │ +
122struct AdditiveGroup : AdditiveGroupTraits<Class>, Testable<Class> {};
│ │ │ +
123
│ │ │ +
124} // namespace internal
│ │ │ +
125
│ │ │ +
127template<typename G>
│ │ │ +
128BOOST_CONCEPT_REQUIRES(((IsGroup<G>)),(G)) //
│ │ │ +
129compose_pow(const G& g, size_t n) {
│ │ │ +
130 if (n == 0) return traits<G>::Identity();
│ │ │ +
131 else if (n == 1) return g;
│ │ │ +
132 else return traits<G>::Compose(compose_pow(g, n - 1), g);
│ │ │ +
133}
│ │ │ +
134
│ │ │ +
137template<typename G, typename H>
│ │ │ +
│ │ │ +
138class DirectProduct: public std::pair<G, H> {
│ │ │ +
139 BOOST_CONCEPT_ASSERT((IsGroup<G>));
│ │ │ +
140 BOOST_CONCEPT_ASSERT((IsGroup<H>));
│ │ │ +
141
│ │ │ +
142public:
│ │ │ +
144 DirectProduct():std::pair<G,H>(traits<G>::Identity(),traits<H>::Identity()) {}
│ │ │ +
145
│ │ │ +
146 // Construct from two subgroup elements
│ │ │ +
147 DirectProduct(const G& g, const H& h):std::pair<G,H>(g,h) {}
│ │ │ +
148
│ │ │ +
149 // identity
│ │ │ +
150 static DirectProduct Identity() { return DirectProduct(); }
│ │ │ +
151
│ │ │ +
152 DirectProduct operator*(const DirectProduct& other) const {
│ │ │ +
153 return DirectProduct(traits<G>::Compose(this->first, other.first),
│ │ │ +
154 traits<H>::Compose(this->second, other.second));
│ │ │ +
155 }
│ │ │ +
156 DirectProduct inverse() const {
│ │ │ +
157 return DirectProduct(this->first.inverse(), this->second.inverse());
│ │ │ +
158 }
│ │ │ +
159};
│ │ │ +
│ │ │ +
160
│ │ │ +
161// Define any direct product group to be a model of the multiplicative Group concept
│ │ │ +
162template<typename G, typename H>
│ │ │ +
│ │ │ +
163struct traits<DirectProduct<G, H> > :
│ │ │ +
164 internal::MultiplicativeGroupTraits<DirectProduct<G, H> > {};
│ │ │ +
│ │ │ +
165
│ │ │ +
168template<typename G, typename H>
│ │ │ +
│ │ │ +
169class DirectSum: public std::pair<G, H> {
│ │ │ +
170 BOOST_CONCEPT_ASSERT((IsGroup<G>)); // TODO(frank): check additive
│ │ │ +
171 BOOST_CONCEPT_ASSERT((IsGroup<H>)); // TODO(frank): check additive
│ │ │ +
172
│ │ │ +
173 const G& g() const { return this->first; }
│ │ │ +
174 const H& h() const { return this->second;}
│ │ │ +
175
│ │ │ +
176public:
│ │ │ +
178 DirectSum():std::pair<G,H>(traits<G>::Identity(),traits<H>::Identity()) {}
│ │ │ +
179
│ │ │ +
180 // Construct from two subgroup elements
│ │ │ +
181 DirectSum(const G& g, const H& h):std::pair<G,H>(g,h) {}
│ │ │ +
182
│ │ │ +
183 // identity
│ │ │ +
184 static DirectSum Identity() { return DirectSum(); }
│ │ │ +
185
│ │ │ +
186 DirectSum operator+(const DirectSum& other) const {
│ │ │ +
187 return DirectSum(g()+other.g(), h()+other.h());
│ │ │ +
188 }
│ │ │ +
189 DirectSum operator-(const DirectSum& other) const {
│ │ │ +
190 return DirectSum(g()-other.g(), h()-other.h());
│ │ │ +
191 }
│ │ │ +
192 DirectSum operator-() const {
│ │ │ +
193 return DirectSum(- g(), - h());
│ │ │ +
194 }
│ │ │ +
195};
│ │ │ +
│ │ │ +
196
│ │ │ +
197// Define direct sums to be a model of the Additive Group concept
│ │ │ +
198template<typename G, typename H>
│ │ │ +
│ │ │ +
199struct traits<DirectSum<G, H> > :
│ │ │ +
200 internal::AdditiveGroupTraits<DirectSum<G, H> > {};
│ │ │ +
│ │ │ +
201
│ │ │ +
202} // namespace gtsam
│ │ │ +
203
│ │ │ +
212#define GTSAM_CONCEPT_GROUP_INST(T) template class gtsam::IsGroup<T>;
│ │ │ +
213#define GTSAM_CONCEPT_GROUP_TYPE(T) typedef gtsam::IsGroup<T> _gtsam_IsGroup_##T;
│ │ │ +
Concept check for values that can be used in unit tests.
│ │ │ +
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ +
BOOST_CONCEPT_REQUIRES(((IsGroup< G >)),(bool)) check_group_invariants(const G &a
Check invariants.
│ │ │ +
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ +
tag to assert a type is a group
Definition Group.h:34
│ │ │ +
Group operator syntax flavors.
Definition Group.h:37
│ │ │ +
Definition Group.h:38
│ │ │ +
Group Concept.
Definition Group.h:46
│ │ │ +
Definition Group.h:138
│ │ │ +
DirectProduct()
Default constructor yields identity.
Definition Group.h:144
│ │ │ +
Template to construct the direct sum of two additive groups Assumes existence of three additive opera...
Definition Group.h:169
│ │ │ +
DirectSum()
Default constructor yields identity.
Definition Group.h:178
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,82 +1,237 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -MatrixSerialization.h │ │ │ │ +Group.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -19// \callgraph │ │ │ │ -20 │ │ │ │ 21#pragma once │ │ │ │ 22 │ │ │ │ -23#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_._h> │ │ │ │ +23#include <_g_t_s_a_m_/_b_a_s_e_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ 24 │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27#include │ │ │ │ -28 │ │ │ │ -29namespace boost { │ │ │ │ -30namespace serialization { │ │ │ │ -31 │ │ │ │ -47// split version - sends sizes ahead │ │ │ │ -48template │ │ │ │ -_5_0void save( │ │ │ │ -51 Archive& ar, │ │ │ │ -52 const Eigen::Matrix& m, │ │ │ │ -53 const unsigned int /*version*/) { │ │ │ │ -54 const size_t rows = m.rows(), cols = m.cols(); │ │ │ │ -55 ar << BOOST_SERIALIZATION_NVP(rows); │ │ │ │ -56 ar << BOOST_SERIALIZATION_NVP(cols); │ │ │ │ -57 ar << make_nvp("data", make_array(m.data(), m.size())); │ │ │ │ -58} │ │ │ │ -59 │ │ │ │ -60template │ │ │ │ -62void load(Archive& ar, │ │ │ │ -63 Eigen::Matrix& m, │ │ │ │ -64 const unsigned int /*version*/) { │ │ │ │ -65 size_t rows, cols; │ │ │ │ -66 ar >> BOOST_SERIALIZATION_NVP(rows); │ │ │ │ -67 ar >> BOOST_SERIALIZATION_NVP(cols); │ │ │ │ -68 m.resize(rows, cols); │ │ │ │ -69 ar >> make_nvp("data", make_array(m.data(), m.size())); │ │ │ │ -70} │ │ │ │ -71 │ │ │ │ -72// templated version of BOOST_SERIALIZATION_SPLIT_FREE(Eigen::Matrix); │ │ │ │ -73template │ │ │ │ -75void serialize( │ │ │ │ -76 Archive& ar, │ │ │ │ -77 Eigen::Matrix& m, │ │ │ │ -78 const unsigned int version) { │ │ │ │ -79 split_free(ar, m, version); │ │ │ │ -80} │ │ │ │ -81 │ │ │ │ -82// specialized to Matrix for MATLAB wrapper │ │ │ │ -83template │ │ │ │ -84void serialize(Archive& ar, gtsam::Matrix& m, const unsigned int version) { │ │ │ │ -85 split_free(ar, m, version); │ │ │ │ -86} │ │ │ │ -87 │ │ │ │ -88} // namespace serialization │ │ │ │ -89} // namespace boost │ │ │ │ -_M_a_t_r_i_x_._h │ │ │ │ -typedef and functions to augment Eigen's MatrixXd │ │ │ │ +25#include │ │ │ │ +26#include │ │ │ │ +27#include │ │ │ │ +28#include │ │ │ │ +29#include │ │ │ │ +30 │ │ │ │ +31namespace _g_t_s_a_m { │ │ │ │ +32 │ │ │ │ +_3_4struct _g_r_o_u_p___t_a_g {}; │ │ │ │ +35 │ │ │ │ +_3_7struct _m_u_l_t_i_p_l_i_c_a_t_i_v_e___g_r_o_u_p___t_a_g {}; │ │ │ │ +_3_8struct _a_d_d_i_t_i_v_e___g_r_o_u_p___t_a_g {}; │ │ │ │ +39 │ │ │ │ +40template struct _t_r_a_i_t_s; │ │ │ │ +41 │ │ │ │ +45template │ │ │ │ +_4_6class _I_s_G_r_o_u_p { │ │ │ │ +47public: │ │ │ │ +48 typedef typename _t_r_a_i_t_s_<_G_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y structure_category_tag; │ │ │ │ +49 typedef typename _t_r_a_i_t_s_<_G_>_:_:_g_r_o_u_p___f_l_a_v_o_r flavor_tag; │ │ │ │ +50 //typedef typename traits::identity::value_type identity_value_type; │ │ │ │ +51 │ │ │ │ +52 BOOST_CONCEPT_USAGE(_I_s_G_r_o_u_p) { │ │ │ │ +53 BOOST_STATIC_ASSERT_MSG( │ │ │ │ +54 (boost::is_base_of::value), │ │ │ │ +55 "This type's structure_category trait does not assert it as a group (or │ │ │ │ +derived)"); │ │ │ │ +56 e = _t_r_a_i_t_s_<_G_>_:_:_I_d_e_n_t_i_t_y(); │ │ │ │ +57 e = _t_r_a_i_t_s_<_G_>_:_:_C_o_m_p_o_s_e(g, h); │ │ │ │ +58 e = _t_r_a_i_t_s_<_G_>_:_:_B_e_t_w_e_e_n(g, h); │ │ │ │ +59 e = _t_r_a_i_t_s_<_G_>_:_:_I_n_v_e_r_s_e(g); │ │ │ │ +60 operator_usage(flavor); │ │ │ │ +61 // todo: how do we test the act concept? or do we even need to? │ │ │ │ +62 } │ │ │ │ +63 │ │ │ │ +64private: │ │ │ │ +65 void operator_usage(_m_u_l_t_i_p_l_i_c_a_t_i_v_e___g_r_o_u_p___t_a_g) { │ │ │ │ +66 e = g * h; │ │ │ │ +67 //e = -g; // todo this should work, but it is failing for Quaternions │ │ │ │ +68 } │ │ │ │ +69 void operator_usage(_a_d_d_i_t_i_v_e___g_r_o_u_p___t_a_g) { │ │ │ │ +70 e = g + h; │ │ │ │ +71 e = h - g; │ │ │ │ +72 e = -g; │ │ │ │ +73 } │ │ │ │ +74 │ │ │ │ +75 flavor_tag flavor; │ │ │ │ +76 G e, g, h; │ │ │ │ +77 bool b; │ │ │ │ +78}; │ │ │ │ +79 │ │ │ │ +81template │ │ │ │ +_8_2_B_O_O_S_T___C_O_N_C_E_P_T___R_E_Q_U_I_R_E_S(((_I_s_G_r_o_u_p_<_G_>)),(bool)) // │ │ │ │ +83check_group_invariants(const G& a, const G& b, double tol = 1e-9) { │ │ │ │ +84 G e = _t_r_a_i_t_s_<_G_>_:_:_I_d_e_n_t_i_t_y(); │ │ │ │ +85 return _t_r_a_i_t_s_<_G_>_:_:_E_q_u_a_l_s(_t_r_a_i_t_s_<_G_>_:_:_C_o_m_p_o_s_e(a, _t_r_a_i_t_s_<_G_>_:_:_I_n_v_e_r_s_e(a)), e, │ │ │ │ +tol) │ │ │ │ +86 && _t_r_a_i_t_s_<_G_>_:_:_E_q_u_a_l_s(_t_r_a_i_t_s_<_G_>_:_:_B_e_t_w_e_e_n(a, b), _t_r_a_i_t_s_<_G_>_:_:_C_o_m_p_o_s_e │ │ │ │ +(_t_r_a_i_t_s_<_G_>_:_:_I_n_v_e_r_s_e(a), b), tol) │ │ │ │ +87 && _t_r_a_i_t_s_<_G_>_:_:_E_q_u_a_l_s(_t_r_a_i_t_s_<_G_>_:_:_C_o_m_p_o_s_e(a, _t_r_a_i_t_s_<_G_>_:_:_B_e_t_w_e_e_n(a, b)), b, │ │ │ │ +tol); │ │ │ │ +88} │ │ │ │ +89 │ │ │ │ +90namespace internal { │ │ │ │ +91 │ │ │ │ +94template │ │ │ │ +95struct MultiplicativeGroupTraits { │ │ │ │ +96 typedef group_tag structure_category; │ │ │ │ +97 typedef multiplicative_group_tag group_flavor; │ │ │ │ +98 static Class Identity() { return Class::Identity(); } │ │ │ │ +99 static Class Compose(const Class &g, const Class & h) { return g * h;} │ │ │ │ +100 static Class Between(const Class &g, const Class & h) { return g.inverse() │ │ │ │ +* h;} │ │ │ │ +101 static Class Inverse(const Class &g) { return g.inverse();} │ │ │ │ +102}; │ │ │ │ +103 │ │ │ │ +105template │ │ │ │ +106struct MultiplicativeGroup : MultiplicativeGroupTraits, │ │ │ │ +Testable {}; │ │ │ │ +107 │ │ │ │ +110template │ │ │ │ +111struct AdditiveGroupTraits { │ │ │ │ +112 typedef group_tag structure_category; │ │ │ │ +113 typedef additive_group_tag group_flavor; │ │ │ │ +114 static Class Identity() { return Class::Identity(); } │ │ │ │ +115 static Class Compose(const Class &g, const Class & h) { return g + h;} │ │ │ │ +116 static Class Between(const Class &g, const Class & h) { return h - g;} │ │ │ │ +117 static Class Inverse(const Class &g) { return -g;} │ │ │ │ +118}; │ │ │ │ +119 │ │ │ │ +121template │ │ │ │ +122struct AdditiveGroup : AdditiveGroupTraits, Testable {}; │ │ │ │ +123 │ │ │ │ +124} // namespace internal │ │ │ │ +125 │ │ │ │ +127template │ │ │ │ +128_B_O_O_S_T___C_O_N_C_E_P_T___R_E_Q_U_I_R_E_S(((IsGroup)),(G)) // │ │ │ │ +129compose_pow(const G& g, size_t n) { │ │ │ │ +130 if (n == 0) return traits::Identity(); │ │ │ │ +131 else if (n == 1) return g; │ │ │ │ +132 else return traits::Compose(compose_pow(g, n - 1), g); │ │ │ │ +133} │ │ │ │ +134 │ │ │ │ +137template │ │ │ │ +_1_3_8class _D_i_r_e_c_t_P_r_o_d_u_c_t: public std::pair { │ │ │ │ +139 BOOST_CONCEPT_ASSERT((_I_s_G_r_o_u_p_<_G_>)); │ │ │ │ +140 BOOST_CONCEPT_ASSERT((_I_s_G_r_o_u_p_<_H_>)); │ │ │ │ +141 │ │ │ │ +142public: │ │ │ │ +_1_4_4 _D_i_r_e_c_t_P_r_o_d_u_c_t():std::pair(_t_r_a_i_t_s::Identity(),_t_r_a_i_t_s::Identity()) │ │ │ │ +{} │ │ │ │ +145 │ │ │ │ +146 // Construct from two subgroup elements │ │ │ │ +147 _D_i_r_e_c_t_P_r_o_d_u_c_t(const G& g, const H& h):std::pair(g,h) {} │ │ │ │ +148 │ │ │ │ +149 // identity │ │ │ │ +150 static _D_i_r_e_c_t_P_r_o_d_u_c_t Identity() { return _D_i_r_e_c_t_P_r_o_d_u_c_t(); } │ │ │ │ +151 │ │ │ │ +152 _D_i_r_e_c_t_P_r_o_d_u_c_t operator*(const _D_i_r_e_c_t_P_r_o_d_u_c_t& other) const { │ │ │ │ +153 return _D_i_r_e_c_t_P_r_o_d_u_c_t(traits::Compose(this->first, other.first), │ │ │ │ +154 traits::Compose(this->second, other.second)); │ │ │ │ +155 } │ │ │ │ +156 _D_i_r_e_c_t_P_r_o_d_u_c_t inverse() const { │ │ │ │ +157 return _D_i_r_e_c_t_P_r_o_d_u_c_t(this->first.inverse(), this->second.inverse()); │ │ │ │ +158 } │ │ │ │ +159}; │ │ │ │ +160 │ │ │ │ +161// Define any direct product group to be a model of the multiplicative Group │ │ │ │ +concept │ │ │ │ +162template │ │ │ │ +_1_6_3struct _t_r_a_i_t_s<_D_i_r_e_c_t_P_r_o_d_u_c_t > : │ │ │ │ +164 internal::MultiplicativeGroupTraits > {}; │ │ │ │ +165 │ │ │ │ +168template │ │ │ │ +_1_6_9class _D_i_r_e_c_t_S_u_m: public std::pair { │ │ │ │ +170 BOOST_CONCEPT_ASSERT((_I_s_G_r_o_u_p_<_G_>)); // TODO(frank): check additive │ │ │ │ +171 BOOST_CONCEPT_ASSERT((_I_s_G_r_o_u_p_<_H_>)); // TODO(frank): check additive │ │ │ │ +172 │ │ │ │ +173 const G& g() const { return this->first; } │ │ │ │ +174 const H& h() const { return this->second;} │ │ │ │ +175 │ │ │ │ +176public: │ │ │ │ +_1_7_8 _D_i_r_e_c_t_S_u_m():std::pair(_t_r_a_i_t_s::Identity(),_t_r_a_i_t_s::Identity()) {} │ │ │ │ +179 │ │ │ │ +180 // Construct from two subgroup elements │ │ │ │ +181 _D_i_r_e_c_t_S_u_m(const G& g, const H& h):std::pair(g,h) {} │ │ │ │ +182 │ │ │ │ +183 // identity │ │ │ │ +184 static _D_i_r_e_c_t_S_u_m Identity() { return _D_i_r_e_c_t_S_u_m(); } │ │ │ │ +185 │ │ │ │ +186 _D_i_r_e_c_t_S_u_m operator+(const _D_i_r_e_c_t_S_u_m& other) const { │ │ │ │ +187 return _D_i_r_e_c_t_S_u_m(g()+other.g(), h()+other.h()); │ │ │ │ +188 } │ │ │ │ +189 _D_i_r_e_c_t_S_u_m operator-(const _D_i_r_e_c_t_S_u_m& other) const { │ │ │ │ +190 return _D_i_r_e_c_t_S_u_m(g()-other.g(), h()-other.h()); │ │ │ │ +191 } │ │ │ │ +192 _D_i_r_e_c_t_S_u_m operator-() const { │ │ │ │ +193 return _D_i_r_e_c_t_S_u_m(- g(), - h()); │ │ │ │ +194 } │ │ │ │ +195}; │ │ │ │ +196 │ │ │ │ +197// Define direct sums to be a model of the Additive Group concept │ │ │ │ +198template │ │ │ │ +_1_9_9struct _t_r_a_i_t_s<_D_i_r_e_c_t_S_u_m > : │ │ │ │ +200 internal::AdditiveGroupTraits > {}; │ │ │ │ +201 │ │ │ │ +202} // namespace gtsam │ │ │ │ +203 │ │ │ │ +_2_1_2#define GTSAM_CONCEPT_GROUP_INST(T) template class gtsam::IsGroup; │ │ │ │ +213#define GTSAM_CONCEPT_GROUP_TYPE(T) typedef gtsam::IsGroup │ │ │ │ +_gtsam_IsGroup_##T; │ │ │ │ +_T_e_s_t_a_b_l_e_._h │ │ │ │ +Concept check for values that can be used in unit tests. │ │ │ │ +_g_t_s_a_m │ │ │ │ +Global functions in a separate testing namespace. │ │ │ │ +DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ +_g_t_s_a_m_:_:_B_O_O_S_T___C_O_N_C_E_P_T___R_E_Q_U_I_R_E_S │ │ │ │ +BOOST_CONCEPT_REQUIRES(((IsGroup< G >)),(bool)) check_group_invariants(const G │ │ │ │ +&a │ │ │ │ +Check invariants. │ │ │ │ +_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ +A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ +that can be centered ... │ │ │ │ +DDeeffiinniittiioonn concepts.h:30 │ │ │ │ +_g_t_s_a_m_:_:_g_r_o_u_p___t_a_g │ │ │ │ +tag to assert a type is a group │ │ │ │ +DDeeffiinniittiioonn Group.h:34 │ │ │ │ +_g_t_s_a_m_:_:_m_u_l_t_i_p_l_i_c_a_t_i_v_e___g_r_o_u_p___t_a_g │ │ │ │ +Group operator syntax flavors. │ │ │ │ +DDeeffiinniittiioonn Group.h:37 │ │ │ │ +_g_t_s_a_m_:_:_a_d_d_i_t_i_v_e___g_r_o_u_p___t_a_g │ │ │ │ +DDeeffiinniittiioonn Group.h:38 │ │ │ │ +_g_t_s_a_m_:_:_I_s_G_r_o_u_p │ │ │ │ +Group Concept. │ │ │ │ +DDeeffiinniittiioonn Group.h:46 │ │ │ │ +_g_t_s_a_m_:_:_D_i_r_e_c_t_P_r_o_d_u_c_t │ │ │ │ +DDeeffiinniittiioonn Group.h:138 │ │ │ │ +_g_t_s_a_m_:_:_D_i_r_e_c_t_P_r_o_d_u_c_t_:_:_D_i_r_e_c_t_P_r_o_d_u_c_t │ │ │ │ +DirectProduct() │ │ │ │ +Default constructor yields identity. │ │ │ │ +DDeeffiinniittiioonn Group.h:144 │ │ │ │ +_g_t_s_a_m_:_:_D_i_r_e_c_t_S_u_m │ │ │ │ +Template to construct the direct sum of two additive groups Assumes existence │ │ │ │ +of three additive opera... │ │ │ │ +DDeeffiinniittiioonn Group.h:169 │ │ │ │ +_g_t_s_a_m_:_:_D_i_r_e_c_t_S_u_m_:_:_D_i_r_e_c_t_S_u_m │ │ │ │ +DirectSum() │ │ │ │ +Default constructor yields identity. │ │ │ │ +DDeeffiinniittiioonn Group.h:178 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _M_a_t_r_i_x_S_e_r_i_a_l_i_z_a_t_i_o_n_._h │ │ │ │ + * _G_r_o_u_p_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00107_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Matrix.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/chartTesting.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,397 +98,95 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Matrix.h
│ │ │ +
chartTesting.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │ +
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
23// \callgraph
│ │ │ -
24
│ │ │ -
25#pragma once
│ │ │ -
26
│ │ │ - │ │ │ -
28#include <gtsam/base/Vector.h>
│ │ │ -
29#include <boost/tuple/tuple.hpp>
│ │ │ -
30
│ │ │ -
31#include <vector>
│ │ │ -
32
│ │ │ -
38namespace gtsam {
│ │ │ +
12/*
│ │ │ +
13 * @file chartTesting.h
│ │ │ +
14 * @brief
│ │ │ +
15 * @date November, 2014
│ │ │ +
16 * @author Paul Furgale
│ │ │ +
17 */
│ │ │ +
18
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ +
21#include <gtsam/base/Matrix.h>
│ │ │ +
22#include <gtsam/base/Manifold.h>
│ │ │ +
23#include <gtsam/base/Testable.h>
│ │ │ +
24#include <CppUnitLite/TestResult.h>
│ │ │ +
25#include <CppUnitLite/Test.h>
│ │ │ +
26#include <CppUnitLite/Failure.h>
│ │ │ +
27
│ │ │ +
│ │ │ +
28namespace gtsam {
│ │ │ +
29// Do a full concept check and test the invertibility of local() vs. retract().
│ │ │ +
30template<typename T>
│ │ │ +
31void testDefaultChart(TestResult& result_,
│ │ │ +
32 const std::string& name_,
│ │ │ +
33 const T& value) {
│ │ │ +
34
│ │ │ +
35 GTSAM_CONCEPT_TESTABLE_TYPE(T)
│ │ │ +
36
│ │ │ +
37 typedef typename gtsam::DefaultChart<T> Chart;
│ │ │ +
38 typedef typename Chart::vector Vector;
│ │ │
39
│ │ │ -
40typedef Eigen::MatrixXd Matrix;
│ │ │ -
41typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> MatrixRowMajor;
│ │ │ -
42
│ │ │ -
43// Create handy typedefs and constants for square-size matrices
│ │ │ -
44// MatrixMN, MatrixN = MatrixNN, I_NxN, and Z_NxN, for M,N=1..9
│ │ │ -
45#define GTSAM_MAKE_MATRIX_DEFS(N) \
│ │ │ -
46using Matrix##N = Eigen::Matrix<double, N, N>; \
│ │ │ -
47using Matrix1##N = Eigen::Matrix<double, 1, N>; \
│ │ │ -
48using Matrix2##N = Eigen::Matrix<double, 2, N>; \
│ │ │ -
49using Matrix3##N = Eigen::Matrix<double, 3, N>; \
│ │ │ -
50using Matrix4##N = Eigen::Matrix<double, 4, N>; \
│ │ │ -
51using Matrix5##N = Eigen::Matrix<double, 5, N>; \
│ │ │ -
52using Matrix6##N = Eigen::Matrix<double, 6, N>; \
│ │ │ -
53using Matrix7##N = Eigen::Matrix<double, 7, N>; \
│ │ │ -
54using Matrix8##N = Eigen::Matrix<double, 8, N>; \
│ │ │ -
55using Matrix9##N = Eigen::Matrix<double, 9, N>; \
│ │ │ -
56static const Eigen::MatrixBase<Matrix##N>::IdentityReturnType I_##N##x##N = Matrix##N::Identity(); \
│ │ │ -
57static const Eigen::MatrixBase<Matrix##N>::ConstantReturnType Z_##N##x##N = Matrix##N::Zero();
│ │ │ -
58
│ │ │ -
59GTSAM_MAKE_MATRIX_DEFS(1)
│ │ │ -
60GTSAM_MAKE_MATRIX_DEFS(2)
│ │ │ -
61GTSAM_MAKE_MATRIX_DEFS(3)
│ │ │ -
62GTSAM_MAKE_MATRIX_DEFS(4)
│ │ │ -
63GTSAM_MAKE_MATRIX_DEFS(5)
│ │ │ -
64GTSAM_MAKE_MATRIX_DEFS(6)
│ │ │ -
65GTSAM_MAKE_MATRIX_DEFS(7)
│ │ │ -
66GTSAM_MAKE_MATRIX_DEFS(8)
│ │ │ -
67GTSAM_MAKE_MATRIX_DEFS(9)
│ │ │ -
68
│ │ │ -
69// Matrix expressions for accessing parts of matrices
│ │ │ -
70typedef Eigen::Block<Matrix> SubMatrix;
│ │ │ -
71typedef Eigen::Block<const Matrix> ConstSubMatrix;
│ │ │ -
72
│ │ │ -
73// Matrix formatting arguments when printing.
│ │ │ -
74// Akin to Matlab style.
│ │ │ -
75const Eigen::IOFormat& matlabFormat();
│ │ │ -
76
│ │ │ -
80template <class MATRIX>
│ │ │ -
│ │ │ -
81bool equal_with_abs_tol(const Eigen::DenseBase<MATRIX>& A, const Eigen::DenseBase<MATRIX>& B, double tol = 1e-9) {
│ │ │ -
82
│ │ │ -
83 const size_t n1 = A.cols(), m1 = A.rows();
│ │ │ -
84 const size_t n2 = B.cols(), m2 = B.rows();
│ │ │ -
85
│ │ │ -
86 if(m1!=m2 || n1!=n2) return false;
│ │ │ -
87
│ │ │ -
88 for(size_t i=0; i<m1; i++)
│ │ │ -
89 for(size_t j=0; j<n1; j++) {
│ │ │ -
90 if(!fpEqual(A(i,j), B(i,j), tol, false)) {
│ │ │ -
91 return false;
│ │ │ -
92 }
│ │ │ -
93 }
│ │ │ -
94 return true;
│ │ │ -
95}
│ │ │ -
│ │ │ -
96
│ │ │ -
│ │ │ -
100inline bool operator==(const Matrix& A, const Matrix& B) {
│ │ │ -
101 return equal_with_abs_tol(A,B,1e-9);
│ │ │ -
102}
│ │ │ -
│ │ │ -
103
│ │ │ -
│ │ │ -
107inline bool operator!=(const Matrix& A, const Matrix& B) {
│ │ │ -
108 return !(A==B);
│ │ │ -
109 }
│ │ │ -
│ │ │ -
110
│ │ │ -
114GTSAM_EXPORT bool assert_equal(const Matrix& A, const Matrix& B, double tol = 1e-9);
│ │ │ -
115
│ │ │ -
119GTSAM_EXPORT bool assert_inequal(const Matrix& A, const Matrix& B, double tol = 1e-9);
│ │ │ -
120
│ │ │ -
124GTSAM_EXPORT bool assert_equal(const std::list<Matrix>& As, const std::list<Matrix>& Bs, double tol = 1e-9);
│ │ │ -
125
│ │ │ -
129GTSAM_EXPORT bool linear_independent(const Matrix& A, const Matrix& B, double tol = 1e-9);
│ │ │ -
130
│ │ │ -
134GTSAM_EXPORT bool linear_dependent(const Matrix& A, const Matrix& B, double tol = 1e-9);
│ │ │ -
135
│ │ │ -
140GTSAM_EXPORT Vector operator^(const Matrix& A, const Vector & v);
│ │ │ -
141
│ │ │ -
143template<class MATRIX>
│ │ │ -
│ │ │ -
144inline MATRIX prod(const MATRIX& A, const MATRIX&B) {
│ │ │ -
145 MATRIX result = A * B;
│ │ │ -
146 return result;
│ │ │ -
147}
│ │ │ -
│ │ │ -
148
│ │ │ -
152GTSAM_EXPORT void print(const Matrix& A, const std::string& s, std::ostream& stream);
│ │ │ -
153
│ │ │ -
157GTSAM_EXPORT void print(const Matrix& A, const std::string& s = "");
│ │ │ -
158
│ │ │ -
162GTSAM_EXPORT void save(const Matrix& A, const std::string &s, const std::string& filename);
│ │ │ -
163
│ │ │ -
169GTSAM_EXPORT std::istream& operator>>(std::istream& inputStream, Matrix& destinationMatrix);
│ │ │ -
170
│ │ │ -
180template<class MATRIX>
│ │ │ -
│ │ │ -
181Eigen::Block<const MATRIX> sub(const MATRIX& A, size_t i1, size_t i2, size_t j1, size_t j2) {
│ │ │ -
182 size_t m=i2-i1, n=j2-j1;
│ │ │ -
183 return A.block(i1,j1,m,n);
│ │ │ -
184}
│ │ │ -
│ │ │ -
185
│ │ │ -
194template <typename Derived1, typename Derived2>
│ │ │ -
│ │ │ -
195void insertSub(Eigen::MatrixBase<Derived1>& fullMatrix, const Eigen::MatrixBase<Derived2>& subMatrix, size_t i, size_t j) {
│ │ │ -
196 fullMatrix.block(i, j, subMatrix.rows(), subMatrix.cols()) = subMatrix;
│ │ │ -
197}
│ │ │ -
│ │ │ -
198
│ │ │ -
202GTSAM_EXPORT Matrix diag(const std::vector<Matrix>& Hs);
│ │ │ -
203
│ │ │ -
210template<class MATRIX>
│ │ │ -
│ │ │ -
211const typename MATRIX::ConstColXpr column(const MATRIX& A, size_t j) {
│ │ │ -
212 return A.col(j);
│ │ │ -
213}
│ │ │ -
│ │ │ -
214
│ │ │ -
221template<class MATRIX>
│ │ │ -
│ │ │ -
222const typename MATRIX::ConstRowXpr row(const MATRIX& A, size_t j) {
│ │ │ -
223 return A.row(j);
│ │ │ -
224}
│ │ │ -
│ │ │ -
225
│ │ │ -
231template<class MATRIX>
│ │ │ -
│ │ │ -
232void zeroBelowDiagonal(MATRIX& A, size_t cols=0) {
│ │ │ -
233 const size_t m = A.rows(), n = A.cols();
│ │ │ -
234 const size_t k = (cols) ? std::min(cols, std::min(m,n)) : std::min(m,n);
│ │ │ -
235 for (size_t j=0; j<k; ++j)
│ │ │ -
236 A.col(j).segment(j+1, m-(j+1)).setZero();
│ │ │ -
237}
│ │ │ -
│ │ │ -
238
│ │ │ -
242inline Matrix trans(const Matrix& A) { return A.transpose(); }
│ │ │ -
243
│ │ │ -
245template <int OutM, int OutN, int OutOptions, int InM, int InN, int InOptions>
│ │ │ -
│ │ │ -
246struct Reshape {
│ │ │ -
247 //TODO replace this with Eigen's reshape function as soon as available. (There is a PR already pending : https://bitbucket.org/eigen/eigen/pull-request/41/reshape/diff)
│ │ │ -
248 typedef Eigen::Map<const Eigen::Matrix<double, OutM, OutN, OutOptions> > ReshapedType;
│ │ │ -
249 static inline ReshapedType reshape(const Eigen::Matrix<double, InM, InN, InOptions> & in) {
│ │ │ -
250 return in.data();
│ │ │ -
251 }
│ │ │ -
252};
│ │ │ -
│ │ │ -
253
│ │ │ -
255template <int M, int InOptions>
│ │ │ -
│ │ │ -
256struct Reshape<M, M, InOptions, M, M, InOptions> {
│ │ │ -
257 typedef const Eigen::Matrix<double, M, M, InOptions> & ReshapedType;
│ │ │ -
258 static inline ReshapedType reshape(const Eigen::Matrix<double, M, M, InOptions> & in) {
│ │ │ -
259 return in;
│ │ │ -
260 }
│ │ │ -
261};
│ │ │ -
│ │ │ -
262
│ │ │ -
264template <int M, int N, int InOptions>
│ │ │ -
│ │ │ -
265struct Reshape<M, N, InOptions, M, N, InOptions> {
│ │ │ -
266 typedef const Eigen::Matrix<double, M, N, InOptions> & ReshapedType;
│ │ │ -
267 static inline ReshapedType reshape(const Eigen::Matrix<double, M, N, InOptions> & in) {
│ │ │ -
268 return in;
│ │ │ -
269 }
│ │ │ -
270};
│ │ │ -
│ │ │ -
271
│ │ │ -
273template <int M, int N, int InOptions>
│ │ │ -
│ │ │ -
274struct Reshape<N, M, InOptions, M, N, InOptions> {
│ │ │ -
275 typedef typename Eigen::Matrix<double, M, N, InOptions>::ConstTransposeReturnType ReshapedType;
│ │ │ -
276 static inline ReshapedType reshape(const Eigen::Matrix<double, M, N, InOptions> & in) {
│ │ │ -
277 return in.transpose();
│ │ │ -
278 }
│ │ │ -
279};
│ │ │ -
│ │ │ -
280
│ │ │ -
281template <int OutM, int OutN, int OutOptions, int InM, int InN, int InOptions>
│ │ │ -
282inline typename Reshape<OutM, OutN, OutOptions, InM, InN, InOptions>::ReshapedType reshape(const Eigen::Matrix<double, InM, InN, InOptions> & m){
│ │ │ -
283 BOOST_STATIC_ASSERT(InM * InN == OutM * OutN);
│ │ │ - │ │ │ -
285}
│ │ │ -
286
│ │ │ -
293GTSAM_EXPORT std::pair<Matrix,Matrix> qr(const Matrix& A);
│ │ │ -
294
│ │ │ -
300GTSAM_EXPORT void inplace_QR(Matrix& A);
│ │ │ -
301
│ │ │ -
310GTSAM_EXPORT std::list<boost::tuple<Vector, double, double> >
│ │ │ -
311weighted_eliminate(Matrix& A, Vector& b, const Vector& sigmas);
│ │ │ -
312
│ │ │ -
320GTSAM_EXPORT void householder_(Matrix& A, size_t k, bool copy_vectors=true);
│ │ │ -
321
│ │ │ -
328GTSAM_EXPORT void householder(Matrix& A, size_t k);
│ │ │ -
329
│ │ │ -
337GTSAM_EXPORT Vector backSubstituteUpper(const Matrix& U, const Vector& b, bool unit=false);
│ │ │ -
338
│ │ │ -
346//TODO: is this function necessary? it isn't used
│ │ │ -
347GTSAM_EXPORT Vector backSubstituteUpper(const Vector& b, const Matrix& U, bool unit=false);
│ │ │ -
348
│ │ │ -
356GTSAM_EXPORT Vector backSubstituteLower(const Matrix& L, const Vector& b, bool unit=false);
│ │ │ -
357
│ │ │ -
364GTSAM_EXPORT Matrix stack(size_t nrMatrices, ...);
│ │ │ -
365GTSAM_EXPORT Matrix stack(const std::vector<Matrix>& blocks);
│ │ │ -
366
│ │ │ -
377GTSAM_EXPORT Matrix collect(const std::vector<const Matrix *>& matrices, size_t m = 0, size_t n = 0);
│ │ │ -
378GTSAM_EXPORT Matrix collect(size_t nrMatrices, ...);
│ │ │ -
379
│ │ │ -
386GTSAM_EXPORT void vector_scale_inplace(const Vector& v, Matrix& A, bool inf_mask = false); // row
│ │ │ -
387GTSAM_EXPORT Matrix vector_scale(const Vector& v, const Matrix& A, bool inf_mask = false); // row
│ │ │ -
388GTSAM_EXPORT Matrix vector_scale(const Matrix& A, const Vector& v, bool inf_mask = false); // column
│ │ │ -
389
│ │ │ -
│ │ │ -
401inline Matrix3 skewSymmetric(double wx, double wy, double wz) {
│ │ │ -
402 return (Matrix3() << 0.0, -wz, +wy, +wz, 0.0, -wx, -wy, +wx, 0.0).finished();
│ │ │ -
403}
│ │ │ -
│ │ │ -
404
│ │ │ -
405template <class Derived>
│ │ │ -
406inline Matrix3 skewSymmetric(const Eigen::MatrixBase<Derived>& w) {
│ │ │ -
407 return skewSymmetric(w(0), w(1), w(2));
│ │ │ -
408}
│ │ │ -
409
│ │ │ -
411GTSAM_EXPORT Matrix inverse_square_root(const Matrix& A);
│ │ │ -
412
│ │ │ -
414GTSAM_EXPORT Matrix cholesky_inverse(const Matrix &A);
│ │ │ -
415
│ │ │ -
428GTSAM_EXPORT void svd(const Matrix& A, Matrix& U, Vector& S, Matrix& V);
│ │ │ -
429
│ │ │ -
437GTSAM_EXPORT boost::tuple<int, double, Vector>
│ │ │ -
438DLT(const Matrix& A, double rank_tol = 1e-9);
│ │ │ -
439
│ │ │ -
445GTSAM_EXPORT Matrix expm(const Matrix& A, size_t K=7);
│ │ │ -
446
│ │ │ -
447std::string formatMatrixIndented(const std::string& label, const Matrix& matrix, bool makeVectorHorizontal = false);
│ │ │ -
448
│ │ │ -
455template <int N>
│ │ │ -
│ │ │ - │ │ │ -
457 typedef Eigen::Matrix<double, N, 1> VectorN;
│ │ │ -
458 typedef Eigen::Matrix<double, N, N> MatrixN;
│ │ │ -
459
│ │ │ -
│ │ │ -
461 VectorN operator()(const MatrixN& A, const VectorN& b,
│ │ │ -
462 OptionalJacobian<N, N* N> H1 = boost::none,
│ │ │ -
463 OptionalJacobian<N, N> H2 = boost::none) const {
│ │ │ -
464 const MatrixN invA = A.inverse();
│ │ │ -
465 const VectorN c = invA * b;
│ │ │ -
466 // The derivative in A is just -[c[0]*invA c[1]*invA ... c[N-1]*invA]
│ │ │ -
467 if (H1)
│ │ │ -
468 for (size_t j = 0; j < N; j++)
│ │ │ -
469 H1->template middleCols<N>(N * j) = -c[j] * invA;
│ │ │ -
470 // The derivative in b is easy, as invA*b is just a linear map:
│ │ │ -
471 if (H2) *H2 = invA;
│ │ │ -
472 return c;
│ │ │ -
473 }
│ │ │ -
│ │ │ -
474};
│ │ │ -
│ │ │ -
475
│ │ │ -
481template <typename T, int N>
│ │ │ -
│ │ │ - │ │ │ -
483 enum { M = traits<T>::dimension };
│ │ │ -
484 typedef Eigen::Matrix<double, N, 1> VectorN;
│ │ │ -
485 typedef Eigen::Matrix<double, N, N> MatrixN;
│ │ │ -
486
│ │ │ -
487 // The function phi should calculate f(a)*b, with derivatives in a and b.
│ │ │ -
488 // Naturally, the derivative in b is f(a).
│ │ │ -
489 typedef std::function<VectorN(
│ │ │ -
490 const T&, const VectorN&, OptionalJacobian<N, M>, OptionalJacobian<N, N>)>
│ │ │ -
491 Operator;
│ │ │ -
492
│ │ │ -
494 MultiplyWithInverseFunction(const Operator& phi) : phi_(phi) {}
│ │ │ -
495
│ │ │ -
│ │ │ -
497 VectorN operator()(const T& a, const VectorN& b,
│ │ │ -
498 OptionalJacobian<N, M> H1 = boost::none,
│ │ │ -
499 OptionalJacobian<N, N> H2 = boost::none) const {
│ │ │ -
500 MatrixN A;
│ │ │ -
501 phi_(a, b, boost::none, A); // get A = f(a) by calling f once
│ │ │ -
502 const MatrixN invA = A.inverse();
│ │ │ -
503 const VectorN c = invA * b;
│ │ │ -
504
│ │ │ -
505 if (H1) {
│ │ │ -
506 Eigen::Matrix<double, N, M> H;
│ │ │ -
507 phi_(a, c, H, boost::none); // get derivative H of forward mapping
│ │ │ -
508 *H1 = -invA* H;
│ │ │ -
509 }
│ │ │ -
510 if (H2) *H2 = invA;
│ │ │ -
511 return c;
│ │ │ -
512 }
│ │ │ -
│ │ │ -
513
│ │ │ -
514 private:
│ │ │ -
515 const Operator phi_;
│ │ │ -
516};
│ │ │ -
│ │ │ -
517
│ │ │ -
518GTSAM_EXPORT Matrix LLt(const Matrix& A);
│ │ │ -
519
│ │ │ -
520GTSAM_EXPORT Matrix RtR(const Matrix& A);
│ │ │ -
521
│ │ │ -
522GTSAM_EXPORT Vector columnNormSquare(const Matrix &A);
│ │ │ -
523} // namespace gtsam
│ │ │ -
typedef and functions to augment Eigen's VectorXd
│ │ │ -
Special class for optional Jacobian arguments.
│ │ │ +
40 // First, check the basic chart concept. This checks that the interface is satisfied.
│ │ │ +
41 // The rest of the function is even more detailed, checking the correctness of the chart.
│ │ │ +
42 BOOST_CONCEPT_ASSERT((ChartConcept<Chart>));
│ │ │ +
43
│ │ │ +
44 T other = value;
│ │ │ +
45
│ │ │ +
46 // Check that the dimension of the local value matches the chart dimension.
│ │ │ +
47 Vector dx = Chart::local(value, other);
│ │ │ +
48 EXPECT_LONGS_EQUAL(Chart::getDimension(value), dx.size());
│ │ │ +
49 // And that the "local" of a value vs. itself is zero.
│ │ │ +
50 EXPECT(assert_equal(Matrix(dx), Matrix(Eigen::VectorXd::Zero(dx.size()))));
│ │ │ +
51
│ │ │ +
52 // Test the invertibility of retract/local
│ │ │ +
53 dx.setRandom();
│ │ │ +
54 T updated = Chart::retract(value, dx);
│ │ │ +
55 Vector invdx = Chart::local(value, updated);
│ │ │ +
56 EXPECT(assert_equal(Matrix(dx), Matrix(invdx), 1e-9));
│ │ │ +
57
│ │ │ +
58 // And test that negative steps work as well.
│ │ │ +
59 dx = -dx;
│ │ │ +
60 updated = Chart::retract(value, dx);
│ │ │ +
61 invdx = Chart::local(value, updated);
│ │ │ +
62 EXPECT(assert_equal(Matrix(dx), Matrix(invdx), 1e-9));
│ │ │ +
63}
│ │ │ +
64} // namespace gtsam
│ │ │ +
│ │ │ +
65
│ │ │ +
68#define CHECK_CHART_CONCEPT(value) \
│ │ │ +
69 { gtsam::testDefaultChart(result_, name_, value); }
│ │ │ +
typedef and functions to augment Eigen's MatrixXd
│ │ │ +
Concept check for values that can be used in unit tests.
│ │ │ +
Base class and basic functions for Manifold types.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
Vector backSubstituteLower(const Matrix &L, const Vector &b, bool unit)
backSubstitute L*x=b
Definition Matrix.cpp:367
│ │ │ -
Vector operator^(const Matrix &A, const Vector &v)
overload ^ for trans(A)*v We transpose the vectors for speed.
Definition Matrix.cpp:131
│ │ │ -
void vector_scale_inplace(const Vector &v, Matrix &A, bool inf_mask)
scales a matrix row or column by the values in a vector Arguments (Matrix, Vector) scales the columns...
Definition Matrix.cpp:482
│ │ │ -
const MATRIX::ConstRowXpr row(const MATRIX &A, size_t j)
Extracts a row view from a matrix that avoids a copy.
Definition Matrix.h:222
│ │ │ -
T expm(const Vector &x, int K=7)
Exponential map given exponential coordinates class T needs a wedge<> function and a constructor from...
Definition Lie.h:317
│ │ │ -
void save(const Matrix &A, const string &s, const string &filename)
save a matrix to file, which can be loaded by matlab
Definition Matrix.cpp:167
│ │ │
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
equals with an tolerance, prints out message if unequal
Definition Matrix.cpp:43
│ │ │ -
bool linear_dependent(const Matrix &A, const Matrix &B, double tol)
check whether the rows of two matrices are linear dependent
Definition Matrix.cpp:117
│ │ │ -
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:156
│ │ │ -
const MATRIX::ConstColXpr column(const MATRIX &A, size_t j)
Extracts a column view from a matrix that avoids a copy.
Definition Matrix.h:211
│ │ │ -
void zeroBelowDiagonal(MATRIX &A, size_t cols=0)
Zeros all of the elements below the diagonal of a matrix, in place.
Definition Matrix.h:232
│ │ │ -
list< boost::tuple< Vector, double, double > > weighted_eliminate(Matrix &A, Vector &b, const Vector &sigmas)
Imperative algorithm for in-place full elimination with weights and constraint handling.
Definition Matrix.cpp:273
│ │ │ -
Vector backSubstituteUpper(const Matrix &U, const Vector &b, bool unit)
backSubstitute U*x=b
Definition Matrix.cpp:377
│ │ │ -
bool assert_inequal(const Matrix &A, const Matrix &B, double tol)
inequals with an tolerance, prints out message if within tolerance
Definition Matrix.cpp:63
│ │ │ -
void householder(Matrix &A, size_t k)
Householder tranformation, zeros below diagonal.
Definition Matrix.cpp:354
│ │ │ -
istream & operator>>(istream &inputStream, Matrix &destinationMatrix)
Read a matrix from an input stream, such as a file.
Definition Matrix.cpp:174
│ │ │ -
void inplace_QR(Matrix &A)
QR factorization using Eigen's internal block QR algorithm.
Definition Matrix.cpp:636
│ │ │ -
void svd(const Matrix &A, Matrix &U, Vector &S, Matrix &V)
SVD computes economy SVD A=U*S*V'.
Definition Matrix.cpp:560
│ │ │ -
Matrix3 skewSymmetric(double wx, double wy, double wz)
skew symmetric matrix returns this: 0 -wz wy wz 0 -wx -wy wx 0
Definition Matrix.h:401
│ │ │ -
Eigen::Block< const MATRIX > sub(const MATRIX &A, size_t i1, size_t i2, size_t j1, size_t j2)
extract submatrix, slice semantics, i.e.
Definition Matrix.h:181
│ │ │ -
Matrix trans(const Matrix &A)
static transpose function, just calls Eigen transpose member function
Definition Matrix.h:242
│ │ │ -
bool operator!=(const Matrix &A, const Matrix &B)
inequality
Definition Matrix.h:107
│ │ │ -
boost::tuple< int, double, Vector > DLT(const Matrix &A, double rank_tol)
Direct linear transform algorithm that calls svd to find a vector v that minimizes the algebraic erro...
Definition Matrix.cpp:568
│ │ │ -
Matrix cholesky_inverse(const Matrix &A)
Return the inverse of a S.P.D.
Definition Matrix.cpp:539
│ │ │ -
MATRIX prod(const MATRIX &A, const MATRIX &B)
products using old-style format to improve compatibility
Definition Matrix.h:144
│ │ │ -
void householder_(Matrix &A, size_t k, bool copy_vectors)
Imperative version of Householder QR factorization, Golub & Van Loan p 224 version with Householder v...
Definition Matrix.cpp:327
│ │ │ -
void insertSub(Eigen::MatrixBase< Derived1 > &fullMatrix, const Eigen::MatrixBase< Derived2 > &subMatrix, size_t i, size_t j)
insert a submatrix IN PLACE at a specified location in a larger matrix NOTE: there is no size checkin...
Definition Matrix.h:195
│ │ │ -
Matrix collect(const std::vector< const Matrix * > &matrices, size_t m, size_t n)
create a matrix by concatenating Given a set of matrices: A1, A2, A3... If all matrices have the same...
Definition Matrix.cpp:443
│ │ │ -
bool linear_independent(const Matrix &A, const Matrix &B, double tol)
check whether the rows of two matrices are linear independent
Definition Matrix.cpp:103
│ │ │ -
bool fpEqual(double a, double b, double tol, bool check_relative_also)
Ensure we are not including a different version of Eigen in user code than while compiling gtsam,...
Definition Vector.cpp:42
│ │ │ -
pair< Matrix, Matrix > qr(const Matrix &A)
Householder QR factorization, Golub & Van Loan p 224, explicit version
Definition Matrix.cpp:235
│ │ │ -
Matrix diag(const std::vector< Matrix > &Hs)
Create a matrix with submatrices along its diagonal.
Definition Matrix.cpp:207
│ │ │ -
bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen::DenseBase< MATRIX > &B, double tol=1e-9)
equals with a tolerance
Definition Matrix.h:81
│ │ │ -
bool operator==(const Matrix &A, const Matrix &B)
equality is just equal_with_abs_tol 1e-9
Definition Matrix.h:100
│ │ │ -
Matrix inverse_square_root(const Matrix &A)
Use Cholesky to calculate inverse square root of a matrix.
Definition Matrix.cpp:552
│ │ │ -
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ -
Reshape functor.
Definition Matrix.h:246
│ │ │ -
Functor that implements multiplication of a vector b with the inverse of a matrix A.
Definition Matrix.h:456
│ │ │ -
VectorN operator()(const MatrixN &A, const VectorN &b, OptionalJacobian< N, N *N > H1=boost::none, OptionalJacobian< N, N > H2=boost::none) const
A.inverse() * b, with optional derivatives.
Definition Matrix.h:461
│ │ │ -
Functor that implements multiplication with the inverse of a matrix, itself the result of a function ...
Definition Matrix.h:482
│ │ │ -
VectorN operator()(const T &a, const VectorN &b, OptionalJacobian< N, M > H1=boost::none, OptionalJacobian< N, N > H2=boost::none) const
f(a).inverse() * b, with optional derivatives
Definition Matrix.h:497
│ │ │ -
MultiplyWithInverseFunction(const Operator &phi)
Construct with function as explained above.
Definition Matrix.h:494
│ │ │ -
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:41
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,534 +1,95 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Matrix.h │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +chartTesting.h │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -23// \callgraph │ │ │ │ -24 │ │ │ │ -25#pragma once │ │ │ │ -26 │ │ │ │ -27#include <_g_t_s_a_m_/_b_a_s_e_/_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h> │ │ │ │ -28#include <_g_t_s_a_m_/_b_a_s_e_/_V_e_c_t_o_r_._h> │ │ │ │ -29#include │ │ │ │ -30 │ │ │ │ -31#include │ │ │ │ -32 │ │ │ │ -38namespace _g_t_s_a_m { │ │ │ │ +12/* │ │ │ │ +13 * @file chartTesting.h │ │ │ │ +14 * @brief │ │ │ │ +15 * @date November, 2014 │ │ │ │ +16 * @author Paul Furgale │ │ │ │ +17 */ │ │ │ │ +18 │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +21#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_._h> │ │ │ │ +22#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_n_i_f_o_l_d_._h> │ │ │ │ +23#include <_g_t_s_a_m_/_b_a_s_e_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ +24#include │ │ │ │ +25#include │ │ │ │ +26#include │ │ │ │ +27 │ │ │ │ +_2_8namespace _g_t_s_a_m { │ │ │ │ +29// Do a full concept check and test the invertibility of local() vs. retract │ │ │ │ +(). │ │ │ │ +30template │ │ │ │ +31void testDefaultChart(TestResult& result_, │ │ │ │ +32 const std::string& name_, │ │ │ │ +33 const T& value) { │ │ │ │ +34 │ │ │ │ +35 GTSAM_CONCEPT_TESTABLE_TYPE(T) │ │ │ │ +36 │ │ │ │ +37 typedef typename gtsam::DefaultChart Chart; │ │ │ │ +38 typedef typename Chart::vector Vector; │ │ │ │ 39 │ │ │ │ -40typedef Eigen::MatrixXd Matrix; │ │ │ │ -41typedef Eigen::Matrix MatrixRowMajor; │ │ │ │ -42 │ │ │ │ -43// Create handy typedefs and constants for square-size matrices │ │ │ │ -44// MatrixMN, MatrixN = MatrixNN, I_NxN, and Z_NxN, for M,N=1..9 │ │ │ │ -45#define GTSAM_MAKE_MATRIX_DEFS(N) \ │ │ │ │ -46using Matrix##N = Eigen::Matrix; \ │ │ │ │ -47using Matrix1##N = Eigen::Matrix; \ │ │ │ │ -48using Matrix2##N = Eigen::Matrix; \ │ │ │ │ -49using Matrix3##N = Eigen::Matrix; \ │ │ │ │ -50using Matrix4##N = Eigen::Matrix; \ │ │ │ │ -51using Matrix5##N = Eigen::Matrix; \ │ │ │ │ -52using Matrix6##N = Eigen::Matrix; \ │ │ │ │ -53using Matrix7##N = Eigen::Matrix; \ │ │ │ │ -54using Matrix8##N = Eigen::Matrix; \ │ │ │ │ -55using Matrix9##N = Eigen::Matrix; \ │ │ │ │ -56static const Eigen::MatrixBase::IdentityReturnType I_##N##x##N = │ │ │ │ -Matrix##N::Identity(); \ │ │ │ │ -57static const Eigen::MatrixBase::ConstantReturnType Z_##N##x##N = │ │ │ │ -Matrix##N::Zero(); │ │ │ │ -58 │ │ │ │ -59GTSAM_MAKE_MATRIX_DEFS(1) │ │ │ │ -60GTSAM_MAKE_MATRIX_DEFS(2) │ │ │ │ -61GTSAM_MAKE_MATRIX_DEFS(3) │ │ │ │ -62GTSAM_MAKE_MATRIX_DEFS(4) │ │ │ │ -63GTSAM_MAKE_MATRIX_DEFS(5) │ │ │ │ -64GTSAM_MAKE_MATRIX_DEFS(6) │ │ │ │ -65GTSAM_MAKE_MATRIX_DEFS(7) │ │ │ │ -66GTSAM_MAKE_MATRIX_DEFS(8) │ │ │ │ -67GTSAM_MAKE_MATRIX_DEFS(9) │ │ │ │ -68 │ │ │ │ -69// Matrix expressions for accessing parts of matrices │ │ │ │ -70typedef Eigen::Block SubMatrix; │ │ │ │ -71typedef Eigen::Block ConstSubMatrix; │ │ │ │ -72 │ │ │ │ -73// Matrix formatting arguments when printing. │ │ │ │ -74// Akin to Matlab style. │ │ │ │ -75const Eigen::IOFormat& matlabFormat(); │ │ │ │ -76 │ │ │ │ -80template │ │ │ │ -_8_1bool _e_q_u_a_l___w_i_t_h___a_b_s___t_o_l(const Eigen::DenseBase& A, const Eigen:: │ │ │ │ -DenseBase& B, double tol = 1e-9) { │ │ │ │ -82 │ │ │ │ -83 const size_t n1 = A.cols(), m1 = A.rows(); │ │ │ │ -84 const size_t n2 = B.cols(), m2 = B.rows(); │ │ │ │ -85 │ │ │ │ -86 if(m1!=m2 || n1!=n2) return false; │ │ │ │ -87 │ │ │ │ -88 for(size_t i=0; i& As, const std:: │ │ │ │ -list& Bs, double tol = 1e-9); │ │ │ │ -125 │ │ │ │ -129GTSAM_EXPORT bool _l_i_n_e_a_r___i_n_d_e_p_e_n_d_e_n_t(const Matrix& A, const Matrix& B, │ │ │ │ -double tol = 1e-9); │ │ │ │ -130 │ │ │ │ -134GTSAM_EXPORT bool _l_i_n_e_a_r___d_e_p_e_n_d_e_n_t(const Matrix& A, const Matrix& B, double │ │ │ │ -tol = 1e-9); │ │ │ │ -135 │ │ │ │ -140GTSAM_EXPORT Vector _o_p_e_r_a_t_o_r_^(const Matrix& A, const Vector & v); │ │ │ │ -141 │ │ │ │ -143template │ │ │ │ -_1_4_4inline MATRIX _p_r_o_d(const MATRIX& A, const MATRIX&B) { │ │ │ │ -145 MATRIX result = A * B; │ │ │ │ -146 return result; │ │ │ │ -147} │ │ │ │ -148 │ │ │ │ -152GTSAM_EXPORT void _p_r_i_n_t(const Matrix& A, const std::string& s, std::ostream& │ │ │ │ -stream); │ │ │ │ -153 │ │ │ │ -157GTSAM_EXPORT void _p_r_i_n_t(const Matrix& A, const std::string& s = ""); │ │ │ │ -158 │ │ │ │ -162GTSAM_EXPORT void _s_a_v_e(const Matrix& A, const std::string &s, const std:: │ │ │ │ -string& filename); │ │ │ │ -163 │ │ │ │ -169GTSAM_EXPORT std::istream& _o_p_e_r_a_t_o_r_>_>(std::istream& inputStream, Matrix& │ │ │ │ -destinationMatrix); │ │ │ │ -170 │ │ │ │ -180template │ │ │ │ -_1_8_1Eigen::Block _s_u_b(const MATRIX& A, size_t i1, size_t i2, size_t │ │ │ │ -j1, size_t j2) { │ │ │ │ -182 size_t m=i2-i1, n=j2-j1; │ │ │ │ -183 return A.block(i1,j1,m,n); │ │ │ │ -184} │ │ │ │ -185 │ │ │ │ -194template │ │ │ │ -_1_9_5void _i_n_s_e_r_t_S_u_b(Eigen::MatrixBase& fullMatrix, const Eigen:: │ │ │ │ -MatrixBase& subMatrix, size_t i, size_t j) { │ │ │ │ -196 fullMatrix.block(i, j, subMatrix.rows(), subMatrix.cols()) = subMatrix; │ │ │ │ -197} │ │ │ │ -198 │ │ │ │ -202GTSAM_EXPORT Matrix _d_i_a_g(const std::vector& Hs); │ │ │ │ -203 │ │ │ │ -210template │ │ │ │ -_2_1_1const typename MATRIX::ConstColXpr _c_o_l_u_m_n(const MATRIX& A, size_t j) { │ │ │ │ -212 return A.col(j); │ │ │ │ -213} │ │ │ │ -214 │ │ │ │ -221template │ │ │ │ -_2_2_2const typename MATRIX::ConstRowXpr _r_o_w(const MATRIX& A, size_t j) { │ │ │ │ -223 return A.row(j); │ │ │ │ -224} │ │ │ │ -225 │ │ │ │ -231template │ │ │ │ -_2_3_2void _z_e_r_o_B_e_l_o_w_D_i_a_g_o_n_a_l(MATRIX& A, size_t cols=0) { │ │ │ │ -233 const size_t m = A.rows(), n = A.cols(); │ │ │ │ -234 const size_t k = (cols) ? std::min(cols, std::min(m,n)) : std::min(m,n); │ │ │ │ -235 for (size_t j=0; j │ │ │ │ -_2_4_6struct _R_e_s_h_a_p_e { │ │ │ │ -247 //TODO replace this with Eigen's reshape function as soon as available. │ │ │ │ -(There is a PR already pending : https://bitbucket.org/eigen/eigen/pull- │ │ │ │ -request/41/reshape/diff) │ │ │ │ -248 typedef Eigen::Map > │ │ │ │ -ReshapedType; │ │ │ │ -249 static inline ReshapedType reshape(const Eigen::Matrix & in) { │ │ │ │ -250 return in.data(); │ │ │ │ -251 } │ │ │ │ -252}; │ │ │ │ -253 │ │ │ │ -255template │ │ │ │ -_2_5_6struct _R_e_s_h_a_p_e { │ │ │ │ -257 typedef const Eigen::Matrix & ReshapedType; │ │ │ │ -258 static inline ReshapedType reshape(const Eigen::Matrix & in) { │ │ │ │ -259 return in; │ │ │ │ -260 } │ │ │ │ -261}; │ │ │ │ -262 │ │ │ │ -264template │ │ │ │ -_2_6_5struct _R_e_s_h_a_p_e { │ │ │ │ -266 typedef const Eigen::Matrix & ReshapedType; │ │ │ │ -267 static inline ReshapedType reshape(const Eigen::Matrix & in) { │ │ │ │ -268 return in; │ │ │ │ -269 } │ │ │ │ -270}; │ │ │ │ -271 │ │ │ │ -273template │ │ │ │ -_2_7_4struct _R_e_s_h_a_p_e { │ │ │ │ -275 typedef typename Eigen::Matrix:: │ │ │ │ -ConstTransposeReturnType ReshapedType; │ │ │ │ -276 static inline ReshapedType reshape(const Eigen::Matrix & in) { │ │ │ │ -277 return in.transpose(); │ │ │ │ -278 } │ │ │ │ -279}; │ │ │ │ -280 │ │ │ │ -281template │ │ │ │ -282inline typename Reshape:: │ │ │ │ -ReshapedType reshape(const Eigen::Matrix & m){ │ │ │ │ -283 BOOST_STATIC_ASSERT(InM * InN == OutM * OutN); │ │ │ │ -284 return _R_e_s_h_a_p_e_<_O_u_t_M_,_ _O_u_t_N_,_ _O_u_t_O_p_t_i_o_n_s_,_ _I_n_M_,_ _I_n_N_,_ _I_n_O_p_t_i_o_n_s_>_:_:_r_e_s_h_a_p_e(m); │ │ │ │ -285} │ │ │ │ -286 │ │ │ │ -293GTSAM_EXPORT std::pair _q_r(const Matrix& A); │ │ │ │ -294 │ │ │ │ -300GTSAM_EXPORT void _i_n_p_l_a_c_e___Q_R(Matrix& A); │ │ │ │ -301 │ │ │ │ -310GTSAM_EXPORT std::list > │ │ │ │ -311_w_e_i_g_h_t_e_d___e_l_i_m_i_n_a_t_e(Matrix& A, Vector& b, const Vector& sigmas); │ │ │ │ -312 │ │ │ │ -320GTSAM_EXPORT void _h_o_u_s_e_h_o_l_d_e_r__(Matrix& A, size_t k, bool copy_vectors=true); │ │ │ │ -321 │ │ │ │ -328GTSAM_EXPORT void _h_o_u_s_e_h_o_l_d_e_r(Matrix& A, size_t k); │ │ │ │ -329 │ │ │ │ -337GTSAM_EXPORT Vector _b_a_c_k_S_u_b_s_t_i_t_u_t_e_U_p_p_e_r(const Matrix& U, const Vector& b, │ │ │ │ -bool unit=false); │ │ │ │ -338 │ │ │ │ -346//TODO: is this function necessary? it isn't used │ │ │ │ -347GTSAM_EXPORT Vector _b_a_c_k_S_u_b_s_t_i_t_u_t_e_U_p_p_e_r(const Vector& b, const Matrix& U, │ │ │ │ -bool unit=false); │ │ │ │ -348 │ │ │ │ -356GTSAM_EXPORT Vector _b_a_c_k_S_u_b_s_t_i_t_u_t_e_L_o_w_e_r(const Matrix& L, const Vector& b, │ │ │ │ -bool unit=false); │ │ │ │ -357 │ │ │ │ -364GTSAM_EXPORT Matrix stack(size_t nrMatrices, ...); │ │ │ │ -365GTSAM_EXPORT Matrix stack(const std::vector& blocks); │ │ │ │ -366 │ │ │ │ -377GTSAM_EXPORT Matrix _c_o_l_l_e_c_t(const std::vector& matrices, │ │ │ │ -size_t m = 0, size_t n = 0); │ │ │ │ -378GTSAM_EXPORT Matrix _c_o_l_l_e_c_t(size_t nrMatrices, ...); │ │ │ │ -379 │ │ │ │ -386GTSAM_EXPORT void _v_e_c_t_o_r___s_c_a_l_e___i_n_p_l_a_c_e(const Vector& v, Matrix& A, bool │ │ │ │ -inf_mask = false); // row │ │ │ │ -387GTSAM_EXPORT Matrix vector_scale(const Vector& v, const Matrix& A, bool │ │ │ │ -inf_mask = false); // row │ │ │ │ -388GTSAM_EXPORT Matrix vector_scale(const Matrix& A, const Vector& v, bool │ │ │ │ -inf_mask = false); // column │ │ │ │ -389 │ │ │ │ -_4_0_1inline Matrix3 _s_k_e_w_S_y_m_m_e_t_r_i_c(double wx, double wy, double wz) { │ │ │ │ -402 return (Matrix3() << 0.0, -wz, +wy, +wz, 0.0, -wx, -wy, +wx, 0.0).finished │ │ │ │ -(); │ │ │ │ -403} │ │ │ │ -404 │ │ │ │ -405template │ │ │ │ -406inline Matrix3 _s_k_e_w_S_y_m_m_e_t_r_i_c(const Eigen::MatrixBase& w) { │ │ │ │ -407 return _s_k_e_w_S_y_m_m_e_t_r_i_c(w(0), w(1), w(2)); │ │ │ │ -408} │ │ │ │ -409 │ │ │ │ -411GTSAM_EXPORT Matrix _i_n_v_e_r_s_e___s_q_u_a_r_e___r_o_o_t(const Matrix& A); │ │ │ │ -412 │ │ │ │ -414GTSAM_EXPORT Matrix _c_h_o_l_e_s_k_y___i_n_v_e_r_s_e(const Matrix &A); │ │ │ │ -415 │ │ │ │ -428GTSAM_EXPORT void _s_v_d(const Matrix& A, Matrix& U, Vector& S, Matrix& V); │ │ │ │ -429 │ │ │ │ -437GTSAM_EXPORT boost::tuple │ │ │ │ -438_D_L_T(const Matrix& A, double rank_tol = 1e-9); │ │ │ │ -439 │ │ │ │ -445GTSAM_EXPORT Matrix _e_x_p_m(const Matrix& A, size_t K=7); │ │ │ │ -446 │ │ │ │ -447std::string formatMatrixIndented(const std::string& label, const Matrix& │ │ │ │ -matrix, bool makeVectorHorizontal = false); │ │ │ │ -448 │ │ │ │ -455template │ │ │ │ -_4_5_6struct _M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e { │ │ │ │ -457 typedef Eigen::Matrix VectorN; │ │ │ │ -458 typedef Eigen::Matrix MatrixN; │ │ │ │ -459 │ │ │ │ -_4_6_1 VectorN _o_p_e_r_a_t_o_r_(_)(const MatrixN& A, const VectorN& b, │ │ │ │ -462 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_N_,_ _N_*_ _N_> H1 = boost::none, │ │ │ │ -463 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_N_,_ _N_> H2 = boost::none) const { │ │ │ │ -464 const MatrixN invA = A.inverse(); │ │ │ │ -465 const VectorN c = invA * b; │ │ │ │ -466 // The derivative in A is just -[c[0]*invA c[1]*invA ... c[N-1]*invA] │ │ │ │ -467 if (H1) │ │ │ │ -468 for (size_t j = 0; j < N; j++) │ │ │ │ -469 H1->template middleCols(N * j) = -c[j] * invA; │ │ │ │ -470 // The derivative in b is easy, as invA*b is just a linear map: │ │ │ │ -471 if (H2) *H2 = invA; │ │ │ │ -472 return c; │ │ │ │ -473 } │ │ │ │ -474}; │ │ │ │ -475 │ │ │ │ -481template │ │ │ │ -_4_8_2struct _M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e_F_u_n_c_t_i_o_n { │ │ │ │ -483 enum { M = _t_r_a_i_t_s_<_T_>_:_:_d_i_m_e_n_s_i_o_n }; │ │ │ │ -484 typedef Eigen::Matrix VectorN; │ │ │ │ -485 typedef Eigen::Matrix MatrixN; │ │ │ │ -486 │ │ │ │ -487 // The function phi should calculate f(a)*b, with derivatives in a and b. │ │ │ │ -488 // Naturally, the derivative in b is f(a). │ │ │ │ -489 typedef std::function, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_N_,_ _N_>)> │ │ │ │ -491 Operator; │ │ │ │ -492 │ │ │ │ -_4_9_4 _M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e_F_u_n_c_t_i_o_n(const Operator& phi) : phi_(phi) {} │ │ │ │ -495 │ │ │ │ -_4_9_7 VectorN _o_p_e_r_a_t_o_r_(_)(const T& a, const VectorN& b, │ │ │ │ -498 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_N_,_ _M_> H1 = boost::none, │ │ │ │ -499 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_N_,_ _N_> H2 = boost::none) const { │ │ │ │ -500 MatrixN A; │ │ │ │ -501 phi_(a, b, boost::none, A); // get A = f(a) by calling f once │ │ │ │ -502 const MatrixN invA = A.inverse(); │ │ │ │ -503 const VectorN c = invA * b; │ │ │ │ -504 │ │ │ │ -505 if (H1) { │ │ │ │ -506 Eigen::Matrix H; │ │ │ │ -507 phi_(a, c, H, boost::none); // get derivative H of forward mapping │ │ │ │ -508 *H1 = -invA* H; │ │ │ │ -509 } │ │ │ │ -510 if (H2) *H2 = invA; │ │ │ │ -511 return c; │ │ │ │ -512 } │ │ │ │ -513 │ │ │ │ -514 private: │ │ │ │ -515 const Operator phi_; │ │ │ │ -516}; │ │ │ │ -517 │ │ │ │ -518GTSAM_EXPORT Matrix LLt(const Matrix& A); │ │ │ │ -519 │ │ │ │ -520GTSAM_EXPORT Matrix RtR(const Matrix& A); │ │ │ │ -521 │ │ │ │ -522GTSAM_EXPORT Vector columnNormSquare(const Matrix &A); │ │ │ │ -523} // namespace gtsam │ │ │ │ -_V_e_c_t_o_r_._h │ │ │ │ -typedef and functions to augment Eigen's VectorXd │ │ │ │ -_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h │ │ │ │ -Special class for optional Jacobian arguments. │ │ │ │ +40 // First, check the basic chart concept. This checks that the interface is │ │ │ │ +satisfied. │ │ │ │ +41 // The rest of the function is even more detailed, checking the correctness │ │ │ │ +of the chart. │ │ │ │ +42 BOOST_CONCEPT_ASSERT((ChartConcept)); │ │ │ │ +43 │ │ │ │ +44 T other = value; │ │ │ │ +45 │ │ │ │ +46 // Check that the dimension of the local value matches the chart dimension. │ │ │ │ +47 Vector dx = Chart::local(value, other); │ │ │ │ +48 EXPECT_LONGS_EQUAL(Chart::getDimension(value), dx.size()); │ │ │ │ +49 // And that the "local" of a value vs. itself is zero. │ │ │ │ +50 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(Matrix(dx), Matrix(Eigen::VectorXd::Zero(dx.size())))); │ │ │ │ +51 │ │ │ │ +52 // Test the invertibility of retract/local │ │ │ │ +53 dx.setRandom(); │ │ │ │ +54 T updated = Chart::retract(value, dx); │ │ │ │ +55 Vector invdx = Chart::local(value, updated); │ │ │ │ +56 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(Matrix(dx), Matrix(invdx), 1e-9)); │ │ │ │ +57 │ │ │ │ +58 // And test that negative steps work as well. │ │ │ │ +59 dx = -dx; │ │ │ │ +60 updated = Chart::retract(value, dx); │ │ │ │ +61 invdx = Chart::local(value, updated); │ │ │ │ +62 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(Matrix(dx), Matrix(invdx), 1e-9)); │ │ │ │ +63} │ │ │ │ +64} // namespace gtsam │ │ │ │ +65 │ │ │ │ +68#define CHECK_CHART_CONCEPT(value) \ │ │ │ │ +69 { gtsam::testDefaultChart(result_, name_, value); } │ │ │ │ +_M_a_t_r_i_x_._h │ │ │ │ +typedef and functions to augment Eigen's MatrixXd │ │ │ │ +_T_e_s_t_a_b_l_e_._h │ │ │ │ +Concept check for values that can be used in unit tests. │ │ │ │ +_M_a_n_i_f_o_l_d_._h │ │ │ │ +Base class and basic functions for Manifold types. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_b_a_c_k_S_u_b_s_t_i_t_u_t_e_L_o_w_e_r │ │ │ │ -Vector backSubstituteLower(const Matrix &L, const Vector &b, bool unit) │ │ │ │ -backSubstitute L*x=b │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:367 │ │ │ │ -_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_^ │ │ │ │ -Vector operator^(const Matrix &A, const Vector &v) │ │ │ │ -overload ^ for trans(A)*v We transpose the vectors for speed. │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:131 │ │ │ │ -_g_t_s_a_m_:_:_v_e_c_t_o_r___s_c_a_l_e___i_n_p_l_a_c_e │ │ │ │ -void vector_scale_inplace(const Vector &v, Matrix &A, bool inf_mask) │ │ │ │ -scales a matrix row or column by the values in a vector Arguments (Matrix, │ │ │ │ -Vector) scales the columns... │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:482 │ │ │ │ -_g_t_s_a_m_:_:_r_o_w │ │ │ │ -const MATRIX::ConstRowXpr row(const MATRIX &A, size_t j) │ │ │ │ -Extracts a row view from a matrix that avoids a copy. │ │ │ │ -DDeeffiinniittiioonn Matrix.h:222 │ │ │ │ -_g_t_s_a_m_:_:_e_x_p_m │ │ │ │ -T expm(const Vector &x, int K=7) │ │ │ │ -Exponential map given exponential coordinates class T needs a wedge<> function │ │ │ │ -and a constructor from... │ │ │ │ -DDeeffiinniittiioonn Lie.h:317 │ │ │ │ -_g_t_s_a_m_:_:_s_a_v_e │ │ │ │ -void save(const Matrix &A, const string &s, const string &filename) │ │ │ │ -save a matrix to file, which can be loaded by matlab │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:167 │ │ │ │ _g_t_s_a_m_:_:_a_s_s_e_r_t___e_q_u_a_l │ │ │ │ bool assert_equal(const Matrix &expected, const Matrix &actual, double tol) │ │ │ │ equals with an tolerance, prints out message if unequal │ │ │ │ DDeeffiinniittiioonn Matrix.cpp:43 │ │ │ │ -_g_t_s_a_m_:_:_l_i_n_e_a_r___d_e_p_e_n_d_e_n_t │ │ │ │ -bool linear_dependent(const Matrix &A, const Matrix &B, double tol) │ │ │ │ -check whether the rows of two matrices are linear dependent │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:117 │ │ │ │ -_g_t_s_a_m_:_:_p_r_i_n_t │ │ │ │ -void print(const Matrix &A, const string &s, ostream &stream) │ │ │ │ -print without optional string, must specify cout yourself │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:156 │ │ │ │ -_g_t_s_a_m_:_:_c_o_l_u_m_n │ │ │ │ -const MATRIX::ConstColXpr column(const MATRIX &A, size_t j) │ │ │ │ -Extracts a column view from a matrix that avoids a copy. │ │ │ │ -DDeeffiinniittiioonn Matrix.h:211 │ │ │ │ -_g_t_s_a_m_:_:_z_e_r_o_B_e_l_o_w_D_i_a_g_o_n_a_l │ │ │ │ -void zeroBelowDiagonal(MATRIX &A, size_t cols=0) │ │ │ │ -Zeros all of the elements below the diagonal of a matrix, in place. │ │ │ │ -DDeeffiinniittiioonn Matrix.h:232 │ │ │ │ -_g_t_s_a_m_:_:_w_e_i_g_h_t_e_d___e_l_i_m_i_n_a_t_e │ │ │ │ -list< boost::tuple< Vector, double, double > > weighted_eliminate(Matrix &A, │ │ │ │ -Vector &b, const Vector &sigmas) │ │ │ │ -Imperative algorithm for in-place full elimination with weights and constraint │ │ │ │ -handling. │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:273 │ │ │ │ -_g_t_s_a_m_:_:_b_a_c_k_S_u_b_s_t_i_t_u_t_e_U_p_p_e_r │ │ │ │ -Vector backSubstituteUpper(const Matrix &U, const Vector &b, bool unit) │ │ │ │ -backSubstitute U*x=b │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:377 │ │ │ │ -_g_t_s_a_m_:_:_a_s_s_e_r_t___i_n_e_q_u_a_l │ │ │ │ -bool assert_inequal(const Matrix &A, const Matrix &B, double tol) │ │ │ │ -inequals with an tolerance, prints out message if within tolerance │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:63 │ │ │ │ -_g_t_s_a_m_:_:_h_o_u_s_e_h_o_l_d_e_r │ │ │ │ -void householder(Matrix &A, size_t k) │ │ │ │ -Householder tranformation, zeros below diagonal. │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:354 │ │ │ │ -_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_>_> │ │ │ │ -istream & operator>>(istream &inputStream, Matrix &destinationMatrix) │ │ │ │ -Read a matrix from an input stream, such as a file. │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:174 │ │ │ │ -_g_t_s_a_m_:_:_i_n_p_l_a_c_e___Q_R │ │ │ │ -void inplace_QR(Matrix &A) │ │ │ │ -QR factorization using Eigen's internal block QR algorithm. │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:636 │ │ │ │ -_g_t_s_a_m_:_:_s_v_d │ │ │ │ -void svd(const Matrix &A, Matrix &U, Vector &S, Matrix &V) │ │ │ │ -SVD computes economy SVD A=U*S*V'. │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:560 │ │ │ │ -_g_t_s_a_m_:_:_s_k_e_w_S_y_m_m_e_t_r_i_c │ │ │ │ -Matrix3 skewSymmetric(double wx, double wy, double wz) │ │ │ │ -skew symmetric matrix returns this: 0 -wz wy wz 0 -wx -wy wx 0 │ │ │ │ -DDeeffiinniittiioonn Matrix.h:401 │ │ │ │ -_g_t_s_a_m_:_:_s_u_b │ │ │ │ -Eigen::Block< const MATRIX > sub(const MATRIX &A, size_t i1, size_t i2, size_t │ │ │ │ -j1, size_t j2) │ │ │ │ -extract submatrix, slice semantics, i.e. │ │ │ │ -DDeeffiinniittiioonn Matrix.h:181 │ │ │ │ -_g_t_s_a_m_:_:_t_r_a_n_s │ │ │ │ -Matrix trans(const Matrix &A) │ │ │ │ -static transpose function, just calls Eigen transpose member function │ │ │ │ -DDeeffiinniittiioonn Matrix.h:242 │ │ │ │ -_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ -bool operator!=(const Matrix &A, const Matrix &B) │ │ │ │ -inequality │ │ │ │ -DDeeffiinniittiioonn Matrix.h:107 │ │ │ │ -_g_t_s_a_m_:_:_D_L_T │ │ │ │ -boost::tuple< int, double, Vector > DLT(const Matrix &A, double rank_tol) │ │ │ │ -Direct linear transform algorithm that calls svd to find a vector v that │ │ │ │ -minimizes the algebraic erro... │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:568 │ │ │ │ -_g_t_s_a_m_:_:_c_h_o_l_e_s_k_y___i_n_v_e_r_s_e │ │ │ │ -Matrix cholesky_inverse(const Matrix &A) │ │ │ │ -Return the inverse of a S.P.D. │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:539 │ │ │ │ -_g_t_s_a_m_:_:_p_r_o_d │ │ │ │ -MATRIX prod(const MATRIX &A, const MATRIX &B) │ │ │ │ -products using old-style format to improve compatibility │ │ │ │ -DDeeffiinniittiioonn Matrix.h:144 │ │ │ │ -_g_t_s_a_m_:_:_h_o_u_s_e_h_o_l_d_e_r__ │ │ │ │ -void householder_(Matrix &A, size_t k, bool copy_vectors) │ │ │ │ -Imperative version of Householder QR factorization, Golub & Van Loan p 224 │ │ │ │ -version with Householder v... │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:327 │ │ │ │ -_g_t_s_a_m_:_:_i_n_s_e_r_t_S_u_b │ │ │ │ -void insertSub(Eigen::MatrixBase< Derived1 > &fullMatrix, const Eigen:: │ │ │ │ -MatrixBase< Derived2 > &subMatrix, size_t i, size_t j) │ │ │ │ -insert a submatrix IN PLACE at a specified location in a larger matrix NOTE: │ │ │ │ -there is no size checkin... │ │ │ │ -DDeeffiinniittiioonn Matrix.h:195 │ │ │ │ -_g_t_s_a_m_:_:_c_o_l_l_e_c_t │ │ │ │ -Matrix collect(const std::vector< const Matrix * > &matrices, size_t m, size_t │ │ │ │ -n) │ │ │ │ -create a matrix by concatenating Given a set of matrices: A1, A2, A3... If all │ │ │ │ -matrices have the same... │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:443 │ │ │ │ -_g_t_s_a_m_:_:_l_i_n_e_a_r___i_n_d_e_p_e_n_d_e_n_t │ │ │ │ -bool linear_independent(const Matrix &A, const Matrix &B, double tol) │ │ │ │ -check whether the rows of two matrices are linear independent │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:103 │ │ │ │ -_g_t_s_a_m_:_:_f_p_E_q_u_a_l │ │ │ │ -bool fpEqual(double a, double b, double tol, bool check_relative_also) │ │ │ │ -Ensure we are not including a different version of Eigen in user code than │ │ │ │ -while compiling gtsam,... │ │ │ │ -DDeeffiinniittiioonn Vector.cpp:42 │ │ │ │ -_g_t_s_a_m_:_:_q_r │ │ │ │ -pair< Matrix, Matrix > qr(const Matrix &A) │ │ │ │ -Householder QR factorization, Golub & Van Loan p 224, explicit version │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:235 │ │ │ │ -_g_t_s_a_m_:_:_d_i_a_g │ │ │ │ -Matrix diag(const std::vector< Matrix > &Hs) │ │ │ │ -Create a matrix with submatrices along its diagonal. │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:207 │ │ │ │ -_g_t_s_a_m_:_:_e_q_u_a_l___w_i_t_h___a_b_s___t_o_l │ │ │ │ -bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen:: │ │ │ │ -DenseBase< MATRIX > &B, double tol=1e-9) │ │ │ │ -equals with a tolerance │ │ │ │ -DDeeffiinniittiioonn Matrix.h:81 │ │ │ │ -_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ -bool operator==(const Matrix &A, const Matrix &B) │ │ │ │ -equality is just equal_with_abs_tol 1e-9 │ │ │ │ -DDeeffiinniittiioonn Matrix.h:100 │ │ │ │ -_g_t_s_a_m_:_:_i_n_v_e_r_s_e___s_q_u_a_r_e___r_o_o_t │ │ │ │ -Matrix inverse_square_root(const Matrix &A) │ │ │ │ -Use Cholesky to calculate inverse square root of a matrix. │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:552 │ │ │ │ -_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ -A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ -that can be centered ... │ │ │ │ -DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_R_e_s_h_a_p_e │ │ │ │ -Reshape functor. │ │ │ │ -DDeeffiinniittiioonn Matrix.h:246 │ │ │ │ -_g_t_s_a_m_:_:_M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e │ │ │ │ -Functor that implements multiplication of a vector b with the inverse of a │ │ │ │ -matrix A. │ │ │ │ -DDeeffiinniittiioonn Matrix.h:456 │ │ │ │ -_g_t_s_a_m_:_:_M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -VectorN operator()(const MatrixN &A, const VectorN &b, OptionalJacobian< N, N │ │ │ │ -*N > H1=boost::none, OptionalJacobian< N, N > H2=boost::none) const │ │ │ │ -A.inverse() * b, with optional derivatives. │ │ │ │ -DDeeffiinniittiioonn Matrix.h:461 │ │ │ │ -_g_t_s_a_m_:_:_M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e_F_u_n_c_t_i_o_n │ │ │ │ -Functor that implements multiplication with the inverse of a matrix, itself the │ │ │ │ -result of a function ... │ │ │ │ -DDeeffiinniittiioonn Matrix.h:482 │ │ │ │ -_g_t_s_a_m_:_:_M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e_F_u_n_c_t_i_o_n_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -VectorN operator()(const T &a, const VectorN &b, OptionalJacobian< N, M > │ │ │ │ -H1=boost::none, OptionalJacobian< N, N > H2=boost::none) const │ │ │ │ -f(a).inverse() * b, with optional derivatives │ │ │ │ -DDeeffiinniittiioonn Matrix.h:497 │ │ │ │ -_g_t_s_a_m_:_:_M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e_F_u_n_c_t_i_o_n_:_:_M_u_l_t_i_p_l_y_W_i_t_h_I_n_v_e_r_s_e_F_u_n_c_t_i_o_n │ │ │ │ -MultiplyWithInverseFunction(const Operator &phi) │ │ │ │ -Construct with function as explained above. │ │ │ │ -DDeeffiinniittiioonn Matrix.h:494 │ │ │ │ -_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ -OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ -either a fixed size o... │ │ │ │ -DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _M_a_t_r_i_x_._h │ │ │ │ + * cchhaarrttTTeessttiinngg..hh │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00110.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Matrix.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/DSFMap.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,159 +94,74 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces | │ │ │ +Typedefs | │ │ │ Functions
│ │ │ -
Matrix.cpp File Reference
│ │ │ +
DSFMap.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

matrix class │ │ │ +

Allow for arbitrary type in DSF. │ │ │ More...

│ │ │ + │ │ │ +

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

class  gtsam::DSFMap< KEY >
 Disjoint set forest using an STL map data structure underneath Uses rank compression and union by rank, iterator version. More...
 
struct  gtsam::DSFMap< KEY >::Entry
 We store the forest in an STL map, but parents are done with pointers. More...
 
class  gtsam::IndexPair
 Small utility class for representing a wrappable pairs of ints. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Typedefs

│ │ │ +typedef std::vector< IndexPairgtsam::IndexPairVector
 
│ │ │ +typedef std::set< IndexPairgtsam::IndexPairSet
 
│ │ │ +typedef std::map< IndexPair, IndexPairSet > gtsam::IndexPairSetMap
 
│ │ │ +typedef DSFMap< IndexPairgtsam::DSFMapIndexPair
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

│ │ │ -bool gtsam::assert_equal (const Matrix &A, const Matrix &B, double tol=1e-9)
 equals with an tolerance, prints out message if unequal
 
│ │ │ -bool gtsam::assert_inequal (const Matrix &A, const Matrix &B, double tol=1e-9)
 inequals with an tolerance, prints out message if within tolerance
 
│ │ │ -bool gtsam::assert_equal (const std::list< Matrix > &As, const std::list< Matrix > &Bs, double tol=1e-9)
 equals with an tolerance, prints out message if unequal
 
│ │ │ -bool gtsam::linear_independent (const Matrix &A, const Matrix &B, double tol=1e-9)
 check whether the rows of two matrices are linear independent
 
│ │ │ -bool gtsam::linear_dependent (const Matrix &A, const Matrix &B, double tol=1e-9)
 check whether the rows of two matrices are linear dependent
 
│ │ │ -Vector gtsam::operator^ (const Matrix &A, const Vector &v)
 overload ^ for trans(A)*v We transpose the vectors for speed.
 
│ │ │ -const Eigen::IOFormat & gtsam::matlabFormat ()
 
│ │ │ -void gtsam::print (const Matrix &A, const std::string &s, std::ostream &stream)
 print without optional string, must specify cout yourself
 
│ │ │ -void gtsam::print (const Matrix &A, const std::string &s="")
 print with optional string to cout
 
│ │ │ -void gtsam::save (const Matrix &A, const std::string &s, const std::string &filename)
 save a matrix to file, which can be loaded by matlab
 
istream & gtsam::operator>> (std::istream &inputStream, Matrix &destinationMatrix)
 Read a matrix from an input stream, such as a file.
 
│ │ │ -Matrix gtsam::diag (const std::vector< Matrix > &Hs)
 Create a matrix with submatrices along its diagonal.
 
│ │ │ -Vector gtsam::columnNormSquare (const Matrix &A)
 
pair< Matrix, Matrix > gtsam::qr (const Matrix &A)
 Householder QR factorization, Golub & Van Loan p 224, explicit version
│ │ │ -
 
list< boost::tuple< Vector, double, double > > gtsam::weighted_eliminate (Matrix &A, Vector &b, const Vector &sigmas)
 Imperative algorithm for in-place full elimination with weights and constraint handling.
 
void gtsam::householder_ (Matrix &A, size_t k, bool copy_vectors)
 Imperative version of Householder QR factorization, Golub & Van Loan p 224 version with Householder vectors below diagonal, as in GVL.
 
void gtsam::householder (Matrix &A, size_t k)
 Householder tranformation, zeros below diagonal.
 
Vector gtsam::backSubstituteLower (const Matrix &L, const Vector &b, bool unit=false)
 backSubstitute L*x=b
 
Vector gtsam::backSubstituteUpper (const Matrix &U, const Vector &b, bool unit=false)
 backSubstitute U*x=b
 
Vector gtsam::backSubstituteUpper (const Vector &b, const Matrix &U, bool unit=false)
 backSubstitute x'*U=b'
 
Matrix gtsam::stack (size_t nrMatrices,...)
 create a matrix by stacking other matrices Given a set of matrices: A1, A2, A3...
 
│ │ │ -Matrix gtsam::stack (const std::vector< Matrix > &blocks)
 
Matrix gtsam::collect (const std::vector< const Matrix * > &matrices, size_t m=0, size_t n=0)
 create a matrix by concatenating Given a set of matrices: A1, A2, A3... If all matrices have the same size, specifying single matrix dimensions will avoid the lookup of dimensions
 
│ │ │ -Matrix gtsam::collect (size_t nrMatrices,...)
 
void gtsam::vector_scale_inplace (const Vector &v, Matrix &A, bool inf_mask=false)
 scales a matrix row or column by the values in a vector Arguments (Matrix, Vector) scales the columns, (Vector, Matrix) scales the rows
 
│ │ │ -Matrix gtsam::vector_scale (const Vector &v, const Matrix &A, bool inf_mask)
 
│ │ │ -Matrix gtsam::vector_scale (const Matrix &A, const Vector &v, bool inf_mask)
 
│ │ │ -Matrix gtsam::LLt (const Matrix &A)
 
│ │ │ -Matrix gtsam::RtR (const Matrix &A)
 
Matrix gtsam::cholesky_inverse (const Matrix &A)
 Return the inverse of a S.P.D.
 
│ │ │ -Matrix gtsam::inverse_square_root (const Matrix &A)
 Use Cholesky to calculate inverse square root of a matrix.
 
void gtsam::svd (const Matrix &A, Matrix &U, Vector &S, Matrix &V)
 SVD computes economy SVD A=U*S*V'.
 
boost::tuple< int, double, Vector > gtsam::DLT (const Matrix &A, double rank_tol=1e-9)
 Direct linear transform algorithm that calls svd to find a vector v that minimizes the algebraic error A*v.
 
Matrix gtsam::expm (const Matrix &A, size_t K=7)
 Numerical exponential map, naive approach, not industrial strength !!!
 
│ │ │ -std::string gtsam::formatMatrixIndented (const std::string &label, const Matrix &matrix, bool makeVectorHorizontal)
 
void gtsam::inplace_QR (Matrix &A)
 QR factorization using Eigen's internal block QR algorithm.
 
│ │ │ +IndexPairVector gtsam::IndexPairSetAsArray (IndexPairSet &set)
 
│ │ │

Detailed Description

│ │ │ -

matrix class

│ │ │ -
Author
Christian Potthast
│ │ │ +

Allow for arbitrary type in DSF.

│ │ │ +
Date
Oct 26, 2013
│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,179 +1,48 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Matrix.cpp File Reference │ │ │ │ -matrix class _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +DSFMap.h File Reference │ │ │ │ +Allow for arbitrary type in DSF. _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ + class   _g_t_s_a_m_:_:_D_S_F_M_a_p_<_ _K_E_Y_ _> │ │ │ │ +  Disjoint set forest using an STL map data structure underneath Uses │ │ │ │ + rank compression and union by rank, iterator version. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_D_S_F_M_a_p_<_ _K_E_Y_ _>_:_:_E_n_t_r_y │ │ │ │ +  We store the forest in an STL map, but parents are done with pointers. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ + class   _g_t_s_a_m_:_:_I_n_d_e_x_P_a_i_r │ │ │ │ +  Small utility class for representing a wrappable pairs of ints. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +TTyyppeeddeeffss │ │ │ │ + typedef std::vector< _I_n_d_e_x_P_a_i_r >  ggttssaamm::::IInnddeexxPPaaiirrVVeeccttoorr │ │ │ │ +  │ │ │ │ + typedef std::set< _I_n_d_e_x_P_a_i_r >  ggttssaamm::::IInnddeexxPPaaiirrSSeett │ │ │ │ +  │ │ │ │ +typedef std::map< _I_n_d_e_x_P_a_i_r, IndexPairSet >  ggttssaamm::::IInnddeexxPPaaiirrSSeettMMaapp │ │ │ │ +  │ │ │ │ + typedef _D_S_F_M_a_p< _I_n_d_e_x_P_a_i_r >  ggttssaamm::::DDSSFFMMaappIInnddeexxPPaaiirr │ │ │ │ +  │ │ │ │ FFuunnccttiioonnss │ │ │ │ - bool  ggttssaamm::::aasssseerrtt__eeqquuaall (const Matrix &A, │ │ │ │ - const Matrix &B, double tol=1e-9) │ │ │ │ -  equals with an tolerance, prints out │ │ │ │ - message if unequal │ │ │ │ -  │ │ │ │ - bool  ggttssaamm::::aasssseerrtt__iinneeqquuaall (const Matrix &A, │ │ │ │ - const Matrix &B, double tol=1e-9) │ │ │ │ -  inequals with an tolerance, prints out │ │ │ │ - message if within tolerance │ │ │ │ -  │ │ │ │ - bool  ggttssaamm::::aasssseerrtt__eeqquuaall (const std::list< │ │ │ │ - Matrix > &As, const std::list< Matrix > │ │ │ │ - &Bs, double tol=1e-9) │ │ │ │ -  equals with an tolerance, prints out │ │ │ │ - message if unequal │ │ │ │ -  │ │ │ │ - bool  ggttssaamm::::lliinneeaarr__iinnddeeppeennddeenntt (const Matrix │ │ │ │ - &A, const Matrix &B, double tol=1e-9) │ │ │ │ -  check whether the rows of two matrices are │ │ │ │ - linear independent │ │ │ │ -  │ │ │ │ - bool  ggttssaamm::::lliinneeaarr__ddeeppeennddeenntt (const Matrix &A, │ │ │ │ - const Matrix &B, double tol=1e-9) │ │ │ │ -  check whether the rows of two matrices are │ │ │ │ - linear dependent │ │ │ │ -  │ │ │ │ - Vector  ggttssaamm::::ooppeerraattoorr^^ (const Matrix &A, const │ │ │ │ - Vector &v) │ │ │ │ -  overload ^ for trans(A)*v We transpose the │ │ │ │ - vectors for speed. │ │ │ │ -  │ │ │ │ - const Eigen::IOFormat &  ggttssaamm::::mmaattllaabbFFoorrmmaatt () │ │ │ │ -  │ │ │ │ - void  ggttssaamm::::pprriinntt (const Matrix &A, const std:: │ │ │ │ - string &s, std::ostream &stream) │ │ │ │ -  print without optional string, must │ │ │ │ - specify cout yourself │ │ │ │ -  │ │ │ │ - void  ggttssaamm::::pprriinntt (const Matrix &A, const std:: │ │ │ │ - string &s="") │ │ │ │ -  print with optional string to cout │ │ │ │ -  │ │ │ │ - void  ggttssaamm::::ssaavvee (const Matrix &A, const std:: │ │ │ │ - string &s, const std::string &filename) │ │ │ │ -  save a matrix to file, which can be loaded │ │ │ │ - by matlab │ │ │ │ -  │ │ │ │ - istream &  _g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_>_> (std::istream │ │ │ │ - &inputStream, Matrix &destinationMatrix) │ │ │ │ -  Read a matrix from an input stream, such │ │ │ │ - as a file. │ │ │ │ -  │ │ │ │ - Matrix  ggttssaamm::::ddiiaagg (const std::vector< Matrix > │ │ │ │ - &Hs) │ │ │ │ -  Create a matrix with submatrices along its │ │ │ │ - diagonal. │ │ │ │ -  │ │ │ │ - Vector  ggttssaamm::::ccoolluummnnNNoorrmmSSqquuaarree (const Matrix &A) │ │ │ │ -  │ │ │ │ - pair< Matrix, Matrix >  _g_t_s_a_m_:_:_q_r (const Matrix &A) │ │ │ │ - Householder QR factorization, Golub & Van │ │ │ │ -  Loan p 224, explicit version │ │ │ │ - │ │ │ │ -  │ │ │ │ - list< boost::tuple< Vector, double, _g_t_s_a_m_:_:_w_e_i_g_h_t_e_d___e_l_i_m_i_n_a_t_e (Matrix &A, │ │ │ │ - double > >  Vector &b, const Vector &sigmas) │ │ │ │ - Imperative algorithm for in-place full │ │ │ │ -  elimination with weights and constraint │ │ │ │ - handling. │ │ │ │ -  │ │ │ │ - void  _g_t_s_a_m_:_:_h_o_u_s_e_h_o_l_d_e_r__ (Matrix &A, size_t k, │ │ │ │ - bool copy_vectors) │ │ │ │ - Imperative version of Householder QR │ │ │ │ -  factorization, Golub & Van Loan p 224 │ │ │ │ - version with Householder vectors below │ │ │ │ - diagonal, as in GVL. │ │ │ │ -  │ │ │ │ - void  _g_t_s_a_m_:_:_h_o_u_s_e_h_o_l_d_e_r (Matrix &A, size_t k) │ │ │ │ -  Householder tranformation, zeros below │ │ │ │ - diagonal. │ │ │ │ -  │ │ │ │ - Vector  _g_t_s_a_m_:_:_b_a_c_k_S_u_b_s_t_i_t_u_t_e_L_o_w_e_r (const Matrix │ │ │ │ - &L, const Vector &b, bool unit=false) │ │ │ │ -  backSubstitute L*x=b │ │ │ │ -  │ │ │ │ - Vector  _g_t_s_a_m_:_:_b_a_c_k_S_u_b_s_t_i_t_u_t_e_U_p_p_e_r (const Matrix │ │ │ │ - &U, const Vector &b, bool unit=false) │ │ │ │ -  backSubstitute U*x=b │ │ │ │ -  │ │ │ │ - Vector  _g_t_s_a_m_:_:_b_a_c_k_S_u_b_s_t_i_t_u_t_e_U_p_p_e_r (const Vector │ │ │ │ - &b, const Matrix &U, bool unit=false) │ │ │ │ -  backSubstitute x'*U=b' │ │ │ │ -  │ │ │ │ - Matrix  _g_t_s_a_m_:_:_s_t_a_c_k (size_t nrMatrices,...) │ │ │ │ -  create a matrix by stacking other matrices │ │ │ │ - Given a set of matrices: A1, A2, A3... │ │ │ │ -  │ │ │ │ - Matrix  ggttssaamm::::ssttaacckk (const std::vector< Matrix > │ │ │ │ - &blocks) │ │ │ │ -  │ │ │ │ - Matrix  _g_t_s_a_m_:_:_c_o_l_l_e_c_t (const std::vector< const │ │ │ │ - Matrix * > &matrices, size_t m=0, size_t │ │ │ │ - n=0) │ │ │ │ - create a matrix by concatenating Given a │ │ │ │ - set of matrices: A1, A2, A3... If all │ │ │ │ -  matrices have the same size, specifying │ │ │ │ - single matrix dimensions will avoid the │ │ │ │ - lookup of dimensions │ │ │ │ -  │ │ │ │ - Matrix  ggttssaamm::::ccoolllleecctt (size_t nrMatrices,...) │ │ │ │ -  │ │ │ │ - void  _g_t_s_a_m_:_:_v_e_c_t_o_r___s_c_a_l_e___i_n_p_l_a_c_e (const Vector │ │ │ │ - &v, Matrix &A, bool inf_mask=false) │ │ │ │ - scales a matrix row or column by the │ │ │ │ -  values in a vector Arguments (Matrix, │ │ │ │ - Vector) scales the columns, (Vector, │ │ │ │ - Matrix) scales the rows │ │ │ │ -  │ │ │ │ - Matrix  ggttssaamm::::vveeccttoorr__ssccaallee (const Vector &v, │ │ │ │ - const Matrix &A, bool inf_mask) │ │ │ │ -  │ │ │ │ - Matrix  ggttssaamm::::vveeccttoorr__ssccaallee (const Matrix &A, │ │ │ │ - const Vector &v, bool inf_mask) │ │ │ │ -  │ │ │ │ - Matrix  ggttssaamm::::LLLLtt (const Matrix &A) │ │ │ │ -  │ │ │ │ - Matrix  ggttssaamm::::RRttRR (const Matrix &A) │ │ │ │ -  │ │ │ │ - Matrix  _g_t_s_a_m_:_:_c_h_o_l_e_s_k_y___i_n_v_e_r_s_e (const Matrix &A) │ │ │ │ -  Return the inverse of a S.P.D. │ │ │ │ -  │ │ │ │ - Matrix  ggttssaamm::::iinnvveerrssee__ssqquuaarree__rroooott (const Matrix │ │ │ │ - &A) │ │ │ │ -  Use Cholesky to calculate inverse square │ │ │ │ - root of a matrix. │ │ │ │ -  │ │ │ │ - void  _g_t_s_a_m_:_:_s_v_d (const Matrix &A, Matrix &U, │ │ │ │ - Vector &S, Matrix &V) │ │ │ │ -  SVD computes economy SVD A=U*S*V'. │ │ │ │ -  │ │ │ │ -boost::tuple< int, double, Vector >  _g_t_s_a_m_:_:_D_L_T (const Matrix &A, double │ │ │ │ - rank_tol=1e-9) │ │ │ │ - Direct linear transform algorithm that │ │ │ │ -  calls svd to find a vector v that │ │ │ │ - minimizes the algebraic error A*v. │ │ │ │ -  │ │ │ │ - Matrix  _g_t_s_a_m_:_:_e_x_p_m (const Matrix &A, size_t K=7) │ │ │ │ -  Numerical exponential map, naive approach, │ │ │ │ - not industrial strength !!! │ │ │ │ -  │ │ │ │ - std::string  ggttssaamm::::ffoorrmmaattMMaattrriixxIInnddeenntteedd (const std:: │ │ │ │ - string &label, const Matrix &matrix, bool │ │ │ │ - makeVectorHorizontal) │ │ │ │ -  │ │ │ │ - void  _g_t_s_a_m_:_:_i_n_p_l_a_c_e___Q_R (Matrix &A) │ │ │ │ -  QR factorization using Eigen's internal │ │ │ │ - block QR algorithm. │ │ │ │ +IndexPairVector  ggttssaamm::::IInnddeexxPPaaiirrSSeettAAssAArrrraayy (IndexPairSet &set) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -matrix class │ │ │ │ +Allow for arbitrary type in DSF. │ │ │ │ + Date │ │ │ │ + Oct 26, 2013 │ │ │ │ Author │ │ │ │ - Christian Potthast │ │ │ │ + Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _M_a_t_r_i_x_._c_p_p │ │ │ │ + * _D_S_F_M_a_p_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00110.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,29 +1,4 @@ │ │ │ │ var a00110 = [ │ │ │ │ - ["assert_equal", "a00110.html#a3f9622226dfe06908f11b42bf0bdd22d", null], │ │ │ │ - ["assert_equal", "a00110.html#abb0e19bbbeaca95843e8161b89a12fda", null], │ │ │ │ - ["assert_inequal", "a00110.html#a7a116d0643f123ef3b15d91056506492", null], │ │ │ │ - ["backSubstituteLower", "a00110.html#a0d998e1b770c9864946ddb031b1c4522", null], │ │ │ │ - ["backSubstituteUpper", "a00110.html#a6c4876cbe85d5651a52eda0e97c60f2f", null], │ │ │ │ - ["backSubstituteUpper", "a00110.html#a8b0bf332d52b333dab2b20d763c8925b", null], │ │ │ │ - ["cholesky_inverse", "a00110.html#aba542e2cd85f08b76f80a0871a4ea713", null], │ │ │ │ - ["collect", "a00110.html#ad8b524ba6c9aed0d21a020999c9b5d88", null], │ │ │ │ - ["diag", "a00110.html#af1c32907adce74cf9edd6ee5bba5a085", null], │ │ │ │ - ["DLT", "a00110.html#ab2c65f1a69009a306b6a5f9ef31dcee2", null], │ │ │ │ - ["expm", "a00110.html#ab15462d8c16813d0a7a5b1f76a2f64b7", null], │ │ │ │ - ["householder", "a00110.html#a7baa2f3184a444adce108633c0265e0c", null], │ │ │ │ - ["householder_", "a00110.html#abdd1ab05e8ac90b340fbd8f3b322dc6d", null], │ │ │ │ - ["inplace_QR", "a00110.html#a7eec9339ab5a008a28ddfaa6b2c94611", null], │ │ │ │ - ["inverse_square_root", "a00110.html#aff78dee59ac0250432081f39deb5f6d1", null], │ │ │ │ - ["linear_dependent", "a00110.html#a4b81794af72954abafbb726fc712f5db", null], │ │ │ │ - ["linear_independent", "a00110.html#ad8f0349471464c1fb515819d9503849a", null], │ │ │ │ - ["operator>>", "a00110.html#a7d85957bab2d18cf56ab9aaf95a106de", null], │ │ │ │ - ["operator^", "a00110.html#a2218e53a2b99c449e70aa5b7805895fc", null], │ │ │ │ - ["print", "a00110.html#a54fa43c89c5334314c8c75939dd5c2d7", null], │ │ │ │ - ["print", "a00110.html#a44ead03912d5dcf094d8421e1702ee71", null], │ │ │ │ - ["qr", "a00110.html#ae32c295e2c40c1e85f146a8a6266eaa8", null], │ │ │ │ - ["save", "a00110.html#a3eb7eed9019d3fda8fcf74fbf85b85c9", null], │ │ │ │ - ["stack", "a00110.html#a5c82884a356ddd09229a5283aed04df9", null], │ │ │ │ - ["svd", "a00110.html#a8d7e46204d953f64a39445599dbd7eee", null], │ │ │ │ - ["vector_scale_inplace", "a00110.html#a24d3ad0252f91f0ec301593c45cf5af7", null], │ │ │ │ - ["weighted_eliminate", "a00110.html#a60019a03f26b92c6b2a08e43d153d4c0", null] │ │ │ │ + ["gtsam::DSFMap< KEY >::Entry", "a02288.html", null], │ │ │ │ + ["gtsam::IndexPair", "a02292.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00113.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Manifold.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Lie.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,82 +98,134 @@ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ Macros | │ │ │ Functions
│ │ │ -
Manifold.h File Reference
│ │ │ +
Lie.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Base class and basic functions for Manifold types. │ │ │ +

Base class and basic functions for Lie types. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │

│ │ │ Classes

struct  gtsam::manifold_tag
 tag to assert a type is a manifold More...
struct  gtsam::LieGroup< Class, N >
 A CRTP helper class that implements Lie group methods Prerequisites: methods operator*, inverse, and AdjointMap, as well as a ChartAtOrigin struct that will be used to define the manifold Chart To use, simply derive, but also say "using LieGroup<Class,N>::inverse" For derivative math, see doc/math.pdf. More...
 
struct  gtsam::internal::HasManifoldPrereqs< Class >
 Requirements on type to pass it to Manifold template below. More...
struct  gtsam::lie_group_tag
 tag to assert a type is a Lie group More...
 
struct  gtsam::internal::GetDimensionImpl< Class, N >
 Extra manifold traits for fixed-dimension types. More...
struct  gtsam::internal::LieGroupTraits< Class >
 A helper class that implements the traits interface for GTSAM lie groups. More...
 
struct  gtsam::internal::GetDimensionImpl< Class, Eigen::Dynamic >
 Extra manifold traits for variable-dimension types. More...
struct  gtsam::internal::LieGroup< Class >
 Both LieGroupTraits and Testable. More...
 
struct  gtsam::internal::ManifoldTraits< Class >
 A helper that implements the traits interface for GTSAM manifolds. More...
class  gtsam::IsLieGroup< T >
 Lie Group Concept. More...
 
struct  gtsam::internal::Manifold< Class >
 Both ManifoldTraits and Testable. More...
 
struct  gtsam::FixedDimension< T >
 Give fixed size dimension of a type, fails at compile time if dynamic. More...
class  gtsam::TransformCovariance< T >
 Functor for transforming covariance of T. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Macros

│ │ │ -#define GTSAM_CONCEPT_MANIFOLD_INST(T)   template class gtsam::IsManifold<T>;
 ‍**
 
│ │ │ -#define GTSAM_CONCEPT_MANIFOLD_TYPE(T)   using _gtsam_IsManifold_##T = gtsam::IsManifold<T>;
 
#define GTSAM_CONCEPT_LIE_INST(T)   template class gtsam::IsLieGroup<T>;
 Macros for using the LieConcept.
 
│ │ │ +#define GTSAM_CONCEPT_LIE_TYPE(T)   using _gtsam_IsLieGroup_##T = gtsam::IsLieGroup<T>;
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

│ │ │ -template<typename T >
 gtsam::BOOST_CONCEPT_REQUIRES (((IsTestable< T >)),(bool)) check_manifold_invariants(const T &a
 Check invariants for Manifold type.
 
template<class Class >
Class gtsam::between_default (const Class &l1, const Class &l2)
 These core global functions can be specialized by new Lie types for better performance.
 
template<class Class >
Vector gtsam::logmap_default (const Class &l0, const Class &lp)
 Log map centered at l0, s.t.
 
template<class Class >
Class gtsam::expmap_default (const Class &t, const Vector &d)
 Exponential map centered at l0, s.t.
 
template<class T >
gtsam::BCH (const T &X, const T &Y)
 Three term approximation of the Baker-Campbell-Hausdorff formula In non-commutative Lie groups, when composing exp(Z) = exp(X)exp(Y) it is not true that Z = X+Y.
 
│ │ │ +template<class T >
Matrix gtsam::wedge (const Vector &x)
 Declaration of wedge (see Murray94book) used to convert from n exponential coordinates to n*n element of the Lie algebra.
 
template<class T >
gtsam::expm (const Vector &x, int K=7)
 Exponential map given exponential coordinates class T needs a wedge<> function and a constructor from Matrix.
 
template<typename T >
gtsam::interpolate (const T &X, const T &Y, double t, typename MakeOptionalJacobian< T, T >::type Hx=boost::none, typename MakeOptionalJacobian< T, T >::type Hy=boost::none)
 Linear interpolation between X and Y by coefficient t.
 
│ │ │

Detailed Description

│ │ │ -

Base class and basic functions for Manifold types.

│ │ │ -
Author
Alex Cunningham
│ │ │ +

Base class and basic functions for Lie types.

│ │ │ +
Author
Richard Roberts
│ │ │ +
│ │ │ +Alex Cunningham
│ │ │
│ │ │ Frank Dellaert
│ │ │
│ │ │ -Mike Bosse
│ │ │ -
│ │ │ +Mike Bosse │ │ │ +
│ │ │ +Duy Nguyen Ta
│ │ │ +
│ │ │ +Yotam Stern
│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ GTSAM_CONCEPT_LIE_INST

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define GTSAM_CONCEPT_LIE_INST( T)   template class gtsam::IsLieGroup<T>;
│ │ │ +
│ │ │ + │ │ │ +

Macros for using the LieConcept.

│ │ │ +
    │ │ │ +
  • An instantiation for use inside unit tests
  • │ │ │ +
  • A typedef for use inside generic algorithms
  • │ │ │ +
│ │ │ +

NOTE: intentionally not in the gtsam namespace to allow for classes not in the gtsam namespace to be more easily enforced as testable

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,60 +1,101 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Manifold.h File Reference │ │ │ │ -Base class and basic functions for Manifold types. _M_o_r_e_._._. │ │ │ │ +Lie.h File Reference │ │ │ │ +Base class and basic functions for Lie types. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g │ │ │ │ -  tag to assert a type is a manifold _M_o_r_e_._._. │ │ │ │ +struct   _g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_<_ _C_l_a_s_s_,_ _N_ _> │ │ │ │ + A CRTP helper class that implements Lie group methods Prerequisites: │ │ │ │ + methods operator*, inverse, and AdjointMap, as well as a ChartAtOrigin │ │ │ │ +  struct that will be used to define the manifold Chart To use, simply │ │ │ │ + derive, but also say "using LieGroup::inverse" For derivative │ │ │ │ + math, see doc/math.pdf. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_l_i_e___g_r_o_u_p___t_a_g │ │ │ │ +  tag to assert a type is a Lie group _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p_T_r_a_i_t_s_<_ _C_l_a_s_s_ _> │ │ │ │ +  A helper class that implements the traits interface for GTSAM lie │ │ │ │ + groups. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_H_a_s_M_a_n_i_f_o_l_d_P_r_e_r_e_q_s_<_ _C_l_a_s_s_ _> │ │ │ │ -  Requirements on type to pass it to _M_a_n_i_f_o_l_d template below. _M_o_r_e_._._. │ │ │ │ +struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p_<_ _C_l_a_s_s_ _> │ │ │ │ +  Both _L_i_e_G_r_o_u_p_T_r_a_i_t_s and _T_e_s_t_a_b_l_e. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_G_e_t_D_i_m_e_n_s_i_o_n_I_m_p_l_<_ _C_l_a_s_s_,_ _N_ _> │ │ │ │ -  Extra manifold traits for fixed-dimension types. _M_o_r_e_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_I_s_L_i_e_G_r_o_u_p_<_ _T_ _> │ │ │ │ +  Lie Group Concept. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_G_e_t_D_i_m_e_n_s_i_o_n_I_m_p_l_<_ _C_l_a_s_s_,_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_ _> │ │ │ │ -  Extra manifold traits for variable-dimension types. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d_T_r_a_i_t_s_<_ _C_l_a_s_s_ _> │ │ │ │ -  A helper that implements the traits interface for GTSAM manifolds. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d_<_ _C_l_a_s_s_ _> │ │ │ │ -  Both _M_a_n_i_f_o_l_d_T_r_a_i_t_s and _T_e_s_t_a_b_l_e. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_F_i_x_e_d_D_i_m_e_n_s_i_o_n_<_ _T_ _> │ │ │ │ -  Give fixed size dimension of a type, fails at compile time if dynamic. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_T_r_a_n_s_f_o_r_m_C_o_v_a_r_i_a_n_c_e_<_ _T_ _> │ │ │ │ +  Functor for transforming covariance of T. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ MMaaccrrooss │ │ │ │ -#define  GGTTSSAAMM__CCOONNCCEEPPTT__MMAANNIIFFOOLLDD__IINNSSTT(T)   template class gtsam::IsManifold; │ │ │ │ -  ‍** │ │ │ │ +#define  _G_T_S_A_M___C_O_N_C_E_P_T___L_I_E___I_N_S_T(T)   template class _g_t_s_a_m_:_:_I_s_L_i_e_G_r_o_u_p; │ │ │ │ +  Macros for using the LieConcept. │ │ │ │   │ │ │ │ -#define  GGTTSSAAMM__CCOONNCCEEPPTT__MMAANNIIFFOOLLDD__TTYYPPEE(T)   using _gtsam_IsManifold_##T = gtsam:: │ │ │ │ - IsManifold; │ │ │ │ +#define  GGTTSSAAMM__CCOONNCCEEPPTT__LLIIEE__TTYYPPEE(T)   using _gtsam_IsLieGroup_##T = _g_t_s_a_m_:_: │ │ │ │ + _I_s_L_i_e_G_r_o_u_p; │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ + Class  _g_t_s_a_m_:_:_b_e_t_w_e_e_n___d_e_f_a_u_l_t (const Class &l1, const Class &l2) │ │ │ │ +  These core global functions can be specialized by new Lie types for │ │ │ │ + better performance. │ │ │ │ +  │ │ │ │ +template │ │ │ │ +Vector  _g_t_s_a_m_:_:_l_o_g_m_a_p___d_e_f_a_u_l_t (const Class &l0, const Class &lp) │ │ │ │ +  Log map centered at l0, s.t. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + Class  _g_t_s_a_m_:_:_e_x_p_m_a_p___d_e_f_a_u_l_t (const Class &t, const Vector &d) │ │ │ │ +  Exponential map centered at l0, s.t. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + T  _g_t_s_a_m_:_:_B_C_H (const T &X, const T &Y) │ │ │ │ + Three term approximation of the Baker-Campbell-Hausdorff formula In │ │ │ │ +  non-commutative Lie groups, when composing exp(Z) = exp(X)exp(Y) it is │ │ │ │ + not true that Z = X+Y. │ │ │ │ +  │ │ │ │ +template │ │ │ │ +Matrix  ggttssaamm::::wweeddggee (const Vector &x) │ │ │ │ +  Declaration of wedge (see Murray94book) used to convert from n │ │ │ │ + exponential coordinates to n*n element of the Lie algebra. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + T  _g_t_s_a_m_:_:_e_x_p_m (const Vector &x, int K=7) │ │ │ │ +  Exponential map given exponential coordinates class T needs a wedge<> │ │ │ │ + function and a constructor from Matrix. │ │ │ │ +  │ │ │ │ template │ │ │ │ -  ggttssaamm::::BBOOOOSSTT__CCOONNCCEEPPTT__RREEQQUUIIRREESS (((_I_s_T_e_s_t_a_b_l_e< T >)),(bool)) │ │ │ │ - check_manifold_invariants(const T &a │ │ │ │ -  Check invariants for Manifold type. │ │ │ │ + T  _g_t_s_a_m_:_:_i_n_t_e_r_p_o_l_a_t_e (const T &X, const T &Y, double t, typename │ │ │ │ + _M_a_k_e_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< T, T >::type Hx=boost::none, typename │ │ │ │ + _M_a_k_e_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< T, T >::type Hy=boost::none) │ │ │ │ +  Linear interpolation between X and Y by coefficient t. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Base class and basic functions for Manifold types. │ │ │ │ +Base class and basic functions for Lie types. │ │ │ │ Author │ │ │ │ + Richard Roberts │ │ │ │ Alex Cunningham │ │ │ │ Frank Dellaert │ │ │ │ Mike Bosse │ │ │ │ + Duy Nguyen Ta │ │ │ │ + Yotam Stern │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? GGTTSSAAMM__CCOONNCCEEPPTT__LLIIEE__IINNSSTT ********** │ │ │ │ +#define GTSAM_CONCEPT_LIE_INST (   T )    template class _g_t_s_a_m_:_:_I_s_L_i_e_G_r_o_u_p; │ │ │ │ +Macros for using the LieConcept. │ │ │ │ + * An instantiation for use inside unit tests │ │ │ │ + * A typedef for use inside generic algorithms │ │ │ │ +NOTE: intentionally not in the gtsam namespace to allow for classes not in the │ │ │ │ +gtsam namespace to be more easily enforced as testable │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _M_a_n_i_f_o_l_d_._h │ │ │ │ + * _L_i_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00113.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,11 +1,16 @@ │ │ │ │ var a00113 = [ │ │ │ │ - ["gtsam::manifold_tag", "a02388.html", null], │ │ │ │ - ["gtsam::internal::HasManifoldPrereqs< Class >", "a02392.html", null], │ │ │ │ - ["gtsam::internal::GetDimensionImpl< Class, N >", "a02396.html", null], │ │ │ │ - ["gtsam::internal::GetDimensionImpl< Class, Eigen::Dynamic >", "a02400.html", null], │ │ │ │ - ["gtsam::internal::ManifoldTraits< Class >", "a02404.html", null], │ │ │ │ - ["gtsam::internal::Manifold< Class >", "a02408.html", null], │ │ │ │ - ["gtsam::FixedDimension< T >", "a02412.html", null], │ │ │ │ - ["GTSAM_CONCEPT_MANIFOLD_INST", "a00113.html#a64b5e2e3c812d2cdea5ee294100f825f", null], │ │ │ │ - ["BOOST_CONCEPT_REQUIRES", "a00113.html#ae03a6aedf0a82f67c2f3e987fb3aacba", null] │ │ │ │ + ["gtsam::LieGroup< Class, N >", "a02364.html", "a02364"], │ │ │ │ + ["gtsam::lie_group_tag", "a02368.html", null], │ │ │ │ + ["gtsam::internal::LieGroupTraits< Class >", "a02372.html", null], │ │ │ │ + ["gtsam::internal::LieGroup< Class >", "a02376.html", null], │ │ │ │ + ["gtsam::IsLieGroup< T >", "a02380.html", null], │ │ │ │ + ["gtsam::TransformCovariance< T >", "a02384.html", null], │ │ │ │ + ["GTSAM_CONCEPT_LIE_INST", "a00113.html#aeef5af7d583d275fbc0e6e5af8bf2afc", null], │ │ │ │ + ["BCH", "a00113.html#adbd55c711e6ceee791b595558eb3ec8a", null], │ │ │ │ + ["between_default", "a00113.html#abd92914d0822d42584d46f31fb500048", null], │ │ │ │ + ["expm", "a00113.html#a3041816208c79ef76d3ef2e0991d90b2", null], │ │ │ │ + ["expmap_default", "a00113.html#af5a7c0a7422c38a0baa131c073e233ac", null], │ │ │ │ + ["interpolate", "a00113.html#adaf06b04fa93b050e99bc3d571d85d53", null], │ │ │ │ + ["logmap_default", "a00113.html#a5c6ccec4a3ea452361c0956766bccef5", null], │ │ │ │ + ["wedge", "a00113.html#afe28b7f8e3592fb9f5cf9ebae09497ba", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00113_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Manifold.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Lie.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,189 +98,382 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Manifold.h
│ │ │ +
Lie.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
20#pragma once
│ │ │ -
21
│ │ │ -
22#include <gtsam/base/Matrix.h>
│ │ │ -
23#include <gtsam/base/Testable.h>
│ │ │ - │ │ │ +
24#pragma once
│ │ │
25
│ │ │ -
26#include <boost/concept_check.hpp>
│ │ │ -
27#include <boost/concept/requires.hpp>
│ │ │ -
28#include <boost/type_traits/is_base_of.hpp>
│ │ │ -
29
│ │ │ -
30namespace gtsam {
│ │ │ -
31
│ │ │ -
33struct manifold_tag {};
│ │ │ -
34
│ │ │ -
53template <typename T> struct traits;
│ │ │ -
54
│ │ │ -
55namespace internal {
│ │ │ -
56
│ │ │ -
58template<class Class>
│ │ │ -
│ │ │ - │ │ │ -
60
│ │ │ -
61 enum { dim = Class::dimension };
│ │ │ +
26#include <gtsam/base/Manifold.h>
│ │ │ +
27#include <gtsam/base/Group.h>
│ │ │ +
28
│ │ │ +
29namespace gtsam {
│ │ │ +
30
│ │ │ +
36template <class Class, int N>
│ │ │ +
│ │ │ +
37struct LieGroup {
│ │ │ +
38
│ │ │ +
39 enum { dimension = N };
│ │ │ +
40 typedef OptionalJacobian<N, N> ChartJacobian;
│ │ │ +
41 typedef Eigen::Matrix<double, N, N> Jacobian;
│ │ │ +
42 typedef Eigen::Matrix<double, N, 1> TangentVector;
│ │ │ +
43
│ │ │ +
44 const Class & derived() const {
│ │ │ +
45 return static_cast<const Class&>(*this);
│ │ │ +
46 }
│ │ │ +
47
│ │ │ +
48 Class compose(const Class& g) const {
│ │ │ +
49 return derived() * g;
│ │ │ +
50 }
│ │ │ +
51
│ │ │ +
52 Class between(const Class& g) const {
│ │ │ +
53 return derived().inverse() * g;
│ │ │ +
54 }
│ │ │ +
55
│ │ │ +
56 Class compose(const Class& g, ChartJacobian H1,
│ │ │ +
57 ChartJacobian H2 = boost::none) const {
│ │ │ +
58 if (H1) *H1 = g.inverse().AdjointMap();
│ │ │ +
59 if (H2) *H2 = Eigen::Matrix<double, N, N>::Identity();
│ │ │ +
60 return derived() * g;
│ │ │ +
61 }
│ │ │
62
│ │ │ -
63 Class p, q;
│ │ │ -
64 Eigen::Matrix<double, dim, 1> v;
│ │ │ - │ │ │ -
66
│ │ │ -
67 BOOST_CONCEPT_USAGE(HasManifoldPrereqs) {
│ │ │ -
68 v = p.localCoordinates(q);
│ │ │ -
69 q = p.retract(v);
│ │ │ -
70 }
│ │ │ -
71};
│ │ │ -
│ │ │ -
72
│ │ │ -
74template<class Class, int N>
│ │ │ -
│ │ │ - │ │ │ -
76 // Compile-time dimensionality
│ │ │ -
77 static int GetDimension(const Class&) {
│ │ │ -
78 return N;
│ │ │ -
79 }
│ │ │ -
80};
│ │ │ +
63 Class between(const Class& g, ChartJacobian H1,
│ │ │ +
64 ChartJacobian H2 = boost::none) const {
│ │ │ +
65 Class result = derived().inverse() * g;
│ │ │ +
66 if (H1) *H1 = - result.inverse().AdjointMap();
│ │ │ +
67 if (H2) *H2 = Eigen::Matrix<double, N, N>::Identity();
│ │ │ +
68 return result;
│ │ │ +
69 }
│ │ │ +
70
│ │ │ +
71 Class inverse(ChartJacobian H) const {
│ │ │ +
72 if (H) *H = - derived().AdjointMap();
│ │ │ +
73 return derived().inverse();
│ │ │ +
74 }
│ │ │ +
75
│ │ │ +
│ │ │ +
78 Class expmap(const TangentVector& v) const {
│ │ │ +
79 return compose(Class::Expmap(v));
│ │ │ +
80 }
│ │ │
│ │ │
81
│ │ │ -
83template<class Class>
│ │ │ -
│ │ │ -
84struct GetDimensionImpl<Class, Eigen::Dynamic> {
│ │ │ -
85 // Run-time dimensionality
│ │ │ -
86 static int GetDimension(const Class& m) {
│ │ │ -
87 return m.dim();
│ │ │ -
88 }
│ │ │ -
89};
│ │ │ -
│ │ │ -
90
│ │ │ -
94template<class Class>
│ │ │ -
│ │ │ -
95struct ManifoldTraits: GetDimensionImpl<Class, Class::dimension> {
│ │ │ -
96
│ │ │ -
97 // Check that Class has the necessary machinery
│ │ │ -
98 BOOST_CONCEPT_ASSERT((HasManifoldPrereqs<Class>));
│ │ │ -
99
│ │ │ -
100 // Dimension of the manifold
│ │ │ -
101 enum { dimension = Class::dimension };
│ │ │ -
102
│ │ │ -
103 // Typedefs required by all manifold types.
│ │ │ -
104 typedef Class ManifoldType;
│ │ │ - │ │ │ -
106 typedef Eigen::Matrix<double, dimension, 1> TangentVector;
│ │ │ -
107
│ │ │ -
108 // Local coordinates
│ │ │ -
109 static TangentVector Local(const Class& origin, const Class& other) {
│ │ │ -
110 return origin.localCoordinates(other);
│ │ │ -
111 }
│ │ │ -
112
│ │ │ -
113 // Retraction back to manifold
│ │ │ -
114 static Class Retract(const Class& origin, const TangentVector& v) {
│ │ │ -
115 return origin.retract(v);
│ │ │ -
116 }
│ │ │ -
117};
│ │ │ -
│ │ │ -
118
│ │ │ -
120template<class Class> struct Manifold: ManifoldTraits<Class>, Testable<Class> {};
│ │ │ -
121
│ │ │ -
122} // \ namespace internal
│ │ │ -
123
│ │ │ -
125template<typename T>
│ │ │ - │ │ │ -
127check_manifold_invariants(const T& a, const T& b, double tol=1e-9) {
│ │ │ - │ │ │ - │ │ │ -
130 T c = traits<T>::Retract(a,v);
│ │ │ -
131 return v0.norm() < tol && traits<T>::Equals(b,c,tol);
│ │ │ -
132}
│ │ │ -
133
│ │ │ -
135template<typename T>
│ │ │ -
136class IsManifold {
│ │ │ -
137
│ │ │ -
138public:
│ │ │ +
│ │ │ +
84 TangentVector logmap(const Class& g) const {
│ │ │ +
85 return Class::Logmap(between(g));
│ │ │ +
86 }
│ │ │ +
│ │ │ +
87
│ │ │ +
│ │ │ +
89 Class expmap(const TangentVector& v, //
│ │ │ +
90 ChartJacobian H1, ChartJacobian H2 = boost::none) const {
│ │ │ +
91 Jacobian D_g_v;
│ │ │ +
92 Class g = Class::Expmap(v,H2 ? &D_g_v : 0);
│ │ │ +
93 Class h = compose(g); // derivatives inlined below
│ │ │ +
94 if (H1) *H1 = g.inverse().AdjointMap();
│ │ │ +
95 if (H2) *H2 = D_g_v;
│ │ │ +
96 return h;
│ │ │ +
97 }
│ │ │ +
│ │ │ +
98
│ │ │ +
│ │ │ +
100 TangentVector logmap(const Class& g, //
│ │ │ +
101 ChartJacobian H1, ChartJacobian H2 = boost::none) const {
│ │ │ +
102 Class h = between(g); // derivatives inlined below
│ │ │ +
103 Jacobian D_v_h;
│ │ │ +
104 TangentVector v = Class::Logmap(h, (H1 || H2) ? &D_v_h : 0);
│ │ │ +
105 if (H1) *H1 = - D_v_h * h.inverse().AdjointMap();
│ │ │ +
106 if (H2) *H2 = D_v_h;
│ │ │ +
107 return v;
│ │ │ +
108 }
│ │ │ +
│ │ │ +
109
│ │ │ +
│ │ │ +
111 static Class Retract(const TangentVector& v) {
│ │ │ +
112 return Class::ChartAtOrigin::Retract(v);
│ │ │ +
113 }
│ │ │ +
│ │ │ +
114
│ │ │ +
│ │ │ +
116 static TangentVector LocalCoordinates(const Class& g) {
│ │ │ +
117 return Class::ChartAtOrigin::Local(g);
│ │ │ +
118 }
│ │ │ +
│ │ │ +
119
│ │ │ +
│ │ │ +
121 static Class Retract(const TangentVector& v, ChartJacobian H) {
│ │ │ +
122 return Class::ChartAtOrigin::Retract(v,H);
│ │ │ +
123 }
│ │ │ +
│ │ │ +
124
│ │ │ +
│ │ │ +
126 static TangentVector LocalCoordinates(const Class& g, ChartJacobian H) {
│ │ │ +
127 return Class::ChartAtOrigin::Local(g,H);
│ │ │ +
128 }
│ │ │ +
│ │ │ +
129
│ │ │ +
│ │ │ +
131 Class retract(const TangentVector& v) const {
│ │ │ +
132 return compose(Class::ChartAtOrigin::Retract(v));
│ │ │ +
133 }
│ │ │ +
│ │ │ +
134
│ │ │ +
│ │ │ +
136 TangentVector localCoordinates(const Class& g) const {
│ │ │ +
137 return Class::ChartAtOrigin::Local(between(g));
│ │ │ +
138 }
│ │ │ +
│ │ │
139
│ │ │ -
140 typedef typename traits<T>::structure_category structure_category_tag;
│ │ │ -
141 static const int dim = traits<T>::dimension;
│ │ │ -
142 typedef typename traits<T>::ManifoldType ManifoldType;
│ │ │ -
143 typedef typename traits<T>::TangentVector TangentVector;
│ │ │ -
144
│ │ │ -
145 BOOST_CONCEPT_USAGE(IsManifold) {
│ │ │ -
146 BOOST_STATIC_ASSERT_MSG(
│ │ │ -
147 (boost::is_base_of<manifold_tag, structure_category_tag>::value),
│ │ │ -
148 "This type's structure_category trait does not assert it as a manifold (or derived)");
│ │ │ -
149 BOOST_STATIC_ASSERT(TangentVector::SizeAtCompileTime == dim);
│ │ │ +
│ │ │ +
141 Class retract(const TangentVector& v, //
│ │ │ +
142 ChartJacobian H1, ChartJacobian H2 = boost::none) const {
│ │ │ +
143 Jacobian D_g_v;
│ │ │ +
144 Class g = Class::ChartAtOrigin::Retract(v, H2 ? &D_g_v : 0);
│ │ │ +
145 Class h = compose(g); // derivatives inlined below
│ │ │ +
146 if (H1) *H1 = g.inverse().AdjointMap();
│ │ │ +
147 if (H2) *H2 = D_g_v;
│ │ │ +
148 return h;
│ │ │ +
149 }
│ │ │ +
│ │ │
150
│ │ │ -
151 // make sure Chart methods are defined
│ │ │ -
152 v = traits<T>::Local(p, q);
│ │ │ -
153 q = traits<T>::Retract(p, v);
│ │ │ -
154 }
│ │ │ -
155
│ │ │ -
156private:
│ │ │ -
157
│ │ │ -
158 TangentVector v;
│ │ │ -
159 ManifoldType p, q;
│ │ │ -
160};
│ │ │ -
161
│ │ │ -
163template<typename T>
│ │ │ -
│ │ │ - │ │ │ -
165 typedef const int value_type;
│ │ │ -
166 static const int value = traits<T>::dimension;
│ │ │ -
167 BOOST_STATIC_ASSERT_MSG(value != Eigen::Dynamic,
│ │ │ -
168 "FixedDimension instantiated for dymanically-sized type.");
│ │ │ -
169};
│ │ │ -
│ │ │ -
170} // \ namespace gtsam
│ │ │ -
171
│ │ │ -
173// * Macros for using the ManifoldConcept
│ │ │ -
174// * - An instantiation for use inside unit tests
│ │ │ -
175// * - A typedef for use inside generic algorithms
│ │ │ -
176// *
│ │ │ -
177// * NOTE: intentionally not in the gtsam namespace to allow for classes not in
│ │ │ -
178// * the gtsam namespace to be more easily enforced as testable
│ │ │ -
179// */
│ │ │ -
180#define GTSAM_CONCEPT_MANIFOLD_INST(T) template class gtsam::IsManifold<T>;
│ │ │ -
181#define GTSAM_CONCEPT_MANIFOLD_TYPE(T) using _gtsam_IsManifold_##T = gtsam::IsManifold<T>;
│ │ │ -
Concept check for values that can be used in unit tests.
│ │ │ -
Special class for optional Jacobian arguments.
│ │ │ -
typedef and functions to augment Eigen's MatrixXd
│ │ │ +
│ │ │ +
152 TangentVector localCoordinates(const Class& g, //
│ │ │ +
153 ChartJacobian H1, ChartJacobian H2 = boost::none) const {
│ │ │ +
154 Class h = between(g); // derivatives inlined below
│ │ │ +
155 Jacobian D_v_h;
│ │ │ +
156 TangentVector v = Class::ChartAtOrigin::Local(h, (H1 || H2) ? &D_v_h : 0);
│ │ │ +
157 if (H1) *H1 = - D_v_h * h.inverse().AdjointMap();
│ │ │ +
158 if (H2) *H2 = D_v_h;
│ │ │ +
159 return v;
│ │ │ +
160 }
│ │ │ +
│ │ │ +
161};
│ │ │ +
│ │ │ +
162
│ │ │ +
164struct lie_group_tag: public manifold_tag, public group_tag {};
│ │ │ +
165
│ │ │ +
166namespace internal {
│ │ │ +
167
│ │ │ +
173template<class Class>
│ │ │ +
│ │ │ +
174struct LieGroupTraits: GetDimensionImpl<Class, Class::dimension> {
│ │ │ + │ │ │ +
176
│ │ │ + │ │ │ +
180 static Class Identity() { return Class::Identity();}
│ │ │ +
182
│ │ │ +
185 typedef Class ManifoldType;
│ │ │ +
186 enum { dimension = Class::dimension };
│ │ │ +
187 typedef Eigen::Matrix<double, dimension, 1> TangentVector;
│ │ │ +
188 typedef OptionalJacobian<dimension, dimension> ChartJacobian;
│ │ │ +
189
│ │ │ +
190 static TangentVector Local(const Class& origin, const Class& other,
│ │ │ +
191 ChartJacobian Horigin = boost::none, ChartJacobian Hother = boost::none) {
│ │ │ +
192 return origin.localCoordinates(other, Horigin, Hother);
│ │ │ +
193 }
│ │ │ +
194
│ │ │ +
195 static Class Retract(const Class& origin, const TangentVector& v,
│ │ │ +
196 ChartJacobian Horigin = boost::none, ChartJacobian Hv = boost::none) {
│ │ │ +
197 return origin.retract(v, Horigin, Hv);
│ │ │ +
198 }
│ │ │ +
200
│ │ │ +
203 static TangentVector Logmap(const Class& m, ChartJacobian Hm = boost::none) {
│ │ │ +
204 return Class::Logmap(m, Hm);
│ │ │ +
205 }
│ │ │ +
206
│ │ │ +
207 static Class Expmap(const TangentVector& v, ChartJacobian Hv = boost::none) {
│ │ │ +
208 return Class::Expmap(v, Hv);
│ │ │ +
209 }
│ │ │ +
210
│ │ │ +
211 static Class Compose(const Class& m1, const Class& m2, //
│ │ │ +
212 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
│ │ │ +
213 return m1.compose(m2, H1, H2);
│ │ │ +
214 }
│ │ │ +
215
│ │ │ +
216 static Class Between(const Class& m1, const Class& m2, //
│ │ │ +
217 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
│ │ │ +
218 return m1.between(m2, H1, H2);
│ │ │ +
219 }
│ │ │ +
220
│ │ │ +
221 static Class Inverse(const Class& m, //
│ │ │ +
222 ChartJacobian H = boost::none) {
│ │ │ +
223 return m.inverse(H);
│ │ │ +
224 }
│ │ │ +
226};
│ │ │ +
│ │ │ +
227
│ │ │ +
229template<class Class> struct LieGroup: LieGroupTraits<Class>, Testable<Class> {};
│ │ │ +
230
│ │ │ +
231} // \ namepsace internal
│ │ │ +
232
│ │ │ +
239template<class Class>
│ │ │ +
│ │ │ +
240inline Class between_default(const Class& l1, const Class& l2) {
│ │ │ +
241 return l1.inverse().compose(l2);
│ │ │ +
242}
│ │ │ +
│ │ │ +
243
│ │ │ +
245template<class Class>
│ │ │ +
│ │ │ +
246inline Vector logmap_default(const Class& l0, const Class& lp) {
│ │ │ +
247 return Class::Logmap(l0.between(lp));
│ │ │ +
248}
│ │ │ +
│ │ │ +
249
│ │ │ +
251template<class Class>
│ │ │ +
│ │ │ +
252inline Class expmap_default(const Class& t, const Vector& d) {
│ │ │ +
253 return t.compose(Class::Expmap(d));
│ │ │ +
254}
│ │ │ +
│ │ │ +
255
│ │ │ +
259template<typename T>
│ │ │ +
│ │ │ +
260class IsLieGroup: public IsGroup<T>, public IsManifold<T> {
│ │ │ +
261public:
│ │ │ +
262 typedef typename traits<T>::structure_category structure_category_tag;
│ │ │ +
263 typedef typename traits<T>::ManifoldType ManifoldType;
│ │ │ +
264 typedef typename traits<T>::TangentVector TangentVector;
│ │ │ +
265 typedef typename traits<T>::ChartJacobian ChartJacobian;
│ │ │ +
266
│ │ │ +
267 BOOST_CONCEPT_USAGE(IsLieGroup) {
│ │ │ +
268 BOOST_STATIC_ASSERT_MSG(
│ │ │ +
269 (boost::is_base_of<lie_group_tag, structure_category_tag>::value),
│ │ │ +
270 "This type's trait does not assert it is a Lie group (or derived)");
│ │ │ +
271
│ │ │ +
272 // group opertations with Jacobians
│ │ │ +
273 g = traits<T>::Compose(g, h, Hg, Hh);
│ │ │ +
274 g = traits<T>::Between(g, h, Hg, Hh);
│ │ │ +
275 g = traits<T>::Inverse(g, Hg);
│ │ │ +
276 // log and exp map without Jacobians
│ │ │ +
277 g = traits<T>::Expmap(v);
│ │ │ +
278 v = traits<T>::Logmap(g);
│ │ │ +
279 // log and exponential map with Jacobians
│ │ │ +
280 g = traits<T>::Expmap(v, Hg);
│ │ │ +
281 v = traits<T>::Logmap(g, Hg);
│ │ │ +
282 }
│ │ │ +
283private:
│ │ │ +
284 T g, h;
│ │ │ +
285 TangentVector v;
│ │ │ +
286 ChartJacobian Hg, Hh;
│ │ │ +
287};
│ │ │ +
│ │ │ +
288
│ │ │ +
297template<class T>
│ │ │ +
│ │ │ +
298T BCH(const T& X, const T& Y) {
│ │ │ +
299 static const double _2 = 1. / 2., _12 = 1. / 12., _24 = 1. / 24.;
│ │ │ +
300 T X_Y = bracket(X, Y);
│ │ │ +
301 return T(X + Y + _2 * X_Y + _12 * bracket(X - Y, X_Y) - _24 * bracket(Y, bracket(X, X_Y)));
│ │ │ +
302}
│ │ │ +
│ │ │ +
303
│ │ │ +
308template <class T> Matrix wedge(const Vector& x);
│ │ │ +
309
│ │ │ +
316template <class T>
│ │ │ +
│ │ │ +
317T expm(const Vector& x, int K=7) {
│ │ │ +
318 Matrix xhat = wedge<T>(x);
│ │ │ +
319 return T(expm(xhat,K));
│ │ │ +
320}
│ │ │ +
│ │ │ +
321
│ │ │ +
326template <typename T>
│ │ │ +
│ │ │ +
327T interpolate(const T& X, const T& Y, double t,
│ │ │ +
328 typename MakeOptionalJacobian<T, T>::type Hx = boost::none,
│ │ │ +
329 typename MakeOptionalJacobian<T, T>::type Hy = boost::none) {
│ │ │ +
330 if (Hx || Hy) {
│ │ │ +
331 typename MakeJacobian<T, T>::type between_H_x, log_H, exp_H, compose_H_x;
│ │ │ +
332 const T between =
│ │ │ +
333 traits<T>::Between(X, Y, between_H_x); // between_H_y = identity
│ │ │ +
334 typename traits<T>::TangentVector delta = traits<T>::Logmap(between, log_H);
│ │ │ +
335 const T Delta = traits<T>::Expmap(t * delta, exp_H);
│ │ │ +
336 const T result = traits<T>::Compose(
│ │ │ +
337 X, Delta, compose_H_x); // compose_H_xinv_y = identity
│ │ │ +
338
│ │ │ +
339 if (Hx) *Hx = compose_H_x + t * exp_H * log_H * between_H_x;
│ │ │ +
340 if (Hy) *Hy = t * exp_H * log_H;
│ │ │ +
341 return result;
│ │ │ +
342 }
│ │ │ +
343 return traits<T>::Compose(
│ │ │ + │ │ │ +
345}
│ │ │ +
│ │ │ +
346
│ │ │ +
351template<class T>
│ │ │ +
│ │ │ + │ │ │ +
353{
│ │ │ +
354private:
│ │ │ +
355 typename T::Jacobian adjointMap_;
│ │ │ +
356public:
│ │ │ +
357 explicit TransformCovariance(const T &X) : adjointMap_{X.AdjointMap()} {}
│ │ │ +
358 typename T::Jacobian operator()(const typename T::Jacobian &covariance)
│ │ │ +
359 { return adjointMap_ * covariance * adjointMap_.transpose(); }
│ │ │ +
360};
│ │ │ +
│ │ │ +
361
│ │ │ +
362} // namespace gtsam
│ │ │ +
363
│ │ │ +
372#define GTSAM_CONCEPT_LIE_INST(T) template class gtsam::IsLieGroup<T>;
│ │ │ +
373#define GTSAM_CONCEPT_LIE_TYPE(T) using _gtsam_IsLieGroup_##T = gtsam::IsLieGroup<T>;
│ │ │ +
Concept check class for variable types with Group properties.
│ │ │ +
Base class and basic functions for Manifold types.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
BOOST_CONCEPT_REQUIRES(((IsGroup< G >)),(bool)) check_group_invariants(const G &a
Check invariants.
│ │ │ +
T expm(const Vector &x, int K=7)
Exponential map given exponential coordinates class T needs a wedge<> function and a constructor from...
Definition Lie.h:317
│ │ │ +
Vector logmap_default(const Class &l0, const Class &lp)
Log map centered at l0, s.t.
Definition Lie.h:246
│ │ │ +
Class between_default(const Class &l1, const Class &l2)
These core global functions can be specialized by new Lie types for better performance.
Definition Lie.h:240
│ │ │ +
T interpolate(const T &X, const T &Y, double t, typename MakeOptionalJacobian< T, T >::type Hx=boost::none, typename MakeOptionalJacobian< T, T >::type Hy=boost::none)
Linear interpolation between X and Y by coefficient t.
Definition Lie.h:327
│ │ │ +
T BCH(const T &X, const T &Y)
Three term approximation of the Baker-Campbell-Hausdorff formula In non-commutative Lie groups,...
Definition Lie.h:298
│ │ │ +
Class expmap_default(const Class &t, const Vector &d)
Exponential map centered at l0, s.t.
Definition Lie.h:252
│ │ │ +
Matrix wedge(const Vector &x)
Declaration of wedge (see Murray94book) used to convert from n exponential coordinates to n*n element...
│ │ │
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ +
tag to assert a type is a group
Definition Group.h:34
│ │ │ +
Group operator syntax flavors.
Definition Group.h:37
│ │ │ +
Group Concept.
Definition Group.h:46
│ │ │ +
A CRTP helper class that implements Lie group methods Prerequisites: methods operator*,...
Definition Lie.h:37
│ │ │ +
static Class Retract(const TangentVector &v, ChartJacobian H)
Retract at origin with optional derivative.
Definition Lie.h:121
│ │ │ +
TangentVector localCoordinates(const Class &g) const
localCoordinates as required by manifold concept: finds tangent vector between *this and g
Definition Lie.h:136
│ │ │ +
Class expmap(const TangentVector &v, ChartJacobian H1, ChartJacobian H2=boost::none) const
expmap with optional derivatives
Definition Lie.h:89
│ │ │ +
TangentVector localCoordinates(const Class &g, ChartJacobian H1, ChartJacobian H2=boost::none) const
localCoordinates with optional derivatives
Definition Lie.h:152
│ │ │ +
TangentVector logmap(const Class &g) const
logmap as required by manifold concept Applies logarithmic map to group element that takes *this to g
Definition Lie.h:84
│ │ │ +
TangentVector logmap(const Class &g, ChartJacobian H1, ChartJacobian H2=boost::none) const
logmap with optional derivatives
Definition Lie.h:100
│ │ │ +
static TangentVector LocalCoordinates(const Class &g)
LocalCoordinates at origin: possible in Lie group because it has an identity.
Definition Lie.h:116
│ │ │ +
Class retract(const TangentVector &v, ChartJacobian H1, ChartJacobian H2=boost::none) const
retract with optional derivatives
Definition Lie.h:141
│ │ │ +
static TangentVector LocalCoordinates(const Class &g, ChartJacobian H)
LocalCoordinates at origin with optional derivative.
Definition Lie.h:126
│ │ │ +
Class retract(const TangentVector &v) const
retract as required by manifold concept: applies v at *this
Definition Lie.h:131
│ │ │ +
Class expmap(const TangentVector &v) const
expmap as required by manifold concept Applies exponential map to v and composes with *this
Definition Lie.h:78
│ │ │ +
static Class Retract(const TangentVector &v)
Retract at origin: possible in Lie group because it has an identity.
Definition Lie.h:111
│ │ │ +
tag to assert a type is a Lie group
Definition Lie.h:164
│ │ │ +
A helper class that implements the traits interface for GTSAM lie groups.
Definition Lie.h:174
│ │ │ +
Both LieGroupTraits and Testable.
Definition Lie.h:229
│ │ │ +
Lie Group Concept.
Definition Lie.h:260
│ │ │ +
Functor for transforming covariance of T.
Definition Lie.h:353
│ │ │
tag to assert a type is a manifold
Definition Manifold.h:33
│ │ │ -
Requirements on type to pass it to Manifold template below.
Definition Manifold.h:59
│ │ │
Extra manifold traits for fixed-dimension types.
Definition Manifold.h:75
│ │ │ -
A helper that implements the traits interface for GTSAM manifolds.
Definition Manifold.h:95
│ │ │ -
Both ManifoldTraits and Testable.
Definition Manifold.h:120
│ │ │ -
Give fixed size dimension of a type, fails at compile time if dynamic.
Definition Manifold.h:164
│ │ │
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:41
│ │ │ -
A testable concept check that should be placed in applicable unit tests and in generic algorithms.
Definition Testable.h:58
│ │ │
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:151
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,206 +1,440 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Manifold.h │ │ │ │ +Lie.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -20#pragma once │ │ │ │ -21 │ │ │ │ -22#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_._h> │ │ │ │ -23#include <_g_t_s_a_m_/_b_a_s_e_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ -24#include <_g_t_s_a_m_/_b_a_s_e_/_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h> │ │ │ │ +24#pragma once │ │ │ │ 25 │ │ │ │ -26#include │ │ │ │ -27#include │ │ │ │ -28#include │ │ │ │ -29 │ │ │ │ -30namespace _g_t_s_a_m { │ │ │ │ -31 │ │ │ │ -_3_3struct _m_a_n_i_f_o_l_d___t_a_g {}; │ │ │ │ -34 │ │ │ │ -53template struct _t_r_a_i_t_s; │ │ │ │ -54 │ │ │ │ -55namespace internal { │ │ │ │ -56 │ │ │ │ -58template │ │ │ │ -_5_9struct _H_a_s_M_a_n_i_f_o_l_d_P_r_e_r_e_q_s { │ │ │ │ -60 │ │ │ │ -61 enum { dim = Class::dimension }; │ │ │ │ +26#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_n_i_f_o_l_d_._h> │ │ │ │ +27#include <_g_t_s_a_m_/_b_a_s_e_/_G_r_o_u_p_._h> │ │ │ │ +28 │ │ │ │ +29namespace _g_t_s_a_m { │ │ │ │ +30 │ │ │ │ +36template │ │ │ │ +_3_7struct _L_i_e_G_r_o_u_p { │ │ │ │ +38 │ │ │ │ +39 enum { dimension = N }; │ │ │ │ +40 typedef _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_N_,_ _N_> ChartJacobian; │ │ │ │ +41 typedef Eigen::Matrix Jacobian; │ │ │ │ +42 typedef Eigen::Matrix TangentVector; │ │ │ │ +43 │ │ │ │ +44 const Class & derived() const { │ │ │ │ +45 return static_cast(*this); │ │ │ │ +46 } │ │ │ │ +47 │ │ │ │ +48 Class compose(const Class& g) const { │ │ │ │ +49 return derived() * g; │ │ │ │ +50 } │ │ │ │ +51 │ │ │ │ +52 Class between(const Class& g) const { │ │ │ │ +53 return derived().inverse() * g; │ │ │ │ +54 } │ │ │ │ +55 │ │ │ │ +56 Class compose(const Class& g, ChartJacobian H1, │ │ │ │ +57 ChartJacobian H2 = boost::none) const { │ │ │ │ +58 if (H1) *H1 = g.inverse().AdjointMap(); │ │ │ │ +59 if (H2) *H2 = Eigen::Matrix::Identity(); │ │ │ │ +60 return derived() * g; │ │ │ │ +61 } │ │ │ │ 62 │ │ │ │ -63 Class p, q; │ │ │ │ -64 Eigen::Matrix v; │ │ │ │ -65 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_d_i_m_,_ _d_i_m_> Hp, Hq, Hv; │ │ │ │ -66 │ │ │ │ -67 BOOST_CONCEPT_USAGE(_H_a_s_M_a_n_i_f_o_l_d_P_r_e_r_e_q_s) { │ │ │ │ -68 v = p.localCoordinates(q); │ │ │ │ -69 q = p.retract(v); │ │ │ │ -70 } │ │ │ │ -71}; │ │ │ │ -72 │ │ │ │ -74template │ │ │ │ -_7_5struct _G_e_t_D_i_m_e_n_s_i_o_n_I_m_p_l { │ │ │ │ -76 // Compile-time dimensionality │ │ │ │ -77 static int GetDimension(const Class&) { │ │ │ │ -78 return N; │ │ │ │ -79 } │ │ │ │ -80}; │ │ │ │ +63 Class between(const Class& g, ChartJacobian H1, │ │ │ │ +64 ChartJacobian H2 = boost::none) const { │ │ │ │ +65 Class result = derived().inverse() * g; │ │ │ │ +66 if (H1) *H1 = - result.inverse().AdjointMap(); │ │ │ │ +67 if (H2) *H2 = Eigen::Matrix::Identity(); │ │ │ │ +68 return result; │ │ │ │ +69 } │ │ │ │ +70 │ │ │ │ +71 Class inverse(ChartJacobian H) const { │ │ │ │ +72 if (H) *H = - derived().AdjointMap(); │ │ │ │ +73 return derived().inverse(); │ │ │ │ +74 } │ │ │ │ +75 │ │ │ │ +_7_8 Class _e_x_p_m_a_p(const TangentVector& v) const { │ │ │ │ +79 return compose(Class::Expmap(v)); │ │ │ │ +80 } │ │ │ │ 81 │ │ │ │ -83template │ │ │ │ -_8_4struct _G_e_t_D_i_m_e_n_s_i_o_n_I_m_p_l { │ │ │ │ -85 // Run-time dimensionality │ │ │ │ -86 static int GetDimension(const Class& m) { │ │ │ │ -87 return m.dim(); │ │ │ │ -88 } │ │ │ │ -89}; │ │ │ │ -90 │ │ │ │ -94template │ │ │ │ -_9_5struct _M_a_n_i_f_o_l_d_T_r_a_i_t_s: _G_e_t_D_i_m_e_n_s_i_o_n_I_m_p_l { │ │ │ │ -96 │ │ │ │ -97 // Check that Class has the necessary machinery │ │ │ │ -98 BOOST_CONCEPT_ASSERT((_H_a_s_M_a_n_i_f_o_l_d_P_r_e_r_e_q_s_<_C_l_a_s_s_>)); │ │ │ │ -99 │ │ │ │ -100 // Dimension of the manifold │ │ │ │ -101 enum { dimension = Class::dimension }; │ │ │ │ -102 │ │ │ │ -103 // Typedefs required by all manifold types. │ │ │ │ -104 typedef Class ManifoldType; │ │ │ │ -105 typedef _m_a_n_i_f_o_l_d___t_a_g _s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y; │ │ │ │ -106 typedef Eigen::Matrix TangentVector; │ │ │ │ -107 │ │ │ │ -108 // Local coordinates │ │ │ │ -109 static TangentVector Local(const Class& origin, const Class& other) { │ │ │ │ -110 return origin.localCoordinates(other); │ │ │ │ -111 } │ │ │ │ -112 │ │ │ │ -113 // Retraction back to manifold │ │ │ │ -114 static Class Retract(const Class& origin, const TangentVector& v) { │ │ │ │ -115 return origin.retract(v); │ │ │ │ -116 } │ │ │ │ -117}; │ │ │ │ -118 │ │ │ │ -_1_2_0template struct _M_a_n_i_f_o_l_d: _M_a_n_i_f_o_l_d_T_r_a_i_t_s, │ │ │ │ -_T_e_s_t_a_b_l_e {}; │ │ │ │ -121 │ │ │ │ -122} // \ namespace internal │ │ │ │ -123 │ │ │ │ -125template │ │ │ │ -_1_2_6_B_O_O_S_T___C_O_N_C_E_P_T___R_E_Q_U_I_R_E_S(((_I_s_T_e_s_t_a_b_l_e_<_T_>)),(bool)) // │ │ │ │ -127check_manifold_invariants(const T& a, const T& b, double tol=1e-9) { │ │ │ │ -128 typename _t_r_a_i_t_s_<_T_>_:_:_T_a_n_g_e_n_t_V_e_c_t_o_r v0 = _t_r_a_i_t_s_<_T_>_:_:_L_o_c_a_l(a,a); │ │ │ │ -129 typename _t_r_a_i_t_s_<_T_>_:_:_T_a_n_g_e_n_t_V_e_c_t_o_r v = _t_r_a_i_t_s_<_T_>_:_:_L_o_c_a_l(a,b); │ │ │ │ -130 T c = _t_r_a_i_t_s_<_T_>_:_:_R_e_t_r_a_c_t(a,v); │ │ │ │ -131 return v0.norm() < tol && _t_r_a_i_t_s_<_T_>_:_:_E_q_u_a_l_s(b,c,tol); │ │ │ │ -132} │ │ │ │ -133 │ │ │ │ -135template │ │ │ │ -136class IsManifold { │ │ │ │ -137 │ │ │ │ -138public: │ │ │ │ +_8_4 TangentVector _l_o_g_m_a_p(const Class& g) const { │ │ │ │ +85 return Class::Logmap(between(g)); │ │ │ │ +86 } │ │ │ │ +87 │ │ │ │ +_8_9 Class _e_x_p_m_a_p(const TangentVector& v, // │ │ │ │ +90 ChartJacobian H1, ChartJacobian H2 = boost::none) const { │ │ │ │ +91 Jacobian D_g_v; │ │ │ │ +92 Class g = Class::Expmap(v,H2 ? &D_g_v : 0); │ │ │ │ +93 Class h = compose(g); // derivatives inlined below │ │ │ │ +94 if (H1) *H1 = g.inverse().AdjointMap(); │ │ │ │ +95 if (H2) *H2 = D_g_v; │ │ │ │ +96 return h; │ │ │ │ +97 } │ │ │ │ +98 │ │ │ │ +_1_0_0 TangentVector _l_o_g_m_a_p(const Class& g, // │ │ │ │ +101 ChartJacobian H1, ChartJacobian H2 = boost::none) const { │ │ │ │ +102 Class h = between(g); // derivatives inlined below │ │ │ │ +103 Jacobian D_v_h; │ │ │ │ +104 TangentVector v = Class::Logmap(h, (H1 || H2) ? &D_v_h : 0); │ │ │ │ +105 if (H1) *H1 = - D_v_h * h.inverse().AdjointMap(); │ │ │ │ +106 if (H2) *H2 = D_v_h; │ │ │ │ +107 return v; │ │ │ │ +108 } │ │ │ │ +109 │ │ │ │ +_1_1_1 static Class _R_e_t_r_a_c_t(const TangentVector& v) { │ │ │ │ +112 return Class::ChartAtOrigin::Retract(v); │ │ │ │ +113 } │ │ │ │ +114 │ │ │ │ +_1_1_6 static TangentVector _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const Class& g) { │ │ │ │ +117 return Class::ChartAtOrigin::Local(g); │ │ │ │ +118 } │ │ │ │ +119 │ │ │ │ +_1_2_1 static Class _R_e_t_r_a_c_t(const TangentVector& v, ChartJacobian H) { │ │ │ │ +122 return Class::ChartAtOrigin::Retract(v,H); │ │ │ │ +123 } │ │ │ │ +124 │ │ │ │ +_1_2_6 static TangentVector _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const Class& g, ChartJacobian H) { │ │ │ │ +127 return Class::ChartAtOrigin::Local(g,H); │ │ │ │ +128 } │ │ │ │ +129 │ │ │ │ +_1_3_1 Class _r_e_t_r_a_c_t(const TangentVector& v) const { │ │ │ │ +132 return compose(Class::ChartAtOrigin::Retract(v)); │ │ │ │ +133 } │ │ │ │ +134 │ │ │ │ +_1_3_6 TangentVector _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const Class& g) const { │ │ │ │ +137 return Class::ChartAtOrigin::Local(between(g)); │ │ │ │ +138 } │ │ │ │ 139 │ │ │ │ -140 typedef typename traits::structure_category structure_category_tag; │ │ │ │ -141 static const int dim = traits::dimension; │ │ │ │ -142 typedef typename traits::ManifoldType ManifoldType; │ │ │ │ -143 typedef typename traits::TangentVector TangentVector; │ │ │ │ -144 │ │ │ │ -145 BOOST_CONCEPT_USAGE(IsManifold) { │ │ │ │ -146 BOOST_STATIC_ASSERT_MSG( │ │ │ │ -147 (boost::is_base_of::value), │ │ │ │ -148 "This type's structure_category trait does not assert it as a manifold (or │ │ │ │ -derived)"); │ │ │ │ -149 BOOST_STATIC_ASSERT(TangentVector::SizeAtCompileTime == dim); │ │ │ │ +_1_4_1 Class _r_e_t_r_a_c_t(const TangentVector& v, // │ │ │ │ +142 ChartJacobian H1, ChartJacobian H2 = boost::none) const { │ │ │ │ +143 Jacobian D_g_v; │ │ │ │ +144 Class g = Class::ChartAtOrigin::Retract(v, H2 ? &D_g_v : 0); │ │ │ │ +145 Class h = compose(g); // derivatives inlined below │ │ │ │ +146 if (H1) *H1 = g.inverse().AdjointMap(); │ │ │ │ +147 if (H2) *H2 = D_g_v; │ │ │ │ +148 return h; │ │ │ │ +149 } │ │ │ │ 150 │ │ │ │ -151 // make sure Chart methods are defined │ │ │ │ -152 v = traits::Local(p, q); │ │ │ │ -153 q = traits::Retract(p, v); │ │ │ │ -154 } │ │ │ │ -155 │ │ │ │ -156private: │ │ │ │ -157 │ │ │ │ -158 TangentVector v; │ │ │ │ -159 ManifoldType p, q; │ │ │ │ -160}; │ │ │ │ -161 │ │ │ │ -163template │ │ │ │ -_1_6_4struct _F_i_x_e_d_D_i_m_e_n_s_i_o_n { │ │ │ │ -165 typedef const int value_type; │ │ │ │ -166 static const int value = _t_r_a_i_t_s_<_T_>_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ -167 BOOST_STATIC_ASSERT_MSG(value != Eigen::Dynamic, │ │ │ │ -168 "FixedDimension instantiated for dymanically-sized type."); │ │ │ │ -169}; │ │ │ │ -170} // \ namespace gtsam │ │ │ │ -171 │ │ │ │ -173// * Macros for using the ManifoldConcept │ │ │ │ -174// * - An instantiation for use inside unit tests │ │ │ │ -175// * - A typedef for use inside generic algorithms │ │ │ │ -176// * │ │ │ │ -177// * NOTE: intentionally not in the gtsam namespace to allow for classes not │ │ │ │ -in │ │ │ │ -178// * the gtsam namespace to be more easily enforced as testable │ │ │ │ -179// */ │ │ │ │ -_1_8_0#define GTSAM_CONCEPT_MANIFOLD_INST(T) template class gtsam::IsManifold; │ │ │ │ -181#define GTSAM_CONCEPT_MANIFOLD_TYPE(T) using _gtsam_IsManifold_##T = gtsam:: │ │ │ │ -IsManifold; │ │ │ │ -_T_e_s_t_a_b_l_e_._h │ │ │ │ -Concept check for values that can be used in unit tests. │ │ │ │ -_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h │ │ │ │ -Special class for optional Jacobian arguments. │ │ │ │ -_M_a_t_r_i_x_._h │ │ │ │ -typedef and functions to augment Eigen's MatrixXd │ │ │ │ +_1_5_2 TangentVector _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const Class& g, // │ │ │ │ +153 ChartJacobian H1, ChartJacobian H2 = boost::none) const { │ │ │ │ +154 Class h = between(g); // derivatives inlined below │ │ │ │ +155 Jacobian D_v_h; │ │ │ │ +156 TangentVector v = Class::ChartAtOrigin::Local(h, (H1 || H2) ? &D_v_h : 0); │ │ │ │ +157 if (H1) *H1 = - D_v_h * h.inverse().AdjointMap(); │ │ │ │ +158 if (H2) *H2 = D_v_h; │ │ │ │ +159 return v; │ │ │ │ +160 } │ │ │ │ +161}; │ │ │ │ +162 │ │ │ │ +_1_6_4struct _l_i_e___g_r_o_u_p___t_a_g: public _m_a_n_i_f_o_l_d___t_a_g, public _g_r_o_u_p___t_a_g {}; │ │ │ │ +165 │ │ │ │ +166namespace internal { │ │ │ │ +167 │ │ │ │ +173template │ │ │ │ +_1_7_4struct _L_i_e_G_r_o_u_p_T_r_a_i_t_s: _G_e_t_D_i_m_e_n_s_i_o_n_I_m_p_l { │ │ │ │ +175 typedef _l_i_e___g_r_o_u_p___t_a_g _s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y; │ │ │ │ +176 │ │ │ │ +179 typedef _m_u_l_t_i_p_l_i_c_a_t_i_v_e___g_r_o_u_p___t_a_g _g_r_o_u_p___f_l_a_v_o_r; │ │ │ │ +180 static Class Identity() { return Class::Identity();} │ │ │ │ +182 │ │ │ │ +185 typedef Class ManifoldType; │ │ │ │ +186 enum { dimension = Class::dimension }; │ │ │ │ +187 typedef Eigen::Matrix TangentVector; │ │ │ │ +188 typedef _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_d_i_m_e_n_s_i_o_n_,_ _d_i_m_e_n_s_i_o_n_> ChartJacobian; │ │ │ │ +189 │ │ │ │ +190 static TangentVector Local(const Class& origin, const Class& other, │ │ │ │ +191 ChartJacobian Horigin = boost::none, ChartJacobian Hother = boost::none) { │ │ │ │ +192 return origin.localCoordinates(other, Horigin, Hother); │ │ │ │ +193 } │ │ │ │ +194 │ │ │ │ +195 static Class Retract(const Class& origin, const TangentVector& v, │ │ │ │ +196 ChartJacobian Horigin = boost::none, ChartJacobian Hv = boost::none) { │ │ │ │ +197 return origin.retract(v, Horigin, Hv); │ │ │ │ +198 } │ │ │ │ +200 │ │ │ │ +203 static TangentVector Logmap(const Class& m, ChartJacobian Hm = boost::none) │ │ │ │ +{ │ │ │ │ +204 return Class::Logmap(m, Hm); │ │ │ │ +205 } │ │ │ │ +206 │ │ │ │ +207 static Class Expmap(const TangentVector& v, ChartJacobian Hv = boost::none) │ │ │ │ +{ │ │ │ │ +208 return Class::Expmap(v, Hv); │ │ │ │ +209 } │ │ │ │ +210 │ │ │ │ +211 static Class Compose(const Class& m1, const Class& m2, // │ │ │ │ +212 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) { │ │ │ │ +213 return m1.compose(m2, H1, H2); │ │ │ │ +214 } │ │ │ │ +215 │ │ │ │ +216 static Class Between(const Class& m1, const Class& m2, // │ │ │ │ +217 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) { │ │ │ │ +218 return m1.between(m2, H1, H2); │ │ │ │ +219 } │ │ │ │ +220 │ │ │ │ +221 static Class Inverse(const Class& m, // │ │ │ │ +222 ChartJacobian H = boost::none) { │ │ │ │ +223 return m.inverse(H); │ │ │ │ +224 } │ │ │ │ +226}; │ │ │ │ +227 │ │ │ │ +_2_2_9template struct _L_i_e_G_r_o_u_p: _L_i_e_G_r_o_u_p_T_r_a_i_t_s, │ │ │ │ +_T_e_s_t_a_b_l_e {}; │ │ │ │ +230 │ │ │ │ +231} // \ namepsace internal │ │ │ │ +232 │ │ │ │ +239template │ │ │ │ +_2_4_0inline Class _b_e_t_w_e_e_n___d_e_f_a_u_l_t(const Class& l1, const Class& l2) { │ │ │ │ +241 return l1.inverse().compose(l2); │ │ │ │ +242} │ │ │ │ +243 │ │ │ │ +245template │ │ │ │ +_2_4_6inline Vector _l_o_g_m_a_p___d_e_f_a_u_l_t(const Class& l0, const Class& lp) { │ │ │ │ +247 return Class::Logmap(l0.between(lp)); │ │ │ │ +248} │ │ │ │ +249 │ │ │ │ +251template │ │ │ │ +_2_5_2inline Class _e_x_p_m_a_p___d_e_f_a_u_l_t(const Class& t, const Vector& d) { │ │ │ │ +253 return t.compose(Class::Expmap(d)); │ │ │ │ +254} │ │ │ │ +255 │ │ │ │ +259template │ │ │ │ +_2_6_0class _I_s_L_i_e_G_r_o_u_p: public _I_s_G_r_o_u_p, public IsManifold { │ │ │ │ +261public: │ │ │ │ +262 typedef typename _t_r_a_i_t_s_<_T_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y structure_category_tag; │ │ │ │ +263 typedef typename _t_r_a_i_t_s_<_T_>_:_:_M_a_n_i_f_o_l_d_T_y_p_e ManifoldType; │ │ │ │ +264 typedef typename _t_r_a_i_t_s_<_T_>_:_:_T_a_n_g_e_n_t_V_e_c_t_o_r TangentVector; │ │ │ │ +265 typedef typename _t_r_a_i_t_s_<_T_>_:_:_C_h_a_r_t_J_a_c_o_b_i_a_n ChartJacobian; │ │ │ │ +266 │ │ │ │ +267 BOOST_CONCEPT_USAGE(_I_s_L_i_e_G_r_o_u_p) { │ │ │ │ +268 BOOST_STATIC_ASSERT_MSG( │ │ │ │ +269 (boost::is_base_of::value), │ │ │ │ +270 "This type's trait does not assert it is a Lie group (or derived)"); │ │ │ │ +271 │ │ │ │ +272 // group opertations with Jacobians │ │ │ │ +273 g = _t_r_a_i_t_s_<_T_>_:_:_C_o_m_p_o_s_e(g, h, Hg, Hh); │ │ │ │ +274 g = _t_r_a_i_t_s_<_T_>_:_:_B_e_t_w_e_e_n(g, h, Hg, Hh); │ │ │ │ +275 g = _t_r_a_i_t_s_<_T_>_:_:_I_n_v_e_r_s_e(g, Hg); │ │ │ │ +276 // log and exp map without Jacobians │ │ │ │ +277 g = _t_r_a_i_t_s_<_T_>_:_:_E_x_p_m_a_p(v); │ │ │ │ +278 v = _t_r_a_i_t_s_<_T_>_:_:_L_o_g_m_a_p(g); │ │ │ │ +279 // log and exponential map with Jacobians │ │ │ │ +280 g = _t_r_a_i_t_s_<_T_>_:_:_E_x_p_m_a_p(v, Hg); │ │ │ │ +281 v = _t_r_a_i_t_s_<_T_>_:_:_L_o_g_m_a_p(g, Hg); │ │ │ │ +282 } │ │ │ │ +283private: │ │ │ │ +284 T g, h; │ │ │ │ +285 TangentVector v; │ │ │ │ +286 ChartJacobian Hg, Hh; │ │ │ │ +287}; │ │ │ │ +288 │ │ │ │ +297template │ │ │ │ +_2_9_8T _B_C_H(const T& X, const T& Y) { │ │ │ │ +299 static const double _2 = 1. / 2., _12 = 1. / 12., _24 = 1. / 24.; │ │ │ │ +300 T X_Y = bracket(X, Y); │ │ │ │ +301 return T(X + Y + _2 * X_Y + _12 * bracket(X - Y, X_Y) - _24 * bracket(Y, │ │ │ │ +bracket(X, X_Y))); │ │ │ │ +302} │ │ │ │ +303 │ │ │ │ +_3_0_8template Matrix _w_e_d_g_e(const Vector& x); │ │ │ │ +309 │ │ │ │ +316template │ │ │ │ +_3_1_7T _e_x_p_m(const Vector& x, int K=7) { │ │ │ │ +318 Matrix xhat = wedge(x); │ │ │ │ +319 return T(_e_x_p_m(xhat,K)); │ │ │ │ +320} │ │ │ │ +321 │ │ │ │ +326template │ │ │ │ +_3_2_7T _i_n_t_e_r_p_o_l_a_t_e(const T& X, const T& Y, double t, │ │ │ │ +328 typename MakeOptionalJacobian::type Hx = boost::none, │ │ │ │ +329 typename MakeOptionalJacobian::type Hy = boost::none) { │ │ │ │ +330 if (Hx || Hy) { │ │ │ │ +331 typename MakeJacobian::type between_H_x, log_H, exp_H, compose_H_x; │ │ │ │ +332 const T between = │ │ │ │ +333 _t_r_a_i_t_s_<_T_>_:_:_B_e_t_w_e_e_n(X, Y, between_H_x); // between_H_y = identity │ │ │ │ +334 typename _t_r_a_i_t_s_<_T_>_:_:_T_a_n_g_e_n_t_V_e_c_t_o_r delta = _t_r_a_i_t_s_<_T_>_:_:_L_o_g_m_a_p(between, │ │ │ │ +log_H); │ │ │ │ +335 const T Delta = _t_r_a_i_t_s_<_T_>_:_:_E_x_p_m_a_p(t * delta, exp_H); │ │ │ │ +336 const T result = _t_r_a_i_t_s_<_T_>_:_:_C_o_m_p_o_s_e( │ │ │ │ +337 X, Delta, compose_H_x); // compose_H_xinv_y = identity │ │ │ │ +338 │ │ │ │ +339 if (Hx) *Hx = compose_H_x + t * exp_H * log_H * between_H_x; │ │ │ │ +340 if (Hy) *Hy = t * exp_H * log_H; │ │ │ │ +341 return result; │ │ │ │ +342 } │ │ │ │ +343 return _t_r_a_i_t_s_<_T_>_:_:_C_o_m_p_o_s_e( │ │ │ │ +344 X, _t_r_a_i_t_s_<_T_>_:_:_E_x_p_m_a_p(t * _t_r_a_i_t_s_<_T_>_:_:_L_o_g_m_a_p(_t_r_a_i_t_s_<_T_>_:_:_B_e_t_w_e_e_n(X, Y)))); │ │ │ │ +345} │ │ │ │ +346 │ │ │ │ +351template │ │ │ │ +_3_5_2class _T_r_a_n_s_f_o_r_m_C_o_v_a_r_i_a_n_c_e │ │ │ │ +353{ │ │ │ │ +354private: │ │ │ │ +355 typename T::Jacobian adjointMap_; │ │ │ │ +356public: │ │ │ │ +357 explicit _T_r_a_n_s_f_o_r_m_C_o_v_a_r_i_a_n_c_e(const T &X) : adjointMap_{X.AdjointMap()} {} │ │ │ │ +358 typename T::Jacobian operator()(const typename T::Jacobian &covariance) │ │ │ │ +359 { return adjointMap_ * covariance * adjointMap_.transpose(); } │ │ │ │ +360}; │ │ │ │ +361 │ │ │ │ +362} // namespace gtsam │ │ │ │ +363 │ │ │ │ +_3_7_2#define GTSAM_CONCEPT_LIE_INST(T) template class gtsam::IsLieGroup; │ │ │ │ +373#define GTSAM_CONCEPT_LIE_TYPE(T) using _gtsam_IsLieGroup_##T = gtsam:: │ │ │ │ +IsLieGroup; │ │ │ │ +_G_r_o_u_p_._h │ │ │ │ +Concept check class for variable types with Group properties. │ │ │ │ +_M_a_n_i_f_o_l_d_._h │ │ │ │ +Base class and basic functions for Manifold types. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_B_O_O_S_T___C_O_N_C_E_P_T___R_E_Q_U_I_R_E_S │ │ │ │ -BOOST_CONCEPT_REQUIRES(((IsGroup< G >)),(bool)) check_group_invariants(const G │ │ │ │ -&a │ │ │ │ -Check invariants. │ │ │ │ +_g_t_s_a_m_:_:_e_x_p_m │ │ │ │ +T expm(const Vector &x, int K=7) │ │ │ │ +Exponential map given exponential coordinates class T needs a wedge<> function │ │ │ │ +and a constructor from... │ │ │ │ +DDeeffiinniittiioonn Lie.h:317 │ │ │ │ +_g_t_s_a_m_:_:_l_o_g_m_a_p___d_e_f_a_u_l_t │ │ │ │ +Vector logmap_default(const Class &l0, const Class &lp) │ │ │ │ +Log map centered at l0, s.t. │ │ │ │ +DDeeffiinniittiioonn Lie.h:246 │ │ │ │ +_g_t_s_a_m_:_:_b_e_t_w_e_e_n___d_e_f_a_u_l_t │ │ │ │ +Class between_default(const Class &l1, const Class &l2) │ │ │ │ +These core global functions can be specialized by new Lie types for better │ │ │ │ +performance. │ │ │ │ +DDeeffiinniittiioonn Lie.h:240 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ +T interpolate(const T &X, const T &Y, double t, typename MakeOptionalJacobian< │ │ │ │ +T, T >::type Hx=boost::none, typename MakeOptionalJacobian< T, T >::type │ │ │ │ +Hy=boost::none) │ │ │ │ +Linear interpolation between X and Y by coefficient t. │ │ │ │ +DDeeffiinniittiioonn Lie.h:327 │ │ │ │ +_g_t_s_a_m_:_:_B_C_H │ │ │ │ +T BCH(const T &X, const T &Y) │ │ │ │ +Three term approximation of the Baker-Campbell-Hausdorff formula In non- │ │ │ │ +commutative Lie groups,... │ │ │ │ +DDeeffiinniittiioonn Lie.h:298 │ │ │ │ +_g_t_s_a_m_:_:_e_x_p_m_a_p___d_e_f_a_u_l_t │ │ │ │ +Class expmap_default(const Class &t, const Vector &d) │ │ │ │ +Exponential map centered at l0, s.t. │ │ │ │ +DDeeffiinniittiioonn Lie.h:252 │ │ │ │ +_g_t_s_a_m_:_:_w_e_d_g_e │ │ │ │ +Matrix wedge(const Vector &x) │ │ │ │ +Declaration of wedge (see Murray94book) used to convert from n exponential │ │ │ │ +coordinates to n*n element... │ │ │ │ _g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ that can be centered ... │ │ │ │ DDeeffiinniittiioonn concepts.h:30 │ │ │ │ +_g_t_s_a_m_:_:_g_r_o_u_p___t_a_g │ │ │ │ +tag to assert a type is a group │ │ │ │ +DDeeffiinniittiioonn Group.h:34 │ │ │ │ +_g_t_s_a_m_:_:_m_u_l_t_i_p_l_i_c_a_t_i_v_e___g_r_o_u_p___t_a_g │ │ │ │ +Group operator syntax flavors. │ │ │ │ +DDeeffiinniittiioonn Group.h:37 │ │ │ │ +_g_t_s_a_m_:_:_I_s_G_r_o_u_p │ │ │ │ +Group Concept. │ │ │ │ +DDeeffiinniittiioonn Group.h:46 │ │ │ │ +_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p │ │ │ │ +A CRTP helper class that implements Lie group methods Prerequisites: methods │ │ │ │ +operator*,... │ │ │ │ +DDeeffiinniittiioonn Lie.h:37 │ │ │ │ +_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_R_e_t_r_a_c_t │ │ │ │ +static Class Retract(const TangentVector &v, ChartJacobian H) │ │ │ │ +Retract at origin with optional derivative. │ │ │ │ +DDeeffiinniittiioonn Lie.h:121 │ │ │ │ +_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ +TangentVector localCoordinates(const Class &g) const │ │ │ │ +localCoordinates as required by manifold concept: finds tangent vector between │ │ │ │ +*this and g │ │ │ │ +DDeeffiinniittiioonn Lie.h:136 │ │ │ │ +_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_e_x_p_m_a_p │ │ │ │ +Class expmap(const TangentVector &v, ChartJacobian H1, ChartJacobian H2=boost:: │ │ │ │ +none) const │ │ │ │ +expmap with optional derivatives │ │ │ │ +DDeeffiinniittiioonn Lie.h:89 │ │ │ │ +_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ +TangentVector localCoordinates(const Class &g, ChartJacobian H1, ChartJacobian │ │ │ │ +H2=boost::none) const │ │ │ │ +localCoordinates with optional derivatives │ │ │ │ +DDeeffiinniittiioonn Lie.h:152 │ │ │ │ +_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_l_o_g_m_a_p │ │ │ │ +TangentVector logmap(const Class &g) const │ │ │ │ +logmap as required by manifold concept Applies logarithmic map to group element │ │ │ │ +that takes *this to g │ │ │ │ +DDeeffiinniittiioonn Lie.h:84 │ │ │ │ +_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_l_o_g_m_a_p │ │ │ │ +TangentVector logmap(const Class &g, ChartJacobian H1, ChartJacobian H2=boost:: │ │ │ │ +none) const │ │ │ │ +logmap with optional derivatives │ │ │ │ +DDeeffiinniittiioonn Lie.h:100 │ │ │ │ +_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ +static TangentVector LocalCoordinates(const Class &g) │ │ │ │ +LocalCoordinates at origin: possible in Lie group because it has an identity. │ │ │ │ +DDeeffiinniittiioonn Lie.h:116 │ │ │ │ +_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_r_e_t_r_a_c_t │ │ │ │ +Class retract(const TangentVector &v, ChartJacobian H1, ChartJacobian │ │ │ │ +H2=boost::none) const │ │ │ │ +retract with optional derivatives │ │ │ │ +DDeeffiinniittiioonn Lie.h:141 │ │ │ │ +_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ +static TangentVector LocalCoordinates(const Class &g, ChartJacobian H) │ │ │ │ +LocalCoordinates at origin with optional derivative. │ │ │ │ +DDeeffiinniittiioonn Lie.h:126 │ │ │ │ +_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_r_e_t_r_a_c_t │ │ │ │ +Class retract(const TangentVector &v) const │ │ │ │ +retract as required by manifold concept: applies v at *this │ │ │ │ +DDeeffiinniittiioonn Lie.h:131 │ │ │ │ +_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_e_x_p_m_a_p │ │ │ │ +Class expmap(const TangentVector &v) const │ │ │ │ +expmap as required by manifold concept Applies exponential map to v and │ │ │ │ +composes with *this │ │ │ │ +DDeeffiinniittiioonn Lie.h:78 │ │ │ │ +_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_R_e_t_r_a_c_t │ │ │ │ +static Class Retract(const TangentVector &v) │ │ │ │ +Retract at origin: possible in Lie group because it has an identity. │ │ │ │ +DDeeffiinniittiioonn Lie.h:111 │ │ │ │ +_g_t_s_a_m_:_:_l_i_e___g_r_o_u_p___t_a_g │ │ │ │ +tag to assert a type is a Lie group │ │ │ │ +DDeeffiinniittiioonn Lie.h:164 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p_T_r_a_i_t_s │ │ │ │ +A helper class that implements the traits interface for GTSAM lie groups. │ │ │ │ +DDeeffiinniittiioonn Lie.h:174 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p │ │ │ │ +Both LieGroupTraits and Testable. │ │ │ │ +DDeeffiinniittiioonn Lie.h:229 │ │ │ │ +_g_t_s_a_m_:_:_I_s_L_i_e_G_r_o_u_p │ │ │ │ +Lie Group Concept. │ │ │ │ +DDeeffiinniittiioonn Lie.h:260 │ │ │ │ +_g_t_s_a_m_:_:_T_r_a_n_s_f_o_r_m_C_o_v_a_r_i_a_n_c_e │ │ │ │ +Functor for transforming covariance of T. │ │ │ │ +DDeeffiinniittiioonn Lie.h:353 │ │ │ │ _g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g │ │ │ │ tag to assert a type is a manifold │ │ │ │ DDeeffiinniittiioonn Manifold.h:33 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_H_a_s_M_a_n_i_f_o_l_d_P_r_e_r_e_q_s │ │ │ │ -Requirements on type to pass it to Manifold template below. │ │ │ │ -DDeeffiinniittiioonn Manifold.h:59 │ │ │ │ _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_G_e_t_D_i_m_e_n_s_i_o_n_I_m_p_l │ │ │ │ Extra manifold traits for fixed-dimension types. │ │ │ │ DDeeffiinniittiioonn Manifold.h:75 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d_T_r_a_i_t_s │ │ │ │ -A helper that implements the traits interface for GTSAM manifolds. │ │ │ │ -DDeeffiinniittiioonn Manifold.h:95 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d │ │ │ │ -Both ManifoldTraits and Testable. │ │ │ │ -DDeeffiinniittiioonn Manifold.h:120 │ │ │ │ -_g_t_s_a_m_:_:_F_i_x_e_d_D_i_m_e_n_s_i_o_n │ │ │ │ -Give fixed size dimension of a type, fails at compile time if dynamic. │ │ │ │ -DDeeffiinniittiioonn Manifold.h:164 │ │ │ │ _g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ either a fixed size o... │ │ │ │ DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ -_g_t_s_a_m_:_:_I_s_T_e_s_t_a_b_l_e │ │ │ │ -A testable concept check that should be placed in applicable unit tests and in │ │ │ │ -generic algorithms. │ │ │ │ -DDeeffiinniittiioonn Testable.h:58 │ │ │ │ _g_t_s_a_m_:_:_T_e_s_t_a_b_l_e │ │ │ │ A helper that implements the traits interface for GTSAM types. │ │ │ │ DDeeffiinniittiioonn Testable.h:151 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _M_a_n_i_f_o_l_d_._h │ │ │ │ + * _L_i_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00116.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Lie.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Value.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,137 +95,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Macros | │ │ │ -Functions
│ │ │ -
Lie.h File Reference
│ │ │ +Namespaces
│ │ │ +
Value.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Base class and basic functions for Lie types. │ │ │ +

The base class for any variable that can be optimized or used in a factor. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │

│ │ │ Classes

struct  gtsam::LieGroup< Class, N >
 A CRTP helper class that implements Lie group methods Prerequisites: methods operator*, inverse, and AdjointMap, as well as a ChartAtOrigin struct that will be used to define the manifold Chart To use, simply derive, but also say "using LieGroup<Class,N>::inverse" For derivative math, see doc/math.pdf. More...
 
struct  gtsam::lie_group_tag
 tag to assert a type is a Lie group More...
 
struct  gtsam::internal::LieGroupTraits< Class >
 A helper class that implements the traits interface for GTSAM lie groups. More...
 
struct  gtsam::internal::LieGroup< Class >
 Both LieGroupTraits and Testable. More...
 
class  gtsam::IsLieGroup< T >
 Lie Group Concept. More...
 
class  gtsam::TransformCovariance< T >
 Functor for transforming covariance of T. More...
class  gtsam::Value
 This is the base class for any type to be stored in Values. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Macros

#define GTSAM_CONCEPT_LIE_INST(T)   template class gtsam::IsLieGroup<T>;
 Macros for using the LieConcept.
 
│ │ │ -#define GTSAM_CONCEPT_LIE_TYPE(T)   using _gtsam_IsLieGroup_##T = gtsam::IsLieGroup<T>;
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Functions

template<class Class >
Class gtsam::between_default (const Class &l1, const Class &l2)
 These core global functions can be specialized by new Lie types for better performance.
 
template<class Class >
Vector gtsam::logmap_default (const Class &l0, const Class &lp)
 Log map centered at l0, s.t.
 
template<class Class >
Class gtsam::expmap_default (const Class &t, const Vector &d)
 Exponential map centered at l0, s.t.
 
template<class T >
gtsam::BCH (const T &X, const T &Y)
 Three term approximation of the Baker-Campbell-Hausdorff formula In non-commutative Lie groups, when composing exp(Z) = exp(X)exp(Y) it is not true that Z = X+Y.
 
│ │ │ -template<class T >
Matrix gtsam::wedge (const Vector &x)
 Declaration of wedge (see Murray94book) used to convert from n exponential coordinates to n*n element of the Lie algebra.
 
template<class T >
gtsam::expm (const Vector &x, int K=7)
 Exponential map given exponential coordinates class T needs a wedge<> function and a constructor from Matrix.
 
template<typename T >
gtsam::interpolate (const T &X, const T &Y, double t, typename MakeOptionalJacobian< T, T >::type Hx=boost::none, typename MakeOptionalJacobian< T, T >::type Hy=boost::none)
 Linear interpolation between X and Y by coefficient t.
 
│ │ │

Detailed Description

│ │ │ -

Base class and basic functions for Lie types.

│ │ │ -
Author
Richard Roberts
│ │ │ -
│ │ │ -Alex Cunningham
│ │ │ -
│ │ │ -Frank Dellaert
│ │ │ -
│ │ │ -Mike Bosse
│ │ │ -
│ │ │ -Duy Nguyen Ta
│ │ │ -
│ │ │ -Yotam Stern
│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ GTSAM_CONCEPT_LIE_INST

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define GTSAM_CONCEPT_LIE_INST( T)   template class gtsam::IsLieGroup<T>;
│ │ │ -
│ │ │ - │ │ │ -

Macros for using the LieConcept.

│ │ │ -
    │ │ │ -
  • An instantiation for use inside unit tests
  • │ │ │ -
  • A typedef for use inside generic algorithms
  • │ │ │ -
│ │ │ -

NOTE: intentionally not in the gtsam namespace to allow for classes not in the gtsam namespace to be more easily enforced as testable

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +

The base class for any variable that can be optimized or used in a factor.

│ │ │ +
Author
Richard Roberts
│ │ │ +
Date
Jan 14, 2012
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,101 +1,28 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Lie.h File Reference │ │ │ │ -Base class and basic functions for Lie types. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +Value.h File Reference │ │ │ │ +The base class for any variable that can be optimized or used in a factor. │ │ │ │ +_M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_<_ _C_l_a_s_s_,_ _N_ _> │ │ │ │ - A CRTP helper class that implements Lie group methods Prerequisites: │ │ │ │ - methods operator*, inverse, and AdjointMap, as well as a ChartAtOrigin │ │ │ │ -  struct that will be used to define the manifold Chart To use, simply │ │ │ │ - derive, but also say "using LieGroup::inverse" For derivative │ │ │ │ - math, see doc/math.pdf. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_l_i_e___g_r_o_u_p___t_a_g │ │ │ │ -  tag to assert a type is a Lie group _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p_T_r_a_i_t_s_<_ _C_l_a_s_s_ _> │ │ │ │ -  A helper class that implements the traits interface for GTSAM lie │ │ │ │ - groups. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p_<_ _C_l_a_s_s_ _> │ │ │ │ -  Both _L_i_e_G_r_o_u_p_T_r_a_i_t_s and _T_e_s_t_a_b_l_e. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ - class   _g_t_s_a_m_:_:_I_s_L_i_e_G_r_o_u_p_<_ _T_ _> │ │ │ │ -  Lie Group Concept. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ - class   _g_t_s_a_m_:_:_T_r_a_n_s_f_o_r_m_C_o_v_a_r_i_a_n_c_e_<_ _T_ _> │ │ │ │ -  Functor for transforming covariance of T. _M_o_r_e_._._. │ │ │ │ +class   _g_t_s_a_m_:_:_V_a_l_u_e │ │ │ │ +  This is the base class for any type to be stored in _V_a_l_u_e_s. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  _G_T_S_A_M___C_O_N_C_E_P_T___L_I_E___I_N_S_T(T)   template class _g_t_s_a_m_:_:_I_s_L_i_e_G_r_o_u_p; │ │ │ │ -  Macros for using the LieConcept. │ │ │ │ -  │ │ │ │ -#define  GGTTSSAAMM__CCOONNCCEEPPTT__LLIIEE__TTYYPPEE(T)   using _gtsam_IsLieGroup_##T = _g_t_s_a_m_:_: │ │ │ │ - _I_s_L_i_e_G_r_o_u_p; │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ - Class  _g_t_s_a_m_:_:_b_e_t_w_e_e_n___d_e_f_a_u_l_t (const Class &l1, const Class &l2) │ │ │ │ -  These core global functions can be specialized by new Lie types for │ │ │ │ - better performance. │ │ │ │ -  │ │ │ │ -template │ │ │ │ -Vector  _g_t_s_a_m_:_:_l_o_g_m_a_p___d_e_f_a_u_l_t (const Class &l0, const Class &lp) │ │ │ │ -  Log map centered at l0, s.t. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - Class  _g_t_s_a_m_:_:_e_x_p_m_a_p___d_e_f_a_u_l_t (const Class &t, const Vector &d) │ │ │ │ -  Exponential map centered at l0, s.t. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - T  _g_t_s_a_m_:_:_B_C_H (const T &X, const T &Y) │ │ │ │ - Three term approximation of the Baker-Campbell-Hausdorff formula In │ │ │ │ -  non-commutative Lie groups, when composing exp(Z) = exp(X)exp(Y) it is │ │ │ │ - not true that Z = X+Y. │ │ │ │ -  │ │ │ │ -template │ │ │ │ -Matrix  ggttssaamm::::wweeddggee (const Vector &x) │ │ │ │ -  Declaration of wedge (see Murray94book) used to convert from n │ │ │ │ - exponential coordinates to n*n element of the Lie algebra. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - T  _g_t_s_a_m_:_:_e_x_p_m (const Vector &x, int K=7) │ │ │ │ -  Exponential map given exponential coordinates class T needs a wedge<> │ │ │ │ - function and a constructor from Matrix. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - T  _g_t_s_a_m_:_:_i_n_t_e_r_p_o_l_a_t_e (const T &X, const T &Y, double t, typename │ │ │ │ - _M_a_k_e_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< T, T >::type Hx=boost::none, typename │ │ │ │ - _M_a_k_e_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< T, T >::type Hy=boost::none) │ │ │ │ -  Linear interpolation between X and Y by coefficient t. │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Base class and basic functions for Lie types. │ │ │ │ +The base class for any variable that can be optimized or used in a factor. │ │ │ │ Author │ │ │ │ Richard Roberts │ │ │ │ - Alex Cunningham │ │ │ │ - Frank Dellaert │ │ │ │ - Mike Bosse │ │ │ │ - Duy Nguyen Ta │ │ │ │ - Yotam Stern │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? GGTTSSAAMM__CCOONNCCEEPPTT__LLIIEE__IINNSSTT ********** │ │ │ │ -#define GTSAM_CONCEPT_LIE_INST (   T )    template class _g_t_s_a_m_:_:_I_s_L_i_e_G_r_o_u_p; │ │ │ │ -Macros for using the LieConcept. │ │ │ │ - * An instantiation for use inside unit tests │ │ │ │ - * A typedef for use inside generic algorithms │ │ │ │ -NOTE: intentionally not in the gtsam namespace to allow for classes not in the │ │ │ │ -gtsam namespace to be more easily enforced as testable │ │ │ │ + Date │ │ │ │ + Jan 14, 2012 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _L_i_e_._h │ │ │ │ + * _V_a_l_u_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00116.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,16 +1,3 @@ │ │ │ │ var a00116 = [ │ │ │ │ - ["gtsam::LieGroup< Class, N >", "a02364.html", "a02364"], │ │ │ │ - ["gtsam::lie_group_tag", "a02368.html", null], │ │ │ │ - ["gtsam::internal::LieGroupTraits< Class >", "a02372.html", null], │ │ │ │ - ["gtsam::internal::LieGroup< Class >", "a02376.html", null], │ │ │ │ - ["gtsam::IsLieGroup< T >", "a02380.html", null], │ │ │ │ - ["gtsam::TransformCovariance< T >", "a02384.html", null], │ │ │ │ - ["GTSAM_CONCEPT_LIE_INST", "a00116.html#aeef5af7d583d275fbc0e6e5af8bf2afc", null], │ │ │ │ - ["BCH", "a00116.html#adbd55c711e6ceee791b595558eb3ec8a", null], │ │ │ │ - ["between_default", "a00116.html#abd92914d0822d42584d46f31fb500048", null], │ │ │ │ - ["expm", "a00116.html#a3041816208c79ef76d3ef2e0991d90b2", null], │ │ │ │ - ["expmap_default", "a00116.html#af5a7c0a7422c38a0baa131c073e233ac", null], │ │ │ │ - ["interpolate", "a00116.html#adaf06b04fa93b050e99bc3d571d85d53", null], │ │ │ │ - ["logmap_default", "a00116.html#a5c6ccec4a3ea452361c0956766bccef5", null], │ │ │ │ - ["wedge", "a00116.html#afe28b7f8e3592fb9f5cf9ebae09497ba", null] │ │ │ │ + ["gtsam::Value", "a02596.html", "a02596"] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00116_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Lie.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Value.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,382 +98,100 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Lie.h
│ │ │ +
Value.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
24#pragma once
│ │ │ -
25
│ │ │ -
26#include <gtsam/base/Manifold.h>
│ │ │ -
27#include <gtsam/base/Group.h>
│ │ │ -
28
│ │ │ -
29namespace gtsam {
│ │ │ -
30
│ │ │ -
36template <class Class, int N>
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ +
21#include <gtsam/config.h> // Configuration from CMake
│ │ │ +
22
│ │ │ +
23#include <gtsam/base/Vector.h>
│ │ │ +
24#include <boost/serialization/nvp.hpp>
│ │ │ +
25#include <boost/serialization/assume_abstract.hpp>
│ │ │ +
26#include <memory>
│ │ │ +
27
│ │ │ +
28namespace gtsam {
│ │ │ +
29
│ │ │
│ │ │ -
37struct LieGroup {
│ │ │ -
38
│ │ │ -
39 enum { dimension = N };
│ │ │ -
40 typedef OptionalJacobian<N, N> ChartJacobian;
│ │ │ -
41 typedef Eigen::Matrix<double, N, N> Jacobian;
│ │ │ -
42 typedef Eigen::Matrix<double, N, 1> TangentVector;
│ │ │ -
43
│ │ │ -
44 const Class & derived() const {
│ │ │ -
45 return static_cast<const Class&>(*this);
│ │ │ -
46 }
│ │ │ -
47
│ │ │ -
48 Class compose(const Class& g) const {
│ │ │ -
49 return derived() * g;
│ │ │ -
50 }
│ │ │ +
37 class GTSAM_EXPORT Value {
│ │ │ +
38 public:
│ │ │ +
39
│ │ │ +
41 virtual Value* clone_() const = 0;
│ │ │ +
42
│ │ │ +
44 virtual void deallocate_() const = 0;
│ │ │ +
45
│ │ │ +
47 virtual boost::shared_ptr<Value> clone() const = 0;
│ │ │ +
48
│ │ │ +
50 virtual bool equals_(const Value& other, double tol = 1e-9) const = 0;
│ │ │
51
│ │ │ -
52 Class between(const Class& g) const {
│ │ │ -
53 return derived().inverse() * g;
│ │ │ -
54 }
│ │ │ -
55
│ │ │ -
56 Class compose(const Class& g, ChartJacobian H1,
│ │ │ -
57 ChartJacobian H2 = boost::none) const {
│ │ │ -
58 if (H1) *H1 = g.inverse().AdjointMap();
│ │ │ -
59 if (H2) *H2 = Eigen::Matrix<double, N, N>::Identity();
│ │ │ -
60 return derived() * g;
│ │ │ -
61 }
│ │ │ -
62
│ │ │ -
63 Class between(const Class& g, ChartJacobian H1,
│ │ │ -
64 ChartJacobian H2 = boost::none) const {
│ │ │ -
65 Class result = derived().inverse() * g;
│ │ │ -
66 if (H1) *H1 = - result.inverse().AdjointMap();
│ │ │ -
67 if (H2) *H2 = Eigen::Matrix<double, N, N>::Identity();
│ │ │ -
68 return result;
│ │ │ -
69 }
│ │ │ -
70
│ │ │ -
71 Class inverse(ChartJacobian H) const {
│ │ │ -
72 if (H) *H = - derived().AdjointMap();
│ │ │ -
73 return derived().inverse();
│ │ │ -
74 }
│ │ │ -
75
│ │ │ -
│ │ │ -
78 Class expmap(const TangentVector& v) const {
│ │ │ -
79 return compose(Class::Expmap(v));
│ │ │ -
80 }
│ │ │ -
│ │ │ -
81
│ │ │ -
│ │ │ -
84 TangentVector logmap(const Class& g) const {
│ │ │ -
85 return Class::Logmap(between(g));
│ │ │ -
86 }
│ │ │ -
│ │ │ +
53 virtual void print(const std::string& str = "") const = 0;
│ │ │ +
54
│ │ │ +
60 virtual size_t dim() const = 0;
│ │ │ +
61
│ │ │ +
68 virtual Value* retract_(const Vector& delta) const = 0;
│ │ │ +
69
│ │ │ +
76 virtual Vector localCoordinates_(const Value& value) const = 0;
│ │ │ +
77
│ │ │ +
│ │ │ +
79 virtual Value& operator=(const Value& /*rhs*/) {
│ │ │ +
80 //needs a empty definition so recursion in implicit derived assignment operators work
│ │ │ +
81 return *this;
│ │ │ +
82 }
│ │ │ +
│ │ │ +
83
│ │ │ +
85 template<typename ValueType>
│ │ │ +
86 const ValueType& cast() const;
│ │ │
87
│ │ │ -
│ │ │ -
89 Class expmap(const TangentVector& v, //
│ │ │ -
90 ChartJacobian H1, ChartJacobian H2 = boost::none) const {
│ │ │ -
91 Jacobian D_g_v;
│ │ │ -
92 Class g = Class::Expmap(v,H2 ? &D_g_v : 0);
│ │ │ -
93 Class h = compose(g); // derivatives inlined below
│ │ │ -
94 if (H1) *H1 = g.inverse().AdjointMap();
│ │ │ -
95 if (H2) *H2 = D_g_v;
│ │ │ -
96 return h;
│ │ │ -
97 }
│ │ │ -
│ │ │ -
98
│ │ │ -
│ │ │ -
100 TangentVector logmap(const Class& g, //
│ │ │ -
101 ChartJacobian H1, ChartJacobian H2 = boost::none) const {
│ │ │ -
102 Class h = between(g); // derivatives inlined below
│ │ │ -
103 Jacobian D_v_h;
│ │ │ -
104 TangentVector v = Class::Logmap(h, (H1 || H2) ? &D_v_h : 0);
│ │ │ -
105 if (H1) *H1 = - D_v_h * h.inverse().AdjointMap();
│ │ │ -
106 if (H2) *H2 = D_v_h;
│ │ │ -
107 return v;
│ │ │ -
108 }
│ │ │ -
│ │ │ -
109
│ │ │ -
│ │ │ -
111 static Class Retract(const TangentVector& v) {
│ │ │ -
112 return Class::ChartAtOrigin::Retract(v);
│ │ │ -
113 }
│ │ │ -
│ │ │ -
114
│ │ │ -
│ │ │ -
116 static TangentVector LocalCoordinates(const Class& g) {
│ │ │ -
117 return Class::ChartAtOrigin::Local(g);
│ │ │ -
118 }
│ │ │ -
│ │ │ -
119
│ │ │ -
│ │ │ -
121 static Class Retract(const TangentVector& v, ChartJacobian H) {
│ │ │ -
122 return Class::ChartAtOrigin::Retract(v,H);
│ │ │ -
123 }
│ │ │ -
│ │ │ -
124
│ │ │ -
│ │ │ -
126 static TangentVector LocalCoordinates(const Class& g, ChartJacobian H) {
│ │ │ -
127 return Class::ChartAtOrigin::Local(g,H);
│ │ │ -
128 }
│ │ │ -
│ │ │ -
129
│ │ │ -
│ │ │ -
131 Class retract(const TangentVector& v) const {
│ │ │ -
132 return compose(Class::ChartAtOrigin::Retract(v));
│ │ │ -
133 }
│ │ │ -
│ │ │ -
134
│ │ │ -
│ │ │ -
136 TangentVector localCoordinates(const Class& g) const {
│ │ │ -
137 return Class::ChartAtOrigin::Local(between(g));
│ │ │ -
138 }
│ │ │ -
│ │ │ -
139
│ │ │ -
│ │ │ -
141 Class retract(const TangentVector& v, //
│ │ │ -
142 ChartJacobian H1, ChartJacobian H2 = boost::none) const {
│ │ │ -
143 Jacobian D_g_v;
│ │ │ -
144 Class g = Class::ChartAtOrigin::Retract(v, H2 ? &D_g_v : 0);
│ │ │ -
145 Class h = compose(g); // derivatives inlined below
│ │ │ -
146 if (H1) *H1 = g.inverse().AdjointMap();
│ │ │ -
147 if (H2) *H2 = D_g_v;
│ │ │ -
148 return h;
│ │ │ -
149 }
│ │ │ -
│ │ │ -
150
│ │ │ -
│ │ │ -
152 TangentVector localCoordinates(const Class& g, //
│ │ │ -
153 ChartJacobian H1, ChartJacobian H2 = boost::none) const {
│ │ │ -
154 Class h = between(g); // derivatives inlined below
│ │ │ -
155 Jacobian D_v_h;
│ │ │ -
156 TangentVector v = Class::ChartAtOrigin::Local(h, (H1 || H2) ? &D_v_h : 0);
│ │ │ -
157 if (H1) *H1 = - D_v_h * h.inverse().AdjointMap();
│ │ │ -
158 if (H2) *H2 = D_v_h;
│ │ │ -
159 return v;
│ │ │ -
160 }
│ │ │ -
│ │ │ -
161};
│ │ │ -
│ │ │ -
162
│ │ │ -
164struct lie_group_tag: public manifold_tag, public group_tag {};
│ │ │ -
165
│ │ │ -
166namespace internal {
│ │ │ -
167
│ │ │ -
173template<class Class>
│ │ │ -
│ │ │ -
174struct LieGroupTraits: GetDimensionImpl<Class, Class::dimension> {
│ │ │ - │ │ │ -
176
│ │ │ - │ │ │ -
180 static Class Identity() { return Class::Identity();}
│ │ │ -
182
│ │ │ -
185 typedef Class ManifoldType;
│ │ │ -
186 enum { dimension = Class::dimension };
│ │ │ -
187 typedef Eigen::Matrix<double, dimension, 1> TangentVector;
│ │ │ -
188 typedef OptionalJacobian<dimension, dimension> ChartJacobian;
│ │ │ -
189
│ │ │ -
190 static TangentVector Local(const Class& origin, const Class& other,
│ │ │ -
191 ChartJacobian Horigin = boost::none, ChartJacobian Hother = boost::none) {
│ │ │ -
192 return origin.localCoordinates(other, Horigin, Hother);
│ │ │ -
193 }
│ │ │ -
194
│ │ │ -
195 static Class Retract(const Class& origin, const TangentVector& v,
│ │ │ -
196 ChartJacobian Horigin = boost::none, ChartJacobian Hv = boost::none) {
│ │ │ -
197 return origin.retract(v, Horigin, Hv);
│ │ │ -
198 }
│ │ │ -
200
│ │ │ -
203 static TangentVector Logmap(const Class& m, ChartJacobian Hm = boost::none) {
│ │ │ -
204 return Class::Logmap(m, Hm);
│ │ │ -
205 }
│ │ │ -
206
│ │ │ -
207 static Class Expmap(const TangentVector& v, ChartJacobian Hv = boost::none) {
│ │ │ -
208 return Class::Expmap(v, Hv);
│ │ │ -
209 }
│ │ │ -
210
│ │ │ -
211 static Class Compose(const Class& m1, const Class& m2, //
│ │ │ -
212 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
│ │ │ -
213 return m1.compose(m2, H1, H2);
│ │ │ -
214 }
│ │ │ -
215
│ │ │ -
216 static Class Between(const Class& m1, const Class& m2, //
│ │ │ -
217 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
│ │ │ -
218 return m1.between(m2, H1, H2);
│ │ │ -
219 }
│ │ │ -
220
│ │ │ -
221 static Class Inverse(const Class& m, //
│ │ │ -
222 ChartJacobian H = boost::none) {
│ │ │ -
223 return m.inverse(H);
│ │ │ -
224 }
│ │ │ -
226};
│ │ │ -
│ │ │ -
227
│ │ │ -
229template<class Class> struct LieGroup: LieGroupTraits<Class>, Testable<Class> {};
│ │ │ -
230
│ │ │ -
231} // \ namepsace internal
│ │ │ -
232
│ │ │ -
239template<class Class>
│ │ │ -
│ │ │ -
240inline Class between_default(const Class& l1, const Class& l2) {
│ │ │ -
241 return l1.inverse().compose(l2);
│ │ │ -
242}
│ │ │ -
│ │ │ -
243
│ │ │ -
245template<class Class>
│ │ │ -
│ │ │ -
246inline Vector logmap_default(const Class& l0, const Class& lp) {
│ │ │ -
247 return Class::Logmap(l0.between(lp));
│ │ │ -
248}
│ │ │ -
│ │ │ -
249
│ │ │ -
251template<class Class>
│ │ │ -
│ │ │ -
252inline Class expmap_default(const Class& t, const Vector& d) {
│ │ │ -
253 return t.compose(Class::Expmap(d));
│ │ │ -
254}
│ │ │ -
│ │ │ -
255
│ │ │ -
259template<typename T>
│ │ │ -
│ │ │ -
260class IsLieGroup: public IsGroup<T>, public IsManifold<T> {
│ │ │ -
261public:
│ │ │ -
262 typedef typename traits<T>::structure_category structure_category_tag;
│ │ │ -
263 typedef typename traits<T>::ManifoldType ManifoldType;
│ │ │ -
264 typedef typename traits<T>::TangentVector TangentVector;
│ │ │ -
265 typedef typename traits<T>::ChartJacobian ChartJacobian;
│ │ │ -
266
│ │ │ -
267 BOOST_CONCEPT_USAGE(IsLieGroup) {
│ │ │ -
268 BOOST_STATIC_ASSERT_MSG(
│ │ │ -
269 (boost::is_base_of<lie_group_tag, structure_category_tag>::value),
│ │ │ -
270 "This type's trait does not assert it is a Lie group (or derived)");
│ │ │ -
271
│ │ │ -
272 // group opertations with Jacobians
│ │ │ -
273 g = traits<T>::Compose(g, h, Hg, Hh);
│ │ │ -
274 g = traits<T>::Between(g, h, Hg, Hh);
│ │ │ -
275 g = traits<T>::Inverse(g, Hg);
│ │ │ -
276 // log and exp map without Jacobians
│ │ │ -
277 g = traits<T>::Expmap(v);
│ │ │ -
278 v = traits<T>::Logmap(g);
│ │ │ -
279 // log and exponential map with Jacobians
│ │ │ -
280 g = traits<T>::Expmap(v, Hg);
│ │ │ -
281 v = traits<T>::Logmap(g, Hg);
│ │ │ -
282 }
│ │ │ -
283private:
│ │ │ -
284 T g, h;
│ │ │ -
285 TangentVector v;
│ │ │ -
286 ChartJacobian Hg, Hh;
│ │ │ -
287};
│ │ │ -
│ │ │ -
288
│ │ │ -
297template<class T>
│ │ │ -
│ │ │ -
298T BCH(const T& X, const T& Y) {
│ │ │ -
299 static const double _2 = 1. / 2., _12 = 1. / 12., _24 = 1. / 24.;
│ │ │ -
300 T X_Y = bracket(X, Y);
│ │ │ -
301 return T(X + Y + _2 * X_Y + _12 * bracket(X - Y, X_Y) - _24 * bracket(Y, bracket(X, X_Y)));
│ │ │ -
302}
│ │ │ -
│ │ │ -
303
│ │ │ -
308template <class T> Matrix wedge(const Vector& x);
│ │ │ -
309
│ │ │ -
316template <class T>
│ │ │ -
│ │ │ -
317T expm(const Vector& x, int K=7) {
│ │ │ -
318 Matrix xhat = wedge<T>(x);
│ │ │ -
319 return T(expm(xhat,K));
│ │ │ -
320}
│ │ │ -
│ │ │ -
321
│ │ │ -
326template <typename T>
│ │ │ -
│ │ │ -
327T interpolate(const T& X, const T& Y, double t,
│ │ │ -
328 typename MakeOptionalJacobian<T, T>::type Hx = boost::none,
│ │ │ -
329 typename MakeOptionalJacobian<T, T>::type Hy = boost::none) {
│ │ │ -
330 if (Hx || Hy) {
│ │ │ -
331 typename MakeJacobian<T, T>::type between_H_x, log_H, exp_H, compose_H_x;
│ │ │ -
332 const T between =
│ │ │ -
333 traits<T>::Between(X, Y, between_H_x); // between_H_y = identity
│ │ │ -
334 typename traits<T>::TangentVector delta = traits<T>::Logmap(between, log_H);
│ │ │ -
335 const T Delta = traits<T>::Expmap(t * delta, exp_H);
│ │ │ -
336 const T result = traits<T>::Compose(
│ │ │ -
337 X, Delta, compose_H_x); // compose_H_xinv_y = identity
│ │ │ -
338
│ │ │ -
339 if (Hx) *Hx = compose_H_x + t * exp_H * log_H * between_H_x;
│ │ │ -
340 if (Hy) *Hy = t * exp_H * log_H;
│ │ │ -
341 return result;
│ │ │ -
342 }
│ │ │ -
343 return traits<T>::Compose(
│ │ │ - │ │ │ -
345}
│ │ │ -
│ │ │ -
346
│ │ │ -
351template<class T>
│ │ │ -
│ │ │ - │ │ │ -
353{
│ │ │ -
354private:
│ │ │ -
355 typename T::Jacobian adjointMap_;
│ │ │ -
356public:
│ │ │ -
357 explicit TransformCovariance(const T &X) : adjointMap_{X.AdjointMap()} {}
│ │ │ -
358 typename T::Jacobian operator()(const typename T::Jacobian &covariance)
│ │ │ -
359 { return adjointMap_ * covariance * adjointMap_.transpose(); }
│ │ │ -
360};
│ │ │ -
│ │ │ -
361
│ │ │ -
362} // namespace gtsam
│ │ │ -
363
│ │ │ -
372#define GTSAM_CONCEPT_LIE_INST(T) template class gtsam::IsLieGroup<T>;
│ │ │ -
373#define GTSAM_CONCEPT_LIE_TYPE(T) using _gtsam_IsLieGroup_##T = gtsam::IsLieGroup<T>;
│ │ │ -
Base class and basic functions for Manifold types.
│ │ │ -
Concept check class for variable types with Group properties.
│ │ │ +
89 virtual ~Value() {}
│ │ │ +
90
│ │ │ +
91 private:
│ │ │ +
122 friend class boost::serialization::access;
│ │ │ +
123 template<class ARCHIVE>
│ │ │ +
124 void serialize(ARCHIVE & /*ar*/, const unsigned int /*version*/) {
│ │ │ +
125 }
│ │ │ +
126
│ │ │ +
127 };
│ │ │ +
│ │ │ +
128
│ │ │ +
129} /* namespace gtsam */
│ │ │ +
130
│ │ │ +
131BOOST_SERIALIZATION_ASSUME_ABSTRACT(gtsam::Value)
│ │ │ +
typedef and functions to augment Eigen's VectorXd
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
T expm(const Vector &x, int K=7)
Exponential map given exponential coordinates class T needs a wedge<> function and a constructor from...
Definition Lie.h:317
│ │ │ -
Vector logmap_default(const Class &l0, const Class &lp)
Log map centered at l0, s.t.
Definition Lie.h:246
│ │ │ -
Class between_default(const Class &l1, const Class &l2)
These core global functions can be specialized by new Lie types for better performance.
Definition Lie.h:240
│ │ │ -
T interpolate(const T &X, const T &Y, double t, typename MakeOptionalJacobian< T, T >::type Hx=boost::none, typename MakeOptionalJacobian< T, T >::type Hy=boost::none)
Linear interpolation between X and Y by coefficient t.
Definition Lie.h:327
│ │ │ -
T BCH(const T &X, const T &Y)
Three term approximation of the Baker-Campbell-Hausdorff formula In non-commutative Lie groups,...
Definition Lie.h:298
│ │ │ -
Class expmap_default(const Class &t, const Vector &d)
Exponential map centered at l0, s.t.
Definition Lie.h:252
│ │ │ -
Matrix wedge(const Vector &x)
Declaration of wedge (see Murray94book) used to convert from n exponential coordinates to n*n element...
│ │ │ -
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ -
tag to assert a type is a group
Definition Group.h:34
│ │ │ -
Group operator syntax flavors.
Definition Group.h:37
│ │ │ -
Group Concept.
Definition Group.h:46
│ │ │ -
A CRTP helper class that implements Lie group methods Prerequisites: methods operator*,...
Definition Lie.h:37
│ │ │ -
static Class Retract(const TangentVector &v, ChartJacobian H)
Retract at origin with optional derivative.
Definition Lie.h:121
│ │ │ -
TangentVector localCoordinates(const Class &g) const
localCoordinates as required by manifold concept: finds tangent vector between *this and g
Definition Lie.h:136
│ │ │ -
Class expmap(const TangentVector &v, ChartJacobian H1, ChartJacobian H2=boost::none) const
expmap with optional derivatives
Definition Lie.h:89
│ │ │ -
TangentVector localCoordinates(const Class &g, ChartJacobian H1, ChartJacobian H2=boost::none) const
localCoordinates with optional derivatives
Definition Lie.h:152
│ │ │ -
TangentVector logmap(const Class &g) const
logmap as required by manifold concept Applies logarithmic map to group element that takes *this to g
Definition Lie.h:84
│ │ │ -
TangentVector logmap(const Class &g, ChartJacobian H1, ChartJacobian H2=boost::none) const
logmap with optional derivatives
Definition Lie.h:100
│ │ │ -
static TangentVector LocalCoordinates(const Class &g)
LocalCoordinates at origin: possible in Lie group because it has an identity.
Definition Lie.h:116
│ │ │ -
Class retract(const TangentVector &v, ChartJacobian H1, ChartJacobian H2=boost::none) const
retract with optional derivatives
Definition Lie.h:141
│ │ │ -
static TangentVector LocalCoordinates(const Class &g, ChartJacobian H)
LocalCoordinates at origin with optional derivative.
Definition Lie.h:126
│ │ │ -
Class retract(const TangentVector &v) const
retract as required by manifold concept: applies v at *this
Definition Lie.h:131
│ │ │ -
Class expmap(const TangentVector &v) const
expmap as required by manifold concept Applies exponential map to v and composes with *this
Definition Lie.h:78
│ │ │ -
static Class Retract(const TangentVector &v)
Retract at origin: possible in Lie group because it has an identity.
Definition Lie.h:111
│ │ │ -
tag to assert a type is a Lie group
Definition Lie.h:164
│ │ │ -
A helper class that implements the traits interface for GTSAM lie groups.
Definition Lie.h:174
│ │ │ -
Both LieGroupTraits and Testable.
Definition Lie.h:229
│ │ │ -
Lie Group Concept.
Definition Lie.h:260
│ │ │ -
Functor for transforming covariance of T.
Definition Lie.h:353
│ │ │ -
tag to assert a type is a manifold
Definition Manifold.h:33
│ │ │ -
Extra manifold traits for fixed-dimension types.
Definition Manifold.h:75
│ │ │ -
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:41
│ │ │ -
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:151
│ │ │ +
This is the base class for any type to be stored in Values.
Definition Value.h:37
│ │ │ +
virtual size_t dim() const =0
Return the dimensionality of the tangent space of this value.
│ │ │ +
virtual Value * retract_(const Vector &delta) const =0
Increment the value, by mapping from the vector delta in the tangent space of the current value back ...
│ │ │ +
virtual void deallocate_() const =0
Deallocate a raw pointer of this value.
│ │ │ +
virtual ~Value()
Virutal destructor.
Definition Value.h:89
│ │ │ +
virtual bool equals_(const Value &other, double tol=1e-9) const =0
Compare this Value with another for equality.
│ │ │ +
virtual Vector localCoordinates_(const Value &value) const =0
Compute the coordinates in the tangent space of this value that retract() would map to value.
│ │ │ +
virtual Value & operator=(const Value &)
Assignment operator.
Definition Value.h:79
│ │ │ +
virtual void print(const std::string &str="") const =0
Print this value, for debugging and unit tests.
│ │ │ +
virtual Value * clone_() const =0
Clone this value in a special memory pool, must be deleted with Value::deallocate_,...
│ │ │ +
virtual boost::shared_ptr< Value > clone() const =0
Clone this value (normal clone on the heap, delete with 'delete' operator)
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,440 +1,119 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Lie.h │ │ │ │ +Value.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -24#pragma once │ │ │ │ -25 │ │ │ │ -26#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_n_i_f_o_l_d_._h> │ │ │ │ -27#include <_g_t_s_a_m_/_b_a_s_e_/_G_r_o_u_p_._h> │ │ │ │ -28 │ │ │ │ -29namespace _g_t_s_a_m { │ │ │ │ -30 │ │ │ │ -36template │ │ │ │ -_3_7struct _L_i_e_G_r_o_u_p { │ │ │ │ -38 │ │ │ │ -39 enum { dimension = N }; │ │ │ │ -40 typedef _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_N_,_ _N_> ChartJacobian; │ │ │ │ -41 typedef Eigen::Matrix Jacobian; │ │ │ │ -42 typedef Eigen::Matrix TangentVector; │ │ │ │ -43 │ │ │ │ -44 const Class & derived() const { │ │ │ │ -45 return static_cast(*this); │ │ │ │ -46 } │ │ │ │ -47 │ │ │ │ -48 Class compose(const Class& g) const { │ │ │ │ -49 return derived() * g; │ │ │ │ -50 } │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +21#include // Configuration from CMake │ │ │ │ +22 │ │ │ │ +23#include <_g_t_s_a_m_/_b_a_s_e_/_V_e_c_t_o_r_._h> │ │ │ │ +24#include │ │ │ │ +25#include │ │ │ │ +26#include │ │ │ │ +27 │ │ │ │ +28namespace _g_t_s_a_m { │ │ │ │ +29 │ │ │ │ +_3_7 class GTSAM_EXPORT _V_a_l_u_e { │ │ │ │ +38 public: │ │ │ │ +39 │ │ │ │ +_4_1 virtual _V_a_l_u_e* _c_l_o_n_e__() const = 0; │ │ │ │ +42 │ │ │ │ +_4_4 virtual void _d_e_a_l_l_o_c_a_t_e__() const = 0; │ │ │ │ +45 │ │ │ │ +_4_7 virtual boost::shared_ptr _c_l_o_n_e() const = 0; │ │ │ │ +48 │ │ │ │ +_5_0 virtual bool _e_q_u_a_l_s__(const _V_a_l_u_e& other, double tol = 1e-9) const = 0; │ │ │ │ 51 │ │ │ │ -52 Class between(const Class& g) const { │ │ │ │ -53 return derived().inverse() * g; │ │ │ │ -54 } │ │ │ │ -55 │ │ │ │ -56 Class compose(const Class& g, ChartJacobian H1, │ │ │ │ -57 ChartJacobian H2 = boost::none) const { │ │ │ │ -58 if (H1) *H1 = g.inverse().AdjointMap(); │ │ │ │ -59 if (H2) *H2 = Eigen::Matrix::Identity(); │ │ │ │ -60 return derived() * g; │ │ │ │ -61 } │ │ │ │ -62 │ │ │ │ -63 Class between(const Class& g, ChartJacobian H1, │ │ │ │ -64 ChartJacobian H2 = boost::none) const { │ │ │ │ -65 Class result = derived().inverse() * g; │ │ │ │ -66 if (H1) *H1 = - result.inverse().AdjointMap(); │ │ │ │ -67 if (H2) *H2 = Eigen::Matrix::Identity(); │ │ │ │ -68 return result; │ │ │ │ -69 } │ │ │ │ -70 │ │ │ │ -71 Class inverse(ChartJacobian H) const { │ │ │ │ -72 if (H) *H = - derived().AdjointMap(); │ │ │ │ -73 return derived().inverse(); │ │ │ │ -74 } │ │ │ │ -75 │ │ │ │ -_7_8 Class _e_x_p_m_a_p(const TangentVector& v) const { │ │ │ │ -79 return compose(Class::Expmap(v)); │ │ │ │ -80 } │ │ │ │ -81 │ │ │ │ -_8_4 TangentVector _l_o_g_m_a_p(const Class& g) const { │ │ │ │ -85 return Class::Logmap(between(g)); │ │ │ │ -86 } │ │ │ │ +_5_3 virtual void _p_r_i_n_t(const std::string& str = "") const = 0; │ │ │ │ +54 │ │ │ │ +_6_0 virtual size_t _d_i_m() const = 0; │ │ │ │ +61 │ │ │ │ +_6_8 virtual _V_a_l_u_e* _r_e_t_r_a_c_t__(const Vector& delta) const = 0; │ │ │ │ +69 │ │ │ │ +_7_6 virtual Vector _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s__(const _V_a_l_u_e& value) const = 0; │ │ │ │ +77 │ │ │ │ +_7_9 virtual _V_a_l_u_e& _o_p_e_r_a_t_o_r_=(const _V_a_l_u_e& /*rhs*/) { │ │ │ │ +80 //needs a empty definition so recursion in implicit derived assignment │ │ │ │ +operators work │ │ │ │ +81 return *this; │ │ │ │ +82 } │ │ │ │ +83 │ │ │ │ +85 template │ │ │ │ +86 const ValueType& cast() const; │ │ │ │ 87 │ │ │ │ -_8_9 Class _e_x_p_m_a_p(const TangentVector& v, // │ │ │ │ -90 ChartJacobian H1, ChartJacobian H2 = boost::none) const { │ │ │ │ -91 Jacobian D_g_v; │ │ │ │ -92 Class g = Class::Expmap(v,H2 ? &D_g_v : 0); │ │ │ │ -93 Class h = compose(g); // derivatives inlined below │ │ │ │ -94 if (H1) *H1 = g.inverse().AdjointMap(); │ │ │ │ -95 if (H2) *H2 = D_g_v; │ │ │ │ -96 return h; │ │ │ │ -97 } │ │ │ │ -98 │ │ │ │ -_1_0_0 TangentVector _l_o_g_m_a_p(const Class& g, // │ │ │ │ -101 ChartJacobian H1, ChartJacobian H2 = boost::none) const { │ │ │ │ -102 Class h = between(g); // derivatives inlined below │ │ │ │ -103 Jacobian D_v_h; │ │ │ │ -104 TangentVector v = Class::Logmap(h, (H1 || H2) ? &D_v_h : 0); │ │ │ │ -105 if (H1) *H1 = - D_v_h * h.inverse().AdjointMap(); │ │ │ │ -106 if (H2) *H2 = D_v_h; │ │ │ │ -107 return v; │ │ │ │ -108 } │ │ │ │ -109 │ │ │ │ -_1_1_1 static Class _R_e_t_r_a_c_t(const TangentVector& v) { │ │ │ │ -112 return Class::ChartAtOrigin::Retract(v); │ │ │ │ -113 } │ │ │ │ -114 │ │ │ │ -_1_1_6 static TangentVector _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const Class& g) { │ │ │ │ -117 return Class::ChartAtOrigin::Local(g); │ │ │ │ -118 } │ │ │ │ -119 │ │ │ │ -_1_2_1 static Class _R_e_t_r_a_c_t(const TangentVector& v, ChartJacobian H) { │ │ │ │ -122 return Class::ChartAtOrigin::Retract(v,H); │ │ │ │ -123 } │ │ │ │ -124 │ │ │ │ -_1_2_6 static TangentVector _L_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const Class& g, ChartJacobian H) { │ │ │ │ -127 return Class::ChartAtOrigin::Local(g,H); │ │ │ │ -128 } │ │ │ │ -129 │ │ │ │ -_1_3_1 Class _r_e_t_r_a_c_t(const TangentVector& v) const { │ │ │ │ -132 return compose(Class::ChartAtOrigin::Retract(v)); │ │ │ │ -133 } │ │ │ │ -134 │ │ │ │ -_1_3_6 TangentVector _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const Class& g) const { │ │ │ │ -137 return Class::ChartAtOrigin::Local(between(g)); │ │ │ │ -138 } │ │ │ │ -139 │ │ │ │ -_1_4_1 Class _r_e_t_r_a_c_t(const TangentVector& v, // │ │ │ │ -142 ChartJacobian H1, ChartJacobian H2 = boost::none) const { │ │ │ │ -143 Jacobian D_g_v; │ │ │ │ -144 Class g = Class::ChartAtOrigin::Retract(v, H2 ? &D_g_v : 0); │ │ │ │ -145 Class h = compose(g); // derivatives inlined below │ │ │ │ -146 if (H1) *H1 = g.inverse().AdjointMap(); │ │ │ │ -147 if (H2) *H2 = D_g_v; │ │ │ │ -148 return h; │ │ │ │ -149 } │ │ │ │ -150 │ │ │ │ -_1_5_2 TangentVector _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const Class& g, // │ │ │ │ -153 ChartJacobian H1, ChartJacobian H2 = boost::none) const { │ │ │ │ -154 Class h = between(g); // derivatives inlined below │ │ │ │ -155 Jacobian D_v_h; │ │ │ │ -156 TangentVector v = Class::ChartAtOrigin::Local(h, (H1 || H2) ? &D_v_h : 0); │ │ │ │ -157 if (H1) *H1 = - D_v_h * h.inverse().AdjointMap(); │ │ │ │ -158 if (H2) *H2 = D_v_h; │ │ │ │ -159 return v; │ │ │ │ -160 } │ │ │ │ -161}; │ │ │ │ -162 │ │ │ │ -_1_6_4struct _l_i_e___g_r_o_u_p___t_a_g: public _m_a_n_i_f_o_l_d___t_a_g, public _g_r_o_u_p___t_a_g {}; │ │ │ │ -165 │ │ │ │ -166namespace internal { │ │ │ │ -167 │ │ │ │ -173template │ │ │ │ -_1_7_4struct _L_i_e_G_r_o_u_p_T_r_a_i_t_s: _G_e_t_D_i_m_e_n_s_i_o_n_I_m_p_l { │ │ │ │ -175 typedef _l_i_e___g_r_o_u_p___t_a_g _s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y; │ │ │ │ -176 │ │ │ │ -179 typedef _m_u_l_t_i_p_l_i_c_a_t_i_v_e___g_r_o_u_p___t_a_g _g_r_o_u_p___f_l_a_v_o_r; │ │ │ │ -180 static Class Identity() { return Class::Identity();} │ │ │ │ -182 │ │ │ │ -185 typedef Class ManifoldType; │ │ │ │ -186 enum { dimension = Class::dimension }; │ │ │ │ -187 typedef Eigen::Matrix TangentVector; │ │ │ │ -188 typedef _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_d_i_m_e_n_s_i_o_n_,_ _d_i_m_e_n_s_i_o_n_> ChartJacobian; │ │ │ │ -189 │ │ │ │ -190 static TangentVector Local(const Class& origin, const Class& other, │ │ │ │ -191 ChartJacobian Horigin = boost::none, ChartJacobian Hother = boost::none) { │ │ │ │ -192 return origin.localCoordinates(other, Horigin, Hother); │ │ │ │ -193 } │ │ │ │ -194 │ │ │ │ -195 static Class Retract(const Class& origin, const TangentVector& v, │ │ │ │ -196 ChartJacobian Horigin = boost::none, ChartJacobian Hv = boost::none) { │ │ │ │ -197 return origin.retract(v, Horigin, Hv); │ │ │ │ -198 } │ │ │ │ -200 │ │ │ │ -203 static TangentVector Logmap(const Class& m, ChartJacobian Hm = boost::none) │ │ │ │ -{ │ │ │ │ -204 return Class::Logmap(m, Hm); │ │ │ │ -205 } │ │ │ │ -206 │ │ │ │ -207 static Class Expmap(const TangentVector& v, ChartJacobian Hv = boost::none) │ │ │ │ -{ │ │ │ │ -208 return Class::Expmap(v, Hv); │ │ │ │ -209 } │ │ │ │ -210 │ │ │ │ -211 static Class Compose(const Class& m1, const Class& m2, // │ │ │ │ -212 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) { │ │ │ │ -213 return m1.compose(m2, H1, H2); │ │ │ │ -214 } │ │ │ │ -215 │ │ │ │ -216 static Class Between(const Class& m1, const Class& m2, // │ │ │ │ -217 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) { │ │ │ │ -218 return m1.between(m2, H1, H2); │ │ │ │ -219 } │ │ │ │ -220 │ │ │ │ -221 static Class Inverse(const Class& m, // │ │ │ │ -222 ChartJacobian H = boost::none) { │ │ │ │ -223 return m.inverse(H); │ │ │ │ -224 } │ │ │ │ -226}; │ │ │ │ -227 │ │ │ │ -_2_2_9template struct _L_i_e_G_r_o_u_p: _L_i_e_G_r_o_u_p_T_r_a_i_t_s, │ │ │ │ -_T_e_s_t_a_b_l_e {}; │ │ │ │ -230 │ │ │ │ -231} // \ namepsace internal │ │ │ │ -232 │ │ │ │ -239template │ │ │ │ -_2_4_0inline Class _b_e_t_w_e_e_n___d_e_f_a_u_l_t(const Class& l1, const Class& l2) { │ │ │ │ -241 return l1.inverse().compose(l2); │ │ │ │ -242} │ │ │ │ -243 │ │ │ │ -245template │ │ │ │ -_2_4_6inline Vector _l_o_g_m_a_p___d_e_f_a_u_l_t(const Class& l0, const Class& lp) { │ │ │ │ -247 return Class::Logmap(l0.between(lp)); │ │ │ │ -248} │ │ │ │ -249 │ │ │ │ -251template │ │ │ │ -_2_5_2inline Class _e_x_p_m_a_p___d_e_f_a_u_l_t(const Class& t, const Vector& d) { │ │ │ │ -253 return t.compose(Class::Expmap(d)); │ │ │ │ -254} │ │ │ │ -255 │ │ │ │ -259template │ │ │ │ -_2_6_0class _I_s_L_i_e_G_r_o_u_p: public _I_s_G_r_o_u_p, public IsManifold { │ │ │ │ -261public: │ │ │ │ -262 typedef typename _t_r_a_i_t_s_<_T_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y structure_category_tag; │ │ │ │ -263 typedef typename _t_r_a_i_t_s_<_T_>_:_:_M_a_n_i_f_o_l_d_T_y_p_e ManifoldType; │ │ │ │ -264 typedef typename _t_r_a_i_t_s_<_T_>_:_:_T_a_n_g_e_n_t_V_e_c_t_o_r TangentVector; │ │ │ │ -265 typedef typename _t_r_a_i_t_s_<_T_>_:_:_C_h_a_r_t_J_a_c_o_b_i_a_n ChartJacobian; │ │ │ │ -266 │ │ │ │ -267 BOOST_CONCEPT_USAGE(_I_s_L_i_e_G_r_o_u_p) { │ │ │ │ -268 BOOST_STATIC_ASSERT_MSG( │ │ │ │ -269 (boost::is_base_of::value), │ │ │ │ -270 "This type's trait does not assert it is a Lie group (or derived)"); │ │ │ │ -271 │ │ │ │ -272 // group opertations with Jacobians │ │ │ │ -273 g = _t_r_a_i_t_s_<_T_>_:_:_C_o_m_p_o_s_e(g, h, Hg, Hh); │ │ │ │ -274 g = _t_r_a_i_t_s_<_T_>_:_:_B_e_t_w_e_e_n(g, h, Hg, Hh); │ │ │ │ -275 g = _t_r_a_i_t_s_<_T_>_:_:_I_n_v_e_r_s_e(g, Hg); │ │ │ │ -276 // log and exp map without Jacobians │ │ │ │ -277 g = _t_r_a_i_t_s_<_T_>_:_:_E_x_p_m_a_p(v); │ │ │ │ -278 v = _t_r_a_i_t_s_<_T_>_:_:_L_o_g_m_a_p(g); │ │ │ │ -279 // log and exponential map with Jacobians │ │ │ │ -280 g = _t_r_a_i_t_s_<_T_>_:_:_E_x_p_m_a_p(v, Hg); │ │ │ │ -281 v = _t_r_a_i_t_s_<_T_>_:_:_L_o_g_m_a_p(g, Hg); │ │ │ │ -282 } │ │ │ │ -283private: │ │ │ │ -284 T g, h; │ │ │ │ -285 TangentVector v; │ │ │ │ -286 ChartJacobian Hg, Hh; │ │ │ │ -287}; │ │ │ │ -288 │ │ │ │ -297template │ │ │ │ -_2_9_8T _B_C_H(const T& X, const T& Y) { │ │ │ │ -299 static const double _2 = 1. / 2., _12 = 1. / 12., _24 = 1. / 24.; │ │ │ │ -300 T X_Y = bracket(X, Y); │ │ │ │ -301 return T(X + Y + _2 * X_Y + _12 * bracket(X - Y, X_Y) - _24 * bracket(Y, │ │ │ │ -bracket(X, X_Y))); │ │ │ │ -302} │ │ │ │ -303 │ │ │ │ -_3_0_8template Matrix _w_e_d_g_e(const Vector& x); │ │ │ │ -309 │ │ │ │ -316template │ │ │ │ -_3_1_7T _e_x_p_m(const Vector& x, int K=7) { │ │ │ │ -318 Matrix xhat = wedge(x); │ │ │ │ -319 return T(_e_x_p_m(xhat,K)); │ │ │ │ -320} │ │ │ │ -321 │ │ │ │ -326template │ │ │ │ -_3_2_7T _i_n_t_e_r_p_o_l_a_t_e(const T& X, const T& Y, double t, │ │ │ │ -328 typename MakeOptionalJacobian::type Hx = boost::none, │ │ │ │ -329 typename MakeOptionalJacobian::type Hy = boost::none) { │ │ │ │ -330 if (Hx || Hy) { │ │ │ │ -331 typename MakeJacobian::type between_H_x, log_H, exp_H, compose_H_x; │ │ │ │ -332 const T between = │ │ │ │ -333 _t_r_a_i_t_s_<_T_>_:_:_B_e_t_w_e_e_n(X, Y, between_H_x); // between_H_y = identity │ │ │ │ -334 typename _t_r_a_i_t_s_<_T_>_:_:_T_a_n_g_e_n_t_V_e_c_t_o_r delta = _t_r_a_i_t_s_<_T_>_:_:_L_o_g_m_a_p(between, │ │ │ │ -log_H); │ │ │ │ -335 const T Delta = _t_r_a_i_t_s_<_T_>_:_:_E_x_p_m_a_p(t * delta, exp_H); │ │ │ │ -336 const T result = _t_r_a_i_t_s_<_T_>_:_:_C_o_m_p_o_s_e( │ │ │ │ -337 X, Delta, compose_H_x); // compose_H_xinv_y = identity │ │ │ │ -338 │ │ │ │ -339 if (Hx) *Hx = compose_H_x + t * exp_H * log_H * between_H_x; │ │ │ │ -340 if (Hy) *Hy = t * exp_H * log_H; │ │ │ │ -341 return result; │ │ │ │ -342 } │ │ │ │ -343 return _t_r_a_i_t_s_<_T_>_:_:_C_o_m_p_o_s_e( │ │ │ │ -344 X, _t_r_a_i_t_s_<_T_>_:_:_E_x_p_m_a_p(t * _t_r_a_i_t_s_<_T_>_:_:_L_o_g_m_a_p(_t_r_a_i_t_s_<_T_>_:_:_B_e_t_w_e_e_n(X, Y)))); │ │ │ │ -345} │ │ │ │ -346 │ │ │ │ -351template │ │ │ │ -_3_5_2class _T_r_a_n_s_f_o_r_m_C_o_v_a_r_i_a_n_c_e │ │ │ │ -353{ │ │ │ │ -354private: │ │ │ │ -355 typename T::Jacobian adjointMap_; │ │ │ │ -356public: │ │ │ │ -357 explicit _T_r_a_n_s_f_o_r_m_C_o_v_a_r_i_a_n_c_e(const T &X) : adjointMap_{X.AdjointMap()} {} │ │ │ │ -358 typename T::Jacobian operator()(const typename T::Jacobian &covariance) │ │ │ │ -359 { return adjointMap_ * covariance * adjointMap_.transpose(); } │ │ │ │ -360}; │ │ │ │ -361 │ │ │ │ -362} // namespace gtsam │ │ │ │ -363 │ │ │ │ -_3_7_2#define GTSAM_CONCEPT_LIE_INST(T) template class gtsam::IsLieGroup; │ │ │ │ -373#define GTSAM_CONCEPT_LIE_TYPE(T) using _gtsam_IsLieGroup_##T = gtsam:: │ │ │ │ -IsLieGroup; │ │ │ │ -_M_a_n_i_f_o_l_d_._h │ │ │ │ -Base class and basic functions for Manifold types. │ │ │ │ -_G_r_o_u_p_._h │ │ │ │ -Concept check class for variable types with Group properties. │ │ │ │ +_8_9 virtual _~_V_a_l_u_e() {} │ │ │ │ +90 │ │ │ │ +91 private: │ │ │ │ +_1_2_2 friend class boost::serialization::access; │ │ │ │ +123 template │ │ │ │ +124 void serialize(ARCHIVE & /*ar*/, const unsigned int /*version*/) { │ │ │ │ +125 } │ │ │ │ +126 │ │ │ │ +127 }; │ │ │ │ +128 │ │ │ │ +129} /* namespace gtsam */ │ │ │ │ +130 │ │ │ │ +131BOOST_SERIALIZATION_ASSUME_ABSTRACT(_g_t_s_a_m_:_:_V_a_l_u_e) │ │ │ │ +_V_e_c_t_o_r_._h │ │ │ │ +typedef and functions to augment Eigen's VectorXd │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_e_x_p_m │ │ │ │ -T expm(const Vector &x, int K=7) │ │ │ │ -Exponential map given exponential coordinates class T needs a wedge<> function │ │ │ │ -and a constructor from... │ │ │ │ -DDeeffiinniittiioonn Lie.h:317 │ │ │ │ -_g_t_s_a_m_:_:_l_o_g_m_a_p___d_e_f_a_u_l_t │ │ │ │ -Vector logmap_default(const Class &l0, const Class &lp) │ │ │ │ -Log map centered at l0, s.t. │ │ │ │ -DDeeffiinniittiioonn Lie.h:246 │ │ │ │ -_g_t_s_a_m_:_:_b_e_t_w_e_e_n___d_e_f_a_u_l_t │ │ │ │ -Class between_default(const Class &l1, const Class &l2) │ │ │ │ -These core global functions can be specialized by new Lie types for better │ │ │ │ -performance. │ │ │ │ -DDeeffiinniittiioonn Lie.h:240 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ -T interpolate(const T &X, const T &Y, double t, typename MakeOptionalJacobian< │ │ │ │ -T, T >::type Hx=boost::none, typename MakeOptionalJacobian< T, T >::type │ │ │ │ -Hy=boost::none) │ │ │ │ -Linear interpolation between X and Y by coefficient t. │ │ │ │ -DDeeffiinniittiioonn Lie.h:327 │ │ │ │ -_g_t_s_a_m_:_:_B_C_H │ │ │ │ -T BCH(const T &X, const T &Y) │ │ │ │ -Three term approximation of the Baker-Campbell-Hausdorff formula In non- │ │ │ │ -commutative Lie groups,... │ │ │ │ -DDeeffiinniittiioonn Lie.h:298 │ │ │ │ -_g_t_s_a_m_:_:_e_x_p_m_a_p___d_e_f_a_u_l_t │ │ │ │ -Class expmap_default(const Class &t, const Vector &d) │ │ │ │ -Exponential map centered at l0, s.t. │ │ │ │ -DDeeffiinniittiioonn Lie.h:252 │ │ │ │ -_g_t_s_a_m_:_:_w_e_d_g_e │ │ │ │ -Matrix wedge(const Vector &x) │ │ │ │ -Declaration of wedge (see Murray94book) used to convert from n exponential │ │ │ │ -coordinates to n*n element... │ │ │ │ -_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ -A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ -that can be centered ... │ │ │ │ -DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_g_r_o_u_p___t_a_g │ │ │ │ -tag to assert a type is a group │ │ │ │ -DDeeffiinniittiioonn Group.h:34 │ │ │ │ -_g_t_s_a_m_:_:_m_u_l_t_i_p_l_i_c_a_t_i_v_e___g_r_o_u_p___t_a_g │ │ │ │ -Group operator syntax flavors. │ │ │ │ -DDeeffiinniittiioonn Group.h:37 │ │ │ │ -_g_t_s_a_m_:_:_I_s_G_r_o_u_p │ │ │ │ -Group Concept. │ │ │ │ -DDeeffiinniittiioonn Group.h:46 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p │ │ │ │ -A CRTP helper class that implements Lie group methods Prerequisites: methods │ │ │ │ -operator*,... │ │ │ │ -DDeeffiinniittiioonn Lie.h:37 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_R_e_t_r_a_c_t │ │ │ │ -static Class Retract(const TangentVector &v, ChartJacobian H) │ │ │ │ -Retract at origin with optional derivative. │ │ │ │ -DDeeffiinniittiioonn Lie.h:121 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ -TangentVector localCoordinates(const Class &g) const │ │ │ │ -localCoordinates as required by manifold concept: finds tangent vector between │ │ │ │ -*this and g │ │ │ │ -DDeeffiinniittiioonn Lie.h:136 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_e_x_p_m_a_p │ │ │ │ -Class expmap(const TangentVector &v, ChartJacobian H1, ChartJacobian H2=boost:: │ │ │ │ -none) const │ │ │ │ -expmap with optional derivatives │ │ │ │ -DDeeffiinniittiioonn Lie.h:89 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ -TangentVector localCoordinates(const Class &g, ChartJacobian H1, ChartJacobian │ │ │ │ -H2=boost::none) const │ │ │ │ -localCoordinates with optional derivatives │ │ │ │ -DDeeffiinniittiioonn Lie.h:152 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_l_o_g_m_a_p │ │ │ │ -TangentVector logmap(const Class &g) const │ │ │ │ -logmap as required by manifold concept Applies logarithmic map to group element │ │ │ │ -that takes *this to g │ │ │ │ -DDeeffiinniittiioonn Lie.h:84 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_l_o_g_m_a_p │ │ │ │ -TangentVector logmap(const Class &g, ChartJacobian H1, ChartJacobian H2=boost:: │ │ │ │ -none) const │ │ │ │ -logmap with optional derivatives │ │ │ │ -DDeeffiinniittiioonn Lie.h:100 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ -static TangentVector LocalCoordinates(const Class &g) │ │ │ │ -LocalCoordinates at origin: possible in Lie group because it has an identity. │ │ │ │ -DDeeffiinniittiioonn Lie.h:116 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_r_e_t_r_a_c_t │ │ │ │ -Class retract(const TangentVector &v, ChartJacobian H1, ChartJacobian │ │ │ │ -H2=boost::none) const │ │ │ │ -retract with optional derivatives │ │ │ │ -DDeeffiinniittiioonn Lie.h:141 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_L_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ -static TangentVector LocalCoordinates(const Class &g, ChartJacobian H) │ │ │ │ -LocalCoordinates at origin with optional derivative. │ │ │ │ -DDeeffiinniittiioonn Lie.h:126 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_r_e_t_r_a_c_t │ │ │ │ -Class retract(const TangentVector &v) const │ │ │ │ -retract as required by manifold concept: applies v at *this │ │ │ │ -DDeeffiinniittiioonn Lie.h:131 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_e_x_p_m_a_p │ │ │ │ -Class expmap(const TangentVector &v) const │ │ │ │ -expmap as required by manifold concept Applies exponential map to v and │ │ │ │ -composes with *this │ │ │ │ -DDeeffiinniittiioonn Lie.h:78 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_R_e_t_r_a_c_t │ │ │ │ -static Class Retract(const TangentVector &v) │ │ │ │ -Retract at origin: possible in Lie group because it has an identity. │ │ │ │ -DDeeffiinniittiioonn Lie.h:111 │ │ │ │ -_g_t_s_a_m_:_:_l_i_e___g_r_o_u_p___t_a_g │ │ │ │ -tag to assert a type is a Lie group │ │ │ │ -DDeeffiinniittiioonn Lie.h:164 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p_T_r_a_i_t_s │ │ │ │ -A helper class that implements the traits interface for GTSAM lie groups. │ │ │ │ -DDeeffiinniittiioonn Lie.h:174 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p │ │ │ │ -Both LieGroupTraits and Testable. │ │ │ │ -DDeeffiinniittiioonn Lie.h:229 │ │ │ │ -_g_t_s_a_m_:_:_I_s_L_i_e_G_r_o_u_p │ │ │ │ -Lie Group Concept. │ │ │ │ -DDeeffiinniittiioonn Lie.h:260 │ │ │ │ -_g_t_s_a_m_:_:_T_r_a_n_s_f_o_r_m_C_o_v_a_r_i_a_n_c_e │ │ │ │ -Functor for transforming covariance of T. │ │ │ │ -DDeeffiinniittiioonn Lie.h:353 │ │ │ │ -_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g │ │ │ │ -tag to assert a type is a manifold │ │ │ │ -DDeeffiinniittiioonn Manifold.h:33 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_G_e_t_D_i_m_e_n_s_i_o_n_I_m_p_l │ │ │ │ -Extra manifold traits for fixed-dimension types. │ │ │ │ -DDeeffiinniittiioonn Manifold.h:75 │ │ │ │ -_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ -OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ -either a fixed size o... │ │ │ │ -DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ -_g_t_s_a_m_:_:_T_e_s_t_a_b_l_e │ │ │ │ -A helper that implements the traits interface for GTSAM types. │ │ │ │ -DDeeffiinniittiioonn Testable.h:151 │ │ │ │ +_g_t_s_a_m_:_:_V_a_l_u_e │ │ │ │ +This is the base class for any type to be stored in Values. │ │ │ │ +DDeeffiinniittiioonn Value.h:37 │ │ │ │ +_g_t_s_a_m_:_:_V_a_l_u_e_:_:_d_i_m │ │ │ │ +virtual size_t dim() const =0 │ │ │ │ +Return the dimensionality of the tangent space of this value. │ │ │ │ +_g_t_s_a_m_:_:_V_a_l_u_e_:_:_r_e_t_r_a_c_t__ │ │ │ │ +virtual Value * retract_(const Vector &delta) const =0 │ │ │ │ +Increment the value, by mapping from the vector delta in the tangent space of │ │ │ │ +the current value back ... │ │ │ │ +_g_t_s_a_m_:_:_V_a_l_u_e_:_:_d_e_a_l_l_o_c_a_t_e__ │ │ │ │ +virtual void deallocate_() const =0 │ │ │ │ +Deallocate a raw pointer of this value. │ │ │ │ +_g_t_s_a_m_:_:_V_a_l_u_e_:_:_~_V_a_l_u_e │ │ │ │ +virtual ~Value() │ │ │ │ +Virutal destructor. │ │ │ │ +DDeeffiinniittiioonn Value.h:89 │ │ │ │ +_g_t_s_a_m_:_:_V_a_l_u_e_:_:_e_q_u_a_l_s__ │ │ │ │ +virtual bool equals_(const Value &other, double tol=1e-9) const =0 │ │ │ │ +Compare this Value with another for equality. │ │ │ │ +_g_t_s_a_m_:_:_V_a_l_u_e_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s__ │ │ │ │ +virtual Vector localCoordinates_(const Value &value) const =0 │ │ │ │ +Compute the coordinates in the tangent space of this value that retract() would │ │ │ │ +map to value. │ │ │ │ +_g_t_s_a_m_:_:_V_a_l_u_e_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +virtual Value & operator=(const Value &) │ │ │ │ +Assignment operator. │ │ │ │ +DDeeffiinniittiioonn Value.h:79 │ │ │ │ +_g_t_s_a_m_:_:_V_a_l_u_e_:_:_p_r_i_n_t │ │ │ │ +virtual void print(const std::string &str="") const =0 │ │ │ │ +Print this value, for debugging and unit tests. │ │ │ │ +_g_t_s_a_m_:_:_V_a_l_u_e_:_:_c_l_o_n_e__ │ │ │ │ +virtual Value * clone_() const =0 │ │ │ │ +Clone this value in a special memory pool, must be deleted with Value:: │ │ │ │ +deallocate_,... │ │ │ │ +_g_t_s_a_m_:_:_V_a_l_u_e_:_:_c_l_o_n_e │ │ │ │ +virtual boost::shared_ptr< Value > clone() const =0 │ │ │ │ +Clone this value (normal clone on the heap, delete with 'delete' operator) │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _L_i_e_._h │ │ │ │ + * _V_a_l_u_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00119.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Group.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Manifold.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -97,116 +97,83 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ Macros | │ │ │ -Functions | │ │ │ -Variables
│ │ │ -
Group.h File Reference
│ │ │ +Functions
│ │ │ +
Manifold.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Concept check class for variable types with Group properties. │ │ │ +

Base class and basic functions for Manifold types. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │

│ │ │ Classes

struct  gtsam::group_tag
 tag to assert a type is a group More...
struct  gtsam::manifold_tag
 tag to assert a type is a manifold More...
 
struct  gtsam::multiplicative_group_tag
 Group operator syntax flavors. More...
struct  gtsam::internal::HasManifoldPrereqs< Class >
 Requirements on type to pass it to Manifold template below. More...
 
struct  gtsam::additive_group_tag
struct  gtsam::internal::GetDimensionImpl< Class, N >
 Extra manifold traits for fixed-dimension types. More...
 
class  gtsam::IsGroup< G >
 Group Concept. More...
struct  gtsam::internal::GetDimensionImpl< Class, Eigen::Dynamic >
 Extra manifold traits for variable-dimension types. More...
 
class  gtsam::DirectProduct
struct  gtsam::internal::ManifoldTraits< Class >
 A helper that implements the traits interface for GTSAM manifolds. More...
 
struct  gtsam::traits< DirectProduct< G, H > >
struct  gtsam::internal::Manifold< Class >
 Both ManifoldTraits and Testable. More...
 
class  gtsam::DirectSum< G, H >
 Template to construct the direct sum of two additive groups Assumes existence of three additive operators for both groups. More...
 
struct  gtsam::traits< DirectSum< G, H > >
struct  gtsam::FixedDimension< T >
 Give fixed size dimension of a type, fails at compile time if dynamic. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Macros

#define GTSAM_CONCEPT_GROUP_INST(T)   template class gtsam::IsGroup<T>;
 Macros for using the IsGroup.
 
│ │ │ -#define GTSAM_CONCEPT_GROUP_TYPE(T)   typedef gtsam::IsGroup<T> _gtsam_IsGroup_##T;
 
│ │ │ +#define GTSAM_CONCEPT_MANIFOLD_INST(T)   template class gtsam::IsManifold<T>;
 ‍**
 
│ │ │ +#define GTSAM_CONCEPT_MANIFOLD_TYPE(T)   using _gtsam_IsManifold_##T = gtsam::IsManifold<T>;
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ Functions

│ │ │ -template<typename G >
 gtsam::BOOST_CONCEPT_REQUIRES (((IsGroup< G >)),(bool)) check_group_invariants(const G &a
 Check invariants.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ -Variables

│ │ │ -const G & gtsam::b
 
│ │ │ -const G double gtsam::tol
 
│ │ │ +template<typename T >
 gtsam::BOOST_CONCEPT_REQUIRES (((IsTestable< T >)),(bool)) check_manifold_invariants(const T &a
 Check invariants for Manifold type.
 
│ │ │

Detailed Description

│ │ │ -

Concept check class for variable types with Group properties.

│ │ │ -
Date
November, 2011
│ │ │ +

Base class and basic functions for Manifold types.

│ │ │
Author
Alex Cunningham
│ │ │
│ │ │ -Frank Dellaert
│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ GTSAM_CONCEPT_GROUP_INST

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define GTSAM_CONCEPT_GROUP_INST( T)   template class gtsam::IsGroup<T>;
│ │ │ -
│ │ │ - │ │ │ -

Macros for using the IsGroup.

│ │ │ -
    │ │ │ -
  • An instantiation for use inside unit tests
  • │ │ │ -
  • A typedef for use inside generic algorithms
  • │ │ │ -
│ │ │ -

NOTE: intentionally not in the gtsam namespace to allow for classes not in the gtsam namespace to be more easily enforced as testable

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +Frank Dellaert │ │ │ +
│ │ │ +Mike Bosse
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,72 +1,60 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ -Group.h File Reference │ │ │ │ -Concept check class for variable types with Group properties. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Manifold.h File Reference │ │ │ │ +Base class and basic functions for Manifold types. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _g_t_s_a_m_:_:_g_r_o_u_p___t_a_g │ │ │ │ -  tag to assert a type is a group _M_o_r_e_._._. │ │ │ │ +struct   _g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g │ │ │ │ +  tag to assert a type is a manifold _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_m_u_l_t_i_p_l_i_c_a_t_i_v_e___g_r_o_u_p___t_a_g │ │ │ │ -  Group operator syntax flavors. _M_o_r_e_._._. │ │ │ │ +struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_H_a_s_M_a_n_i_f_o_l_d_P_r_e_r_e_q_s_<_ _C_l_a_s_s_ _> │ │ │ │ +  Requirements on type to pass it to _M_a_n_i_f_o_l_d template below. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_a_d_d_i_t_i_v_e___g_r_o_u_p___t_a_g │ │ │ │ +struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_G_e_t_D_i_m_e_n_s_i_o_n_I_m_p_l_<_ _C_l_a_s_s_,_ _N_ _> │ │ │ │ +  Extra manifold traits for fixed-dimension types. _M_o_r_e_._._. │ │ │ │   │ │ │ │ - class   _g_t_s_a_m_:_:_I_s_G_r_o_u_p_<_ _G_ _> │ │ │ │ -  Group Concept. _M_o_r_e_._._. │ │ │ │ +struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_G_e_t_D_i_m_e_n_s_i_o_n_I_m_p_l_<_ _C_l_a_s_s_,_ _E_i_g_e_n_:_:_D_y_n_a_m_i_c_ _> │ │ │ │ +  Extra manifold traits for variable-dimension types. _M_o_r_e_._._. │ │ │ │   │ │ │ │ - class   _g_t_s_a_m_:_:_D_i_r_e_c_t_P_r_o_d_u_c_t │ │ │ │ +struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d_T_r_a_i_t_s_<_ _C_l_a_s_s_ _> │ │ │ │ +  A helper that implements the traits interface for GTSAM manifolds. │ │ │ │ + _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_i_r_e_c_t_P_r_o_d_u_c_t_<_ _G_,_ _H_ _>_ _> │ │ │ │ +struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d_<_ _C_l_a_s_s_ _> │ │ │ │ +  Both _M_a_n_i_f_o_l_d_T_r_a_i_t_s and _T_e_s_t_a_b_l_e. _M_o_r_e_._._. │ │ │ │   │ │ │ │ - class   _g_t_s_a_m_:_:_D_i_r_e_c_t_S_u_m_<_ _G_,_ _H_ _> │ │ │ │ -  Template to construct the direct sum of two additive groups Assumes │ │ │ │ - existence of three additive operators for both groups. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_i_r_e_c_t_S_u_m_<_ _G_,_ _H_ _>_ _> │ │ │ │ +struct   _g_t_s_a_m_:_:_F_i_x_e_d_D_i_m_e_n_s_i_o_n_<_ _T_ _> │ │ │ │ +  Give fixed size dimension of a type, fails at compile time if dynamic. │ │ │ │ + _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ MMaaccrrooss │ │ │ │ -#define  _G_T_S_A_M___C_O_N_C_E_P_T___G_R_O_U_P___I_N_S_T(T)   template class _g_t_s_a_m_:_:_I_s_G_r_o_u_p; │ │ │ │ -  Macros for using the IsGroup. │ │ │ │ +#define  GGTTSSAAMM__CCOONNCCEEPPTT__MMAANNIIFFOOLLDD__IINNSSTT(T)   template class gtsam::IsManifold; │ │ │ │ +  ‍** │ │ │ │   │ │ │ │ -#define  GGTTSSAAMM__CCOONNCCEEPPTT__GGRROOUUPP__TTYYPPEE(T)   typedef _g_t_s_a_m_:_:_I_s_G_r_o_u_p │ │ │ │ - _gtsam_IsGroup_##T; │ │ │ │ +#define  GGTTSSAAMM__CCOONNCCEEPPTT__MMAANNIIFFOOLLDD__TTYYPPEE(T)   using _gtsam_IsManifold_##T = gtsam:: │ │ │ │ + IsManifold; │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -  ggttssaamm::::BBOOOOSSTT__CCOONNCCEEPPTT__RREEQQUUIIRREESS (((_I_s_G_r_o_u_p< G >)),(bool)) │ │ │ │ - check_group_invariants(const G &a │ │ │ │ -  Check invariants. │ │ │ │ -  │ │ │ │ -VVaarriiaabblleess │ │ │ │ - const G &  ggttssaamm::::bb │ │ │ │ -  │ │ │ │ -const G double  ggttssaamm::::ttooll │ │ │ │ +template │ │ │ │ +  ggttssaamm::::BBOOOOSSTT__CCOONNCCEEPPTT__RREEQQUUIIRREESS (((_I_s_T_e_s_t_a_b_l_e< T >)),(bool)) │ │ │ │ + check_manifold_invariants(const T &a │ │ │ │ +  Check invariants for Manifold type. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Concept check class for variable types with Group properties. │ │ │ │ - Date │ │ │ │ - November, 2011 │ │ │ │ +Base class and basic functions for Manifold types. │ │ │ │ Author │ │ │ │ Alex Cunningham │ │ │ │ Frank Dellaert │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? GGTTSSAAMM__CCOONNCCEEPPTT__GGRROOUUPP__IINNSSTT ********** │ │ │ │ -#define GTSAM_CONCEPT_GROUP_INST (   T )    template class _g_t_s_a_m_:_:_I_s_G_r_o_u_p; │ │ │ │ -Macros for using the IsGroup. │ │ │ │ - * An instantiation for use inside unit tests │ │ │ │ - * A typedef for use inside generic algorithms │ │ │ │ -NOTE: intentionally not in the gtsam namespace to allow for classes not in the │ │ │ │ -gtsam namespace to be more easily enforced as testable │ │ │ │ + Mike Bosse │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _G_r_o_u_p_._h │ │ │ │ + * _M_a_n_i_f_o_l_d_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00119.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,12 +1,11 @@ │ │ │ │ var a00119 = [ │ │ │ │ - ["gtsam::group_tag", "a02332.html", null], │ │ │ │ - ["gtsam::multiplicative_group_tag", "a02336.html", null], │ │ │ │ - ["gtsam::additive_group_tag", "a02340.html", null], │ │ │ │ - ["gtsam::IsGroup< G >", "a02344.html", null], │ │ │ │ - ["gtsam::DirectProduct", "a02348.html", "a02348"], │ │ │ │ - ["gtsam::traits< DirectProduct< G, H > >", "a02352.html", null], │ │ │ │ - ["gtsam::DirectSum< G, H >", "a02356.html", "a02356"], │ │ │ │ - ["gtsam::traits< DirectSum< G, H > >", "a02360.html", null], │ │ │ │ - ["GTSAM_CONCEPT_GROUP_INST", "a00119.html#aac1ea136475ea605715c809f4b3f0156", null], │ │ │ │ - ["BOOST_CONCEPT_REQUIRES", "a00119.html#a2e95b5b5508cf3284107e979401bd1a4", null] │ │ │ │ + ["gtsam::manifold_tag", "a02388.html", null], │ │ │ │ + ["gtsam::internal::HasManifoldPrereqs< Class >", "a02392.html", null], │ │ │ │ + ["gtsam::internal::GetDimensionImpl< Class, N >", "a02396.html", null], │ │ │ │ + ["gtsam::internal::GetDimensionImpl< Class, Eigen::Dynamic >", "a02400.html", null], │ │ │ │ + ["gtsam::internal::ManifoldTraits< Class >", "a02404.html", null], │ │ │ │ + ["gtsam::internal::Manifold< Class >", "a02408.html", null], │ │ │ │ + ["gtsam::FixedDimension< T >", "a02412.html", null], │ │ │ │ + ["GTSAM_CONCEPT_MANIFOLD_INST", "a00119.html#a64b5e2e3c812d2cdea5ee294100f825f", null], │ │ │ │ + ["BOOST_CONCEPT_REQUIRES", "a00119.html#ae03a6aedf0a82f67c2f3e987fb3aacba", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00119_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Group.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Manifold.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,220 +98,189 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Group.h
│ │ │ +
Manifold.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
21#pragma once
│ │ │ -
22
│ │ │ -
23#include <gtsam/base/Testable.h>
│ │ │ -
24
│ │ │ -
25#include <boost/concept_check.hpp>
│ │ │ -
26#include <boost/concept/requires.hpp>
│ │ │ -
27#include <boost/type_traits/is_base_of.hpp>
│ │ │ -
28#include <boost/static_assert.hpp>
│ │ │ -
29#include <utility>
│ │ │ -
30
│ │ │ -
31namespace gtsam {
│ │ │ -
32
│ │ │ -
34struct group_tag {};
│ │ │ -
35
│ │ │ - │ │ │ - │ │ │ -
39
│ │ │ -
40template <typename T> struct traits;
│ │ │ -
41
│ │ │ -
45template<typename G>
│ │ │ -
│ │ │ -
46class IsGroup {
│ │ │ -
47public:
│ │ │ -
48 typedef typename traits<G>::structure_category structure_category_tag;
│ │ │ -
49 typedef typename traits<G>::group_flavor flavor_tag;
│ │ │ -
50 //typedef typename traits<G>::identity::value_type identity_value_type;
│ │ │ -
51
│ │ │ -
52 BOOST_CONCEPT_USAGE(IsGroup) {
│ │ │ -
53 BOOST_STATIC_ASSERT_MSG(
│ │ │ -
54 (boost::is_base_of<group_tag, structure_category_tag>::value),
│ │ │ -
55 "This type's structure_category trait does not assert it as a group (or derived)");
│ │ │ - │ │ │ -
57 e = traits<G>::Compose(g, h);
│ │ │ -
58 e = traits<G>::Between(g, h);
│ │ │ -
59 e = traits<G>::Inverse(g);
│ │ │ -
60 operator_usage(flavor);
│ │ │ -
61 // todo: how do we test the act concept? or do we even need to?
│ │ │ -
62 }
│ │ │ -
63
│ │ │ -
64private:
│ │ │ -
65 void operator_usage(multiplicative_group_tag) {
│ │ │ -
66 e = g * h;
│ │ │ -
67 //e = -g; // todo this should work, but it is failing for Quaternions
│ │ │ -
68 }
│ │ │ -
69 void operator_usage(additive_group_tag) {
│ │ │ -
70 e = g + h;
│ │ │ -
71 e = h - g;
│ │ │ -
72 e = -g;
│ │ │ -
73 }
│ │ │ -
74
│ │ │ -
75 flavor_tag flavor;
│ │ │ -
76 G e, g, h;
│ │ │ -
77 bool b;
│ │ │ -
78};
│ │ │ -
│ │ │ -
79
│ │ │ -
81template<typename G>
│ │ │ - │ │ │ -
83check_group_invariants(const G& a, const G& b, double tol = 1e-9) {
│ │ │ -
84 G e = traits<G>::Identity();
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
88}
│ │ │ -
89
│ │ │ -
90namespace internal {
│ │ │ -
91
│ │ │ +
20#pragma once
│ │ │ +
21
│ │ │ +
22#include <gtsam/base/Matrix.h>
│ │ │ +
23#include <gtsam/base/Testable.h>
│ │ │ + │ │ │ +
25
│ │ │ +
26#include <boost/concept_check.hpp>
│ │ │ +
27#include <boost/concept/requires.hpp>
│ │ │ +
28#include <boost/type_traits/is_base_of.hpp>
│ │ │ +
29
│ │ │ +
30namespace gtsam {
│ │ │ +
31
│ │ │ +
33struct manifold_tag {};
│ │ │ +
34
│ │ │ +
53template <typename T> struct traits;
│ │ │ +
54
│ │ │ +
55namespace internal {
│ │ │ +
56
│ │ │ +
58template<class Class>
│ │ │ +
│ │ │ + │ │ │ +
60
│ │ │ +
61 enum { dim = Class::dimension };
│ │ │ +
62
│ │ │ +
63 Class p, q;
│ │ │ +
64 Eigen::Matrix<double, dim, 1> v;
│ │ │ + │ │ │ +
66
│ │ │ +
67 BOOST_CONCEPT_USAGE(HasManifoldPrereqs) {
│ │ │ +
68 v = p.localCoordinates(q);
│ │ │ +
69 q = p.retract(v);
│ │ │ +
70 }
│ │ │ +
71};
│ │ │ +
│ │ │ +
72
│ │ │ +
74template<class Class, int N>
│ │ │ +
│ │ │ + │ │ │ +
76 // Compile-time dimensionality
│ │ │ +
77 static int GetDimension(const Class&) {
│ │ │ +
78 return N;
│ │ │ +
79 }
│ │ │ +
80};
│ │ │ +
│ │ │ +
81
│ │ │ +
83template<class Class>
│ │ │ +
│ │ │ +
84struct GetDimensionImpl<Class, Eigen::Dynamic> {
│ │ │ +
85 // Run-time dimensionality
│ │ │ +
86 static int GetDimension(const Class& m) {
│ │ │ +
87 return m.dim();
│ │ │ +
88 }
│ │ │ +
89};
│ │ │ +
│ │ │ +
90
│ │ │
94template<class Class>
│ │ │ -
95struct MultiplicativeGroupTraits {
│ │ │ -
96 typedef group_tag structure_category;
│ │ │ -
97 typedef multiplicative_group_tag group_flavor;
│ │ │ -
98 static Class Identity() { return Class::Identity(); }
│ │ │ -
99 static Class Compose(const Class &g, const Class & h) { return g * h;}
│ │ │ -
100 static Class Between(const Class &g, const Class & h) { return g.inverse() * h;}
│ │ │ -
101 static Class Inverse(const Class &g) { return g.inverse();}
│ │ │ -
102};
│ │ │ -
103
│ │ │ -
105template<class Class>
│ │ │ -
106struct MultiplicativeGroup : MultiplicativeGroupTraits<Class>, Testable<Class> {};
│ │ │ +
│ │ │ +
95struct ManifoldTraits: GetDimensionImpl<Class, Class::dimension> {
│ │ │ +
96
│ │ │ +
97 // Check that Class has the necessary machinery
│ │ │ +
98 BOOST_CONCEPT_ASSERT((HasManifoldPrereqs<Class>));
│ │ │ +
99
│ │ │ +
100 // Dimension of the manifold
│ │ │ +
101 enum { dimension = Class::dimension };
│ │ │ +
102
│ │ │ +
103 // Typedefs required by all manifold types.
│ │ │ +
104 typedef Class ManifoldType;
│ │ │ + │ │ │ +
106 typedef Eigen::Matrix<double, dimension, 1> TangentVector;
│ │ │
107
│ │ │ -
110template<class Class>
│ │ │ -
111struct AdditiveGroupTraits {
│ │ │ -
112 typedef group_tag structure_category;
│ │ │ -
113 typedef additive_group_tag group_flavor;
│ │ │ -
114 static Class Identity() { return Class::Identity(); }
│ │ │ -
115 static Class Compose(const Class &g, const Class & h) { return g + h;}
│ │ │ -
116 static Class Between(const Class &g, const Class & h) { return h - g;}
│ │ │ -
117 static Class Inverse(const Class &g) { return -g;}
│ │ │ -
118};
│ │ │ -
119
│ │ │ -
121template<class Class>
│ │ │ -
122struct AdditiveGroup : AdditiveGroupTraits<Class>, Testable<Class> {};
│ │ │ +
108 // Local coordinates
│ │ │ +
109 static TangentVector Local(const Class& origin, const Class& other) {
│ │ │ +
110 return origin.localCoordinates(other);
│ │ │ +
111 }
│ │ │ +
112
│ │ │ +
113 // Retraction back to manifold
│ │ │ +
114 static Class Retract(const Class& origin, const TangentVector& v) {
│ │ │ +
115 return origin.retract(v);
│ │ │ +
116 }
│ │ │ +
117};
│ │ │ +
│ │ │ +
118
│ │ │ +
120template<class Class> struct Manifold: ManifoldTraits<Class>, Testable<Class> {};
│ │ │ +
121
│ │ │ +
122} // \ namespace internal
│ │ │
123
│ │ │ -
124} // namespace internal
│ │ │ -
125
│ │ │ -
127template<typename G>
│ │ │ -
128BOOST_CONCEPT_REQUIRES(((IsGroup<G>)),(G)) //
│ │ │ -
129compose_pow(const G& g, size_t n) {
│ │ │ -
130 if (n == 0) return traits<G>::Identity();
│ │ │ -
131 else if (n == 1) return g;
│ │ │ -
132 else return traits<G>::Compose(compose_pow(g, n - 1), g);
│ │ │ -
133}
│ │ │ -
134
│ │ │ -
137template<typename G, typename H>
│ │ │ -
│ │ │ -
138class DirectProduct: public std::pair<G, H> {
│ │ │ -
139 BOOST_CONCEPT_ASSERT((IsGroup<G>));
│ │ │ -
140 BOOST_CONCEPT_ASSERT((IsGroup<H>));
│ │ │ -
141
│ │ │ -
142public:
│ │ │ -
144 DirectProduct():std::pair<G,H>(traits<G>::Identity(),traits<H>::Identity()) {}
│ │ │ -
145
│ │ │ -
146 // Construct from two subgroup elements
│ │ │ -
147 DirectProduct(const G& g, const H& h):std::pair<G,H>(g,h) {}
│ │ │ -
148
│ │ │ -
149 // identity
│ │ │ -
150 static DirectProduct Identity() { return DirectProduct(); }
│ │ │ -
151
│ │ │ -
152 DirectProduct operator*(const DirectProduct& other) const {
│ │ │ -
153 return DirectProduct(traits<G>::Compose(this->first, other.first),
│ │ │ -
154 traits<H>::Compose(this->second, other.second));
│ │ │ -
155 }
│ │ │ -
156 DirectProduct inverse() const {
│ │ │ -
157 return DirectProduct(this->first.inverse(), this->second.inverse());
│ │ │ -
158 }
│ │ │ -
159};
│ │ │ -
│ │ │ -
160
│ │ │ -
161// Define any direct product group to be a model of the multiplicative Group concept
│ │ │ -
162template<typename G, typename H>
│ │ │ -
│ │ │ -
163struct traits<DirectProduct<G, H> > :
│ │ │ -
164 internal::MultiplicativeGroupTraits<DirectProduct<G, H> > {};
│ │ │ -
│ │ │ -
165
│ │ │ -
168template<typename G, typename H>
│ │ │ -
│ │ │ -
169class DirectSum: public std::pair<G, H> {
│ │ │ -
170 BOOST_CONCEPT_ASSERT((IsGroup<G>)); // TODO(frank): check additive
│ │ │ -
171 BOOST_CONCEPT_ASSERT((IsGroup<H>)); // TODO(frank): check additive
│ │ │ -
172
│ │ │ -
173 const G& g() const { return this->first; }
│ │ │ -
174 const H& h() const { return this->second;}
│ │ │ -
175
│ │ │ -
176public:
│ │ │ -
178 DirectSum():std::pair<G,H>(traits<G>::Identity(),traits<H>::Identity()) {}
│ │ │ -
179
│ │ │ -
180 // Construct from two subgroup elements
│ │ │ -
181 DirectSum(const G& g, const H& h):std::pair<G,H>(g,h) {}
│ │ │ -
182
│ │ │ -
183 // identity
│ │ │ -
184 static DirectSum Identity() { return DirectSum(); }
│ │ │ -
185
│ │ │ -
186 DirectSum operator+(const DirectSum& other) const {
│ │ │ -
187 return DirectSum(g()+other.g(), h()+other.h());
│ │ │ -
188 }
│ │ │ -
189 DirectSum operator-(const DirectSum& other) const {
│ │ │ -
190 return DirectSum(g()-other.g(), h()-other.h());
│ │ │ -
191 }
│ │ │ -
192 DirectSum operator-() const {
│ │ │ -
193 return DirectSum(- g(), - h());
│ │ │ -
194 }
│ │ │ -
195};
│ │ │ -
│ │ │ -
196
│ │ │ -
197// Define direct sums to be a model of the Additive Group concept
│ │ │ -
198template<typename G, typename H>
│ │ │ -
│ │ │ -
199struct traits<DirectSum<G, H> > :
│ │ │ -
200 internal::AdditiveGroupTraits<DirectSum<G, H> > {};
│ │ │ -
│ │ │ -
201
│ │ │ -
202} // namespace gtsam
│ │ │ -
203
│ │ │ -
212#define GTSAM_CONCEPT_GROUP_INST(T) template class gtsam::IsGroup<T>;
│ │ │ -
213#define GTSAM_CONCEPT_GROUP_TYPE(T) typedef gtsam::IsGroup<T> _gtsam_IsGroup_##T;
│ │ │ -
Concept check for values that can be used in unit tests.
│ │ │ +
125template<typename T>
│ │ │ + │ │ │ +
127check_manifold_invariants(const T& a, const T& b, double tol=1e-9) {
│ │ │ + │ │ │ + │ │ │ +
130 T c = traits<T>::Retract(a,v);
│ │ │ +
131 return v0.norm() < tol && traits<T>::Equals(b,c,tol);
│ │ │ +
132}
│ │ │ +
133
│ │ │ +
135template<typename T>
│ │ │ +
136class IsManifold {
│ │ │ +
137
│ │ │ +
138public:
│ │ │ +
139
│ │ │ +
140 typedef typename traits<T>::structure_category structure_category_tag;
│ │ │ +
141 static const int dim = traits<T>::dimension;
│ │ │ +
142 typedef typename traits<T>::ManifoldType ManifoldType;
│ │ │ +
143 typedef typename traits<T>::TangentVector TangentVector;
│ │ │ +
144
│ │ │ +
145 BOOST_CONCEPT_USAGE(IsManifold) {
│ │ │ +
146 BOOST_STATIC_ASSERT_MSG(
│ │ │ +
147 (boost::is_base_of<manifold_tag, structure_category_tag>::value),
│ │ │ +
148 "This type's structure_category trait does not assert it as a manifold (or derived)");
│ │ │ +
149 BOOST_STATIC_ASSERT(TangentVector::SizeAtCompileTime == dim);
│ │ │ +
150
│ │ │ +
151 // make sure Chart methods are defined
│ │ │ +
152 v = traits<T>::Local(p, q);
│ │ │ +
153 q = traits<T>::Retract(p, v);
│ │ │ +
154 }
│ │ │ +
155
│ │ │ +
156private:
│ │ │ +
157
│ │ │ +
158 TangentVector v;
│ │ │ +
159 ManifoldType p, q;
│ │ │ +
160};
│ │ │ +
161
│ │ │ +
163template<typename T>
│ │ │ +
│ │ │ + │ │ │ +
165 typedef const int value_type;
│ │ │ +
166 static const int value = traits<T>::dimension;
│ │ │ +
167 BOOST_STATIC_ASSERT_MSG(value != Eigen::Dynamic,
│ │ │ +
168 "FixedDimension instantiated for dymanically-sized type.");
│ │ │ +
169};
│ │ │ +
│ │ │ +
170} // \ namespace gtsam
│ │ │ +
171
│ │ │ +
173// * Macros for using the ManifoldConcept
│ │ │ +
174// * - An instantiation for use inside unit tests
│ │ │ +
175// * - A typedef for use inside generic algorithms
│ │ │ +
176// *
│ │ │ +
177// * NOTE: intentionally not in the gtsam namespace to allow for classes not in
│ │ │ +
178// * the gtsam namespace to be more easily enforced as testable
│ │ │ +
179// */
│ │ │ +
180#define GTSAM_CONCEPT_MANIFOLD_INST(T) template class gtsam::IsManifold<T>;
│ │ │ +
181#define GTSAM_CONCEPT_MANIFOLD_TYPE(T) using _gtsam_IsManifold_##T = gtsam::IsManifold<T>;
│ │ │ +
Special class for optional Jacobian arguments.
│ │ │ +
typedef and functions to augment Eigen's MatrixXd
│ │ │ +
Concept check for values that can be used in unit tests.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │
BOOST_CONCEPT_REQUIRES(((IsGroup< G >)),(bool)) check_group_invariants(const G &a
Check invariants.
│ │ │
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ -
tag to assert a type is a group
Definition Group.h:34
│ │ │ -
Group operator syntax flavors.
Definition Group.h:37
│ │ │ -
Definition Group.h:38
│ │ │ -
Group Concept.
Definition Group.h:46
│ │ │ -
Definition Group.h:138
│ │ │ -
DirectProduct()
Default constructor yields identity.
Definition Group.h:144
│ │ │ -
Template to construct the direct sum of two additive groups Assumes existence of three additive opera...
Definition Group.h:169
│ │ │ -
DirectSum()
Default constructor yields identity.
Definition Group.h:178
│ │ │ +
tag to assert a type is a manifold
Definition Manifold.h:33
│ │ │ +
Requirements on type to pass it to Manifold template below.
Definition Manifold.h:59
│ │ │ +
Extra manifold traits for fixed-dimension types.
Definition Manifold.h:75
│ │ │ +
A helper that implements the traits interface for GTSAM manifolds.
Definition Manifold.h:95
│ │ │ +
Both ManifoldTraits and Testable.
Definition Manifold.h:120
│ │ │ +
Give fixed size dimension of a type, fails at compile time if dynamic.
Definition Manifold.h:164
│ │ │ +
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:41
│ │ │ +
A testable concept check that should be placed in applicable unit tests and in generic algorithms.
Definition Testable.h:58
│ │ │ +
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:151
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,237 +1,206 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Group.h │ │ │ │ +Manifold.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -21#pragma once │ │ │ │ -22 │ │ │ │ +20#pragma once │ │ │ │ +21 │ │ │ │ +22#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_._h> │ │ │ │ 23#include <_g_t_s_a_m_/_b_a_s_e_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ -24 │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27#include │ │ │ │ -28#include │ │ │ │ -29#include │ │ │ │ -30 │ │ │ │ -31namespace _g_t_s_a_m { │ │ │ │ -32 │ │ │ │ -_3_4struct _g_r_o_u_p___t_a_g {}; │ │ │ │ -35 │ │ │ │ -_3_7struct _m_u_l_t_i_p_l_i_c_a_t_i_v_e___g_r_o_u_p___t_a_g {}; │ │ │ │ -_3_8struct _a_d_d_i_t_i_v_e___g_r_o_u_p___t_a_g {}; │ │ │ │ -39 │ │ │ │ -40template struct _t_r_a_i_t_s; │ │ │ │ -41 │ │ │ │ -45template │ │ │ │ -_4_6class _I_s_G_r_o_u_p { │ │ │ │ -47public: │ │ │ │ -48 typedef typename _t_r_a_i_t_s_<_G_>_:_:_s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y structure_category_tag; │ │ │ │ -49 typedef typename _t_r_a_i_t_s_<_G_>_:_:_g_r_o_u_p___f_l_a_v_o_r flavor_tag; │ │ │ │ -50 //typedef typename traits::identity::value_type identity_value_type; │ │ │ │ -51 │ │ │ │ -52 BOOST_CONCEPT_USAGE(_I_s_G_r_o_u_p) { │ │ │ │ -53 BOOST_STATIC_ASSERT_MSG( │ │ │ │ -54 (boost::is_base_of::value), │ │ │ │ -55 "This type's structure_category trait does not assert it as a group (or │ │ │ │ -derived)"); │ │ │ │ -56 e = _t_r_a_i_t_s_<_G_>_:_:_I_d_e_n_t_i_t_y(); │ │ │ │ -57 e = _t_r_a_i_t_s_<_G_>_:_:_C_o_m_p_o_s_e(g, h); │ │ │ │ -58 e = _t_r_a_i_t_s_<_G_>_:_:_B_e_t_w_e_e_n(g, h); │ │ │ │ -59 e = _t_r_a_i_t_s_<_G_>_:_:_I_n_v_e_r_s_e(g); │ │ │ │ -60 operator_usage(flavor); │ │ │ │ -61 // todo: how do we test the act concept? or do we even need to? │ │ │ │ -62 } │ │ │ │ -63 │ │ │ │ -64private: │ │ │ │ -65 void operator_usage(_m_u_l_t_i_p_l_i_c_a_t_i_v_e___g_r_o_u_p___t_a_g) { │ │ │ │ -66 e = g * h; │ │ │ │ -67 //e = -g; // todo this should work, but it is failing for Quaternions │ │ │ │ -68 } │ │ │ │ -69 void operator_usage(_a_d_d_i_t_i_v_e___g_r_o_u_p___t_a_g) { │ │ │ │ -70 e = g + h; │ │ │ │ -71 e = h - g; │ │ │ │ -72 e = -g; │ │ │ │ -73 } │ │ │ │ -74 │ │ │ │ -75 flavor_tag flavor; │ │ │ │ -76 G e, g, h; │ │ │ │ -77 bool b; │ │ │ │ -78}; │ │ │ │ -79 │ │ │ │ -81template │ │ │ │ -_8_2_B_O_O_S_T___C_O_N_C_E_P_T___R_E_Q_U_I_R_E_S(((_I_s_G_r_o_u_p_<_G_>)),(bool)) // │ │ │ │ -83check_group_invariants(const G& a, const G& b, double tol = 1e-9) { │ │ │ │ -84 G e = _t_r_a_i_t_s_<_G_>_:_:_I_d_e_n_t_i_t_y(); │ │ │ │ -85 return _t_r_a_i_t_s_<_G_>_:_:_E_q_u_a_l_s(_t_r_a_i_t_s_<_G_>_:_:_C_o_m_p_o_s_e(a, _t_r_a_i_t_s_<_G_>_:_:_I_n_v_e_r_s_e(a)), e, │ │ │ │ -tol) │ │ │ │ -86 && _t_r_a_i_t_s_<_G_>_:_:_E_q_u_a_l_s(_t_r_a_i_t_s_<_G_>_:_:_B_e_t_w_e_e_n(a, b), _t_r_a_i_t_s_<_G_>_:_:_C_o_m_p_o_s_e │ │ │ │ -(_t_r_a_i_t_s_<_G_>_:_:_I_n_v_e_r_s_e(a), b), tol) │ │ │ │ -87 && _t_r_a_i_t_s_<_G_>_:_:_E_q_u_a_l_s(_t_r_a_i_t_s_<_G_>_:_:_C_o_m_p_o_s_e(a, _t_r_a_i_t_s_<_G_>_:_:_B_e_t_w_e_e_n(a, b)), b, │ │ │ │ -tol); │ │ │ │ -88} │ │ │ │ -89 │ │ │ │ -90namespace internal { │ │ │ │ -91 │ │ │ │ +24#include <_g_t_s_a_m_/_b_a_s_e_/_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h> │ │ │ │ +25 │ │ │ │ +26#include │ │ │ │ +27#include │ │ │ │ +28#include │ │ │ │ +29 │ │ │ │ +30namespace _g_t_s_a_m { │ │ │ │ +31 │ │ │ │ +_3_3struct _m_a_n_i_f_o_l_d___t_a_g {}; │ │ │ │ +34 │ │ │ │ +53template struct _t_r_a_i_t_s; │ │ │ │ +54 │ │ │ │ +55namespace internal { │ │ │ │ +56 │ │ │ │ +58template │ │ │ │ +_5_9struct _H_a_s_M_a_n_i_f_o_l_d_P_r_e_r_e_q_s { │ │ │ │ +60 │ │ │ │ +61 enum { dim = Class::dimension }; │ │ │ │ +62 │ │ │ │ +63 Class p, q; │ │ │ │ +64 Eigen::Matrix v; │ │ │ │ +65 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_d_i_m_,_ _d_i_m_> Hp, Hq, Hv; │ │ │ │ +66 │ │ │ │ +67 BOOST_CONCEPT_USAGE(_H_a_s_M_a_n_i_f_o_l_d_P_r_e_r_e_q_s) { │ │ │ │ +68 v = p.localCoordinates(q); │ │ │ │ +69 q = p.retract(v); │ │ │ │ +70 } │ │ │ │ +71}; │ │ │ │ +72 │ │ │ │ +74template │ │ │ │ +_7_5struct _G_e_t_D_i_m_e_n_s_i_o_n_I_m_p_l { │ │ │ │ +76 // Compile-time dimensionality │ │ │ │ +77 static int GetDimension(const Class&) { │ │ │ │ +78 return N; │ │ │ │ +79 } │ │ │ │ +80}; │ │ │ │ +81 │ │ │ │ +83template │ │ │ │ +_8_4struct _G_e_t_D_i_m_e_n_s_i_o_n_I_m_p_l { │ │ │ │ +85 // Run-time dimensionality │ │ │ │ +86 static int GetDimension(const Class& m) { │ │ │ │ +87 return m.dim(); │ │ │ │ +88 } │ │ │ │ +89}; │ │ │ │ +90 │ │ │ │ 94template │ │ │ │ -95struct MultiplicativeGroupTraits { │ │ │ │ -96 typedef group_tag structure_category; │ │ │ │ -97 typedef multiplicative_group_tag group_flavor; │ │ │ │ -98 static Class Identity() { return Class::Identity(); } │ │ │ │ -99 static Class Compose(const Class &g, const Class & h) { return g * h;} │ │ │ │ -100 static Class Between(const Class &g, const Class & h) { return g.inverse() │ │ │ │ -* h;} │ │ │ │ -101 static Class Inverse(const Class &g) { return g.inverse();} │ │ │ │ -102}; │ │ │ │ -103 │ │ │ │ -105template │ │ │ │ -106struct MultiplicativeGroup : MultiplicativeGroupTraits, │ │ │ │ -Testable {}; │ │ │ │ +_9_5struct _M_a_n_i_f_o_l_d_T_r_a_i_t_s: _G_e_t_D_i_m_e_n_s_i_o_n_I_m_p_l { │ │ │ │ +96 │ │ │ │ +97 // Check that Class has the necessary machinery │ │ │ │ +98 BOOST_CONCEPT_ASSERT((_H_a_s_M_a_n_i_f_o_l_d_P_r_e_r_e_q_s_<_C_l_a_s_s_>)); │ │ │ │ +99 │ │ │ │ +100 // Dimension of the manifold │ │ │ │ +101 enum { dimension = Class::dimension }; │ │ │ │ +102 │ │ │ │ +103 // Typedefs required by all manifold types. │ │ │ │ +104 typedef Class ManifoldType; │ │ │ │ +105 typedef _m_a_n_i_f_o_l_d___t_a_g _s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y; │ │ │ │ +106 typedef Eigen::Matrix TangentVector; │ │ │ │ 107 │ │ │ │ -110template │ │ │ │ -111struct AdditiveGroupTraits { │ │ │ │ -112 typedef group_tag structure_category; │ │ │ │ -113 typedef additive_group_tag group_flavor; │ │ │ │ -114 static Class Identity() { return Class::Identity(); } │ │ │ │ -115 static Class Compose(const Class &g, const Class & h) { return g + h;} │ │ │ │ -116 static Class Between(const Class &g, const Class & h) { return h - g;} │ │ │ │ -117 static Class Inverse(const Class &g) { return -g;} │ │ │ │ -118}; │ │ │ │ -119 │ │ │ │ -121template │ │ │ │ -122struct AdditiveGroup : AdditiveGroupTraits, Testable {}; │ │ │ │ +108 // Local coordinates │ │ │ │ +109 static TangentVector Local(const Class& origin, const Class& other) { │ │ │ │ +110 return origin.localCoordinates(other); │ │ │ │ +111 } │ │ │ │ +112 │ │ │ │ +113 // Retraction back to manifold │ │ │ │ +114 static Class Retract(const Class& origin, const TangentVector& v) { │ │ │ │ +115 return origin.retract(v); │ │ │ │ +116 } │ │ │ │ +117}; │ │ │ │ +118 │ │ │ │ +_1_2_0template struct _M_a_n_i_f_o_l_d: _M_a_n_i_f_o_l_d_T_r_a_i_t_s, │ │ │ │ +_T_e_s_t_a_b_l_e {}; │ │ │ │ +121 │ │ │ │ +122} // \ namespace internal │ │ │ │ 123 │ │ │ │ -124} // namespace internal │ │ │ │ -125 │ │ │ │ -127template │ │ │ │ -128_B_O_O_S_T___C_O_N_C_E_P_T___R_E_Q_U_I_R_E_S(((IsGroup)),(G)) // │ │ │ │ -129compose_pow(const G& g, size_t n) { │ │ │ │ -130 if (n == 0) return traits::Identity(); │ │ │ │ -131 else if (n == 1) return g; │ │ │ │ -132 else return traits::Compose(compose_pow(g, n - 1), g); │ │ │ │ -133} │ │ │ │ -134 │ │ │ │ -137template │ │ │ │ -_1_3_8class _D_i_r_e_c_t_P_r_o_d_u_c_t: public std::pair { │ │ │ │ -139 BOOST_CONCEPT_ASSERT((_I_s_G_r_o_u_p_<_G_>)); │ │ │ │ -140 BOOST_CONCEPT_ASSERT((_I_s_G_r_o_u_p_<_H_>)); │ │ │ │ -141 │ │ │ │ -142public: │ │ │ │ -_1_4_4 _D_i_r_e_c_t_P_r_o_d_u_c_t():std::pair(_t_r_a_i_t_s::Identity(),_t_r_a_i_t_s::Identity()) │ │ │ │ -{} │ │ │ │ -145 │ │ │ │ -146 // Construct from two subgroup elements │ │ │ │ -147 _D_i_r_e_c_t_P_r_o_d_u_c_t(const G& g, const H& h):std::pair(g,h) {} │ │ │ │ -148 │ │ │ │ -149 // identity │ │ │ │ -150 static _D_i_r_e_c_t_P_r_o_d_u_c_t Identity() { return _D_i_r_e_c_t_P_r_o_d_u_c_t(); } │ │ │ │ -151 │ │ │ │ -152 _D_i_r_e_c_t_P_r_o_d_u_c_t operator*(const _D_i_r_e_c_t_P_r_o_d_u_c_t& other) const { │ │ │ │ -153 return _D_i_r_e_c_t_P_r_o_d_u_c_t(traits::Compose(this->first, other.first), │ │ │ │ -154 traits::Compose(this->second, other.second)); │ │ │ │ -155 } │ │ │ │ -156 _D_i_r_e_c_t_P_r_o_d_u_c_t inverse() const { │ │ │ │ -157 return _D_i_r_e_c_t_P_r_o_d_u_c_t(this->first.inverse(), this->second.inverse()); │ │ │ │ -158 } │ │ │ │ -159}; │ │ │ │ -160 │ │ │ │ -161// Define any direct product group to be a model of the multiplicative Group │ │ │ │ -concept │ │ │ │ -162template │ │ │ │ -_1_6_3struct _t_r_a_i_t_s<_D_i_r_e_c_t_P_r_o_d_u_c_t > : │ │ │ │ -164 internal::MultiplicativeGroupTraits > {}; │ │ │ │ -165 │ │ │ │ -168template │ │ │ │ -_1_6_9class _D_i_r_e_c_t_S_u_m: public std::pair { │ │ │ │ -170 BOOST_CONCEPT_ASSERT((_I_s_G_r_o_u_p_<_G_>)); // TODO(frank): check additive │ │ │ │ -171 BOOST_CONCEPT_ASSERT((_I_s_G_r_o_u_p_<_H_>)); // TODO(frank): check additive │ │ │ │ -172 │ │ │ │ -173 const G& g() const { return this->first; } │ │ │ │ -174 const H& h() const { return this->second;} │ │ │ │ -175 │ │ │ │ -176public: │ │ │ │ -_1_7_8 _D_i_r_e_c_t_S_u_m():std::pair(_t_r_a_i_t_s::Identity(),_t_r_a_i_t_s::Identity()) {} │ │ │ │ -179 │ │ │ │ -180 // Construct from two subgroup elements │ │ │ │ -181 _D_i_r_e_c_t_S_u_m(const G& g, const H& h):std::pair(g,h) {} │ │ │ │ -182 │ │ │ │ -183 // identity │ │ │ │ -184 static _D_i_r_e_c_t_S_u_m Identity() { return _D_i_r_e_c_t_S_u_m(); } │ │ │ │ -185 │ │ │ │ -186 _D_i_r_e_c_t_S_u_m operator+(const _D_i_r_e_c_t_S_u_m& other) const { │ │ │ │ -187 return _D_i_r_e_c_t_S_u_m(g()+other.g(), h()+other.h()); │ │ │ │ -188 } │ │ │ │ -189 _D_i_r_e_c_t_S_u_m operator-(const _D_i_r_e_c_t_S_u_m& other) const { │ │ │ │ -190 return _D_i_r_e_c_t_S_u_m(g()-other.g(), h()-other.h()); │ │ │ │ -191 } │ │ │ │ -192 _D_i_r_e_c_t_S_u_m operator-() const { │ │ │ │ -193 return _D_i_r_e_c_t_S_u_m(- g(), - h()); │ │ │ │ -194 } │ │ │ │ -195}; │ │ │ │ -196 │ │ │ │ -197// Define direct sums to be a model of the Additive Group concept │ │ │ │ -198template │ │ │ │ -_1_9_9struct _t_r_a_i_t_s<_D_i_r_e_c_t_S_u_m > : │ │ │ │ -200 internal::AdditiveGroupTraits > {}; │ │ │ │ -201 │ │ │ │ -202} // namespace gtsam │ │ │ │ -203 │ │ │ │ -_2_1_2#define GTSAM_CONCEPT_GROUP_INST(T) template class gtsam::IsGroup; │ │ │ │ -213#define GTSAM_CONCEPT_GROUP_TYPE(T) typedef gtsam::IsGroup │ │ │ │ -_gtsam_IsGroup_##T; │ │ │ │ +125template │ │ │ │ +_1_2_6_B_O_O_S_T___C_O_N_C_E_P_T___R_E_Q_U_I_R_E_S(((_I_s_T_e_s_t_a_b_l_e_<_T_>)),(bool)) // │ │ │ │ +127check_manifold_invariants(const T& a, const T& b, double tol=1e-9) { │ │ │ │ +128 typename _t_r_a_i_t_s_<_T_>_:_:_T_a_n_g_e_n_t_V_e_c_t_o_r v0 = _t_r_a_i_t_s_<_T_>_:_:_L_o_c_a_l(a,a); │ │ │ │ +129 typename _t_r_a_i_t_s_<_T_>_:_:_T_a_n_g_e_n_t_V_e_c_t_o_r v = _t_r_a_i_t_s_<_T_>_:_:_L_o_c_a_l(a,b); │ │ │ │ +130 T c = _t_r_a_i_t_s_<_T_>_:_:_R_e_t_r_a_c_t(a,v); │ │ │ │ +131 return v0.norm() < tol && _t_r_a_i_t_s_<_T_>_:_:_E_q_u_a_l_s(b,c,tol); │ │ │ │ +132} │ │ │ │ +133 │ │ │ │ +135template │ │ │ │ +136class IsManifold { │ │ │ │ +137 │ │ │ │ +138public: │ │ │ │ +139 │ │ │ │ +140 typedef typename traits::structure_category structure_category_tag; │ │ │ │ +141 static const int dim = traits::dimension; │ │ │ │ +142 typedef typename traits::ManifoldType ManifoldType; │ │ │ │ +143 typedef typename traits::TangentVector TangentVector; │ │ │ │ +144 │ │ │ │ +145 BOOST_CONCEPT_USAGE(IsManifold) { │ │ │ │ +146 BOOST_STATIC_ASSERT_MSG( │ │ │ │ +147 (boost::is_base_of::value), │ │ │ │ +148 "This type's structure_category trait does not assert it as a manifold (or │ │ │ │ +derived)"); │ │ │ │ +149 BOOST_STATIC_ASSERT(TangentVector::SizeAtCompileTime == dim); │ │ │ │ +150 │ │ │ │ +151 // make sure Chart methods are defined │ │ │ │ +152 v = traits::Local(p, q); │ │ │ │ +153 q = traits::Retract(p, v); │ │ │ │ +154 } │ │ │ │ +155 │ │ │ │ +156private: │ │ │ │ +157 │ │ │ │ +158 TangentVector v; │ │ │ │ +159 ManifoldType p, q; │ │ │ │ +160}; │ │ │ │ +161 │ │ │ │ +163template │ │ │ │ +_1_6_4struct _F_i_x_e_d_D_i_m_e_n_s_i_o_n { │ │ │ │ +165 typedef const int value_type; │ │ │ │ +166 static const int value = _t_r_a_i_t_s_<_T_>_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ +167 BOOST_STATIC_ASSERT_MSG(value != Eigen::Dynamic, │ │ │ │ +168 "FixedDimension instantiated for dymanically-sized type."); │ │ │ │ +169}; │ │ │ │ +170} // \ namespace gtsam │ │ │ │ +171 │ │ │ │ +173// * Macros for using the ManifoldConcept │ │ │ │ +174// * - An instantiation for use inside unit tests │ │ │ │ +175// * - A typedef for use inside generic algorithms │ │ │ │ +176// * │ │ │ │ +177// * NOTE: intentionally not in the gtsam namespace to allow for classes not │ │ │ │ +in │ │ │ │ +178// * the gtsam namespace to be more easily enforced as testable │ │ │ │ +179// */ │ │ │ │ +_1_8_0#define GTSAM_CONCEPT_MANIFOLD_INST(T) template class gtsam::IsManifold; │ │ │ │ +181#define GTSAM_CONCEPT_MANIFOLD_TYPE(T) using _gtsam_IsManifold_##T = gtsam:: │ │ │ │ +IsManifold; │ │ │ │ +_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h │ │ │ │ +Special class for optional Jacobian arguments. │ │ │ │ +_M_a_t_r_i_x_._h │ │ │ │ +typedef and functions to augment Eigen's MatrixXd │ │ │ │ _T_e_s_t_a_b_l_e_._h │ │ │ │ Concept check for values that can be used in unit tests. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ _g_t_s_a_m_:_:_B_O_O_S_T___C_O_N_C_E_P_T___R_E_Q_U_I_R_E_S │ │ │ │ BOOST_CONCEPT_REQUIRES(((IsGroup< G >)),(bool)) check_group_invariants(const G │ │ │ │ &a │ │ │ │ Check invariants. │ │ │ │ _g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ that can be centered ... │ │ │ │ DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_g_r_o_u_p___t_a_g │ │ │ │ -tag to assert a type is a group │ │ │ │ -DDeeffiinniittiioonn Group.h:34 │ │ │ │ -_g_t_s_a_m_:_:_m_u_l_t_i_p_l_i_c_a_t_i_v_e___g_r_o_u_p___t_a_g │ │ │ │ -Group operator syntax flavors. │ │ │ │ -DDeeffiinniittiioonn Group.h:37 │ │ │ │ -_g_t_s_a_m_:_:_a_d_d_i_t_i_v_e___g_r_o_u_p___t_a_g │ │ │ │ -DDeeffiinniittiioonn Group.h:38 │ │ │ │ -_g_t_s_a_m_:_:_I_s_G_r_o_u_p │ │ │ │ -Group Concept. │ │ │ │ -DDeeffiinniittiioonn Group.h:46 │ │ │ │ -_g_t_s_a_m_:_:_D_i_r_e_c_t_P_r_o_d_u_c_t │ │ │ │ -DDeeffiinniittiioonn Group.h:138 │ │ │ │ -_g_t_s_a_m_:_:_D_i_r_e_c_t_P_r_o_d_u_c_t_:_:_D_i_r_e_c_t_P_r_o_d_u_c_t │ │ │ │ -DirectProduct() │ │ │ │ -Default constructor yields identity. │ │ │ │ -DDeeffiinniittiioonn Group.h:144 │ │ │ │ -_g_t_s_a_m_:_:_D_i_r_e_c_t_S_u_m │ │ │ │ -Template to construct the direct sum of two additive groups Assumes existence │ │ │ │ -of three additive opera... │ │ │ │ -DDeeffiinniittiioonn Group.h:169 │ │ │ │ -_g_t_s_a_m_:_:_D_i_r_e_c_t_S_u_m_:_:_D_i_r_e_c_t_S_u_m │ │ │ │ -DirectSum() │ │ │ │ -Default constructor yields identity. │ │ │ │ -DDeeffiinniittiioonn Group.h:178 │ │ │ │ +_g_t_s_a_m_:_:_m_a_n_i_f_o_l_d___t_a_g │ │ │ │ +tag to assert a type is a manifold │ │ │ │ +DDeeffiinniittiioonn Manifold.h:33 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_H_a_s_M_a_n_i_f_o_l_d_P_r_e_r_e_q_s │ │ │ │ +Requirements on type to pass it to Manifold template below. │ │ │ │ +DDeeffiinniittiioonn Manifold.h:59 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_G_e_t_D_i_m_e_n_s_i_o_n_I_m_p_l │ │ │ │ +Extra manifold traits for fixed-dimension types. │ │ │ │ +DDeeffiinniittiioonn Manifold.h:75 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d_T_r_a_i_t_s │ │ │ │ +A helper that implements the traits interface for GTSAM manifolds. │ │ │ │ +DDeeffiinniittiioonn Manifold.h:95 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d │ │ │ │ +Both ManifoldTraits and Testable. │ │ │ │ +DDeeffiinniittiioonn Manifold.h:120 │ │ │ │ +_g_t_s_a_m_:_:_F_i_x_e_d_D_i_m_e_n_s_i_o_n │ │ │ │ +Give fixed size dimension of a type, fails at compile time if dynamic. │ │ │ │ +DDeeffiinniittiioonn Manifold.h:164 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ +either a fixed size o... │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ +_g_t_s_a_m_:_:_I_s_T_e_s_t_a_b_l_e │ │ │ │ +A testable concept check that should be placed in applicable unit tests and in │ │ │ │ +generic algorithms. │ │ │ │ +DDeeffiinniittiioonn Testable.h:58 │ │ │ │ +_g_t_s_a_m_:_:_T_e_s_t_a_b_l_e │ │ │ │ +A helper that implements the traits interface for GTSAM types. │ │ │ │ +DDeeffiinniittiioonn Testable.h:151 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _G_r_o_u_p_._h │ │ │ │ + * _M_a_n_i_f_o_l_d_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00125_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/FastVector.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/testLie.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,47 +98,111 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
FastVector.h
│ │ │ +
testLie.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │ +
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
20#pragma once
│ │ │ -
21
│ │ │ - │ │ │ -
23#include <vector>
│ │ │ -
24
│ │ │ -
25namespace gtsam {
│ │ │ -
26
│ │ │ -
32template <typename T>
│ │ │ - │ │ │ -
34 std::vector<T, typename internal::FastDefaultVectorAllocator<T>::type>;
│ │ │ -
35
│ │ │ -
36} // namespace gtsam
│ │ │ -
An easy way to control which allocator is used for Fast* collections.
│ │ │ -
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
FastVector is a type alias to a std::vector with a custom memory allocator.
Definition FastVector.h:34
│ │ │ +
12/*
│ │ │ +
13 * @file testLie.h
│ │ │ +
14 * @brief Test utilities for Lie groups
│ │ │ +
15 * @date November, 2014
│ │ │ +
16 * @author Paul Furgale
│ │ │ +
17 */
│ │ │ +
18
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ +
21#include <gtsam/base/Lie.h>
│ │ │ + │ │ │ +
23
│ │ │ +
24#include <CppUnitLite/TestResult.h>
│ │ │ +
25#include <CppUnitLite/Test.h>
│ │ │ +
26#include <CppUnitLite/Failure.h>
│ │ │ +
27
│ │ │ +
28namespace gtsam {
│ │ │ +
29
│ │ │ +
30// Do a comprehensive test of Lie Group derivatives
│ │ │ +
31template<typename G>
│ │ │ +
32void testLieGroupDerivatives(TestResult& result_, const std::string& name_,
│ │ │ +
33 const G& t1, const G& t2) {
│ │ │ +
34
│ │ │ +
35 Matrix H1, H2;
│ │ │ +
36 typedef traits<G> T;
│ │ │ +
37 typedef OptionalJacobian<T::dimension,T::dimension> OJ;
│ │ │ +
38
│ │ │ +
39 // Inverse
│ │ │ +
40 OJ none;
│ │ │ +
41 EXPECT(assert_equal<G>(t1.inverse(),T::Inverse(t1, H1)));
│ │ │ +
42 EXPECT(assert_equal(numericalDerivative21<G,G,OJ>(T::Inverse, t1, none),H1));
│ │ │ +
43
│ │ │ +
44 EXPECT(assert_equal<G>(t2.inverse(),T::Inverse(t2, H1)));
│ │ │ +
45 EXPECT(assert_equal(numericalDerivative21<G,G,OJ>(T::Inverse, t2, none),H1));
│ │ │ +
46
│ │ │ +
47 // Compose
│ │ │ +
48 EXPECT(assert_equal<G>(t1 * t2,T::Compose(t1, t2, H1, H2)));
│ │ │ +
49 EXPECT(assert_equal(numericalDerivative41<G,G,G,OJ,OJ>(T::Compose, t1, t2, none, none), H1));
│ │ │ +
50 EXPECT(assert_equal(numericalDerivative42<G,G,G,OJ,OJ>(T::Compose, t1, t2, none, none), H2));
│ │ │ +
51
│ │ │ +
52 // Between
│ │ │ +
53 EXPECT(assert_equal<G>(t1.inverse() * t2,T::Between(t1, t2, H1, H2)));
│ │ │ +
54 EXPECT(assert_equal(numericalDerivative41<G,G,G,OJ,OJ>(T::Between, t1, t2, none, none), H1));
│ │ │ +
55 EXPECT(assert_equal(numericalDerivative42<G,G,G,OJ,OJ>(T::Between, t1, t2, none, none), H2));
│ │ │ +
56}
│ │ │ +
57
│ │ │ +
58// Do a comprehensive test of Lie Group Chart derivatives
│ │ │ +
59template<typename G>
│ │ │ +
60void testChartDerivatives(TestResult& result_, const std::string& name_,
│ │ │ +
61 const G& t1, const G& t2) {
│ │ │ +
62
│ │ │ +
63 Matrix H1, H2;
│ │ │ +
64 typedef traits<G> T;
│ │ │ +
65 typedef typename T::TangentVector V;
│ │ │ +
66 typedef OptionalJacobian<T::dimension,T::dimension> OJ;
│ │ │ +
67
│ │ │ +
68 // Retract
│ │ │ +
69 OJ none;
│ │ │ +
70 V w12 = T::Local(t1, t2);
│ │ │ +
71 EXPECT(assert_equal<G>(t2, T::Retract(t1,w12, H1, H2)));
│ │ │ +
72 EXPECT(assert_equal(numericalDerivative41<G,G,V,OJ,OJ>(T::Retract, t1, w12, none, none), H1));
│ │ │ +
73 EXPECT(assert_equal(numericalDerivative42<G,G,V,OJ,OJ>(T::Retract, t1, w12, none, none), H2));
│ │ │ +
74
│ │ │ +
75 // Local
│ │ │ +
76 EXPECT(assert_equal(w12, T::Local(t1, t2, H1, H2)));
│ │ │ +
77 EXPECT(assert_equal(numericalDerivative41<V,G,G,OJ,OJ>(T::Local, t1, t2, none, none), H1));
│ │ │ +
78 EXPECT(assert_equal(numericalDerivative42<V,G,G,OJ,OJ>(T::Local, t1, t2, none, none), H2));
│ │ │ +
79}
│ │ │ +
80} // namespace gtsam
│ │ │ +
81
│ │ │ +
82#define CHECK_LIE_GROUP_DERIVATIVES(t1,t2) \
│ │ │ +
83 { gtsam::testLieGroupDerivatives(result_, name_, t1, t2); }
│ │ │ +
84
│ │ │ +
85#define CHECK_CHART_DERIVATIVES(t1,t2) \
│ │ │ +
86 { gtsam::testChartDerivatives(result_, name_, t1, t2); }
│ │ │ +
Some functions to compute numerical derivatives.
│ │ │ +
Base class and basic functions for Lie types.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ +
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
equals with an tolerance, prints out message if unequal
Definition Matrix.cpp:43
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,46 +1,119 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -FastVector.h │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +testLie.h │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -20#pragma once │ │ │ │ -21 │ │ │ │ -22#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r_._h> │ │ │ │ -23#include │ │ │ │ -24 │ │ │ │ -25namespace _g_t_s_a_m { │ │ │ │ -26 │ │ │ │ -32template │ │ │ │ -_3_3using _F_a_s_t_V_e_c_t_o_r = │ │ │ │ -34 std::vector::type>; │ │ │ │ -35 │ │ │ │ -36} // namespace gtsam │ │ │ │ -_F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r_._h │ │ │ │ -An easy way to control which allocator is used for Fast* collections. │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_V_e_c_t_o_r │ │ │ │ -std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > │ │ │ │ -FastVector │ │ │ │ -FastVector is a type alias to a std::vector with a custom memory allocator. │ │ │ │ -DDeeffiinniittiioonn FastVector.h:34 │ │ │ │ +12/* │ │ │ │ +13 * @file testLie.h │ │ │ │ +14 * @brief Test utilities for Lie groups │ │ │ │ +15 * @date November, 2014 │ │ │ │ +16 * @author Paul Furgale │ │ │ │ +17 */ │ │ │ │ +18 │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +21#include <_g_t_s_a_m_/_b_a_s_e_/_L_i_e_._h> │ │ │ │ +22#include <_g_t_s_a_m_/_b_a_s_e_/_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_._h> │ │ │ │ +23 │ │ │ │ +24#include │ │ │ │ +25#include │ │ │ │ +26#include │ │ │ │ +27 │ │ │ │ +28namespace _g_t_s_a_m { │ │ │ │ +29 │ │ │ │ +30// Do a comprehensive test of Lie Group derivatives │ │ │ │ +31template │ │ │ │ +32void testLieGroupDerivatives(TestResult& result_, const std::string& name_, │ │ │ │ +33 const G& t1, const G& t2) { │ │ │ │ +34 │ │ │ │ +35 Matrix H1, H2; │ │ │ │ +36 typedef traits T; │ │ │ │ +37 typedef OptionalJacobian OJ; │ │ │ │ +38 │ │ │ │ +39 // Inverse │ │ │ │ +40 OJ none; │ │ │ │ +41 EXPECT(assert_equal(t1.inverse(),T::Inverse(t1, H1))); │ │ │ │ +42 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative21(T::Inverse, t1, │ │ │ │ +none),H1)); │ │ │ │ +43 │ │ │ │ +44 EXPECT(assert_equal(t2.inverse(),T::Inverse(t2, H1))); │ │ │ │ +45 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative21(T::Inverse, t2, │ │ │ │ +none),H1)); │ │ │ │ +46 │ │ │ │ +47 // Compose │ │ │ │ +48 EXPECT(assert_equal(t1 * t2,T::Compose(t1, t2, H1, H2))); │ │ │ │ +49 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative41(T::Compose, t1, t2, │ │ │ │ +none, none), H1)); │ │ │ │ +50 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative42(T::Compose, t1, t2, │ │ │ │ +none, none), H2)); │ │ │ │ +51 │ │ │ │ +52 // Between │ │ │ │ +53 EXPECT(assert_equal(t1.inverse() * t2,T::Between(t1, t2, H1, H2))); │ │ │ │ +54 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative41(T::Between, t1, t2, │ │ │ │ +none, none), H1)); │ │ │ │ +55 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative42(T::Between, t1, t2, │ │ │ │ +none, none), H2)); │ │ │ │ +56} │ │ │ │ +57 │ │ │ │ +58// Do a comprehensive test of Lie Group Chart derivatives │ │ │ │ +59template │ │ │ │ +60void testChartDerivatives(TestResult& result_, const std::string& name_, │ │ │ │ +61 const G& t1, const G& t2) { │ │ │ │ +62 │ │ │ │ +63 Matrix H1, H2; │ │ │ │ +64 typedef traits T; │ │ │ │ +65 typedef typename T::TangentVector V; │ │ │ │ +66 typedef OptionalJacobian OJ; │ │ │ │ +67 │ │ │ │ +68 // Retract │ │ │ │ +69 OJ none; │ │ │ │ +70 V w12 = T::Local(t1, t2); │ │ │ │ +71 EXPECT(assert_equal(t2, T::Retract(t1,w12, H1, H2))); │ │ │ │ +72 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative41(T::Retract, t1, w12, │ │ │ │ +none, none), H1)); │ │ │ │ +73 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative42(T::Retract, t1, w12, │ │ │ │ +none, none), H2)); │ │ │ │ +74 │ │ │ │ +75 // Local │ │ │ │ +76 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(w12, T::Local(t1, t2, H1, H2))); │ │ │ │ +77 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative41(T::Local, t1, t2, │ │ │ │ +none, none), H1)); │ │ │ │ +78 EXPECT(_a_s_s_e_r_t___e_q_u_a_l(numericalDerivative42(T::Local, t1, t2, │ │ │ │ +none, none), H2)); │ │ │ │ +79} │ │ │ │ +80} // namespace gtsam │ │ │ │ +81 │ │ │ │ +82#define CHECK_LIE_GROUP_DERIVATIVES(t1,t2) \ │ │ │ │ +83 { gtsam::testLieGroupDerivatives(result_, name_, t1, t2); } │ │ │ │ +84 │ │ │ │ +85#define CHECK_CHART_DERIVATIVES(t1,t2) \ │ │ │ │ +86 { gtsam::testChartDerivatives(result_, name_, t1, t2); } │ │ │ │ +_n_u_m_e_r_i_c_a_l_D_e_r_i_v_a_t_i_v_e_._h │ │ │ │ +Some functions to compute numerical derivatives. │ │ │ │ +_L_i_e_._h │ │ │ │ +Base class and basic functions for Lie types. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ +_g_t_s_a_m_:_:_a_s_s_e_r_t___e_q_u_a_l │ │ │ │ +bool assert_equal(const Matrix &expected, const Matrix &actual, double tol) │ │ │ │ +equals with an tolerance, prints out message if unequal │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:43 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _F_a_s_t_V_e_c_t_o_r_._h │ │ │ │ + * tteessttLLiiee..hh │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00128.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/FastSet.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/SymmetricBlockMatrix.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,45 +94,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
FastSet.h File Reference
│ │ │ +
SymmetricBlockMatrix.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

A thin wrapper around std::set that uses boost's fast_pool_allocator. │ │ │ +

Access to matrices via blocks of pre-defined sizes. │ │ │ More...

│ │ │ - │ │ │ -

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  gtsam::FastSet< VALUE >
 FastSet is a thin wrapper around std::set that uses the boost fast_pool_allocator instead of the default STL allocator. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │

Detailed Description

│ │ │ -

A thin wrapper around std::set that uses boost's fast_pool_allocator.

│ │ │ -
Author
Richard Roberts
│ │ │ -
Date
Oct 17, 2010
│ │ │ +

Access to matrices via blocks of pre-defined sizes.

│ │ │ +

Used in GaussianFactor and GaussianConditional.

Author
Richard Roberts
│ │ │ +
Date
Sep 18, 2010
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +1,23 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -FastSet.h File Reference │ │ │ │ -A thin wrapper around std::set that uses boost's fast_pool_allocator. _M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_F_a_s_t_S_e_t_<_ _V_A_L_U_E_ _> │ │ │ │ -  _F_a_s_t_S_e_t is a thin wrapper around std::set that uses the boost │ │ │ │ - fast_pool_allocator instead of the default STL allocator. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +SymmetricBlockMatrix.cpp File Reference │ │ │ │ +Access to matrices via blocks of pre-defined sizes. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A thin wrapper around std::set that uses boost's fast_pool_allocator. │ │ │ │ +Access to matrices via blocks of pre-defined sizes. │ │ │ │ +Used in GaussianFactor and _G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l. │ │ │ │ Author │ │ │ │ Richard Roberts │ │ │ │ Date │ │ │ │ - Oct 17, 2010 │ │ │ │ + Sep 18, 2010 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _F_a_s_t_S_e_t_._h │ │ │ │ + * _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00131_source.html │ │ │ @@ -114,15 +114,15 @@ │ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │
19#pragma once
│ │ │
20
│ │ │ - │ │ │ + │ │ │
22#include <boost/serialization/nvp.hpp>
│ │ │
23#include <boost/serialization/map.hpp>
│ │ │
24#include <map>
│ │ │
25
│ │ │
26namespace gtsam {
│ │ │
27
│ │ │
36template<typename KEY, typename VALUE>
│ │ │ @@ -160,15 +160,15 @@ │ │ │
73 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
│ │ │
74 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
│ │ │
75 }
│ │ │
76};
│ │ │ │ │ │
77
│ │ │
78}
│ │ │ -
An easy way to control which allocator is used for Fast* collections.
│ │ │ +
An easy way to control which allocator is used for Fast* collections.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │
Default allocator for list, map, and set types.
Definition FastDefaultAllocator.h:50
│ │ │
FastMap is a thin wrapper around std::map that uses the boost fast_pool_allocator instead of the defa...
Definition FastMap.h:38
│ │ │
FastMap(const Base &x)
Copy constructor from the base map class.
Definition FastMap.h:56
│ │ │
FastMap(INPUTITERATOR first, INPUTITERATOR last)
Constructor from a range, passes through to base class.
Definition FastMap.h:50
│ │ │
bool insert2(const KEY &key, const VALUE &val)
Handy 'insert' function for Matlab wrapper.
Definition FastMap.h:64
│ │ │
FastMap(const FastMap< KEY, VALUE > &x)
Copy constructor from another FastMap.
Definition FastMap.h:53
│ │ ├── ./usr/share/doc/libgtsam-dev/html/a00134.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/FastList.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/ThreadsafeException.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,43 +96,55 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
FastList.h File Reference
│ │ │ +
ThreadsafeException.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

A thin wrapper around std::list that uses boost's fast_pool_allocator. │ │ │ +

Base exception type that uses tbb_allocator if GTSAM is compiled with TBB. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │

│ │ │ Classes

class  gtsam::FastList< VALUE >
 FastList is a thin wrapper around std::list that uses the boost fast_pool_allocator instead of the default STL allocator. More...
class  gtsam::ThreadsafeException< DERIVED >
 Base exception type that uses tbb_allocator if GTSAM is compiled with TBB. More...
 
class  gtsam::RuntimeErrorThreadsafe
 Thread-safe runtime error exception. More...
 
class  gtsam::OutOfRangeThreadsafe
 Thread-safe out of range exception. More...
 
class  gtsam::InvalidArgumentThreadsafe
 Thread-safe invalid argument exception. More...
 
class  gtsam::CholeskyFailed
 Indicate Cholesky factorization failure. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │

Detailed Description

│ │ │ -

A thin wrapper around std::list that uses boost's fast_pool_allocator.

│ │ │ +

Base exception type that uses tbb_allocator if GTSAM is compiled with TBB.

│ │ │
Author
Richard Roberts
│ │ │ -
Date
Oct 22, 2010
│ │ │ +
Date
Aug 21, 2010
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +1,42 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -FastList.h File Reference │ │ │ │ -A thin wrapper around std::list that uses boost's fast_pool_allocator. _M_o_r_e_._._. │ │ │ │ +ThreadsafeException.h File Reference │ │ │ │ +_B_a_s_e │ │ │ │ +Base exception type that uses tbb_allocator if GTSAM is compiled with TBB. │ │ │ │ +_M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_F_a_s_t_L_i_s_t_<_ _V_A_L_U_E_ _> │ │ │ │ -  _F_a_s_t_L_i_s_t is a thin wrapper around std::list that uses the boost │ │ │ │ - fast_pool_allocator instead of the default STL allocator. _M_o_r_e_._._. │ │ │ │ +class   _g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_<_ _D_E_R_I_V_E_D_ _> │ │ │ │ +  Base exception type that uses tbb_allocator if GTSAM is compiled with │ │ │ │ + TBB. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _g_t_s_a_m_:_:_R_u_n_t_i_m_e_E_r_r_o_r_T_h_r_e_a_d_s_a_f_e │ │ │ │ +  Thread-safe runtime error exception. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _g_t_s_a_m_:_:_O_u_t_O_f_R_a_n_g_e_T_h_r_e_a_d_s_a_f_e │ │ │ │ +  Thread-safe out of range exception. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _g_t_s_a_m_:_:_I_n_v_a_l_i_d_A_r_g_u_m_e_n_t_T_h_r_e_a_d_s_a_f_e │ │ │ │ +  Thread-safe invalid argument exception. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _g_t_s_a_m_:_:_C_h_o_l_e_s_k_y_F_a_i_l_e_d │ │ │ │ +  Indicate Cholesky factorization failure. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A thin wrapper around std::list that uses boost's fast_pool_allocator. │ │ │ │ +Base exception type that uses tbb_allocator if GTSAM is compiled with TBB. │ │ │ │ Author │ │ │ │ Richard Roberts │ │ │ │ Date │ │ │ │ - Oct 22, 2010 │ │ │ │ + Aug 21, 2010 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _F_a_s_t_L_i_s_t_._h │ │ │ │ + * _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00134_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/FastList.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/ThreadsafeException.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,99 +98,160 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
FastList.h
│ │ │ +
ThreadsafeException.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
19#pragma once
│ │ │ -
20
│ │ │ - │ │ │ -
22#include <list>
│ │ │ -
23#include <boost/utility/enable_if.hpp>
│ │ │ -
24#include <boost/serialization/nvp.hpp>
│ │ │ -
25#include <boost/serialization/version.hpp>
│ │ │ -
26#include <boost/serialization/optional.hpp>
│ │ │ -
27#include <boost/serialization/list.hpp>
│ │ │ -
28
│ │ │ -
29namespace gtsam {
│ │ │ -
30
│ │ │ -
39template<typename VALUE>
│ │ │ +
20#pragma once
│ │ │ +
21
│ │ │ +
22#include <gtsam/config.h> // for GTSAM_USE_TBB
│ │ │ +
23
│ │ │ +
24#include <boost/optional/optional.hpp>
│ │ │ +
25#include <gtsam/dllexport.h>
│ │ │ +
26#include <string>
│ │ │ +
27#include <typeinfo>
│ │ │ +
28#include <exception>
│ │ │ +
29
│ │ │ +
30#ifdef GTSAM_USE_TBB
│ │ │ +
31#include <tbb/tbb_allocator.h>
│ │ │ +
32#include <tbb/scalable_allocator.h>
│ │ │ +
33#include <iostream>
│ │ │ +
34#endif
│ │ │ +
35
│ │ │ +
36namespace gtsam {
│ │ │ +
37
│ │ │ +
39template<class DERIVED>
│ │ │
│ │ │ -
40class FastList: public std::list<VALUE, typename internal::FastDefaultAllocator<VALUE>::type> {
│ │ │ -
41
│ │ │ -
42public:
│ │ │ -
43
│ │ │ -
44 typedef std::list<VALUE, typename internal::FastDefaultAllocator<VALUE>::type> Base;
│ │ │ -
45
│ │ │ - │ │ │ -
48
│ │ │ -
50 template<typename INPUTITERATOR>
│ │ │ -
51 explicit FastList(INPUTITERATOR first, INPUTITERATOR last) : Base(first, last) {}
│ │ │ -
52
│ │ │ -
54 FastList(const FastList<VALUE>& x) : Base(x) {}
│ │ │ -
55
│ │ │ -
57 FastList(const Base& x) : Base(x) {}
│ │ │ -
58
│ │ │ -
60 FastList(std::initializer_list<VALUE> l) : Base(l) {}
│ │ │ -
61
│ │ │ -
62#ifdef GTSAM_ALLOCATOR_BOOSTPOOL
│ │ │ -
64 FastList(const std::list<VALUE>& x) {
│ │ │ -
65 // This if statement works around a bug in boost pool allocator and/or
│ │ │ -
66 // STL vector where if the size is zero, the pool allocator will allocate
│ │ │ -
67 // huge amounts of memory.
│ │ │ -
68 if(x.size() > 0)
│ │ │ -
69 Base::assign(x.begin(), x.end());
│ │ │ -
70 }
│ │ │ -
71#endif
│ │ │ -
72
│ │ │ -
│ │ │ -
74 operator std::list<VALUE>() const {
│ │ │ -
75 return std::list<VALUE>(this->begin(), this->end());
│ │ │ + │ │ │ +
41public std::exception
│ │ │ +
42{
│ │ │ +
43private:
│ │ │ +
44 typedef std::exception Base;
│ │ │ +
45#ifdef GTSAM_USE_TBB
│ │ │ +
46protected:
│ │ │ +
47 typedef std::basic_string<char, std::char_traits<char>,
│ │ │ +
48 tbb::tbb_allocator<char> > String;
│ │ │ +
49#else
│ │ │ +
50protected:
│ │ │ +
51 typedef std::string String;
│ │ │ +
52#endif
│ │ │ +
53
│ │ │ +
54protected:
│ │ │ +
55 bool dynamic_;
│ │ │ +
56 mutable boost::optional<String> description_;
│ │ │ +
57
│ │ │ +
│ │ │ + │ │ │ +
60 dynamic_(false) {
│ │ │ +
61 }
│ │ │ +
│ │ │ +
62
│ │ │ +
│ │ │ + │ │ │ +
65 Base(other), dynamic_(false) {
│ │ │ +
66 }
│ │ │ +
│ │ │ +
67
│ │ │ +
│ │ │ +
69 ThreadsafeException(const std::string& description) :
│ │ │ +
70 dynamic_(false), description_(
│ │ │ +
71 String(description.begin(), description.end())) {
│ │ │ +
72 }
│ │ │ +
│ │ │ +
73
│ │ │ +
│ │ │ +
75 ~ThreadsafeException() noexcept override {
│ │ │
76 }
│ │ │
│ │ │
77
│ │ │ -
78private:
│ │ │ - │ │ │ -
81 template<class ARCHIVE>
│ │ │ -
82 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
│ │ │ -
83 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
│ │ │ -
84 }
│ │ │ -
85
│ │ │ -
86};
│ │ │ -
│ │ │ -
87
│ │ │ -
88}
│ │ │ -
An easy way to control which allocator is used for Fast* collections.
│ │ │ +
78public:
│ │ │ +
79 const char* what() const noexcept override {
│ │ │ +
80 return description_ ? description_->c_str() : "";
│ │ │ +
81 }
│ │ │ +
82};
│ │ │ +
│ │ │ +
83
│ │ │ +
│ │ │ +
85class GTSAM_EXPORT RuntimeErrorThreadsafe: public ThreadsafeException<RuntimeErrorThreadsafe> {
│ │ │ +
86public:
│ │ │ +
│ │ │ +
88 RuntimeErrorThreadsafe(const std::string& description) :
│ │ │ + │ │ │ +
90 }
│ │ │ +
│ │ │ +
91};
│ │ │ +
│ │ │ +
92
│ │ │ +
│ │ │ +
94class OutOfRangeThreadsafe: public ThreadsafeException<OutOfRangeThreadsafe> {
│ │ │ +
95public:
│ │ │ +
│ │ │ +
97 OutOfRangeThreadsafe(const std::string& description) :
│ │ │ + │ │ │ +
99 }
│ │ │ +
│ │ │ +
100};
│ │ │ +
│ │ │ +
101
│ │ │ +
│ │ │ + │ │ │ +
104 InvalidArgumentThreadsafe> {
│ │ │ +
105public:
│ │ │ +
│ │ │ +
107 InvalidArgumentThreadsafe(const std::string& description) :
│ │ │ + │ │ │ +
109 }
│ │ │ +
│ │ │ +
110};
│ │ │ +
│ │ │ +
111
│ │ │ +
│ │ │ +
113class CholeskyFailed : public gtsam::ThreadsafeException<CholeskyFailed>
│ │ │ +
114{
│ │ │ +
115public:
│ │ │ +
116 CholeskyFailed() noexcept {}
│ │ │ +
117 ~CholeskyFailed() noexcept override {}
│ │ │ +
118};
│ │ │ +
│ │ │ +
119
│ │ │ +
120} // namespace gtsam
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
FastList is a thin wrapper around std::list that uses the boost fast_pool_allocator instead of the de...
Definition FastList.h:40
│ │ │ -
FastList(INPUTITERATOR first, INPUTITERATOR last)
Constructor from a range, passes through to base class.
Definition FastList.h:51
│ │ │ -
FastList()
Default constructor.
Definition FastList.h:47
│ │ │ -
FastList(std::initializer_list< VALUE > l)
Construct from c++11 initializer list:
Definition FastList.h:60
│ │ │ -
FastList(const FastList< VALUE > &x)
Copy constructor from another FastList.
Definition FastList.h:54
│ │ │ -
friend class boost::serialization::access
Serialization function.
Definition FastList.h:80
│ │ │ -
FastList(const Base &x)
Copy constructor from the base list class.
Definition FastList.h:57
│ │ │ +
Base exception type that uses tbb_allocator if GTSAM is compiled with TBB.
Definition ThreadsafeException.h:42
│ │ │ +
~ThreadsafeException() noexcept override
Default destructor doesn't have the noexcept.
Definition ThreadsafeException.h:75
│ │ │ +
bool dynamic_
Whether this object was moved.
Definition ThreadsafeException.h:55
│ │ │ +
ThreadsafeException()
Default constructor is protected - may only be created from derived classes.
Definition ThreadsafeException.h:59
│ │ │ +
ThreadsafeException(const ThreadsafeException &other)
Copy constructor is protected - may only be created from derived classes.
Definition ThreadsafeException.h:64
│ │ │ +
ThreadsafeException(const std::string &description)
Construct with description string.
Definition ThreadsafeException.h:69
│ │ │ +
boost::optional< String > description_
Optional description.
Definition ThreadsafeException.h:56
│ │ │ +
Thread-safe runtime error exception.
Definition ThreadsafeException.h:85
│ │ │ +
RuntimeErrorThreadsafe(const std::string &description)
Construct with a string describing the exception.
Definition ThreadsafeException.h:88
│ │ │ +
Thread-safe out of range exception.
Definition ThreadsafeException.h:94
│ │ │ +
OutOfRangeThreadsafe(const std::string &description)
Construct with a string describing the exception.
Definition ThreadsafeException.h:97
│ │ │ +
Thread-safe invalid argument exception.
Definition ThreadsafeException.h:104
│ │ │ +
InvalidArgumentThreadsafe(const std::string &description)
Construct with a string describing the exception.
Definition ThreadsafeException.h:107
│ │ │ +
Indicate Cholesky factorization failure.
Definition ThreadsafeException.h:114
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,114 +1,169 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -FastList.h │ │ │ │ +ThreadsafeException.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -19#pragma once │ │ │ │ -20 │ │ │ │ -21#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r_._h> │ │ │ │ -22#include │ │ │ │ -23#include │ │ │ │ -24#include │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27#include │ │ │ │ -28 │ │ │ │ -29namespace _g_t_s_a_m { │ │ │ │ -30 │ │ │ │ -39template │ │ │ │ -_4_0class _F_a_s_t_L_i_s_t: public std::list::type> { │ │ │ │ -41 │ │ │ │ -42public: │ │ │ │ -43 │ │ │ │ -44 typedef std::list:: │ │ │ │ -type> Base; │ │ │ │ -45 │ │ │ │ -_4_7 _F_a_s_t_L_i_s_t() {} │ │ │ │ -48 │ │ │ │ -50 template │ │ │ │ -_5_1 explicit _F_a_s_t_L_i_s_t(INPUTITERATOR first, INPUTITERATOR last) : Base(first, │ │ │ │ -last) {} │ │ │ │ -52 │ │ │ │ -_5_4 _F_a_s_t_L_i_s_t(const _F_a_s_t_L_i_s_t_<_V_A_L_U_E_>& x) : Base(x) {} │ │ │ │ -55 │ │ │ │ -_5_7 _F_a_s_t_L_i_s_t(const Base& x) : Base(x) {} │ │ │ │ -58 │ │ │ │ -_6_0 _F_a_s_t_L_i_s_t(std::initializer_list l) : Base(l) {} │ │ │ │ -61 │ │ │ │ -62#ifdef GTSAM_ALLOCATOR_BOOSTPOOL │ │ │ │ -64 _F_a_s_t_L_i_s_t(const std::list& x) { │ │ │ │ -65 // This if statement works around a bug in boost pool allocator and/or │ │ │ │ -66 // STL vector where if the size is zero, the pool allocator will allocate │ │ │ │ -67 // huge amounts of memory. │ │ │ │ -68 if(x.size() > 0) │ │ │ │ -69 Base::assign(x.begin(), x.end()); │ │ │ │ -70 } │ │ │ │ -71#endif │ │ │ │ -72 │ │ │ │ -_7_4 operator std::list() const { │ │ │ │ -75 return std::list(this->begin(), this->end()); │ │ │ │ +20#pragma once │ │ │ │ +21 │ │ │ │ +22#include // for GTSAM_USE_TBB │ │ │ │ +23 │ │ │ │ +24#include │ │ │ │ +25#include │ │ │ │ +26#include │ │ │ │ +27#include │ │ │ │ +28#include │ │ │ │ +29 │ │ │ │ +30#ifdef GTSAM_USE_TBB │ │ │ │ +31#include │ │ │ │ +32#include │ │ │ │ +33#include │ │ │ │ +34#endif │ │ │ │ +35 │ │ │ │ +36namespace _g_t_s_a_m { │ │ │ │ +37 │ │ │ │ +39template │ │ │ │ +_4_0class _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n: │ │ │ │ +41public std::exception │ │ │ │ +42{ │ │ │ │ +43private: │ │ │ │ +44 typedef std::exception Base; │ │ │ │ +45#ifdef GTSAM_USE_TBB │ │ │ │ +46protected: │ │ │ │ +47 typedef std::basic_string, │ │ │ │ +48 tbb::tbb_allocator > String; │ │ │ │ +49#else │ │ │ │ +50protected: │ │ │ │ +51 typedef std::string String; │ │ │ │ +52#endif │ │ │ │ +53 │ │ │ │ +54protected: │ │ │ │ +_5_5 bool _d_y_n_a_m_i_c__; │ │ │ │ +_5_6 mutable boost::optional _d_e_s_c_r_i_p_t_i_o_n__; │ │ │ │ +57 │ │ │ │ +_5_9 _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n() : │ │ │ │ +60 _d_y_n_a_m_i_c__(false) { │ │ │ │ +61 } │ │ │ │ +62 │ │ │ │ +_6_4 _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n(const _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n& other) : │ │ │ │ +65 Base(other), _d_y_n_a_m_i_c__(false) { │ │ │ │ +66 } │ │ │ │ +67 │ │ │ │ +_6_9 _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n(const std::string& description) : │ │ │ │ +70 _d_y_n_a_m_i_c__(false), _d_e_s_c_r_i_p_t_i_o_n__( │ │ │ │ +71 String(description.begin(), description.end())) { │ │ │ │ +72 } │ │ │ │ +73 │ │ │ │ +_7_5 _~_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n() noexcept override { │ │ │ │ 76 } │ │ │ │ 77 │ │ │ │ -78private: │ │ │ │ -_8_0 friend class _b_o_o_s_t_:_:_s_e_r_i_a_l_i_z_a_t_i_o_n_:_:_a_c_c_e_s_s; │ │ │ │ -81 template │ │ │ │ -82 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ -83 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base); │ │ │ │ -84 } │ │ │ │ -85 │ │ │ │ -86}; │ │ │ │ -87 │ │ │ │ -88} │ │ │ │ -_F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r_._h │ │ │ │ -An easy way to control which allocator is used for Fast* collections. │ │ │ │ +78public: │ │ │ │ +79 const char* what() const noexcept override { │ │ │ │ +80 return _d_e_s_c_r_i_p_t_i_o_n__ ? _d_e_s_c_r_i_p_t_i_o_n__->c_str() : ""; │ │ │ │ +81 } │ │ │ │ +82}; │ │ │ │ +83 │ │ │ │ +_8_5class GTSAM_EXPORT _R_u_n_t_i_m_e_E_r_r_o_r_T_h_r_e_a_d_s_a_f_e: public │ │ │ │ +_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n { │ │ │ │ +86public: │ │ │ │ +_8_8 _R_u_n_t_i_m_e_E_r_r_o_r_T_h_r_e_a_d_s_a_f_e(const std::string& description) : │ │ │ │ +89 _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n<_R_u_n_t_i_m_e_E_r_r_o_r_T_h_r_e_a_d_s_a_f_e>(description) { │ │ │ │ +90 } │ │ │ │ +91}; │ │ │ │ +92 │ │ │ │ +_9_4class _O_u_t_O_f_R_a_n_g_e_T_h_r_e_a_d_s_a_f_e: public _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n │ │ │ │ +{ │ │ │ │ +95public: │ │ │ │ +_9_7 _O_u_t_O_f_R_a_n_g_e_T_h_r_e_a_d_s_a_f_e(const std::string& description) : │ │ │ │ +98 _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n<_O_u_t_O_f_R_a_n_g_e_T_h_r_e_a_d_s_a_f_e>(description) { │ │ │ │ +99 } │ │ │ │ +100}; │ │ │ │ +101 │ │ │ │ +_1_0_3class _I_n_v_a_l_i_d_A_r_g_u_m_e_n_t_T_h_r_e_a_d_s_a_f_e: public _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n< │ │ │ │ +104 InvalidArgumentThreadsafe> { │ │ │ │ +105public: │ │ │ │ +_1_0_7 _I_n_v_a_l_i_d_A_r_g_u_m_e_n_t_T_h_r_e_a_d_s_a_f_e(const std::string& description) : │ │ │ │ +108 _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n<_I_n_v_a_l_i_d_A_r_g_u_m_e_n_t_T_h_r_e_a_d_s_a_f_e>(description) { │ │ │ │ +109 } │ │ │ │ +110}; │ │ │ │ +111 │ │ │ │ +_1_1_3class _C_h_o_l_e_s_k_y_F_a_i_l_e_d : public _g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n │ │ │ │ +114{ │ │ │ │ +115public: │ │ │ │ +116 _C_h_o_l_e_s_k_y_F_a_i_l_e_d() noexcept {} │ │ │ │ +117 _~_C_h_o_l_e_s_k_y_F_a_i_l_e_d() noexcept override {} │ │ │ │ +118}; │ │ │ │ +119 │ │ │ │ +120} // namespace gtsam │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_L_i_s_t │ │ │ │ -FastList is a thin wrapper around std::list that uses the boost │ │ │ │ -fast_pool_allocator instead of the de... │ │ │ │ -DDeeffiinniittiioonn FastList.h:40 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_L_i_s_t_:_:_F_a_s_t_L_i_s_t │ │ │ │ -FastList(INPUTITERATOR first, INPUTITERATOR last) │ │ │ │ -Constructor from a range, passes through to base class. │ │ │ │ -DDeeffiinniittiioonn FastList.h:51 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_L_i_s_t_:_:_F_a_s_t_L_i_s_t │ │ │ │ -FastList() │ │ │ │ -Default constructor. │ │ │ │ -DDeeffiinniittiioonn FastList.h:47 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_L_i_s_t_:_:_F_a_s_t_L_i_s_t │ │ │ │ -FastList(std::initializer_list< VALUE > l) │ │ │ │ -Construct from c++11 initializer list: │ │ │ │ -DDeeffiinniittiioonn FastList.h:60 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_L_i_s_t_:_:_F_a_s_t_L_i_s_t │ │ │ │ -FastList(const FastList< VALUE > &x) │ │ │ │ -Copy constructor from another FastList. │ │ │ │ -DDeeffiinniittiioonn FastList.h:54 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_L_i_s_t_:_:_a_c_c_e_s_s │ │ │ │ -friend class boost::serialization::access │ │ │ │ -Serialization function. │ │ │ │ -DDeeffiinniittiioonn FastList.h:80 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_L_i_s_t_:_:_F_a_s_t_L_i_s_t │ │ │ │ -FastList(const Base &x) │ │ │ │ -Copy constructor from the base list class. │ │ │ │ -DDeeffiinniittiioonn FastList.h:57 │ │ │ │ +_g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n │ │ │ │ +Base exception type that uses tbb_allocator if GTSAM is compiled with TBB. │ │ │ │ +DDeeffiinniittiioonn ThreadsafeException.h:42 │ │ │ │ +_g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_:_:_~_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n │ │ │ │ +~ThreadsafeException() noexcept override │ │ │ │ +Default destructor doesn't have the noexcept. │ │ │ │ +DDeeffiinniittiioonn ThreadsafeException.h:75 │ │ │ │ +_g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_:_:_d_y_n_a_m_i_c__ │ │ │ │ +bool dynamic_ │ │ │ │ +Whether this object was moved. │ │ │ │ +DDeeffiinniittiioonn ThreadsafeException.h:55 │ │ │ │ +_g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n │ │ │ │ +ThreadsafeException() │ │ │ │ +Default constructor is protected - may only be created from derived classes. │ │ │ │ +DDeeffiinniittiioonn ThreadsafeException.h:59 │ │ │ │ +_g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n │ │ │ │ +ThreadsafeException(const ThreadsafeException &other) │ │ │ │ +Copy constructor is protected - may only be created from derived classes. │ │ │ │ +DDeeffiinniittiioonn ThreadsafeException.h:64 │ │ │ │ +_g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n │ │ │ │ +ThreadsafeException(const std::string &description) │ │ │ │ +Construct with description string. │ │ │ │ +DDeeffiinniittiioonn ThreadsafeException.h:69 │ │ │ │ +_g_t_s_a_m_:_:_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_:_:_d_e_s_c_r_i_p_t_i_o_n__ │ │ │ │ +boost::optional< String > description_ │ │ │ │ +Optional description. │ │ │ │ +DDeeffiinniittiioonn ThreadsafeException.h:56 │ │ │ │ +_g_t_s_a_m_:_:_R_u_n_t_i_m_e_E_r_r_o_r_T_h_r_e_a_d_s_a_f_e │ │ │ │ +Thread-safe runtime error exception. │ │ │ │ +DDeeffiinniittiioonn ThreadsafeException.h:85 │ │ │ │ +_g_t_s_a_m_:_:_R_u_n_t_i_m_e_E_r_r_o_r_T_h_r_e_a_d_s_a_f_e_:_:_R_u_n_t_i_m_e_E_r_r_o_r_T_h_r_e_a_d_s_a_f_e │ │ │ │ +RuntimeErrorThreadsafe(const std::string &description) │ │ │ │ +Construct with a string describing the exception. │ │ │ │ +DDeeffiinniittiioonn ThreadsafeException.h:88 │ │ │ │ +_g_t_s_a_m_:_:_O_u_t_O_f_R_a_n_g_e_T_h_r_e_a_d_s_a_f_e │ │ │ │ +Thread-safe out of range exception. │ │ │ │ +DDeeffiinniittiioonn ThreadsafeException.h:94 │ │ │ │ +_g_t_s_a_m_:_:_O_u_t_O_f_R_a_n_g_e_T_h_r_e_a_d_s_a_f_e_:_:_O_u_t_O_f_R_a_n_g_e_T_h_r_e_a_d_s_a_f_e │ │ │ │ +OutOfRangeThreadsafe(const std::string &description) │ │ │ │ +Construct with a string describing the exception. │ │ │ │ +DDeeffiinniittiioonn ThreadsafeException.h:97 │ │ │ │ +_g_t_s_a_m_:_:_I_n_v_a_l_i_d_A_r_g_u_m_e_n_t_T_h_r_e_a_d_s_a_f_e │ │ │ │ +Thread-safe invalid argument exception. │ │ │ │ +DDeeffiinniittiioonn ThreadsafeException.h:104 │ │ │ │ +_g_t_s_a_m_:_:_I_n_v_a_l_i_d_A_r_g_u_m_e_n_t_T_h_r_e_a_d_s_a_f_e_:_:_I_n_v_a_l_i_d_A_r_g_u_m_e_n_t_T_h_r_e_a_d_s_a_f_e │ │ │ │ +InvalidArgumentThreadsafe(const std::string &description) │ │ │ │ +Construct with a string describing the exception. │ │ │ │ +DDeeffiinniittiioonn ThreadsafeException.h:107 │ │ │ │ +_g_t_s_a_m_:_:_C_h_o_l_e_s_k_y_F_a_i_l_e_d │ │ │ │ +Indicate Cholesky factorization failure. │ │ │ │ +DDeeffiinniittiioonn ThreadsafeException.h:114 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _F_a_s_t_L_i_s_t_._h │ │ │ │ + * _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00137.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/FastDefaultAllocator.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/debug.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,49 +94,61 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Macros
│ │ │ -
FastDefaultAllocator.h File Reference
│ │ │ +Macros | │ │ │ +Functions
│ │ │ +
debug.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

An easy way to control which allocator is used for Fast* collections. │ │ │ +

Global debugging flags. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

struct  gtsam::internal::FastDefaultAllocator< T >
 Default allocator for list, map, and set types. More...
 
struct  gtsam::internal::FastDefaultVectorAllocator< T >
 Default allocator for vector types (we never use boost pool for vectors) More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Macros

│ │ │ +#define ISDEBUG(S)   (gtsam::guardedIsDebug(S))
 
│ │ │ +#define SETDEBUG(S, V)   ((void)(gtsam::guardedSetDebug(S,V)))
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

│ │ │ +bool gtsam::guardedIsDebug (const std::string &s)
 
│ │ │ +void gtsam::guardedSetDebug (const std::string &s, const bool v)
 
│ │ │ +bool gtsam::isDebugVersion ()
 
│ │ │

Detailed Description

│ │ │ -

An easy way to control which allocator is used for Fast* collections.

│ │ │ +

Global debugging flags.

│ │ │
Author
Richard Roberts
│ │ │ -
Date
Aug 15, 2013
│ │ │ +
Date
Feb 1, 2011
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,31 +1,35 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ -FastDefaultAllocator.h File Reference │ │ │ │ -An easy way to control which allocator is used for Fast* collections. _M_o_r_e_._._. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +debug.h File Reference │ │ │ │ +Global debugging flags. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r_<_ _T_ _> │ │ │ │ -  Default allocator for list, map, and set types. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_F_a_s_t_D_e_f_a_u_l_t_V_e_c_t_o_r_A_l_l_o_c_a_t_o_r_<_ _T_ _> │ │ │ │ -  Default allocator for vector types (we never use boost pool for │ │ │ │ - vectors) _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  IISSDDEEBBUUGG(S)   (gtsam::guardedIsDebug(S)) │ │ │ │ +  │ │ │ │ +#define  SSEETTDDEEBBUUGG(S, V)   ((void)(gtsam::guardedSetDebug(S,V))) │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +bool  ggttssaamm::::gguuaarrddeeddIIssDDeebbuugg (const std::string &s) │ │ │ │ +  │ │ │ │ +void  ggttssaamm::::gguuaarrddeeddSSeettDDeebbuugg (const std::string &s, const bool v) │ │ │ │ +  │ │ │ │ +bool  ggttssaamm::::iissDDeebbuuggVVeerrssiioonn () │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -An easy way to control which allocator is used for Fast* collections. │ │ │ │ +Global debugging flags. │ │ │ │ Author │ │ │ │ Richard Roberts │ │ │ │ Date │ │ │ │ - Aug 15, 2013 │ │ │ │ + Feb 1, 2011 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r_._h │ │ │ │ + * _d_e_b_u_g_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00137_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/FastDefaultAllocator.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/debug.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,106 +98,86 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
FastDefaultAllocator.h
│ │ │ +
debug.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
19#pragma once
│ │ │ -
20#include <gtsam/config.h> // Configuration from CMake
│ │ │ -
21
│ │ │ -
22#if !defined GTSAM_ALLOCATOR_BOOSTPOOL && !defined GTSAM_ALLOCATOR_TBB && !defined GTSAM_ALLOCATOR_STL
│ │ │ -
23# ifdef GTSAM_USE_TBB
│ │ │ -
24// Use TBB allocator by default if we have TBB, otherwise boost pool
│ │ │ -
25# define GTSAM_ALLOCATOR_TBB
│ │ │ -
26# else
│ │ │ -
27# define GTSAM_ALLOCATOR_BOOSTPOOL
│ │ │ -
28# endif
│ │ │ -
29#endif
│ │ │ -
30
│ │ │ -
31#if defined GTSAM_ALLOCATOR_BOOSTPOOL
│ │ │ -
32# include <boost/pool/pool_alloc.hpp>
│ │ │ -
33#elif defined GTSAM_ALLOCATOR_TBB
│ │ │ -
34# include <tbb/tbb_allocator.h>
│ │ │ -
35# undef min // TBB seems to include Windows.h which defines these macros that cause problems
│ │ │ -
36# undef max
│ │ │ -
37# undef ERROR
│ │ │ -
38#elif defined GTSAM_ALLOCATOR_STL
│ │ │ -
39# include <memory>
│ │ │ -
40#endif
│ │ │ -
41
│ │ │ -
42namespace gtsam
│ │ │ -
43{
│ │ │ -
44
│ │ │ -
45 namespace internal
│ │ │ -
46 {
│ │ │ -
48 template<typename T>
│ │ │ -
│ │ │ - │ │ │ -
50 {
│ │ │ -
51#if defined GTSAM_ALLOCATOR_BOOSTPOOL
│ │ │ -
52 typedef boost::fast_pool_allocator<T> type;
│ │ │ -
53 static const bool isBoost = true;
│ │ │ -
54 static const bool isTBB = false;
│ │ │ -
55 static const bool isSTL = false;
│ │ │ -
56#elif defined GTSAM_ALLOCATOR_TBB
│ │ │ -
57 typedef tbb::tbb_allocator<T> type;
│ │ │ -
58 static const bool isBoost = false;
│ │ │ -
59 static const bool isTBB = true;
│ │ │ -
60 static const bool isSTL = false;
│ │ │ -
61#elif defined GTSAM_ALLOCATOR_STL
│ │ │ -
62 typedef std::allocator<T> type;
│ │ │ -
63 static const bool isBoost = false;
│ │ │ -
64 static const bool isTBB = false;
│ │ │ -
65 static const bool isSTL = true;
│ │ │ -
66#endif
│ │ │ -
67 };
│ │ │ -
│ │ │ -
68
│ │ │ -
70 template<typename T>
│ │ │ -
│ │ │ - │ │ │ -
72 {
│ │ │ -
73#if defined GTSAM_ALLOCATOR_TBB
│ │ │ -
74 typedef tbb::tbb_allocator<T> type;
│ │ │ -
75 static const bool isBoost = false;
│ │ │ -
76 static const bool isTBB = true;
│ │ │ -
77 static const bool isSTL = false;
│ │ │ -
78#else
│ │ │ -
79 typedef std::allocator<T> type;
│ │ │ -
80 static const bool isBoost = false;
│ │ │ -
81 static const bool isTBB = false;
│ │ │ -
82 static const bool isSTL = true;
│ │ │ -
83#endif
│ │ │ -
84 };
│ │ │ -
│ │ │ -
85 }
│ │ │ -
86
│ │ │ -
87}
│ │ │ +
19#include <gtsam/base/FastMap.h>
│ │ │ + │ │ │ +
21#include <string>
│ │ │ +
22
│ │ │ +
23
│ │ │ +
24// This file defines granular debugging flags that may be switched on and off
│ │ │ +
25// at run time. Typical usage is 'if(ISDEBUG("myFunction"))' to check if the
│ │ │ +
26// 'myFunction' flag is enabled, and SETDEBUG("myFunction", true) to enable
│ │ │ +
27// this flag, or SETDEBUG("myFunction", false) to disable it.
│ │ │ +
28//
│ │ │ +
29// Debug flags are created automatically as they are accessed, so they can be
│ │ │ +
30// used immediately without explicitly creating them. Each flag defaults to
│ │ │ +
31// 'false', i.e. disabled.
│ │ │ +
32//
│ │ │ +
33// For these macro to have any effect, granular debugging must be enabled by
│ │ │ +
34// defining GTSAM_ENABLE_DEBUG. If NDEBUG is not defined, then
│ │ │ +
35// GTSAM_ENABLE_DEBUG will be automatically defined and thus granular
│ │ │ +
36// debugging enabled.
│ │ │ +
37
│ │ │ +
38#ifndef NDEBUG
│ │ │ +
39#ifndef GTSAM_ENABLE_DEBUG
│ │ │ +
40#define GTSAM_ENABLE_DEBUG
│ │ │ +
41#endif
│ │ │ +
42#endif
│ │ │ +
43
│ │ │ +
44namespace gtsam {
│ │ │ +
45 GTSAM_EXTERN_EXPORT FastMap<std::string, ValueWithDefault<bool,false> > debugFlags;
│ │ │ +
46
│ │ │ +
47 // Non-guarded use led to crashes, and solved in commit cd35db2
│ │ │ +
48 bool GTSAM_EXPORT guardedIsDebug(const std::string& s);
│ │ │ +
49 void GTSAM_EXPORT guardedSetDebug(const std::string& s, const bool v);
│ │ │ +
50
│ │ │ +
51 // function to check if compiled version has debug information
│ │ │ +
52 bool GTSAM_EXPORT isDebugVersion();
│ │ │ +
53}
│ │ │ +
54
│ │ │ +
55#undef ISDEBUG
│ │ │ +
56#undef SETDEBUG
│ │ │ +
57
│ │ │ +
58#ifdef GTSAM_ENABLE_DEBUG
│ │ │ +
59
│ │ │ +
60#define ISDEBUG(S) (gtsam::guardedIsDebug(S))
│ │ │ +
61#define SETDEBUG(S,V) ((void)(gtsam::guardedSetDebug(S,V)))
│ │ │ +
62
│ │ │ +
63#else
│ │ │ +
64
│ │ │ +
65#define ISDEBUG(S) (false)
│ │ │ +
66#define SETDEBUG(S,V) ((void)false)
│ │ │ +
67
│ │ │ +
68#endif
│ │ │ +
69
│ │ │ +
A thin wrapper around std::map that uses boost's fast_pool_allocator.
│ │ │ +
Included from all GTSAM files.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
Default allocator for list, map, and set types.
Definition FastDefaultAllocator.h:50
│ │ │ -
Default allocator for vector types (we never use boost pool for vectors)
Definition FastDefaultAllocator.h:72
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,102 +1,83 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -FastDefaultAllocator.h │ │ │ │ +debug.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -19#pragma once │ │ │ │ -20#include // Configuration from CMake │ │ │ │ -21 │ │ │ │ -22#if !defined GTSAM_ALLOCATOR_BOOSTPOOL && !defined GTSAM_ALLOCATOR_TBB && │ │ │ │ -!defined GTSAM_ALLOCATOR_STL │ │ │ │ -23# ifdef GTSAM_USE_TBB │ │ │ │ -24// Use TBB allocator by default if we have TBB, otherwise boost pool │ │ │ │ -25# define GTSAM_ALLOCATOR_TBB │ │ │ │ -26# else │ │ │ │ -27# define GTSAM_ALLOCATOR_BOOSTPOOL │ │ │ │ -28# endif │ │ │ │ -29#endif │ │ │ │ -30 │ │ │ │ -31#if defined GTSAM_ALLOCATOR_BOOSTPOOL │ │ │ │ -32# include │ │ │ │ -33#elif defined GTSAM_ALLOCATOR_TBB │ │ │ │ -34# include │ │ │ │ -35# undef min // TBB seems to include Windows.h which defines these macros that │ │ │ │ -cause problems │ │ │ │ -36# undef max │ │ │ │ -37# undef ERROR │ │ │ │ -38#elif defined GTSAM_ALLOCATOR_STL │ │ │ │ -39# include │ │ │ │ -40#endif │ │ │ │ -41 │ │ │ │ -42namespace _g_t_s_a_m │ │ │ │ -43{ │ │ │ │ -44 │ │ │ │ -45 namespace internal │ │ │ │ -46 { │ │ │ │ -48 template │ │ │ │ -_4_9 struct _F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r │ │ │ │ -50 { │ │ │ │ -51#if defined GTSAM_ALLOCATOR_BOOSTPOOL │ │ │ │ -52 typedef boost::fast_pool_allocator type; │ │ │ │ -53 static const bool isBoost = true; │ │ │ │ -54 static const bool isTBB = false; │ │ │ │ -55 static const bool isSTL = false; │ │ │ │ -56#elif defined GTSAM_ALLOCATOR_TBB │ │ │ │ -57 typedef tbb::tbb_allocator type; │ │ │ │ -58 static const bool isBoost = false; │ │ │ │ -59 static const bool isTBB = true; │ │ │ │ -60 static const bool isSTL = false; │ │ │ │ -61#elif defined GTSAM_ALLOCATOR_STL │ │ │ │ -62 typedef std::allocator type; │ │ │ │ -63 static const bool isBoost = false; │ │ │ │ -64 static const bool isTBB = false; │ │ │ │ -65 static const bool isSTL = true; │ │ │ │ -66#endif │ │ │ │ -67 }; │ │ │ │ -68 │ │ │ │ -70 template │ │ │ │ -_7_1 struct _F_a_s_t_D_e_f_a_u_l_t_V_e_c_t_o_r_A_l_l_o_c_a_t_o_r │ │ │ │ -72 { │ │ │ │ -73#if defined GTSAM_ALLOCATOR_TBB │ │ │ │ -74 typedef tbb::tbb_allocator type; │ │ │ │ -75 static const bool isBoost = false; │ │ │ │ -76 static const bool isTBB = true; │ │ │ │ -77 static const bool isSTL = false; │ │ │ │ -78#else │ │ │ │ -79 typedef std::allocator type; │ │ │ │ -80 static const bool isBoost = false; │ │ │ │ -81 static const bool isTBB = false; │ │ │ │ -82 static const bool isSTL = true; │ │ │ │ -83#endif │ │ │ │ -84 }; │ │ │ │ -85 } │ │ │ │ -86 │ │ │ │ -87} │ │ │ │ +19#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_M_a_p_._h> │ │ │ │ +20#include <_g_t_s_a_m_/_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h> │ │ │ │ +21#include │ │ │ │ +22 │ │ │ │ +23 │ │ │ │ +24// This file defines granular debugging flags that may be switched on and off │ │ │ │ +25// at run time. Typical usage is 'if(ISDEBUG("myFunction"))' to check if the │ │ │ │ +26// 'myFunction' flag is enabled, and SETDEBUG("myFunction", true) to enable │ │ │ │ +27// this flag, or SETDEBUG("myFunction", false) to disable it. │ │ │ │ +28// │ │ │ │ +29// Debug flags are created automatically as they are accessed, so they can be │ │ │ │ +30// used immediately without explicitly creating them. Each flag defaults to │ │ │ │ +31// 'false', i.e. disabled. │ │ │ │ +32// │ │ │ │ +33// For these macro to have any effect, granular debugging must be enabled by │ │ │ │ +34// defining GTSAM_ENABLE_DEBUG. If NDEBUG is not defined, then │ │ │ │ +35// GTSAM_ENABLE_DEBUG will be automatically defined and thus granular │ │ │ │ +36// debugging enabled. │ │ │ │ +37 │ │ │ │ +38#ifndef NDEBUG │ │ │ │ +39#ifndef GTSAM_ENABLE_DEBUG │ │ │ │ +40#define GTSAM_ENABLE_DEBUG │ │ │ │ +41#endif │ │ │ │ +42#endif │ │ │ │ +43 │ │ │ │ +44namespace _g_t_s_a_m { │ │ │ │ +45 GTSAM_EXTERN_EXPORT FastMap > │ │ │ │ +debugFlags; │ │ │ │ +46 │ │ │ │ +47 // Non-guarded use led to crashes, and solved in commit cd35db2 │ │ │ │ +48 bool GTSAM_EXPORT guardedIsDebug(const std::string& s); │ │ │ │ +49 void GTSAM_EXPORT guardedSetDebug(const std::string& s, const bool v); │ │ │ │ +50 │ │ │ │ +51 // function to check if compiled version has debug information │ │ │ │ +52 bool GTSAM_EXPORT isDebugVersion(); │ │ │ │ +53} │ │ │ │ +54 │ │ │ │ +55#undef ISDEBUG │ │ │ │ +56#undef SETDEBUG │ │ │ │ +57 │ │ │ │ +58#ifdef GTSAM_ENABLE_DEBUG │ │ │ │ +59 │ │ │ │ +60#define ISDEBUG(S) (gtsam::guardedIsDebug(S)) │ │ │ │ +61#define SETDEBUG(S,V) ((void)(gtsam::guardedSetDebug(S,V))) │ │ │ │ +62 │ │ │ │ +63#else │ │ │ │ +64 │ │ │ │ +65#define ISDEBUG(S) (false) │ │ │ │ +66#define SETDEBUG(S,V) ((void)false) │ │ │ │ +67 │ │ │ │ +68#endif │ │ │ │ +69 │ │ │ │ +_F_a_s_t_M_a_p_._h │ │ │ │ +A thin wrapper around std::map that uses boost's fast_pool_allocator. │ │ │ │ +_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h │ │ │ │ +Included from all GTSAM files. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r │ │ │ │ -Default allocator for list, map, and set types. │ │ │ │ -DDeeffiinniittiioonn FastDefaultAllocator.h:50 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_F_a_s_t_D_e_f_a_u_l_t_V_e_c_t_o_r_A_l_l_o_c_a_t_o_r │ │ │ │ -Default allocator for vector types (we never use boost pool for vectors) │ │ │ │ -DDeeffiinniittiioonn FastDefaultAllocator.h:72 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r_._h │ │ │ │ + * _d_e_b_u_g_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00140.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/DSFVector.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/make_shared.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,48 +94,59 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
DSFVector.h File Reference
│ │ │ +Namespaces | │ │ │ +Typedefs | │ │ │ +Functions
│ │ │ +
make_shared.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

A faster implementation for DSF, which uses vector rather than btree. │ │ │ +

make_shared trampoline function to ensure proper alignment │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  gtsam::DSFBase
 A fast implementation of disjoint set forests that uses vector as underly data structure. More...
 
class  gtsam::DSFVector
 DSFVector additionally keeps a vector of keys to support more expensive operations. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Typedefs

│ │ │ +template<bool B, class T = void>
using gtsam::enable_if_t = typename std::enable_if< B, T >::type
 An shorthand alias for accessing the ::type inside std::enable_if that can be used in a template directly.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

template<typename T , typename ... Args>
gtsam::enable_if_t< needs_eigen_aligned_allocator< T >::value, boost::shared_ptr< T > > gtsam::make_shared (Args &&... args)
 Add our own make_shared as a layer of wrapping on boost::make_shared This solves the problem with the stock make_shared that custom alignment is not respected, causing SEGFAULTs at runtime, which is notoriously hard to debug.
 
│ │ │ +template<typename T , typename ... Args>
gtsam::enable_if_t<!needs_eigen_aligned_allocator< T >::value, boost::shared_ptr< T > > gtsam::make_shared (Args &&... args)
 Fall back to the boost version if no need for alignment.
 
│ │ │

Detailed Description

│ │ │ -

A faster implementation for DSF, which uses vector rather than btree.

│ │ │ -
Date
Jun 25, 2010
│ │ │ -
Author
Kai Ni
│ │ │ +

make_shared trampoline function to ensure proper alignment

│ │ │ +
Author
Fan Jiang
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,32 +1,47 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -DSFVector.h File Reference │ │ │ │ -A faster implementation for DSF, which uses vector rather than btree. _M_o_r_e_._._. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +make_shared.h File Reference │ │ │ │ +make_shared trampoline function to ensure proper alignment _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_D_S_F_B_a_s_e │ │ │ │ -  A fast implementation of disjoint set forests that uses vector as │ │ │ │ - underly data structure. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_D_S_F_V_e_c_t_o_r │ │ │ │ -  _D_S_F_V_e_c_t_o_r additionally keeps a vector of keys to support more expensive │ │ │ │ - operations. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +template │ │ │ │ +using  ggttssaamm::::eennaabbllee__iiff__tt = typename std::enable_if< B, T >::type │ │ │ │ +  An shorthand alias for accessing the ::type inside std::enable_if that │ │ │ │ + can be used in a template directly. │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ + _g_t_s_a_m_:_:_e_n_a_b_l_e___i_f___t< │ │ │ │ + _n_e_e_d_s___e_i_g_e_n___a_l_i_g_n_e_d___a_l_l_o_c_a_t_o_r< T >::value, _g_t_s_a_m_:_:_m_a_k_e___s_h_a_r_e_d (Args &&... │ │ │ │ + boost::shared_ptr< T > >  args) │ │ │ │ + Add our own make_shared as a layer │ │ │ │ + of wrapping on boost::make_shared │ │ │ │ + This solves the problem with the │ │ │ │ +  stock make_shared that custom │ │ │ │ + alignment is not respected, causing │ │ │ │ + SEGFAULTs at runtime, which is │ │ │ │ + notoriously hard to debug. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _g_t_s_a_m_:_: │ │ │ │ +_e_n_a_b_l_e___i_f___t::value, boost::shared_ptr< T > >  args) │ │ │ │ +  Fall back to the boost version if │ │ │ │ + no need for alignment. │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A faster implementation for DSF, which uses vector rather than btree. │ │ │ │ - Date │ │ │ │ - Jun 25, 2010 │ │ │ │ +make_shared trampoline function to ensure proper alignment │ │ │ │ Author │ │ │ │ - Kai Ni │ │ │ │ + Fan Jiang │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _D_S_F_V_e_c_t_o_r_._h │ │ │ │ + * _m_a_k_e___s_h_a_r_e_d_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00140_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/DSFVector.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/make_shared.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,96 +98,68 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
DSFVector.h
│ │ │ +
make_shared.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │ -
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │ +
3 * GTSAM Copyright 2020, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
19#pragma once
│ │ │ -
20
│ │ │ -
21#include <gtsam/dllexport.h>
│ │ │ - │ │ │ +
18#pragma once
│ │ │ +
19
│ │ │ +
20#include <gtsam/base/types.h>
│ │ │ +
21
│ │ │ +
22#include <Eigen/Core>
│ │ │
23
│ │ │ -
24#include <boost/shared_ptr.hpp>
│ │ │ +
24#include <boost/make_shared.hpp>
│ │ │
25
│ │ │ -
26#include <vector>
│ │ │ -
27#include <set>
│ │ │ -
28#include <map>
│ │ │ -
29
│ │ │ -
30namespace gtsam {
│ │ │ -
31
│ │ │ -
│ │ │ -
38class GTSAM_EXPORT DSFBase {
│ │ │ -
39
│ │ │ -
40public:
│ │ │ -
41 typedef std::vector<size_t> V;
│ │ │ -
42
│ │ │ -
43private:
│ │ │ -
44 boost::shared_ptr<V> v_;
│ │ │ -
45
│ │ │ -
46public:
│ │ │ -
48 DSFBase(const size_t numNodes);
│ │ │ -
49
│ │ │ -
51 DSFBase(const boost::shared_ptr<V>& v_in);
│ │ │ -
52
│ │ │ -
54 size_t find(size_t key) const;
│ │ │ -
55
│ │ │ -
57 void merge(const size_t& i1, const size_t& i2);
│ │ │ -
58};
│ │ │ -
│ │ │ -
59
│ │ │ -
│ │ │ -
64class GTSAM_EXPORT DSFVector: public DSFBase {
│ │ │ -
65
│ │ │ -
66private:
│ │ │ -
67 std::vector<size_t> keys_;
│ │ │ -
68
│ │ │ -
69public:
│ │ │ -
71 DSFVector(const size_t numNodes);
│ │ │ -
72
│ │ │ -
74 DSFVector(const std::vector<size_t>& keys);
│ │ │ -
75
│ │ │ -
77 DSFVector(const boost::shared_ptr<V>& v_in, const std::vector<size_t>& keys);
│ │ │ -
78
│ │ │ -
79 // All operations below loop over all keys and hence are *at least* O(n)
│ │ │ -
80
│ │ │ -
82 bool isSingleton(const size_t& label) const;
│ │ │ -
83
│ │ │ -
85 std::set<size_t> set(const size_t& label) const;
│ │ │ -
86
│ │ │ -
88 std::map<size_t, std::set<size_t> > sets() const;
│ │ │ -
89
│ │ │ -
91 std::map<size_t, std::vector<size_t> > arrays() const;
│ │ │ -
92};
│ │ │ -
│ │ │ -
93
│ │ │ -
94}
│ │ │ -
Included from all GTSAM files.
│ │ │ +
26#include <type_traits>
│ │ │ +
27
│ │ │ +
28namespace gtsam {
│ │ │ +
30 template<bool B, class T = void>
│ │ │ +
31 using enable_if_t = typename std::enable_if<B, T>::type;
│ │ │ +
32}
│ │ │ +
33
│ │ │ +
34namespace gtsam {
│ │ │ +
35
│ │ │ +
56 template<typename T, typename ... Args>
│ │ │ +
│ │ │ + │ │ │ +
58 return boost::allocate_shared<T>(Eigen::aligned_allocator<T>(), std::forward<Args>(args)...);
│ │ │ +
59 }
│ │ │ +
│ │ │ +
60
│ │ │ +
62 template<typename T, typename ... Args>
│ │ │ +
│ │ │ + │ │ │ +
64 return boost::make_shared<T>(std::forward<Args>(args)...);
│ │ │ +
65 }
│ │ │ +
│ │ │ +
66
│ │ │ +
67}
│ │ │ +
Typedefs for easier changing of types.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
A fast implementation of disjoint set forests that uses vector as underly data structure.
Definition DSFVector.h:38
│ │ │ -
std::vector< size_t > V
Vector of ints.
Definition DSFVector.h:41
│ │ │ -
DSFVector additionally keeps a vector of keys to support more expensive operations.
Definition DSFVector.h:64
│ │ │ +
typename std::enable_if< B, T >::type enable_if_t
An shorthand alias for accessing the ::type inside std::enable_if that can be used in a template dire...
Definition make_shared.h:31
│ │ │ +
gtsam::enable_if_t< needs_eigen_aligned_allocator< T >::value, boost::shared_ptr< T > > make_shared(Args &&... args)
Add our own make_shared as a layer of wrapping on boost::make_shared This solves the problem with the...
Definition make_shared.h:57
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,97 +1,71 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -DSFVector.h │ │ │ │ +make_shared.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ -3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ +3 * GTSAM Copyright 2020, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -19#pragma once │ │ │ │ -20 │ │ │ │ -21#include │ │ │ │ -22#include <_g_t_s_a_m_/_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h> │ │ │ │ +18#pragma once │ │ │ │ +19 │ │ │ │ +20#include <_g_t_s_a_m_/_b_a_s_e_/_t_y_p_e_s_._h> │ │ │ │ +21 │ │ │ │ +22#include │ │ │ │ 23 │ │ │ │ -24#include │ │ │ │ +24#include │ │ │ │ 25 │ │ │ │ -26#include │ │ │ │ -27#include │ │ │ │ -28#include │ │ │ │ -29 │ │ │ │ -30namespace _g_t_s_a_m { │ │ │ │ -31 │ │ │ │ -_3_8class GTSAM_EXPORT _D_S_F_B_a_s_e { │ │ │ │ -39 │ │ │ │ -40public: │ │ │ │ -_4_1 typedef std::vector _V; │ │ │ │ -42 │ │ │ │ -43private: │ │ │ │ -44 boost::shared_ptr v_; │ │ │ │ -45 │ │ │ │ -46public: │ │ │ │ -48 _D_S_F_B_a_s_e(const size_t numNodes); │ │ │ │ -49 │ │ │ │ -51 _D_S_F_B_a_s_e(const boost::shared_ptr& v_in); │ │ │ │ -52 │ │ │ │ -54 size_t find(size_t key) const; │ │ │ │ -55 │ │ │ │ -57 void merge(const size_t& i1, const size_t& i2); │ │ │ │ -58}; │ │ │ │ -59 │ │ │ │ -_6_4class GTSAM_EXPORT _D_S_F_V_e_c_t_o_r: public _D_S_F_B_a_s_e { │ │ │ │ -65 │ │ │ │ -66private: │ │ │ │ -67 std::vector keys_; │ │ │ │ -68 │ │ │ │ -69public: │ │ │ │ -71 _D_S_F_V_e_c_t_o_r(const size_t numNodes); │ │ │ │ -72 │ │ │ │ -74 _D_S_F_V_e_c_t_o_r(const std::vector& keys); │ │ │ │ -75 │ │ │ │ -77 _D_S_F_V_e_c_t_o_r(const boost::shared_ptr& v_in, const std::vector& │ │ │ │ -keys); │ │ │ │ -78 │ │ │ │ -79 // All operations below loop over all keys and hence are *at least* O(n) │ │ │ │ -80 │ │ │ │ -82 bool isSingleton(const size_t& label) const; │ │ │ │ -83 │ │ │ │ -85 std::set set(const size_t& label) const; │ │ │ │ -86 │ │ │ │ -88 std::map > sets() const; │ │ │ │ -89 │ │ │ │ -91 std::map > arrays() const; │ │ │ │ -92}; │ │ │ │ -93 │ │ │ │ -94} │ │ │ │ -_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h │ │ │ │ -Included from all GTSAM files. │ │ │ │ +26#include │ │ │ │ +27 │ │ │ │ +28namespace _g_t_s_a_m { │ │ │ │ +30 template │ │ │ │ +_3_1 using _e_n_a_b_l_e___i_f___t = typename std::enable_if::type; │ │ │ │ +32} │ │ │ │ +33 │ │ │ │ +34namespace _g_t_s_a_m { │ │ │ │ +35 │ │ │ │ +56 template │ │ │ │ +_5_7 _g_t_s_a_m_:_:_e_n_a_b_l_e___i_f___t_<_n_e_e_d_s___e_i_g_e_n___a_l_i_g_n_e_d___a_l_l_o_c_a_t_o_r_<_T_>_:_:_v_a_l_u_e, boost:: │ │ │ │ +shared_ptr> _m_a_k_e___s_h_a_r_e_d(Args &&... args) { │ │ │ │ +58 return boost::allocate_shared(Eigen::aligned_allocator(), std:: │ │ │ │ +forward(args)...); │ │ │ │ +59 } │ │ │ │ +60 │ │ │ │ +62 template │ │ │ │ +_6_3 _g_t_s_a_m_:_:_e_n_a_b_l_e___i_f___t_<_!_n_e_e_d_s___e_i_g_e_n___a_l_i_g_n_e_d___a_l_l_o_c_a_t_o_r_<_T_>_:_:_v_a_l_u_e, boost:: │ │ │ │ +shared_ptr> _m_a_k_e___s_h_a_r_e_d(Args &&... args) { │ │ │ │ +64 return boost::make_shared(std::forward(args)...); │ │ │ │ +65 } │ │ │ │ +66 │ │ │ │ +67} │ │ │ │ +_t_y_p_e_s_._h │ │ │ │ +Typedefs for easier changing of types. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_D_S_F_B_a_s_e │ │ │ │ -A fast implementation of disjoint set forests that uses vector as underly data │ │ │ │ -structure. │ │ │ │ -DDeeffiinniittiioonn DSFVector.h:38 │ │ │ │ -_g_t_s_a_m_:_:_D_S_F_B_a_s_e_:_:_V │ │ │ │ -std::vector< size_t > V │ │ │ │ -Vector of ints. │ │ │ │ -DDeeffiinniittiioonn DSFVector.h:41 │ │ │ │ -_g_t_s_a_m_:_:_D_S_F_V_e_c_t_o_r │ │ │ │ -DSFVector additionally keeps a vector of keys to support more expensive │ │ │ │ -operations. │ │ │ │ -DDeeffiinniittiioonn DSFVector.h:64 │ │ │ │ +_g_t_s_a_m_:_:_e_n_a_b_l_e___i_f___t │ │ │ │ +typename std::enable_if< B, T >::type enable_if_t │ │ │ │ +An shorthand alias for accessing the ::type inside std::enable_if that can be │ │ │ │ +used in a template dire... │ │ │ │ +DDeeffiinniittiioonn make_shared.h:31 │ │ │ │ +_g_t_s_a_m_:_:_m_a_k_e___s_h_a_r_e_d │ │ │ │ +gtsam::enable_if_t< needs_eigen_aligned_allocator< T >::value, boost:: │ │ │ │ +shared_ptr< T > > make_shared(Args &&... args) │ │ │ │ +Add our own make_shared as a layer of wrapping on boost::make_shared This │ │ │ │ +solves the problem with the... │ │ │ │ +DDeeffiinniittiioonn make_shared.h:57 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _D_S_F_V_e_c_t_o_r_._h │ │ │ │ + * _m_a_k_e___s_h_a_r_e_d_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00143.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/DSFVector.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/FastSet.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,36 +94,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces
│ │ │ -
DSFVector.cpp File Reference
│ │ │ +
FastSet.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

a faster implementation for DSF, which uses vector rather than btree. │ │ │ +

A thin wrapper around std::set that uses boost's fast_pool_allocator. │ │ │ More...

│ │ │ + │ │ │ +

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

class  gtsam::FastSet< VALUE >
 FastSet is a thin wrapper around std::set that uses the boost fast_pool_allocator instead of the default STL allocator. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │

Detailed Description

│ │ │ -

a faster implementation for DSF, which uses vector rather than btree.

│ │ │ -
Date
Jun 25, 2010
│ │ │ -
Author
Kai Ni
│ │ │ +

A thin wrapper around std::set that uses boost's fast_pool_allocator.

│ │ │ +
Author
Richard Roberts
│ │ │ +
Date
Oct 17, 2010
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,22 +1,28 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -DSFVector.cpp File Reference │ │ │ │ -a faster implementation for DSF, which uses vector rather than btree. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +FastSet.h File Reference │ │ │ │ +A thin wrapper around std::set that uses boost's fast_pool_allocator. _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +class   _g_t_s_a_m_:_:_F_a_s_t_S_e_t_<_ _V_A_L_U_E_ _> │ │ │ │ +  _F_a_s_t_S_e_t is a thin wrapper around std::set that uses the boost │ │ │ │ + fast_pool_allocator instead of the default STL allocator. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -a faster implementation for DSF, which uses vector rather than btree. │ │ │ │ - Date │ │ │ │ - Jun 25, 2010 │ │ │ │ +A thin wrapper around std::set that uses boost's fast_pool_allocator. │ │ │ │ Author │ │ │ │ - Kai Ni │ │ │ │ + Richard Roberts │ │ │ │ + Date │ │ │ │ + Oct 17, 2010 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _D_S_F_V_e_c_t_o_r_._c_p_p │ │ │ │ + * _F_a_s_t_S_e_t_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00146.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/DSFMap.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/FastVector.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,74 +94,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Typedefs | │ │ │ -Functions
│ │ │ -
DSFMap.h File Reference
│ │ │ +Typedefs
│ │ │ +
FastVector.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Allow for arbitrary type in DSF. │ │ │ +

A thin wrapper around std::vector that uses a custom allocator. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  gtsam::DSFMap< KEY >
 Disjoint set forest using an STL map data structure underneath Uses rank compression and union by rank, iterator version. More...
 
struct  gtsam::DSFMap< KEY >::Entry
 We store the forest in an STL map, but parents are done with pointers. More...
 
class  gtsam::IndexPair
 Small utility class for representing a wrappable pairs of ints. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ Typedefs

│ │ │ -typedef std::vector< IndexPairgtsam::IndexPairVector
 
│ │ │ -typedef std::set< IndexPairgtsam::IndexPairSet
 
│ │ │ -typedef std::map< IndexPair, IndexPairSet > gtsam::IndexPairSetMap
 
│ │ │ -typedef DSFMap< IndexPairgtsam::DSFMapIndexPair
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ -Functions

│ │ │ -IndexPairVector gtsam::IndexPairSetAsArray (IndexPairSet &set)
 
template<typename T >
using gtsam::FastVector = std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type >
 FastVector is a type alias to a std::vector with a custom memory allocator.
 
│ │ │

Detailed Description

│ │ │ -

Allow for arbitrary type in DSF.

│ │ │ -
Date
Oct 26, 2013
│ │ │ -
Author
Frank Dellaert
│ │ │ +

A thin wrapper around std::vector that uses a custom allocator.

│ │ │ +
Author
Richard Roberts
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +
Date
Feb 9, 2011
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,48 +1,31 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -DSFMap.h File Reference │ │ │ │ -Allow for arbitrary type in DSF. _M_o_r_e_._._. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ +FastVector.h File Reference │ │ │ │ +A thin wrapper around std::vector that uses a custom allocator. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_D_S_F_M_a_p_<_ _K_E_Y_ _> │ │ │ │ -  Disjoint set forest using an STL map data structure underneath Uses │ │ │ │ - rank compression and union by rank, iterator version. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_D_S_F_M_a_p_<_ _K_E_Y_ _>_:_:_E_n_t_r_y │ │ │ │ -  We store the forest in an STL map, but parents are done with pointers. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ - class   _g_t_s_a_m_:_:_I_n_d_e_x_P_a_i_r │ │ │ │ -  Small utility class for representing a wrappable pairs of ints. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ TTyyppeeddeeffss │ │ │ │ - typedef std::vector< _I_n_d_e_x_P_a_i_r >  ggttssaamm::::IInnddeexxPPaaiirrVVeeccttoorr │ │ │ │ -  │ │ │ │ - typedef std::set< _I_n_d_e_x_P_a_i_r >  ggttssaamm::::IInnddeexxPPaaiirrSSeett │ │ │ │ -  │ │ │ │ -typedef std::map< _I_n_d_e_x_P_a_i_r, IndexPairSet >  ggttssaamm::::IInnddeexxPPaaiirrSSeettMMaapp │ │ │ │ -  │ │ │ │ - typedef _D_S_F_M_a_p< _I_n_d_e_x_P_a_i_r >  ggttssaamm::::DDSSFFMMaappIInnddeexxPPaaiirr │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -IndexPairVector  ggttssaamm::::IInnddeexxPPaaiirrSSeettAAssAArrrraayy (IndexPairSet &set) │ │ │ │ +template │ │ │ │ +using  _g_t_s_a_m_:_:_F_a_s_t_V_e_c_t_o_r = std::vector< T, typename _i_n_t_e_r_n_a_l_:_: │ │ │ │ + _F_a_s_t_D_e_f_a_u_l_t_V_e_c_t_o_r_A_l_l_o_c_a_t_o_r< T >::type > │ │ │ │ +  FastVector is a type alias to a std::vector with a custom memory │ │ │ │ + allocator. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Allow for arbitrary type in DSF. │ │ │ │ - Date │ │ │ │ - Oct 26, 2013 │ │ │ │ +A thin wrapper around std::vector that uses a custom allocator. │ │ │ │ Author │ │ │ │ + Richard Roberts │ │ │ │ Frank Dellaert │ │ │ │ + Date │ │ │ │ + Feb 9, 2011 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _D_S_F_M_a_p_._h │ │ │ │ + * _F_a_s_t_V_e_c_t_o_r_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00146.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ var a00146 = [ │ │ │ │ - ["gtsam::DSFMap< KEY >::Entry", "a02288.html", null], │ │ │ │ - ["gtsam::IndexPair", "a02292.html", null] │ │ │ │ + ["FastVector", "a00146.html#gafeaa7d82369f3ff952157586240273c8", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00146_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/DSFMap.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/FastVector.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,161 +98,47 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
DSFMap.h
│ │ │ +
FastVector.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
19#pragma once
│ │ │ -
20
│ │ │ -
21#include <cstdlib> // Provides size_t
│ │ │ -
22#include <map>
│ │ │ -
23#include <set>
│ │ │ -
24#include <vector>
│ │ │ -
25
│ │ │ -
26namespace gtsam {
│ │ │ -
27
│ │ │ -
33template <class KEY>
│ │ │ -
│ │ │ -
34class DSFMap {
│ │ │ -
35 protected:
│ │ │ -
│ │ │ -
37 struct Entry {
│ │ │ -
38 typename std::map<KEY, Entry>::iterator parent_;
│ │ │ -
39 size_t rank_;
│ │ │ -
40 Entry() {}
│ │ │ -
41 };
│ │ │ -
│ │ │ -
42
│ │ │ -
43 typedef typename std::map<KEY, Entry> Map;
│ │ │ -
44 typedef typename Map::iterator iterator;
│ │ │ -
45 mutable Map entries_;
│ │ │ -
46
│ │ │ -
│ │ │ -
48 iterator find__(const KEY& key) const {
│ │ │ -
49 static const Entry empty;
│ │ │ -
50 iterator it = entries_.find(key);
│ │ │ -
51 // if key does not exist, create and return itself
│ │ │ -
52 if (it == entries_.end()) {
│ │ │ -
53 it = entries_.insert(std::make_pair(key, empty)).first;
│ │ │ -
54 it->second.parent_ = it;
│ │ │ -
55 it->second.rank_ = 0;
│ │ │ -
56 }
│ │ │ -
57 return it;
│ │ │ -
58 }
│ │ │ -
│ │ │ -
59
│ │ │ -
│ │ │ -
61 iterator find_(const iterator& it) const {
│ │ │ -
62 // follow parent pointers until we reach set representative
│ │ │ -
63 iterator& parent = it->second.parent_;
│ │ │ -
64 if (parent != it) parent = find_(parent); // not yet, recurse!
│ │ │ -
65 return parent;
│ │ │ -
66 }
│ │ │ -
│ │ │ -
67
│ │ │ -
│ │ │ -
69 inline iterator find_(const KEY& key) const {
│ │ │ -
70 iterator initial = find__(key);
│ │ │ -
71 return find_(initial);
│ │ │ -
72 }
│ │ │ -
│ │ │ -
73
│ │ │ -
74 public:
│ │ │ -
75 typedef std::set<KEY> Set;
│ │ │ -
76
│ │ │ -
78 DSFMap() {}
│ │ │ -
79
│ │ │ -
│ │ │ -
81 inline KEY find(const KEY& key) const {
│ │ │ -
82 iterator root = find_(key);
│ │ │ -
83 return root->first;
│ │ │ -
84 }
│ │ │ -
│ │ │ -
85
│ │ │ -
│ │ │ -
87 void merge(const KEY& x, const KEY& y) {
│ │ │ -
88 // straight from http://en.wikipedia.org/wiki/Disjoint-set_data_structure
│ │ │ -
89 iterator xRoot = find_(x);
│ │ │ -
90 iterator yRoot = find_(y);
│ │ │ -
91 if (xRoot == yRoot) return;
│ │ │ -
92
│ │ │ -
93 // Merge sets
│ │ │ -
94 if (xRoot->second.rank_ < yRoot->second.rank_)
│ │ │ -
95 xRoot->second.parent_ = yRoot;
│ │ │ -
96 else if (xRoot->second.rank_ > yRoot->second.rank_)
│ │ │ -
97 yRoot->second.parent_ = xRoot;
│ │ │ -
98 else {
│ │ │ -
99 yRoot->second.parent_ = xRoot;
│ │ │ -
100 xRoot->second.rank_ = xRoot->second.rank_ + 1;
│ │ │ -
101 }
│ │ │ -
102 }
│ │ │ -
│ │ │ -
103
│ │ │ -
│ │ │ -
105 std::map<KEY, Set> sets() const {
│ │ │ -
106 std::map<KEY, Set> sets;
│ │ │ -
107 iterator it = entries_.begin();
│ │ │ -
108 for (; it != entries_.end(); it++) {
│ │ │ -
109 iterator root = find_(it);
│ │ │ -
110 sets[root->first].insert(it->first);
│ │ │ -
111 }
│ │ │ -
112 return sets;
│ │ │ -
113 }
│ │ │ -
│ │ │ -
114};
│ │ │ -
│ │ │ -
115
│ │ │ -
│ │ │ -
117class IndexPair : public std::pair<size_t,size_t> {
│ │ │ -
118 public:
│ │ │ -
119 inline IndexPair(): std::pair<size_t,size_t>(0,0) {}
│ │ │ -
120 inline IndexPair(size_t i, size_t j) : std::pair<size_t,size_t>(i,j) {}
│ │ │ -
121 inline size_t i() const { return first; };
│ │ │ -
122 inline size_t j() const { return second; };
│ │ │ -
123};
│ │ │ -
│ │ │ -
124
│ │ │ -
125typedef std::vector<IndexPair> IndexPairVector;
│ │ │ -
126typedef std::set<IndexPair> IndexPairSet;
│ │ │ -
127
│ │ │ -
128inline IndexPairVector IndexPairSetAsArray(IndexPairSet& set) { return IndexPairVector(set.begin(), set.end()); }
│ │ │ -
129
│ │ │ -
130typedef std::map<IndexPair, IndexPairSet> IndexPairSetMap;
│ │ │ -
131typedef DSFMap<IndexPair> DSFMapIndexPair;
│ │ │ -
132} // namespace gtsam
│ │ │ +
20#pragma once
│ │ │ +
21
│ │ │ + │ │ │ +
23#include <vector>
│ │ │ +
24
│ │ │ +
25namespace gtsam {
│ │ │ +
26
│ │ │ +
32template <typename T>
│ │ │ + │ │ │ +
34 std::vector<T, typename internal::FastDefaultVectorAllocator<T>::type>;
│ │ │ +
35
│ │ │ +
36} // namespace gtsam
│ │ │ +
An easy way to control which allocator is used for Fast* collections.
│ │ │ +
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
FastVector is a type alias to a std::vector with a custom memory allocator.
Definition FastVector.h:34
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
Disjoint set forest using an STL map data structure underneath Uses rank compression and union by ran...
Definition DSFMap.h:34
│ │ │ -
iterator find__(const KEY &key) const
Given key, find iterator to initial entry.
Definition DSFMap.h:48
│ │ │ -
iterator find_(const iterator &it) const
Given iterator to initial entry, find the root Entry.
Definition DSFMap.h:61
│ │ │ -
iterator find_(const KEY &key) const
Given key, find the root Entry.
Definition DSFMap.h:69
│ │ │ -
std::map< KEY, Set > sets() const
return all sets, i.e. a partition of all elements
Definition DSFMap.h:105
│ │ │ -
DSFMap()
constructor
Definition DSFMap.h:78
│ │ │ -
KEY find(const KEY &key) const
Given key, find the representative key for the set in which it lives.
Definition DSFMap.h:81
│ │ │ -
void merge(const KEY &x, const KEY &y)
Merge two sets.
Definition DSFMap.h:87
│ │ │ -
We store the forest in an STL map, but parents are done with pointers.
Definition DSFMap.h:37
│ │ │ -
Small utility class for representing a wrappable pairs of ints.
Definition DSFMap.h:117
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,166 +1,46 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -DSFMap.h │ │ │ │ +FastVector.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -19#pragma once │ │ │ │ -20 │ │ │ │ -21#include // Provides size_t │ │ │ │ -22#include │ │ │ │ -23#include │ │ │ │ -24#include │ │ │ │ -25 │ │ │ │ -26namespace _g_t_s_a_m { │ │ │ │ -27 │ │ │ │ -33template │ │ │ │ -_3_4class _D_S_F_M_a_p { │ │ │ │ -35 protected: │ │ │ │ -_3_7 struct _E_n_t_r_y { │ │ │ │ -38 typename std::map::iterator parent_; │ │ │ │ -39 size_t rank_; │ │ │ │ -40 _E_n_t_r_y() {} │ │ │ │ -41 }; │ │ │ │ -42 │ │ │ │ -43 typedef typename std::map Map; │ │ │ │ -44 typedef typename Map::iterator iterator; │ │ │ │ -45 mutable Map entries_; │ │ │ │ -46 │ │ │ │ -_4_8 iterator _f_i_n_d____(const KEY& key) const { │ │ │ │ -49 static const _E_n_t_r_y empty; │ │ │ │ -50 iterator it = entries_.find(key); │ │ │ │ -51 // if key does not exist, create and return itself │ │ │ │ -52 if (it == entries_.end()) { │ │ │ │ -53 it = entries_.insert(std::make_pair(key, empty)).first; │ │ │ │ -54 it->second.parent_ = it; │ │ │ │ -55 it->second.rank_ = 0; │ │ │ │ -56 } │ │ │ │ -57 return it; │ │ │ │ -58 } │ │ │ │ -59 │ │ │ │ -_6_1 iterator _f_i_n_d__(const iterator& it) const { │ │ │ │ -62 // follow parent pointers until we reach set representative │ │ │ │ -63 iterator& parent = it->second.parent_; │ │ │ │ -64 if (parent != it) parent = _f_i_n_d__(parent); // not yet, recurse! │ │ │ │ -65 return parent; │ │ │ │ -66 } │ │ │ │ -67 │ │ │ │ -_6_9 inline iterator _f_i_n_d__(const KEY& key) const { │ │ │ │ -70 iterator initial = _f_i_n_d____(key); │ │ │ │ -71 return _f_i_n_d__(initial); │ │ │ │ -72 } │ │ │ │ -73 │ │ │ │ -74 public: │ │ │ │ -75 typedef std::set Set; │ │ │ │ -76 │ │ │ │ -_7_8 _D_S_F_M_a_p() {} │ │ │ │ -79 │ │ │ │ -_8_1 inline KEY _f_i_n_d(const KEY& key) const { │ │ │ │ -82 iterator root = _f_i_n_d__(key); │ │ │ │ -83 return root->first; │ │ │ │ -84 } │ │ │ │ -85 │ │ │ │ -_8_7 void _m_e_r_g_e(const KEY& x, const KEY& y) { │ │ │ │ -88 // straight from http://en.wikipedia.org/wiki/Disjoint-set_data_structure │ │ │ │ -89 iterator xRoot = _f_i_n_d__(x); │ │ │ │ -90 iterator yRoot = _f_i_n_d__(y); │ │ │ │ -91 if (xRoot == yRoot) return; │ │ │ │ -92 │ │ │ │ -93 // Merge sets │ │ │ │ -94 if (xRoot->second.rank_ < yRoot->second.rank_) │ │ │ │ -95 xRoot->second.parent_ = yRoot; │ │ │ │ -96 else if (xRoot->second.rank_ > yRoot->second.rank_) │ │ │ │ -97 yRoot->second.parent_ = xRoot; │ │ │ │ -98 else { │ │ │ │ -99 yRoot->second.parent_ = xRoot; │ │ │ │ -100 xRoot->second.rank_ = xRoot->second.rank_ + 1; │ │ │ │ -101 } │ │ │ │ -102 } │ │ │ │ -103 │ │ │ │ -_1_0_5 std::map _s_e_t_s() const { │ │ │ │ -106 std::map _s_e_t_s; │ │ │ │ -107 iterator it = entries_.begin(); │ │ │ │ -108 for (; it != entries_.end(); it++) { │ │ │ │ -109 iterator root = _f_i_n_d__(it); │ │ │ │ -110 _s_e_t_s[root->first].insert(it->first); │ │ │ │ -111 } │ │ │ │ -112 return _s_e_t_s; │ │ │ │ -113 } │ │ │ │ -114}; │ │ │ │ -115 │ │ │ │ -_1_1_7class _I_n_d_e_x_P_a_i_r : public std::pair { │ │ │ │ -118 public: │ │ │ │ -119 inline _I_n_d_e_x_P_a_i_r(): std::pair(0,0) {} │ │ │ │ -120 inline _I_n_d_e_x_P_a_i_r(size_t i, size_t j) : std::pair(i,j) {} │ │ │ │ -121 inline size_t i() const { return first; }; │ │ │ │ -122 inline size_t j() const { return second; }; │ │ │ │ -123}; │ │ │ │ -124 │ │ │ │ -125typedef std::vector IndexPairVector; │ │ │ │ -126typedef std::set IndexPairSet; │ │ │ │ -127 │ │ │ │ -128inline IndexPairVector IndexPairSetAsArray(IndexPairSet& set) { return │ │ │ │ -IndexPairVector(set.begin(), set.end()); } │ │ │ │ -129 │ │ │ │ -130typedef std::map IndexPairSetMap; │ │ │ │ -131typedef DSFMap DSFMapIndexPair; │ │ │ │ -132} // namespace gtsam │ │ │ │ +20#pragma once │ │ │ │ +21 │ │ │ │ +22#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r_._h> │ │ │ │ +23#include │ │ │ │ +24 │ │ │ │ +25namespace _g_t_s_a_m { │ │ │ │ +26 │ │ │ │ +32template │ │ │ │ +_3_3using _F_a_s_t_V_e_c_t_o_r = │ │ │ │ +34 std::vector::type>; │ │ │ │ +35 │ │ │ │ +36} // namespace gtsam │ │ │ │ +_F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r_._h │ │ │ │ +An easy way to control which allocator is used for Fast* collections. │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_V_e_c_t_o_r │ │ │ │ +std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > │ │ │ │ +FastVector │ │ │ │ +FastVector is a type alias to a std::vector with a custom memory allocator. │ │ │ │ +DDeeffiinniittiioonn FastVector.h:34 │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_D_S_F_M_a_p │ │ │ │ -Disjoint set forest using an STL map data structure underneath Uses rank │ │ │ │ -compression and union by ran... │ │ │ │ -DDeeffiinniittiioonn DSFMap.h:34 │ │ │ │ -_g_t_s_a_m_:_:_D_S_F_M_a_p_:_:_f_i_n_d____ │ │ │ │ -iterator find__(const KEY &key) const │ │ │ │ -Given key, find iterator to initial entry. │ │ │ │ -DDeeffiinniittiioonn DSFMap.h:48 │ │ │ │ -_g_t_s_a_m_:_:_D_S_F_M_a_p_:_:_f_i_n_d__ │ │ │ │ -iterator find_(const iterator &it) const │ │ │ │ -Given iterator to initial entry, find the root Entry. │ │ │ │ -DDeeffiinniittiioonn DSFMap.h:61 │ │ │ │ -_g_t_s_a_m_:_:_D_S_F_M_a_p_:_:_f_i_n_d__ │ │ │ │ -iterator find_(const KEY &key) const │ │ │ │ -Given key, find the root Entry. │ │ │ │ -DDeeffiinniittiioonn DSFMap.h:69 │ │ │ │ -_g_t_s_a_m_:_:_D_S_F_M_a_p_:_:_s_e_t_s │ │ │ │ -std::map< KEY, Set > sets() const │ │ │ │ -return all sets, i.e. a partition of all elements │ │ │ │ -DDeeffiinniittiioonn DSFMap.h:105 │ │ │ │ -_g_t_s_a_m_:_:_D_S_F_M_a_p_:_:_D_S_F_M_a_p │ │ │ │ -DSFMap() │ │ │ │ -constructor │ │ │ │ -DDeeffiinniittiioonn DSFMap.h:78 │ │ │ │ -_g_t_s_a_m_:_:_D_S_F_M_a_p_:_:_f_i_n_d │ │ │ │ -KEY find(const KEY &key) const │ │ │ │ -Given key, find the representative key for the set in which it lives. │ │ │ │ -DDeeffiinniittiioonn DSFMap.h:81 │ │ │ │ -_g_t_s_a_m_:_:_D_S_F_M_a_p_:_:_m_e_r_g_e │ │ │ │ -void merge(const KEY &x, const KEY &y) │ │ │ │ -Merge two sets. │ │ │ │ -DDeeffiinniittiioonn DSFMap.h:87 │ │ │ │ -_g_t_s_a_m_:_:_D_S_F_M_a_p_:_:_E_n_t_r_y │ │ │ │ -We store the forest in an STL map, but parents are done with pointers. │ │ │ │ -DDeeffiinniittiioonn DSFMap.h:37 │ │ │ │ -_g_t_s_a_m_:_:_I_n_d_e_x_P_a_i_r │ │ │ │ -Small utility class for representing a wrappable pairs of ints. │ │ │ │ -DDeeffiinniittiioonn DSFMap.h:117 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _D_S_F_M_a_p_._h │ │ │ │ + * _F_a_s_t_V_e_c_t_o_r_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00152.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/ParameterMatrix.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Basis.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,53 +96,82 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ +Typedefs | │ │ │ Functions
│ │ │ -
ParameterMatrix.h File Reference
│ │ │ +
Basis.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Define ParameterMatrix class which is used to store values at interpolation points. │ │ │ +

Compute an interpolating basis. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │

│ │ │ Classes

class  gtsam::ParameterMatrix< M >
 A matrix abstraction of MxN values at the Basis points. More...
class  gtsam::Basis< DERIVED >
 CRTP Base class for function bases. More...
 
struct  gtsam::traits< ParameterMatrix< M > >
class  gtsam::Basis< DERIVED >::EvaluationFunctor
 An instance of an EvaluationFunctor calculates f(x;p) at a given x, applied to Parameters p. More...
 
class  gtsam::Basis< DERIVED >::VectorEvaluationFunctor< M >
 VectorEvaluationFunctor at a given x, applied to ParameterMatrix<M>. More...
 
class  gtsam::Basis< DERIVED >::VectorComponentFunctor< M >
 Given a M*N Matrix of M-vectors at N polynomial points, an instance of VectorComponentFunctor computes the N-vector value for a specific row component of the M-vectors at all the polynomial points. More...
 
class  gtsam::Basis< DERIVED >::ManifoldEvaluationFunctor< T >
 Manifold EvaluationFunctor at a given x, applied to ParameterMatrix<M>. More...
 
class  gtsam::Basis< DERIVED >::DerivativeFunctorBase
 Base class for functors below that calculate derivative weights. More...
 
class  gtsam::Basis< DERIVED >::DerivativeFunctor
 An instance of a DerivativeFunctor calculates f'(x;p) at a given x, applied to Parameters p. More...
 
class  gtsam::Basis< DERIVED >::VectorDerivativeFunctor< M >
 VectorDerivativeFunctor at a given x, applied to ParameterMatrix<M>. More...
 
class  gtsam::Basis< DERIVED >::ComponentDerivativeFunctor< M >
 Given a M*N Matrix of M-vectors at N polynomial points, an instance of ComponentDerivativeFunctor computes the N-vector derivative for a specific row component of the M-vectors at all the polynomial points. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Typedefs

│ │ │ +using gtsam::Weights = Eigen::Matrix< double, 1, -1 >
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

│ │ │ -template<int M>
std::ostream & gtsam::operator<< (std::ostream &os, const ParameterMatrix< M > &parameterMatrix)
 
template<size_t M>
Matrix gtsam::kroneckerProductIdentity (const Weights &w)
 Function for computing the kronecker product of the 1*N Weight vector w with the MxM identity matrix I efficiently.
 
│ │ │

Detailed Description

│ │ │ -

Define ParameterMatrix class which is used to store values at interpolation points.

│ │ │ -
Author
Varun Agrawal, Frank Dellaert
│ │ │ -
Date
September 21, 2020
│ │ │ +

Compute an interpolating basis.

│ │ │ +
Author
Varun Agrawal, Jing Dong, Frank Dellaert
│ │ │ +
Date
July 4, 2020
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,36 +1,71 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -ParameterMatrix.h File Reference │ │ │ │ -Define ParameterMatrix class which is used to store values at interpolation │ │ │ │ -points. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Basis.h File Reference │ │ │ │ +Compute an interpolating basis. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_ _M_ _> │ │ │ │ -  A matrix abstraction of MxN values at the _B_a_s_i_s points. _M_o_r_e_._._. │ │ │ │ +class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _> │ │ │ │ +  CRTP Base class for function bases. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_ _M_ _>_ _> │ │ │ │ +class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _>_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ +  An instance of an _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r calculates f(x;p) at a given x, │ │ │ │ + applied to Parameters p. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _>_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_<_ _M_ _> │ │ │ │ +  _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r at a given x, applied to ParameterMatrix. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _>_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r_<_ _M_ _> │ │ │ │ + Given a M*N Matrix of M-vectors at N polynomial points, an instance of │ │ │ │ +  _V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r computes the N-vector value for a specific row │ │ │ │ + component of the M-vectors at all the polynomial points. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _>_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_<_ _T_ _> │ │ │ │ +  Manifold _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r at a given x, applied to ParameterMatrix. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _>_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e │ │ │ │ +  Base class for functors below that calculate derivative weights. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _>_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ +  An instance of a _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r calculates f'(x;p) at a given x, │ │ │ │ + applied to Parameters p. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _>_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_<_ _M_ _> │ │ │ │ +  _V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r at a given x, applied to ParameterMatrix. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _>_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_<_ _M_ _> │ │ │ │ + Given a M*N Matrix of M-vectors at N polynomial points, an instance of │ │ │ │ +  _C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r computes the N-vector derivative for a │ │ │ │ + specific row component of the M-vectors at all the polynomial points. │ │ │ │ + _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +using  ggttssaamm::::WWeeiigghhttss = Eigen::Matrix< double, 1, -1 > │ │ │ │ +  │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x< M > │ │ │ │ - ¶meterMatrix) │ │ │ │ +template │ │ │ │ +Matrix  _g_t_s_a_m_:_:_k_r_o_n_e_c_k_e_r_P_r_o_d_u_c_t_I_d_e_n_t_i_t_y (const Weights &w) │ │ │ │ +  Function for computing the kronecker product of the 1*N Weight vector w │ │ │ │ + with the MxM identity matrix I efficiently. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Define ParameterMatrix class which is used to store values at interpolation │ │ │ │ -points. │ │ │ │ +Compute an interpolating basis. │ │ │ │ Author │ │ │ │ - Varun Agrawal, Frank Dellaert │ │ │ │ + Varun Agrawal, Jing Dong, Frank Dellaert │ │ │ │ Date │ │ │ │ - September 21, 2020 │ │ │ │ + July 4, 2020 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_i_s │ │ │ │ - * _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_._h │ │ │ │ + * _B_a_s_i_s_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00152.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,11 @@ │ │ │ │ var a00152 = [ │ │ │ │ - ["gtsam::ParameterMatrix< M >", "a02752.html", "a02752"], │ │ │ │ - ["gtsam::traits< ParameterMatrix< M > >", "a02756.html", null] │ │ │ │ + ["gtsam::Basis< DERIVED >::EvaluationFunctor", "a02672.html", "a02672"], │ │ │ │ + ["gtsam::Basis< DERIVED >::VectorEvaluationFunctor< M >", "a02676.html", "a02676"], │ │ │ │ + ["gtsam::Basis< DERIVED >::VectorComponentFunctor< M >", "a02680.html", "a02680"], │ │ │ │ + ["gtsam::Basis< DERIVED >::ManifoldEvaluationFunctor< T >", "a02684.html", "a02684"], │ │ │ │ + ["gtsam::Basis< DERIVED >::DerivativeFunctorBase", "a02688.html", "a02688"], │ │ │ │ + ["gtsam::Basis< DERIVED >::DerivativeFunctor", "a02692.html", "a02692"], │ │ │ │ + ["gtsam::Basis< DERIVED >::VectorDerivativeFunctor< M >", "a02696.html", "a02696"], │ │ │ │ + ["gtsam::Basis< DERIVED >::ComponentDerivativeFunctor< M >", "a02700.html", "a02700"], │ │ │ │ + ["kroneckerProductIdentity", "a00152.html#ga2ce44d31cae1eda44c2a86d32d92b935", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00152_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/ParameterMatrix.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Basis.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,208 +98,473 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
ParameterMatrix.h
│ │ │ +
Basis.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
20#pragma once
│ │ │ -
21
│ │ │ -
22#include <gtsam/base/Matrix.h>
│ │ │ -
23#include <gtsam/base/Testable.h>
│ │ │ -
24#include <gtsam/base/VectorSpace.h>
│ │ │ -
25
│ │ │ -
26#include <iostream>
│ │ │ -
27
│ │ │ -
28namespace gtsam {
│ │ │ -
29
│ │ │ -
37template <int M>
│ │ │ -
│ │ │ - │ │ │ -
39 using MatrixType = Eigen::Matrix<double, M, -1>;
│ │ │ -
40
│ │ │ -
41 private:
│ │ │ -
42 MatrixType matrix_;
│ │ │ -
43
│ │ │ -
44 public:
│ │ │ -
45 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
│ │ │ -
46
│ │ │ -
47 enum { dimension = Eigen::Dynamic };
│ │ │ -
48
│ │ │ -
53 ParameterMatrix(const size_t N) : matrix_(M, N) { matrix_.setZero(); }
│ │ │ -
54
│ │ │ -
59 ParameterMatrix(const MatrixType& matrix) : matrix_(matrix) {}
│ │ │ -
60
│ │ │ -
62 size_t rows() const { return matrix_.rows(); }
│ │ │ -
63
│ │ │ -
65 size_t cols() const { return matrix_.cols(); }
│ │ │ -
66
│ │ │ -
68 MatrixType matrix() const { return matrix_; }
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ +
21#include <gtsam/base/Matrix.h>
│ │ │ + │ │ │ + │ │ │ +
24
│ │ │ +
25#include <iostream>
│ │ │ +
26
│ │ │ +
68namespace gtsam {
│ │ │
69
│ │ │ -
71 Eigen::Matrix<double, -1, M> transpose() const { return matrix_.transpose(); }
│ │ │ -
72
│ │ │ -
│ │ │ -
77 Eigen::Matrix<double, 1, -1> row(size_t index) const {
│ │ │ -
78 return matrix_.row(index);
│ │ │ -
79 }
│ │ │ -
│ │ │ -
80
│ │ │ +
70using Weights = Eigen::Matrix<double, 1, -1>; /* 1xN vector */
│ │ │ +
71
│ │ │ +
84template <size_t M>
│ │ │
│ │ │ -
85 auto row(size_t index) -> Eigen::Block<MatrixType, 1, -1, false> {
│ │ │ -
86 return matrix_.row(index);
│ │ │ -
87 }
│ │ │ -
│ │ │ +
85Matrix kroneckerProductIdentity(const Weights& w) {
│ │ │ +
86 Matrix result(M, w.cols() * M);
│ │ │ +
87 result.setZero();
│ │ │
88
│ │ │ -
│ │ │ -
93 Eigen::Matrix<double, M, 1> col(size_t index) const {
│ │ │ -
94 return matrix_.col(index);
│ │ │ -
95 }
│ │ │ -
│ │ │ -
96
│ │ │ -
│ │ │ -
101 auto col(size_t index) -> Eigen::Block<MatrixType, M, 1, true> {
│ │ │ -
102 return matrix_.col(index);
│ │ │ -
103 }
│ │ │ -
│ │ │ -
104
│ │ │ -
108 void setZero() { matrix_.setZero(); }
│ │ │ -
109
│ │ │ -
│ │ │ - │ │ │ -
115 return ParameterMatrix<M>(matrix_ + other.matrix());
│ │ │ -
116 }
│ │ │ -
│ │ │ -
117
│ │ │ -
│ │ │ - │ │ │ -
123 const Eigen::Matrix<double, -1, 1>& other) const {
│ │ │ -
124 // This form avoids a deep copy and instead typecasts `other`.
│ │ │ -
125 Eigen::Map<const MatrixType> other_(other.data(), M, cols());
│ │ │ -
126 return ParameterMatrix<M>(matrix_ + other_);
│ │ │ -
127 }
│ │ │ -
│ │ │ -
128
│ │ │ -
│ │ │ - │ │ │ -
134 return ParameterMatrix<M>(matrix_ - other.matrix());
│ │ │ -
135 }
│ │ │ -
│ │ │ -
136
│ │ │ -
│ │ │ - │ │ │ -
142 const Eigen::Matrix<double, -1, 1>& other) const {
│ │ │ -
143 Eigen::Map<const MatrixType> other_(other.data(), M, cols());
│ │ │ -
144 return ParameterMatrix<M>(matrix_ - other_);
│ │ │ -
145 }
│ │ │ -
│ │ │ -
146
│ │ │ -
│ │ │ -
152 MatrixType operator*(const Eigen::Matrix<double, -1, -1>& other) const {
│ │ │ -
153 return matrix_ * other;
│ │ │ -
154 }
│ │ │ -
│ │ │ -
155
│ │ │ -
158
│ │ │ -
│ │ │ -
163 void print(const std::string& s = "") const {
│ │ │ -
164 std::cout << (s == "" ? s : s + " ") << matrix_ << std::endl;
│ │ │ -
165 }
│ │ │ -
│ │ │ -
166
│ │ │ -
│ │ │ -
172 bool equals(const ParameterMatrix<M>& other, double tol = 1e-8) const {
│ │ │ -
173 return gtsam::equal_with_abs_tol(matrix_, other.matrix(), tol);
│ │ │ -
174 }
│ │ │ -
│ │ │ -
175
│ │ │ -
177 inline size_t dim() const { return matrix_.size(); }
│ │ │ -
178
│ │ │ -
│ │ │ -
180 inline Vector vector() const {
│ │ │ -
181 using RowMajor = Eigen::Matrix<double, -1, -1, Eigen::RowMajor>;
│ │ │ -
182 Vector result(matrix_.size());
│ │ │ -
183 Eigen::Map<RowMajor>(&result(0), rows(), cols()) = matrix_;
│ │ │ -
184 return result;
│ │ │ -
185 }
│ │ │ -
│ │ │ -
186
│ │ │ +
89 for (int i = 0; i < w.cols(); i++) {
│ │ │ +
90 result.block(0, i * M, M, M).diagonal().array() = w(i);
│ │ │ +
91 }
│ │ │ +
92 return result;
│ │ │ +
93}
│ │ │ +
│ │ │ +
94
│ │ │ +
99template <typename DERIVED>
│ │ │ +
│ │ │ +
100class Basis {
│ │ │ +
101 public:
│ │ │ +
│ │ │ +
107 static Matrix WeightMatrix(size_t N, const Vector& X) {
│ │ │ +
108 Matrix W(X.size(), N);
│ │ │ +
109 for (int i = 0; i < X.size(); i++)
│ │ │ +
110 W.row(i) = DERIVED::CalculateWeights(N, X(i));
│ │ │ +
111 return W;
│ │ │ +
112 }
│ │ │ +
│ │ │ +
113
│ │ │ +
│ │ │ +
123 static Matrix WeightMatrix(size_t N, const Vector& X, double a, double b) {
│ │ │ +
124 Matrix W(X.size(), N);
│ │ │ +
125 for (int i = 0; i < X.size(); i++)
│ │ │ +
126 W.row(i) = DERIVED::CalculateWeights(N, X(i), a, b);
│ │ │ +
127 return W;
│ │ │ +
128 }
│ │ │ +
│ │ │ +
129
│ │ │ +
│ │ │ + │ │ │ +
138 protected:
│ │ │ +
139 Weights weights_;
│ │ │ +
140
│ │ │ +
141 public:
│ │ │ + │ │ │ +
144
│ │ │ +
│ │ │ +
146 EvaluationFunctor(size_t N, double x)
│ │ │ +
147 : weights_(DERIVED::CalculateWeights(N, x)) {}
│ │ │ +
│ │ │ +
148
│ │ │ +
│ │ │ +
150 EvaluationFunctor(size_t N, double x, double a, double b)
│ │ │ +
151 : weights_(DERIVED::CalculateWeights(N, x, a, b)) {}
│ │ │ +
│ │ │ +
152
│ │ │ +
│ │ │ +
154 double apply(const typename DERIVED::Parameters& p,
│ │ │ +
155 OptionalJacobian<-1, -1> H = boost::none) const {
│ │ │ +
156 if (H) *H = weights_;
│ │ │ +
157 return (weights_ * p)(0);
│ │ │ +
158 }
│ │ │ +
│ │ │ +
159
│ │ │ +
│ │ │ +
161 double operator()(const typename DERIVED::Parameters& p,
│ │ │ +
162 OptionalJacobian<-1, -1> H = boost::none) const {
│ │ │ +
163 return apply(p, H); // might call apply in derived
│ │ │ +
164 }
│ │ │ +
│ │ │ +
165
│ │ │ +
166 void print(const std::string& s = "") const {
│ │ │ +
167 std::cout << s << (s != "" ? " " : "") << weights_ << std::endl;
│ │ │ +
168 }
│ │ │ +
169 };
│ │ │ +
│ │ │ +
170
│ │ │ +
177 template <int M>
│ │ │ +
│ │ │ + │ │ │ +
179 protected:
│ │ │ +
180 using VectorM = Eigen::Matrix<double, M, 1>;
│ │ │ +
181 using Jacobian = Eigen::Matrix<double, /*MxMN*/ M, -1>;
│ │ │ +
182 Jacobian H_;
│ │ │ +
183
│ │ │
│ │ │ -
192 inline static ParameterMatrix Identity() {
│ │ │ -
193 // throw std::runtime_error(
│ │ │ -
194 // "ParameterMatrix::Identity(): Don't use this function");
│ │ │ -
195 return ParameterMatrix(0);
│ │ │ -
196 }
│ │ │ -
│ │ │ -
197
│ │ │ -
199};
│ │ │ -
│ │ │ -
200
│ │ │ -
201// traits for ParameterMatrix
│ │ │ -
202template <int M>
│ │ │ -
│ │ │ - │ │ │ -
204 : public internal::VectorSpace<ParameterMatrix<M>> {};
│ │ │ -
│ │ │ -
205
│ │ │ -
206/* ************************************************************************* */
│ │ │ -
207// Stream operator that takes a ParameterMatrix. Used for printing.
│ │ │ -
208template <int M>
│ │ │ -
209inline std::ostream& operator<<(std::ostream& os,
│ │ │ -
210 const ParameterMatrix<M>& parameterMatrix) {
│ │ │ -
211 os << parameterMatrix.matrix();
│ │ │ -
212 return os;
│ │ │ -
213}
│ │ │ -
214
│ │ │ -
215} // namespace gtsam
│ │ │ -
Concept check for values that can be used in unit tests.
│ │ │ -
typedef and functions to augment Eigen's MatrixXd
│ │ │ + │ │ │ +
193 H_ = kroneckerProductIdentity<M>(this->weights_);
│ │ │ +
194 }
│ │ │ +
│ │ │ +
195
│ │ │ +
196 public:
│ │ │ +
197 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
│ │ │ +
198
│ │ │ + │ │ │ +
201
│ │ │ +
│ │ │ +
203 VectorEvaluationFunctor(size_t N, double x) : EvaluationFunctor(N, x) {
│ │ │ + │ │ │ +
205 }
│ │ │ +
│ │ │ +
206
│ │ │ +
│ │ │ +
208 VectorEvaluationFunctor(size_t N, double x, double a, double b)
│ │ │ +
209 : EvaluationFunctor(N, x, a, b) {
│ │ │ + │ │ │ +
211 }
│ │ │ +
│ │ │ +
212
│ │ │ +
│ │ │ +
214 VectorM apply(const ParameterMatrix<M>& P,
│ │ │ +
215 OptionalJacobian</*MxN*/ -1, -1> H = boost::none) const {
│ │ │ +
216 if (H) *H = H_;
│ │ │ +
217 return P.matrix() * this->weights_.transpose();
│ │ │ +
218 }
│ │ │ +
│ │ │ +
219
│ │ │ +
│ │ │ + │ │ │ +
222 OptionalJacobian</*MxN*/ -1, -1> H = boost::none) const {
│ │ │ +
223 return apply(P, H);
│ │ │ +
224 }
│ │ │ +
│ │ │ +
225 };
│ │ │ +
│ │ │ +
226
│ │ │ +
234 template <int M>
│ │ │ +
│ │ │ + │ │ │ +
236 protected:
│ │ │ +
237 using Jacobian = Eigen::Matrix<double, /*1xMN*/ 1, -1>;
│ │ │ +
238 size_t rowIndex_;
│ │ │ +
239 Jacobian H_;
│ │ │ +
240
│ │ │ +
241 /*
│ │ │ +
242 * Calculate the `1*(M*N)` Jacobian of this functor with respect to
│ │ │ +
243 * the M*N parameter matrix `P`.
│ │ │ +
244 * We flatten assuming column-major order, e.g., if N=3 and M=2, we have
│ │ │ +
245 * H=[w(0) 0 w(1) 0 w(2) 0] for rowIndex==0
│ │ │ +
246 * H=[0 w(0) 0 w(1) 0 w(2)] for rowIndex==1
│ │ │ +
247 * i.e., one row of the Kronecker product of weights_ with the
│ │ │ +
248 * MxM identity matrix. See also VectorEvaluationFunctor.
│ │ │ +
249 */
│ │ │ +
250 void calculateJacobian(size_t N) {
│ │ │ +
251 H_.setZero(1, M * N);
│ │ │ +
252 for (int j = 0; j < EvaluationFunctor::weights_.size(); j++)
│ │ │ +
253 H_(0, rowIndex_ + j * M) = EvaluationFunctor::weights_(j);
│ │ │ +
254 }
│ │ │ +
255
│ │ │ +
256 public:
│ │ │ + │ │ │ +
259
│ │ │ +
│ │ │ +
261 VectorComponentFunctor(size_t N, size_t i, double x)
│ │ │ +
262 : EvaluationFunctor(N, x), rowIndex_(i) {
│ │ │ +
263 calculateJacobian(N);
│ │ │ +
264 }
│ │ │ +
│ │ │ +
265
│ │ │ +
│ │ │ +
267 VectorComponentFunctor(size_t N, size_t i, double x, double a, double b)
│ │ │ +
268 : EvaluationFunctor(N, x, a, b), rowIndex_(i) {
│ │ │ +
269 calculateJacobian(N);
│ │ │ +
270 }
│ │ │ +
│ │ │ +
271
│ │ │ +
│ │ │ +
273 double apply(const ParameterMatrix<M>& P,
│ │ │ +
274 OptionalJacobian</*1xMN*/ -1, -1> H = boost::none) const {
│ │ │ +
275 if (H) *H = H_;
│ │ │ +
276 return P.row(rowIndex_) * EvaluationFunctor::weights_.transpose();
│ │ │ +
277 }
│ │ │ +
│ │ │ +
278
│ │ │ +
│ │ │ + │ │ │ +
281 OptionalJacobian</*1xMN*/ -1, -1> H = boost::none) const {
│ │ │ +
282 return apply(P, H);
│ │ │ +
283 }
│ │ │ +
│ │ │ +
284 };
│ │ │ +
│ │ │ +
285
│ │ │ +
299 template <class T>
│ │ │ +
│ │ │ + │ │ │ +
301 : public VectorEvaluationFunctor<traits<T>::dimension> {
│ │ │ +
302 enum { M = traits<T>::dimension };
│ │ │ +
303 using Base = VectorEvaluationFunctor<M>;
│ │ │ +
304
│ │ │ +
305 public:
│ │ │ + │ │ │ +
308
│ │ │ +
310 ManifoldEvaluationFunctor(size_t N, double x) : Base(N, x) {}
│ │ │ +
311
│ │ │ +
│ │ │ +
313 ManifoldEvaluationFunctor(size_t N, double x, double a, double b)
│ │ │ +
314 : Base(N, x, a, b) {}
│ │ │ +
│ │ │ +
315
│ │ │ +
│ │ │ + │ │ │ +
318 OptionalJacobian</*MxMN*/ -1, -1> H = boost::none) const {
│ │ │ +
319 // Interpolate the M-dimensional vector to yield a vector in tangent space
│ │ │ +
320 Eigen::Matrix<double, M, 1> xi = Base::operator()(P, H);
│ │ │ +
321
│ │ │ +
322 // Now call retract with this M-vector, possibly with derivatives
│ │ │ +
323 Eigen::Matrix<double, M, M> D_result_xi;
│ │ │ +
324 T result = T::ChartAtOrigin::Retract(xi, H ? &D_result_xi : 0);
│ │ │ +
325
│ │ │ +
326 // Finally, if derivatives are asked, apply chain rule where H is Mx(M*N)
│ │ │ +
327 // derivative of interpolation and D_result_xi is MxM derivative of
│ │ │ +
328 // retract.
│ │ │ +
329 if (H) *H = D_result_xi * (*H);
│ │ │ +
330
│ │ │ +
331 // and return a T
│ │ │ +
332 return result;
│ │ │ +
333 }
│ │ │ +
│ │ │ +
334
│ │ │ +
│ │ │ + │ │ │ +
337 OptionalJacobian</*MxN*/ -1, -1> H = boost::none) const {
│ │ │ +
338 return apply(P, H); // might call apply in derived
│ │ │ +
339 }
│ │ │ +
│ │ │ +
340 };
│ │ │ +
│ │ │ +
341
│ │ │ +
│ │ │ + │ │ │ +
344 protected:
│ │ │ +
345 Weights weights_;
│ │ │ +
346
│ │ │ +
347 public:
│ │ │ + │ │ │ +
350
│ │ │ +
351 DerivativeFunctorBase(size_t N, double x)
│ │ │ +
352 : weights_(DERIVED::DerivativeWeights(N, x)) {}
│ │ │ +
353
│ │ │ +
354 DerivativeFunctorBase(size_t N, double x, double a, double b)
│ │ │ +
355 : weights_(DERIVED::DerivativeWeights(N, x, a, b)) {}
│ │ │ +
356
│ │ │ +
357 void print(const std::string& s = "") const {
│ │ │ +
358 std::cout << s << (s != "" ? " " : "") << weights_ << std::endl;
│ │ │ +
359 }
│ │ │ +
360 };
│ │ │ +
│ │ │ +
361
│ │ │ +
│ │ │ + │ │ │ +
370 public:
│ │ │ + │ │ │ +
373
│ │ │ +
374 DerivativeFunctor(size_t N, double x) : DerivativeFunctorBase(N, x) {}
│ │ │ +
375
│ │ │ +
376 DerivativeFunctor(size_t N, double x, double a, double b)
│ │ │ +
377 : DerivativeFunctorBase(N, x, a, b) {}
│ │ │ +
378
│ │ │ +
379 double apply(const typename DERIVED::Parameters& p,
│ │ │ +
380 OptionalJacobian</*1xN*/ -1, -1> H = boost::none) const {
│ │ │ +
381 if (H) *H = this->weights_;
│ │ │ +
382 return (this->weights_ * p)(0);
│ │ │ +
383 }
│ │ │ +
│ │ │ +
385 double operator()(const typename DERIVED::Parameters& p,
│ │ │ +
386 OptionalJacobian</*1xN*/ -1, -1> H = boost::none) const {
│ │ │ +
387 return apply(p, H); // might call apply in derived
│ │ │ +
388 }
│ │ │ +
│ │ │ +
389 };
│ │ │ +
│ │ │ +
390
│ │ │ +
399 template <int M>
│ │ │ +
│ │ │ + │ │ │ +
401 protected:
│ │ │ +
402 using VectorM = Eigen::Matrix<double, M, 1>;
│ │ │ +
403 using Jacobian = Eigen::Matrix<double, /*MxMN*/ M, -1>;
│ │ │ +
404 Jacobian H_;
│ │ │ +
405
│ │ │ +
│ │ │ + │ │ │ +
415 H_ = kroneckerProductIdentity<M>(this->weights_);
│ │ │ +
416 }
│ │ │ +
│ │ │ +
417
│ │ │ +
418 public:
│ │ │ +
419 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
│ │ │ +
420
│ │ │ + │ │ │ +
423
│ │ │ +
│ │ │ +
425 VectorDerivativeFunctor(size_t N, double x) : DerivativeFunctorBase(N, x) {
│ │ │ + │ │ │ +
427 }
│ │ │ +
│ │ │ +
428
│ │ │ +
│ │ │ +
430 VectorDerivativeFunctor(size_t N, double x, double a, double b)
│ │ │ +
431 : DerivativeFunctorBase(N, x, a, b) {
│ │ │ + │ │ │ +
433 }
│ │ │ +
│ │ │ +
434
│ │ │ +
435 VectorM apply(const ParameterMatrix<M>& P,
│ │ │ +
436 OptionalJacobian</*MxMN*/ -1, -1> H = boost::none) const {
│ │ │ +
437 if (H) *H = H_;
│ │ │ +
438 return P.matrix() * this->weights_.transpose();
│ │ │ +
439 }
│ │ │ +
│ │ │ +
441 VectorM operator()(
│ │ │ +
442 const ParameterMatrix<M>& P,
│ │ │ +
443 OptionalJacobian</*MxMN*/ -1, -1> H = boost::none) const {
│ │ │ +
444 return apply(P, H);
│ │ │ +
445 }
│ │ │ +
│ │ │ +
446 };
│ │ │ +
│ │ │ +
447
│ │ │ +
455 template <int M>
│ │ │ +
│ │ │ + │ │ │ +
457 protected:
│ │ │ +
458 using Jacobian = Eigen::Matrix<double, /*1xMN*/ 1, -1>;
│ │ │ +
459 size_t rowIndex_;
│ │ │ +
460 Jacobian H_;
│ │ │ +
461
│ │ │ +
462 /*
│ │ │ +
463 * Calculate the `1*(M*N)` Jacobian of this functor with respect to
│ │ │ +
464 * the M*N parameter matrix `P`.
│ │ │ +
465 * We flatten assuming column-major order, e.g., if N=3 and M=2, we have
│ │ │ +
466 * H=[w(0) 0 w(1) 0 w(2) 0] for rowIndex==0
│ │ │ +
467 * H=[0 w(0) 0 w(1) 0 w(2)] for rowIndex==1
│ │ │ +
468 * i.e., one row of the Kronecker product of weights_ with the
│ │ │ +
469 * MxM identity matrix. See also VectorDerivativeFunctor.
│ │ │ +
470 */
│ │ │ +
471 void calculateJacobian(size_t N) {
│ │ │ +
472 H_.setZero(1, M * N);
│ │ │ +
473 for (int j = 0; j < this->weights_.size(); j++)
│ │ │ +
474 H_(0, rowIndex_ + j * M) = this->weights_(j);
│ │ │ +
475 }
│ │ │ +
476
│ │ │ +
477 public:
│ │ │ + │ │ │ +
480
│ │ │ +
│ │ │ +
482 ComponentDerivativeFunctor(size_t N, size_t i, double x)
│ │ │ +
483 : DerivativeFunctorBase(N, x), rowIndex_(i) {
│ │ │ +
484 calculateJacobian(N);
│ │ │ +
485 }
│ │ │ +
│ │ │ +
486
│ │ │ +
│ │ │ +
488 ComponentDerivativeFunctor(size_t N, size_t i, double x, double a, double b)
│ │ │ +
489 : DerivativeFunctorBase(N, x, a, b), rowIndex_(i) {
│ │ │ +
490 calculateJacobian(N);
│ │ │ +
491 }
│ │ │ +
│ │ │ +
│ │ │ +
493 double apply(const ParameterMatrix<M>& P,
│ │ │ +
494 OptionalJacobian</*1xMN*/ -1, -1> H = boost::none) const {
│ │ │ +
495 if (H) *H = H_;
│ │ │ +
496 return P.row(rowIndex_) * this->weights_.transpose();
│ │ │ +
497 }
│ │ │ +
│ │ │ +
│ │ │ + │ │ │ +
500 OptionalJacobian</*1xMN*/ -1, -1> H = boost::none) const {
│ │ │ +
501 return apply(P, H);
│ │ │ +
502 }
│ │ │ +
│ │ │ +
503 };
│ │ │ +
│ │ │ +
504
│ │ │ +
505};
│ │ │ +
│ │ │ +
506
│ │ │ +
507} // namespace gtsam
│ │ │ +
Special class for optional Jacobian arguments.
│ │ │ +
typedef and functions to augment Eigen's MatrixXd
│ │ │ +
Define ParameterMatrix class which is used to store values at interpolation points.
│ │ │ +
Matrix kroneckerProductIdentity(const Weights &w)
Function for computing the kronecker product of the 1*N Weight vector w with the MxM identity matrix ...
Definition Basis.h:85
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen::DenseBase< MATRIX > &B, double tol=1e-9)
equals with a tolerance
Definition Matrix.h:81
│ │ │
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ -
VectorSpace provides both Testable and VectorSpaceTraits.
Definition VectorSpace.h:207
│ │ │ +
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:41
│ │ │ +
CRTP Base class for function bases.
Definition Basis.h:100
│ │ │ +
static Matrix WeightMatrix(size_t N, const Vector &X, double a, double b)
Calculate weights for all x in vector X, with interval [a,b].
Definition Basis.h:123
│ │ │ +
static Matrix WeightMatrix(size_t N, const Vector &X)
Calculate weights for all x in vector X.
Definition Basis.h:107
│ │ │ +
An instance of an EvaluationFunctor calculates f(x;p) at a given x, applied to Parameters p.
Definition Basis.h:137
│ │ │ +
EvaluationFunctor(size_t N, double x)
Constructor with interval [a,b].
Definition Basis.h:146
│ │ │ +
EvaluationFunctor(size_t N, double x, double a, double b)
Constructor with interval [a,b].
Definition Basis.h:150
│ │ │ +
double apply(const typename DERIVED::Parameters &p, OptionalJacobian<-1, -1 > H=boost::none) const
Regular 1D evaluation.
Definition Basis.h:154
│ │ │ +
EvaluationFunctor()
For serialization.
Definition Basis.h:143
│ │ │ +
double operator()(const typename DERIVED::Parameters &p, OptionalJacobian<-1, -1 > H=boost::none) const
c++ sugar
Definition Basis.h:161
│ │ │ +
VectorEvaluationFunctor at a given x, applied to ParameterMatrix<M>.
Definition Basis.h:178
│ │ │ +
VectorEvaluationFunctor(size_t N, double x, double a, double b)
Constructor, with interval [a,b].
Definition Basis.h:208
│ │ │ +
EIGEN_MAKE_ALIGNED_OPERATOR_NEW VectorEvaluationFunctor()
For serialization.
Definition Basis.h:200
│ │ │ +
VectorEvaluationFunctor(size_t N, double x)
Default Constructor.
Definition Basis.h:203
│ │ │ +
void calculateJacobian()
Calculate the M*(M*N) Jacobian of this functor with respect to the M*N parameter matrix P.
Definition Basis.h:192
│ │ │ +
VectorM operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
c++ sugar
Definition Basis.h:221
│ │ │ +
VectorM apply(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
M-dimensional evaluation.
Definition Basis.h:214
│ │ │ +
Given a M*N Matrix of M-vectors at N polynomial points, an instance of VectorComponentFunctor compute...
Definition Basis.h:235
│ │ │ +
double operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
c++ sugar
Definition Basis.h:280
│ │ │ +
VectorComponentFunctor()
For serialization.
Definition Basis.h:258
│ │ │ +
VectorComponentFunctor(size_t N, size_t i, double x)
Construct with row index.
Definition Basis.h:261
│ │ │ +
VectorComponentFunctor(size_t N, size_t i, double x, double a, double b)
Construct with row index and interval.
Definition Basis.h:267
│ │ │ +
double apply(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
Calculate component of component rowIndex_ of P.
Definition Basis.h:273
│ │ │ +
Manifold EvaluationFunctor at a given x, applied to ParameterMatrix<M>.
Definition Basis.h:301
│ │ │ +
ManifoldEvaluationFunctor(size_t N, double x, double a, double b)
Constructor, with interval [a,b].
Definition Basis.h:313
│ │ │ +
T apply(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
Manifold evaluation.
Definition Basis.h:317
│ │ │ +
ManifoldEvaluationFunctor()
For serialization.
Definition Basis.h:307
│ │ │ +
ManifoldEvaluationFunctor(size_t N, double x)
Default Constructor.
Definition Basis.h:310
│ │ │ +
T operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
c++ sugar
Definition Basis.h:336
│ │ │ +
Base class for functors below that calculate derivative weights.
Definition Basis.h:343
│ │ │ +
DerivativeFunctorBase()
For serialization.
Definition Basis.h:349
│ │ │ +
An instance of a DerivativeFunctor calculates f'(x;p) at a given x, applied to Parameters p.
Definition Basis.h:369
│ │ │ +
DerivativeFunctor()
For serialization.
Definition Basis.h:372
│ │ │ +
double operator()(const typename DERIVED::Parameters &p, OptionalJacobian< -1, -1 > H=boost::none) const
c++ sugar
Definition Basis.h:385
│ │ │ +
VectorDerivativeFunctor at a given x, applied to ParameterMatrix<M>.
Definition Basis.h:400
│ │ │ +
void calculateJacobian()
Calculate the M*(M*N) Jacobian of this functor with respect to the M*N parameter matrix P.
Definition Basis.h:414
│ │ │ +
VectorDerivativeFunctor(size_t N, double x, double a, double b)
Constructor, with optional interval [a,b].
Definition Basis.h:430
│ │ │ +
VectorM operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
c++ sugar
Definition Basis.h:441
│ │ │ +
EIGEN_MAKE_ALIGNED_OPERATOR_NEW VectorDerivativeFunctor()
For serialization.
Definition Basis.h:422
│ │ │ +
VectorDerivativeFunctor(size_t N, double x)
Default Constructor.
Definition Basis.h:425
│ │ │ +
Given a M*N Matrix of M-vectors at N polynomial points, an instance of ComponentDerivativeFunctor com...
Definition Basis.h:456
│ │ │ +
ComponentDerivativeFunctor(size_t N, size_t i, double x)
Construct with row index.
Definition Basis.h:482
│ │ │ +
double operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
c++ sugar
Definition Basis.h:499
│ │ │ +
ComponentDerivativeFunctor()
For serialization.
Definition Basis.h:479
│ │ │ +
ComponentDerivativeFunctor(size_t N, size_t i, double x, double a, double b)
Construct with row index and interval.
Definition Basis.h:488
│ │ │ +
double apply(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
Calculate derivative of component rowIndex_ of F.
Definition Basis.h:493
│ │ │
A matrix abstraction of MxN values at the Basis points.
Definition ParameterMatrix.h:38
│ │ │ -
MatrixType operator*(const Eigen::Matrix< double, -1, -1 > &other) const
Multiply ParameterMatrix with an Eigen matrix.
Definition ParameterMatrix.h:152
│ │ │ -
ParameterMatrix< M > operator-(const Eigen::Matrix< double, -1, 1 > &other) const
Subtract a MxN-sized vector from the ParameterMatrix.
Definition ParameterMatrix.h:141
│ │ │ -
Eigen::Matrix< double, 1, -1 > row(size_t index) const
Get the matrix row specified by index.
Definition ParameterMatrix.h:77
│ │ │ -
ParameterMatrix(const size_t N)
Create ParameterMatrix using the number of basis points.
Definition ParameterMatrix.h:53
│ │ │ -
static ParameterMatrix Identity()
Identity function to satisfy VectorSpace traits.
Definition ParameterMatrix.h:192
│ │ │ -
void setZero()
Set all matrix coefficients to zero.
Definition ParameterMatrix.h:108
│ │ │ -
MatrixType matrix() const
Get the underlying matrix.
Definition ParameterMatrix.h:68
│ │ │ -
ParameterMatrix(const MatrixType &matrix)
Create ParameterMatrix from an MxN Eigen Matrix.
Definition ParameterMatrix.h:59
│ │ │ -
Eigen::Matrix< double, M, 1 > col(size_t index) const
Get the matrix column specified by index.
Definition ParameterMatrix.h:93
│ │ │ -
Vector vector() const
Convert to vector form, is done row-wise.
Definition ParameterMatrix.h:180
│ │ │ -
bool equals(const ParameterMatrix< M > &other, double tol=1e-8) const
Check for equality up to absolute tolerance.
Definition ParameterMatrix.h:172
│ │ │ -
ParameterMatrix< M > operator+(const ParameterMatrix< M > &other) const
Add a ParameterMatrix to another.
Definition ParameterMatrix.h:114
│ │ │ -
size_t rows() const
Get the number of rows.
Definition ParameterMatrix.h:62
│ │ │ -
auto row(size_t index) -> Eigen::Block< MatrixType, 1, -1, false >
Set the matrix row specified by index.
Definition ParameterMatrix.h:85
│ │ │ -
void print(const std::string &s="") const
Print the ParameterMatrix.
Definition ParameterMatrix.h:163
│ │ │ -
auto col(size_t index) -> Eigen::Block< MatrixType, M, 1, true >
Set the matrix column specified by index.
Definition ParameterMatrix.h:101
│ │ │ -
ParameterMatrix< M > operator+(const Eigen::Matrix< double, -1, 1 > &other) const
Add a MxN-sized vector to the ParameterMatrix.
Definition ParameterMatrix.h:122
│ │ │ -
ParameterMatrix< M > operator-(const ParameterMatrix< M > &other) const
Subtract a ParameterMatrix from another.
Definition ParameterMatrix.h:133
│ │ │ -
size_t dim() const
Returns dimensionality of the tangent space.
Definition ParameterMatrix.h:177
│ │ │ -
size_t cols() const
Get the number of columns.
Definition ParameterMatrix.h:65
│ │ │ -
Eigen::Matrix< double, -1, M > transpose() const
Return the tranpose of the underlying matrix.
Definition ParameterMatrix.h:71
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,252 +1,554 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -ParameterMatrix.h │ │ │ │ +Basis.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -20#pragma once │ │ │ │ -21 │ │ │ │ -22#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_._h> │ │ │ │ -23#include <_g_t_s_a_m_/_b_a_s_e_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ -24#include │ │ │ │ -25 │ │ │ │ -26#include │ │ │ │ -27 │ │ │ │ -28namespace _g_t_s_a_m { │ │ │ │ -29 │ │ │ │ -37template │ │ │ │ -_3_8class _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x { │ │ │ │ -39 using MatrixType = Eigen::Matrix; │ │ │ │ -40 │ │ │ │ -41 private: │ │ │ │ -42 MatrixType matrix_; │ │ │ │ -43 │ │ │ │ -44 public: │ │ │ │ -45 EIGEN_MAKE_ALIGNED_OPERATOR_NEW │ │ │ │ -46 │ │ │ │ -47 enum { dimension = Eigen::Dynamic }; │ │ │ │ -48 │ │ │ │ -_5_3 _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x(const size_t N) : matrix_(M, N) { matrix_.setZero(); } │ │ │ │ -54 │ │ │ │ -_5_9 _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x(const MatrixType& _m_a_t_r_i_x) : matrix_(_m_a_t_r_i_x) {} │ │ │ │ -60 │ │ │ │ -_6_2 size_t _r_o_w_s() const { return matrix_.rows(); } │ │ │ │ -63 │ │ │ │ -_6_5 size_t _c_o_l_s() const { return matrix_.cols(); } │ │ │ │ -66 │ │ │ │ -_6_8 MatrixType _m_a_t_r_i_x() const { return matrix_; } │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +21#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_._h> │ │ │ │ +22#include <_g_t_s_a_m_/_b_a_s_e_/_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h> │ │ │ │ +23#include <_g_t_s_a_m_/_b_a_s_i_s_/_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_._h> │ │ │ │ +24 │ │ │ │ +25#include │ │ │ │ +26 │ │ │ │ +68namespace _g_t_s_a_m { │ │ │ │ 69 │ │ │ │ -_7_1 Eigen::Matrix _t_r_a_n_s_p_o_s_e() const { return matrix_.transpose(); │ │ │ │ -} │ │ │ │ -72 │ │ │ │ -_7_7 Eigen::Matrix _r_o_w(size_t index) const { │ │ │ │ -78 return matrix_.row(index); │ │ │ │ -79 } │ │ │ │ -80 │ │ │ │ -_8_5 auto _r_o_w(size_t index) -> Eigen::Block { │ │ │ │ -86 return matrix_.row(index); │ │ │ │ -87 } │ │ │ │ +70using Weights = Eigen::Matrix; /* 1xN vector */ │ │ │ │ +71 │ │ │ │ +84template │ │ │ │ +_8_5Matrix _k_r_o_n_e_c_k_e_r_P_r_o_d_u_c_t_I_d_e_n_t_i_t_y(const Weights& w) { │ │ │ │ +86 Matrix result(M, w.cols() * M); │ │ │ │ +87 result.setZero(); │ │ │ │ 88 │ │ │ │ -_9_3 Eigen::Matrix _c_o_l(size_t index) const { │ │ │ │ -94 return matrix_.col(index); │ │ │ │ -95 } │ │ │ │ -96 │ │ │ │ -_1_0_1 auto _c_o_l(size_t index) -> Eigen::Block { │ │ │ │ -102 return matrix_.col(index); │ │ │ │ -103 } │ │ │ │ -104 │ │ │ │ -_1_0_8 void _s_e_t_Z_e_r_o() { matrix_.setZero(); } │ │ │ │ -109 │ │ │ │ -_1_1_4 _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_> _o_p_e_r_a_t_o_r_+(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& other) const { │ │ │ │ -115 return _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>(matrix_ + other._m_a_t_r_i_x()); │ │ │ │ -116 } │ │ │ │ -117 │ │ │ │ -_1_2_2 _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_> _o_p_e_r_a_t_o_r_+( │ │ │ │ -123 const Eigen::Matrix& other) const { │ │ │ │ -124 // This form avoids a deep copy and instead typecasts `other`. │ │ │ │ -125 Eigen::Map other_(other.data(), M, _c_o_l_s()); │ │ │ │ -126 return _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>(matrix_ + other_); │ │ │ │ -127 } │ │ │ │ -128 │ │ │ │ -_1_3_3 _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_> _o_p_e_r_a_t_o_r_-(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& other) const { │ │ │ │ -134 return _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>(matrix_ - other._m_a_t_r_i_x()); │ │ │ │ -135 } │ │ │ │ -136 │ │ │ │ -_1_4_1 _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_> _o_p_e_r_a_t_o_r_-( │ │ │ │ -142 const Eigen::Matrix& other) const { │ │ │ │ -143 Eigen::Map other_(other.data(), M, _c_o_l_s()); │ │ │ │ -144 return _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>(matrix_ - other_); │ │ │ │ -145 } │ │ │ │ -146 │ │ │ │ -_1_5_2 MatrixType _o_p_e_r_a_t_o_r_*(const Eigen::Matrix& other) const { │ │ │ │ -153 return matrix_ * other; │ │ │ │ -154 } │ │ │ │ -155 │ │ │ │ -158 │ │ │ │ -_1_6_3 void _p_r_i_n_t(const std::string& s = "") const { │ │ │ │ -164 std::cout << (s == "" ? s : s + " ") << matrix_ << std::endl; │ │ │ │ -165 } │ │ │ │ -166 │ │ │ │ -_1_7_2 bool _e_q_u_a_l_s(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& other, double tol = 1e-8) const { │ │ │ │ -173 return _g_t_s_a_m_:_:_e_q_u_a_l___w_i_t_h___a_b_s___t_o_l(matrix_, other._m_a_t_r_i_x(), tol); │ │ │ │ -174 } │ │ │ │ -175 │ │ │ │ -_1_7_7 inline size_t _d_i_m() const { return matrix_.size(); } │ │ │ │ -178 │ │ │ │ -_1_8_0 inline Vector _v_e_c_t_o_r() const { │ │ │ │ -181 using RowMajor = Eigen::Matrix; │ │ │ │ -182 Vector result(matrix_.size()); │ │ │ │ -183 Eigen::Map(&result(0), _r_o_w_s(), _c_o_l_s()) = matrix_; │ │ │ │ -184 return result; │ │ │ │ -185 } │ │ │ │ -186 │ │ │ │ -_1_9_2 inline static _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x _I_d_e_n_t_i_t_y() { │ │ │ │ -193 // throw std::runtime_error( │ │ │ │ -194 // "ParameterMatrix::Identity(): Don't use this function"); │ │ │ │ -195 return _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x(0); │ │ │ │ -196 } │ │ │ │ -197 │ │ │ │ -199}; │ │ │ │ -200 │ │ │ │ -201// traits for ParameterMatrix │ │ │ │ -202template │ │ │ │ -_2_0_3struct _t_r_a_i_t_s<_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x> │ │ │ │ -204 : public _i_n_t_e_r_n_a_l_:_:_V_e_c_t_o_r_S_p_a_c_e> {}; │ │ │ │ -205 │ │ │ │ -206/* ************************************************************************* │ │ │ │ -*/ │ │ │ │ -207// Stream operator that takes a ParameterMatrix. Used for printing. │ │ │ │ -208template │ │ │ │ -209inline std::ostream& operator<<(std::ostream& os, │ │ │ │ -210 const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& parameterMatrix) { │ │ │ │ -211 os << parameterMatrix._m_a_t_r_i_x(); │ │ │ │ -212 return os; │ │ │ │ -213} │ │ │ │ -214 │ │ │ │ -215} // namespace gtsam │ │ │ │ -_T_e_s_t_a_b_l_e_._h │ │ │ │ -Concept check for values that can be used in unit tests. │ │ │ │ +89 for (int i = 0; i < w.cols(); i++) { │ │ │ │ +90 result.block(0, i * M, M, M).diagonal().array() = w(i); │ │ │ │ +91 } │ │ │ │ +92 return result; │ │ │ │ +93} │ │ │ │ +94 │ │ │ │ +99template │ │ │ │ +_1_0_0class _B_a_s_i_s { │ │ │ │ +101 public: │ │ │ │ +_1_0_7 static Matrix _W_e_i_g_h_t_M_a_t_r_i_x(size_t N, const Vector& X) { │ │ │ │ +108 Matrix W(X.size(), N); │ │ │ │ +109 for (int i = 0; i < X.size(); i++) │ │ │ │ +110 W.row(i) = DERIVED::CalculateWeights(N, X(i)); │ │ │ │ +111 return W; │ │ │ │ +112 } │ │ │ │ +113 │ │ │ │ +_1_2_3 static Matrix _W_e_i_g_h_t_M_a_t_r_i_x(size_t N, const Vector& X, double a, double b) { │ │ │ │ +124 Matrix W(X.size(), N); │ │ │ │ +125 for (int i = 0; i < X.size(); i++) │ │ │ │ +126 W.row(i) = DERIVED::CalculateWeights(N, X(i), a, b); │ │ │ │ +127 return W; │ │ │ │ +128 } │ │ │ │ +129 │ │ │ │ +_1_3_7 class _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r { │ │ │ │ +138 protected: │ │ │ │ +139 Weights weights_; │ │ │ │ +140 │ │ │ │ +141 public: │ │ │ │ +_1_4_3 _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r() {} │ │ │ │ +144 │ │ │ │ +_1_4_6 _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(size_t N, double x) │ │ │ │ +147 : weights_(DERIVED::CalculateWeights(N, x)) {} │ │ │ │ +148 │ │ │ │ +_1_5_0 _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(size_t N, double x, double a, double b) │ │ │ │ +151 : weights_(DERIVED::CalculateWeights(N, x, a, b)) {} │ │ │ │ +152 │ │ │ │ +_1_5_4 double _a_p_p_l_y(const typename DERIVED::Parameters& p, │ │ │ │ +155 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ +156 if (H) *H = weights_; │ │ │ │ +157 return (weights_ * p)(0); │ │ │ │ +158 } │ │ │ │ +159 │ │ │ │ +_1_6_1 double _o_p_e_r_a_t_o_r_(_)(const typename DERIVED::Parameters& p, │ │ │ │ +162 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ +163 return _a_p_p_l_y(p, H); // might call apply in derived │ │ │ │ +164 } │ │ │ │ +165 │ │ │ │ +166 void print(const std::string& s = "") const { │ │ │ │ +167 std::cout << s << (s != "" ? " " : "") << weights_ << std::endl; │ │ │ │ +168 } │ │ │ │ +169 }; │ │ │ │ +170 │ │ │ │ +177 template │ │ │ │ +_1_7_8 class _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r : protected _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r { │ │ │ │ +179 protected: │ │ │ │ +180 using VectorM = Eigen::Matrix; │ │ │ │ +181 using Jacobian = Eigen::Matrix; │ │ │ │ +182 Jacobian H_; │ │ │ │ +183 │ │ │ │ +_1_9_2 void _c_a_l_c_u_l_a_t_e_J_a_c_o_b_i_a_n() { │ │ │ │ +193 H_ = kroneckerProductIdentity(this->weights_); │ │ │ │ +194 } │ │ │ │ +195 │ │ │ │ +196 public: │ │ │ │ +197 EIGEN_MAKE_ALIGNED_OPERATOR_NEW │ │ │ │ +198 │ │ │ │ +_2_0_0 _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r() {} │ │ │ │ +201 │ │ │ │ +_2_0_3 _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(size_t N, double x) : _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(N, x) { │ │ │ │ +204 _c_a_l_c_u_l_a_t_e_J_a_c_o_b_i_a_n(); │ │ │ │ +205 } │ │ │ │ +206 │ │ │ │ +_2_0_8 _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(size_t N, double x, double a, double b) │ │ │ │ +209 : _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(N, x, a, b) { │ │ │ │ +210 _c_a_l_c_u_l_a_t_e_J_a_c_o_b_i_a_n(); │ │ │ │ +211 } │ │ │ │ +212 │ │ │ │ +_2_1_4 VectorM _a_p_p_l_y(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ +215 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_M_x_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ +216 if (H) *H = H_; │ │ │ │ +217 return P.matrix() * this->weights_.transpose(); │ │ │ │ +218 } │ │ │ │ +219 │ │ │ │ +_2_2_1 VectorM _o_p_e_r_a_t_o_r_(_)(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ +222 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_M_x_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ +223 return _a_p_p_l_y(P, H); │ │ │ │ +224 } │ │ │ │ +225 }; │ │ │ │ +226 │ │ │ │ +234 template │ │ │ │ +_2_3_5 class _V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r : public _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r { │ │ │ │ +236 protected: │ │ │ │ +237 using Jacobian = Eigen::Matrix; │ │ │ │ +238 size_t rowIndex_; │ │ │ │ +239 Jacobian H_; │ │ │ │ +240 │ │ │ │ +241 /* │ │ │ │ +242 * Calculate the `1*(M*N)` Jacobian of this functor with respect to │ │ │ │ +243 * the M*N parameter matrix `P`. │ │ │ │ +244 * We flatten assuming column-major order, e.g., if N=3 and M=2, we have │ │ │ │ +245 * H=[w(0) 0 w(1) 0 w(2) 0] for rowIndex==0 │ │ │ │ +246 * H=[0 w(0) 0 w(1) 0 w(2)] for rowIndex==1 │ │ │ │ +247 * i.e., one row of the Kronecker product of weights_ with the │ │ │ │ +248 * MxM identity matrix. See also VectorEvaluationFunctor. │ │ │ │ +249 */ │ │ │ │ +250 void calculateJacobian(size_t N) { │ │ │ │ +251 H_.setZero(1, M * N); │ │ │ │ +252 for (int j = 0; j < EvaluationFunctor::weights_.size(); j++) │ │ │ │ +253 H_(0, rowIndex_ + j * M) = EvaluationFunctor::weights_(j); │ │ │ │ +254 } │ │ │ │ +255 │ │ │ │ +256 public: │ │ │ │ +_2_5_8 _V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r() {} │ │ │ │ +259 │ │ │ │ +_2_6_1 _V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r(size_t N, size_t i, double x) │ │ │ │ +262 : _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(N, x), rowIndex_(i) { │ │ │ │ +263 calculateJacobian(N); │ │ │ │ +264 } │ │ │ │ +265 │ │ │ │ +_2_6_7 _V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r(size_t N, size_t i, double x, double a, double b) │ │ │ │ +268 : _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(N, x, a, b), rowIndex_(i) { │ │ │ │ +269 calculateJacobian(N); │ │ │ │ +270 } │ │ │ │ +271 │ │ │ │ +_2_7_3 double _a_p_p_l_y(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ +274 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_1_x_M_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ +275 if (H) *H = H_; │ │ │ │ +276 return P.row(rowIndex_) * EvaluationFunctor::weights_.transpose(); │ │ │ │ +277 } │ │ │ │ +278 │ │ │ │ +_2_8_0 double _o_p_e_r_a_t_o_r_(_)(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ +281 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_1_x_M_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ +282 return _a_p_p_l_y(P, H); │ │ │ │ +283 } │ │ │ │ +284 }; │ │ │ │ +285 │ │ │ │ +299 template │ │ │ │ +_3_0_0 class _M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ +301 : public _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r::dimension> { │ │ │ │ +302 enum { M = _t_r_a_i_t_s_<_T_>_:_:_d_i_m_e_n_s_i_o_n }; │ │ │ │ +303 using Base = _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_<_M_>; │ │ │ │ +304 │ │ │ │ +305 public: │ │ │ │ +_3_0_7 _M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r() {} │ │ │ │ +308 │ │ │ │ +_3_1_0 _M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(size_t N, double x) : Base(N, x) {} │ │ │ │ +311 │ │ │ │ +_3_1_3 _M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(size_t N, double x, double a, double b) │ │ │ │ +314 : Base(N, x, a, b) {} │ │ │ │ +315 │ │ │ │ +_3_1_7 T _a_p_p_l_y(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ +318 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_M_x_M_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ +319 // Interpolate the M-dimensional vector to yield a vector in tangent space │ │ │ │ +320 Eigen::Matrix xi = Base::operator()(P, H); │ │ │ │ +321 │ │ │ │ +322 // Now call retract with this M-vector, possibly with derivatives │ │ │ │ +323 Eigen::Matrix D_result_xi; │ │ │ │ +324 T result = T::ChartAtOrigin::Retract(xi, H ? &D_result_xi : 0); │ │ │ │ +325 │ │ │ │ +326 // Finally, if derivatives are asked, apply chain rule where H is Mx(M*N) │ │ │ │ +327 // derivative of interpolation and D_result_xi is MxM derivative of │ │ │ │ +328 // retract. │ │ │ │ +329 if (H) *H = D_result_xi * (*H); │ │ │ │ +330 │ │ │ │ +331 // and return a T │ │ │ │ +332 return result; │ │ │ │ +333 } │ │ │ │ +334 │ │ │ │ +_3_3_6 T _o_p_e_r_a_t_o_r_(_)(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ +337 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_M_x_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ +338 return _a_p_p_l_y(P, H); // might call apply in derived │ │ │ │ +339 } │ │ │ │ +340 }; │ │ │ │ +341 │ │ │ │ +_3_4_3 class _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e { │ │ │ │ +344 protected: │ │ │ │ +345 Weights weights_; │ │ │ │ +346 │ │ │ │ +347 public: │ │ │ │ +_3_4_9 _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e() {} │ │ │ │ +350 │ │ │ │ +351 _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e(size_t N, double x) │ │ │ │ +352 : weights_(DERIVED::DerivativeWeights(N, x)) {} │ │ │ │ +353 │ │ │ │ +354 _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e(size_t N, double x, double a, double b) │ │ │ │ +355 : weights_(DERIVED::DerivativeWeights(N, x, a, b)) {} │ │ │ │ +356 │ │ │ │ +357 void print(const std::string& s = "") const { │ │ │ │ +358 std::cout << s << (s != "" ? " " : "") << weights_ << std::endl; │ │ │ │ +359 } │ │ │ │ +360 }; │ │ │ │ +361 │ │ │ │ +_3_6_9 class _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r : protected _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e { │ │ │ │ +370 public: │ │ │ │ +_3_7_2 _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r() {} │ │ │ │ +373 │ │ │ │ +374 _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r(size_t N, double x) : _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e(N, x) {} │ │ │ │ +375 │ │ │ │ +376 _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r(size_t N, double x, double a, double b) │ │ │ │ +377 : _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e(N, x, a, b) {} │ │ │ │ +378 │ │ │ │ +379 double apply(const typename DERIVED::Parameters& p, │ │ │ │ +380 OptionalJacobian H = boost::none) const { │ │ │ │ +381 if (H) *H = this->weights_; │ │ │ │ +382 return (this->weights_ * p)(0); │ │ │ │ +383 } │ │ │ │ +_3_8_5 double _o_p_e_r_a_t_o_r_(_)(const typename DERIVED::Parameters& p, │ │ │ │ +386 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_1_x_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ +387 return apply(p, H); // might call apply in derived │ │ │ │ +388 } │ │ │ │ +389 }; │ │ │ │ +390 │ │ │ │ +399 template │ │ │ │ +_4_0_0 class _V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r : protected _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e { │ │ │ │ +401 protected: │ │ │ │ +402 using VectorM = Eigen::Matrix; │ │ │ │ +403 using Jacobian = Eigen::Matrix; │ │ │ │ +404 Jacobian H_; │ │ │ │ +405 │ │ │ │ +_4_1_4 void _c_a_l_c_u_l_a_t_e_J_a_c_o_b_i_a_n() { │ │ │ │ +415 H_ = kroneckerProductIdentity(this->weights_); │ │ │ │ +416 } │ │ │ │ +417 │ │ │ │ +418 public: │ │ │ │ +419 EIGEN_MAKE_ALIGNED_OPERATOR_NEW │ │ │ │ +420 │ │ │ │ +_4_2_2 _V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r() {} │ │ │ │ +423 │ │ │ │ +_4_2_5 _V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r(size_t N, double x) : _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e(N, x) { │ │ │ │ +426 _c_a_l_c_u_l_a_t_e_J_a_c_o_b_i_a_n(); │ │ │ │ +427 } │ │ │ │ +428 │ │ │ │ +_4_3_0 _V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r(size_t N, double x, double a, double b) │ │ │ │ +431 : _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e(N, x, a, b) { │ │ │ │ +432 _c_a_l_c_u_l_a_t_e_J_a_c_o_b_i_a_n(); │ │ │ │ +433 } │ │ │ │ +434 │ │ │ │ +435 VectorM apply(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ +436 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_M_x_M_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ +437 if (H) *H = H_; │ │ │ │ +438 return P.matrix() * this->weights_.transpose(); │ │ │ │ +439 } │ │ │ │ +_4_4_1 VectorM _o_p_e_r_a_t_o_r_(_)( │ │ │ │ +442 const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ +443 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_M_x_M_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ +444 return apply(P, H); │ │ │ │ +445 } │ │ │ │ +446 }; │ │ │ │ +447 │ │ │ │ +455 template │ │ │ │ +_4_5_6 class _C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r : protected _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e { │ │ │ │ +457 protected: │ │ │ │ +458 using Jacobian = Eigen::Matrix; │ │ │ │ +459 size_t rowIndex_; │ │ │ │ +460 Jacobian H_; │ │ │ │ +461 │ │ │ │ +462 /* │ │ │ │ +463 * Calculate the `1*(M*N)` Jacobian of this functor with respect to │ │ │ │ +464 * the M*N parameter matrix `P`. │ │ │ │ +465 * We flatten assuming column-major order, e.g., if N=3 and M=2, we have │ │ │ │ +466 * H=[w(0) 0 w(1) 0 w(2) 0] for rowIndex==0 │ │ │ │ +467 * H=[0 w(0) 0 w(1) 0 w(2)] for rowIndex==1 │ │ │ │ +468 * i.e., one row of the Kronecker product of weights_ with the │ │ │ │ +469 * MxM identity matrix. See also VectorDerivativeFunctor. │ │ │ │ +470 */ │ │ │ │ +471 void calculateJacobian(size_t N) { │ │ │ │ +472 H_.setZero(1, M * N); │ │ │ │ +473 for (int j = 0; j < this->weights_.size(); j++) │ │ │ │ +474 H_(0, rowIndex_ + j * M) = this->weights_(j); │ │ │ │ +475 } │ │ │ │ +476 │ │ │ │ +477 public: │ │ │ │ +_4_7_9 _C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r() {} │ │ │ │ +480 │ │ │ │ +_4_8_2 _C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r(size_t N, size_t i, double x) │ │ │ │ +483 : _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e(N, x), rowIndex_(i) { │ │ │ │ +484 calculateJacobian(N); │ │ │ │ +485 } │ │ │ │ +486 │ │ │ │ +_4_8_8 _C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r(size_t N, size_t i, double x, double a, double │ │ │ │ +b) │ │ │ │ +489 : _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e(N, x, a, b), rowIndex_(i) { │ │ │ │ +490 calculateJacobian(N); │ │ │ │ +491 } │ │ │ │ +_4_9_3 double _a_p_p_l_y(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ +494 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_1_x_M_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ +495 if (H) *H = H_; │ │ │ │ +496 return P.row(rowIndex_) * this->weights_.transpose(); │ │ │ │ +497 } │ │ │ │ +_4_9_9 double _o_p_e_r_a_t_o_r_(_)(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ +500 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_1_x_M_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ +501 return _a_p_p_l_y(P, H); │ │ │ │ +502 } │ │ │ │ +503 }; │ │ │ │ +504 │ │ │ │ +505}; │ │ │ │ +506 │ │ │ │ +507} // namespace gtsam │ │ │ │ +_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h │ │ │ │ +Special class for optional Jacobian arguments. │ │ │ │ _M_a_t_r_i_x_._h │ │ │ │ typedef and functions to augment Eigen's MatrixXd │ │ │ │ +_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_._h │ │ │ │ +Define ParameterMatrix class which is used to store values at interpolation │ │ │ │ +points. │ │ │ │ +_g_t_s_a_m_:_:_k_r_o_n_e_c_k_e_r_P_r_o_d_u_c_t_I_d_e_n_t_i_t_y │ │ │ │ +Matrix kroneckerProductIdentity(const Weights &w) │ │ │ │ +Function for computing the kronecker product of the 1*N Weight vector w with │ │ │ │ +the MxM identity matrix ... │ │ │ │ +DDeeffiinniittiioonn Basis.h:85 │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_e_q_u_a_l___w_i_t_h___a_b_s___t_o_l │ │ │ │ -bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen:: │ │ │ │ -DenseBase< MATRIX > &B, double tol=1e-9) │ │ │ │ -equals with a tolerance │ │ │ │ -DDeeffiinniittiioonn Matrix.h:81 │ │ │ │ _g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ that can be centered ... │ │ │ │ DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_V_e_c_t_o_r_S_p_a_c_e │ │ │ │ -VectorSpace provides both Testable and VectorSpaceTraits. │ │ │ │ -DDeeffiinniittiioonn VectorSpace.h:207 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ +either a fixed size o... │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s │ │ │ │ +CRTP Base class for function bases. │ │ │ │ +DDeeffiinniittiioonn Basis.h:100 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_W_e_i_g_h_t_M_a_t_r_i_x │ │ │ │ +static Matrix WeightMatrix(size_t N, const Vector &X, double a, double b) │ │ │ │ +Calculate weights for all x in vector X, with interval [a,b]. │ │ │ │ +DDeeffiinniittiioonn Basis.h:123 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_W_e_i_g_h_t_M_a_t_r_i_x │ │ │ │ +static Matrix WeightMatrix(size_t N, const Vector &X) │ │ │ │ +Calculate weights for all x in vector X. │ │ │ │ +DDeeffiinniittiioonn Basis.h:107 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ +An instance of an EvaluationFunctor calculates f(x;p) at a given x, applied to │ │ │ │ +Parameters p. │ │ │ │ +DDeeffiinniittiioonn Basis.h:137 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ +EvaluationFunctor(size_t N, double x) │ │ │ │ +Constructor with interval [a,b]. │ │ │ │ +DDeeffiinniittiioonn Basis.h:146 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ +EvaluationFunctor(size_t N, double x, double a, double b) │ │ │ │ +Constructor with interval [a,b]. │ │ │ │ +DDeeffiinniittiioonn Basis.h:150 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_a_p_p_l_y │ │ │ │ +double apply(const typename DERIVED::Parameters &p, OptionalJacobian<-1, -1 > │ │ │ │ +H=boost::none) const │ │ │ │ +Regular 1D evaluation. │ │ │ │ +DDeeffiinniittiioonn Basis.h:154 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ +EvaluationFunctor() │ │ │ │ +For serialization. │ │ │ │ +DDeeffiinniittiioonn Basis.h:143 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ +double operator()(const typename DERIVED::Parameters &p, OptionalJacobian<-1, - │ │ │ │ +1 > H=boost::none) const │ │ │ │ +c++ sugar │ │ │ │ +DDeeffiinniittiioonn Basis.h:161 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ +VectorEvaluationFunctor at a given x, applied to ParameterMatrix. │ │ │ │ +DDeeffiinniittiioonn Basis.h:178 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ +VectorEvaluationFunctor(size_t N, double x, double a, double b) │ │ │ │ +Constructor, with interval [a,b]. │ │ │ │ +DDeeffiinniittiioonn Basis.h:208 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ +EIGEN_MAKE_ALIGNED_OPERATOR_NEW VectorEvaluationFunctor() │ │ │ │ +For serialization. │ │ │ │ +DDeeffiinniittiioonn Basis.h:200 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ +VectorEvaluationFunctor(size_t N, double x) │ │ │ │ +Default Constructor. │ │ │ │ +DDeeffiinniittiioonn Basis.h:203 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_c_a_l_c_u_l_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ +void calculateJacobian() │ │ │ │ +Calculate the M*(M*N) Jacobian of this functor with respect to the M*N │ │ │ │ +parameter matrix P. │ │ │ │ +DDeeffiinniittiioonn Basis.h:192 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ +VectorM operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > │ │ │ │ +H=boost::none) const │ │ │ │ +c++ sugar │ │ │ │ +DDeeffiinniittiioonn Basis.h:221 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_a_p_p_l_y │ │ │ │ +VectorM apply(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > │ │ │ │ +H=boost::none) const │ │ │ │ +M-dimensional evaluation. │ │ │ │ +DDeeffiinniittiioonn Basis.h:214 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r │ │ │ │ +Given a M*N Matrix of M-vectors at N polynomial points, an instance of │ │ │ │ +VectorComponentFunctor compute... │ │ │ │ +DDeeffiinniittiioonn Basis.h:235 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ +double operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > │ │ │ │ +H=boost::none) const │ │ │ │ +c++ sugar │ │ │ │ +DDeeffiinniittiioonn Basis.h:280 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r │ │ │ │ +VectorComponentFunctor() │ │ │ │ +For serialization. │ │ │ │ +DDeeffiinniittiioonn Basis.h:258 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r │ │ │ │ +VectorComponentFunctor(size_t N, size_t i, double x) │ │ │ │ +Construct with row index. │ │ │ │ +DDeeffiinniittiioonn Basis.h:261 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r │ │ │ │ +VectorComponentFunctor(size_t N, size_t i, double x, double a, double b) │ │ │ │ +Construct with row index and interval. │ │ │ │ +DDeeffiinniittiioonn Basis.h:267 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r_:_:_a_p_p_l_y │ │ │ │ +double apply(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > │ │ │ │ +H=boost::none) const │ │ │ │ +Calculate component of component rowIndex_ of P. │ │ │ │ +DDeeffiinniittiioonn Basis.h:273 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ +Manifold EvaluationFunctor at a given x, applied to ParameterMatrix. │ │ │ │ +DDeeffiinniittiioonn Basis.h:301 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ +ManifoldEvaluationFunctor(size_t N, double x, double a, double b) │ │ │ │ +Constructor, with interval [a,b]. │ │ │ │ +DDeeffiinniittiioonn Basis.h:313 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_a_p_p_l_y │ │ │ │ +T apply(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost:: │ │ │ │ +none) const │ │ │ │ +Manifold evaluation. │ │ │ │ +DDeeffiinniittiioonn Basis.h:317 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ +ManifoldEvaluationFunctor() │ │ │ │ +For serialization. │ │ │ │ +DDeeffiinniittiioonn Basis.h:307 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ +ManifoldEvaluationFunctor(size_t N, double x) │ │ │ │ +Default Constructor. │ │ │ │ +DDeeffiinniittiioonn Basis.h:310 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ +T operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > │ │ │ │ +H=boost::none) const │ │ │ │ +c++ sugar │ │ │ │ +DDeeffiinniittiioonn Basis.h:336 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e │ │ │ │ +Base class for functors below that calculate derivative weights. │ │ │ │ +DDeeffiinniittiioonn Basis.h:343 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e │ │ │ │ +DerivativeFunctorBase() │ │ │ │ +For serialization. │ │ │ │ +DDeeffiinniittiioonn Basis.h:349 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ +An instance of a DerivativeFunctor calculates f'(x;p) at a given x, applied to │ │ │ │ +Parameters p. │ │ │ │ +DDeeffiinniittiioonn Basis.h:369 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ +DerivativeFunctor() │ │ │ │ +For serialization. │ │ │ │ +DDeeffiinniittiioonn Basis.h:372 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ +double operator()(const typename DERIVED::Parameters &p, OptionalJacobian< -1, │ │ │ │ +-1 > H=boost::none) const │ │ │ │ +c++ sugar │ │ │ │ +DDeeffiinniittiioonn Basis.h:385 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ +VectorDerivativeFunctor at a given x, applied to ParameterMatrix. │ │ │ │ +DDeeffiinniittiioonn Basis.h:400 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_c_a_l_c_u_l_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ +void calculateJacobian() │ │ │ │ +Calculate the M*(M*N) Jacobian of this functor with respect to the M*N │ │ │ │ +parameter matrix P. │ │ │ │ +DDeeffiinniittiioonn Basis.h:414 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ +VectorDerivativeFunctor(size_t N, double x, double a, double b) │ │ │ │ +Constructor, with optional interval [a,b]. │ │ │ │ +DDeeffiinniittiioonn Basis.h:430 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ +VectorM operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > │ │ │ │ +H=boost::none) const │ │ │ │ +c++ sugar │ │ │ │ +DDeeffiinniittiioonn Basis.h:441 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ +EIGEN_MAKE_ALIGNED_OPERATOR_NEW VectorDerivativeFunctor() │ │ │ │ +For serialization. │ │ │ │ +DDeeffiinniittiioonn Basis.h:422 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ +VectorDerivativeFunctor(size_t N, double x) │ │ │ │ +Default Constructor. │ │ │ │ +DDeeffiinniittiioonn Basis.h:425 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ +Given a M*N Matrix of M-vectors at N polynomial points, an instance of │ │ │ │ +ComponentDerivativeFunctor com... │ │ │ │ +DDeeffiinniittiioonn Basis.h:456 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ +ComponentDerivativeFunctor(size_t N, size_t i, double x) │ │ │ │ +Construct with row index. │ │ │ │ +DDeeffiinniittiioonn Basis.h:482 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ +double operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > │ │ │ │ +H=boost::none) const │ │ │ │ +c++ sugar │ │ │ │ +DDeeffiinniittiioonn Basis.h:499 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ +ComponentDerivativeFunctor() │ │ │ │ +For serialization. │ │ │ │ +DDeeffiinniittiioonn Basis.h:479 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ +ComponentDerivativeFunctor(size_t N, size_t i, double x, double a, double b) │ │ │ │ +Construct with row index and interval. │ │ │ │ +DDeeffiinniittiioonn Basis.h:488 │ │ │ │ +_g_t_s_a_m_:_:_B_a_s_i_s_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_a_p_p_l_y │ │ │ │ +double apply(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > │ │ │ │ +H=boost::none) const │ │ │ │ +Calculate derivative of component rowIndex_ of F. │ │ │ │ +DDeeffiinniittiioonn Basis.h:493 │ │ │ │ _g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x │ │ │ │ A matrix abstraction of MxN values at the Basis points. │ │ │ │ DDeeffiinniittiioonn ParameterMatrix.h:38 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -MatrixType operator*(const Eigen::Matrix< double, -1, -1 > &other) const │ │ │ │ -Multiply ParameterMatrix with an Eigen matrix. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:152 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_- │ │ │ │ -ParameterMatrix< M > operator-(const Eigen::Matrix< double, -1, 1 > &other) │ │ │ │ -const │ │ │ │ -Subtract a MxN-sized vector from the ParameterMatrix. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:141 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_r_o_w │ │ │ │ -Eigen::Matrix< double, 1, -1 > row(size_t index) const │ │ │ │ -Get the matrix row specified by index. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:77 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x │ │ │ │ -ParameterMatrix(const size_t N) │ │ │ │ -Create ParameterMatrix using the number of basis points. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:53 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_I_d_e_n_t_i_t_y │ │ │ │ -static ParameterMatrix Identity() │ │ │ │ -Identity function to satisfy VectorSpace traits. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:192 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_s_e_t_Z_e_r_o │ │ │ │ -void setZero() │ │ │ │ -Set all matrix coefficients to zero. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:108 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_m_a_t_r_i_x │ │ │ │ -MatrixType matrix() const │ │ │ │ -Get the underlying matrix. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:68 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x │ │ │ │ -ParameterMatrix(const MatrixType &matrix) │ │ │ │ -Create ParameterMatrix from an MxN Eigen Matrix. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:59 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_c_o_l │ │ │ │ -Eigen::Matrix< double, M, 1 > col(size_t index) const │ │ │ │ -Get the matrix column specified by index. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:93 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_v_e_c_t_o_r │ │ │ │ -Vector vector() const │ │ │ │ -Convert to vector form, is done row-wise. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:180 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const ParameterMatrix< M > &other, double tol=1e-8) const │ │ │ │ -Check for equality up to absolute tolerance. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:172 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_+ │ │ │ │ -ParameterMatrix< M > operator+(const ParameterMatrix< M > &other) const │ │ │ │ -Add a ParameterMatrix to another. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:114 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_r_o_w_s │ │ │ │ -size_t rows() const │ │ │ │ -Get the number of rows. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:62 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_r_o_w │ │ │ │ -auto row(size_t index) -> Eigen::Block< MatrixType, 1, -1, false > │ │ │ │ -Set the matrix row specified by index. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:85 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_p_r_i_n_t │ │ │ │ -void print(const std::string &s="") const │ │ │ │ -Print the ParameterMatrix. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:163 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_c_o_l │ │ │ │ -auto col(size_t index) -> Eigen::Block< MatrixType, M, 1, true > │ │ │ │ -Set the matrix column specified by index. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:101 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_+ │ │ │ │ -ParameterMatrix< M > operator+(const Eigen::Matrix< double, -1, 1 > &other) │ │ │ │ -const │ │ │ │ -Add a MxN-sized vector to the ParameterMatrix. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:122 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_- │ │ │ │ -ParameterMatrix< M > operator-(const ParameterMatrix< M > &other) const │ │ │ │ -Subtract a ParameterMatrix from another. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:133 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_d_i_m │ │ │ │ -size_t dim() const │ │ │ │ -Returns dimensionality of the tangent space. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:177 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_c_o_l_s │ │ │ │ -size_t cols() const │ │ │ │ -Get the number of columns. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:65 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_t_r_a_n_s_p_o_s_e │ │ │ │ -Eigen::Matrix< double, -1, M > transpose() const │ │ │ │ -Return the tranpose of the underlying matrix. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:71 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_i_s │ │ │ │ - * _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_._h │ │ │ │ + * _B_a_s_i_s_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00155.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Fourier.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Chebyshev2.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,43 +96,46 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
Fourier.h File Reference
│ │ │ +
Chebyshev2.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Fourier decomposition, see e.g. │ │ │ +

Pseudo-spectral parameterization for Chebyshev polynomials of the second kind. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │

│ │ │ Classes

class  gtsam::FourierBasis
 Fourier basis. More...
class  gtsam::Chebyshev2
 Chebyshev Interpolation on Chebyshev points of the second kind Note that N here, the number of points, is one less than N from 'Approximation Theory and Approximation Practice by L. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │

Detailed Description

│ │ │ -

Fourier decomposition, see e.g.

│ │ │ -

http://mathworld.wolfram.com/FourierSeries.html

Author
Varun Agrawal, Frank Dellaert
│ │ │ +

Pseudo-spectral parameterization for Chebyshev polynomials of the second kind.

│ │ │ +

In a pseudo-spectral case, rather than the parameters acting as weights for the bases polynomials (as in Chebyshev2Basis), here the parameters are the values at a specific set of points in the interval, the "Chebyshev points". These values uniquely determine the polynomial that interpolates them at the Chebyshev points.

│ │ │ +

This is different from Chebyshev.h since it leverage ideas from pseudo-spectral optimization, i.e. we don't decompose into basis functions, rather estimate function values at the Chebyshev points.

│ │ │ +

Please refer to Agrawal21icra for more details.

│ │ │ +
Author
Varun Agrawal, Jing Dong, Frank Dellaert
│ │ │
Date
July 4, 2020
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +1,39 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -Fourier.h File Reference │ │ │ │ -Fourier decomposition, see e.g. _M_o_r_e_._._. │ │ │ │ +Chebyshev2.h File Reference │ │ │ │ +Pseudo-spectral parameterization for Chebyshev polynomials of the second kind. │ │ │ │ +_M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_F_o_u_r_i_e_r_B_a_s_i_s │ │ │ │ -  Fourier basis. _M_o_r_e_._._. │ │ │ │ +class   _g_t_s_a_m_:_:_C_h_e_b_y_s_h_e_v_2 │ │ │ │ + Chebyshev Interpolation on Chebyshev points of the second kind Note │ │ │ │ +  that N here, the number of points, is one less than N from │ │ │ │ + 'Approximation Theory and Approximation Practice by L. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Fourier decomposition, see e.g. │ │ │ │ -_h_t_t_p_:_/_/_m_a_t_h_w_o_r_l_d_._w_o_l_f_r_a_m_._c_o_m_/_F_o_u_r_i_e_r_S_e_r_i_e_s_._h_t_m_l │ │ │ │ +Pseudo-spectral parameterization for Chebyshev polynomials of the second kind. │ │ │ │ +In a pseudo-spectral case, rather than the parameters acting as weights for the │ │ │ │ +bases polynomials (as in Chebyshev2Basis), here the parameters are the vvaalluueess │ │ │ │ +at a specific set of points in the interval, the "Chebyshev points". These │ │ │ │ +values uniquely determine the polynomial that interpolates them at the │ │ │ │ +Chebyshev points. │ │ │ │ +This is different from _C_h_e_b_y_s_h_e_v_._h since it leverage ideas from pseudo-spectral │ │ │ │ +optimization, i.e. we don't decompose into basis functions, rather estimate │ │ │ │ +function values at the Chebyshev points. │ │ │ │ +Please refer to Agrawal21icra for more details. │ │ │ │ Author │ │ │ │ - Varun Agrawal, Frank Dellaert │ │ │ │ + Varun Agrawal, Jing Dong, Frank Dellaert │ │ │ │ Date │ │ │ │ July 4, 2020 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_i_s │ │ │ │ - * _F_o_u_r_i_e_r_._h │ │ │ │ + * _C_h_e_b_y_s_h_e_v_2_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00155.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ var a00155 = [ │ │ │ │ - ["gtsam::FourierBasis", "a02748.html", null] │ │ │ │ + ["gtsam::Chebyshev2", "a02740.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00155_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Fourier.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Chebyshev2.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,106 +98,122 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Fourier.h
│ │ │ +
Chebyshev2.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
20#pragma once
│ │ │ -
21
│ │ │ -
22#include <gtsam/basis/Basis.h>
│ │ │ -
23
│ │ │ -
24namespace gtsam {
│ │ │ -
25
│ │ │ -
│ │ │ -
27class FourierBasis : public Basis<FourierBasis> {
│ │ │ -
28 public:
│ │ │ -
29 using Parameters = Eigen::Matrix<double, /*Nx1*/ -1, 1>;
│ │ │ -
30 using DiffMatrix = Eigen::Matrix<double, /*NxN*/ -1, -1>;
│ │ │ -
31
│ │ │ -
│ │ │ -
40 static Weights CalculateWeights(size_t N, double x) {
│ │ │ -
41 Weights b(N);
│ │ │ -
42 b[0] = 1;
│ │ │ -
43 for (size_t i = 1, n = 1; i < N; i++) {
│ │ │ -
44 if (i % 2 == 1) {
│ │ │ -
45 b[i] = cos(n * x);
│ │ │ -
46 } else {
│ │ │ -
47 b[i] = sin(n * x);
│ │ │ -
48 n++;
│ │ │ -
49 }
│ │ │ -
50 }
│ │ │ -
51 return b;
│ │ │ -
52 }
│ │ │ -
│ │ │ +
33#pragma once
│ │ │ +
34
│ │ │ +
35#include <gtsam/base/Manifold.h>
│ │ │ + │ │ │ +
37#include <gtsam/basis/Basis.h>
│ │ │ +
38
│ │ │ +
39namespace gtsam {
│ │ │ +
40
│ │ │ +
│ │ │ +
46class GTSAM_EXPORT Chebyshev2 : public Basis<Chebyshev2> {
│ │ │ +
47 public:
│ │ │ +
48 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
│ │ │ +
49
│ │ │ +
50 using Base = Basis<Chebyshev2>;
│ │ │ +
51 using Parameters = Eigen::Matrix<double, /*Nx1*/ -1, 1>;
│ │ │ +
52 using DiffMatrix = Eigen::Matrix<double, /*NxN*/ -1, -1>;
│ │ │
53
│ │ │ +
│ │ │ +
55 static double Point(size_t N, int j) {
│ │ │ +
56 assert(j >= 0 && size_t(j) < N);
│ │ │ +
57 const double dtheta = M_PI / (N > 1 ? (N - 1) : 1);
│ │ │ +
58 // We add -PI so that we get values ordered from -1 to +1
│ │ │ +
59 // sin(- M_PI_2 + dtheta*j); also works
│ │ │ +
60 return cos(-M_PI + dtheta * j);
│ │ │ +
61 }
│ │ │ +
│ │ │ +
62
│ │ │
│ │ │ -
64 static Weights CalculateWeights(size_t N, double x, double a, double b) {
│ │ │ -
65 // TODO(Varun) How do we enforce an interval for Fourier series?
│ │ │ -
66 return CalculateWeights(N, x);
│ │ │ -
67 }
│ │ │ -
│ │ │ -
68
│ │ │ -
│ │ │ -
73 static DiffMatrix DifferentiationMatrix(size_t N) {
│ │ │ -
74 DiffMatrix D = DiffMatrix::Zero(N, N);
│ │ │ -
75 double k = 1;
│ │ │ -
76 for (size_t i = 1; i < N; i += 2) {
│ │ │ -
77 D(i, i + 1) = k; // sin'(k*x) = k*cos(k*x)
│ │ │ -
78 D(i + 1, i) = -k; // cos'(k*x) = -k*sin(k*x)
│ │ │ -
79 k += 1;
│ │ │ -
80 }
│ │ │ -
81
│ │ │ -
82 return D;
│ │ │ -
83 }
│ │ │ -
│ │ │ -
84
│ │ │ -
│ │ │ -
92 static Weights DerivativeWeights(size_t N, double x) {
│ │ │ - │ │ │ -
94 }
│ │ │ -
│ │ │ -
95
│ │ │ -
│ │ │ -
106 static Weights DerivativeWeights(size_t N, double x, double a, double b) {
│ │ │ -
107 return CalculateWeights(N, x, a, b) * DifferentiationMatrix(N);
│ │ │ -
108 }
│ │ │ -
│ │ │ -
109
│ │ │ -
110}; // FourierBasis
│ │ │ -
│ │ │ -
111
│ │ │ -
112} // namespace gtsam
│ │ │ -
Compute an interpolating basis.
│ │ │ +
64 static double Point(size_t N, int j, double a, double b) {
│ │ │ +
65 assert(j >= 0 && size_t(j) < N);
│ │ │ +
66 const double dtheta = M_PI / (N - 1);
│ │ │ +
67 // We add -PI so that we get values ordered from -1 to +1
│ │ │ +
68 return a + (b - a) * (1. + cos(-M_PI + dtheta * j)) / 2;
│ │ │ +
69 }
│ │ │ +
│ │ │ +
70
│ │ │ +
│ │ │ +
72 static Vector Points(size_t N) {
│ │ │ +
73 Vector points(N);
│ │ │ +
74 for (size_t j = 0; j < N; j++) points(j) = Point(N, j);
│ │ │ +
75 return points;
│ │ │ +
76 }
│ │ │ +
│ │ │ +
77
│ │ │ +
│ │ │ +
79 static Vector Points(size_t N, double a, double b) {
│ │ │ +
80 Vector points = Points(N);
│ │ │ +
81 const double T1 = (a + b) / 2, T2 = (b - a) / 2;
│ │ │ +
82 points = T1 + (T2 * points).array();
│ │ │ +
83 return points;
│ │ │ +
84 }
│ │ │ +
│ │ │ +
85
│ │ │ +
94 static Weights CalculateWeights(size_t N, double x, double a = -1,
│ │ │ +
95 double b = 1);
│ │ │ +
96
│ │ │ +
101 static Weights DerivativeWeights(size_t N, double x, double a = -1,
│ │ │ +
102 double b = 1);
│ │ │ +
103
│ │ │ +
108 static DiffMatrix DifferentiationMatrix(size_t N, double a = -1,
│ │ │ +
109 double b = 1);
│ │ │ +
110
│ │ │ +
129 static Weights IntegrationWeights(size_t N, double a = -1, double b = 1);
│ │ │ +
130
│ │ │ +
134 template <size_t M>
│ │ │ +
│ │ │ +
135 static Matrix matrix(std::function<Eigen::Matrix<double, M, 1>(double)> f,
│ │ │ +
136 size_t N, double a = -1, double b = 1) {
│ │ │ +
137 Matrix Xmat(M, N);
│ │ │ +
138 for (size_t j = 0; j < N; j++) {
│ │ │ +
139 Xmat.col(j) = f(Point(N, j, a, b));
│ │ │ +
140 }
│ │ │ +
141 return Xmat;
│ │ │ +
142 }
│ │ │ +
│ │ │ +
143}; // \ Chebyshev2
│ │ │ +
│ │ │ +
144
│ │ │ +
145} // namespace gtsam
│ │ │ +
Special class for optional Jacobian arguments.
│ │ │ +
Base class and basic functions for Manifold types.
│ │ │ +
Compute an interpolating basis.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │
CRTP Base class for function bases.
Definition Basis.h:100
│ │ │ -
Fourier basis.
Definition Fourier.h:27
│ │ │ -
static DiffMatrix DifferentiationMatrix(size_t N)
Compute D = differentiation matrix.
Definition Fourier.h:73
│ │ │ -
static Weights DerivativeWeights(size_t N, double x)
Get weights at a given x that calculate the derivative.
Definition Fourier.h:92
│ │ │ -
static Weights CalculateWeights(size_t N, double x)
Evaluate Real Fourier Weights of size N in interval [a, b], e.g.
Definition Fourier.h:40
│ │ │ -
static Weights DerivativeWeights(size_t N, double x, double a, double b)
Get derivative weights at a given x that calculate the derivative, in the interval [a,...
Definition Fourier.h:106
│ │ │ -
static Weights CalculateWeights(size_t N, double x, double a, double b)
Evaluate Real Fourier Weights of size N in interval [a, b], e.g.
Definition Fourier.h:64
│ │ │ +
Chebyshev Interpolation on Chebyshev points of the second kind Note that N here, the number of points...
Definition Chebyshev2.h:46
│ │ │ +
static double Point(size_t N, int j)
Specific Chebyshev point.
Definition Chebyshev2.h:55
│ │ │ +
static double Point(size_t N, int j, double a, double b)
Specific Chebyshev point, within [a,b] interval.
Definition Chebyshev2.h:64
│ │ │ +
static Vector Points(size_t N)
All Chebyshev points.
Definition Chebyshev2.h:72
│ │ │ +
static Vector Points(size_t N, double a, double b)
All Chebyshev points, within [a,b] interval.
Definition Chebyshev2.h:79
│ │ │ +
static Matrix matrix(std::function< Eigen::Matrix< double, M, 1 >(double)> f, size_t N, double a=-1, double b=1)
Create matrix of values at Chebyshev points given vector-valued function.
Definition Chebyshev2.h:135
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,109 +1,128 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Fourier.h │ │ │ │ +Chebyshev2.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -20#pragma once │ │ │ │ -21 │ │ │ │ -22#include <_g_t_s_a_m_/_b_a_s_i_s_/_B_a_s_i_s_._h> │ │ │ │ -23 │ │ │ │ -24namespace _g_t_s_a_m { │ │ │ │ -25 │ │ │ │ -_2_7class _F_o_u_r_i_e_r_B_a_s_i_s : public _B_a_s_i_s { │ │ │ │ -28 public: │ │ │ │ -29 using Parameters = Eigen::Matrix; │ │ │ │ -30 using DiffMatrix = Eigen::Matrix; │ │ │ │ -31 │ │ │ │ -_4_0 static Weights _C_a_l_c_u_l_a_t_e_W_e_i_g_h_t_s(size_t N, double x) { │ │ │ │ -41 Weights b(N); │ │ │ │ -42 b[0] = 1; │ │ │ │ -43 for (size_t i = 1, n = 1; i < N; i++) { │ │ │ │ -44 if (i % 2 == 1) { │ │ │ │ -45 b[i] = cos(n * x); │ │ │ │ -46 } else { │ │ │ │ -47 b[i] = sin(n * x); │ │ │ │ -48 n++; │ │ │ │ -49 } │ │ │ │ -50 } │ │ │ │ -51 return b; │ │ │ │ -52 } │ │ │ │ +33#pragma once │ │ │ │ +34 │ │ │ │ +35#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_n_i_f_o_l_d_._h> │ │ │ │ +36#include <_g_t_s_a_m_/_b_a_s_e_/_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h> │ │ │ │ +37#include <_g_t_s_a_m_/_b_a_s_i_s_/_B_a_s_i_s_._h> │ │ │ │ +38 │ │ │ │ +39namespace _g_t_s_a_m { │ │ │ │ +40 │ │ │ │ +_4_6class GTSAM_EXPORT _C_h_e_b_y_s_h_e_v_2 : public _B_a_s_i_s { │ │ │ │ +47 public: │ │ │ │ +48 EIGEN_MAKE_ALIGNED_OPERATOR_NEW │ │ │ │ +49 │ │ │ │ +50 using _B_a_s_e = _B_a_s_i_s_<_C_h_e_b_y_s_h_e_v_2_>; │ │ │ │ +51 using Parameters = Eigen::Matrix; │ │ │ │ +52 using DiffMatrix = Eigen::Matrix; │ │ │ │ 53 │ │ │ │ -_6_4 static Weights _C_a_l_c_u_l_a_t_e_W_e_i_g_h_t_s(size_t N, double x, double a, double b) { │ │ │ │ -65 // TODO(Varun) How do we enforce an interval for Fourier series? │ │ │ │ -66 return _C_a_l_c_u_l_a_t_e_W_e_i_g_h_t_s(N, x); │ │ │ │ -67 } │ │ │ │ -68 │ │ │ │ -_7_3 static DiffMatrix _D_i_f_f_e_r_e_n_t_i_a_t_i_o_n_M_a_t_r_i_x(size_t N) { │ │ │ │ -74 DiffMatrix D = DiffMatrix::Zero(N, N); │ │ │ │ -75 double k = 1; │ │ │ │ -76 for (size_t i = 1; i < N; i += 2) { │ │ │ │ -77 D(i, i + 1) = k; // sin'(k*x) = k*cos(k*x) │ │ │ │ -78 D(i + 1, i) = -k; // cos'(k*x) = -k*sin(k*x) │ │ │ │ -79 k += 1; │ │ │ │ -80 } │ │ │ │ -81 │ │ │ │ -82 return D; │ │ │ │ -83 } │ │ │ │ -84 │ │ │ │ -_9_2 static Weights _D_e_r_i_v_a_t_i_v_e_W_e_i_g_h_t_s(size_t N, double x) { │ │ │ │ -93 return _C_a_l_c_u_l_a_t_e_W_e_i_g_h_t_s(N, x) * _D_i_f_f_e_r_e_n_t_i_a_t_i_o_n_M_a_t_r_i_x(N); │ │ │ │ -94 } │ │ │ │ -95 │ │ │ │ -_1_0_6 static Weights _D_e_r_i_v_a_t_i_v_e_W_e_i_g_h_t_s(size_t N, double x, double a, double b) { │ │ │ │ -107 return _C_a_l_c_u_l_a_t_e_W_e_i_g_h_t_s(N, x, a, b) * _D_i_f_f_e_r_e_n_t_i_a_t_i_o_n_M_a_t_r_i_x(N); │ │ │ │ -108 } │ │ │ │ -109 │ │ │ │ -110}; // FourierBasis │ │ │ │ -111 │ │ │ │ -112} // namespace gtsam │ │ │ │ +_5_5 static double _P_o_i_n_t(size_t N, int j) { │ │ │ │ +56 assert(j >= 0 && size_t(j) < N); │ │ │ │ +57 const double dtheta = M_PI / (N > 1 ? (N - 1) : 1); │ │ │ │ +58 // We add -PI so that we get values ordered from -1 to +1 │ │ │ │ +59 // sin(- M_PI_2 + dtheta*j); also works │ │ │ │ +60 return cos(-M_PI + dtheta * j); │ │ │ │ +61 } │ │ │ │ +62 │ │ │ │ +_6_4 static double _P_o_i_n_t(size_t N, int j, double a, double b) { │ │ │ │ +65 assert(j >= 0 && size_t(j) < N); │ │ │ │ +66 const double dtheta = M_PI / (N - 1); │ │ │ │ +67 // We add -PI so that we get values ordered from -1 to +1 │ │ │ │ +68 return a + (b - a) * (1. + cos(-M_PI + dtheta * j)) / 2; │ │ │ │ +69 } │ │ │ │ +70 │ │ │ │ +_7_2 static Vector _P_o_i_n_t_s(size_t N) { │ │ │ │ +73 Vector points(N); │ │ │ │ +74 for (size_t j = 0; j < N; j++) points(j) = Point(N, j); │ │ │ │ +75 return points; │ │ │ │ +76 } │ │ │ │ +77 │ │ │ │ +_7_9 static Vector _P_o_i_n_t_s(size_t N, double a, double b) { │ │ │ │ +80 Vector points = Points(N); │ │ │ │ +81 const double T1 = (a + b) / 2, T2 = (b - a) / 2; │ │ │ │ +82 points = T1 + (T2 * points).array(); │ │ │ │ +83 return points; │ │ │ │ +84 } │ │ │ │ +85 │ │ │ │ +94 static Weights CalculateWeights(size_t N, double x, double a = -1, │ │ │ │ +95 double b = 1); │ │ │ │ +96 │ │ │ │ +101 static Weights DerivativeWeights(size_t N, double x, double a = -1, │ │ │ │ +102 double b = 1); │ │ │ │ +103 │ │ │ │ +108 static DiffMatrix DifferentiationMatrix(size_t N, double a = -1, │ │ │ │ +109 double b = 1); │ │ │ │ +110 │ │ │ │ +129 static Weights IntegrationWeights(size_t N, double a = -1, double b = 1); │ │ │ │ +130 │ │ │ │ +134 template │ │ │ │ +_1_3_5 static Matrix _m_a_t_r_i_x(std::function(double)> f, │ │ │ │ +136 size_t N, double a = -1, double b = 1) { │ │ │ │ +137 Matrix Xmat(M, N); │ │ │ │ +138 for (size_t j = 0; j < N; j++) { │ │ │ │ +139 Xmat.col(j) = f(Point(N, j, a, b)); │ │ │ │ +140 } │ │ │ │ +141 return Xmat; │ │ │ │ +142 } │ │ │ │ +143}; // \ Chebyshev2 │ │ │ │ +144 │ │ │ │ +145} // namespace gtsam │ │ │ │ +_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h │ │ │ │ +Special class for optional Jacobian arguments. │ │ │ │ +_M_a_n_i_f_o_l_d_._h │ │ │ │ +Base class and basic functions for Manifold types. │ │ │ │ _B_a_s_i_s_._h │ │ │ │ Compute an interpolating basis. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ _g_t_s_a_m_:_:_B_a_s_i_s │ │ │ │ CRTP Base class for function bases. │ │ │ │ DDeeffiinniittiioonn Basis.h:100 │ │ │ │ -_g_t_s_a_m_:_:_F_o_u_r_i_e_r_B_a_s_i_s │ │ │ │ -Fourier basis. │ │ │ │ -DDeeffiinniittiioonn Fourier.h:27 │ │ │ │ -_g_t_s_a_m_:_:_F_o_u_r_i_e_r_B_a_s_i_s_:_:_D_i_f_f_e_r_e_n_t_i_a_t_i_o_n_M_a_t_r_i_x │ │ │ │ -static DiffMatrix DifferentiationMatrix(size_t N) │ │ │ │ -Compute D = differentiation matrix. │ │ │ │ -DDeeffiinniittiioonn Fourier.h:73 │ │ │ │ -_g_t_s_a_m_:_:_F_o_u_r_i_e_r_B_a_s_i_s_:_:_D_e_r_i_v_a_t_i_v_e_W_e_i_g_h_t_s │ │ │ │ -static Weights DerivativeWeights(size_t N, double x) │ │ │ │ -Get weights at a given x that calculate the derivative. │ │ │ │ -DDeeffiinniittiioonn Fourier.h:92 │ │ │ │ -_g_t_s_a_m_:_:_F_o_u_r_i_e_r_B_a_s_i_s_:_:_C_a_l_c_u_l_a_t_e_W_e_i_g_h_t_s │ │ │ │ -static Weights CalculateWeights(size_t N, double x) │ │ │ │ -Evaluate Real Fourier Weights of size N in interval [a, b], e.g. │ │ │ │ -DDeeffiinniittiioonn Fourier.h:40 │ │ │ │ -_g_t_s_a_m_:_:_F_o_u_r_i_e_r_B_a_s_i_s_:_:_D_e_r_i_v_a_t_i_v_e_W_e_i_g_h_t_s │ │ │ │ -static Weights DerivativeWeights(size_t N, double x, double a, double b) │ │ │ │ -Get derivative weights at a given x that calculate the derivative, in the │ │ │ │ -interval [a,... │ │ │ │ -DDeeffiinniittiioonn Fourier.h:106 │ │ │ │ -_g_t_s_a_m_:_:_F_o_u_r_i_e_r_B_a_s_i_s_:_:_C_a_l_c_u_l_a_t_e_W_e_i_g_h_t_s │ │ │ │ -static Weights CalculateWeights(size_t N, double x, double a, double b) │ │ │ │ -Evaluate Real Fourier Weights of size N in interval [a, b], e.g. │ │ │ │ -DDeeffiinniittiioonn Fourier.h:64 │ │ │ │ +_g_t_s_a_m_:_:_C_h_e_b_y_s_h_e_v_2 │ │ │ │ +Chebyshev Interpolation on Chebyshev points of the second kind Note that N │ │ │ │ +here, the number of points... │ │ │ │ +DDeeffiinniittiioonn Chebyshev2.h:46 │ │ │ │ +_g_t_s_a_m_:_:_C_h_e_b_y_s_h_e_v_2_:_:_P_o_i_n_t │ │ │ │ +static double Point(size_t N, int j) │ │ │ │ +Specific Chebyshev point. │ │ │ │ +DDeeffiinniittiioonn Chebyshev2.h:55 │ │ │ │ +_g_t_s_a_m_:_:_C_h_e_b_y_s_h_e_v_2_:_:_P_o_i_n_t │ │ │ │ +static double Point(size_t N, int j, double a, double b) │ │ │ │ +Specific Chebyshev point, within [a,b] interval. │ │ │ │ +DDeeffiinniittiioonn Chebyshev2.h:64 │ │ │ │ +_g_t_s_a_m_:_:_C_h_e_b_y_s_h_e_v_2_:_:_P_o_i_n_t_s │ │ │ │ +static Vector Points(size_t N) │ │ │ │ +All Chebyshev points. │ │ │ │ +DDeeffiinniittiioonn Chebyshev2.h:72 │ │ │ │ +_g_t_s_a_m_:_:_C_h_e_b_y_s_h_e_v_2_:_:_P_o_i_n_t_s │ │ │ │ +static Vector Points(size_t N, double a, double b) │ │ │ │ +All Chebyshev points, within [a,b] interval. │ │ │ │ +DDeeffiinniittiioonn Chebyshev2.h:79 │ │ │ │ +_g_t_s_a_m_:_:_C_h_e_b_y_s_h_e_v_2_:_:_m_a_t_r_i_x │ │ │ │ +static Matrix matrix(std::function< Eigen::Matrix< double, M, 1 >(double)> f, │ │ │ │ +size_t N, double a=-1, double b=1) │ │ │ │ +Create matrix of values at Chebyshev points given vector-valued function. │ │ │ │ +DDeeffiinniittiioonn Chebyshev2.h:135 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_i_s │ │ │ │ - * _F_o_u_r_i_e_r_._h │ │ │ │ + * _C_h_e_b_y_s_h_e_v_2_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00158.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/FitBasis.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Chebyshev2.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,57 +94,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Typedefs
│ │ │ -
FitBasis.h File Reference
│ │ │ +Namespaces
│ │ │ +
Chebyshev2.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Fit a Basis using least-squares. │ │ │ +

Chebyshev parameterizations on Chebyshev points of second kind. │ │ │ More...

│ │ │ - │ │ │ -

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  gtsam::FitBasis< Basis >
 Class that does regression via least squares Example usage: size_t N = 3; auto fit = FitBasis<Chebyshev2>(data_points, noise_model, N); Vector coefficients = fit.parameters();. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Typedefs

│ │ │ -using gtsam::Sequence = std::map< double, double >
 Our sequence representation is a map of {x: y} values where y = f(x)
 
│ │ │ -using gtsam::Sample = std::pair< double, double >
 A sample is a key-value pair from a sequence.
 
│ │ │

Detailed Description

│ │ │ -

Fit a Basis using least-squares.

│ │ │ +

Chebyshev parameterizations on Chebyshev points of second kind.

│ │ │ +
Author
Varun Agrawal, Jing Dong, Frank Dellaert
│ │ │
Date
July 4, 2020
│ │ │ -
Author
Varun Agrawal, Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,36 +1,22 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ -FitBasis.h File Reference │ │ │ │ -Fit a Basis using least-squares. _M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_F_i_t_B_a_s_i_s_<_ _B_a_s_i_s_ _> │ │ │ │ - Class that does regression via least squares Example usage: size_t N = │ │ │ │ -  3; auto fit = FitBasis(data_points, noise_model, N); Vector │ │ │ │ - coefficients = fit.parameters();. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +Chebyshev2.cpp File Reference │ │ │ │ +Chebyshev parameterizations on Chebyshev points of second kind. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -using  ggttssaamm::::SSeeqquueennccee = std::map< double, double > │ │ │ │ -  Our sequence representation is a map of {x: y} values where y = f(x) │ │ │ │ -  │ │ │ │ -using  ggttssaamm::::SSaammppllee = std::pair< double, double > │ │ │ │ -  A sample is a key-value pair from a sequence. │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Fit a Basis using least-squares. │ │ │ │ +Chebyshev parameterizations on Chebyshev points of second kind. │ │ │ │ + Author │ │ │ │ + Varun Agrawal, Jing Dong, Frank Dellaert │ │ │ │ Date │ │ │ │ July 4, 2020 │ │ │ │ - Author │ │ │ │ - Varun Agrawal, Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_i_s │ │ │ │ - * _F_i_t_B_a_s_i_s_._h │ │ │ │ + * _C_h_e_b_y_s_h_e_v_2_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00161.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Chebyshev2.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Chebyshev.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,48 +94,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
Chebyshev2.h File Reference
│ │ │ +
Chebyshev.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Pseudo-spectral parameterization for Chebyshev polynomials of the second kind. │ │ │ +

Chebyshev basis decompositions. │ │ │ More...

│ │ │ - │ │ │ -

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  gtsam::Chebyshev2
 Chebyshev Interpolation on Chebyshev points of the second kind Note that N here, the number of points, is one less than N from 'Approximation Theory and Approximation Practice by L. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │

Detailed Description

│ │ │ -

Pseudo-spectral parameterization for Chebyshev polynomials of the second kind.

│ │ │ -

In a pseudo-spectral case, rather than the parameters acting as weights for the bases polynomials (as in Chebyshev2Basis), here the parameters are the values at a specific set of points in the interval, the "Chebyshev points". These values uniquely determine the polynomial that interpolates them at the Chebyshev points.

│ │ │ -

This is different from Chebyshev.h since it leverage ideas from pseudo-spectral optimization, i.e. we don't decompose into basis functions, rather estimate function values at the Chebyshev points.

│ │ │ -

Please refer to Agrawal21icra for more details.

│ │ │ +

Chebyshev basis decompositions.

│ │ │
Author
Varun Agrawal, Jing Dong, Frank Dellaert
│ │ │
Date
July 4, 2020
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,39 +1,22 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -Chebyshev2.h File Reference │ │ │ │ -Pseudo-spectral parameterization for Chebyshev polynomials of the second kind. │ │ │ │ -_M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_C_h_e_b_y_s_h_e_v_2 │ │ │ │ - Chebyshev Interpolation on Chebyshev points of the second kind Note │ │ │ │ -  that N here, the number of points, is one less than N from │ │ │ │ - 'Approximation Theory and Approximation Practice by L. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +Chebyshev.cpp File Reference │ │ │ │ +Chebyshev basis decompositions. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Pseudo-spectral parameterization for Chebyshev polynomials of the second kind. │ │ │ │ -In a pseudo-spectral case, rather than the parameters acting as weights for the │ │ │ │ -bases polynomials (as in Chebyshev2Basis), here the parameters are the vvaalluueess │ │ │ │ -at a specific set of points in the interval, the "Chebyshev points". These │ │ │ │ -values uniquely determine the polynomial that interpolates them at the │ │ │ │ -Chebyshev points. │ │ │ │ -This is different from _C_h_e_b_y_s_h_e_v_._h since it leverage ideas from pseudo-spectral │ │ │ │ -optimization, i.e. we don't decompose into basis functions, rather estimate │ │ │ │ -function values at the Chebyshev points. │ │ │ │ -Please refer to Agrawal21icra for more details. │ │ │ │ +Chebyshev basis decompositions. │ │ │ │ Author │ │ │ │ Varun Agrawal, Jing Dong, Frank Dellaert │ │ │ │ Date │ │ │ │ July 4, 2020 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_i_s │ │ │ │ - * _C_h_e_b_y_s_h_e_v_2_._h │ │ │ │ + * _C_h_e_b_y_s_h_e_v_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00164.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Chebyshev2.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Fourier.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,36 +94,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces
│ │ │ -
Chebyshev2.cpp File Reference
│ │ │ +
Fourier.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Chebyshev parameterizations on Chebyshev points of second kind. │ │ │ +

Fourier decomposition, see e.g. │ │ │ More...

│ │ │ + │ │ │ +

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

class  gtsam::FourierBasis
 Fourier basis. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │

Detailed Description

│ │ │ -

Chebyshev parameterizations on Chebyshev points of second kind.

│ │ │ -
Author
Varun Agrawal, Jing Dong, Frank Dellaert
│ │ │ +

Fourier decomposition, see e.g.

│ │ │ +

http://mathworld.wolfram.com/FourierSeries.html

Author
Varun Agrawal, Frank Dellaert
│ │ │
Date
July 4, 2020
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,22 +1,28 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -Chebyshev2.cpp File Reference │ │ │ │ -Chebyshev parameterizations on Chebyshev points of second kind. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +Fourier.h File Reference │ │ │ │ +Fourier decomposition, see e.g. _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +class   _g_t_s_a_m_:_:_F_o_u_r_i_e_r_B_a_s_i_s │ │ │ │ +  Fourier basis. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Chebyshev parameterizations on Chebyshev points of second kind. │ │ │ │ +Fourier decomposition, see e.g. │ │ │ │ +_h_t_t_p_:_/_/_m_a_t_h_w_o_r_l_d_._w_o_l_f_r_a_m_._c_o_m_/_F_o_u_r_i_e_r_S_e_r_i_e_s_._h_t_m_l │ │ │ │ Author │ │ │ │ - Varun Agrawal, Jing Dong, Frank Dellaert │ │ │ │ + Varun Agrawal, Frank Dellaert │ │ │ │ Date │ │ │ │ July 4, 2020 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_i_s │ │ │ │ - * _C_h_e_b_y_s_h_e_v_2_._c_p_p │ │ │ │ + * _F_o_u_r_i_e_r_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00167.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Chebyshev.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/ParameterMatrix.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,47 +95,54 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
Chebyshev.h File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
ParameterMatrix.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Chebyshev basis decompositions. │ │ │ +

Define ParameterMatrix class which is used to store values at interpolation points. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ │ │ │

│ │ │ Classes

struct  gtsam::Chebyshev1Basis
 Basis of Chebyshev polynomials of the first kind https://en.wikipedia.org/wiki/Chebyshev_polynomials#First_kind These are typically denoted with the symbol T_n, where n is the degree. More...
class  gtsam::ParameterMatrix< M >
 A matrix abstraction of MxN values at the Basis points. More...
 
struct  gtsam::Chebyshev2Basis
 Basis of Chebyshev polynomials of the second kind. More...
struct  gtsam::traits< ParameterMatrix< M > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

│ │ │ +template<int M>
std::ostream & gtsam::operator<< (std::ostream &os, const ParameterMatrix< M > &parameterMatrix)
 
│ │ │

Detailed Description

│ │ │ -

Chebyshev basis decompositions.

│ │ │ -
Author
Varun Agrawal, Jing Dong, Frank Dellaert
│ │ │ -
Date
July 4, 2020
│ │ │ +

Define ParameterMatrix class which is used to store values at interpolation points.

│ │ │ +
Author
Varun Agrawal, Frank Dellaert
│ │ │ +
Date
September 21, 2020
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,32 +1,36 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -Chebyshev.h File Reference │ │ │ │ -Chebyshev basis decompositions. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +ParameterMatrix.h File Reference │ │ │ │ +Define ParameterMatrix class which is used to store values at interpolation │ │ │ │ +points. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _g_t_s_a_m_:_:_C_h_e_b_y_s_h_e_v_1_B_a_s_i_s │ │ │ │ - _B_a_s_i_s of Chebyshev polynomials of the first kind _h_t_t_p_s_:_/_/ │ │ │ │ -  _e_n_._w_i_k_i_p_e_d_i_a_._o_r_g_/_w_i_k_i_/_C_h_e_b_y_s_h_e_v___p_o_l_y_n_o_m_i_a_l_s_#_F_i_r_s_t___k_i_n_d These are │ │ │ │ - typically denoted with the symbol T_n, where n is the degree. _M_o_r_e_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_ _M_ _> │ │ │ │ +  A matrix abstraction of MxN values at the _B_a_s_i_s points. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_C_h_e_b_y_s_h_e_v_2_B_a_s_i_s │ │ │ │ -  _B_a_s_i_s of Chebyshev polynomials of the second kind. _M_o_r_e_._._. │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_ _M_ _>_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ +std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x< M > │ │ │ │ + ¶meterMatrix) │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Chebyshev basis decompositions. │ │ │ │ +Define ParameterMatrix class which is used to store values at interpolation │ │ │ │ +points. │ │ │ │ Author │ │ │ │ - Varun Agrawal, Jing Dong, Frank Dellaert │ │ │ │ + Varun Agrawal, Frank Dellaert │ │ │ │ Date │ │ │ │ - July 4, 2020 │ │ │ │ + September 21, 2020 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_i_s │ │ │ │ - * _C_h_e_b_y_s_h_e_v_._h │ │ │ │ + * _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00167.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,4 @@ │ │ │ │ var a00167 = [ │ │ │ │ - ["gtsam::Chebyshev1Basis", "a02732.html", null], │ │ │ │ - ["gtsam::Chebyshev2Basis", "a02736.html", null] │ │ │ │ + ["gtsam::ParameterMatrix< M >", "a02752.html", "a02752"], │ │ │ │ + ["gtsam::traits< ParameterMatrix< M > >", "a02756.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00167_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Chebyshev.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/ParameterMatrix.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,72 +98,208 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Chebyshev.h
│ │ │ +
ParameterMatrix.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
19#pragma once
│ │ │ -
20
│ │ │ -
21#include <gtsam/base/Manifold.h>
│ │ │ -
22#include <gtsam/basis/Basis.h>
│ │ │ -
23
│ │ │ -
24namespace gtsam {
│ │ │ +
20#pragma once
│ │ │ +
21
│ │ │ +
22#include <gtsam/base/Matrix.h>
│ │ │ +
23#include <gtsam/base/Testable.h>
│ │ │ +
24#include <gtsam/base/VectorSpace.h>
│ │ │
25
│ │ │ -
│ │ │ -
32struct GTSAM_EXPORT Chebyshev1Basis : Basis<Chebyshev1Basis> {
│ │ │ -
33 using Parameters = Eigen::Matrix<double, -1, 1 /*Nx1*/>;
│ │ │ -
34
│ │ │ -
35 Parameters parameters_;
│ │ │ -
36
│ │ │ -
45 static Weights CalculateWeights(size_t N, double x, double a = -1,
│ │ │ -
46 double b = 1);
│ │ │ -
47
│ │ │ -
66 static Weights DerivativeWeights(size_t N, double x, double a = -1,
│ │ │ -
67 double b = 1);
│ │ │ -
68}; // Chebyshev1Basis
│ │ │ -
│ │ │ +
26#include <iostream>
│ │ │ +
27
│ │ │ +
28namespace gtsam {
│ │ │ +
29
│ │ │ +
37template <int M>
│ │ │ +
│ │ │ + │ │ │ +
39 using MatrixType = Eigen::Matrix<double, M, -1>;
│ │ │ +
40
│ │ │ +
41 private:
│ │ │ +
42 MatrixType matrix_;
│ │ │ +
43
│ │ │ +
44 public:
│ │ │ +
45 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
│ │ │ +
46
│ │ │ +
47 enum { dimension = Eigen::Dynamic };
│ │ │ +
48
│ │ │ +
53 ParameterMatrix(const size_t N) : matrix_(M, N) { matrix_.setZero(); }
│ │ │ +
54
│ │ │ +
59 ParameterMatrix(const MatrixType& matrix) : matrix_(matrix) {}
│ │ │ +
60
│ │ │ +
62 size_t rows() const { return matrix_.rows(); }
│ │ │ +
63
│ │ │ +
65 size_t cols() const { return matrix_.cols(); }
│ │ │ +
66
│ │ │ +
68 MatrixType matrix() const { return matrix_; }
│ │ │
69
│ │ │ -
│ │ │ -
80struct GTSAM_EXPORT Chebyshev2Basis : Basis<Chebyshev2Basis> {
│ │ │ -
81 using Parameters = Eigen::Matrix<double, -1, 1 /*Nx1*/>;
│ │ │ -
82
│ │ │ -
91 static Weights CalculateWeights(size_t N, double x, double a = -1,
│ │ │ -
92 double b = 1);
│ │ │ -
93
│ │ │ -
103 static Weights DerivativeWeights(size_t N, double x, double a = -1,
│ │ │ -
104 double b = 1);
│ │ │ -
105}; // Chebyshev2Basis
│ │ │ -
│ │ │ -
106
│ │ │ -
107} // namespace gtsam
│ │ │ -
Base class and basic functions for Manifold types.
│ │ │ -
Compute an interpolating basis.
│ │ │ +
71 Eigen::Matrix<double, -1, M> transpose() const { return matrix_.transpose(); }
│ │ │ +
72
│ │ │ +
│ │ │ +
77 Eigen::Matrix<double, 1, -1> row(size_t index) const {
│ │ │ +
78 return matrix_.row(index);
│ │ │ +
79 }
│ │ │ +
│ │ │ +
80
│ │ │ +
│ │ │ +
85 auto row(size_t index) -> Eigen::Block<MatrixType, 1, -1, false> {
│ │ │ +
86 return matrix_.row(index);
│ │ │ +
87 }
│ │ │ +
│ │ │ +
88
│ │ │ +
│ │ │ +
93 Eigen::Matrix<double, M, 1> col(size_t index) const {
│ │ │ +
94 return matrix_.col(index);
│ │ │ +
95 }
│ │ │ +
│ │ │ +
96
│ │ │ +
│ │ │ +
101 auto col(size_t index) -> Eigen::Block<MatrixType, M, 1, true> {
│ │ │ +
102 return matrix_.col(index);
│ │ │ +
103 }
│ │ │ +
│ │ │ +
104
│ │ │ +
108 void setZero() { matrix_.setZero(); }
│ │ │ +
109
│ │ │ +
│ │ │ + │ │ │ +
115 return ParameterMatrix<M>(matrix_ + other.matrix());
│ │ │ +
116 }
│ │ │ +
│ │ │ +
117
│ │ │ +
│ │ │ + │ │ │ +
123 const Eigen::Matrix<double, -1, 1>& other) const {
│ │ │ +
124 // This form avoids a deep copy and instead typecasts `other`.
│ │ │ +
125 Eigen::Map<const MatrixType> other_(other.data(), M, cols());
│ │ │ +
126 return ParameterMatrix<M>(matrix_ + other_);
│ │ │ +
127 }
│ │ │ +
│ │ │ +
128
│ │ │ +
│ │ │ + │ │ │ +
134 return ParameterMatrix<M>(matrix_ - other.matrix());
│ │ │ +
135 }
│ │ │ +
│ │ │ +
136
│ │ │ +
│ │ │ + │ │ │ +
142 const Eigen::Matrix<double, -1, 1>& other) const {
│ │ │ +
143 Eigen::Map<const MatrixType> other_(other.data(), M, cols());
│ │ │ +
144 return ParameterMatrix<M>(matrix_ - other_);
│ │ │ +
145 }
│ │ │ +
│ │ │ +
146
│ │ │ +
│ │ │ +
152 MatrixType operator*(const Eigen::Matrix<double, -1, -1>& other) const {
│ │ │ +
153 return matrix_ * other;
│ │ │ +
154 }
│ │ │ +
│ │ │ +
155
│ │ │ +
158
│ │ │ +
│ │ │ +
163 void print(const std::string& s = "") const {
│ │ │ +
164 std::cout << (s == "" ? s : s + " ") << matrix_ << std::endl;
│ │ │ +
165 }
│ │ │ +
│ │ │ +
166
│ │ │ +
│ │ │ +
172 bool equals(const ParameterMatrix<M>& other, double tol = 1e-8) const {
│ │ │ +
173 return gtsam::equal_with_abs_tol(matrix_, other.matrix(), tol);
│ │ │ +
174 }
│ │ │ +
│ │ │ +
175
│ │ │ +
177 inline size_t dim() const { return matrix_.size(); }
│ │ │ +
178
│ │ │ +
│ │ │ +
180 inline Vector vector() const {
│ │ │ +
181 using RowMajor = Eigen::Matrix<double, -1, -1, Eigen::RowMajor>;
│ │ │ +
182 Vector result(matrix_.size());
│ │ │ +
183 Eigen::Map<RowMajor>(&result(0), rows(), cols()) = matrix_;
│ │ │ +
184 return result;
│ │ │ +
185 }
│ │ │ +
│ │ │ +
186
│ │ │ +
│ │ │ +
192 inline static ParameterMatrix Identity() {
│ │ │ +
193 // throw std::runtime_error(
│ │ │ +
194 // "ParameterMatrix::Identity(): Don't use this function");
│ │ │ +
195 return ParameterMatrix(0);
│ │ │ +
196 }
│ │ │ +
│ │ │ +
197
│ │ │ +
199};
│ │ │ +
│ │ │ +
200
│ │ │ +
201// traits for ParameterMatrix
│ │ │ +
202template <int M>
│ │ │ +
│ │ │ + │ │ │ +
204 : public internal::VectorSpace<ParameterMatrix<M>> {};
│ │ │ +
│ │ │ +
205
│ │ │ +
206/* ************************************************************************* */
│ │ │ +
207// Stream operator that takes a ParameterMatrix. Used for printing.
│ │ │ +
208template <int M>
│ │ │ +
209inline std::ostream& operator<<(std::ostream& os,
│ │ │ +
210 const ParameterMatrix<M>& parameterMatrix) {
│ │ │ +
211 os << parameterMatrix.matrix();
│ │ │ +
212 return os;
│ │ │ +
213}
│ │ │ +
214
│ │ │ +
215} // namespace gtsam
│ │ │ +
typedef and functions to augment Eigen's MatrixXd
│ │ │ +
Concept check for values that can be used in unit tests.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
CRTP Base class for function bases.
Definition Basis.h:100
│ │ │ -
Basis of Chebyshev polynomials of the first kind https://en.wikipedia.org/wiki/Chebyshev_polynomials#...
Definition Chebyshev.h:32
│ │ │ -
Basis of Chebyshev polynomials of the second kind.
Definition Chebyshev.h:80
│ │ │ +
bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen::DenseBase< MATRIX > &B, double tol=1e-9)
equals with a tolerance
Definition Matrix.h:81
│ │ │ +
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ +
VectorSpace provides both Testable and VectorSpaceTraits.
Definition VectorSpace.h:207
│ │ │ +
A matrix abstraction of MxN values at the Basis points.
Definition ParameterMatrix.h:38
│ │ │ +
MatrixType operator*(const Eigen::Matrix< double, -1, -1 > &other) const
Multiply ParameterMatrix with an Eigen matrix.
Definition ParameterMatrix.h:152
│ │ │ +
ParameterMatrix< M > operator-(const Eigen::Matrix< double, -1, 1 > &other) const
Subtract a MxN-sized vector from the ParameterMatrix.
Definition ParameterMatrix.h:141
│ │ │ +
Eigen::Matrix< double, 1, -1 > row(size_t index) const
Get the matrix row specified by index.
Definition ParameterMatrix.h:77
│ │ │ +
ParameterMatrix(const size_t N)
Create ParameterMatrix using the number of basis points.
Definition ParameterMatrix.h:53
│ │ │ +
static ParameterMatrix Identity()
Identity function to satisfy VectorSpace traits.
Definition ParameterMatrix.h:192
│ │ │ +
void setZero()
Set all matrix coefficients to zero.
Definition ParameterMatrix.h:108
│ │ │ +
MatrixType matrix() const
Get the underlying matrix.
Definition ParameterMatrix.h:68
│ │ │ +
ParameterMatrix(const MatrixType &matrix)
Create ParameterMatrix from an MxN Eigen Matrix.
Definition ParameterMatrix.h:59
│ │ │ +
Eigen::Matrix< double, M, 1 > col(size_t index) const
Get the matrix column specified by index.
Definition ParameterMatrix.h:93
│ │ │ +
Vector vector() const
Convert to vector form, is done row-wise.
Definition ParameterMatrix.h:180
│ │ │ +
bool equals(const ParameterMatrix< M > &other, double tol=1e-8) const
Check for equality up to absolute tolerance.
Definition ParameterMatrix.h:172
│ │ │ +
ParameterMatrix< M > operator+(const ParameterMatrix< M > &other) const
Add a ParameterMatrix to another.
Definition ParameterMatrix.h:114
│ │ │ +
size_t rows() const
Get the number of rows.
Definition ParameterMatrix.h:62
│ │ │ +
auto row(size_t index) -> Eigen::Block< MatrixType, 1, -1, false >
Set the matrix row specified by index.
Definition ParameterMatrix.h:85
│ │ │ +
void print(const std::string &s="") const
Print the ParameterMatrix.
Definition ParameterMatrix.h:163
│ │ │ +
auto col(size_t index) -> Eigen::Block< MatrixType, M, 1, true >
Set the matrix column specified by index.
Definition ParameterMatrix.h:101
│ │ │ +
ParameterMatrix< M > operator+(const Eigen::Matrix< double, -1, 1 > &other) const
Add a MxN-sized vector to the ParameterMatrix.
Definition ParameterMatrix.h:122
│ │ │ +
ParameterMatrix< M > operator-(const ParameterMatrix< M > &other) const
Subtract a ParameterMatrix from another.
Definition ParameterMatrix.h:133
│ │ │ +
size_t dim() const
Returns dimensionality of the tangent space.
Definition ParameterMatrix.h:177
│ │ │ +
size_t cols() const
Get the number of columns.
Definition ParameterMatrix.h:65
│ │ │ +
Eigen::Matrix< double, -1, M > transpose() const
Return the tranpose of the underlying matrix.
Definition ParameterMatrix.h:71
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,71 +1,252 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Chebyshev.h │ │ │ │ +ParameterMatrix.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -19#pragma once │ │ │ │ -20 │ │ │ │ -21#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_n_i_f_o_l_d_._h> │ │ │ │ -22#include <_g_t_s_a_m_/_b_a_s_i_s_/_B_a_s_i_s_._h> │ │ │ │ -23 │ │ │ │ -24namespace _g_t_s_a_m { │ │ │ │ +20#pragma once │ │ │ │ +21 │ │ │ │ +22#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_._h> │ │ │ │ +23#include <_g_t_s_a_m_/_b_a_s_e_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ +24#include │ │ │ │ 25 │ │ │ │ -_3_2struct GTSAM_EXPORT _C_h_e_b_y_s_h_e_v_1_B_a_s_i_s : _B_a_s_i_s { │ │ │ │ -33 using Parameters = Eigen::Matrix; │ │ │ │ -34 │ │ │ │ -35 Parameters parameters_; │ │ │ │ -36 │ │ │ │ -45 static Weights CalculateWeights(size_t N, double x, double a = -1, │ │ │ │ -46 double b = 1); │ │ │ │ -47 │ │ │ │ -66 static Weights DerivativeWeights(size_t N, double x, double a = -1, │ │ │ │ -67 double b = 1); │ │ │ │ -68}; // Chebyshev1Basis │ │ │ │ +26#include │ │ │ │ +27 │ │ │ │ +28namespace _g_t_s_a_m { │ │ │ │ +29 │ │ │ │ +37template │ │ │ │ +_3_8class _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x { │ │ │ │ +39 using MatrixType = Eigen::Matrix; │ │ │ │ +40 │ │ │ │ +41 private: │ │ │ │ +42 MatrixType matrix_; │ │ │ │ +43 │ │ │ │ +44 public: │ │ │ │ +45 EIGEN_MAKE_ALIGNED_OPERATOR_NEW │ │ │ │ +46 │ │ │ │ +47 enum { dimension = Eigen::Dynamic }; │ │ │ │ +48 │ │ │ │ +_5_3 _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x(const size_t N) : matrix_(M, N) { matrix_.setZero(); } │ │ │ │ +54 │ │ │ │ +_5_9 _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x(const MatrixType& _m_a_t_r_i_x) : matrix_(_m_a_t_r_i_x) {} │ │ │ │ +60 │ │ │ │ +_6_2 size_t _r_o_w_s() const { return matrix_.rows(); } │ │ │ │ +63 │ │ │ │ +_6_5 size_t _c_o_l_s() const { return matrix_.cols(); } │ │ │ │ +66 │ │ │ │ +_6_8 MatrixType _m_a_t_r_i_x() const { return matrix_; } │ │ │ │ 69 │ │ │ │ -_8_0struct GTSAM_EXPORT _C_h_e_b_y_s_h_e_v_2_B_a_s_i_s : _B_a_s_i_s { │ │ │ │ -81 using Parameters = Eigen::Matrix; │ │ │ │ -82 │ │ │ │ -91 static Weights CalculateWeights(size_t N, double x, double a = -1, │ │ │ │ -92 double b = 1); │ │ │ │ -93 │ │ │ │ -103 static Weights DerivativeWeights(size_t N, double x, double a = -1, │ │ │ │ -104 double b = 1); │ │ │ │ -105}; // Chebyshev2Basis │ │ │ │ -106 │ │ │ │ -107} // namespace gtsam │ │ │ │ -_M_a_n_i_f_o_l_d_._h │ │ │ │ -Base class and basic functions for Manifold types. │ │ │ │ -_B_a_s_i_s_._h │ │ │ │ -Compute an interpolating basis. │ │ │ │ +_7_1 Eigen::Matrix _t_r_a_n_s_p_o_s_e() const { return matrix_.transpose(); │ │ │ │ +} │ │ │ │ +72 │ │ │ │ +_7_7 Eigen::Matrix _r_o_w(size_t index) const { │ │ │ │ +78 return matrix_.row(index); │ │ │ │ +79 } │ │ │ │ +80 │ │ │ │ +_8_5 auto _r_o_w(size_t index) -> Eigen::Block { │ │ │ │ +86 return matrix_.row(index); │ │ │ │ +87 } │ │ │ │ +88 │ │ │ │ +_9_3 Eigen::Matrix _c_o_l(size_t index) const { │ │ │ │ +94 return matrix_.col(index); │ │ │ │ +95 } │ │ │ │ +96 │ │ │ │ +_1_0_1 auto _c_o_l(size_t index) -> Eigen::Block { │ │ │ │ +102 return matrix_.col(index); │ │ │ │ +103 } │ │ │ │ +104 │ │ │ │ +_1_0_8 void _s_e_t_Z_e_r_o() { matrix_.setZero(); } │ │ │ │ +109 │ │ │ │ +_1_1_4 _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_> _o_p_e_r_a_t_o_r_+(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& other) const { │ │ │ │ +115 return _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>(matrix_ + other._m_a_t_r_i_x()); │ │ │ │ +116 } │ │ │ │ +117 │ │ │ │ +_1_2_2 _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_> _o_p_e_r_a_t_o_r_+( │ │ │ │ +123 const Eigen::Matrix& other) const { │ │ │ │ +124 // This form avoids a deep copy and instead typecasts `other`. │ │ │ │ +125 Eigen::Map other_(other.data(), M, _c_o_l_s()); │ │ │ │ +126 return _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>(matrix_ + other_); │ │ │ │ +127 } │ │ │ │ +128 │ │ │ │ +_1_3_3 _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_> _o_p_e_r_a_t_o_r_-(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& other) const { │ │ │ │ +134 return _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>(matrix_ - other._m_a_t_r_i_x()); │ │ │ │ +135 } │ │ │ │ +136 │ │ │ │ +_1_4_1 _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_> _o_p_e_r_a_t_o_r_-( │ │ │ │ +142 const Eigen::Matrix& other) const { │ │ │ │ +143 Eigen::Map other_(other.data(), M, _c_o_l_s()); │ │ │ │ +144 return _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>(matrix_ - other_); │ │ │ │ +145 } │ │ │ │ +146 │ │ │ │ +_1_5_2 MatrixType _o_p_e_r_a_t_o_r_*(const Eigen::Matrix& other) const { │ │ │ │ +153 return matrix_ * other; │ │ │ │ +154 } │ │ │ │ +155 │ │ │ │ +158 │ │ │ │ +_1_6_3 void _p_r_i_n_t(const std::string& s = "") const { │ │ │ │ +164 std::cout << (s == "" ? s : s + " ") << matrix_ << std::endl; │ │ │ │ +165 } │ │ │ │ +166 │ │ │ │ +_1_7_2 bool _e_q_u_a_l_s(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& other, double tol = 1e-8) const { │ │ │ │ +173 return _g_t_s_a_m_:_:_e_q_u_a_l___w_i_t_h___a_b_s___t_o_l(matrix_, other._m_a_t_r_i_x(), tol); │ │ │ │ +174 } │ │ │ │ +175 │ │ │ │ +_1_7_7 inline size_t _d_i_m() const { return matrix_.size(); } │ │ │ │ +178 │ │ │ │ +_1_8_0 inline Vector _v_e_c_t_o_r() const { │ │ │ │ +181 using RowMajor = Eigen::Matrix; │ │ │ │ +182 Vector result(matrix_.size()); │ │ │ │ +183 Eigen::Map(&result(0), _r_o_w_s(), _c_o_l_s()) = matrix_; │ │ │ │ +184 return result; │ │ │ │ +185 } │ │ │ │ +186 │ │ │ │ +_1_9_2 inline static _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x _I_d_e_n_t_i_t_y() { │ │ │ │ +193 // throw std::runtime_error( │ │ │ │ +194 // "ParameterMatrix::Identity(): Don't use this function"); │ │ │ │ +195 return _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x(0); │ │ │ │ +196 } │ │ │ │ +197 │ │ │ │ +199}; │ │ │ │ +200 │ │ │ │ +201// traits for ParameterMatrix │ │ │ │ +202template │ │ │ │ +_2_0_3struct _t_r_a_i_t_s<_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x> │ │ │ │ +204 : public _i_n_t_e_r_n_a_l_:_:_V_e_c_t_o_r_S_p_a_c_e> {}; │ │ │ │ +205 │ │ │ │ +206/* ************************************************************************* │ │ │ │ +*/ │ │ │ │ +207// Stream operator that takes a ParameterMatrix. Used for printing. │ │ │ │ +208template │ │ │ │ +209inline std::ostream& operator<<(std::ostream& os, │ │ │ │ +210 const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& parameterMatrix) { │ │ │ │ +211 os << parameterMatrix._m_a_t_r_i_x(); │ │ │ │ +212 return os; │ │ │ │ +213} │ │ │ │ +214 │ │ │ │ +215} // namespace gtsam │ │ │ │ +_M_a_t_r_i_x_._h │ │ │ │ +typedef and functions to augment Eigen's MatrixXd │ │ │ │ +_T_e_s_t_a_b_l_e_._h │ │ │ │ +Concept check for values that can be used in unit tests. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s │ │ │ │ -CRTP Base class for function bases. │ │ │ │ -DDeeffiinniittiioonn Basis.h:100 │ │ │ │ -_g_t_s_a_m_:_:_C_h_e_b_y_s_h_e_v_1_B_a_s_i_s │ │ │ │ -Basis of Chebyshev polynomials of the first kind https://en.wikipedia.org/wiki/ │ │ │ │ -Chebyshev_polynomials#... │ │ │ │ -DDeeffiinniittiioonn Chebyshev.h:32 │ │ │ │ -_g_t_s_a_m_:_:_C_h_e_b_y_s_h_e_v_2_B_a_s_i_s │ │ │ │ -Basis of Chebyshev polynomials of the second kind. │ │ │ │ -DDeeffiinniittiioonn Chebyshev.h:80 │ │ │ │ +_g_t_s_a_m_:_:_e_q_u_a_l___w_i_t_h___a_b_s___t_o_l │ │ │ │ +bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen:: │ │ │ │ +DenseBase< MATRIX > &B, double tol=1e-9) │ │ │ │ +equals with a tolerance │ │ │ │ +DDeeffiinniittiioonn Matrix.h:81 │ │ │ │ +_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ +A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ +that can be centered ... │ │ │ │ +DDeeffiinniittiioonn concepts.h:30 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_V_e_c_t_o_r_S_p_a_c_e │ │ │ │ +VectorSpace provides both Testable and VectorSpaceTraits. │ │ │ │ +DDeeffiinniittiioonn VectorSpace.h:207 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x │ │ │ │ +A matrix abstraction of MxN values at the Basis points. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:38 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ +MatrixType operator*(const Eigen::Matrix< double, -1, -1 > &other) const │ │ │ │ +Multiply ParameterMatrix with an Eigen matrix. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:152 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_- │ │ │ │ +ParameterMatrix< M > operator-(const Eigen::Matrix< double, -1, 1 > &other) │ │ │ │ +const │ │ │ │ +Subtract a MxN-sized vector from the ParameterMatrix. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:141 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_r_o_w │ │ │ │ +Eigen::Matrix< double, 1, -1 > row(size_t index) const │ │ │ │ +Get the matrix row specified by index. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:77 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x │ │ │ │ +ParameterMatrix(const size_t N) │ │ │ │ +Create ParameterMatrix using the number of basis points. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:53 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_I_d_e_n_t_i_t_y │ │ │ │ +static ParameterMatrix Identity() │ │ │ │ +Identity function to satisfy VectorSpace traits. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:192 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_s_e_t_Z_e_r_o │ │ │ │ +void setZero() │ │ │ │ +Set all matrix coefficients to zero. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:108 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_m_a_t_r_i_x │ │ │ │ +MatrixType matrix() const │ │ │ │ +Get the underlying matrix. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:68 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x │ │ │ │ +ParameterMatrix(const MatrixType &matrix) │ │ │ │ +Create ParameterMatrix from an MxN Eigen Matrix. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:59 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_c_o_l │ │ │ │ +Eigen::Matrix< double, M, 1 > col(size_t index) const │ │ │ │ +Get the matrix column specified by index. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:93 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_v_e_c_t_o_r │ │ │ │ +Vector vector() const │ │ │ │ +Convert to vector form, is done row-wise. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:180 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const ParameterMatrix< M > &other, double tol=1e-8) const │ │ │ │ +Check for equality up to absolute tolerance. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:172 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_+ │ │ │ │ +ParameterMatrix< M > operator+(const ParameterMatrix< M > &other) const │ │ │ │ +Add a ParameterMatrix to another. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:114 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_r_o_w_s │ │ │ │ +size_t rows() const │ │ │ │ +Get the number of rows. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:62 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_r_o_w │ │ │ │ +auto row(size_t index) -> Eigen::Block< MatrixType, 1, -1, false > │ │ │ │ +Set the matrix row specified by index. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:85 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_p_r_i_n_t │ │ │ │ +void print(const std::string &s="") const │ │ │ │ +Print the ParameterMatrix. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:163 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_c_o_l │ │ │ │ +auto col(size_t index) -> Eigen::Block< MatrixType, M, 1, true > │ │ │ │ +Set the matrix column specified by index. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:101 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_+ │ │ │ │ +ParameterMatrix< M > operator+(const Eigen::Matrix< double, -1, 1 > &other) │ │ │ │ +const │ │ │ │ +Add a MxN-sized vector to the ParameterMatrix. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:122 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_- │ │ │ │ +ParameterMatrix< M > operator-(const ParameterMatrix< M > &other) const │ │ │ │ +Subtract a ParameterMatrix from another. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:133 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_d_i_m │ │ │ │ +size_t dim() const │ │ │ │ +Returns dimensionality of the tangent space. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:177 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_c_o_l_s │ │ │ │ +size_t cols() const │ │ │ │ +Get the number of columns. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:65 │ │ │ │ +_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_:_:_t_r_a_n_s_p_o_s_e │ │ │ │ +Eigen::Matrix< double, -1, M > transpose() const │ │ │ │ +Return the tranpose of the underlying matrix. │ │ │ │ +DDeeffiinniittiioonn ParameterMatrix.h:71 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_i_s │ │ │ │ - * _C_h_e_b_y_s_h_e_v_._h │ │ │ │ + * _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00170.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Chebyshev.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/FitBasis.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,36 +94,57 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
Chebyshev.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Typedefs
│ │ │ +
FitBasis.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Chebyshev basis decompositions. │ │ │ +

Fit a Basis using least-squares. │ │ │ More...

│ │ │ + │ │ │ +

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

class  gtsam::FitBasis< Basis >
 Class that does regression via least squares Example usage: size_t N = 3; auto fit = FitBasis<Chebyshev2>(data_points, noise_model, N); Vector coefficients = fit.parameters();. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Typedefs

│ │ │ +using gtsam::Sequence = std::map< double, double >
 Our sequence representation is a map of {x: y} values where y = f(x)
 
│ │ │ +using gtsam::Sample = std::pair< double, double >
 A sample is a key-value pair from a sequence.
 
│ │ │

Detailed Description

│ │ │ -

Chebyshev basis decompositions.

│ │ │ -
Author
Varun Agrawal, Jing Dong, Frank Dellaert
│ │ │ +

Fit a Basis using least-squares.

│ │ │
Date
July 4, 2020
│ │ │ +
Author
Varun Agrawal, Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,22 +1,36 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -Chebyshev.cpp File Reference │ │ │ │ -Chebyshev basis decompositions. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ +FitBasis.h File Reference │ │ │ │ +Fit a Basis using least-squares. _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +class   _g_t_s_a_m_:_:_F_i_t_B_a_s_i_s_<_ _B_a_s_i_s_ _> │ │ │ │ + Class that does regression via least squares Example usage: size_t N = │ │ │ │ +  3; auto fit = FitBasis(data_points, noise_model, N); Vector │ │ │ │ + coefficients = fit.parameters();. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +using  ggttssaamm::::SSeeqquueennccee = std::map< double, double > │ │ │ │ +  Our sequence representation is a map of {x: y} values where y = f(x) │ │ │ │ +  │ │ │ │ +using  ggttssaamm::::SSaammppllee = std::pair< double, double > │ │ │ │ +  A sample is a key-value pair from a sequence. │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Chebyshev basis decompositions. │ │ │ │ - Author │ │ │ │ - Varun Agrawal, Jing Dong, Frank Dellaert │ │ │ │ +Fit a Basis using least-squares. │ │ │ │ Date │ │ │ │ July 4, 2020 │ │ │ │ + Author │ │ │ │ + Varun Agrawal, Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_i_s │ │ │ │ - * _C_h_e_b_y_s_h_e_v_._c_p_p │ │ │ │ + * _F_i_t_B_a_s_i_s_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00173_source.html │ │ │ @@ -114,16 +114,16 @@ │ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │
19#pragma once
│ │ │
20
│ │ │ -
21#include <gtsam/basis/Basis.h>
│ │ │ - │ │ │ +
21#include <gtsam/basis/Basis.h>
│ │ │ + │ │ │
23
│ │ │
24namespace gtsam {
│ │ │
25
│ │ │
38template <class BASIS>
│ │ │
│ │ │
39class EvaluationFactor : public FunctorizedFactor<double, Vector> {
│ │ │
40 private:
│ │ │ @@ -319,16 +319,16 @@ │ │ │
│ │ │
429
│ │ │
430 virtual ~ComponentDerivativeFactor() {}
│ │ │
431};
│ │ │ │ │ │
432
│ │ │
433} // namespace gtsam
│ │ │ -
Compute an interpolating basis.
│ │ │ - │ │ │ +
Compute an interpolating basis.
│ │ │ + │ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │
noiseModel::Base::shared_ptr SharedNoiseModel
Aliases.
Definition NoiseModel.h:724
│ │ │
std::uint64_t Key
Integer nonlinear key type.
Definition types.h:100
│ │ │
Factor for enforcing the scalar value of the polynomial BASIS representation at x is the same as the ...
Definition BasisFactors.h:39
│ │ │
EvaluationFactor(Key key, double z, const SharedNoiseModel &model, const size_t N, double x)
Construct a new EvaluationFactor object.
Definition BasisFactors.h:55
│ │ │
EvaluationFactor(Key key, double z, const SharedNoiseModel &model, const size_t N, double x, double a, double b)
Construct a new EvaluationFactor object.
Definition BasisFactors.h:70
│ │ │
Unary factor for enforcing BASIS polynomial evaluation on a ParameterMatrix of size (M,...
Definition BasisFactors.h:96
│ │ ├── ./usr/share/doc/libgtsam-dev/html/a00176.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Basis.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Chebyshev.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,83 +95,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Typedefs | │ │ │ -Functions
│ │ │ -
Basis.h File Reference
│ │ │ +Namespaces
│ │ │ +
Chebyshev.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Compute an interpolating basis. │ │ │ +

Chebyshev basis decompositions. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │

│ │ │ Classes

class  gtsam::Basis< DERIVED >
 CRTP Base class for function bases. More...
struct  gtsam::Chebyshev1Basis
 Basis of Chebyshev polynomials of the first kind https://en.wikipedia.org/wiki/Chebyshev_polynomials#First_kind These are typically denoted with the symbol T_n, where n is the degree. More...
 
class  gtsam::Basis< DERIVED >::EvaluationFunctor
 An instance of an EvaluationFunctor calculates f(x;p) at a given x, applied to Parameters p. More...
 
class  gtsam::Basis< DERIVED >::VectorEvaluationFunctor< M >
 VectorEvaluationFunctor at a given x, applied to ParameterMatrix<M>. More...
 
class  gtsam::Basis< DERIVED >::VectorComponentFunctor< M >
 Given a M*N Matrix of M-vectors at N polynomial points, an instance of VectorComponentFunctor computes the N-vector value for a specific row component of the M-vectors at all the polynomial points. More...
 
class  gtsam::Basis< DERIVED >::ManifoldEvaluationFunctor< T >
 Manifold EvaluationFunctor at a given x, applied to ParameterMatrix<M>. More...
 
class  gtsam::Basis< DERIVED >::DerivativeFunctorBase
 Base class for functors below that calculate derivative weights. More...
 
class  gtsam::Basis< DERIVED >::DerivativeFunctor
 An instance of a DerivativeFunctor calculates f'(x;p) at a given x, applied to Parameters p. More...
 
class  gtsam::Basis< DERIVED >::VectorDerivativeFunctor< M >
 VectorDerivativeFunctor at a given x, applied to ParameterMatrix<M>. More...
 
class  gtsam::Basis< DERIVED >::ComponentDerivativeFunctor< M >
 Given a M*N Matrix of M-vectors at N polynomial points, an instance of ComponentDerivativeFunctor computes the N-vector derivative for a specific row component of the M-vectors at all the polynomial points. More...
struct  gtsam::Chebyshev2Basis
 Basis of Chebyshev polynomials of the second kind. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Typedefs

│ │ │ -using gtsam::Weights = Eigen::Matrix< double, 1, -1 >
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Functions

template<size_t M>
Matrix gtsam::kroneckerProductIdentity (const Weights &w)
 Function for computing the kronecker product of the 1*N Weight vector w with the MxM identity matrix I efficiently.
 
│ │ │

Detailed Description

│ │ │ -

Compute an interpolating basis.

│ │ │ +

Chebyshev basis decompositions.

│ │ │
Author
Varun Agrawal, Jing Dong, Frank Dellaert
│ │ │
Date
July 4, 2020
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,71 +1,32 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Basis.h File Reference │ │ │ │ -Compute an interpolating basis. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +Chebyshev.h File Reference │ │ │ │ +Chebyshev basis decompositions. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _> │ │ │ │ -  CRTP Base class for function bases. _M_o_r_e_._._. │ │ │ │ +struct   _g_t_s_a_m_:_:_C_h_e_b_y_s_h_e_v_1_B_a_s_i_s │ │ │ │ + _B_a_s_i_s of Chebyshev polynomials of the first kind _h_t_t_p_s_:_/_/ │ │ │ │ +  _e_n_._w_i_k_i_p_e_d_i_a_._o_r_g_/_w_i_k_i_/_C_h_e_b_y_s_h_e_v___p_o_l_y_n_o_m_i_a_l_s_#_F_i_r_s_t___k_i_n_d These are │ │ │ │ + typically denoted with the symbol T_n, where n is the degree. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _>_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ -  An instance of an _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r calculates f(x;p) at a given x, │ │ │ │ - applied to Parameters p. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _>_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_<_ _M_ _> │ │ │ │ -  _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r at a given x, applied to ParameterMatrix. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _>_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r_<_ _M_ _> │ │ │ │ - Given a M*N Matrix of M-vectors at N polynomial points, an instance of │ │ │ │ -  _V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r computes the N-vector value for a specific row │ │ │ │ - component of the M-vectors at all the polynomial points. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _>_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_<_ _T_ _> │ │ │ │ -  Manifold _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r at a given x, applied to ParameterMatrix. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _>_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e │ │ │ │ -  Base class for functors below that calculate derivative weights. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _>_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ -  An instance of a _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r calculates f'(x;p) at a given x, │ │ │ │ - applied to Parameters p. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _>_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_<_ _M_ _> │ │ │ │ -  _V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r at a given x, applied to ParameterMatrix. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _>_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_<_ _M_ _> │ │ │ │ - Given a M*N Matrix of M-vectors at N polynomial points, an instance of │ │ │ │ -  _C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r computes the N-vector derivative for a │ │ │ │ - specific row component of the M-vectors at all the polynomial points. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ +struct   _g_t_s_a_m_:_:_C_h_e_b_y_s_h_e_v_2_B_a_s_i_s │ │ │ │ +  _B_a_s_i_s of Chebyshev polynomials of the second kind. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -using  ggttssaamm::::WWeeiigghhttss = Eigen::Matrix< double, 1, -1 > │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -Matrix  _g_t_s_a_m_:_:_k_r_o_n_e_c_k_e_r_P_r_o_d_u_c_t_I_d_e_n_t_i_t_y (const Weights &w) │ │ │ │ -  Function for computing the kronecker product of the 1*N Weight vector w │ │ │ │ - with the MxM identity matrix I efficiently. │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Compute an interpolating basis. │ │ │ │ +Chebyshev basis decompositions. │ │ │ │ Author │ │ │ │ Varun Agrawal, Jing Dong, Frank Dellaert │ │ │ │ Date │ │ │ │ July 4, 2020 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_i_s │ │ │ │ - * _B_a_s_i_s_._h │ │ │ │ + * _C_h_e_b_y_s_h_e_v_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00176.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,11 +1,4 @@ │ │ │ │ var a00176 = [ │ │ │ │ - ["gtsam::Basis< DERIVED >::EvaluationFunctor", "a02672.html", "a02672"], │ │ │ │ - ["gtsam::Basis< DERIVED >::VectorEvaluationFunctor< M >", "a02676.html", "a02676"], │ │ │ │ - ["gtsam::Basis< DERIVED >::VectorComponentFunctor< M >", "a02680.html", "a02680"], │ │ │ │ - ["gtsam::Basis< DERIVED >::ManifoldEvaluationFunctor< T >", "a02684.html", "a02684"], │ │ │ │ - ["gtsam::Basis< DERIVED >::DerivativeFunctorBase", "a02688.html", "a02688"], │ │ │ │ - ["gtsam::Basis< DERIVED >::DerivativeFunctor", "a02692.html", "a02692"], │ │ │ │ - ["gtsam::Basis< DERIVED >::VectorDerivativeFunctor< M >", "a02696.html", "a02696"], │ │ │ │ - ["gtsam::Basis< DERIVED >::ComponentDerivativeFunctor< M >", "a02700.html", "a02700"], │ │ │ │ - ["kroneckerProductIdentity", "a00176.html#ga2ce44d31cae1eda44c2a86d32d92b935", null] │ │ │ │ + ["gtsam::Chebyshev1Basis", "a02732.html", null], │ │ │ │ + ["gtsam::Chebyshev2Basis", "a02736.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00176_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Basis.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Chebyshev.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,15 +98,15 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Basis.h
│ │ │ +
Chebyshev.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │ @@ -114,457 +114,56 @@ │ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │
19#pragma once
│ │ │
20
│ │ │ -
21#include <gtsam/base/Matrix.h>
│ │ │ - │ │ │ - │ │ │ -
24
│ │ │ -
25#include <iostream>
│ │ │ -
26
│ │ │ -
68namespace gtsam {
│ │ │ -
69
│ │ │ -
70using Weights = Eigen::Matrix<double, 1, -1>; /* 1xN vector */
│ │ │ -
71
│ │ │ -
84template <size_t M>
│ │ │ -
│ │ │ -
85Matrix kroneckerProductIdentity(const Weights& w) {
│ │ │ -
86 Matrix result(M, w.cols() * M);
│ │ │ -
87 result.setZero();
│ │ │ -
88
│ │ │ -
89 for (int i = 0; i < w.cols(); i++) {
│ │ │ -
90 result.block(0, i * M, M, M).diagonal().array() = w(i);
│ │ │ -
91 }
│ │ │ -
92 return result;
│ │ │ -
93}
│ │ │ -
│ │ │ -
94
│ │ │ -
99template <typename DERIVED>
│ │ │ -
│ │ │ -
100class Basis {
│ │ │ -
101 public:
│ │ │ -
│ │ │ -
107 static Matrix WeightMatrix(size_t N, const Vector& X) {
│ │ │ -
108 Matrix W(X.size(), N);
│ │ │ -
109 for (int i = 0; i < X.size(); i++)
│ │ │ -
110 W.row(i) = DERIVED::CalculateWeights(N, X(i));
│ │ │ -
111 return W;
│ │ │ -
112 }
│ │ │ -
│ │ │ -
113
│ │ │ -
│ │ │ -
123 static Matrix WeightMatrix(size_t N, const Vector& X, double a, double b) {
│ │ │ -
124 Matrix W(X.size(), N);
│ │ │ -
125 for (int i = 0; i < X.size(); i++)
│ │ │ -
126 W.row(i) = DERIVED::CalculateWeights(N, X(i), a, b);
│ │ │ -
127 return W;
│ │ │ -
128 }
│ │ │ -
│ │ │ -
129
│ │ │ -
│ │ │ - │ │ │ -
138 protected:
│ │ │ -
139 Weights weights_;
│ │ │ -
140
│ │ │ -
141 public:
│ │ │ - │ │ │ -
144
│ │ │ -
│ │ │ -
146 EvaluationFunctor(size_t N, double x)
│ │ │ -
147 : weights_(DERIVED::CalculateWeights(N, x)) {}
│ │ │ -
│ │ │ -
148
│ │ │ -
│ │ │ -
150 EvaluationFunctor(size_t N, double x, double a, double b)
│ │ │ -
151 : weights_(DERIVED::CalculateWeights(N, x, a, b)) {}
│ │ │ -
│ │ │ -
152
│ │ │ -
│ │ │ -
154 double apply(const typename DERIVED::Parameters& p,
│ │ │ -
155 OptionalJacobian<-1, -1> H = boost::none) const {
│ │ │ -
156 if (H) *H = weights_;
│ │ │ -
157 return (weights_ * p)(0);
│ │ │ -
158 }
│ │ │ -
│ │ │ -
159
│ │ │ -
│ │ │ -
161 double operator()(const typename DERIVED::Parameters& p,
│ │ │ -
162 OptionalJacobian<-1, -1> H = boost::none) const {
│ │ │ -
163 return apply(p, H); // might call apply in derived
│ │ │ -
164 }
│ │ │ -
│ │ │ -
165
│ │ │ -
166 void print(const std::string& s = "") const {
│ │ │ -
167 std::cout << s << (s != "" ? " " : "") << weights_ << std::endl;
│ │ │ -
168 }
│ │ │ -
169 };
│ │ │ -
│ │ │ -
170
│ │ │ -
177 template <int M>
│ │ │ -
│ │ │ - │ │ │ -
179 protected:
│ │ │ -
180 using VectorM = Eigen::Matrix<double, M, 1>;
│ │ │ -
181 using Jacobian = Eigen::Matrix<double, /*MxMN*/ M, -1>;
│ │ │ -
182 Jacobian H_;
│ │ │ -
183
│ │ │ -
│ │ │ - │ │ │ -
193 H_ = kroneckerProductIdentity<M>(this->weights_);
│ │ │ -
194 }
│ │ │ -
│ │ │ -
195
│ │ │ -
196 public:
│ │ │ -
197 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
│ │ │ -
198
│ │ │ - │ │ │ -
201
│ │ │ -
│ │ │ -
203 VectorEvaluationFunctor(size_t N, double x) : EvaluationFunctor(N, x) {
│ │ │ - │ │ │ -
205 }
│ │ │ -
│ │ │ -
206
│ │ │ -
│ │ │ -
208 VectorEvaluationFunctor(size_t N, double x, double a, double b)
│ │ │ -
209 : EvaluationFunctor(N, x, a, b) {
│ │ │ - │ │ │ -
211 }
│ │ │ -
│ │ │ -
212
│ │ │ -
│ │ │ -
214 VectorM apply(const ParameterMatrix<M>& P,
│ │ │ -
215 OptionalJacobian</*MxN*/ -1, -1> H = boost::none) const {
│ │ │ -
216 if (H) *H = H_;
│ │ │ -
217 return P.matrix() * this->weights_.transpose();
│ │ │ -
218 }
│ │ │ -
│ │ │ -
219
│ │ │ -
│ │ │ - │ │ │ -
222 OptionalJacobian</*MxN*/ -1, -1> H = boost::none) const {
│ │ │ -
223 return apply(P, H);
│ │ │ -
224 }
│ │ │ -
│ │ │ -
225 };
│ │ │ -
│ │ │ -
226
│ │ │ -
234 template <int M>
│ │ │ -
│ │ │ - │ │ │ -
236 protected:
│ │ │ -
237 using Jacobian = Eigen::Matrix<double, /*1xMN*/ 1, -1>;
│ │ │ -
238 size_t rowIndex_;
│ │ │ -
239 Jacobian H_;
│ │ │ -
240
│ │ │ -
241 /*
│ │ │ -
242 * Calculate the `1*(M*N)` Jacobian of this functor with respect to
│ │ │ -
243 * the M*N parameter matrix `P`.
│ │ │ -
244 * We flatten assuming column-major order, e.g., if N=3 and M=2, we have
│ │ │ -
245 * H=[w(0) 0 w(1) 0 w(2) 0] for rowIndex==0
│ │ │ -
246 * H=[0 w(0) 0 w(1) 0 w(2)] for rowIndex==1
│ │ │ -
247 * i.e., one row of the Kronecker product of weights_ with the
│ │ │ -
248 * MxM identity matrix. See also VectorEvaluationFunctor.
│ │ │ -
249 */
│ │ │ -
250 void calculateJacobian(size_t N) {
│ │ │ -
251 H_.setZero(1, M * N);
│ │ │ -
252 for (int j = 0; j < EvaluationFunctor::weights_.size(); j++)
│ │ │ -
253 H_(0, rowIndex_ + j * M) = EvaluationFunctor::weights_(j);
│ │ │ -
254 }
│ │ │ -
255
│ │ │ -
256 public:
│ │ │ - │ │ │ -
259
│ │ │ -
│ │ │ -
261 VectorComponentFunctor(size_t N, size_t i, double x)
│ │ │ -
262 : EvaluationFunctor(N, x), rowIndex_(i) {
│ │ │ -
263 calculateJacobian(N);
│ │ │ -
264 }
│ │ │ -
│ │ │ -
265
│ │ │ -
│ │ │ -
267 VectorComponentFunctor(size_t N, size_t i, double x, double a, double b)
│ │ │ -
268 : EvaluationFunctor(N, x, a, b), rowIndex_(i) {
│ │ │ -
269 calculateJacobian(N);
│ │ │ -
270 }
│ │ │ -
│ │ │ -
271
│ │ │ -
│ │ │ -
273 double apply(const ParameterMatrix<M>& P,
│ │ │ -
274 OptionalJacobian</*1xMN*/ -1, -1> H = boost::none) const {
│ │ │ -
275 if (H) *H = H_;
│ │ │ -
276 return P.row(rowIndex_) * EvaluationFunctor::weights_.transpose();
│ │ │ -
277 }
│ │ │ -
│ │ │ -
278
│ │ │ -
│ │ │ - │ │ │ -
281 OptionalJacobian</*1xMN*/ -1, -1> H = boost::none) const {
│ │ │ -
282 return apply(P, H);
│ │ │ -
283 }
│ │ │ -
│ │ │ -
284 };
│ │ │ +
21#include <gtsam/base/Manifold.h>
│ │ │ +
22#include <gtsam/basis/Basis.h>
│ │ │ +
23
│ │ │ +
24namespace gtsam {
│ │ │ +
25
│ │ │ +
│ │ │ +
32struct GTSAM_EXPORT Chebyshev1Basis : Basis<Chebyshev1Basis> {
│ │ │ +
33 using Parameters = Eigen::Matrix<double, -1, 1 /*Nx1*/>;
│ │ │ +
34
│ │ │ +
35 Parameters parameters_;
│ │ │ +
36
│ │ │ +
45 static Weights CalculateWeights(size_t N, double x, double a = -1,
│ │ │ +
46 double b = 1);
│ │ │ +
47
│ │ │ +
66 static Weights DerivativeWeights(size_t N, double x, double a = -1,
│ │ │ +
67 double b = 1);
│ │ │ +
68}; // Chebyshev1Basis
│ │ │
│ │ │ -
285
│ │ │ -
299 template <class T>
│ │ │ -
│ │ │ - │ │ │ -
301 : public VectorEvaluationFunctor<traits<T>::dimension> {
│ │ │ -
302 enum { M = traits<T>::dimension };
│ │ │ -
303 using Base = VectorEvaluationFunctor<M>;
│ │ │ -
304
│ │ │ -
305 public:
│ │ │ - │ │ │ -
308
│ │ │ -
310 ManifoldEvaluationFunctor(size_t N, double x) : Base(N, x) {}
│ │ │ -
311
│ │ │ -
│ │ │ -
313 ManifoldEvaluationFunctor(size_t N, double x, double a, double b)
│ │ │ -
314 : Base(N, x, a, b) {}
│ │ │ -
│ │ │ -
315
│ │ │ -
│ │ │ - │ │ │ -
318 OptionalJacobian</*MxMN*/ -1, -1> H = boost::none) const {
│ │ │ -
319 // Interpolate the M-dimensional vector to yield a vector in tangent space
│ │ │ -
320 Eigen::Matrix<double, M, 1> xi = Base::operator()(P, H);
│ │ │ -
321
│ │ │ -
322 // Now call retract with this M-vector, possibly with derivatives
│ │ │ -
323 Eigen::Matrix<double, M, M> D_result_xi;
│ │ │ -
324 T result = T::ChartAtOrigin::Retract(xi, H ? &D_result_xi : 0);
│ │ │ -
325
│ │ │ -
326 // Finally, if derivatives are asked, apply chain rule where H is Mx(M*N)
│ │ │ -
327 // derivative of interpolation and D_result_xi is MxM derivative of
│ │ │ -
328 // retract.
│ │ │ -
329 if (H) *H = D_result_xi * (*H);
│ │ │ -
330
│ │ │ -
331 // and return a T
│ │ │ -
332 return result;
│ │ │ -
333 }
│ │ │ -
│ │ │ -
334
│ │ │ -
│ │ │ - │ │ │ -
337 OptionalJacobian</*MxN*/ -1, -1> H = boost::none) const {
│ │ │ -
338 return apply(P, H); // might call apply in derived
│ │ │ -
339 }
│ │ │ -
│ │ │ -
340 };
│ │ │ -
│ │ │ -
341
│ │ │ -
│ │ │ - │ │ │ -
344 protected:
│ │ │ -
345 Weights weights_;
│ │ │ -
346
│ │ │ -
347 public:
│ │ │ - │ │ │ -
350
│ │ │ -
351 DerivativeFunctorBase(size_t N, double x)
│ │ │ -
352 : weights_(DERIVED::DerivativeWeights(N, x)) {}
│ │ │ -
353
│ │ │ -
354 DerivativeFunctorBase(size_t N, double x, double a, double b)
│ │ │ -
355 : weights_(DERIVED::DerivativeWeights(N, x, a, b)) {}
│ │ │ -
356
│ │ │ -
357 void print(const std::string& s = "") const {
│ │ │ -
358 std::cout << s << (s != "" ? " " : "") << weights_ << std::endl;
│ │ │ -
359 }
│ │ │ -
360 };
│ │ │ -
│ │ │ -
361
│ │ │ -
│ │ │ - │ │ │ -
370 public:
│ │ │ - │ │ │ -
373
│ │ │ -
374 DerivativeFunctor(size_t N, double x) : DerivativeFunctorBase(N, x) {}
│ │ │ -
375
│ │ │ -
376 DerivativeFunctor(size_t N, double x, double a, double b)
│ │ │ -
377 : DerivativeFunctorBase(N, x, a, b) {}
│ │ │ -
378
│ │ │ -
379 double apply(const typename DERIVED::Parameters& p,
│ │ │ -
380 OptionalJacobian</*1xN*/ -1, -1> H = boost::none) const {
│ │ │ -
381 if (H) *H = this->weights_;
│ │ │ -
382 return (this->weights_ * p)(0);
│ │ │ -
383 }
│ │ │ -
│ │ │ -
385 double operator()(const typename DERIVED::Parameters& p,
│ │ │ -
386 OptionalJacobian</*1xN*/ -1, -1> H = boost::none) const {
│ │ │ -
387 return apply(p, H); // might call apply in derived
│ │ │ -
388 }
│ │ │ -
│ │ │ -
389 };
│ │ │ -
│ │ │ -
390
│ │ │ -
399 template <int M>
│ │ │ -
│ │ │ - │ │ │ -
401 protected:
│ │ │ -
402 using VectorM = Eigen::Matrix<double, M, 1>;
│ │ │ -
403 using Jacobian = Eigen::Matrix<double, /*MxMN*/ M, -1>;
│ │ │ -
404 Jacobian H_;
│ │ │ -
405
│ │ │ -
│ │ │ - │ │ │ -
415 H_ = kroneckerProductIdentity<M>(this->weights_);
│ │ │ -
416 }
│ │ │ -
│ │ │ -
417
│ │ │ -
418 public:
│ │ │ -
419 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
│ │ │ -
420
│ │ │ - │ │ │ -
423
│ │ │ -
│ │ │ -
425 VectorDerivativeFunctor(size_t N, double x) : DerivativeFunctorBase(N, x) {
│ │ │ - │ │ │ -
427 }
│ │ │ -
│ │ │ -
428
│ │ │ -
│ │ │ -
430 VectorDerivativeFunctor(size_t N, double x, double a, double b)
│ │ │ -
431 : DerivativeFunctorBase(N, x, a, b) {
│ │ │ - │ │ │ -
433 }
│ │ │ -
│ │ │ -
434
│ │ │ -
435 VectorM apply(const ParameterMatrix<M>& P,
│ │ │ -
436 OptionalJacobian</*MxMN*/ -1, -1> H = boost::none) const {
│ │ │ -
437 if (H) *H = H_;
│ │ │ -
438 return P.matrix() * this->weights_.transpose();
│ │ │ -
439 }
│ │ │ -
│ │ │ -
441 VectorM operator()(
│ │ │ -
442 const ParameterMatrix<M>& P,
│ │ │ -
443 OptionalJacobian</*MxMN*/ -1, -1> H = boost::none) const {
│ │ │ -
444 return apply(P, H);
│ │ │ -
445 }
│ │ │ -
│ │ │ -
446 };
│ │ │ -
│ │ │ -
447
│ │ │ -
455 template <int M>
│ │ │ -
│ │ │ - │ │ │ -
457 protected:
│ │ │ -
458 using Jacobian = Eigen::Matrix<double, /*1xMN*/ 1, -1>;
│ │ │ -
459 size_t rowIndex_;
│ │ │ -
460 Jacobian H_;
│ │ │ -
461
│ │ │ -
462 /*
│ │ │ -
463 * Calculate the `1*(M*N)` Jacobian of this functor with respect to
│ │ │ -
464 * the M*N parameter matrix `P`.
│ │ │ -
465 * We flatten assuming column-major order, e.g., if N=3 and M=2, we have
│ │ │ -
466 * H=[w(0) 0 w(1) 0 w(2) 0] for rowIndex==0
│ │ │ -
467 * H=[0 w(0) 0 w(1) 0 w(2)] for rowIndex==1
│ │ │ -
468 * i.e., one row of the Kronecker product of weights_ with the
│ │ │ -
469 * MxM identity matrix. See also VectorDerivativeFunctor.
│ │ │ -
470 */
│ │ │ -
471 void calculateJacobian(size_t N) {
│ │ │ -
472 H_.setZero(1, M * N);
│ │ │ -
473 for (int j = 0; j < this->weights_.size(); j++)
│ │ │ -
474 H_(0, rowIndex_ + j * M) = this->weights_(j);
│ │ │ -
475 }
│ │ │ -
476
│ │ │ -
477 public:
│ │ │ - │ │ │ -
480
│ │ │ -
│ │ │ -
482 ComponentDerivativeFunctor(size_t N, size_t i, double x)
│ │ │ -
483 : DerivativeFunctorBase(N, x), rowIndex_(i) {
│ │ │ -
484 calculateJacobian(N);
│ │ │ -
485 }
│ │ │ -
│ │ │ -
486
│ │ │ -
│ │ │ -
488 ComponentDerivativeFunctor(size_t N, size_t i, double x, double a, double b)
│ │ │ -
489 : DerivativeFunctorBase(N, x, a, b), rowIndex_(i) {
│ │ │ -
490 calculateJacobian(N);
│ │ │ -
491 }
│ │ │ -
│ │ │ -
│ │ │ -
493 double apply(const ParameterMatrix<M>& P,
│ │ │ -
494 OptionalJacobian</*1xMN*/ -1, -1> H = boost::none) const {
│ │ │ -
495 if (H) *H = H_;
│ │ │ -
496 return P.row(rowIndex_) * this->weights_.transpose();
│ │ │ -
497 }
│ │ │ -
│ │ │ -
│ │ │ - │ │ │ -
500 OptionalJacobian</*1xMN*/ -1, -1> H = boost::none) const {
│ │ │ -
501 return apply(P, H);
│ │ │ -
502 }
│ │ │ -
│ │ │ -
503 };
│ │ │ -
│ │ │ -
504
│ │ │ -
505};
│ │ │ -
│ │ │ -
506
│ │ │ -
507} // namespace gtsam
│ │ │ -
Special class for optional Jacobian arguments.
│ │ │ -
typedef and functions to augment Eigen's MatrixXd
│ │ │ -
Define ParameterMatrix class which is used to store values at interpolation points.
│ │ │ -
Matrix kroneckerProductIdentity(const Weights &w)
Function for computing the kronecker product of the 1*N Weight vector w with the MxM identity matrix ...
Definition Basis.h:85
│ │ │ +
69
│ │ │ +
│ │ │ +
80struct GTSAM_EXPORT Chebyshev2Basis : Basis<Chebyshev2Basis> {
│ │ │ +
81 using Parameters = Eigen::Matrix<double, -1, 1 /*Nx1*/>;
│ │ │ +
82
│ │ │ +
91 static Weights CalculateWeights(size_t N, double x, double a = -1,
│ │ │ +
92 double b = 1);
│ │ │ +
93
│ │ │ +
103 static Weights DerivativeWeights(size_t N, double x, double a = -1,
│ │ │ +
104 double b = 1);
│ │ │ +
105}; // Chebyshev2Basis
│ │ │ +
│ │ │ +
106
│ │ │ +
107} // namespace gtsam
│ │ │ +
Base class and basic functions for Manifold types.
│ │ │ +
Compute an interpolating basis.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ -
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:41
│ │ │
CRTP Base class for function bases.
Definition Basis.h:100
│ │ │ -
static Matrix WeightMatrix(size_t N, const Vector &X, double a, double b)
Calculate weights for all x in vector X, with interval [a,b].
Definition Basis.h:123
│ │ │ -
static Matrix WeightMatrix(size_t N, const Vector &X)
Calculate weights for all x in vector X.
Definition Basis.h:107
│ │ │ -
An instance of an EvaluationFunctor calculates f(x;p) at a given x, applied to Parameters p.
Definition Basis.h:137
│ │ │ -
EvaluationFunctor(size_t N, double x)
Constructor with interval [a,b].
Definition Basis.h:146
│ │ │ -
EvaluationFunctor(size_t N, double x, double a, double b)
Constructor with interval [a,b].
Definition Basis.h:150
│ │ │ -
double apply(const typename DERIVED::Parameters &p, OptionalJacobian<-1, -1 > H=boost::none) const
Regular 1D evaluation.
Definition Basis.h:154
│ │ │ -
EvaluationFunctor()
For serialization.
Definition Basis.h:143
│ │ │ -
double operator()(const typename DERIVED::Parameters &p, OptionalJacobian<-1, -1 > H=boost::none) const
c++ sugar
Definition Basis.h:161
│ │ │ -
VectorEvaluationFunctor at a given x, applied to ParameterMatrix<M>.
Definition Basis.h:178
│ │ │ -
VectorEvaluationFunctor(size_t N, double x, double a, double b)
Constructor, with interval [a,b].
Definition Basis.h:208
│ │ │ -
EIGEN_MAKE_ALIGNED_OPERATOR_NEW VectorEvaluationFunctor()
For serialization.
Definition Basis.h:200
│ │ │ -
VectorEvaluationFunctor(size_t N, double x)
Default Constructor.
Definition Basis.h:203
│ │ │ -
void calculateJacobian()
Calculate the M*(M*N) Jacobian of this functor with respect to the M*N parameter matrix P.
Definition Basis.h:192
│ │ │ -
VectorM operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
c++ sugar
Definition Basis.h:221
│ │ │ -
VectorM apply(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
M-dimensional evaluation.
Definition Basis.h:214
│ │ │ -
Given a M*N Matrix of M-vectors at N polynomial points, an instance of VectorComponentFunctor compute...
Definition Basis.h:235
│ │ │ -
double operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
c++ sugar
Definition Basis.h:280
│ │ │ -
VectorComponentFunctor()
For serialization.
Definition Basis.h:258
│ │ │ -
VectorComponentFunctor(size_t N, size_t i, double x)
Construct with row index.
Definition Basis.h:261
│ │ │ -
VectorComponentFunctor(size_t N, size_t i, double x, double a, double b)
Construct with row index and interval.
Definition Basis.h:267
│ │ │ -
double apply(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
Calculate component of component rowIndex_ of P.
Definition Basis.h:273
│ │ │ -
Manifold EvaluationFunctor at a given x, applied to ParameterMatrix<M>.
Definition Basis.h:301
│ │ │ -
ManifoldEvaluationFunctor(size_t N, double x, double a, double b)
Constructor, with interval [a,b].
Definition Basis.h:313
│ │ │ -
T apply(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
Manifold evaluation.
Definition Basis.h:317
│ │ │ -
ManifoldEvaluationFunctor()
For serialization.
Definition Basis.h:307
│ │ │ -
ManifoldEvaluationFunctor(size_t N, double x)
Default Constructor.
Definition Basis.h:310
│ │ │ -
T operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
c++ sugar
Definition Basis.h:336
│ │ │ -
Base class for functors below that calculate derivative weights.
Definition Basis.h:343
│ │ │ -
DerivativeFunctorBase()
For serialization.
Definition Basis.h:349
│ │ │ -
An instance of a DerivativeFunctor calculates f'(x;p) at a given x, applied to Parameters p.
Definition Basis.h:369
│ │ │ -
DerivativeFunctor()
For serialization.
Definition Basis.h:372
│ │ │ -
double operator()(const typename DERIVED::Parameters &p, OptionalJacobian< -1, -1 > H=boost::none) const
c++ sugar
Definition Basis.h:385
│ │ │ -
VectorDerivativeFunctor at a given x, applied to ParameterMatrix<M>.
Definition Basis.h:400
│ │ │ -
void calculateJacobian()
Calculate the M*(M*N) Jacobian of this functor with respect to the M*N parameter matrix P.
Definition Basis.h:414
│ │ │ -
VectorDerivativeFunctor(size_t N, double x, double a, double b)
Constructor, with optional interval [a,b].
Definition Basis.h:430
│ │ │ -
VectorM operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
c++ sugar
Definition Basis.h:441
│ │ │ -
EIGEN_MAKE_ALIGNED_OPERATOR_NEW VectorDerivativeFunctor()
For serialization.
Definition Basis.h:422
│ │ │ -
VectorDerivativeFunctor(size_t N, double x)
Default Constructor.
Definition Basis.h:425
│ │ │ -
Given a M*N Matrix of M-vectors at N polynomial points, an instance of ComponentDerivativeFunctor com...
Definition Basis.h:456
│ │ │ -
ComponentDerivativeFunctor(size_t N, size_t i, double x)
Construct with row index.
Definition Basis.h:482
│ │ │ -
double operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
c++ sugar
Definition Basis.h:499
│ │ │ -
ComponentDerivativeFunctor()
For serialization.
Definition Basis.h:479
│ │ │ -
ComponentDerivativeFunctor(size_t N, size_t i, double x, double a, double b)
Construct with row index and interval.
Definition Basis.h:488
│ │ │ -
double apply(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
Calculate derivative of component rowIndex_ of F.
Definition Basis.h:493
│ │ │ -
A matrix abstraction of MxN values at the Basis points.
Definition ParameterMatrix.h:38
│ │ │ +
Basis of Chebyshev polynomials of the first kind https://en.wikipedia.org/wiki/Chebyshev_polynomials#...
Definition Chebyshev.h:32
│ │ │ +
Basis of Chebyshev polynomials of the second kind.
Definition Chebyshev.h:80
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Basis.h │ │ │ │ +Chebyshev.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ @@ -16,539 +16,56 @@ │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ 19#pragma once │ │ │ │ 20 │ │ │ │ -21#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_._h> │ │ │ │ -22#include <_g_t_s_a_m_/_b_a_s_e_/_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h> │ │ │ │ -23#include <_g_t_s_a_m_/_b_a_s_i_s_/_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_._h> │ │ │ │ -24 │ │ │ │ -25#include │ │ │ │ -26 │ │ │ │ -68namespace _g_t_s_a_m { │ │ │ │ +21#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_n_i_f_o_l_d_._h> │ │ │ │ +22#include <_g_t_s_a_m_/_b_a_s_i_s_/_B_a_s_i_s_._h> │ │ │ │ +23 │ │ │ │ +24namespace _g_t_s_a_m { │ │ │ │ +25 │ │ │ │ +_3_2struct GTSAM_EXPORT _C_h_e_b_y_s_h_e_v_1_B_a_s_i_s : _B_a_s_i_s { │ │ │ │ +33 using Parameters = Eigen::Matrix; │ │ │ │ +34 │ │ │ │ +35 Parameters parameters_; │ │ │ │ +36 │ │ │ │ +45 static Weights CalculateWeights(size_t N, double x, double a = -1, │ │ │ │ +46 double b = 1); │ │ │ │ +47 │ │ │ │ +66 static Weights DerivativeWeights(size_t N, double x, double a = -1, │ │ │ │ +67 double b = 1); │ │ │ │ +68}; // Chebyshev1Basis │ │ │ │ 69 │ │ │ │ -70using Weights = Eigen::Matrix; /* 1xN vector */ │ │ │ │ -71 │ │ │ │ -84template │ │ │ │ -_8_5Matrix _k_r_o_n_e_c_k_e_r_P_r_o_d_u_c_t_I_d_e_n_t_i_t_y(const Weights& w) { │ │ │ │ -86 Matrix result(M, w.cols() * M); │ │ │ │ -87 result.setZero(); │ │ │ │ -88 │ │ │ │ -89 for (int i = 0; i < w.cols(); i++) { │ │ │ │ -90 result.block(0, i * M, M, M).diagonal().array() = w(i); │ │ │ │ -91 } │ │ │ │ -92 return result; │ │ │ │ -93} │ │ │ │ -94 │ │ │ │ -99template │ │ │ │ -_1_0_0class _B_a_s_i_s { │ │ │ │ -101 public: │ │ │ │ -_1_0_7 static Matrix _W_e_i_g_h_t_M_a_t_r_i_x(size_t N, const Vector& X) { │ │ │ │ -108 Matrix W(X.size(), N); │ │ │ │ -109 for (int i = 0; i < X.size(); i++) │ │ │ │ -110 W.row(i) = DERIVED::CalculateWeights(N, X(i)); │ │ │ │ -111 return W; │ │ │ │ -112 } │ │ │ │ -113 │ │ │ │ -_1_2_3 static Matrix _W_e_i_g_h_t_M_a_t_r_i_x(size_t N, const Vector& X, double a, double b) { │ │ │ │ -124 Matrix W(X.size(), N); │ │ │ │ -125 for (int i = 0; i < X.size(); i++) │ │ │ │ -126 W.row(i) = DERIVED::CalculateWeights(N, X(i), a, b); │ │ │ │ -127 return W; │ │ │ │ -128 } │ │ │ │ -129 │ │ │ │ -_1_3_7 class _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r { │ │ │ │ -138 protected: │ │ │ │ -139 Weights weights_; │ │ │ │ -140 │ │ │ │ -141 public: │ │ │ │ -_1_4_3 _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r() {} │ │ │ │ -144 │ │ │ │ -_1_4_6 _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(size_t N, double x) │ │ │ │ -147 : weights_(DERIVED::CalculateWeights(N, x)) {} │ │ │ │ -148 │ │ │ │ -_1_5_0 _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(size_t N, double x, double a, double b) │ │ │ │ -151 : weights_(DERIVED::CalculateWeights(N, x, a, b)) {} │ │ │ │ -152 │ │ │ │ -_1_5_4 double _a_p_p_l_y(const typename DERIVED::Parameters& p, │ │ │ │ -155 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ -156 if (H) *H = weights_; │ │ │ │ -157 return (weights_ * p)(0); │ │ │ │ -158 } │ │ │ │ -159 │ │ │ │ -_1_6_1 double _o_p_e_r_a_t_o_r_(_)(const typename DERIVED::Parameters& p, │ │ │ │ -162 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ -163 return _a_p_p_l_y(p, H); // might call apply in derived │ │ │ │ -164 } │ │ │ │ -165 │ │ │ │ -166 void print(const std::string& s = "") const { │ │ │ │ -167 std::cout << s << (s != "" ? " " : "") << weights_ << std::endl; │ │ │ │ -168 } │ │ │ │ -169 }; │ │ │ │ -170 │ │ │ │ -177 template │ │ │ │ -_1_7_8 class _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r : protected _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r { │ │ │ │ -179 protected: │ │ │ │ -180 using VectorM = Eigen::Matrix; │ │ │ │ -181 using Jacobian = Eigen::Matrix; │ │ │ │ -182 Jacobian H_; │ │ │ │ -183 │ │ │ │ -_1_9_2 void _c_a_l_c_u_l_a_t_e_J_a_c_o_b_i_a_n() { │ │ │ │ -193 H_ = kroneckerProductIdentity(this->weights_); │ │ │ │ -194 } │ │ │ │ -195 │ │ │ │ -196 public: │ │ │ │ -197 EIGEN_MAKE_ALIGNED_OPERATOR_NEW │ │ │ │ -198 │ │ │ │ -_2_0_0 _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r() {} │ │ │ │ -201 │ │ │ │ -_2_0_3 _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(size_t N, double x) : _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(N, x) { │ │ │ │ -204 _c_a_l_c_u_l_a_t_e_J_a_c_o_b_i_a_n(); │ │ │ │ -205 } │ │ │ │ -206 │ │ │ │ -_2_0_8 _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(size_t N, double x, double a, double b) │ │ │ │ -209 : _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(N, x, a, b) { │ │ │ │ -210 _c_a_l_c_u_l_a_t_e_J_a_c_o_b_i_a_n(); │ │ │ │ -211 } │ │ │ │ -212 │ │ │ │ -_2_1_4 VectorM _a_p_p_l_y(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ -215 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_M_x_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ -216 if (H) *H = H_; │ │ │ │ -217 return P.matrix() * this->weights_.transpose(); │ │ │ │ -218 } │ │ │ │ -219 │ │ │ │ -_2_2_1 VectorM _o_p_e_r_a_t_o_r_(_)(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ -222 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_M_x_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ -223 return _a_p_p_l_y(P, H); │ │ │ │ -224 } │ │ │ │ -225 }; │ │ │ │ -226 │ │ │ │ -234 template │ │ │ │ -_2_3_5 class _V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r : public _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r { │ │ │ │ -236 protected: │ │ │ │ -237 using Jacobian = Eigen::Matrix; │ │ │ │ -238 size_t rowIndex_; │ │ │ │ -239 Jacobian H_; │ │ │ │ -240 │ │ │ │ -241 /* │ │ │ │ -242 * Calculate the `1*(M*N)` Jacobian of this functor with respect to │ │ │ │ -243 * the M*N parameter matrix `P`. │ │ │ │ -244 * We flatten assuming column-major order, e.g., if N=3 and M=2, we have │ │ │ │ -245 * H=[w(0) 0 w(1) 0 w(2) 0] for rowIndex==0 │ │ │ │ -246 * H=[0 w(0) 0 w(1) 0 w(2)] for rowIndex==1 │ │ │ │ -247 * i.e., one row of the Kronecker product of weights_ with the │ │ │ │ -248 * MxM identity matrix. See also VectorEvaluationFunctor. │ │ │ │ -249 */ │ │ │ │ -250 void calculateJacobian(size_t N) { │ │ │ │ -251 H_.setZero(1, M * N); │ │ │ │ -252 for (int j = 0; j < EvaluationFunctor::weights_.size(); j++) │ │ │ │ -253 H_(0, rowIndex_ + j * M) = EvaluationFunctor::weights_(j); │ │ │ │ -254 } │ │ │ │ -255 │ │ │ │ -256 public: │ │ │ │ -_2_5_8 _V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r() {} │ │ │ │ -259 │ │ │ │ -_2_6_1 _V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r(size_t N, size_t i, double x) │ │ │ │ -262 : _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(N, x), rowIndex_(i) { │ │ │ │ -263 calculateJacobian(N); │ │ │ │ -264 } │ │ │ │ -265 │ │ │ │ -_2_6_7 _V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r(size_t N, size_t i, double x, double a, double b) │ │ │ │ -268 : _E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(N, x, a, b), rowIndex_(i) { │ │ │ │ -269 calculateJacobian(N); │ │ │ │ -270 } │ │ │ │ -271 │ │ │ │ -_2_7_3 double _a_p_p_l_y(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ -274 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_1_x_M_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ -275 if (H) *H = H_; │ │ │ │ -276 return P.row(rowIndex_) * EvaluationFunctor::weights_.transpose(); │ │ │ │ -277 } │ │ │ │ -278 │ │ │ │ -_2_8_0 double _o_p_e_r_a_t_o_r_(_)(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ -281 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_1_x_M_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ -282 return _a_p_p_l_y(P, H); │ │ │ │ -283 } │ │ │ │ -284 }; │ │ │ │ -285 │ │ │ │ -299 template │ │ │ │ -_3_0_0 class _M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ -301 : public _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r::dimension> { │ │ │ │ -302 enum { M = _t_r_a_i_t_s_<_T_>_:_:_d_i_m_e_n_s_i_o_n }; │ │ │ │ -303 using Base = _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_<_M_>; │ │ │ │ -304 │ │ │ │ -305 public: │ │ │ │ -_3_0_7 _M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r() {} │ │ │ │ -308 │ │ │ │ -_3_1_0 _M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(size_t N, double x) : Base(N, x) {} │ │ │ │ -311 │ │ │ │ -_3_1_3 _M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r(size_t N, double x, double a, double b) │ │ │ │ -314 : Base(N, x, a, b) {} │ │ │ │ -315 │ │ │ │ -_3_1_7 T _a_p_p_l_y(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ -318 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_M_x_M_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ -319 // Interpolate the M-dimensional vector to yield a vector in tangent space │ │ │ │ -320 Eigen::Matrix xi = Base::operator()(P, H); │ │ │ │ -321 │ │ │ │ -322 // Now call retract with this M-vector, possibly with derivatives │ │ │ │ -323 Eigen::Matrix D_result_xi; │ │ │ │ -324 T result = T::ChartAtOrigin::Retract(xi, H ? &D_result_xi : 0); │ │ │ │ -325 │ │ │ │ -326 // Finally, if derivatives are asked, apply chain rule where H is Mx(M*N) │ │ │ │ -327 // derivative of interpolation and D_result_xi is MxM derivative of │ │ │ │ -328 // retract. │ │ │ │ -329 if (H) *H = D_result_xi * (*H); │ │ │ │ -330 │ │ │ │ -331 // and return a T │ │ │ │ -332 return result; │ │ │ │ -333 } │ │ │ │ -334 │ │ │ │ -_3_3_6 T _o_p_e_r_a_t_o_r_(_)(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ -337 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_M_x_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ -338 return _a_p_p_l_y(P, H); // might call apply in derived │ │ │ │ -339 } │ │ │ │ -340 }; │ │ │ │ -341 │ │ │ │ -_3_4_3 class _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e { │ │ │ │ -344 protected: │ │ │ │ -345 Weights weights_; │ │ │ │ -346 │ │ │ │ -347 public: │ │ │ │ -_3_4_9 _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e() {} │ │ │ │ -350 │ │ │ │ -351 _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e(size_t N, double x) │ │ │ │ -352 : weights_(DERIVED::DerivativeWeights(N, x)) {} │ │ │ │ -353 │ │ │ │ -354 _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e(size_t N, double x, double a, double b) │ │ │ │ -355 : weights_(DERIVED::DerivativeWeights(N, x, a, b)) {} │ │ │ │ -356 │ │ │ │ -357 void print(const std::string& s = "") const { │ │ │ │ -358 std::cout << s << (s != "" ? " " : "") << weights_ << std::endl; │ │ │ │ -359 } │ │ │ │ -360 }; │ │ │ │ -361 │ │ │ │ -_3_6_9 class _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r : protected _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e { │ │ │ │ -370 public: │ │ │ │ -_3_7_2 _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r() {} │ │ │ │ -373 │ │ │ │ -374 _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r(size_t N, double x) : _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e(N, x) {} │ │ │ │ -375 │ │ │ │ -376 _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r(size_t N, double x, double a, double b) │ │ │ │ -377 : _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e(N, x, a, b) {} │ │ │ │ -378 │ │ │ │ -379 double apply(const typename DERIVED::Parameters& p, │ │ │ │ -380 OptionalJacobian H = boost::none) const { │ │ │ │ -381 if (H) *H = this->weights_; │ │ │ │ -382 return (this->weights_ * p)(0); │ │ │ │ -383 } │ │ │ │ -_3_8_5 double _o_p_e_r_a_t_o_r_(_)(const typename DERIVED::Parameters& p, │ │ │ │ -386 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_1_x_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ -387 return apply(p, H); // might call apply in derived │ │ │ │ -388 } │ │ │ │ -389 }; │ │ │ │ -390 │ │ │ │ -399 template │ │ │ │ -_4_0_0 class _V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r : protected _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e { │ │ │ │ -401 protected: │ │ │ │ -402 using VectorM = Eigen::Matrix; │ │ │ │ -403 using Jacobian = Eigen::Matrix; │ │ │ │ -404 Jacobian H_; │ │ │ │ -405 │ │ │ │ -_4_1_4 void _c_a_l_c_u_l_a_t_e_J_a_c_o_b_i_a_n() { │ │ │ │ -415 H_ = kroneckerProductIdentity(this->weights_); │ │ │ │ -416 } │ │ │ │ -417 │ │ │ │ -418 public: │ │ │ │ -419 EIGEN_MAKE_ALIGNED_OPERATOR_NEW │ │ │ │ -420 │ │ │ │ -_4_2_2 _V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r() {} │ │ │ │ -423 │ │ │ │ -_4_2_5 _V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r(size_t N, double x) : _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e(N, x) { │ │ │ │ -426 _c_a_l_c_u_l_a_t_e_J_a_c_o_b_i_a_n(); │ │ │ │ -427 } │ │ │ │ -428 │ │ │ │ -_4_3_0 _V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r(size_t N, double x, double a, double b) │ │ │ │ -431 : _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e(N, x, a, b) { │ │ │ │ -432 _c_a_l_c_u_l_a_t_e_J_a_c_o_b_i_a_n(); │ │ │ │ -433 } │ │ │ │ -434 │ │ │ │ -435 VectorM apply(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ -436 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_M_x_M_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ -437 if (H) *H = H_; │ │ │ │ -438 return P.matrix() * this->weights_.transpose(); │ │ │ │ -439 } │ │ │ │ -_4_4_1 VectorM _o_p_e_r_a_t_o_r_(_)( │ │ │ │ -442 const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ -443 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_M_x_M_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ -444 return apply(P, H); │ │ │ │ -445 } │ │ │ │ -446 }; │ │ │ │ -447 │ │ │ │ -455 template │ │ │ │ -_4_5_6 class _C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r : protected _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e { │ │ │ │ -457 protected: │ │ │ │ -458 using Jacobian = Eigen::Matrix; │ │ │ │ -459 size_t rowIndex_; │ │ │ │ -460 Jacobian H_; │ │ │ │ -461 │ │ │ │ -462 /* │ │ │ │ -463 * Calculate the `1*(M*N)` Jacobian of this functor with respect to │ │ │ │ -464 * the M*N parameter matrix `P`. │ │ │ │ -465 * We flatten assuming column-major order, e.g., if N=3 and M=2, we have │ │ │ │ -466 * H=[w(0) 0 w(1) 0 w(2) 0] for rowIndex==0 │ │ │ │ -467 * H=[0 w(0) 0 w(1) 0 w(2)] for rowIndex==1 │ │ │ │ -468 * i.e., one row of the Kronecker product of weights_ with the │ │ │ │ -469 * MxM identity matrix. See also VectorDerivativeFunctor. │ │ │ │ -470 */ │ │ │ │ -471 void calculateJacobian(size_t N) { │ │ │ │ -472 H_.setZero(1, M * N); │ │ │ │ -473 for (int j = 0; j < this->weights_.size(); j++) │ │ │ │ -474 H_(0, rowIndex_ + j * M) = this->weights_(j); │ │ │ │ -475 } │ │ │ │ -476 │ │ │ │ -477 public: │ │ │ │ -_4_7_9 _C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r() {} │ │ │ │ -480 │ │ │ │ -_4_8_2 _C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r(size_t N, size_t i, double x) │ │ │ │ -483 : _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e(N, x), rowIndex_(i) { │ │ │ │ -484 calculateJacobian(N); │ │ │ │ -485 } │ │ │ │ -486 │ │ │ │ -_4_8_8 _C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r(size_t N, size_t i, double x, double a, double │ │ │ │ -b) │ │ │ │ -489 : _D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e(N, x, a, b), rowIndex_(i) { │ │ │ │ -490 calculateJacobian(N); │ │ │ │ -491 } │ │ │ │ -_4_9_3 double _a_p_p_l_y(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ -494 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_1_x_M_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ -495 if (H) *H = H_; │ │ │ │ -496 return P.row(rowIndex_) * this->weights_.transpose(); │ │ │ │ -497 } │ │ │ │ -_4_9_9 double _o_p_e_r_a_t_o_r_(_)(const _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>& P, │ │ │ │ -500 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_/_*_1_x_M_N_*_/_ _-_1_,_ _-_1_> H = boost::none) const { │ │ │ │ -501 return _a_p_p_l_y(P, H); │ │ │ │ -502 } │ │ │ │ -503 }; │ │ │ │ -504 │ │ │ │ -505}; │ │ │ │ -506 │ │ │ │ -507} // namespace gtsam │ │ │ │ -_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h │ │ │ │ -Special class for optional Jacobian arguments. │ │ │ │ -_M_a_t_r_i_x_._h │ │ │ │ -typedef and functions to augment Eigen's MatrixXd │ │ │ │ -_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_._h │ │ │ │ -Define ParameterMatrix class which is used to store values at interpolation │ │ │ │ -points. │ │ │ │ -_g_t_s_a_m_:_:_k_r_o_n_e_c_k_e_r_P_r_o_d_u_c_t_I_d_e_n_t_i_t_y │ │ │ │ -Matrix kroneckerProductIdentity(const Weights &w) │ │ │ │ -Function for computing the kronecker product of the 1*N Weight vector w with │ │ │ │ -the MxM identity matrix ... │ │ │ │ -DDeeffiinniittiioonn Basis.h:85 │ │ │ │ +_8_0struct GTSAM_EXPORT _C_h_e_b_y_s_h_e_v_2_B_a_s_i_s : _B_a_s_i_s { │ │ │ │ +81 using Parameters = Eigen::Matrix; │ │ │ │ +82 │ │ │ │ +91 static Weights CalculateWeights(size_t N, double x, double a = -1, │ │ │ │ +92 double b = 1); │ │ │ │ +93 │ │ │ │ +103 static Weights DerivativeWeights(size_t N, double x, double a = -1, │ │ │ │ +104 double b = 1); │ │ │ │ +105}; // Chebyshev2Basis │ │ │ │ +106 │ │ │ │ +107} // namespace gtsam │ │ │ │ +_M_a_n_i_f_o_l_d_._h │ │ │ │ +Base class and basic functions for Manifold types. │ │ │ │ +_B_a_s_i_s_._h │ │ │ │ +Compute an interpolating basis. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ -A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ -that can be centered ... │ │ │ │ -DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ -OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ -either a fixed size o... │ │ │ │ -DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ _g_t_s_a_m_:_:_B_a_s_i_s │ │ │ │ CRTP Base class for function bases. │ │ │ │ DDeeffiinniittiioonn Basis.h:100 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_W_e_i_g_h_t_M_a_t_r_i_x │ │ │ │ -static Matrix WeightMatrix(size_t N, const Vector &X, double a, double b) │ │ │ │ -Calculate weights for all x in vector X, with interval [a,b]. │ │ │ │ -DDeeffiinniittiioonn Basis.h:123 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_W_e_i_g_h_t_M_a_t_r_i_x │ │ │ │ -static Matrix WeightMatrix(size_t N, const Vector &X) │ │ │ │ -Calculate weights for all x in vector X. │ │ │ │ -DDeeffiinniittiioonn Basis.h:107 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ -An instance of an EvaluationFunctor calculates f(x;p) at a given x, applied to │ │ │ │ -Parameters p. │ │ │ │ -DDeeffiinniittiioonn Basis.h:137 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ -EvaluationFunctor(size_t N, double x) │ │ │ │ -Constructor with interval [a,b]. │ │ │ │ -DDeeffiinniittiioonn Basis.h:146 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ -EvaluationFunctor(size_t N, double x, double a, double b) │ │ │ │ -Constructor with interval [a,b]. │ │ │ │ -DDeeffiinniittiioonn Basis.h:150 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_a_p_p_l_y │ │ │ │ -double apply(const typename DERIVED::Parameters &p, OptionalJacobian<-1, -1 > │ │ │ │ -H=boost::none) const │ │ │ │ -Regular 1D evaluation. │ │ │ │ -DDeeffiinniittiioonn Basis.h:154 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ -EvaluationFunctor() │ │ │ │ -For serialization. │ │ │ │ -DDeeffiinniittiioonn Basis.h:143 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -double operator()(const typename DERIVED::Parameters &p, OptionalJacobian<-1, - │ │ │ │ -1 > H=boost::none) const │ │ │ │ -c++ sugar │ │ │ │ -DDeeffiinniittiioonn Basis.h:161 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ -VectorEvaluationFunctor at a given x, applied to ParameterMatrix. │ │ │ │ -DDeeffiinniittiioonn Basis.h:178 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ -VectorEvaluationFunctor(size_t N, double x, double a, double b) │ │ │ │ -Constructor, with interval [a,b]. │ │ │ │ -DDeeffiinniittiioonn Basis.h:208 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ -EIGEN_MAKE_ALIGNED_OPERATOR_NEW VectorEvaluationFunctor() │ │ │ │ -For serialization. │ │ │ │ -DDeeffiinniittiioonn Basis.h:200 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ -VectorEvaluationFunctor(size_t N, double x) │ │ │ │ -Default Constructor. │ │ │ │ -DDeeffiinniittiioonn Basis.h:203 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_c_a_l_c_u_l_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ -void calculateJacobian() │ │ │ │ -Calculate the M*(M*N) Jacobian of this functor with respect to the M*N │ │ │ │ -parameter matrix P. │ │ │ │ -DDeeffiinniittiioonn Basis.h:192 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -VectorM operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > │ │ │ │ -H=boost::none) const │ │ │ │ -c++ sugar │ │ │ │ -DDeeffiinniittiioonn Basis.h:221 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_a_p_p_l_y │ │ │ │ -VectorM apply(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > │ │ │ │ -H=boost::none) const │ │ │ │ -M-dimensional evaluation. │ │ │ │ -DDeeffiinniittiioonn Basis.h:214 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r │ │ │ │ -Given a M*N Matrix of M-vectors at N polynomial points, an instance of │ │ │ │ -VectorComponentFunctor compute... │ │ │ │ -DDeeffiinniittiioonn Basis.h:235 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -double operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > │ │ │ │ -H=boost::none) const │ │ │ │ -c++ sugar │ │ │ │ -DDeeffiinniittiioonn Basis.h:280 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r │ │ │ │ -VectorComponentFunctor() │ │ │ │ -For serialization. │ │ │ │ -DDeeffiinniittiioonn Basis.h:258 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r │ │ │ │ -VectorComponentFunctor(size_t N, size_t i, double x) │ │ │ │ -Construct with row index. │ │ │ │ -DDeeffiinniittiioonn Basis.h:261 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r │ │ │ │ -VectorComponentFunctor(size_t N, size_t i, double x, double a, double b) │ │ │ │ -Construct with row index and interval. │ │ │ │ -DDeeffiinniittiioonn Basis.h:267 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_u_n_c_t_o_r_:_:_a_p_p_l_y │ │ │ │ -double apply(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > │ │ │ │ -H=boost::none) const │ │ │ │ -Calculate component of component rowIndex_ of P. │ │ │ │ -DDeeffiinniittiioonn Basis.h:273 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ -Manifold EvaluationFunctor at a given x, applied to ParameterMatrix. │ │ │ │ -DDeeffiinniittiioonn Basis.h:301 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ -ManifoldEvaluationFunctor(size_t N, double x, double a, double b) │ │ │ │ -Constructor, with interval [a,b]. │ │ │ │ -DDeeffiinniittiioonn Basis.h:313 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_a_p_p_l_y │ │ │ │ -T apply(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost:: │ │ │ │ -none) const │ │ │ │ -Manifold evaluation. │ │ │ │ -DDeeffiinniittiioonn Basis.h:317 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ -ManifoldEvaluationFunctor() │ │ │ │ -For serialization. │ │ │ │ -DDeeffiinniittiioonn Basis.h:307 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r │ │ │ │ -ManifoldEvaluationFunctor(size_t N, double x) │ │ │ │ -Default Constructor. │ │ │ │ -DDeeffiinniittiioonn Basis.h:310 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_u_n_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -T operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > │ │ │ │ -H=boost::none) const │ │ │ │ -c++ sugar │ │ │ │ -DDeeffiinniittiioonn Basis.h:336 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e │ │ │ │ -Base class for functors below that calculate derivative weights. │ │ │ │ -DDeeffiinniittiioonn Basis.h:343 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_B_a_s_e │ │ │ │ -DerivativeFunctorBase() │ │ │ │ -For serialization. │ │ │ │ -DDeeffiinniittiioonn Basis.h:349 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ -An instance of a DerivativeFunctor calculates f'(x;p) at a given x, applied to │ │ │ │ -Parameters p. │ │ │ │ -DDeeffiinniittiioonn Basis.h:369 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ -DerivativeFunctor() │ │ │ │ -For serialization. │ │ │ │ -DDeeffiinniittiioonn Basis.h:372 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -double operator()(const typename DERIVED::Parameters &p, OptionalJacobian< -1, │ │ │ │ --1 > H=boost::none) const │ │ │ │ -c++ sugar │ │ │ │ -DDeeffiinniittiioonn Basis.h:385 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ -VectorDerivativeFunctor at a given x, applied to ParameterMatrix. │ │ │ │ -DDeeffiinniittiioonn Basis.h:400 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_c_a_l_c_u_l_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ -void calculateJacobian() │ │ │ │ -Calculate the M*(M*N) Jacobian of this functor with respect to the M*N │ │ │ │ -parameter matrix P. │ │ │ │ -DDeeffiinniittiioonn Basis.h:414 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ -VectorDerivativeFunctor(size_t N, double x, double a, double b) │ │ │ │ -Constructor, with optional interval [a,b]. │ │ │ │ -DDeeffiinniittiioonn Basis.h:430 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -VectorM operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > │ │ │ │ -H=boost::none) const │ │ │ │ -c++ sugar │ │ │ │ -DDeeffiinniittiioonn Basis.h:441 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ -EIGEN_MAKE_ALIGNED_OPERATOR_NEW VectorDerivativeFunctor() │ │ │ │ -For serialization. │ │ │ │ -DDeeffiinniittiioonn Basis.h:422 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ -VectorDerivativeFunctor(size_t N, double x) │ │ │ │ -Default Constructor. │ │ │ │ -DDeeffiinniittiioonn Basis.h:425 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ -Given a M*N Matrix of M-vectors at N polynomial points, an instance of │ │ │ │ -ComponentDerivativeFunctor com... │ │ │ │ -DDeeffiinniittiioonn Basis.h:456 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ -ComponentDerivativeFunctor(size_t N, size_t i, double x) │ │ │ │ -Construct with row index. │ │ │ │ -DDeeffiinniittiioonn Basis.h:482 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -double operator()(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > │ │ │ │ -H=boost::none) const │ │ │ │ -c++ sugar │ │ │ │ -DDeeffiinniittiioonn Basis.h:499 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ -ComponentDerivativeFunctor() │ │ │ │ -For serialization. │ │ │ │ -DDeeffiinniittiioonn Basis.h:479 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r │ │ │ │ -ComponentDerivativeFunctor(size_t N, size_t i, double x, double a, double b) │ │ │ │ -Construct with row index and interval. │ │ │ │ -DDeeffiinniittiioonn Basis.h:488 │ │ │ │ -_g_t_s_a_m_:_:_B_a_s_i_s_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_u_n_c_t_o_r_:_:_a_p_p_l_y │ │ │ │ -double apply(const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > │ │ │ │ -H=boost::none) const │ │ │ │ -Calculate derivative of component rowIndex_ of F. │ │ │ │ -DDeeffiinniittiioonn Basis.h:493 │ │ │ │ -_g_t_s_a_m_:_:_P_a_r_a_m_e_t_e_r_M_a_t_r_i_x │ │ │ │ -A matrix abstraction of MxN values at the Basis points. │ │ │ │ -DDeeffiinniittiioonn ParameterMatrix.h:38 │ │ │ │ +_g_t_s_a_m_:_:_C_h_e_b_y_s_h_e_v_1_B_a_s_i_s │ │ │ │ +Basis of Chebyshev polynomials of the first kind https://en.wikipedia.org/wiki/ │ │ │ │ +Chebyshev_polynomials#... │ │ │ │ +DDeeffiinniittiioonn Chebyshev.h:32 │ │ │ │ +_g_t_s_a_m_:_:_C_h_e_b_y_s_h_e_v_2_B_a_s_i_s │ │ │ │ +Basis of Chebyshev polynomials of the second kind. │ │ │ │ +DDeeffiinniittiioonn Chebyshev.h:80 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_i_s │ │ │ │ - * _B_a_s_i_s_._h │ │ │ │ + * _C_h_e_b_y_s_h_e_v_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00179.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/Signature.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/Assignment.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,60 +95,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
Signature.h File Reference
│ │ │ +Namespaces
│ │ │ +
Assignment.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

signatures for conditional densities │ │ │ +

An assignment from labels to a discrete value index (size_t) │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │

│ │ │ Classes

class  gtsam::Signature
 Signature for a discrete conditional density, used to construct conditionals. More...
class  gtsam::Assignment< L >
 An assignment from labels to value index (size_t). More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Functions

│ │ │ -Signature gtsam::operator| (const DiscreteKey &key, const DiscreteKey &parent)
 Helper function to create Signature objects example: Signature s = D | E;.
 
│ │ │ -Signature gtsam::operator% (const DiscreteKey &key, const std::string &parent)
 Helper function to create Signature objects example: Signature s(D % "99/1");.
 
│ │ │ -Signature gtsam::operator% (const DiscreteKey &key, const Signature::Table &parent)
 Helper function to create Signature objects, using table construction directly example: Signature s(D % table);.
 
│ │ │

Detailed Description

│ │ │ -

signatures for conditional densities

│ │ │ +

An assignment from labels to a discrete value index (size_t)

│ │ │
Author
Frank Dellaert
│ │ │ -
Date
Feb 27, 2011
│ │ │ +
Date
Feb 5, 2012
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,42 +1,27 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Signature.h File Reference │ │ │ │ -signatures for conditional densities _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +Assignment.h File Reference │ │ │ │ +An assignment from labels to a discrete value index (size_t) _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_S_i_g_n_a_t_u_r_e │ │ │ │ -  _S_i_g_n_a_t_u_r_e for a discrete conditional density, used to construct │ │ │ │ - conditionals. _M_o_r_e_._._. │ │ │ │ +class   _g_t_s_a_m_:_:_A_s_s_i_g_n_m_e_n_t_<_ _L_ _> │ │ │ │ +  An assignment from labels to value index (size_t). _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -_S_i_g_n_a_t_u_r_e  ggttssaamm::::ooppeerraattoorr|| (const _D_i_s_c_r_e_t_e_K_e_y &key, const _D_i_s_c_r_e_t_e_K_e_y &parent) │ │ │ │ -  Helper function to create _S_i_g_n_a_t_u_r_e objects example: _S_i_g_n_a_t_u_r_e s = D │ │ │ │ - | E;. │ │ │ │ -  │ │ │ │ -_S_i_g_n_a_t_u_r_e  ggttssaamm::::ooppeerraattoorr%% (const _D_i_s_c_r_e_t_e_K_e_y &key, const std::string &parent) │ │ │ │ -  Helper function to create _S_i_g_n_a_t_u_r_e objects example: _S_i_g_n_a_t_u_r_e s(D % │ │ │ │ - "99/1");. │ │ │ │ -  │ │ │ │ -_S_i_g_n_a_t_u_r_e  ggttssaamm::::ooppeerraattoorr%% (const _D_i_s_c_r_e_t_e_K_e_y &key, const Signature::Table │ │ │ │ - &parent) │ │ │ │ -  Helper function to create _S_i_g_n_a_t_u_r_e objects, using table │ │ │ │ - construction directly example: _S_i_g_n_a_t_u_r_e s(D % table);. │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -signatures for conditional densities │ │ │ │ +An assignment from labels to a discrete value index (size_t) │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ Date │ │ │ │ - Feb 27, 2011 │ │ │ │ + Feb 5, 2012 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _S_i_g_n_a_t_u_r_e_._h │ │ │ │ + * _A_s_s_i_g_n_m_e_n_t_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00179_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/Signature.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/Assignment.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,112 +98,110 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Signature.h
│ │ │ +
Assignment.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
4 * Atlanta, Georgia 30332-0415
│ │ │
5 * All Rights Reserved
│ │ │
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │
19#pragma once
│ │ │ -
20#include <string>
│ │ │ -
21#include <vector>
│ │ │ -
22#include <boost/optional.hpp>
│ │ │ - │ │ │ -
24
│ │ │ -
25namespace gtsam {
│ │ │ -
26
│ │ │ -
│ │ │ -
54 class GTSAM_EXPORT Signature {
│ │ │ -
55
│ │ │ -
56 public:
│ │ │ -
57
│ │ │ -
59 typedef std::vector<double> Row;
│ │ │ -
60 typedef std::vector<Row> Table;
│ │ │ -
61
│ │ │ -
62 private:
│ │ │ -
63
│ │ │ -
65 DiscreteKey key_;
│ │ │ -
66
│ │ │ -
68 DiscreteKeys parents_;
│ │ │ -
69
│ │ │ -
70 // the given CPT specification string
│ │ │ -
71 boost::optional<std::string> spec_;
│ │ │ -
72
│ │ │ -
73 // the CPT as parsed, if successful
│ │ │ -
74 boost::optional<Table> table_;
│ │ │ +
20
│ │ │ +
21#include <functional>
│ │ │ +
22#include <iostream>
│ │ │ +
23#include <map>
│ │ │ +
24#include <sstream>
│ │ │ +
25#include <utility>
│ │ │ +
26#include <vector>
│ │ │ +
27
│ │ │ +
28namespace gtsam {
│ │ │ +
29
│ │ │ +
36template <class L>
│ │ │ +
│ │ │ +
37class Assignment : public std::map<L, size_t> {
│ │ │ +
45 static std::string DefaultFormatter(const L& x) {
│ │ │ +
46 std::stringstream ss;
│ │ │ +
47 ss << x;
│ │ │ +
48 return ss.str();
│ │ │ +
49 }
│ │ │ +
50
│ │ │ +
51 public:
│ │ │ +
52 using std::map<L, size_t>::operator=;
│ │ │ +
53
│ │ │ +
54 // Define the implicit default constructor.
│ │ │ +
55 Assignment() = default;
│ │ │ +
56
│ │ │ +
57 // Construct from initializer list.
│ │ │ +
58 Assignment(std::initializer_list<std::pair<const L, size_t>> init)
│ │ │ +
59 : std::map<L, size_t>{init} {}
│ │ │ +
60
│ │ │ +
61 void print(const std::string& s = "Assignment: ",
│ │ │ +
62 const std::function<std::string(L)>& labelFormatter =
│ │ │ +
63 &DefaultFormatter) const {
│ │ │ +
64 std::cout << s << ": ";
│ │ │ +
65 for (const typename Assignment::value_type& keyValue : *this) {
│ │ │ +
66 std::cout << "(" << labelFormatter(keyValue.first) << ", "
│ │ │ +
67 << keyValue.second << ")";
│ │ │ +
68 }
│ │ │ +
69 std::cout << std::endl;
│ │ │ +
70 }
│ │ │ +
71
│ │ │ +
72 bool equals(const Assignment& other, double tol = 1e-9) const {
│ │ │ +
73 return (*this == other);
│ │ │ +
74 }
│ │ │
75
│ │ │ -
76 public:
│ │ │ -
88 Signature(const DiscreteKey& key, const DiscreteKeys& parents,
│ │ │ -
89 const Table& table);
│ │ │ -
90
│ │ │ -
102 Signature(const DiscreteKey& key, const DiscreteKeys& parents,
│ │ │ -
103 const std::string& spec);
│ │ │ -
104
│ │ │ -
112 Signature(const DiscreteKey& key);
│ │ │ -
113
│ │ │ -
115 const DiscreteKey& key() const { return key_; }
│ │ │ -
116
│ │ │ -
118 const DiscreteKeys& parents() const { return parents_; }
│ │ │ -
119
│ │ │ -
121 DiscreteKeys discreteKeys() const;
│ │ │ -
122
│ │ │ -
124 KeyVector indices() const;
│ │ │ -
125
│ │ │ -
126 // the CPT as parsed, if successful
│ │ │ -
127 const boost::optional<Table>& table() const { return table_; }
│ │ │ -
128
│ │ │ -
129 // the CPT as a vector of doubles, with key's values most rapidly changing
│ │ │ -
130 std::vector<double> cpt() const;
│ │ │ -
131
│ │ │ -
133 Signature& operator,(const DiscreteKey& parent);
│ │ │ -
134
│ │ │ -
136 Signature& operator=(const std::string& spec);
│ │ │ -
137
│ │ │ -
139 Signature& operator=(const Table& table);
│ │ │ -
140
│ │ │ -
142 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os,
│ │ │ -
143 const Signature& s);
│ │ │ -
144 };
│ │ │ -
│ │ │ -
145
│ │ │ -
150 GTSAM_EXPORT Signature operator|(const DiscreteKey& key, const DiscreteKey& parent);
│ │ │ -
151
│ │ │ -
156 GTSAM_EXPORT Signature operator%(const DiscreteKey& key, const std::string& parent);
│ │ │ -
157
│ │ │ -
162 GTSAM_EXPORT Signature operator%(const DiscreteKey& key, const Signature::Table& parent);
│ │ │ -
163
│ │ │ -
164}
│ │ │ -
specialized key for discrete variables
│ │ │ +
88 template <typename Derived = Assignment<L>>
│ │ │ +
│ │ │ +
89 static std::vector<Derived> CartesianProduct(
│ │ │ +
90 const std::vector<std::pair<L, size_t>>& keys) {
│ │ │ +
91 std::vector<Derived> allPossValues;
│ │ │ +
92 Derived values;
│ │ │ +
93 typedef std::pair<L, size_t> DiscreteKey;
│ │ │ +
94 for (const DiscreteKey& key : keys)
│ │ │ +
95 values[key.first] = 0; // Initialize from 0
│ │ │ +
96 while (1) {
│ │ │ +
97 allPossValues.push_back(values);
│ │ │ +
98 size_t j = 0;
│ │ │ +
99 for (j = 0; j < keys.size(); j++) {
│ │ │ +
100 L idx = keys[j].first;
│ │ │ +
101 values[idx]++;
│ │ │ +
102 if (values[idx] < keys[j].second) break;
│ │ │ +
103 // Wrap condition
│ │ │ +
104 values[idx] = 0;
│ │ │ +
105 }
│ │ │ +
106 if (j == keys.size()) break;
│ │ │ +
107 }
│ │ │ +
108 return allPossValues;
│ │ │ +
109 }
│ │ │ +
│ │ │ +
110}; // Assignment
│ │ │ +
│ │ │ +
111
│ │ │ +
112} // namespace gtsam
│ │ │
std::pair< Key, size_t > DiscreteKey
Key type for discrete variables.
Definition DiscreteKey.h:36
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition Key.h:86
│ │ │ -
Signature operator|(const DiscreteKey &key, const DiscreteKey &parent)
Helper function to create Signature objects example: Signature s = D | E;.
Definition Signature.cpp:178
│ │ │ -
Signature operator%(const DiscreteKey &key, const string &parent)
Helper function to create Signature objects example: Signature s(D % "99/1");.
Definition Signature.cpp:183
│ │ │ -
DiscreteKeys is a set of keys that can be assembled using the & operator.
Definition DiscreteKey.h:39
│ │ │ -
Signature for a discrete conditional density, used to construct conditionals.
Definition Signature.h:54
│ │ │ -
std::vector< double > Row
Data type for the CPT.
Definition Signature.h:59
│ │ │ -
const DiscreteKey & key() const
the variable key
Definition Signature.h:115
│ │ │ -
const DiscreteKeys & parents() const
the parent keys
Definition Signature.h:118
│ │ │ +
Template to create a binary predicate.
Definition Testable.h:111
│ │ │ +
An assignment from labels to value index (size_t).
Definition Assignment.h:37
│ │ │ +
static std::vector< Derived > CartesianProduct(const std::vector< std::pair< L, size_t > > &keys)
Get Cartesian product consisting all possible configurations.
Definition Assignment.h:89
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Signature.h │ │ │ │ +Assignment.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ @@ -15,119 +15,97 @@ │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ 19#pragma once │ │ │ │ -20#include │ │ │ │ -21#include │ │ │ │ -22#include │ │ │ │ -23#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_D_i_s_c_r_e_t_e_K_e_y_._h> │ │ │ │ -24 │ │ │ │ -25namespace _g_t_s_a_m { │ │ │ │ -26 │ │ │ │ -_5_4 class GTSAM_EXPORT _S_i_g_n_a_t_u_r_e { │ │ │ │ -55 │ │ │ │ -56 public: │ │ │ │ -57 │ │ │ │ -_5_9 typedef std::vector _R_o_w; │ │ │ │ -60 typedef std::vector Table; │ │ │ │ -61 │ │ │ │ -62 private: │ │ │ │ -63 │ │ │ │ -65 _D_i_s_c_r_e_t_e_K_e_y key_; │ │ │ │ -66 │ │ │ │ -68 _D_i_s_c_r_e_t_e_K_e_y_s parents_; │ │ │ │ -69 │ │ │ │ -70 // the given CPT specification string │ │ │ │ -71 boost::optional spec_; │ │ │ │ -72 │ │ │ │ -73 // the CPT as parsed, if successful │ │ │ │ -74 boost::optional table_; │ │ │ │ +20 │ │ │ │ +21#include │ │ │ │ +22#include │ │ │ │ +23#include │ │ │ │ +24#include │ │ │ │ +25#include │ │ │ │ +26#include │ │ │ │ +27 │ │ │ │ +28namespace _g_t_s_a_m { │ │ │ │ +29 │ │ │ │ +36template │ │ │ │ +_3_7class _A_s_s_i_g_n_m_e_n_t : public std::map { │ │ │ │ +45 static std::string DefaultFormatter(const L& x) { │ │ │ │ +46 std::stringstream ss; │ │ │ │ +47 ss << x; │ │ │ │ +48 return ss.str(); │ │ │ │ +49 } │ │ │ │ +50 │ │ │ │ +51 public: │ │ │ │ +52 using std::map::operator=; │ │ │ │ +53 │ │ │ │ +54 // Define the implicit default constructor. │ │ │ │ +55 _A_s_s_i_g_n_m_e_n_t() = default; │ │ │ │ +56 │ │ │ │ +57 // Construct from initializer list. │ │ │ │ +58 _A_s_s_i_g_n_m_e_n_t(std::initializer_list> init) │ │ │ │ +59 : std::map{init} {} │ │ │ │ +60 │ │ │ │ +61 void print(const std::string& s = "Assignment: ", │ │ │ │ +62 const std::function& labelFormatter = │ │ │ │ +63 &DefaultFormatter) const { │ │ │ │ +64 std::cout << s << ": "; │ │ │ │ +65 for (const typename Assignment::value_type& keyValue : *this) { │ │ │ │ +66 std::cout << "(" << labelFormatter(keyValue.first) << ", " │ │ │ │ +67 << keyValue.second << ")"; │ │ │ │ +68 } │ │ │ │ +69 std::cout << std::endl; │ │ │ │ +70 } │ │ │ │ +71 │ │ │ │ +72 bool _e_q_u_a_l_s(const _A_s_s_i_g_n_m_e_n_t& other, double tol = 1e-9) const { │ │ │ │ +73 return (*this == other); │ │ │ │ +74 } │ │ │ │ 75 │ │ │ │ -76 public: │ │ │ │ -88 _S_i_g_n_a_t_u_r_e(const _D_i_s_c_r_e_t_e_K_e_y& key, const _D_i_s_c_r_e_t_e_K_e_y_s& parents, │ │ │ │ -89 const Table& table); │ │ │ │ -90 │ │ │ │ -102 _S_i_g_n_a_t_u_r_e(const _D_i_s_c_r_e_t_e_K_e_y& key, const _D_i_s_c_r_e_t_e_K_e_y_s& parents, │ │ │ │ -103 const std::string& spec); │ │ │ │ -104 │ │ │ │ -112 _S_i_g_n_a_t_u_r_e(const _D_i_s_c_r_e_t_e_K_e_y& key); │ │ │ │ -113 │ │ │ │ -_1_1_5 const _D_i_s_c_r_e_t_e_K_e_y& _k_e_y() const { return key_; } │ │ │ │ -116 │ │ │ │ -_1_1_8 const _D_i_s_c_r_e_t_e_K_e_y_s& _p_a_r_e_n_t_s() const { return parents_; } │ │ │ │ -119 │ │ │ │ -121 _D_i_s_c_r_e_t_e_K_e_y_s discreteKeys() const; │ │ │ │ -122 │ │ │ │ -124 _K_e_y_V_e_c_t_o_r indices() const; │ │ │ │ -125 │ │ │ │ -126 // the CPT as parsed, if successful │ │ │ │ -127 const boost::optional
& table() const { return table_; } │ │ │ │ -128 │ │ │ │ -129 // the CPT as a vector of doubles, with key's values most rapidly changing │ │ │ │ -130 std::vector cpt() const; │ │ │ │ -131 │ │ │ │ -133 Signature& operator,(const DiscreteKey& parent); │ │ │ │ -134 │ │ │ │ -136 Signature& operator=(const std::string& spec); │ │ │ │ -137 │ │ │ │ -139 Signature& operator=(const Table& table); │ │ │ │ -140 │ │ │ │ -142 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os, │ │ │ │ -143 const Signature& s); │ │ │ │ -144 }; │ │ │ │ -145 │ │ │ │ -150 GTSAM_EXPORT Signature _o_p_e_r_a_t_o_r_|(const _D_i_s_c_r_e_t_e_K_e_y& key, const _D_i_s_c_r_e_t_e_K_e_y& │ │ │ │ -parent); │ │ │ │ -151 │ │ │ │ -156 GTSAM_EXPORT Signature _o_p_e_r_a_t_o_r_%(const _D_i_s_c_r_e_t_e_K_e_y& key, const std::string& │ │ │ │ -parent); │ │ │ │ -157 │ │ │ │ -162 GTSAM_EXPORT Signature _o_p_e_r_a_t_o_r_%(const _D_i_s_c_r_e_t_e_K_e_y& key, const Signature:: │ │ │ │ -Table& parent); │ │ │ │ -163 │ │ │ │ -164} │ │ │ │ -_D_i_s_c_r_e_t_e_K_e_y_._h │ │ │ │ -specialized key for discrete variables │ │ │ │ +88 template > │ │ │ │ +_8_9 static std::vector _C_a_r_t_e_s_i_a_n_P_r_o_d_u_c_t( │ │ │ │ +90 const std::vector>& keys) { │ │ │ │ +91 std::vector allPossValues; │ │ │ │ +92 Derived values; │ │ │ │ +93 typedef std::pair _D_i_s_c_r_e_t_e_K_e_y; │ │ │ │ +94 for (const _D_i_s_c_r_e_t_e_K_e_y& key : keys) │ │ │ │ +95 values[key.first] = 0; // Initialize from 0 │ │ │ │ +96 while (1) { │ │ │ │ +97 allPossValues.push_back(values); │ │ │ │ +98 size_t j = 0; │ │ │ │ +99 for (j = 0; j < keys.size(); j++) { │ │ │ │ +100 L idx = keys[j].first; │ │ │ │ +101 values[idx]++; │ │ │ │ +102 if (values[idx] < keys[j].second) break; │ │ │ │ +103 // Wrap condition │ │ │ │ +104 values[idx] = 0; │ │ │ │ +105 } │ │ │ │ +106 if (j == keys.size()) break; │ │ │ │ +107 } │ │ │ │ +108 return allPossValues; │ │ │ │ +109 } │ │ │ │ +110}; // Assignment │ │ │ │ +111 │ │ │ │ +112} // namespace gtsam │ │ │ │ _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_K_e_y │ │ │ │ std::pair< Key, size_t > DiscreteKey │ │ │ │ Key type for discrete variables. │ │ │ │ DDeeffiinniittiioonn DiscreteKey.h:36 │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_K_e_y_V_e_c_t_o_r │ │ │ │ -FastVector< Key > KeyVector │ │ │ │ -Define collection type once and for all - also used in wrappers. │ │ │ │ -DDeeffiinniittiioonn Key.h:86 │ │ │ │ -_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_| │ │ │ │ -Signature operator|(const DiscreteKey &key, const DiscreteKey &parent) │ │ │ │ -Helper function to create Signature objects example: Signature s = D | E;. │ │ │ │ -DDeeffiinniittiioonn Signature.cpp:178 │ │ │ │ -_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_% │ │ │ │ -Signature operator%(const DiscreteKey &key, const string &parent) │ │ │ │ -Helper function to create Signature objects example: Signature s(D % "99/1");. │ │ │ │ -DDeeffiinniittiioonn Signature.cpp:183 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ -DiscreteKeys is a set of keys that can be assembled using the & operator. │ │ │ │ -DDeeffiinniittiioonn DiscreteKey.h:39 │ │ │ │ -_g_t_s_a_m_:_:_S_i_g_n_a_t_u_r_e │ │ │ │ -Signature for a discrete conditional density, used to construct conditionals. │ │ │ │ -DDeeffiinniittiioonn Signature.h:54 │ │ │ │ -_g_t_s_a_m_:_:_S_i_g_n_a_t_u_r_e_:_:_R_o_w │ │ │ │ -std::vector< double > Row │ │ │ │ -Data type for the CPT. │ │ │ │ -DDeeffiinniittiioonn Signature.h:59 │ │ │ │ -_g_t_s_a_m_:_:_S_i_g_n_a_t_u_r_e_:_:_k_e_y │ │ │ │ -const DiscreteKey & key() const │ │ │ │ -the variable key │ │ │ │ -DDeeffiinniittiioonn Signature.h:115 │ │ │ │ -_g_t_s_a_m_:_:_S_i_g_n_a_t_u_r_e_:_:_p_a_r_e_n_t_s │ │ │ │ -const DiscreteKeys & parents() const │ │ │ │ -the parent keys │ │ │ │ -DDeeffiinniittiioonn Signature.h:118 │ │ │ │ +_g_t_s_a_m_:_:_e_q_u_a_l_s │ │ │ │ +Template to create a binary predicate. │ │ │ │ +DDeeffiinniittiioonn Testable.h:111 │ │ │ │ +_g_t_s_a_m_:_:_A_s_s_i_g_n_m_e_n_t │ │ │ │ +An assignment from labels to value index (size_t). │ │ │ │ +DDeeffiinniittiioonn Assignment.h:37 │ │ │ │ +_g_t_s_a_m_:_:_A_s_s_i_g_n_m_e_n_t_:_:_C_a_r_t_e_s_i_a_n_P_r_o_d_u_c_t │ │ │ │ +static std::vector< Derived > CartesianProduct(const std::vector< std::pair< L, │ │ │ │ +size_t > > &keys) │ │ │ │ +Get Cartesian product consisting all possible configurations. │ │ │ │ +DDeeffiinniittiioonn Assignment.h:89 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _S_i_g_n_a_t_u_r_e_._h │ │ │ │ + * _A_s_s_i_g_n_m_e_n_t_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00185.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteValues.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteFactorGraph.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,59 +94,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ Functions
│ │ │ -
DiscreteValues.h File Reference
│ │ │ +
DiscreteFactorGraph.cpp File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

Go to the source code of this file.

│ │ │
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  gtsam::DiscreteValues
 A map from keys to values. More...
 
struct  gtsam::traits< DiscreteValues >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

│ │ │ -std::vector< DiscreteValuesgtsam::cartesianProduct (const DiscreteKeys &keys)
 Free version of CartesianProduct.
 
│ │ │ -string gtsam::markdown (const DiscreteValues &values, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DiscreteValues::Names &names={})
 Free version of markdown.
 
│ │ │ -string gtsam::html (const DiscreteValues &values, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DiscreteValues::Names &names={})
 Free version of html.
 
std::pair< DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr > gtsam::EliminateForMPE (const DiscreteFactorGraph &factors, const Ordering &frontalKeys)
 Alternate elimination function for that creates non-normalized lookup tables.
 
std::pair< DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr > gtsam::EliminateDiscrete (const DiscreteFactorGraph &factors, const Ordering &frontalKeys)
 Main elimination function for DiscreteFactorGraph.
 
│ │ │

Detailed Description

│ │ │ -
Date
Dec 13, 2021
│ │ │ -
Author
Frank Dellaert
│ │ │ +
Date
Feb 14, 2011
│ │ │ +
Author
Duy-Nguyen Ta
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,43 +1,34 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -DiscreteValues.h File Reference │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_V_a_l_u_e_s │ │ │ │ -  A map from keys to values. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_i_s_c_r_e_t_e_V_a_l_u_e_s_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +DiscreteFactorGraph.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -std::vector< _D_i_s_c_r_e_t_e_V_a_l_u_e_s >  ggttssaamm::::ccaarrtteessiiaannPPrroodduucctt (const _D_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ - &keys) │ │ │ │ -  Free version of CartesianProduct. │ │ │ │ -  │ │ │ │ - string  ggttssaamm::::mmaarrkkddoowwnn (const _D_i_s_c_r_e_t_e_V_a_l_u_e_s &values, │ │ │ │ - const _K_e_y_F_o_r_m_a_t_t_e_r │ │ │ │ - &keyFormatter=DefaultKeyFormatter, const │ │ │ │ - _D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_N_a_m_e_s &names={}) │ │ │ │ -  Free version of markdown. │ │ │ │ -  │ │ │ │ - string  ggttssaamm::::hhttmmll (const _D_i_s_c_r_e_t_e_V_a_l_u_e_s &values, const │ │ │ │ - _K_e_y_F_o_r_m_a_t_t_e_r &keyFormatter=DefaultKeyFormatter, │ │ │ │ - const _D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_N_a_m_e_s &names={}) │ │ │ │ -  Free version of html. │ │ │ │ +std::pair< _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_: _g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_e_F_o_r_M_P_E (const │ │ │ │ +_s_h_a_r_e_d___p_t_r, DecisionTreeFactor:: _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h &factors, const │ │ │ │ + shared_ptr >  _O_r_d_e_r_i_n_g &frontalKeys) │ │ │ │ +  Alternate elimination function for that │ │ │ │ + creates non-normalized lookup tables. │ │ │ │ +  │ │ │ │ +std::pair< _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_: _g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_e_D_i_s_c_r_e_t_e (const │ │ │ │ +_s_h_a_r_e_d___p_t_r, DecisionTreeFactor:: _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h &factors, const │ │ │ │ + shared_ptr >  _O_r_d_e_r_i_n_g &frontalKeys) │ │ │ │ +  Main elimination function for │ │ │ │ + _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - Dec 13, 2021 │ │ │ │ + Feb 14, 2011 │ │ │ │ Author │ │ │ │ + Duy-Nguyen Ta │ │ │ │ Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_V_a_l_u_e_s_._h │ │ │ │ + * _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00185.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,6 +1,4 @@ │ │ │ │ var a00185 = [ │ │ │ │ - ["gtsam::traits< DiscreteValues >", "a02904.html", null], │ │ │ │ - ["cartesianProduct", "a00185.html#a55a86a4657d82f6ff048a10d058c529f", null], │ │ │ │ - ["html", "a00185.html#a147114735037c2260d4810a8820e72f6", null], │ │ │ │ - ["markdown", "a00185.html#a2b6707b04064df79d26d1016dfa2a013", null] │ │ │ │ + ["EliminateDiscrete", "a00185.html#ga6996e9c84467350b071645649231223a", null], │ │ │ │ + ["EliminateForMPE", "a00185.html#ga9bd0b2859a7513198a369f5de3c8cde3", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00188.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteValues.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/Signature.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,44 +94,61 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces | │ │ │ Functions
│ │ │ -
DiscreteValues.cpp File Reference
│ │ │ +
Signature.h File Reference
│ │ │
│ │ │
│ │ │ + │ │ │ +

signatures for conditional densities │ │ │ +More...

│ │ │ + │ │ │ +

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

class  gtsam::Signature
 Signature for a discrete conditional density, used to construct conditionals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

│ │ │ -string gtsam::markdown (const DiscreteValues &values, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DiscreteValues::Names &names={})
 Free version of markdown.
 
│ │ │ -string gtsam::html (const DiscreteValues &values, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DiscreteValues::Names &names={})
 Free version of html.
 
│ │ │ +Signature gtsam::operator| (const DiscreteKey &key, const DiscreteKey &parent)
 Helper function to create Signature objects example: Signature s = D | E;.
 
│ │ │ +Signature gtsam::operator% (const DiscreteKey &key, const std::string &parent)
 Helper function to create Signature objects example: Signature s(D % "99/1");.
 
│ │ │ +Signature gtsam::operator% (const DiscreteKey &key, const Signature::Table &parent)
 Helper function to create Signature objects, using table construction directly example: Signature s(D % table);.
 
│ │ │

Detailed Description

│ │ │ -
Date
January, 2022
│ │ │ +

signatures for conditional densities

│ │ │
Author
Frank Dellaert
│ │ │ +
Date
Feb 27, 2011
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,31 +1,42 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -DiscreteValues.cpp File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Signature.h File Reference │ │ │ │ +signatures for conditional densities _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +class   _g_t_s_a_m_:_:_S_i_g_n_a_t_u_r_e │ │ │ │ +  _S_i_g_n_a_t_u_r_e for a discrete conditional density, used to construct │ │ │ │ + conditionals. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -string  ggttssaamm::::mmaarrkkddoowwnn (const _D_i_s_c_r_e_t_e_V_a_l_u_e_s &values, const _K_e_y_F_o_r_m_a_t_t_e_r │ │ │ │ - &keyFormatter=DefaultKeyFormatter, const _D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_N_a_m_e_s &names= │ │ │ │ - {}) │ │ │ │ -  Free version of markdown. │ │ │ │ +_S_i_g_n_a_t_u_r_e  ggttssaamm::::ooppeerraattoorr|| (const _D_i_s_c_r_e_t_e_K_e_y &key, const _D_i_s_c_r_e_t_e_K_e_y &parent) │ │ │ │ +  Helper function to create _S_i_g_n_a_t_u_r_e objects example: _S_i_g_n_a_t_u_r_e s = D │ │ │ │ + | E;. │ │ │ │ +  │ │ │ │ +_S_i_g_n_a_t_u_r_e  ggttssaamm::::ooppeerraattoorr%% (const _D_i_s_c_r_e_t_e_K_e_y &key, const std::string &parent) │ │ │ │ +  Helper function to create _S_i_g_n_a_t_u_r_e objects example: _S_i_g_n_a_t_u_r_e s(D % │ │ │ │ + "99/1");. │ │ │ │   │ │ │ │ -string  ggttssaamm::::hhttmmll (const _D_i_s_c_r_e_t_e_V_a_l_u_e_s &values, const _K_e_y_F_o_r_m_a_t_t_e_r │ │ │ │ - &keyFormatter=DefaultKeyFormatter, const _D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_N_a_m_e_s &names= │ │ │ │ - {}) │ │ │ │ -  Free version of html. │ │ │ │ +_S_i_g_n_a_t_u_r_e  ggttssaamm::::ooppeerraattoorr%% (const _D_i_s_c_r_e_t_e_K_e_y &key, const Signature::Table │ │ │ │ + &parent) │ │ │ │ +  Helper function to create _S_i_g_n_a_t_u_r_e objects, using table │ │ │ │ + construction directly example: _S_i_g_n_a_t_u_r_e s(D % table);. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ - Date │ │ │ │ - January, 2022 │ │ │ │ +signatures for conditional densities │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ + Date │ │ │ │ + Feb 27, 2011 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_V_a_l_u_e_s_._c_p_p │ │ │ │ + * _S_i_g_n_a_t_u_r_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00188.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,5 @@ │ │ │ │ var a00188 = [ │ │ │ │ - ["html", "a00188.html#a147114735037c2260d4810a8820e72f6", null], │ │ │ │ - ["markdown", "a00188.html#a2b6707b04064df79d26d1016dfa2a013", null] │ │ │ │ + ["operator%", "a00188.html#ae4856250df52ce4b9b4b16c7a833408c", null], │ │ │ │ + ["operator%", "a00188.html#ab98cf2a4777006c28d6983db5d8ec574", null], │ │ │ │ + ["operator|", "a00188.html#aa6c58dfb2fc9398a026e3268ba2edfad", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00191.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteMarginals.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteJunctionTree.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,49 +94,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
DiscreteMarginals.h File Reference
│ │ │ +
DiscreteJunctionTree.cpp File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

A class for computing marginals in a DiscreteFactorGraph. │ │ │ -More...

│ │ │ - │ │ │ -

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  gtsam::DiscreteMarginals
 A class for computing marginals of variables in a DiscreteFactorGraph. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │

Detailed Description

│ │ │ -

A class for computing marginals in a DiscreteFactorGraph.

│ │ │ -
Author
Abhijit Kundu
│ │ │ -
│ │ │ -Richard Roberts
│ │ │ +
Date
Mar 29, 2013
│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │ -Frank Dellaert
│ │ │ -
Date
June 4, 2012
│ │ │ +Richard Roberts
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,30 +1,21 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -DiscreteMarginals.h File Reference │ │ │ │ -A class for computing marginals in a DiscreteFactorGraph. _M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_M_a_r_g_i_n_a_l_s │ │ │ │ -  A class for computing marginals of variables in a _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +DiscreteJunctionTree.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A class for computing marginals in a DiscreteFactorGraph. │ │ │ │ + Date │ │ │ │ + Mar 29, 2013 │ │ │ │ Author │ │ │ │ - Abhijit Kundu │ │ │ │ - Richard Roberts │ │ │ │ Frank Dellaert │ │ │ │ - Date │ │ │ │ - June 4, 2012 │ │ │ │ + Richard Roberts │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_M_a_r_g_i_n_a_l_s_._h │ │ │ │ + * _D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00194.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteLookupDAG.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteBayesNet.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,46 +94,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
DiscreteLookupDAG.h File Reference
│ │ │ +
DiscreteBayesNet.cpp File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  gtsam::DiscreteLookupTable
 DiscreteLookupTable table for max-product. More...
 
class  gtsam::DiscreteLookupDAG
 A DAG made from lookup tables, as defined above. More...
 
struct  gtsam::traits< DiscreteLookupDAG >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │

Detailed Description

│ │ │ -
Date
January, 2022
│ │ │ -
Author
Frank dellaert
│ │ │ +
Date
Feb 15, 2011
│ │ │ +
Author
Duy-Nguyen Ta
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,30 +1,21 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -DiscreteLookupDAG.h File Reference │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_L_o_o_k_u_p_T_a_b_l_e │ │ │ │ -  _D_i_s_c_r_e_t_e_L_o_o_k_u_p_T_a_b_l_e table for max-product. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ - class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G │ │ │ │ -  A DAG made from lookup tables, as defined above. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +DiscreteBayesNet.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - January, 2022 │ │ │ │ + Feb 15, 2011 │ │ │ │ Author │ │ │ │ - Frank dellaert │ │ │ │ + Duy-Nguyen Ta │ │ │ │ + Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G_._h │ │ │ │ + * _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00197.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteLookupDAG.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteBayesNet.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,34 +94,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces
│ │ │ -
DiscreteLookupDAG.cpp File Reference
│ │ │ +
DiscreteBayesNet.h File Reference
│ │ │
│ │ │
│ │ │ + │ │ │ +

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

class  gtsam::DiscreteBayesNet
 A Bayes net made from discrete conditional distributions. More...
 
struct  gtsam::traits< DiscreteBayesNet >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │

Detailed Description

│ │ │ -
Date
Feb 14, 2011
│ │ │ +
Date
Feb 15, 2011
│ │ │
Author
Duy-Nguyen Ta
│ │ │
│ │ │ -Frank Dellaert
│ │ │ +Frank dellaert │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,21 +1,28 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -DiscreteLookupDAG.cpp File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +DiscreteBayesNet.h File Reference │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ + class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t │ │ │ │ +  A Bayes net made from discrete conditional distributions. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - Feb 14, 2011 │ │ │ │ + Feb 15, 2011 │ │ │ │ Author │ │ │ │ Duy-Nguyen Ta │ │ │ │ - Frank Dellaert │ │ │ │ + Frank dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G_._c_p_p │ │ │ │ + * _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00200_source.html │ │ │ @@ -114,16 +114,16 @@ │ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │
19#pragma once
│ │ │
20
│ │ │ - │ │ │ -
22#include <gtsam/inference/Key.h>
│ │ │ + │ │ │ +
22#include <gtsam/inference/Key.h>
│ │ │
23
│ │ │
24#include <boost/serialization/vector.hpp>
│ │ │
25#include <map>
│ │ │
26#include <string>
│ │ │
27#include <vector>
│ │ │
28
│ │ │
29namespace gtsam {
│ │ │ @@ -184,16 +184,16 @@ │ │ │
94 GTSAM_EXPORT DiscreteKeys operator&(const DiscreteKey& key1, const DiscreteKey& key2);
│ │ │
95
│ │ │
96 // traits
│ │ │
97 template <>
│ │ │
98 struct traits<DiscreteKeys> : public Testable<DiscreteKeys> {};
│ │ │
99
│ │ │
100 } // namespace gtsam
│ │ │ - │ │ │ -
Included from all GTSAM files.
│ │ │ + │ │ │ +
Included from all GTSAM files.
│ │ │
std::pair< Key, size_t > DiscreteKey
Key type for discrete variables.
Definition DiscreteKey.h:36
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │
DiscreteKeys operator&(const DiscreteKey &key1, const DiscreteKey &key2)
Create a list from two keys.
Definition DiscreteKey.cpp:46
│ │ │
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition Key.h:86
│ │ │
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:156
│ │ │
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition Key.h:35
│ │ │
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ ├── ./usr/share/doc/libgtsam-dev/html/a00206.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteJunctionTree.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/AlgebraicDecisionTree.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,51 +94,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Typedefs
│ │ │ -
DiscreteJunctionTree.h File Reference
│ │ │ +Namespaces
│ │ │ +
AlgebraicDecisionTree.cpp File Reference
│ │ │ │ │ │
│ │ │ - │ │ │ -

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  gtsam::DiscreteJunctionTree
 An EliminatableClusterTree, i.e., a set of variable clusters with factors, arranged in a tree, with the additional property that it represents the clique tree associated with a Bayes net. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Typedefs

│ │ │ -using gtsam::DiscreteCluster = DiscreteJunctionTree::Cluster
 typedef for wrapper:
 
│ │ │

Detailed Description

│ │ │ -
Date
Mar 29, 2013
│ │ │ -
Author
Frank Dellaert
│ │ │ +
Date
Feb 20, 2022
│ │ │ +
Author
Mike Sheffler
│ │ │ +
│ │ │ +Duy-Nguyen Ta
│ │ │
│ │ │ -Richard Roberts
│ │ │ +Frank Dellaert
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,32 +1,22 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ -DiscreteJunctionTree.h File Reference │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e │ │ │ │ - An _E_l_i_m_i_n_a_t_a_b_l_e_C_l_u_s_t_e_r_T_r_e_e, i.e., a set of variable clusters with │ │ │ │ -  factors, arranged in a tree, with the additional property that it │ │ │ │ - represents the clique tree associated with a Bayes net. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +AlgebraicDecisionTree.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -using  ggttssaamm::::DDiissccrreetteeCClluusstteerr = _D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e_:_:_C_l_u_s_t_e_r │ │ │ │ -  typedef for wrapper: │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - Mar 29, 2013 │ │ │ │ + Feb 20, 2022 │ │ │ │ Author │ │ │ │ + Mike Sheffler │ │ │ │ + Duy-Nguyen Ta │ │ │ │ Frank Dellaert │ │ │ │ - Richard Roberts │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e_._h │ │ │ │ + * _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00209.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteJunctionTree.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteFactor.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,34 +94,52 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
DiscreteJunctionTree.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
DiscreteFactor.h File Reference
│ │ │ │ │ │
│ │ │ + │ │ │ +

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

class  gtsam::DiscreteFactor
 Base class for discrete probabilistic factors The most general one is the derived DecisionTreeFactor. More...
 
struct  gtsam::traits< DiscreteFactor >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

std::vector< double > gtsam::expNormalize (const std::vector< double > &logProbs)
 Normalize a set of log probabilities.
 
│ │ │

Detailed Description

│ │ │ -
Date
Mar 29, 2013
│ │ │ -
Author
Frank Dellaert
│ │ │ +
Date
Feb 14, 2011
│ │ │ +
Author
Duy-Nguyen Ta
│ │ │
│ │ │ -Richard Roberts
│ │ │ +Frank Dellaert
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,21 +1,34 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -DiscreteJunctionTree.cpp File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +DiscreteFactor.h File Reference │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ + class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r │ │ │ │ +  Base class for discrete probabilistic factors The most general one is │ │ │ │ + the derived _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_i_s_c_r_e_t_e_F_a_c_t_o_r_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +std::vector< double >  _g_t_s_a_m_:_:_e_x_p_N_o_r_m_a_l_i_z_e (const std::vector< double > │ │ │ │ + &logProbs) │ │ │ │ +  Normalize a set of log probabilities. │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - Mar 29, 2013 │ │ │ │ + Feb 14, 2011 │ │ │ │ Author │ │ │ │ + Duy-Nguyen Ta │ │ │ │ Frank Dellaert │ │ │ │ - Richard Roberts │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e_._c_p_p │ │ │ │ + * _D_i_s_c_r_e_t_e_F_a_c_t_o_r_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00212_source.html │ │ │ @@ -25,3140 +25,12888 @@ │ │ │ 00000180: 656e 743d 2277 6964 7468 3d64 6576 6963 ent="width=devic │ │ │ 00000190: 652d 7769 6474 682c 2069 6e69 7469 616c e-width, initial │ │ │ 000001a0: 2d73 6361 6c65 3d31 222f 3e0a 3c74 6974 -scale=1"/>.gtsam: /build │ │ │ 000001c0: 2f72 6570 726f 6475 6369 626c 652d 7061 /reproducible-pa │ │ │ 000001d0: 7468 2f67 7473 616d 2d34 2e32 2e30 2b64 th/gtsam-4.2.0+d │ │ │ 000001e0: 6673 672f 6774 7361 6d2f 6469 7363 7265 fsg/gtsam/discre │ │ │ -000001f0: 7465 2f44 6973 6372 6574 6546 6163 746f te/DiscreteFacto │ │ │ -00000200: 7247 7261 7068 2e68 2053 6f75 7263 6520 rGraph.h Source │ │ │ -00000210: 4669 6c65 3c2f 7469 746c 653e 0a3c 6c69 File.
  • ..< │ │ │ -00000290: 7363 7269 7074 2074 7970 653d 2274 6578 script type="tex │ │ │ -000002a0: 742f 6a61 7661 7363 7269 7074 2220 7372 t/javascript" sr │ │ │ -000002b0: 633d 2264 796e 7365 6374 696f 6e73 2e6a c="dynsections.j │ │ │ -000002c0: 7322 3e3c 2f73 6372 6970 743e 0a3c 6c69 s">.
  • ... │ │ │ -00000380: 3c73 6372 6970 7420 7479 7065 3d22 7465 ... │ │ │ -00000440: 3c73 6372 6970 7420 7479 7065 3d22 7465 . │ │ │ -00000480: 3c73 6372 6970 7420 7479 7065 3d22 7465 .< │ │ │ -00000510: 7363 7269 7074 2074 7970 653d 2274 6578 script type="tex │ │ │ -00000520: 742f 6a61 7661 7363 7269 7074 2220 6173 t/javascript" as │ │ │ -00000530: 796e 633d 2261 7379 6e63 2220 7372 633d ync="async" src= │ │ │ -00000540: 2266 696c 653a 2f2f 2f75 7372 2f73 6861 "file:///usr/sha │ │ │ -00000550: 7265 2f6a 6176 6173 6372 6970 742f 6d61 re/javascript/ma │ │ │ -00000560: 7468 6a61 782f 4d61 7468 4a61 782e 6a73 thjax/MathJax.js │ │ │ -00000570: 3f63 6f6e 6669 673d 5465 582d 4d4d 4c2d ?config=TeX-MML- │ │ │ -00000580: 414d 5f43 4854 4d4c 223e 3c2f 7363 7269 AM_CHTML">. │ │ │ -000005d0: 0a3c 2f68 6561 643e 0a3c 626f 6479 3e0a ... │ │ │ -000005e0: 3c64 6976 2069 643d 2274 6f70 223e 3c21
    .
    .. . < │ │ │ -00000670: 7472 2069 643d 2270 726f 6a65 6374 726f tr id="projectro │ │ │ -00000680: 7722 3e0a 2020 3c74 6420 6964 3d22 7072 w">. . │ │ │ -000006a0: 3c64 6976 2069 643d 2270 726f 6a65 6374
    gtsam 4.2.0< │ │ │ -000006e0: 2f73 7061 6e3e 0a20 2020 3c2f 6469 763e /span>.
    │ │ │ -000006f0: 0a20 2020 3c64 6976 2069 643d 2270 726f .
    gtsam │ │ │ -00000710: 3c2f 6469 763e 0a20 203c 2f74 643e 0a20
    . . │ │ │ -00000720: 3c2f 7472 3e0a 203c 2f74 626f 6479 3e0a . . │ │ │ -00000730: 3c2f 7461 626c 653e 0a3c 2f64 6976 3e0a .
    . │ │ │ -00000740: 3c21 2d2d 2065 6e64 2068 6561 6465 7220 .../* │ │ │ -000007a0: 406c 6963 656e 7365 206d 6167 6e65 743a @license magnet: │ │ │ -000007b0: 3f78 743d 7572 6e3a 6274 6968 3a64 3364 ?xt=urn:btih:d3d │ │ │ -000007c0: 3961 3961 3635 3935 3532 3166 3936 3636 9a9a6595521f9666 │ │ │ -000007d0: 6135 6539 3463 6338 3330 6461 6238 3362 a5e94cc830dab83b │ │ │ -000007e0: 3635 3639 3926 616d 703b 646e 3d65 7870 65699&dn=exp │ │ │ -000007f0: 6174 2e74 7874 204d 4954 202a 2f0a 7661 at.txt MIT */.va │ │ │ -00000800: 7220 7365 6172 6368 426f 7820 3d20 6e65 r searchBox = ne │ │ │ -00000810: 7720 5365 6172 6368 426f 7828 2273 6561 w SearchBox("sea │ │ │ -00000820: 7263 6842 6f78 222c 2022 7365 6172 6368 rchBox", "search │ │ │ -00000830: 2f22 2c27 2e68 746d 6c27 293b 0a2f 2a20 /",'.html');./* │ │ │ -00000840: 406c 6963 656e 7365 2d65 6e64 202a 2f0a @license-end */. │ │ │ -00000850: 3c2f 7363 7269 7074 3e0a 3c73 6372 6970 ..../* @ │ │ │ -000008f0: 6c69 6365 6e73 6520 6d61 676e 6574 3a3f license magnet:? │ │ │ -00000900: 7874 3d75 726e 3a62 7469 683a 6433 6439 xt=urn:btih:d3d9 │ │ │ -00000910: 6139 6136 3539 3535 3231 6639 3636 3661 a9a6595521f9666a │ │ │ -00000920: 3565 3934 6363 3833 3064 6162 3833 6236 5e94cc830dab83b6 │ │ │ -00000930: 3536 3939 2661 6d70 3b64 6e3d 6578 7061 5699&dn=expa │ │ │ -00000940: 742e 7478 7420 4d49 5420 2a2f 0a24 2866 t.txt MIT */.$(f │ │ │ -00000950: 756e 6374 696f 6e28 2920 7b0a 2020 696e unction() {. in │ │ │ -00000960: 6974 4d65 6e75 2827 272c 7472 7565 2c66 itMenu('',true,f │ │ │ -00000970: 616c 7365 2c27 7365 6172 6368 2e70 6870 alse,'search.php │ │ │ -00000980: 272c 2753 6561 7263 6827 293b 0a20 2024 ','Search');. $ │ │ │ -00000990: 2864 6f63 756d 656e 7429 2e72 6561 6479 (document).ready │ │ │ -000009a0: 2866 756e 6374 696f 6e28 2920 7b20 696e (function() { in │ │ │ -000009b0: 6974 5f73 6561 7263 6828 293b 207d 293b it_search(); }); │ │ │ -000009c0: 0a7d 293b 0a2f 2a20 406c 6963 656e 7365 .});./* @license │ │ │ -000009d0: 2d65 6e64 202a 2f0a 3c2f 7363 7269 7074 -end */..../* @ │ │ │ -00000a20: 6c69 6365 6e73 6520 6d61 676e 6574 3a3f license magnet:? │ │ │ -00000a30: 7874 3d75 726e 3a62 7469 683a 6433 6439 xt=urn:btih:d3d9 │ │ │ -00000a40: 6139 6136 3539 3535 3231 6639 3636 3661 a9a6595521f9666a │ │ │ -00000a50: 3565 3934 6363 3833 3064 6162 3833 6236 5e94cc830dab83b6 │ │ │ -00000a60: 3536 3939 2661 6d70 3b64 6e3d 6578 7061 5699&dn=expa │ │ │ -00000a70: 742e 7478 7420 4d49 5420 2a2f 0a24 2864 t.txt MIT */.$(d │ │ │ -00000a80: 6f63 756d 656e 7429 2e72 6561 6479 2866 ocument).ready(f │ │ │ -00000a90: 756e 6374 696f 6e28 2920 7b20 696e 6974 unction() { init │ │ │ -00000aa0: 5f63 6f64 6566 6f6c 6428 3029 3b20 7d29 _codefold(0); }) │ │ │ -00000ab0: 3b0a 2f2a 2040 6c69 6365 6e73 652d 656e ;./* @license-en │ │ │ -00000ac0: 6420 2a2f 0a3c 2f73 6372 6970 743e 0a3c d */..< │ │ │ -00000ad0: 2f64 6976 3e3c 212d 2d20 746f 7020 2d2d /div>.
    .
    ...
    .
    .
    .
    .
    < │ │ │ -00000ec0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    Loading │ │ │ -00000ef0: 2e2e 2e3c 2f64 6976 3e0a 3c64 6976 2063 ...
    .
    S │ │ │ -00000f20: 6561 7263 6869 6e67 2e2e 2e3c 2f64 6976 earching...
    .
    No Matche │ │ │ -00000f60: 733c 2f64 6976 3e0a 3c2f 6469 763e 0a3c s
    .
    .< │ │ │ -00000f70: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 2f64 /div>.
    ...
    .
    Discrete │ │ │ -00000fd0: 4661 6374 6f72 4772 6170 682e 683c 2f64 FactorGraph.h
    .
    │ │ │ -00000ff0: 3c21 2d2d 6865 6164 6572 2d2d 3e0a 3c64 ..Go to │ │ │ -00001030: 2074 6865 2064 6f63 756d 656e 7461 7469 the documentati │ │ │ -00001040: 6f6e 206f 6620 7468 6973 2066 696c 652e on of this file. │ │ │ -00001050: 3c2f 613e 3c64 6976 2063 6c61 7373 3d22
    1/* --------- │ │ │ -000010e0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ -000010f0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ -00001100: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ -00001110: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ -00001120: 2d2d 2d3c 2f73 7061 6e3e 3c2f 6469 763e ---
    │ │ │ -00001130: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    3 * GTSAM Cop │ │ │ -00001220: 7972 6967 6874 2032 3031 302c 2047 656f yright 2010, Geo │ │ │ -00001230: 7267 6961 2054 6563 6820 5265 7365 6172 rgia Tech Resear │ │ │ -00001240: 6368 2043 6f72 706f 7261 7469 6f6e 2c3c ch Corporation,< │ │ │ -00001250: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ -00001270: 6120 6964 3d22 6c30 3030 3034 2220 6e61 a id="l00004" na │ │ │ -00001280: 6d65 3d22 6c30 3030 3034 223e 3c2f 613e me="l00004"> │ │ │ -00001290: 3c73 7061 6e20 636c 6173 733d 226c 696e 4 * Atlant │ │ │ -000012d0: 612c 2047 656f 7267 6961 2033 3033 3332 a, Georgia 30332 │ │ │ -000012e0: 2d30 3431 353c 2f73 7061 6e3e 3c2f 6469 -0415.
    5 │ │ │ -00001340: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 * │ │ │ -00001360: 416c 6c20 5269 6768 7473 2052 6573 6572 All Rights Reser │ │ │ -00001370: 7665 643c 2f73 7061 6e3e 3c2f 6469 763e ved
    │ │ │ -00001380: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -000013b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 6 * Au │ │ │ -000013f0: 7468 6f72 733a 2046 7261 6e6b 2044 656c thors: Frank Del │ │ │ -00001400: 6c61 6572 742c 2065 7420 616c 2e20 2873 laert, et al. (s │ │ │ -00001410: 6565 2054 4841 4e4b 5320 666f 7220 7468 ee THANKS for th │ │ │ -00001420: 6520 6675 6c6c 2061 7574 686f 7220 6c69 e full author li │ │ │ -00001430: 7374 293c 2f73 7061 6e3e 3c2f 6469 763e st)
    │ │ │ -00001440: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    8 * See LICEN │ │ │ -00001530: 5345 2066 6f72 2074 6865 206c 6963 656e SE for the licen │ │ │ -00001540: 7365 2069 6e66 6f72 6d61 7469 6f6e 3c2f se information
    .
    < │ │ │ -00001590: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -000015a0: 6e6f 223e 2020 2020 393c 2f73 7061 6e3e no"> 9 │ │ │ -000015b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d .
    │ │ │ -00001620: 3130 3c2f 7370 616e 3e3c 7370 616e 2063 10 │ │ │ -00001640: 2a20 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d * -------------- │ │ │ -00001650: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ -00001660: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ -00001670: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ -00001680: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 202a 2f3c ------------ */< │ │ │ -00001690: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ -000016b0: 6120 6964 3d22 6c30 3030 3131 2220 6e61 a id="l00011" na │ │ │ -000016c0: 6d65 3d22 6c30 3030 3131 223e 3c2f 613e me="l00011"> │ │ │ -000016d0: 3c73 7061 6e20 636c 6173 733d 226c 696e 11
    .
    19#pragma │ │ │ -00001770: 6f6e 6365 3c2f 7370 616e 3e3c 2f64 6976 once
    .
    20< │ │ │ -000017d0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ -000017f0: 3c61 2069 643d 226c 3030 3032 3122 206e 21#in │ │ │ -00001850: 636c 7564 6520 266c 743b 3c61 2063 6c61 clude <gts │ │ │ -00001880: 616d 2f64 6973 6372 6574 652f 4465 6369 am/discrete/Deci │ │ │ -00001890: 7369 6f6e 5472 6565 4661 6374 6f72 2e68 sionTreeFactor.h │ │ │ -000018a0: 3c2f 613e 2667 743b 3c2f 7370 616e 3e3c >< │ │ │ -000018b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00001900: 2032 323c 2f73 7061 6e3e 3c73 7061 6e20 22#include &l │ │ │ -00001930: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;gtsam/discr │ │ │ -00001960: 6574 652f 4469 7363 7265 7465 4c6f 6f6b ete/DiscreteLook │ │ │ -00001970: 7570 4441 472e 683c 2f61 3e26 6774 3b3c upDAG.h>< │ │ │ -00001980: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ -000019a0: 6120 6964 3d22 6c30 3030 3233 2220 6e61 a id="l00023" na │ │ │ -000019b0: 6d65 3d22 6c30 3030 3233 223e 3c2f 613e me="l00023"> │ │ │ -000019c0: 3c73 7061 6e20 636c 6173 733d 226c 696e 23#inc │ │ │ -00001a00: 6c75 6465 2026 6c74 3b3c 6120 636c 6173 lude <gtsa │ │ │ -00001a30: 6d2f 696e 6665 7265 6e63 652f 456c 696d m/inference/Elim │ │ │ -00001a40: 696e 6174 6561 626c 6546 6163 746f 7247 inateableFactorG │ │ │ -00001a50: 7261 7068 2e68 3c2f 613e 2667 743b 3c2f raph.h>
    .
    < │ │ │ -00001aa0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00001ab0: 6e6f 223e 2020 2032 343c 2f73 7061 6e3e no"> 24 │ │ │ -00001ac0: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl │ │ │ -00001ae0: 7564 6520 266c 743b 3c61 2063 6c61 7373 ude <gtsam │ │ │ -00001b10: 2f69 6e66 6572 656e 6365 2f46 6163 746f /inference/Facto │ │ │ -00001b20: 7247 7261 7068 2e68 3c2f 613e 2667 743b rGraph.h> │ │ │ -00001b30: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ -00001b50: 3c61 2069 643d 226c 3030 3032 3522 206e 25#in │ │ │ -00001bb0: 636c 7564 6520 266c 743b 3c61 2063 6c61 clude <gts │ │ │ -00001be0: 616d 2f69 6e66 6572 656e 6365 2f4f 7264 am/inference/Ord │ │ │ -00001bf0: 6572 696e 672e 683c 2f61 3e26 6774 3b3c ering.h>< │ │ │ -00001c00: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ -00001c20: 6120 6964 3d22 6c30 3030 3236 2220 6e61 a id="l00026" na │ │ │ -00001c30: 6d65 3d22 6c30 3030 3236 223e 3c2f 613e me="l00026"> │ │ │ -00001c40: 3c73 7061 6e20 636c 6173 733d 226c 696e 26#inc │ │ │ -00001c80: 6c75 6465 2026 6c74 3b3c 6120 636c 6173 lude <gtsa │ │ │ -00001cb0: 6d2f 6261 7365 2f46 6173 7453 6574 2e68 m/base/FastSet.h │ │ │ -00001cc0: 3c2f 613e 2667 743b 3c2f 7370 616e 3e3c >< │ │ │ -00001cd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00001d20: 2032 373c 2f73 7061 6e3e 203c 2f64 6976 27
    .
    28< │ │ │ -00001d80: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>#include <bo │ │ │ -00001db0: 6f73 742f 6d61 6b65 5f73 6861 7265 642e ost/make_shared. │ │ │ -00001dc0: 6870 7026 6774 3b3c 2f73 7061 6e3e 3c2f hpp>.
    │ │ │ -00001e20: 3239 3c2f 7370 616e 3e3c 7370 616e 2063 29#include < │ │ │ -00001e50: 3b73 7472 696e 6726 6774 3b3c 2f73 7061 ;string>
    .
    30#include │ │ │ -00001ee0: 2026 6c74 3b75 7469 6c69 7479 2667 743b <utility> │ │ │ -00001ef0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ -00001f10: 3c61 2069 643d 226c 3030 3033 3122 206e 31#in │ │ │ -00001f70: 636c 7564 6520 266c 743b 7665 6374 6f72 clude <vector │ │ │ -00001f80: 2667 743b 3c2f 7370 616e 3e3c 2f64 6976 >
    .
    32< │ │ │ -00001fe0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ -00002000: 3c61 2069 643d 226c 3030 3033 3322 206e 33namespac │ │ │ -00002060: 6520 3c2f 7370 616e 3e3c 6120 636c 6173 e gtsam {
    .
    34 │ │ │ -00002100: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00002150: 2020 3335 3c2f 7370 616e 3e3c 7370 616e 35// Forward decl │ │ │ -00002180: 6172 6174 696f 6e73 3c2f 7370 616e 3e3c arations< │ │ │ -00002190: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -000021e0: 2033 363c 2f73 7061 6e3e 3c73 7061 6e20 36 │ │ │ -00002200: 636c 6173 7320 3c2f 7370 616e 3e44 6973 class Dis │ │ │ -00002210: 6372 6574 6546 6163 746f 7247 7261 7068 creteFactorGraph │ │ │ -00002220: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ -00002270: 2020 2033 373c 2f73 7061 6e3e 3c73 7061 37class D │ │ │ -000022a0: 6973 6372 6574 6543 6f6e 6469 7469 6f6e iscreteCondition │ │ │ -000022b0: 616c 3b3c 2f64 6976 3e0a 3c64 6976 2063 al;
    .
    38class DiscreteBayesNe │ │ │ -00002340: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    39class │ │ │ -000023c0: 4469 7363 7265 7465 456c 696d 696e 6174 DiscreteEliminat │ │ │ -000023d0: 696f 6e54 7265 653b 3c2f 6469 763e 0a3c ionTree;
    .< │ │ │ -000023e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -000023f0: 3e3c 6120 6964 3d22 6c30 3030 3430 2220 > 40class < │ │ │ -00002450: 2f73 7061 6e3e 4469 7363 7265 7465 4261 /span>DiscreteBa │ │ │ -00002460: 7965 7354 7265 653b 3c2f 6469 763e 0a3c yesTree;
    .< │ │ │ -00002470: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00002480: 3e3c 6120 6964 3d22 6c30 3030 3431 2220 > 41class < │ │ │ -000024e0: 2f73 7061 6e3e 4469 7363 7265 7465 4a75 /span>DiscreteJu │ │ │ -000024f0: 6e63 7469 6f6e 5472 6565 3b3c 2f64 6976 nctionTree;
    .
    42< │ │ │ -00002550: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ -00002570: 3c61 2069 643d 226c 3030 3035 3122 206e 51GTSAM_EXPORT.
    │ │ │ -00002610: 3532 3c2f 7370 616e 3e73 7464 3a3a 7061 52std::pa │ │ │ -00002620: 6972 266c 743b 4469 7363 7265 7465 436f ir<DiscreteCo │ │ │ -00002630: 6e64 6974 696f 6e61 6c3a 3a73 6861 7265 nditional::share │ │ │ -00002640: 645f 7074 722c 2044 6563 6973 696f 6e54 d_ptr, DecisionT │ │ │ -00002650: 7265 6546 6163 746f 723a 3a73 6861 7265 reeFactor::share │ │ │ -00002660: 645f 7074 7226 6774 3b3c 2f64 6976 3e0a d_ptr>
    . │ │ │ -00002670: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -000026a0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 53EliminateD │ │ │ -00002720: 6973 6372 6574 653c 2f61 3e28 3c73 7061 iscrete(const D │ │ │ -00002750: 6973 6372 6574 6546 6163 746f 7247 7261 iscreteFactorGra │ │ │ -00002760: 7068 2661 6d70 3b20 6661 6374 6f72 732c ph& factors, │ │ │ -00002770: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -000027c0: 2020 3534 3c2f 7370 616e 3e20 2020 2020 54 │ │ │ -000027d0: 2020 2020 2020 2020 2020 2020 203c 7370 const │ │ │ -00002800: 4f72 6465 7269 6e67 2661 6d70 3b20 6672 Ordering& fr │ │ │ -00002810: 6f6e 7461 6c4b 6579 7329 3b3c 2f64 6976 ontalKeys);
    .
    55< │ │ │ -00002870: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ -00002890: 3c61 2069 643d 226c 3030 3036 3422 206e 64GTSAM_EXPORT.
    │ │ │ -00002930: 3635 3c2f 7370 616e 3e73 7464 3a3a 7061 65std::pa │ │ │ -00002940: 6972 266c 743b 4469 7363 7265 7465 436f ir<DiscreteCo │ │ │ -00002950: 6e64 6974 696f 6e61 6c3a 3a73 6861 7265 nditional::share │ │ │ -00002960: 645f 7074 722c 2044 6563 6973 696f 6e54 d_ptr, DecisionT │ │ │ -00002970: 7265 6546 6163 746f 723a 3a73 6861 7265 reeFactor::share │ │ │ -00002980: 645f 7074 7226 6774 3b3c 2f64 6976 3e0a d_ptr>
    . │ │ │ -00002990: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -000029c0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 66EliminateF │ │ │ -00002a40: 6f72 4d50 453c 2f61 3e28 3c73 7061 6e20 orMPE( │ │ │ -00002a60: 636f 6e73 743c 2f73 7061 6e3e 2044 6973 const Dis │ │ │ -00002a70: 6372 6574 6546 6163 746f 7247 7261 7068 creteFactorGraph │ │ │ -00002a80: 2661 6d70 3b20 6661 6374 6f72 732c 3c2f & factors,.
    │ │ │ -00002ae0: 3637 3c2f 7370 616e 3e20 2020 2020 2020 67 │ │ │ -00002af0: 2020 2020 2020 2020 203c 7370 616e 2063 c │ │ │ -00002b10: 6f6e 7374 3c2f 7370 616e 3e20 4f72 6465 onst Orde │ │ │ -00002b20: 7269 6e67 2661 6d70 3b20 6672 6f6e 7461 ring& fronta │ │ │ -00002b30: 6c4b 6579 7329 3b3c 2f64 6976 3e0a 3c64 lKeys);
    . │ │ │ -00002b50: 3c61 2069 643d 226c 3030 3036 3822 206e 68
    .
    │ │ │ -00002be0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    70< │ │ │ -00002d90: 2f73 7061 6e3e 7b3c 2f64 6976 3e0a 3c64 /span>{
    . │ │ │ -00002db0: 3c61 2069 643d 226c 3030 3037 3122 206e 71 │ │ │ -00002e30: 3c2f 613e 3c2f 7370 616e 3e20 203c 7370 typedef Di │ │ │ -00002e90: 7363 7265 7465 4661 6374 6f72 3c2f 613e screteFactor │ │ │ -00002ea0: 203c 6120 636c 6173 733d 2263 6f64 6520 FactorType; │ │ │ -00002f00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -00002f10: 2020 203c 2f64 6976 3e0a 3c64 6976 2063
    .
    72 │ │ │ -00002fb0: 3c2f 7370 616e 3e20 203c 7370 616e 2063 t │ │ │ -00002fd0: 7970 6564 6566 3c2f 7370 616e 3e20 3c61 ypedef Discre │ │ │ -00003010: 7465 4661 6374 6f72 4772 6170 683c 2f61 teFactorGraph FactorGraphTyp │ │ │ -00003080: 653c 2f61 3e3b 2020 2020 2020 2020 203c e; < │ │ │ -00003090: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>... │ │ │ -000033a0: 3c61 2069 643d 226c 3030 3037 3522 206e 75 │ │ │ -00003420: 3c2f 613e 3c2f 7370 616e 3e20 203c 7370 typedef Di │ │ │ -00003480: 7363 7265 7465 456c 696d 696e 6174 696f screteEliminatio │ │ │ -00003490: 6e54 7265 653c 2f61 3e20 3c61 2063 6c61 nTree Elimin │ │ │ -000034f0: 6174 696f 6e54 7265 6554 7970 653c 2f61 ationTreeType;
    .
    76 │ │ │ -000035a0: 3c2f 7370 616e 3e20 203c 7370 616e 2063 t │ │ │ -000035c0: 7970 6564 6566 3c2f 7370 616e 3e20 3c61 ypedef Discre │ │ │ -00003600: 7465 4261 7965 7354 7265 653c 2f61 3e20 teBayesTree │ │ │ -00003610: 3c61 2063 6c61 7373 3d22 636f 6465 2068 │ │ │ -00003660: 4261 7965 7354 7265 6554 7970 653c 2f61 BayesTreeType; < │ │ │ -00003680: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    77 typed │ │ │ -00003740: 6566 3c2f 7370 616e 3e20 3c61 2063 6c61 ef DiscreteJu │ │ │ -00003780: 6e63 7469 6f6e 5472 6565 3c2f 613e 203c nctionTree < │ │ │ -00003790: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -000037a0: 5f74 7970 6564 6566 2220 6872 6566 3d22 _typedef" href=" │ │ │ -000037b0: 6130 3238 3630 2e68 746d 6c23 6133 3130 a02860.html#a310 │ │ │ -000037c0: 3563 6436 3531 3264 3136 3734 6436 6434 5cd6512d1674d6d4 │ │ │ -000037d0: 3333 3033 3463 3837 6234 6530 6322 3e4a 33034c87b4e0c">J │ │ │ -000037e0: 756e 6374 696f 6e54 7265 6554 7970 653c unctionTreeType< │ │ │ -000037f0: 2f61 3e3b 2020 2020 2020 203c 2f64 6976 /a>;
    .
    78< │ │ │ -00003850: 2f73 7061 6e3e 2020 3c2f 6469 763e 0a3c /span>
    .< │ │ │ -00003860: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00003870: 3e3c 6120 6964 3d22 6c30 3030 3830 2220 > 80
    stati │ │ │ -000038d0: 633c 2f73 7061 6e3e 2073 7464 3a3a 7061 c std::pa │ │ │ -000038e0: 6972 266c 743b 626f 6f73 743a 3a73 6861 ir<boost::sha │ │ │ -000038f0: 7265 645f 7074 7226 6c74 3b43 6f6e 6469 red_ptr<Condi │ │ │ -00003900: 7469 6f6e 616c 5479 7065 2667 743b 2c3c tionalType>,< │ │ │ -00003910: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00003960: 2038 313c 2f73 7061 6e3e 2020 2020 2020 81 │ │ │ -00003970: 2020 2020 2020 2020 2020 2020 2062 6f6f boo │ │ │ -00003980: 7374 3a3a 7368 6172 6564 5f70 7472 266c st::shared_ptr&l │ │ │ -00003990: 743b 4661 6374 6f72 5479 7065 2667 743b t;FactorType> │ │ │ -000039a0: 2026 6774 3b3c 2f64 6976 3e0a 3c64 6976 >
    .
    .
    │ │ │ -00003a80: 2020 3832 3c2f 613e 3c2f 7370 616e 3e20 82 │ │ │ -00003a90: 203c 6120 636c 6173 733d 2263 6f64 6520 DefaultElimina │ │ │ -00003af0: 7465 3c2f 613e 283c 7370 616e 2063 6c61 te(con │ │ │ -00003b10: 7374 3c2f 7370 616e 3e20 3c61 2063 6c61 st FactorGrap │ │ │ -00003b50: 6854 7970 653c 2f61 3e26 616d 703b 2066 hType& f │ │ │ -00003b60: 6163 746f 7273 2c20 3c73 7061 6e20 636c actors, co │ │ │ -00003b80: 6e73 743c 2f73 7061 6e3e 203c 6120 636c nst Ordering< │ │ │ -00003bc0: 2f61 3e26 616d 703b 206b 6579 7329 207b /a>& keys) { │ │ │ -00003bd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00003c20: 2020 3833 3c2f 7370 616e 3e20 2020 203c 83 < │ │ │ -00003c30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00003c40: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ -00003c50: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> Elimina │ │ │ -00003cb0: 7465 4469 7363 7265 7465 3c2f 613e 2866 teDiscrete(f │ │ │ -00003cc0: 6163 746f 7273 2c20 6b65 7973 293b 3c2f actors, keys);.
    │ │ │ -00003d20: 3834 3c2f 7370 616e 3e20 207d 3c2f 6469 84 }.
    .
    85 │ │ │ -00003d90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    .< │ │ │ -00003df0: 6120 6964 3d22 6c30 3030 3837 2220 6e61 a id="l00087" na │ │ │ -00003e00: 6d65 3d22 6c30 3030 3837 223e 3c2f 613e me="l00087"> │ │ │ -00003e10: 3c73 7061 6e20 636c 6173 733d 226c 696e 87< │ │ │ -00003e70: 2f61 3e3c 2f73 7061 6e3e 2020 3c73 7061 /a> static │ │ │ -00003ea0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Orde │ │ │ -00003ed0: 7269 6e67 3c2f 613e 203c 6120 636c 6173 ring Defaul │ │ │ -00003f30: 744f 7264 6572 696e 6746 756e 633c 2f61 tOrderingFunc(
    .
    88 │ │ │ -00003fa0: 2020 203c 7370 616e 2063 6c61 7373 3d22 const FactorGraphTyp │ │ │ -00004000: 653c 2f61 3e26 616d 703b 2067 7261 7068 e& graph │ │ │ -00004010: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ -00004060: 2020 2038 393c 2f73 7061 6e3e 2020 2020 89 │ │ │ -00004070: 2020 626f 6f73 743a 3a6f 7074 696f 6e61 boost::optiona │ │ │ -00004080: 6c26 6c74 3b63 6f6e 7374 2056 6172 6961 l<const Varia │ │ │ -00004090: 626c 6549 6e64 6578 2661 6d70 3b26 6774 bleIndex&> │ │ │ -000040a0: 3b20 7661 7269 6162 6c65 496e 6465 7829 ; variableIndex) │ │ │ -000040b0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    90 │ │ │ -00004110: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur │ │ │ -00004130: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n Orderi │ │ │ -00004190: 6e67 3a3a 436f 6c61 6d64 3c2f 613e 282a ng::Colamd(* │ │ │ -000041a0: 7661 7269 6162 6c65 496e 6465 7829 3b3c variableIndex);< │ │ │ -000041b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00004200: 2039 313c 2f73 7061 6e3e 2020 7d3c 2f64 91 }.
    .
    92} │ │ │ -00004270: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 0a3c ;
    .
    .< │ │ │ -00004280: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00004290: 3e3c 6120 6964 3d22 6c30 3030 3933 2220 > 93
    .
    .
    │ │ │ -00004390: 3939 3c2f 613e 3c2f 7370 616e 3e3c 7370 99class │ │ │ -000043c0: 4754 5341 4d5f 4558 504f 5254 203c 6120 GTSAM_EXPORT Discret │ │ │ -00004400: 6546 6163 746f 7247 7261 7068 3c2f 613e eFactorGraph │ │ │ -00004410: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00004460: 2031 3030 3c2f 7370 616e 3e20 2020 203a 100 : │ │ │ -00004470: 203c 7370 616e 2063 6c61 7373 3d22 6b65 public FactorGraph │ │ │ -000044d0: 266c 743b 4469 7363 7265 7465 4661 6374 <DiscreteFact │ │ │ -000044e0: 6f72 2667 743b 2c3c 2f64 6976 3e0a 3c64 or>,
    . │ │ │ -00004500: 3c61 2069 643d 226c 3030 3130 3122 206e 101 pu │ │ │ -00004560: 626c 6963 3c2f 7370 616e 3e20 3c61 2063 blic Eliminat │ │ │ -000045a0: 6561 626c 6546 6163 746f 7247 7261 7068 eableFactorGraph │ │ │ -000045b0: 3c2f 613e 266c 743b 4469 7363 7265 7465 <Discrete │ │ │ -000045c0: 4661 6374 6f72 4772 6170 6826 6774 3b20 FactorGraph> │ │ │ -000045d0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ -00004620: 2020 3130 323c 2f73 7061 6e3e 203c 7370 102 public │ │ │ -00004650: 3a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 :
    .
    │ │ │ -000046a0: 3c61 2063 6c61 7373 3d22 6c69 6e65 2220 103 usi │ │ │ -00004710: 6e67 203c 2f73 7061 6e3e 3c61 2063 6c61 ng This = │ │ │ -00004750: 203c 6120 636c 6173 733d 2263 6f64 6520 Dis │ │ │ -00004780: 6372 6574 6546 6163 746f 7247 7261 7068 creteFactorGraph │ │ │ -00004790: 3c2f 613e 3b20 2020 2020 2020 2020 203c ; < │ │ │ -000047a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    104 using │ │ │ -00004860: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 Base = < │ │ │ -000048a0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -000048b0: 5f63 6c61 7373 2220 6872 6566 3d22 6130 _class" href="a0 │ │ │ -000048c0: 3335 3234 2e68 746d 6c22 3e46 6163 746f 3524.html">Facto │ │ │ -000048d0: 7247 7261 7068 266c 743b 4469 7363 7265 rGraph<Discre │ │ │ -000048e0: 7465 4661 6374 6f72 2667 743b 3c2f 613e teFactor> │ │ │ -000048f0: 3b20 203c 2f64 6976 3e0a 3c64 6976 2063 ;
    .
    105 │ │ │ -00004990: 3c2f 7370 616e 3e20 203c 7370 616e 2063 u │ │ │ -000049b0: 7369 6e67 203c 2f73 7061 6e3e 3c61 2063 sing Base │ │ │ -00004a10: 456c 696d 696e 6174 6561 626c 653c 2f61 Eliminateable =
    ..
    107 │ │ │ -00004b80: 3c2f 7370 616e 3e20 203c 7370 616e 2063 u │ │ │ -00004ba0: 7369 6e67 203c 2f73 7061 6e3e 3c61 2063 sing shar │ │ │ -00004c00: 6564 5f70 7472 3c2f 613e 203d 2062 6f6f ed_ptr = boo │ │ │ -00004c10: 7374 3a3a 7368 6172 6564 5f70 7472 266c st::shared_ptr&l │ │ │ -00004c20: 743b 5468 6973 2667 743b 3b20 203c 2f64 t;This>; .
    10 │ │ │ -00004c80: 383c 2f73 7061 6e3e 203c 2f64 6976 3e0a 8
    . │ │ │ -00004c90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -00004cc0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 1 │ │ │ -00004d20: 3039 3c2f 613e 3c2f 7370 616e 3e20 203c 09 < │ │ │ -00004d30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00004d40: 6f72 6422 3e75 7369 6e67 203c 2f73 7061 ord">using Va │ │ │ -00004d80: 6c75 6573 3c2f 613e 203d 203c 6120 636c lues = DiscreteV │ │ │ -00004dc0: 616c 7565 733c 2f61 3e3b 2020 3c2f 6469 alues; .
    110 │ │ │ -00004e20: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ -00004e30: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00004e40: 3e3c 6120 6964 3d22 6c30 3031 3131 2220 > 111 using │ │ │ -00004ea0: 203c 2f73 7061 6e3e 496e 6469 6365 7320 Indices │ │ │ -00004eb0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = KeyVector; │ │ │ -00004f10: 2020 3c2f 6469 763e 0a3c 6469 7620 636c
    .
    112 .
    114 DiscreteFac │ │ │ -00005070: 746f 7247 7261 7068 3c2f 613e 2829 207b torGraph() { │ │ │ -00005080: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    ... │ │ │ +000002c0: 3c2f 7363 7269 7074 3e0a 3c6c 696e 6b20 ...< │ │ │ +00000340: 7363 7269 7074 2074 7970 653d 2274 6578 script type="tex │ │ │ +00000350: 742f 6a61 7661 7363 7269 7074 2220 7372 t/javascript" sr │ │ │ +00000360: 633d 226e 6176 7472 6565 6461 7461 2e6a c="navtreedata.j │ │ │ +00000370: 7322 3e3c 2f73 6372 6970 743e 0a3c 7363 s">......MathJax.Hub.C │ │ │ +000004b0: 6f6e 6669 6728 7b0a 2020 6578 7465 6e73 onfig({. extens │ │ │ +000004c0: 696f 6e73 3a20 5b22 7465 7832 6a61 782e ions: ["tex2jax. │ │ │ +000004d0: 6a73 225d 2c0a 2020 6a61 783a 205b 2269 js"],. jax: ["i │ │ │ +000004e0: 6e70 7574 2f54 6558 222c 226f 7574 7075 nput/TeX","outpu │ │ │ +000004f0: 742f 4854 4d4c 2d43 5353 225d 2c0a 7d29 t/HTML-CSS"],.}) │ │ │ +00000500: 3b0a 3c2f 7363 7269 7074 3e0a 3c73 6372 ;.. │ │ │ +00000590: 0a3c 6c69 6e6b 2068 7265 663d 2264 6f78 .....
    .. . │ │ │ +00000680: 0a20 203c 7464 2069 643d 2270 726f 6a65 . . . ....../* @li │ │ │ +000007a0: 6365 6e73 6520 6d61 676e 6574 3a3f 7874 cense magnet:?xt │ │ │ +000007b0: 3d75 726e 3a62 7469 683a 6433 6439 6139 =urn:btih:d3d9a9 │ │ │ +000007c0: 6136 3539 3535 3231 6639 3636 3661 3565 a6595521f9666a5e │ │ │ +000007d0: 3934 6363 3833 3064 6162 3833 6236 3536 94cc830dab83b656 │ │ │ +000007e0: 3939 2661 6d70 3b64 6e3d 6578 7061 742e 99&dn=expat. │ │ │ +000007f0: 7478 7420 4d49 5420 2a2f 0a76 6172 2073 txt MIT */.var s │ │ │ +00000800: 6561 7263 6842 6f78 203d 206e 6577 2053 earchBox = new S │ │ │ +00000810: 6561 7263 6842 6f78 2822 7365 6172 6368 earchBox("search │ │ │ +00000820: 426f 7822 2c20 2273 6561 7263 682f 222c Box", "search/", │ │ │ +00000830: 272e 6874 6d6c 2729 3b0a 2f2a 2040 6c69 '.html');./* @li │ │ │ +00000840: 6365 6e73 652d 656e 6420 2a2f 0a3c 2f73 cense-end */....< │ │ │ +000009e0: 6469 7620 6964 3d22 6d61 696e 2d6e 6176 div id="main-nav │ │ │ +000009f0: 223e 3c2f 6469 763e 0a3c 7363 7269 7074 ">...< │ │ │ +00000ae0: 6469 7620 6964 3d22 7369 6465 2d6e 6176 div id="side-nav │ │ │ +00000af0: 2220 636c 6173 733d 2275 692d 7265 7369 " class="ui-resi │ │ │ +00000b00: 7a61 626c 6520 7369 6465 2d6e 6176 2d72 zable side-nav-r │ │ │ +00000b10: 6573 697a 6162 6c65 223e 0a20 203c 6469 esizable">. │ │ │ +00000b30: 0a20 2020 203c 6469 7620 6964 3d22 6e61 .
    .
    . │ │ │ +00000b80: 2020 203c 2f64 6976 3e0a 2020 3c2f 6469
    .
    .
    . .
    ../* @ │ │ │ +00000c20: 6c69 6365 6e73 6520 6d61 676e 6574 3a3f license magnet:? │ │ │ +00000c30: 7874 3d75 726e 3a62 7469 683a 6433 6439 xt=urn:btih:d3d9 │ │ │ +00000c40: 6139 6136 3539 3535 3231 6639 3636 3661 a9a6595521f9666a │ │ │ +00000c50: 3565 3934 6363 3833 3064 6162 3833 6236 5e94cc830dab83b6 │ │ │ +00000c60: 3536 3939 2661 6d70 3b64 6e3d 6578 7061 5699&dn=expa │ │ │ +00000c70: 742e 7478 7420 4d49 5420 2a2f 0a24 2864 t.txt MIT */.$(d │ │ │ +00000c80: 6f63 756d 656e 7429 2e72 6561 6479 2866 ocument).ready(f │ │ │ +00000c90: 756e 6374 696f 6e28 297b 696e 6974 4e61 unction(){initNa │ │ │ +00000ca0: 7654 7265 6528 2761 3030 3231 325f 736f vTree('a00212_so │ │ │ +00000cb0: 7572 6365 2e68 746d 6c27 2c27 2729 3b20 urce.html',''); │ │ │ +00000cc0: 696e 6974 5265 7369 7a61 626c 6528 293b initResizable(); │ │ │ +00000cd0: 207d 293b 0a2f 2a20 406c 6963 656e 7365 });./* @license │ │ │ +00000ce0: 2d65 6e64 202a 2f0a 3c2f 7363 7269 7074 -end */..
    ..
    .< │ │ │ +00000e00: 2f64 6976 3e0a 0a3c 212d 2d20 6966 7261 /div>...
    .
    . │ │ │ +00000e80: 3c64 6976 2063 6c61 7373 3d22 5352 5061
    .
    .
    .
    Loading... │ │ │ +00000ef0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    Sear │ │ │ +00000f20: 6368 696e 672e 2e2e 3c2f 6469 763e 0a3c ching...
    .< │ │ │ +00000f30: 6469 7620 636c 6173 733d 2253 5253 7461 div class="SRSta │ │ │ +00000f40: 7475 7322 2069 643d 224e 6f4d 6174 6368 tus" id="NoMatch │ │ │ +00000f50: 6573 223e 4e6f 204d 6174 6368 6573 3c2f es">No Matches.
    ..
    .
    │ │ │ +00000f80: 0a0a 3c64 6976 2063 6c61 7373 3d22 6865 ..
    .
    DecisionTre │ │ │ +00000fd0: 652d 696e 6c2e 683c 2f64 6976 3e3c 2f64 e-inl.h
    .
    .
    .< │ │ │ +00001010: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ +00001020: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    │ │ │ +00001070: 2031 3c2f 7370 616e 3e3c 7370 616e 2063 1/ │ │ │ +00001090: 2a20 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d * -------------- │ │ │ +000010a0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ +000010b0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ +000010c0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ +000010d0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 3c2f --------------
    .
    < │ │ │ +00001120: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00001130: 6e6f 223e 2020 2020 323c 2f73 7061 6e3e no"> 2 │ │ │ +00001140: 3c73 7061 6e20 636c 6173 733d 2263 6f6d .
    │ │ │ +000011b0: 2033 3c2f 7370 616e 3e3c 7370 616e 2063 3 │ │ │ +000011d0: 2a20 4754 5341 4d20 436f 7079 7269 6768 * GTSAM Copyrigh │ │ │ +000011e0: 7420 3230 3130 2c20 4765 6f72 6769 6120 t 2010, Georgia │ │ │ +000011f0: 5465 6368 2052 6573 6561 7263 6820 436f Tech Research Co │ │ │ +00001200: 7270 6f72 6174 696f 6e2c 3c2f 7370 616e rporation,
    .
    │ │ │ +00001260: 2020 2020 343c 2f73 7061 6e3e 3c73 7061 4 * Atlanta, Ge │ │ │ +00001290: 6f72 6769 6120 3330 3333 322d 3034 3135 orgia 30332-0415 │ │ │ +000012a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ +000012c0: 3c61 2069 643d 226c 3030 3030 3522 206e 5 * All R │ │ │ +00001320: 6967 6874 7320 5265 7365 7276 6564 3c2f ights Reserved
    .
    < │ │ │ +00001370: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00001380: 6e6f 223e 2020 2020 363c 2f73 7061 6e3e no"> 6 │ │ │ +00001390: 3c73 7061 6e20 636c 6173 733d 2263 6f6d * Authors │ │ │ +000013b0: 3a20 4672 616e 6b20 4465 6c6c 6165 7274 : Frank Dellaert │ │ │ +000013c0: 2c20 6574 2061 6c2e 2028 7365 6520 5448 , et al. (see TH │ │ │ +000013d0: 414e 4b53 2066 6f72 2074 6865 2066 756c ANKS for the ful │ │ │ +000013e0: 6c20 6175 7468 6f72 206c 6973 7429 3c2f l author list)
    .
    < │ │ │ +00001430: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00001440: 6e6f 223e 2020 2020 373c 2f73 7061 6e3e no"> 7 │ │ │ +00001450: 3c73 7061 6e20 636c 6173 733d 2263 6f6d .
    │ │ │ +000014c0: 2038 3c2f 7370 616e 3e3c 7370 616e 2063 8 │ │ │ +000014e0: 2a20 5365 6520 4c49 4345 4e53 4520 666f * See LICENSE fo │ │ │ +000014f0: 7220 7468 6520 6c69 6365 6e73 6520 696e r the license in │ │ │ +00001500: 666f 726d 6174 696f 6e3c 2f73 7061 6e3e formation │ │ │ +00001510: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00001560: 2020 2039 3c2f 7370 616e 3e3c 7370 616e 9
    . │ │ │ +00001590: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    │ │ │ +000016a0: 2020 2031 313c 2f73 7061 6e3e 203c 2f64 11 .
    2 │ │ │ +00001700: 303c 2f73 7061 6e3e 3c73 7061 6e20 636c 0#pragma once< │ │ │ +00001730: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ +00001750: 6120 6964 3d22 6c30 3030 3231 2220 6e61 a id="l00021" na │ │ │ +00001760: 6d65 3d22 6c30 3030 3231 223e 3c2f 613e me="l00021"> │ │ │ +00001770: 3c73 7061 6e20 636c 6173 733d 226c 696e 21
    ..
    23 │ │ │ +000018c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00001910: 2020 3234 3c2f 7370 616e 3e3c 7370 616e 24#include & │ │ │ +00001940: 6c74 3b61 6c67 6f72 6974 686d 2667 743b lt;algorithm> │ │ │ +00001950: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ +00001970: 3c61 2069 643d 226c 3030 3032 3522 206e 25#in │ │ │ +000019d0: 636c 7564 6520 266c 743b 626f 6f73 742f clude <boost/ │ │ │ +000019e0: 666f 726d 6174 2e68 7070 2667 743b 3c2f format.hpp>
    .
    < │ │ │ +00001a30: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00001a40: 6e6f 223e 2020 2032 363c 2f73 7061 6e3e no"> 26 │ │ │ +00001a50: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl │ │ │ +00001a70: 7564 6520 266c 743b 626f 6f73 742f 6d61 ude <boost/ma │ │ │ +00001a80: 6b65 5f73 6861 7265 642e 6870 7026 6774 ke_shared.hpp> │ │ │ +00001a90: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .< │ │ │ +00001aa0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00001ab0: 3e3c 6120 6964 3d22 6c30 3030 3237 2220 > 27#i │ │ │ +00001b10: 6e63 6c75 6465 2026 6c74 3b62 6f6f 7374 nclude <boost │ │ │ +00001b20: 2f6f 7074 696f 6e61 6c2e 6870 7026 6774 /optional.hpp> │ │ │ +00001b30: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .< │ │ │ +00001b40: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00001b50: 3e3c 6120 6964 3d22 6c30 3030 3238 2220 > 28
    .
    29< │ │ │ +00001bf0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class="prep │ │ │ +00001c00: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor">#inclu │ │ │ +00001c10: 6465 2026 6c74 3b63 6d61 7468 2667 743b de <cmath> │ │ │ +00001c20: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ +00001c40: 3c61 2069 643d 226c 3030 3033 3022 206e 30#in │ │ │ +00001ca0: 636c 7564 6520 266c 743b 6673 7472 6561 clude <fstrea │ │ │ +00001cb0: 6d26 6774 3b3c 2f73 7061 6e3e 3c2f 6469 m>.
    31 │ │ │ +00001d10: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 #include <l │ │ │ +00001d40: 6973 7426 6774 3b3c 2f73 7061 6e3e 3c2f ist>.
    │ │ │ +00001da0: 3332 3c2f 7370 616e 3e3c 7370 616e 2063 32#include < │ │ │ +00001dd0: 3b6d 6170 2667 743b 3c2f 7370 616e 3e3c ;map>< │ │ │ +00001de0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00001e30: 2033 333c 2f73 7061 6e3e 3c73 7061 6e20 33#include &l │ │ │ +00001e60: 743b 7365 7426 6774 3b3c 2f73 7061 6e3e t;set> │ │ │ +00001e70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00001ec0: 2020 3334 3c2f 7370 616e 3e3c 7370 616e 34#include & │ │ │ +00001ef0: 6c74 3b73 7374 7265 616d 2667 743b 3c2f lt;sstream>
    .
    < │ │ │ +00001f40: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00001f50: 6e6f 223e 2020 2033 353c 2f73 7061 6e3e no"> 35 │ │ │ +00001f60: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl │ │ │ +00001f80: 7564 6520 266c 743b 7374 7269 6e67 2667 ude <string&g │ │ │ +00001f90: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    . │ │ │ +00001fa0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ +00001fd0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 36# │ │ │ +00002010: 696e 636c 7564 6520 266c 743b 7665 6374 include <vect │ │ │ +00002020: 6f72 2667 743b 3c2f 7370 616e 3e3c 2f64 or>.
    3 │ │ │ +00002080: 373c 2f73 7061 6e3e 203c 2f64 6976 3e0a 7
    . │ │ │ +00002090: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ +00002160: 6120 6964 3d22 6c30 3030 3339 2220 6e61 a id="l00039" na │ │ │ +00002170: 6d65 3d22 6c30 3030 3339 223e 3c2f 613e me="l00039"> │ │ │ +00002180: 3c73 7061 6e20 636c 6173 733d 226c 696e 39
    .
    40 /********** │ │ │ +00002220: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00002230: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00002240: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00002250: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00002260: 2a2a 2f3c 2f73 7061 6e3e 3c2f 6469 763e **/
    │ │ │ +00002270: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +000022a0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 41 // │ │ │ +000022e0: 4e6f 6465 3c2f 7370 616e 3e3c 2f64 6976 Node
    .
    42< │ │ │ +00002340: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span> /* │ │ │ +00002360: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00002370: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00002380: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00002390: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000023a0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2f 3c2f 7370 ***********/
    .
    43#ifdef │ │ │ +00002430: 4454 5f44 4542 5547 5f4d 454d 4f52 593c DT_DEBUG_MEMORY< │ │ │ +00002440: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ +00002460: 6120 6964 3d22 6c30 3030 3434 2220 6e61 a id="l00044" na │ │ │ +00002470: 6d65 3d22 6c30 3030 3434 223e 3c2f 613e me="l00044"> │ │ │ +00002480: 3c73 7061 6e20 636c 6173 733d 226c 696e 44 templat │ │ │ +000024c0: 653c 2f73 7061 6e3e 266c 743b 3c73 7061 e<typename L, typen │ │ │ +00002510: 616d 653c 2f73 7061 6e3e 2059 2667 743b ame Y> │ │ │ +00002520: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00002570: 2020 3435 3c2f 7370 616e 3e20 203c 7370 45 int DecisionTree&l │ │ │ +000025b0: 743b 4c2c 2059 2667 743b 3a3a 4e6f 6465 t;L, Y>::Node │ │ │ +000025c0: 3a3a 6e72 4e6f 6465 7320 3d20 303b 3c2f ::nrNodes = 0;.
    │ │ │ +00002620: 3436 3c2f 7370 616e 3e3c 7370 616e 2063 46#endif
    .
    │ │ │ +000026a0: 2020 2034 373c 2f73 7061 6e3e 203c 2f64 47 .
    4 │ │ │ +00002700: 383c 2f73 7061 6e3e 3c73 7061 6e20 636c 8 │ │ │ +00002720: 2f2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a /*************** │ │ │ +00002730: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00002740: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00002750: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00002760: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2f 3c2f *************/
    .
    < │ │ │ +000027b0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +000027c0: 6e6f 223e 2020 2034 393c 2f73 7061 6e3e no"> 49 │ │ │ +000027d0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // Leaf< │ │ │ +000027f0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ +00002810: 6120 6964 3d22 6c30 3030 3530 2220 6e61 a id="l00050" na │ │ │ +00002820: 6d65 3d22 6c30 3030 3530 223e 3c2f 613e me="l00050"> │ │ │ +00002830: 3c73 7061 6e20 636c 6173 733d 226c 696e 50 /****** │ │ │ +00002870: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00002880: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00002890: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000028a0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000028b0: 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e 3c2f ******/.
    │ │ │ +00002910: 3531 3c2f 7370 616e 3e20 203c 7370 616e 51 template │ │ │ +00002940: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ +00002960: 616d 653c 2f73 7061 6e3e 204c 2c20 3c73 ame L, typename Y>
    . │ │ │ +000029a0: 3c64 6976 2063 6c61 7373 3d22 666f 6c64
    .
    < │ │ │ +00002a30: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ +00002a40: 7265 663d 2261 3032 3737 362e 6874 6d6c ref="a02776.html │ │ │ +00002a50: 223e 2020 2035 323c 2f61 3e3c 2f73 7061 "> 52 struct │ │ │ +00002a80: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 DecisionTree │ │ │ +00002ac0: 3c2f 613e 266c 743b 4c2c 2059 2667 743b <L, Y> │ │ │ +00002ad0: 3a3a 3c61 2063 6c61 7373 3d22 636f 6465 ::L │ │ │ +00002b00: 6561 663c 2f61 3e20 3a20 3c73 7061 6e20 eaf : │ │ │ +00002b20: 7075 626c 6963 3c2f 7370 616e 3e20 3c61 public Decisi │ │ │ +00002b60: 6f6e 5472 6565 3c2f 613e 266c 743b 4c2c onTree<L, │ │ │ +00002b70: 2059 2667 743b 3a3a 4e6f 6465 207b 3c2f Y>::Node {.. │ │ │ +00002ca0: 3c61 2069 643d 226c 3030 3035 3522 206e 55
    .
    59 │ │ │ +00002d80: 3c2f 7370 616e 3e20 2020 203c 7370 616e size_t nrAssignment │ │ │ +00002e10: 735f 3c2f 613e 3b3c 2f64 6976 3e0a 3c64 s_;
    . │ │ │ +00002e30: 3c61 2069 643d 226c 3030 3036 3022 206e 60
    .
    62 │ │ │ +00002f10: 3c2f 7370 616e 3e20 2020 203c 6120 636c Leaf │ │ │ +00002f70: 3c2f 613e 2829 207b 7d3c 2f64 6976 3e0a () {}
    . │ │ │ +00002f80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    .
    │ │ │ +000030b0: 2020 3635 3c2f 613e 3c2f 7370 616e 3e20 65 │ │ │ +000030c0: 2020 203c 6120 636c 6173 733d 2263 6f64 Leaf(const │ │ │ +00003140: 5926 616d 703b 2063 6f6e 7374 616e 742c Y& constant, │ │ │ +00003150: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_ │ │ │ +00003170: 743c 2f73 7061 6e3e 206e 7241 7373 6967 t nrAssig │ │ │ +00003180: 6e6d 656e 7473 203d 2031 293c 2f64 6976 nments = 1)
    .
    66< │ │ │ +000031e0: 2f73 7061 6e3e 2020 2020 2020 2020 3a20 /span> : │ │ │ +000031f0: 636f 6e73 7461 6e74 5f28 636f 6e73 7461 constant_(consta │ │ │ +00003200: 6e74 292c 206e 7241 7373 6967 6e6d 656e nt), nrAssignmen │ │ │ +00003210: 7473 5f28 6e72 4173 7369 676e 6d65 6e74 ts_(nrAssignment │ │ │ +00003220: 7329 207b 7d3c 2f64 6976 3e0a 3c2f 6469 s) {}
    ..
    67 │ │ │ +00003280: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ +00003290: 6469 7620 636c 6173 733d 2266 6f6c 646f div class="foldo │ │ │ +000032a0: 7065 6e22 2069 643d 2266 6f6c 646f 7065 pen" id="foldope │ │ │ +000032b0: 6e30 3030 3639 2220 6461 7461 2d73 7461 n00069" data-sta │ │ │ +000032c0: 7274 3d22 7b22 2064 6174 612d 656e 643d rt="{" data-end= │ │ │ +000032d0: 227d 223e 0a3c 6469 7620 636c 6173 733d "}">.
    69 cons │ │ │ +00003390: 743c 2f73 7061 6e3e 2059 2661 6d70 3b20 t Y& │ │ │ +000033a0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 constant()< │ │ │ +00003400: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00003410: 6f72 6422 3e20 636f 6e73 7420 3c2f 7370 ord"> const {
    .
    70 │ │ │ +00003480: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ +000034a0: 6574 7572 6e3c 2f73 7061 6e3e 2063 6f6e eturn con │ │ │ +000034b0: 7374 616e 745f 3b3c 2f64 6976 3e0a 3c64 stant_;
    . │ │ │ +000034d0: 3c61 2069 643d 226c 3030 3037 3122 206e 71 }
    ..
    │ │ │ +00003570: 3732 3c2f 7370 616e 3e20 3c2f 6469 763e 72
    │ │ │ +00003580: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +000035b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d │ │ │ +00003610: 2037 343c 2f61 3e3c 2f73 7061 6e3e 2020 74 │ │ │ +00003620: 2020 3c73 7061 6e20 636c 6173 733d 226b size │ │ │ +00003640: 5f74 3c2f 7370 616e 3e20 3c61 2063 6c61 _t nrAss │ │ │ +000036a0: 6967 6e6d 656e 7473 3c2f 613e 2829 3c73 ignments() const { re │ │ │ +000036f0: 7475 726e 3c2f 7370 616e 3e20 6e72 4173 turn nrAs │ │ │ +00003700: 7369 676e 6d65 6e74 735f 3b20 7d3c 2f64 signments_; }.
    7 │ │ │ +00003760: 353c 2f73 7061 6e3e 203c 2f64 6976 3e0a 5
    . │ │ │ +00003770: 3c64 6976 2063 6c61 7373 3d22 666f 6c64
    . │ │ │ +00003ae0: 3c61 2069 643d 226c 3030 3038 3022 206e 80
    .
    . │ │ │ +00003b70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ +00003ba0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> │ │ │ +00003c00: 3832 3c2f 613e 3c2f 7370 616e 3e20 2020 82 │ │ │ +00003c10: 203c 7370 616e 2063 6c61 7373 3d22 6b65 bool< │ │ │ +00003c30: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> sameLeaf │ │ │ +00003c90: 3c2f 613e 283c 7370 616e 2063 6c61 7373 (const │ │ │ +00003cb0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 Node&am │ │ │ +00003cf0: 703b 2071 293c 7370 616e 2063 6c61 7373 p; q) cons │ │ │ +00003d10: 7420 6f76 6572 7269 6465 203c 2f73 7061 t override {
    .
    83 │ │ │ +00003d80: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ +00003da0: 7475 726e 3c2f 7370 616e 3e20 2871 2e69 turn (q.i │ │ │ +00003db0: 734c 6561 6628 2920 2661 6d70 3b26 616d sLeaf() &&am │ │ │ +00003dc0: 703b 2071 2e73 616d 654c 6561 6628 2a3c p; q.sameLeaf(*< │ │ │ +00003dd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00003de0: 6f72 6422 3e74 6869 733c 2f73 7061 6e3e ord">this │ │ │ +00003df0: 2929 3b3c 2f64 6976 3e0a 3c64 6976 2063 ));
    .
    84 │ │ │ +00003e50: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ +00003e60: 0a3c 6469 7620 636c 6173 733d 226c 696e ...
    │ │ │ +00003f90: 2020 2038 373c 2f61 3e3c 2f73 7061 6e3e 87 │ │ │ +00003fa0: 2020 2020 3c73 7061 6e20 636c 6173 733d bo │ │ │ +00003fc0: 6f6c 3c2f 7370 616e 3e20 3c61 2063 6c61 ol equal │ │ │ +00004020: 733c 2f61 3e28 3c73 7061 6e20 636c 6173 s(cons │ │ │ +00004040: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t Node&a │ │ │ +00004080: 6d70 3b20 712c 203c 7370 616e 2063 6c61 mp; q, con │ │ │ +000040a0: 7374 3c2f 7370 616e 3e20 436f 6d70 6172 st Compar │ │ │ +000040b0: 6546 756e 6326 616d 703b 2063 6f6d 7061 eFunc& compa │ │ │ +000040c0: 7265 293c 7370 616e 2063 6c61 7373 3d22 re) const │ │ │ +000040e0: 6f76 6572 7269 6465 203c 2f73 7061 6e3e override │ │ │ +000040f0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ +00004140: 2020 2038 383c 2f73 7061 6e3e 2020 2020 88 │ │ │ +00004150: 2020 3c73 7061 6e20 636c 6173 733d 226b const Leaf* othe │ │ │ +000041b0: 7220 3d20 3c73 7061 6e20 636c 6173 733d r = dynami │ │ │ +000041d0: 635f 6361 7374 266c 743b 3c2f 7370 616e c_cast<const Leaf* │ │ │ +00004250: 2667 743b 3c2f 7370 616e 3e28 2661 6d70 >(& │ │ │ +00004260: 3b71 293b 3c2f 6469 763e 0a3c 6469 7620 ;q);
    .
    89 │ │ │ +000042c0: 2020 2020 203c 7370 616e 2063 6c61 7373 i │ │ │ +000042e0: 663c 2f73 7061 6e3e 2028 216f 7468 6572 f (!other │ │ │ +000042f0: 2920 3c73 7061 6e20 636c 6173 733d 226b ) retu │ │ │ +00004310: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn │ │ │ +00004330: 6661 6c73 653c 2f73 7061 6e3e 3b3c 2f64 false;.
    9 │ │ │ +00004390: 303c 2f73 7061 6e3e 2020 2020 2020 3c73 0 return compare(th │ │ │ +000043d0: 6973 2d26 6774 3b63 6f6e 7374 616e 745f is->constant_ │ │ │ +000043e0: 2c20 6f74 6865 722d 2667 743b 3c61 2063 , other->con │ │ │ +00004440: 7374 616e 745f 3c2f 613e 293b 3c2f 6469 stant_);.
    91 │ │ │ +000044a0: 3c2f 7370 616e 3e20 2020 207d 3c2f 6469 }.
    .
    92 < │ │ │ +00004510: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .
    < │ │ │ +00004590: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +000045a0: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 94 void print(const │ │ │ +000046a0: 2073 7464 3a3a 7374 7269 6e67 2661 6d70 std::string& │ │ │ +000046b0: 3b20 732c 203c 7370 616e 2063 6c61 7373 ; s, const │ │ │ +000046d0: 3c2f 7370 616e 3e20 4c61 6265 6c46 6f72 LabelFor │ │ │ +000046e0: 6d61 7474 6572 2661 6d70 3b20 6c61 6265 matter& labe │ │ │ +000046f0: 6c46 6f72 6d61 7474 6572 2c3c 2f64 6976 lFormatter,
    .
    95< │ │ │ +00004750: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ +00004760: 2020 2020 203c 7370 616e 2063 6c61 7373 const │ │ │ +00004780: 3c2f 7370 616e 3e20 5661 6c75 6546 6f72 ValueFor │ │ │ +00004790: 6d61 7474 6572 2661 6d70 3b20 7661 6c75 matter& valu │ │ │ +000047a0: 6546 6f72 6d61 7474 6572 293c 7370 616e eFormatter) const override │ │ │ +000047d0: 203c 2f73 7061 6e3e 7b3c 2f64 6976 3e0a {
    . │ │ │ +000047e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    97 │ │ │ +00004920: 2020 207d 3c2f 6469 763e 0a3c 2f64 6976 }
    .
    .
    98< │ │ │ +00004980: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    ...
    │ │ │ +00004ba0: 2031 3031 3c2f 7370 616e 3e20 2020 2020 101 │ │ │ +00004bb0: 2020 2020 2020 2020 3c73 7061 6e20 636c co │ │ │ +00004bd0: 6e73 743c 2f73 7061 6e3e 2056 616c 7565 nst Value │ │ │ +00004be0: 466f 726d 6174 7465 7226 616d 703b 2076 Formatter& v │ │ │ +00004bf0: 616c 7565 466f 726d 6174 7465 722c 3c2f alueFormatter,.
    1 │ │ │ +00004c50: 3032 3c2f 7370 616e 3e20 2020 2020 2020 02 │ │ │ +00004c60: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ +00004c80: 626f 6f6c 3c2f 7370 616e 3e20 7368 6f77 bool show │ │ │ +00004c90: 5a65 726f 293c 7370 616e 2063 6c61 7373 Zero) cons │ │ │ +00004cb0: 7420 6f76 6572 7269 6465 203c 2f73 7061 t override {
    .
    103 │ │ │ +00004d20: 2020 2020 7374 643a 3a73 7472 696e 6720 std::string │ │ │ +00004d30: 7661 6c75 6520 3d20 7661 6c75 6546 6f72 value = valueFor │ │ │ +00004d40: 6d61 7474 6572 2863 6f6e 7374 616e 745f matter(constant_ │ │ │ +00004d50: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    104 │ │ │ +00004db0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if< │ │ │ +00004dd0: 2f73 7061 6e3e 2028 7368 6f77 5a65 726f /span> (showZero │ │ │ +00004de0: 207c 7c20 7661 6c75 652e 636f 6d70 6172 || value.compar │ │ │ +00004df0: 6528 3c73 7061 6e20 636c 6173 733d 2273 e(&q │ │ │ +00004e10: 756f 743b 3026 7175 6f74 3b3c 2f73 7061 uot;0"))
    .
    105 │ │ │ +00004e80: 2020 2020 2020 206f 7320 266c 743b 266c os <&l │ │ │ +00004e90: 743b 203c 7370 616e 2063 6c61 7373 3d22 t; & │ │ │ +00004eb0: 7175 6f74 3b5c 2671 756f 743b 2671 756f quot;\"&quo │ │ │ +00004ec0: 743b 3c2f 7370 616e 3e20 266c 743b 266c t; <&l │ │ │ +00004ed0: 743b 2074 6869 732d 2667 743b 6964 2829 t; this->id() │ │ │ +00004ee0: 2026 6c74 3b26 6c74 3b20 3c73 7061 6e20 << "\&qu │ │ │ +00004f10: 6f74 3b20 5b6c 6162 656c 3d5c 2671 756f ot; [label=\&quo │ │ │ +00004f20: 743b 2671 756f 743b 3c2f 7370 616e 3e20 t;" │ │ │ +00004f30: 266c 743b 266c 743b 2076 616c 7565 3c2f << value.
    1 │ │ │ +00004f90: 3036 3c2f 7370 616e 3e20 2020 2020 2020 06 │ │ │ +00004fa0: 2020 2020 266c 743b 266c 743b 203c 7370 << "\ │ │ │ +00004fd0: 2671 756f 743b 2c20 7368 6170 653d 626f ", shape=bo │ │ │ +00004fe0: 782c 2072 616e 6b3d 7369 6e6b 2c20 6865 x, rank=sink, he │ │ │ +00004ff0: 6967 6874 3d30 2e33 352c 2066 6978 6564 ight=0.35, fixed │ │ │ +00005000: 7369 7a65 3d74 7275 655d 5c6e 2671 756f size=true]\n&quo │ │ │ +00005010: 743b 3c2f 7370 616e 3e3b 3c2f 6469 763e t;;
    │ │ │ +00005020: 0a3c 6469 7620 636c 6173 733d 226c 696e . │ │ │ +00005080: 0a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 .
    .
    │ │ │ -000050d0: 2020 3131 353c 2f73 7061 6e3e 203c 2f64 115 .
    11 │ │ │ -00005130: 373c 2f73 7061 6e3e 2020 3c73 7061 6e20 7 │ │ │ -00005150: 7465 6d70 6c61 7465 3c2f 7370 616e 3e20 template │ │ │ -00005160: 266c 743b 3c73 7061 6e20 636c 6173 733d <typena │ │ │ -00005180: 6d65 3c2f 7370 616e 3e20 4954 4552 4154 me ITERAT │ │ │ -00005190: 4f52 2667 743b 3c2f 6469 763e 0a3c 6469 OR>
    ..
    │ │ │ -00005270: 2020 3131 383c 2f61 3e3c 2f73 7061 6e3e 118 │ │ │ -00005280: 2020 3c61 2063 6c61 7373 3d22 636f 6465 DiscreteFacto │ │ │ -000052e0: 7247 7261 7068 3c2f 613e 2849 5445 5241 rGraph(ITERA │ │ │ -000052f0: 544f 5220 6669 7273 7446 6163 746f 722c TOR firstFactor, │ │ │ -00005300: 2049 5445 5241 544f 5220 6c61 7374 4661 ITERATOR lastFa │ │ │ -00005310: 6374 6f72 293c 2f64 6976 3e0a 3c64 6976 ctor)
    .
    < │ │ │ -00005350: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00005360: 6e6f 223e 2020 3131 393c 2f73 7061 6e3e no"> 119 │ │ │ -00005370: 2020 2020 2020 3a20 3c61 2063 6c61 7373 : Base(fir │ │ │ -000053b0: 7374 4661 6374 6f72 2c20 6c61 7374 4661 stFactor, lastFa │ │ │ -000053c0: 6374 6f72 2920 7b7d 3c2f 6469 763e 0a3c ctor) {}
    .< │ │ │ -000053d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00005420: 3132 303c 2f73 7061 6e3e 203c 2f64 6976 120
    .
    122< │ │ │ -00005480: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> te │ │ │ -000054a0: 6d70 6c61 7465 3c2f 7370 616e 3e20 266c mplate &l │ │ │ -000054b0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;class CONTAINER&g │ │ │ -000054e0: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    123< │ │ │ -00005580: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> ex │ │ │ -000055a0: 706c 6963 6974 3c2f 7370 616e 3e20 3c61 plicit D │ │ │ -00005600: 6973 6372 6574 6546 6163 746f 7247 7261 iscreteFactorGra │ │ │ -00005610: 7068 3c2f 613e 283c 7370 616e 2063 6c61 ph(con │ │ │ -00005630: 7374 3c2f 7370 616e 3e20 434f 4e54 4149 st CONTAI │ │ │ -00005640: 4e45 5226 616d 703b 2066 6163 746f 7273 NER& factors │ │ │ -00005650: 2920 3a20 3c61 2063 6c61 7373 3d22 636f ) : │ │ │ -00005680: 4261 7365 3c2f 613e 2866 6163 746f 7273 Base(factors │ │ │ -00005690: 2920 7b7d 3c2f 6469 763e 0a3c 6469 7620 ) {}
    .
    124 │ │ │ -000056f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00005740: 2031 3237 3c2f 7370 616e 3e20 203c 7370 127 template <cla │ │ │ -00005790: 7373 3c2f 7370 616e 3e20 4445 5249 5645 ss DERIVE │ │ │ -000057a0: 445f 4641 4354 4f52 2667 743b 3c2f 6469 D_FACTOR>.
    │ │ │ -00005840: 2020 3132 383c 2f61 3e3c 2f73 7061 6e3e 128 │ │ │ -00005850: 2020 3c61 2063 6c61 7373 3d22 636f 6465 DiscreteFacto │ │ │ -000058b0: 7247 7261 7068 3c2f 613e 283c 7370 616e rGraph(const Factor │ │ │ -00005910: 4772 6170 6826 6c74 3b44 4552 4956 4544 Graph<DERIVED │ │ │ -00005920: 5f46 4143 544f 5226 6774 3b3c 2f61 3e26 _FACTOR>& │ │ │ -00005930: 616d 703b 2067 7261 7068 2920 3a20 3c61 amp; graph) : Base(graph) {}.
    129 │ │ │ -000059d0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ -000059e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -000059f0: 3e3c 6120 6964 3d22 6c30 3031 3331 2220 > 13 │ │ │ -00005a70: 313c 2f61 3e3c 2f73 7061 6e3e 2020 3c73 1 virtual ~DiscreteFac │ │ │ -00005b00: 746f 7247 7261 7068 3c2f 613e 2829 207b torGraph() { │ │ │ -00005b10: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ -00005b60: 2020 3133 323c 2f73 7061 6e3e 203c 2f64 132 .
    13 │ │ │ -00005bc0: 353c 2f73 7061 6e3e 203c 2f64 6976 3e0a 5
    . │ │ │ -00005bd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    141 │ │ │ -00005e20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 template< │ │ │ -00005e40: 2f73 7061 6e3e 2026 6c74 3b3c 7370 616e /span> <typename │ │ │ -00005e70: 2e2e 2e20 4172 6773 2667 743b 3c2f 6469 ... Args>.
    .
    142< │ │ │ -00005f60: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> void a │ │ │ -00005fe0: 6464 3c2f 613e 2841 7267 7326 616d 703b dd(Args& │ │ │ -00005ff0: 2661 6d70 3b2e 2e2e 2061 7267 7329 207b &... args) { │ │ │ -00006000: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00006050: 2031 3433 3c2f 7370 616e 3e20 2020 2065 143 e │ │ │ -00006060: 6d70 6c61 6365 5f73 6861 7265 6426 6c74 mplace_shared< │ │ │ -00006070: 3b44 6563 6973 696f 6e54 7265 6546 6163 ;DecisionTreeFac │ │ │ -00006080: 746f 7226 6774 3b28 7374 643a 3a66 6f72 tor>(std::for │ │ │ -00006090: 7761 7264 266c 743b 4172 6773 2667 743b ward<Args> │ │ │ -000060a0: 2861 7267 7329 2e2e 2e29 3b3c 2f64 6976 (args)...);
    .
    144< │ │ │ -00006100: 2f73 7061 6e3e 2020 7d3c 2f64 6976 3e0a /span> }
    . │ │ │ -00006110: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00006160: 2031 3435 3c2f 7370 616e 3e20 3c2f 6469 145 .
    147 │ │ │ -000061c0: 3c2f 7370 616e 3e20 203c 6120 636c 6173 KeySet │ │ │ -00006200: 6b65 7973 2829 203c 7370 616e 2063 6c61 keys() con │ │ │ -00006220: 7374 3c2f 7370 616e 3e3b 3c2f 6469 763e st;
    │ │ │ -00006230: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -000062a0: 6120 6964 3d22 6c30 3031 3530 2220 6e61 a id="l00150" na │ │ │ -000062b0: 6d65 3d22 6c30 3031 3530 223e 3c2f 613e me="l00150"> │ │ │ -000062c0: 3c73 7061 6e20 636c 6173 733d 226c 696e 150 │ │ │ -00006310: 4469 7363 7265 7465 4b65 7973 3c2f 613e DiscreteKeys │ │ │ -00006320: 2064 6973 6372 6574 654b 6579 7328 2920 discreteKeys() │ │ │ -00006330: 3c73 7061 6e20 636c 6173 733d 226b 6579 const;
    .
    151 < │ │ │ -000063b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00006400: 3135 333c 2f73 7061 6e3e 2020 3c61 2063 153 Decision │ │ │ -00006440: 5472 6565 4661 6374 6f72 3c2f 613e 2070 TreeFactor p │ │ │ -00006450: 726f 6475 6374 2829 203c 7370 616e 2063 roduct() c │ │ │ -00006470: 6f6e 7374 3c2f 7370 616e 3e3b 3c2f 6469 onst;.
    154 │ │ │ -000064d0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ -000064e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -000064f0: 3e3c 6120 6964 3d22 6c30 3031 3539 2220 > 159 d │ │ │ -00006550: 6f75 626c 653c 2f73 7061 6e3e 206f 7065 ouble ope │ │ │ -00006560: 7261 746f 7228 2928 3c73 7061 6e20 636c rator()(co │ │ │ -00006580: 6e73 743c 2f73 7061 6e3e 203c 6120 636c nst DiscreteV │ │ │ -000065c0: 616c 7565 733c 2f61 3e26 616d 703b 2076 alues& v │ │ │ -000065d0: 616c 7565 7329 203c 7370 616e 2063 6c61 alues) con │ │ │ -000065f0: 7374 3c2f 7370 616e 3e3b 3c2f 6469 763e st;
    │ │ │ -00006600: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -00006670: 6120 6964 3d22 6c30 3031 3632 2220 6e61 a id="l00162" na │ │ │ -00006680: 6d65 3d22 6c30 3031 3632 223e 3c2f 613e me="l00162"> │ │ │ -00006690: 3c73 7061 6e20 636c 6173 733d 226c 696e 162 voi │ │ │ -000066d0: 643c 2f73 7061 6e3e 203c 6120 636c 6173 d print< │ │ │ -00006730: 2f61 3e28 3c2f 6469 763e 0a3c 6469 7620 /a>(
    .
    163 │ │ │ -00006790: 2020 2020 203c 7370 616e 2063 6c61 7373 const │ │ │ -000067b0: 3c2f 7370 616e 3e20 7374 643a 3a73 7472 std::str │ │ │ -000067c0: 696e 6726 616d 703b 2073 203d 203c 7370 ing& s = "D │ │ │ -000067f0: 6973 6372 6574 6546 6163 746f 7247 7261 iscreteFactorGra │ │ │ -00006800: 7068 2671 756f 743b 3c2f 7370 616e 3e2c ph", │ │ │ -00006810: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00006860: 2031 3634 3c2f 7370 616e 3e20 2020 2020 164 │ │ │ -00006870: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const KeyFormatter │ │ │ -000068f0: 3c2f 613e 2661 6d70 3b20 666f 726d 6174 & format │ │ │ -00006900: 7465 7220 3d20 4465 6661 756c 744b 6579 ter = DefaultKey │ │ │ -00006910: 466f 726d 6174 7465 7229 203c 7370 616e Formatter) const override< │ │ │ -00006940: 2f73 7061 6e3e 3b3c 2f64 6976 3e0a 3c64 /span>;
    . │ │ │ -00006960: 3c61 2069 643d 226c 3030 3136 3522 206e 165
    .
    172 │ │ │ -00006a00: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Disc │ │ │ -00006a30: 7265 7465 4261 7965 734e 6574 3c2f 613e reteBayesNet │ │ │ -00006a40: 2073 756d 5072 6f64 7563 7428 3c2f 6469 sumProduct(.
    173 │ │ │ -00006aa0: 3c2f 7370 616e 3e20 2020 2020 204f 7074 Opt │ │ │ -00006ab0: 696f 6e61 6c4f 7264 6572 696e 6754 7970 ionalOrderingTyp │ │ │ -00006ac0: 6520 6f72 6465 7269 6e67 5479 7065 203d e orderingType = │ │ │ -00006ad0: 2062 6f6f 7374 3a3a 6e6f 6e65 2920 3c73 boost::none) const │ │ │ -00006b00: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ -00006b50: 2020 3137 343c 2f73 7061 6e3e 203c 2f64 174 .
    18 │ │ │ -00006bb0: 313c 2f73 7061 6e3e 2020 3c61 2063 6c61 1 DiscreteBa │ │ │ -00006bf0: 7965 734e 6574 3c2f 613e 2073 756d 5072 yesNet sumPr │ │ │ -00006c00: 6f64 7563 7428 3c73 7061 6e20 636c 6173 oduct(cons │ │ │ -00006c20: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t Ordering& ordering) │ │ │ -00006c70: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const;
    .
    182 │ │ │ -00006cf0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00006d40: 2031 3839 3c2f 7370 616e 3e20 203c 6120 189 Discret │ │ │ -00006d80: 654c 6f6f 6b75 7044 4147 3c2f 613e 206d eLookupDAG m │ │ │ -00006d90: 6178 5072 6f64 7563 7428 3c2f 6469 763e axProduct(
    │ │ │ -00006da0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -00006dd0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 190 Optio │ │ │ -00006e00: 6e61 6c4f 7264 6572 696e 6754 7970 6520 nalOrderingType │ │ │ -00006e10: 6f72 6465 7269 6e67 5479 7065 203d 2062 orderingType = b │ │ │ -00006e20: 6f6f 7374 3a3a 6e6f 6e65 2920 3c73 7061 oost::none) const;< │ │ │ -00006e50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00006ea0: 3139 313c 2f73 7061 6e3e 203c 2f64 6976 191
    .
    198< │ │ │ -00006f00: 2f73 7061 6e3e 2020 3c61 2063 6c61 7373 /span> DiscreteLook │ │ │ -00006f40: 7570 4441 473c 2f61 3e20 6d61 7850 726f upDAG maxPro │ │ │ -00006f50: 6475 6374 283c 7370 616e 2063 6c61 7373 duct(const │ │ │ -00006f70: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 Ordering │ │ │ -00006fb0: 2661 6d70 3b20 6f72 6465 7269 6e67 2920 & ordering) │ │ │ -00006fc0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const;
    .
    199 < │ │ │ -00007040: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.. │ │ │ -00007140: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -00007170: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 207 Option │ │ │ -000071a0: 616c 4f72 6465 7269 6e67 5479 7065 206f alOrderingType o │ │ │ -000071b0: 7264 6572 696e 6754 7970 6520 3d20 626f rderingType = bo │ │ │ -000071c0: 6f73 743a 3a6e 6f6e 6529 203c 7370 616e ost::none) const;.
    2 │ │ │ -00007240: 3038 3c2f 7370 616e 3e20 3c2f 6469 763e 08
    │ │ │ -00007250: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -00007280: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 215 DiscreteValue │ │ │ -000072e0: 733c 2f61 3e20 3c61 2063 6c61 7373 3d22 s optimize< │ │ │ -00007340: 2f61 3e28 3c73 7061 6e20 636c 6173 733d /a>(const< │ │ │ -00007360: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> Ordering& │ │ │ -000073a0: 616d 703b 206f 7264 6572 696e 6729 203c amp; ordering) < │ │ │ -000073b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -000073c0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const;
    .
    216 .
    2 │ │ │ -00007480: 3139 3c2f 7370 616e 3e20 3c2f 6469 763e 19
    │ │ │ -00007490: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -000074c0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 227 std::stri │ │ │ -000074f0: 6e67 203c 6120 636c 6173 733d 2263 6f64 ng markdown │ │ │ -00007550: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (const KeyFormatter │ │ │ -000075d0: 3c2f 613e 2661 6d70 3b20 6b65 7946 6f72 & keyFor │ │ │ -000075e0: 6d61 7474 6572 203d 2044 6566 6175 6c74 matter = Default │ │ │ -000075f0: 4b65 7946 6f72 6d61 7474 6572 2c3c 2f64 KeyFormatter,.
    22 │ │ │ -00007650: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ -00007660: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ -00007670: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00007680: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const DiscreteFactor │ │ │ -000076f0: 3a3a 4e61 6d65 733c 2f61 3e26 616d 703b ::Names& │ │ │ -00007700: 206e 616d 6573 203d 207b 7d29 203c 7370 names = {}) const; │ │ │ -00007730: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00007780: 2032 3239 3c2f 7370 616e 3e20 3c2f 6469 229 .
    237 │ │ │ -000077e0: 3c2f 7370 616e 3e20 2073 7464 3a3a 7374 std::st │ │ │ -000077f0: 7269 6e67 2068 746d 6c28 3c73 7061 6e20 ring html( │ │ │ -00007810: 636f 6e73 743c 2f73 7061 6e3e 204b 6579 const Key │ │ │ -00007820: 466f 726d 6174 7465 7226 616d 703b 206b Formatter& k │ │ │ -00007830: 6579 466f 726d 6174 7465 7220 3d20 4465 eyFormatter = De │ │ │ -00007840: 6661 756c 744b 6579 466f 726d 6174 7465 faultKeyFormatte │ │ │ -00007850: 722c 3c2f 6469 763e 0a3c 6469 7620 636c r,
    .
    238 │ │ │ -000078b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -000078c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const DiscreteFacto │ │ │ -000078f0: 723a 3a4e 616d 6573 2661 6d70 3b20 6e61 r::Names& na │ │ │ -00007900: 6d65 7320 3d20 7b7d 2920 3c73 7061 6e20 mes = {}) │ │ │ -00007920: 636f 6e73 743c 2f73 7061 6e3e 3b3c 2f64 const;.
    23 │ │ │ -00007980: 393c 2f73 7061 6e3e 203c 2f64 6976 3e0a 9
    . │ │ │ -00007990: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ -00007a20: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00007a30: 6e6f 223e 2020 3234 343c 2f73 7061 6e3e no"> 244 │ │ │ -00007a40: 2020 3c73 7061 6e20 636c 6173 733d 226b using Base::error │ │ │ -00007a70: 3b20 203c 7370 616e 2063 6c61 7373 3d22 ; // Expo │ │ │ -00007a90: 7365 2065 7272 6f72 2863 6f6e 7374 2048 se error(const H │ │ │ -00007aa0: 7962 7269 6456 616c 7565 7326 616d 703b ybridValues& │ │ │ -00007ab0: 2920 6d65 7468 6f64 2e2e 3c2f 7370 616e ) method..
    .
    │ │ │ -00007b10: 2020 3234 353c 2f73 7061 6e3e 203c 2f64 245 .
    24 │ │ │ -00007b70: 373c 2f73 7061 6e3e 7d3b 2020 3c73 7061 7}; // \ DiscreteF │ │ │ -00007ba0: 6163 746f 7247 7261 7068 3c2f 7370 616e actorGraph
    .
    .< │ │ │ -00007bc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00007bd0: 3e3c 6120 6964 3d22 6c30 3032 3438 2220 > 248
    .
    250< │ │ │ -00007c70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00007c80: 6f72 6422 3e74 656d 706c 6174 653c 2f73 ord">template <>.
    │ │ │ -00007d10: 2032 3531 3c2f 613e 3c2f 7370 616e 3e3c 251< │ │ │ -00007d20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00007d30: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct │ │ │ -00007d70: 7472 6169 7473 3c2f 613e 266c 743b 3c61 traits<Discre │ │ │ -00007db0: 7465 4661 6374 6f72 4772 6170 683c 2f61 teFactorGraph> : pu │ │ │ -00007de0: 626c 6963 3c2f 7370 616e 3e20 3c61 2063 blic Testabl │ │ │ -00007e20: 653c 2f61 3e26 6c74 3b44 6973 6372 6574 e<Discret │ │ │ -00007e30: 6546 6163 746f 7247 7261 7068 2667 743b eFactorGraph> │ │ │ -00007e40: 207b 7d3b 3c2f 6469 763e 0a3c 6469 7620 {};
    .
    252 │ │ │ -00007ea0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00007ef0: 2032 3533 3c2f 7370 616e 3e7d 2020 3c73 253} // namespace │ │ │ -00007f20: 2067 7473 616d 3c2f 7370 616e 3e3c 2f64 gtsam.
    FastSet.h
    A thin wr │ │ │ -00007fb0: 6170 7065 7220 6172 6f75 6e64 2073 7464 apper around std │ │ │ -00007fc0: 3a3a 7365 7420 7468 6174 2075 7365 7320 ::set that uses │ │ │ -00007fd0: 626f 6f73 7427 7320 6661 7374 5f70 6f6f boost's fast_poo │ │ │ -00007fe0: 6c5f 616c 6c6f 6361 746f 722e 3c2f 6469 l_allocator.
    .
    │ │ │ -00008030: 3c61 2068 7265 663d 2261 3030 3139 342e DiscreteLo │ │ │ -00008050: 6f6b 7570 4441 472e 683c 2f61 3e3c 2f64 okupDAG.h
    .
    DecisionT │ │ │ -000080c0: 7265 6546 6163 746f 722e 683c 2f61 3e3c reeFactor.h< │ │ │ -000080d0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    < │ │ │ -00008100: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ -00008110: 6522 3e3c 6120 6872 6566 3d22 6130 3036 e">Orderin │ │ │ -00008130: 672e 683c 2f61 3e3c 2f64 6976 3e3c 6469 g.h
    │ │ │ -00008150: 5661 7269 6162 6c65 206f 7264 6572 696e Variable orderin │ │ │ -00008160: 6720 666f 7220 7468 6520 656c 696d 696e g for the elimin │ │ │ -00008170: 6174 696f 6e20 616c 676f 7269 7468 6d2e ation algorithm. │ │ │ -00008180: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    . │ │ │ -000081b0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    Factor Graph │ │ │ -00008210: 2042 6173 6520 436c 6173 732e 3c2f 6469 Base Class.
    .
    Var │ │ │ -000082b0: 6961 626c 6520 656c 696d 696e 6174 696f iable eliminatio │ │ │ -000082c0: 6e20 616c 676f 7269 7468 6d73 2066 6f72 n algorithms for │ │ │ -000082d0: 2066 6163 746f 7220 6772 6170 6873 2e3c factor graphs.< │ │ │ -000082e0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    std::pair&l │ │ │ -000083c0: 743b 2044 6973 6372 6574 6543 6f6e 6469 t; DiscreteCondi │ │ │ -000083d0: 7469 6f6e 616c 3a3a 7368 6172 6564 5f70 tional::shared_p │ │ │ -000083e0: 7472 2c20 4465 6369 7369 6f6e 5472 6565 tr, DecisionTree │ │ │ -000083f0: 4661 6374 6f72 3a3a 7368 6172 6564 5f70 Factor::shared_p │ │ │ -00008400: 7472 2026 6774 3b20 456c 696d 696e 6174 tr > Eliminat │ │ │ -00008410: 6544 6973 6372 6574 6528 636f 6e73 7420 eDiscrete(const │ │ │ -00008420: 4469 7363 7265 7465 4661 6374 6f72 4772 DiscreteFactorGr │ │ │ -00008430: 6170 6820 2661 6d70 3b66 6163 746f 7273 aph &factors │ │ │ -00008440: 2c20 636f 6e73 7420 4f72 6465 7269 6e67 , const Ordering │ │ │ -00008450: 2026 616d 703b 6672 6f6e 7461 6c4b 6579 &frontalKey │ │ │ -00008460: 7329 3c2f 6469 763e 3c64 6976 2063 6c61 s)
    Main │ │ │ -00008480: 656c 696d 696e 6174 696f 6e20 6675 6e63 elimination func │ │ │ -00008490: 7469 6f6e 2066 6f72 2044 6973 6372 6574 tion for Discret │ │ │ -000084a0: 6546 6163 746f 7247 7261 7068 2e3c 2f64 eFactorGraph.
    Definit │ │ │ -000084d0: 696f 6e3c 2f62 3e20 4469 7363 7265 7465 ion Discrete │ │ │ -000084e0: 4661 6374 6f72 4772 6170 682e 6370 703a FactorGraph.cpp: │ │ │ -000084f0: 3230 303c 2f64 6976 3e3c 2f64 6976 3e0a 200
    . │ │ │ -00008500: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    gtsam::Elimin │ │ │ -000085a0: 6174 6546 6f72 4d50 453c 2f61 3e3c 2f64 ateForMPE
    std::pair │ │ │ -000085d0: 266c 743b 2044 6973 6372 6574 6543 6f6e < DiscreteCon │ │ │ -000085e0: 6469 7469 6f6e 616c 3a3a 7368 6172 6564 ditional::shared │ │ │ -000085f0: 5f70 7472 2c20 4465 6369 7369 6f6e 5472 _ptr, DecisionTr │ │ │ -00008600: 6565 4661 6374 6f72 3a3a 7368 6172 6564 eeFactor::shared │ │ │ -00008610: 5f70 7472 2026 6774 3b20 456c 696d 696e _ptr > Elimin │ │ │ -00008620: 6174 6546 6f72 4d50 4528 636f 6e73 7420 ateForMPE(const │ │ │ -00008630: 4469 7363 7265 7465 4661 6374 6f72 4772 DiscreteFactorGr │ │ │ -00008640: 6170 6820 2661 6d70 3b66 6163 746f 7273 aph &factors │ │ │ -00008650: 2c20 636f 6e73 7420 4f72 6465 7269 6e67 , const Ordering │ │ │ -00008660: 2026 616d 703b 6672 6f6e 7461 6c4b 6579 &frontalKey │ │ │ -00008670: 7329 3c2f 6469 763e 3c64 6976 2063 6c61 s)
    Alter │ │ │ -00008690: 6e61 7465 2065 6c69 6d69 6e61 7469 6f6e nate elimination │ │ │ -000086a0: 2066 756e 6374 696f 6e20 666f 7220 7468 function for th │ │ │ -000086b0: 6174 2063 7265 6174 6573 206e 6f6e 2d6e at creates non-n │ │ │ -000086c0: 6f72 6d61 6c69 7a65 6420 6c6f 6f6b 7570 ormalized lookup │ │ │ -000086d0: 2074 6162 6c65 732e 3c2f 6469 763e 3c64 tables.
    Definition DiscreteFacto │ │ │ -00008710: 7247 7261 7068 2e63 7070 3a31 3136 3c2f rGraph.cpp:116
    .
    Global │ │ │ -000087a0: 2066 756e 6374 696f 6e73 2069 6e20 6120 functions in a │ │ │ -000087b0: 7365 7061 7261 7465 2074 6573 7469 6e67 separate testing │ │ │ -000087c0: 206e 616d 6573 7061 6365 2e3c 2f64 6976 namespace.
    Definitio │ │ │ -000087f0: 6e3c 2f62 3e20 6368 6172 7454 6573 7469 n chartTesti │ │ │ -00008800: 6e67 2e68 3a32 383c 2f64 6976 3e3c 2f64 ng.h:28
    .
    < │ │ │ -000088c0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ -000088d0: 6922 3e46 6173 7456 6563 746f 7226 6c74 i">FastVector< │ │ │ -000088e0: 3b20 4b65 7920 2667 743b 204b 6579 5665 ; Key > KeyVe │ │ │ -000088f0: 6374 6f72 3c2f 6469 763e 3c64 6976 2063 ctor
    Def │ │ │ -00008910: 696e 6520 636f 6c6c 6563 7469 6f6e 2074 ine collection t │ │ │ -00008920: 7970 6520 6f6e 6365 2061 6e64 2066 6f72 ype once and for │ │ │ -00008930: 2061 6c6c 202d 2061 6c73 6f20 7573 6564 all - also used │ │ │ -00008940: 2069 6e20 7772 6170 7065 7273 2e3c 2f64 in wrappers.
    Definit │ │ │ -00008970: 696f 6e3c 2f62 3e20 4b65 792e 683a 3836 ion Key.h:86 │ │ │ -00008980: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    strin │ │ │ -00008a50: 6720 6d61 726b 646f 776e 2863 6f6e 7374 g markdown(const │ │ │ -00008a60: 2044 6973 6372 6574 6556 616c 7565 7320 DiscreteValues │ │ │ -00008a70: 2661 6d70 3b76 616c 7565 732c 2063 6f6e &values, con │ │ │ -00008a80: 7374 204b 6579 466f 726d 6174 7465 7220 st KeyFormatter │ │ │ -00008a90: 2661 6d70 3b6b 6579 466f 726d 6174 7465 &keyFormatte │ │ │ -00008aa0: 722c 2063 6f6e 7374 2044 6973 6372 6574 r, const Discret │ │ │ -00008ab0: 6556 616c 7565 733a 3a4e 616d 6573 2026 eValues::Names & │ │ │ -00008ac0: 616d 703b 6e61 6d65 7329 3c2f 6469 763e amp;names)
    │ │ │ -00008ad0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Free version │ │ │ -00008af0: 6f66 206d 6172 6b64 6f77 6e2e 3c2f 6469 of markdown.
    Definiti │ │ │ -00008b20: 6f6e 3c2f 623e 2044 6973 6372 6574 6556 on DiscreteV │ │ │ -00008b30: 616c 7565 732e 6370 703a 3132 393c 2f64 alues.cpp:129
    .
    < │ │ │ -00008b90: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ -00008ba0: 6522 3e3c 6120 6872 6566 3d22 6130 3134 e">gtsam │ │ │ -00008be0: 3a3a 6f70 7469 6d69 7a65 3c2f 613e 3c2f ::optimize
    Point3 o │ │ │ -00008c10: 7074 696d 697a 6528 636f 6e73 7420 4e6f ptimize(const No │ │ │ -00008c20: 6e6c 696e 6561 7246 6163 746f 7247 7261 nlinearFactorGra │ │ │ -00008c30: 7068 2026 616d 703b 6772 6170 682c 2063 ph &graph, c │ │ │ -00008c40: 6f6e 7374 2056 616c 7565 7320 2661 6d70 onst Values & │ │ │ -00008c50: 3b76 616c 7565 732c 204b 6579 206c 616e ;values, Key lan │ │ │ -00008c60: 646d 6172 6b4b 6579 293c 2f64 6976 3e3c dmarkKey)
    < │ │ │ -00008c70: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ -00008c80: 223e 4f70 7469 6d69 7a65 2066 6f72 2074 ">Optimize for t │ │ │ -00008c90: 7269 616e 6775 6c61 7469 6f6e 2e3c 2f64 riangulation.
    Definit │ │ │ -00008cc0: 696f 6e3c 2f62 3e20 7472 6961 6e67 756c ion triangul │ │ │ -00008cd0: 6174 696f 6e2e 6370 703a 3135 353c 2f64 ation.cpp:155
    .
    < │ │ │ -00008d30: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ -00008d40: 6522 3e3c 6120 6872 6566 3d22 6130 3134 e">gtsam │ │ │ -00008d80: 3a3a 7072 696e 743c 2f61 3e3c 2f64 6976 ::print
    void print( │ │ │ -00008db0: 636f 6e73 7420 4d61 7472 6978 2026 616d const Matrix &am │ │ │ -00008dc0: 703b 412c 2063 6f6e 7374 2073 7472 696e p;A, const strin │ │ │ -00008dd0: 6720 2661 6d70 3b73 2c20 6f73 7472 6561 g &s, ostrea │ │ │ -00008de0: 6d20 2661 6d70 3b73 7472 6561 6d29 3c2f m &stream)
    print wit │ │ │ -00008e10: 686f 7574 206f 7074 696f 6e61 6c20 7374 hout optional st │ │ │ -00008e20: 7269 6e67 2c20 6d75 7374 2073 7065 6369 ring, must speci │ │ │ -00008e30: 6679 2063 6f75 7420 796f 7572 7365 6c66 fy cout yourself │ │ │ -00008e40: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ -00008e60: 6e69 7469 6f6e 3c2f 623e 204d 6174 7269 nition Matri │ │ │ -00008e70: 782e 6370 703a 3135 363c 2f64 6976 3e3c x.cpp:156
    < │ │ │ -00008e80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ -00008ee0: 6120 6872 6566 3d22 6130 3134 3238 2e68 a href="a01428.h │ │ │ -00008ef0: 746d 6c23 6165 3462 3465 3865 3766 3064 tml#ae4b4e8e7f0d │ │ │ -00008f00: 3734 3538 3832 6336 6130 3262 3530 3764 745882c6a02b507d │ │ │ -00008f10: 3562 6666 6522 3e67 7473 616d 3a3a 4b65 5bffe">gtsam::Ke │ │ │ -00008f20: 7946 6f72 6d61 7474 6572 3c2f 613e 3c2f yFormatter
    std::fun │ │ │ -00008f50: 6374 696f 6e26 6c74 3b20 7374 643a 3a73 ction< std::s │ │ │ -00008f60: 7472 696e 6728 4b65 7929 2667 743b 204b tring(Key)> K │ │ │ -00008f70: 6579 466f 726d 6174 7465 723c 2f64 6976 eyFormatter
    Typedef for │ │ │ -00008fa0: 6120 6675 6e63 7469 6f6e 2074 6f20 666f a function to fo │ │ │ -00008fb0: 726d 6174 2061 206b 6579 2c20 692e 652e rmat a key, i.e. │ │ │ -00008fc0: 2074 6f20 636f 6e76 6572 7420 6974 2074 to convert it t │ │ │ -00008fd0: 6f20 6120 7374 7269 6e67 2e3c 2f64 6976 o a string.
    Definitio │ │ │ -00009000: 6e3c 2f62 3e20 4b65 792e 683a 3335 3c2f n Key.h:35
    .< │ │ │ -00009080: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ -00009090: 223e 4120 6d61 6e69 666f 6c64 2064 6566 ">A manifold def │ │ │ -000090a0: 696e 6573 2061 2073 7061 6365 2069 6e20 ines a space in │ │ │ -000090b0: 7768 6963 6820 7468 6572 6520 6973 2061 which there is a │ │ │ -000090c0: 206e 6f74 696f 6e20 6f66 2061 206c 696e notion of a lin │ │ │ -000090d0: 6561 7220 7461 6e67 656e 7420 7370 6163 ear tangent spac │ │ │ -000090e0: 6520 7468 6174 2063 616e 2062 6520 6365 e that can be ce │ │ │ -000090f0: 6e74 6572 6564 202e 2e2e 3c2f 6469 763e ntered ...
    │ │ │ -00009100: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ -00009120: 3c2f 623e 2063 6f6e 6365 7074 732e 683a concepts.h: │ │ │ -00009130: 3330 3c2f 6469 763e 3c2f 6469 763e 0a3c 30
    .< │ │ │ -00009140: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ -00009150: 6964 3d22 6161 3032 3332 305f 6874 6d6c id="aa02320_html │ │ │ -00009160: 223e 3c64 6976 2063 6c61 7373 3d22 7474 ">
    .
    < │ │ │ -000091f0: 6120 6872 6566 3d22 6130 3234 3830 2e68 a href="a02480.h │ │ │ -00009200: 746d 6c22 3e67 7473 616d 3a3a 6571 7561 tml">gtsam::equa │ │ │ -00009210: 6c73 3c2f 613e 3c2f 6469 763e 3c64 6976 ls
    T │ │ │ -00009230: 656d 706c 6174 6520 746f 2063 7265 6174 emplate to creat │ │ │ -00009240: 6520 6120 6269 6e61 7279 2070 7265 6469 e a binary predi │ │ │ -00009250: 6361 7465 2e3c 2f64 6976 3e3c 6469 7620 cate.
    Definition │ │ │ -00009280: 5465 7374 6162 6c65 2e68 3a31 3131 3c2f Testable.h:111
    .
    A helper tha │ │ │ -00009320: 7420 696d 706c 656d 656e 7473 2074 6865 t implements the │ │ │ -00009330: 2074 7261 6974 7320 696e 7465 7266 6163 traits interfac │ │ │ -00009340: 6520 666f 7220 4754 5341 4d20 7479 7065 e for GTSAM type │ │ │ -00009350: 732e 3c2f 6469 763e 3c64 6976 2063 6c61 s.
    De │ │ │ -00009370: 6669 6e69 7469 6f6e 3c2f 623e 2054 6573 finition Tes │ │ │ -00009380: 7461 626c 652e 683a 3135 313c 2f64 6976 table.h:151
    .
    < │ │ │ -000093d0: 6120 6872 6566 3d22 6130 3238 3038 2e68 a href="a02808.h │ │ │ -000093e0: 746d 6c22 3e67 7473 616d 3a3a 4465 6369 tml">gtsam::Deci │ │ │ -000093f0: 7369 6f6e 5472 6565 4661 6374 6f72 3c2f sionTreeFactor
    A dis │ │ │ -00009420: 6372 6574 6520 7072 6f62 6162 696c 6973 crete probabilis │ │ │ -00009430: 7469 6320 6661 6374 6f72 2e3c 2f64 6976 tic factor.
    Definitio │ │ │ -00009460: 6e3c 2f62 3e20 4465 6369 7369 6f6e 5472 n DecisionTr │ │ │ -00009470: 6565 4661 6374 6f72 2e68 3a34 353c 2f64 eeFactor.h:45
    .
    │ │ │ -00009590: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    │ │ │ -00009600: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    A Bayes tree │ │ │ -00009620: 7265 7072 6573 656e 7469 6e67 2061 2044 representing a D │ │ │ -00009630: 6973 6372 6574 6520 6465 6e73 6974 792e iscrete density. │ │ │ -00009640: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ -00009660: 6e69 7469 6f6e 3c2f 623e 2044 6973 6372 nition Discr │ │ │ -00009670: 6574 6542 6179 6573 5472 6565 2e68 3a37 eteBayesTree.h:7 │ │ │ -00009680: 353c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 5
    .< │ │ │ -00009700: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ -00009710: 223e 4469 7363 7265 7465 2043 6f6e 6469 ">Discrete Condi │ │ │ -00009720: 7469 6f6e 616c 2044 656e 7369 7479 2044 tional Density D │ │ │ -00009730: 6572 6976 6573 2066 726f 6d20 4465 6369 erives from Deci │ │ │ -00009740: 7369 6f6e 5472 6565 4661 6374 6f72 2e3c sionTreeFactor.< │ │ │ -00009750: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ -00009770: 6974 696f 6e3c 2f62 3e20 4469 7363 7265 ition Discre │ │ │ -00009780: 7465 436f 6e64 6974 696f 6e61 6c2e 683a teConditional.h: │ │ │ -00009790: 3430 3c2f 6469 763e 3c2f 6469 763e 0a3c 40
    .< │ │ │ -000097a0: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ -000097b0: 6964 3d22 6161 3032 3834 385f 6874 6d6c id="aa02848_html │ │ │ -000097c0: 223e 3c64 6976 2063 6c61 7373 3d22 7474 ">
    gtsa │ │ │ -000097f0: 6d3a 3a44 6973 6372 6574 6545 6c69 6d69 m::DiscreteElimi │ │ │ -00009800: 6e61 7469 6f6e 5472 6565 3c2f 613e 3c2f nationTree
    Eliminati │ │ │ -00009830: 6f6e 2074 7265 6520 666f 7220 6469 7363 on tree for disc │ │ │ -00009840: 7265 7465 2066 6163 746f 7273 2e3c 2f64 rete factors.
    Definit │ │ │ -00009870: 696f 6e3c 2f62 3e20 4469 7363 7265 7465 ion Discrete │ │ │ -00009880: 456c 696d 696e 6174 696f 6e54 7265 652e EliminationTree. │ │ │ -00009890: 683a 3333 3c2f 6469 763e 3c2f 6469 763e h:33
    │ │ │ -000098a0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    │ │ │ -00009920: 4261 7365 2063 6c61 7373 2066 6f72 2064 Base class for d │ │ │ -00009930: 6973 6372 6574 6520 7072 6f62 6162 696c iscrete probabil │ │ │ -00009940: 6973 7469 6320 6661 6374 6f72 7320 5468 istic factors Th │ │ │ -00009950: 6520 6d6f 7374 2067 656e 6572 616c 206f e most general o │ │ │ -00009960: 6e65 2069 7320 7468 6520 6465 7269 7665 ne is the derive │ │ │ -00009970: 6420 4465 6369 7369 6f6e 5472 6565 4661 d DecisionTreeFa │ │ │ -00009980: 6374 6f72 2e3c 2f64 6976 3e3c 6469 7620 ctor.
    Definition │ │ │ -000099b0: 4469 7363 7265 7465 4661 6374 6f72 2e68 DiscreteFactor.h │ │ │ -000099c0: 3a33 383c 2f64 6976 3e3c 2f64 6976 3e0a :38
    . │ │ │ -000099d0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    Discr │ │ │ -00009aa0: 6574 6556 616c 7565 733a 3a4e 616d 6573 eteValues::Names │ │ │ -00009ab0: 204e 616d 6573 3c2f 6469 763e 3c64 6976 Names
    T │ │ │ -00009ad0: 7261 6e73 6c61 7469 6f6e 2074 6162 6c65 ranslation table │ │ │ -00009ae0: 2066 726f 6d20 7661 6c75 6573 2074 6f20 from values to │ │ │ -00009af0: 7374 7269 6e67 732e 3c2f 6469 763e 3c64 strings.
    Definition DiscreteFacto │ │ │ -00009b30: 722e 683a 3130 363c 2f64 6976 3e3c 2f64 r.h:106
    .
    gtsam::Elim │ │ │ -00009be0: 696e 6174 696f 6e54 7261 6974 7326 6c74 inationTraits< │ │ │ -00009bf0: 3b20 4469 7363 7265 7465 4661 6374 6f72 ; DiscreteFactor │ │ │ -00009c00: 4772 6170 6820 2667 743b 3a3a 4661 6374 Graph >::Fact │ │ │ -00009c10: 6f72 4772 6170 6854 7970 653c 2f61 3e3c orGraphType< │ │ │ -00009c20: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Discret │ │ │ -00009c40: 6546 6163 746f 7247 7261 7068 2046 6163 eFactorGraph Fac │ │ │ -00009c50: 746f 7247 7261 7068 5479 7065 3c2f 6469 torGraphType
    Type of the │ │ │ -00009c80: 2066 6163 746f 7220 6772 6170 6820 2865 factor graph (e │ │ │ -00009c90: 2e67 2e20 4469 7363 7265 7465 4661 6374 .g. DiscreteFact │ │ │ -00009ca0: 6f72 4772 6170 6829 3c2f 6469 763e 3c64 orGraph)
    Definition DiscreteFacto │ │ │ -00009ce0: 7247 7261 7068 2e68 3a37 323c 2f64 6976 rGraph.h:72
    .
    Di │ │ │ -00009df0: 7363 7265 7465 4a75 6e63 7469 6f6e 5472 screteJunctionTr │ │ │ -00009e00: 6565 204a 756e 6374 696f 6e54 7265 6554 ee JunctionTreeT │ │ │ -00009e10: 7970 653c 2f64 6976 3e3c 6469 7620 636c ype
    Type │ │ │ -00009e30: 206f 6620 4a75 6e63 7469 6f6e 2074 7265 of Junction tre │ │ │ -00009e40: 652e 3c2f 6469 763e 3c64 6976 2063 6c61 e.
    De │ │ │ -00009e60: 6669 6e69 7469 6f6e 3c2f 623e 2044 6973 finition Dis │ │ │ -00009e70: 6372 6574 6546 6163 746f 7247 7261 7068 creteFactorGraph │ │ │ -00009e80: 2e68 3a37 373c 2f64 6976 3e3c 2f64 6976 .h:77
    .
    Type of fact │ │ │ -00009fc0: 6f72 7320 696e 2066 6163 746f 7220 6772 ors in factor gr │ │ │ -00009fd0: 6170 682e 3c2f 6469 763e 3c64 6976 2063 aph.
    │ │ │ -00009ff0: 4465 6669 6e69 7469 6f6e 3c2f 623e 2044 Definition D │ │ │ -0000a000: 6973 6372 6574 6546 6163 746f 7247 7261 iscreteFactorGra │ │ │ -0000a010: 7068 2e68 3a37 313c 2f64 6976 3e3c 2f64 ph.h:71
    .
    static │ │ │ -0000a120: 2073 7464 3a3a 7061 6972 266c 743b 2062 std::pair< b │ │ │ -0000a130: 6f6f 7374 3a3a 7368 6172 6564 5f70 7472 oost::shared_ptr │ │ │ -0000a140: 266c 743b 2043 6f6e 6469 7469 6f6e 616c < Conditional │ │ │ -0000a150: 5479 7065 2026 6774 3b2c 2062 6f6f 7374 Type >, boost │ │ │ -0000a160: 3a3a 7368 6172 6564 5f70 7472 266c 743b ::shared_ptr< │ │ │ -0000a170: 2046 6163 746f 7254 7970 6520 2667 743b FactorType > │ │ │ -0000a180: 2026 6774 3b20 4465 6661 756c 7445 6c69 > DefaultEli │ │ │ -0000a190: 6d69 6e61 7465 2863 6f6e 7374 2046 6163 minate(const Fac │ │ │ -0000a1a0: 746f 7247 7261 7068 5479 7065 2026 616d torGraphType &am │ │ │ -0000a1b0: 703b 6661 6374 6f72 732c 2063 6f6e 7374 p;factors, const │ │ │ -0000a1c0: 204f 7264 6572 696e 6720 2661 6d70 3b6b Ordering &k │ │ │ -0000a1d0: 6579 7329 3c2f 6469 763e 3c64 6976 2063 eys)
    The │ │ │ -0000a1f0: 2064 6566 6175 6c74 2064 656e 7365 2065 default dense e │ │ │ -0000a200: 6c69 6d69 6e61 7469 6f6e 2066 756e 6374 limination funct │ │ │ -0000a210: 696f 6e2e 3c2f 6469 763e 3c64 6976 2063 ion.
    │ │ │ -0000a230: 4465 6669 6e69 7469 6f6e 3c2f 623e 2044 Definition D │ │ │ -0000a240: 6973 6372 6574 6546 6163 746f 7247 7261 iscreteFactorGra │ │ │ -0000a250: 7068 2e68 3a38 323c 2f64 6976 3e3c 2f64 ph.h:82
    .
    gtsam::Elim │ │ │ -0000a300: 696e 6174 696f 6e54 7261 6974 7326 6c74 inationTraits< │ │ │ -0000a310: 3b20 4469 7363 7265 7465 4661 6374 6f72 ; DiscreteFactor │ │ │ -0000a320: 4772 6170 6820 2667 743b 3a3a 4261 7965 Graph >::Baye │ │ │ -0000a330: 7354 7265 6554 7970 653c 2f61 3e3c 2f64 sTreeType
    DiscreteB │ │ │ -0000a360: 6179 6573 5472 6565 2042 6179 6573 5472 ayesTree BayesTr │ │ │ -0000a370: 6565 5479 7065 3c2f 6469 763e 3c64 6976 eeType
    T │ │ │ -0000a390: 7970 6520 6f66 2042 6179 6573 2074 7265 ype of Bayes tre │ │ │ -0000a3a0: 652e 3c2f 6469 763e 3c64 6976 2063 6c61 e.
    De │ │ │ -0000a3c0: 6669 6e69 7469 6f6e 3c2f 623e 2044 6973 finition Dis │ │ │ -0000a3d0: 6372 6574 6546 6163 746f 7247 7261 7068 creteFactorGraph │ │ │ -0000a3e0: 2e68 3a37 363c 2f64 6976 3e3c 2f64 6976 .h:76
    .
    │ │ │ -0000a4d0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    DiscreteBaye │ │ │ -0000a4f0: 734e 6574 2042 6179 6573 4e65 7454 7970 sNet BayesNetTyp │ │ │ -0000a500: 653c 2f64 6976 3e3c 6469 7620 636c 6173 e
    Type o │ │ │ -0000a520: 6620 4261 7965 7320 6e65 7420 6672 6f6d f Bayes net from │ │ │ -0000a530: 2073 6571 7565 6e74 6961 6c20 656c 696d sequential elim │ │ │ -0000a540: 696e 6174 696f 6e2e 3c2f 6469 763e 3c64 ination.
    Definition DiscreteFacto │ │ │ -0000a580: 7247 7261 7068 2e68 3a37 343c 2f64 6976 rGraph.h:74
    ..< │ │ │ -0000a740: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ -0000a750: 6964 3d22 6161 3032 3836 305f 6874 6d6c id="aa02860_html │ │ │ -0000a760: 5f61 6536 3638 6165 6137 6366 3332 6534 _ae668aea7cf32e4 │ │ │ -0000a770: 3363 3435 6131 3866 3063 6461 3632 6363 3c45a18f0cda62cc │ │ │ -0000a780: 3935 223e 3c64 6976 2063 6c61 7373 3d22 95">
    │ │ │ -0000a7d0: 6774 7361 6d3a 3a45 6c69 6d69 6e61 7469 gtsam::Eliminati │ │ │ -0000a7e0: 6f6e 5472 6169 7473 266c 743b 2044 6973 onTraits< Dis │ │ │ -0000a7f0: 6372 6574 6546 6163 746f 7247 7261 7068 creteFactorGraph │ │ │ -0000a800: 2026 6774 3b3a 3a44 6566 6175 6c74 4f72 >::DefaultOr │ │ │ -0000a810: 6465 7269 6e67 4675 6e63 3c2f 613e 3c2f deringFunc
    static O │ │ │ -0000a840: 7264 6572 696e 6720 4465 6661 756c 744f rdering DefaultO │ │ │ -0000a850: 7264 6572 696e 6746 756e 6328 636f 6e73 rderingFunc(cons │ │ │ -0000a860: 7420 4661 6374 6f72 4772 6170 6854 7970 t FactorGraphTyp │ │ │ -0000a870: 6520 2661 6d70 3b67 7261 7068 2c20 626f e &graph, bo │ │ │ -0000a880: 6f73 743a 3a6f 7074 696f 6e61 6c26 6c74 ost::optional< │ │ │ -0000a890: 3b20 636f 6e73 7420 5661 7269 6162 6c65 ; const Variable │ │ │ -0000a8a0: 496e 6465 7820 2661 6d70 3b20 2667 743b Index & > │ │ │ -0000a8b0: 2076 6172 6961 626c 6549 6e64 6578 293c variableIndex)< │ │ │ -0000a8c0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    The defa │ │ │ -0000a8e0: 756c 7420 6f72 6465 7269 6e67 2067 656e ult ordering gen │ │ │ -0000a8f0: 6572 6174 696f 6e20 6675 6e63 7469 6f6e eration function │ │ │ -0000a900: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def │ │ │ -0000a920: 696e 6974 696f 6e3c 2f62 3e20 4469 7363 inition Disc │ │ │ -0000a930: 7265 7465 4661 6374 6f72 4772 6170 682e reteFactorGraph. │ │ │ -0000a940: 683a 3837 3c2f 6469 763e 3c2f 6469 763e h:87
    │ │ │ -0000a950: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    Discre │ │ │ -0000aa50: 7465 456c 696d 696e 6174 696f 6e54 7265 teEliminationTre │ │ │ -0000aa60: 6520 456c 696d 696e 6174 696f 6e54 7265 e EliminationTre │ │ │ -0000aa70: 6554 7970 653c 2f64 6976 3e3c 6469 7620 eType
    Ty │ │ │ -0000aa90: 7065 206f 6620 656c 696d 696e 6174 696f pe of eliminatio │ │ │ -0000aaa0: 6e20 7472 6565 2e3c 2f64 6976 3e3c 6469 n tree.
    │ │ │ -0000aac0: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition DiscreteFactor │ │ │ -0000aae0: 4772 6170 682e 683a 3735 3c2f 6469 763e Graph.h:75
    │ │ │ -0000aaf0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    < │ │ │ -0000ac60: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ -0000ac70: 6522 3e3c 6120 6872 6566 3d22 6130 3238 e">gtsam │ │ │ -0000acb0: 3a3a 4469 7363 7265 7465 4661 6374 6f72 ::DiscreteFactor │ │ │ -0000acc0: 4772 6170 683a 3a44 6973 6372 6574 6546 Graph::DiscreteF │ │ │ -0000acd0: 6163 746f 7247 7261 7068 3c2f 613e 3c2f actorGraph
    Discrete │ │ │ -0000ad00: 4661 6374 6f72 4772 6170 6828 636f 6e73 FactorGraph(cons │ │ │ -0000ad10: 7420 434f 4e54 4149 4e45 5220 2661 6d70 t CONTAINER & │ │ │ -0000ad20: 3b66 6163 746f 7273 293c 2f64 6976 3e3c ;factors)
    < │ │ │ -0000ad30: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ -0000ad40: 223e 436f 6e73 7472 7563 7420 6672 6f6d ">Construct from │ │ │ -0000ad50: 2063 6f6e 7461 696e 6572 206f 6620 6661 container of fa │ │ │ -0000ad60: 6374 6f72 7320 2873 6861 7265 645f 7074 ctors (shared_pt │ │ │ -0000ad70: 7220 6f72 2070 6c61 696e 206f 626a 6563 r or plain objec │ │ │ -0000ad80: 7473 293c 2f64 6976 3e3c 6469 7620 636c ts)
    D │ │ │ -0000ada0: 6566 696e 6974 696f 6e3c 2f62 3e20 4469 efinition Di │ │ │ -0000adb0: 7363 7265 7465 4661 6374 6f72 4772 6170 screteFactorGrap │ │ │ -0000adc0: 682e 683a 3132 333c 2f64 6976 3e3c 2f64 h.h:123
    .
    gtsam::Disc │ │ │ -0000ae70: 7265 7465 4661 6374 6f72 4772 6170 683a reteFactorGraph: │ │ │ -0000ae80: 3a73 6861 7265 645f 7074 723c 2f61 3e3c :shared_ptr< │ │ │ -0000ae90: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    boost:: │ │ │ -0000aeb0: 7368 6172 6564 5f70 7472 266c 743b 2054 shared_ptr< T │ │ │ -0000aec0: 6869 7320 2667 743b 2073 6861 7265 645f his > shared_ │ │ │ -0000aed0: 7074 723c 2f64 6976 3e3c 6469 7620 636c ptr
    shar │ │ │ -0000aef0: 6564 5f70 7472 2074 6f20 5468 6973 3c2f ed_ptr to This
    Defini │ │ │ -0000af20: 7469 6f6e 3c2f 623e 2044 6973 6372 6574 tion Discret │ │ │ -0000af30: 6546 6163 746f 7247 7261 7068 2e68 3a31 eFactorGraph.h:1 │ │ │ -0000af40: 3037 3c2f 6469 763e 3c2f 6469 763e 0a3c 07
    .< │ │ │ -0000af50: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ -0000af60: 6964 3d22 6161 3032 3836 345f 6874 6d6c id="aa02864_html │ │ │ -0000af70: 5f61 3963 3631 3535 6434 3131 6435 6538 _a9c6155d411d5e8 │ │ │ -0000af80: 6634 3136 3961 6331 3439 3832 3137 3539 f4169ac149821759 │ │ │ -0000af90: 3038 223e 3c64 6976 2063 6c61 7373 3d22 08">< │ │ │ -0000b0c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -0000b190: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    DiscreteFact │ │ │ -0000b1b0: 6f72 4772 6170 6828 636f 6e73 7420 4661 orGraph(const Fa │ │ │ -0000b1c0: 6374 6f72 4772 6170 6826 6c74 3b20 4445 ctorGraph< DE │ │ │ -0000b1d0: 5249 5645 445f 4641 4354 4f52 2026 6774 RIVED_FACTOR > │ │ │ -0000b1e0: 3b20 2661 6d70 3b67 7261 7068 293c 2f64 ; &graph)
    Implicit c │ │ │ -0000b210: 6f70 792f 646f 776e 6361 7374 2063 6f6e opy/downcast con │ │ │ -0000b220: 7374 7275 6374 6f72 2074 6f20 6f76 6572 structor to over │ │ │ -0000b230: 7269 6465 2065 7870 6c69 6369 7420 7465 ride explicit te │ │ │ -0000b240: 6d70 6c61 7465 2063 6f6e 7461 696e 6572 mplate container │ │ │ -0000b250: 2063 6f6e 7374 7275 6374 6f72 2e3c 2f64 constructor.
    Definit │ │ │ -0000b280: 696f 6e3c 2f62 3e20 4469 7363 7265 7465 ion Discrete │ │ │ -0000b290: 4661 6374 6f72 4772 6170 682e 683a 3132 FactorGraph.h:12 │ │ │ -0000b2a0: 383c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 8
    . │ │ │ -0000b3d0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Construct fro │ │ │ -0000b3f0: 6d20 6974 6572 6174 6f72 206f 7665 7220 m iterator over │ │ │ -0000b400: 6661 6374 6f72 732e 3c2f 6469 763e 3c64 factors.
    Definition DiscreteFacto │ │ │ -0000b440: 7247 7261 7068 2e68 3a31 3138 3c2f 6469 rGraph.h:118
    .
    gtsam: │ │ │ -0000b4f0: 3a44 6973 6372 6574 6546 6163 746f 7247 :DiscreteFactorG │ │ │ -0000b500: 7261 7068 3a3a 7e44 6973 6372 6574 6546 raph::~DiscreteF │ │ │ -0000b510: 6163 746f 7247 7261 7068 3c2f 613e 3c2f actorGraph
    virtual │ │ │ -0000b540: 7e44 6973 6372 6574 6546 6163 746f 7247 ~DiscreteFactorG │ │ │ -0000b550: 7261 7068 2829 3c2f 6469 763e 3c64 6976 raph()
    D │ │ │ -0000b570: 6573 7472 7563 746f 722e 3c2f 6469 763e estructor.
    │ │ │ -0000b580: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ -0000b5a0: 3c2f 623e 2044 6973 6372 6574 6546 6163 DiscreteFac │ │ │ -0000b5b0: 746f 7247 7261 7068 2e68 3a31 3331 3c2f torGraph.h:131
    .
    │ │ │ -0000b610: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    gtsa │ │ │ -0000b660: 6d3a 3a44 6973 6372 6574 6546 6163 746f m::DiscreteFacto │ │ │ -0000b670: 7247 7261 7068 3a3a 4261 7365 456c 696d rGraph::BaseElim │ │ │ -0000b680: 696e 6174 6561 626c 653c 2f61 3e3c 2f64 inateable
    Eliminate │ │ │ -0000b6b0: 6162 6c65 4661 6374 6f72 4772 6170 6826 ableFactorGraph& │ │ │ -0000b6c0: 6c74 3b20 5468 6973 2026 6774 3b20 4261 lt; This > Ba │ │ │ -0000b6d0: 7365 456c 696d 696e 6174 6561 626c 653c seEliminateable< │ │ │ -0000b6e0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    for elim │ │ │ -0000b700: 696e 6174 696f 6e3c 2f64 6976 3e3c 6469 ination
    │ │ │ -0000b720: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition DiscreteFactor │ │ │ -0000b740: 4772 6170 682e 683a 3130 363c 2f64 6976 Graph.h:106
    .
    gtsam:: │ │ │ -0000b7f0: 4469 7363 7265 7465 4661 6374 6f72 4772 DiscreteFactorGr │ │ │ -0000b800: 6170 683a 3a61 6464 3c2f 613e 3c2f 6469 aph::add
    void add(A │ │ │ -0000b830: 7267 7320 2661 6d70 3b26 616d 703b 2e2e rgs &&.. │ │ │ -0000b840: 2e20 6172 6773 293c 2f64 6976 3e3c 6469 . args)
    │ │ │ -0000b860: 4164 6420 6120 6465 6369 7369 6f6e 2d74 Add a decision-t │ │ │ -0000b870: 7265 6520 6661 6374 6f72 2e3c 2f64 6976 ree factor.
    Definitio │ │ │ -0000b8a0: 6e3c 2f62 3e20 4469 7363 7265 7465 4661 n DiscreteFa │ │ │ -0000b8b0: 6374 6f72 4772 6170 682e 683a 3134 323c ctorGraph.h:142< │ │ │ -0000b8c0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    < │ │ │ -0000b8f0: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ -0000b900: 6522 3e3c 6120 6872 6566 3d22 6130 3238 e">gtsam:: │ │ │ -0000b920: 4469 7363 7265 7465 4a75 6e63 7469 6f6e DiscreteJunction │ │ │ -0000b930: 5472 6565 3c2f 613e 3c2f 6469 763e 3c64 Tree
    An Eliminatable │ │ │ -0000b960: 436c 7573 7465 7254 7265 652c 2069 2e65 ClusterTree, i.e │ │ │ -0000b970: 2e2c 2061 2073 6574 206f 6620 7661 7269 ., a set of vari │ │ │ -0000b980: 6162 6c65 2063 6c75 7374 6572 7320 7769 able clusters wi │ │ │ -0000b990: 7468 2066 6163 746f 7273 2c20 6172 7261 th factors, arra │ │ │ -0000b9a0: 6e67 6564 2069 6e20 6120 7472 6565 2c2e nged in a tree,. │ │ │ -0000b9b0: 2e2e 3c2f 6469 763e 3c64 6976 2063 6c61 ..
    De │ │ │ -0000b9d0: 6669 6e69 7469 6f6e 3c2f 623e 2044 6973 finition Dis │ │ │ -0000b9e0: 6372 6574 654a 756e 6374 696f 6e54 7265 creteJunctionTre │ │ │ -0000b9f0: 652e 683a 3532 3c2f 6469 763e 3c2f 6469 e.h:52
    .
    │ │ │ -0000ba80: 4469 7363 7265 7465 4b65 7973 2069 7320 DiscreteKeys is │ │ │ -0000ba90: 6120 7365 7420 6f66 206b 6579 7320 7468 a set of keys th │ │ │ -0000baa0: 6174 2063 616e 2062 6520 6173 7365 6d62 at can be assemb │ │ │ -0000bab0: 6c65 6420 7573 696e 6720 7468 6520 2661 led using the &a │ │ │ -0000bac0: 6d70 3b20 6f70 6572 6174 6f72 2e3c 2f64 mp; operator.
    Definit │ │ │ -0000baf0: 696f 6e3c 2f62 3e20 4469 7363 7265 7465 ion Discrete │ │ │ -0000bb00: 4b65 792e 683a 3339 3c2f 6469 763e 3c2f Key.h:39
    .
    gtsam::Discret │ │ │ -0000bb70: 654c 6f6f 6b75 7044 4147 3c2f 613e 3c2f eLookupDAG
    A DAG mad │ │ │ -0000bba0: 6520 6672 6f6d 206c 6f6f 6b75 7020 7461 e from lookup ta │ │ │ -0000bbb0: 626c 6573 2c20 6173 2064 6566 696e 6564 bles, as defined │ │ │ -0000bbc0: 2061 626f 7665 2e3c 2f64 6976 3e3c 6469 above.
    │ │ │ -0000bbe0: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition DiscreteLookup │ │ │ -0000bc00: 4441 472e 683a 3737 3c2f 6469 763e 3c2f DAG.h:77
    .
    A map from k │ │ │ -0000bca0: 6579 7320 746f 2076 616c 7565 732e 3c2f eys to values.
    Defini │ │ │ -0000bcd0: 7469 6f6e 3c2f 623e 2044 6973 6372 6574 tion Discret │ │ │ -0000bce0: 6556 616c 7565 732e 683a 3334 3c2f 6469 eValues.h:34
    .
    │ │ │ -0000bd30: 3c61 2068 7265 663d 2261 3033 3532 342e gtsam::Fac │ │ │ -0000bd50: 746f 7247 7261 7068 3c2f 613e 3c2f 6469 torGraph
    A factor gr │ │ │ -0000bd80: 6170 6820 6973 2061 2062 6970 6172 7469 aph is a biparti │ │ │ -0000bd90: 7465 2067 7261 7068 2077 6974 6820 6661 te graph with fa │ │ │ -0000bda0: 6374 6f72 206e 6f64 6573 2063 6f6e 6e65 ctor nodes conne │ │ │ -0000bdb0: 6374 6564 2074 6f20 7661 7269 6162 6c65 cted to variable │ │ │ -0000bdc0: 206e 6f64 6573 2e3c 2f64 6976 3e3c 6469 nodes.
    │ │ │ -0000bde0: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition FactorGraph.h: │ │ │ -0000be00: 3937 3c2f 6469 763e 3c2f 6469 763e 0a3c 97
    .< │ │ │ -0000be10: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ -0000be20: 6964 3d22 6161 3033 3534 385f 6874 6d6c id="aa03548_html │ │ │ -0000be30: 223e 3c64 6976 2063 6c61 7373 3d22 7474 ">Traits class fo │ │ │ -0000bea0: 7220 656c 696d 696e 6174 6561 626c 6520 r eliminateable │ │ │ -0000beb0: 6661 6374 6f72 2067 7261 7068 732c 2073 factor graphs, s │ │ │ -0000bec0: 7065 6369 6669 6573 2074 6865 2074 7970 pecifies the typ │ │ │ -0000bed0: 6573 2074 6861 7420 7265 7375 6c74 2066 es that result f │ │ │ -0000bee0: 726f 6d20 656c 696d 696e 6174 696f 6e2c rom elimination, │ │ │ -0000bef0: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D │ │ │ -0000bf10: 6566 696e 6974 696f 6e3c 2f62 3e20 456c efinition El │ │ │ -0000bf20: 696d 696e 6174 6561 626c 6546 6163 746f iminateableFacto │ │ │ -0000bf30: 7247 7261 7068 2e68 3a33 363c 2f64 6976 rGraph.h:36
    .
    < │ │ │ -0000bf80: 6120 6872 6566 3d22 6130 3335 3830 2e68 a href="a03580.h │ │ │ -0000bf90: 746d 6c22 3e67 7473 616d 3a3a 456c 696d tml">gtsam::Elim │ │ │ -0000bfa0: 696e 6174 6561 626c 6546 6163 746f 7247 inateableFactorG │ │ │ -0000bfb0: 7261 7068 3c2f 613e 3c2f 6469 763e 3c64 raph
    EliminateableFa │ │ │ -0000bfe0: 6374 6f72 4772 6170 6820 6973 2061 2062 ctorGraph is a b │ │ │ -0000bff0: 6173 6520 636c 6173 7320 666f 7220 6661 ase class for fa │ │ │ -0000c000: 6374 6f72 2067 7261 7068 7320 7468 6174 ctor graphs that │ │ │ -0000c010: 2063 6f6e 7461 696e 7320 656c 696d 696e contains elimin │ │ │ -0000c020: 6174 696f 6e20 616c 676f 7269 7468 6d73 ation algorithms │ │ │ -0000c030: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def │ │ │ -0000c050: 696e 6974 696f 6e3c 2f62 3e20 456c 696d inition Elim │ │ │ -0000c060: 696e 6174 6561 626c 6546 6163 746f 7247 inateableFactorG │ │ │ -0000c070: 7261 7068 2e68 3a35 373c 2f64 6976 3e3c raph.h:57
    < │ │ │ -0000c080: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ -0000c100: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ -0000c110: 204f 7264 6572 696e 672e 683a 3334 3c2f Ordering.h:34
    .
    │ │ │ -0000c170: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 static Ordering │ │ │ -0000c200: 2043 6f6c 616d 6428 636f 6e73 7420 4641 Colamd(const FA │ │ │ -0000c210: 4354 4f52 5f47 5241 5048 2026 616d 703b CTOR_GRAPH & │ │ │ -0000c220: 6772 6170 6829 3c2f 6469 763e 3c64 6976 graph)
    C │ │ │ -0000c240: 6f6d 7075 7465 2061 2066 696c 6c2d 7265 ompute a fill-re │ │ │ -0000c250: 6475 6369 6e67 206f 7264 6572 696e 6720 ducing ordering │ │ │ -0000c260: 7573 696e 6720 434f 4c41 4d44 2066 726f using COLAMD fro │ │ │ -0000c270: 6d20 6120 6661 6374 6f72 2067 7261 7068 m a factor graph │ │ │ -0000c280: 2028 7365 6520 6465 7461 696c 7320 666f (see details fo │ │ │ -0000c290: 7220 6e6f 7465 206f 6e20 7065 7266 6f72 r note on perfor │ │ │ -0000c2a0: 6d61 6e63 2e2e 2e3c 2f64 6976 3e3c 6469 manc...
    │ │ │ -0000c2c0: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition Ordering.h:95< │ │ │ -0000c2e0: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .
    .
    . │ │ │ -0000c350: 0a3c 6469 7620 6964 3d22 6e61 762d 7061 ... │ │ │ -0000c5b0: 3c2f 6874 6d6c 3e0a . │ │ │ +000050f0: 666f 6c64 6f70 656e 2220 6964 3d22 666f foldopen" id="fo │ │ │ +00005100: 6c64 6f70 656e 3030 3131 3022 2064 6174 ldopen00110" dat │ │ │ +00005110: 612d 7374 6172 743d 227b 2220 6461 7461 a-start="{" data │ │ │ +00005120: 2d65 6e64 3d22 7d22 3e0a 3c64 6976 2063 -end="}">.
    110 │ │ │ +000051c0: 3c2f 7370 616e 3e20 2020 203c 7370 616e const Y& │ │ │ +000051f0: 616d 703b 203c 6120 636c 6173 733d 2263 amp; operator() │ │ │ +00005250: 3c2f 613e 283c 7370 616e 2063 6c61 7373 (const │ │ │ +00005270: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 Assignment&l │ │ │ +000052b0: 743b 4c26 6774 3b3c 2f61 3e26 616d 703b t;L>& │ │ │ +000052c0: 2078 293c 7370 616e 2063 6c61 7373 3d22 x) const │ │ │ +000052e0: 6f76 6572 7269 6465 203c 2f73 7061 6e3e override │ │ │ +000052f0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ +00005340: 2020 3131 313c 2f73 7061 6e3e 2020 2020 111 │ │ │ +00005350: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ +00005370: 726e 3c2f 7370 616e 3e20 636f 6e73 7461 rn consta │ │ │ +00005380: 6e74 5f3b 3c2f 6469 763e 0a3c 6469 7620 nt_;
    .
    112 │ │ │ +000053e0: 2020 207d 3c2f 6469 763e 0a3c 2f64 6976 }
    .
    .
    113< │ │ │ +00005440: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    ..
    115 NodePtr │ │ │ +00005590: 203c 6120 636c 6173 733d 2263 6f64 6520 apply(const < │ │ │ +00005610: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ +00005620: 5f74 7970 6564 6566 2220 6872 6566 3d22 _typedef" href=" │ │ │ +00005630: 6130 3237 3936 2e68 746d 6c23 6136 3065 a02796.html#a60e │ │ │ +00005640: 6436 3136 3235 3934 3564 3039 3636 3130 d61625945d096610 │ │ │ +00005650: 3361 3539 6439 6334 3763 3861 3622 3e55 3a59d9c47c8a6">U │ │ │ +00005660: 6e61 7279 3c2f 613e 2661 6d70 3b20 6f70 nary& op │ │ │ +00005670: 293c 7370 616e 2063 6c61 7373 3d22 6b65 ) const ov │ │ │ +00005690: 6572 7269 6465 203c 2f73 7061 6e3e 7b3c erride {< │ │ │ +000056a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +000056f0: 3131 363c 2f73 7061 6e3e 2020 2020 2020 116 │ │ │ +00005700: 3c61 2063 6c61 7373 3d22 636f 6465 2068 │ │ │ +00005750: 4e6f 6465 5074 723c 2f61 3e20 6628 3c73 NodePtr f(new < │ │ │ +00005780: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ +00005790: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ +000057a0: 3032 3737 362e 6874 6d6c 223e 4c65 6166 02776.html">Leaf │ │ │ +000057b0: 3c2f 613e 286f 7028 636f 6e73 7461 6e74 (op(constant │ │ │ +000057c0: 5f29 2c20 6e72 4173 7369 676e 6d65 6e74 _), nrAssignment │ │ │ +000057d0: 735f 2929 3b3c 2f64 6976 3e0a 3c64 6976 s_));
    .
    < │ │ │ +00005810: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00005820: 6e6f 223e 2020 3131 373c 2f73 7061 6e3e no"> 117 │ │ │ +00005830: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ +00005850: 7265 7475 726e 3c2f 7370 616e 3e20 663b return f; │ │ │ +00005860: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +000058b0: 2031 3138 3c2f 7370 616e 3e20 2020 207d 118 } │ │ │ +000058c0: 3c2f 6469 763e 0a3c 2f64 6976 3e0a 3c64
    .
    . │ │ │ +000058e0: 3c61 2069 643d 226c 3030 3131 3922 206e 119
    .
    . │ │ │ +00005970: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ +000059a0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 1 │ │ │ +00005a00: 3231 3c2f 613e 3c2f 7370 616e 3e20 2020 21 │ │ │ +00005a10: 203c 6120 636c 6173 733d 2263 6f64 6520 NodePtr ap │ │ │ +00005ac0: 706c 793c 2f61 3e28 3c73 7061 6e20 636c ply(co │ │ │ +00005ae0: 6e73 743c 2f73 7061 6e3e 2055 6e61 7279 nst Unary │ │ │ +00005af0: 4173 7369 676e 6d65 6e74 2661 6d70 3b20 Assignment& │ │ │ +00005b00: 6f70 2c3c 2f64 6976 3e0a 3c64 6976 2063 op,
    .
    122 │ │ │ +00005b60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +00005b70: 3c73 7061 6e20 636c 6173 733d 226b 6579 const A │ │ │ +00005bc0: 7373 6967 6e6d 656e 7426 6c74 3b4c 2667 ssignment<L&g │ │ │ +00005bd0: 743b 3c2f 613e 2661 6d70 3b20 6173 7369 t;& assi │ │ │ +00005be0: 676e 6d65 6e74 293c 7370 616e 2063 6c61 gnment) co │ │ │ +00005c00: 6e73 7420 6f76 6572 7269 6465 203c 2f73 nst override {
    .
    < │ │ │ +00005c50: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00005c60: 6e6f 223e 2020 3132 333c 2f73 7061 6e3e no"> 123 │ │ │ +00005c70: 2020 2020 2020 3c61 2063 6c61 7373 3d22 NodePtr f(new Leaf(op(as │ │ │ +00005d30: 7369 676e 6d65 6e74 2c20 636f 6e73 7461 signment, consta │ │ │ +00005d40: 6e74 5f29 2c20 6e72 4173 7369 676e 6d65 nt_), nrAssignme │ │ │ +00005d50: 6e74 735f 2929 3b3c 2f64 6976 3e0a 3c64 nts_));
    . │ │ │ +00005d70: 3c61 2069 643d 226c 3030 3132 3422 206e 124 return │ │ │ +00005de0: 663b 3c2f 6469 763e 0a3c 6469 7620 636c f;
    .
    125 │ │ │ +00005e40: 207d 3c2f 6469 763e 0a3c 2f64 6976 3e0a }
    .
    . │ │ │ +00005e50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ +00005ee0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00005ef0: 6e6f 223e 2020 3132 373c 2f73 7061 6e3e no"> 127 │ │ │ +00005f00: 2020 2020 3c73 7061 6e20 636c 6173 733d // App │ │ │ +00005f20: 6c79 2062 696e 6172 7920 6f70 6572 6174 ly binary operat │ │ │ +00005f30: 6f72 2026 7175 6f74 3b68 203d 2066 206f or "h = f o │ │ │ +00005f40: 7020 6726 7175 6f74 3b20 6f6e 204c 6561 p g" on Lea │ │ │ +00005f50: 6620 6e6f 6465 3c2f 7370 616e 3e3c 2f64 f node.
    12 │ │ │ +00005fb0: 383c 2f73 7061 6e3e 2020 2020 3c73 7061 8 // Note op is │ │ │ +00005fe0: 6e6f 7420 6173 7375 6d65 6420 636f 6d6d not assumed comm │ │ │ +00005ff0: 7574 6174 6976 6520 736f 2077 6520 6e65 utative so we ne │ │ │ +00006000: 6564 2074 6f20 6b65 6570 2074 7261 636b ed to keep track │ │ │ +00006010: 206f 6620 6f72 6465 723c 2f73 7061 6e3e of order │ │ │ +00006020: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00006070: 2031 3239 3c2f 7370 616e 3e20 2020 203c 129 < │ │ │ +00006080: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ +00006090: 656e 7422 3e2f 2f20 5369 6d70 6c79 2063 ent">// Simply c │ │ │ +000060a0: 616c 6c73 2061 7070 6c79 206f 6e20 6172 alls apply on ar │ │ │ +000060b0: 6775 6d65 6e74 2074 6f20 6361 6c6c 2063 gument to call c │ │ │ +000060c0: 6f72 7265 6374 2076 6972 7475 616c 206d orrect virtual m │ │ │ +000060d0: 6574 686f 643a 3c2f 7370 616e 3e3c 2f64 ethod:.
    13 │ │ │ +00006130: 303c 2f73 7061 6e3e 2020 2020 3c73 7061 0 // fL.apply_f_ │ │ │ +00006160: 6f70 5f67 2867 4c29 202d 2667 743b 2067 op_g(gL) -> g │ │ │ +00006170: 4c2e 6170 706c 795f 675f 6f70 5f66 4c28 L.apply_g_op_fL( │ │ │ +00006180: 664c 2920 2862 656c 6f77 293c 2f73 7061 fL) (below)
    .
    131 │ │ │ +000061f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // fL.app │ │ │ +00006210: 6c79 5f66 5f6f 705f 6728 6743 2920 2d26 ly_f_op_g(gC) -& │ │ │ +00006220: 6774 3b20 6743 2e61 7070 6c79 5f67 5f6f gt; gC.apply_g_o │ │ │ +00006230: 705f 664c 2866 4c29 2028 4368 6f69 6365 p_fL(fL) (Choice │ │ │ +00006240: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    .< │ │ │ +00006250: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00006260: 3e3c 6120 6964 3d22 6c30 3031 3332 2220 > 132 NodePtr apply_f_op_g( │ │ │ +00006310: 3c73 7061 6e20 636c 6173 733d 226b 6579 const │ │ │ +00006360: 4e6f 6465 3c2f 613e 2661 6d70 3b20 672c Node& g, │ │ │ +00006370: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const Binary& │ │ │ +000063a0: 6f70 293c 7370 616e 2063 6c61 7373 3d22 op) const │ │ │ +000063c0: 6f76 6572 7269 6465 203c 2f73 7061 6e3e override │ │ │ +000063d0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ +00006420: 2020 3133 333c 2f73 7061 6e3e 2020 2020 133 │ │ │ +00006430: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ +00006450: 726e 3c2f 7370 616e 3e20 672e 6170 706c rn g.appl │ │ │ +00006460: 795f 675f 6f70 5f66 4c28 2a3c 7370 616e y_g_op_fL(*this, op │ │ │ +00006490: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    134 │ │ │ +000064f0: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    135 .
    1 │ │ │ +000065a0: 3336 3c2f 7370 616e 3e20 2020 203c 7370 36 // Applying b │ │ │ +000065d0: 696e 6172 7920 6f70 6572 6174 6f72 2074 inary operator t │ │ │ +000065e0: 6f20 7477 6f20 6c65 6176 6573 2072 6573 o two leaves res │ │ │ +000065f0: 756c 7473 2069 6e20 6120 6c65 6166 3c2f ults in a leaf
    .
    < │ │ │ +00006640: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00006650: 6e6f 223e 2020 3133 373c 2f73 7061 6e3e no"> 137 │ │ │ +00006660: 2020 2020 3c61 2063 6c61 7373 3d22 636f NodePtr │ │ │ +000066c0: 6170 706c 795f 675f 6f70 5f66 4c28 3c73 apply_g_op_fL(const │ │ │ +000066f0: 204c 6561 6626 616d 703b 2066 4c2c 203c Leaf& fL, < │ │ │ +00006700: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00006710: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const Binary& op │ │ │ +00006730: 293c 7370 616e 2063 6c61 7373 3d22 6b65 ) const ov │ │ │ +00006750: 6572 7269 6465 203c 2f73 7061 6e3e 7b3c erride {< │ │ │ +00006760: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +000067b0: 3133 383c 2f73 7061 6e3e 2020 2020 2020 138 │ │ │ +000067c0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // fL op g │ │ │ +000067e0: 4c3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c L
    .< │ │ │ +000067f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00006800: 3e3c 6120 6964 3d22 6c30 3031 3339 2220 > 139 NodePtr │ │ │ +000068a0: 3c2f 613e 2068 283c 7370 616e 2063 6c61 h(new │ │ │ +000068c0: 3c2f 7370 616e 3e20 4c65 6166 286f 7028 Leaf(op( │ │ │ +000068d0: 664c 2e63 6f6e 7374 616e 745f 2c20 636f fL.constant_, co │ │ │ +000068e0: 6e73 7461 6e74 5f29 2c20 6e72 4173 7369 nstant_), nrAssi │ │ │ +000068f0: 676e 6d65 6e74 735f 2929 3b3c 2f64 6976 gnments_));
    .
    140< │ │ │ +00006950: 2f73 7061 6e3e 2020 2020 2020 3c73 7061 /span> return h;
    .< │ │ │ +000069a0: 6120 6964 3d22 6c30 3031 3431 2220 6e61 a id="l00141" na │ │ │ +000069b0: 6d65 3d22 6c30 3031 3431 223e 3c2f 613e me="l00141"> │ │ │ +000069c0: 3c73 7061 6e20 636c 6173 733d 226c 696e 141 }
    .< │ │ │ +00006a00: 6120 6964 3d22 6c30 3031 3432 2220 6e61 a id="l00142" na │ │ │ +00006a10: 6d65 3d22 6c30 3031 3432 223e 3c2f 613e me="l00142"> │ │ │ +00006a20: 3c73 7061 6e20 636c 6173 733d 226c 696e 142
    .
    143 │ │ │ +00006aa0: 203c 7370 616e 2063 6c61 7373 3d22 636f // If sec │ │ │ +00006ac0: 6f6e 6420 6172 6775 6d65 6e74 2069 7320 ond argument is │ │ │ +00006ad0: 6120 4368 6f69 6365 206e 6f64 652c 2063 a Choice node, c │ │ │ +00006ae0: 616c 6c20 6974 2623 3339 3b73 2061 7070 all it's app │ │ │ +00006af0: 6c79 2077 6974 6820 6c65 6166 2061 7320 ly with leaf as │ │ │ +00006b00: 7365 636f 6e64 3c2f 7370 616e 3e3c 2f64 second.
    14 │ │ │ +00006b60: 343c 2f73 7061 6e3e 2020 2020 3c61 2063 4 Node │ │ │ +00006bc0: 5074 723c 2f61 3e20 6170 706c 795f 675f Ptr apply_g_ │ │ │ +00006bd0: 6f70 5f66 4328 3c73 7061 6e20 636c 6173 op_fC(cons │ │ │ +00006bf0: 743c 2f73 7061 6e3e 2043 686f 6963 6526 t Choice& │ │ │ +00006c00: 616d 703b 2066 432c 203c 7370 616e 2063 amp; fC, c │ │ │ +00006c20: 6f6e 7374 3c2f 7370 616e 3e20 4269 6e61 onst Bina │ │ │ +00006c30: 7279 2661 6d70 3b20 6f70 293c 7370 616e ry& op) const override │ │ │ +00006c60: 203c 2f73 7061 6e3e 7b3c 2f64 6976 3e0a {
    . │ │ │ +00006c70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ +00006d70: 0a3c 6469 7620 636c 6173 733d 226c 696e . │ │ │ +00006dd0: 0a3c 6469 7620 636c 6173 733d 226c 696e ...
    │ │ │ +00006f00: 2020 3134 393c 2f61 3e3c 2f73 7061 6e3e 149 │ │ │ +00006f10: 2020 2020 3c61 2063 6c61 7373 3d22 636f NodePtr │ │ │ +00006f70: 3c61 2063 6c61 7373 3d22 636f 6465 2068 choose(const L │ │ │ +00006ff0: 2661 6d70 3b20 6c61 6265 6c2c 203c 7370 & label, size_t index) const override │ │ │ +00007050: 203c 2f73 7061 6e3e 7b3c 2f64 6976 3e0a {
    . │ │ │ +00007060: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ +00007090: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 150 return NodePtr(new < │ │ │ +00007160: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ +00007170: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ +00007180: 3032 3737 362e 6874 6d6c 223e 4c65 6166 02776.html">Leaf │ │ │ +00007190: 3c2f 613e 2863 6f6e 7374 616e 7428 292c (constant(), │ │ │ +000071a0: 206e 7241 7373 6967 6e6d 656e 7473 2829 nrAssignments() │ │ │ +000071b0: 2929 3b3c 2f64 6976 3e0a 3c64 6976 2063 ));
    .
    151 │ │ │ +00007210: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ +00007220: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ +00007290: 6120 6964 3d22 6c30 3031 3533 2220 6e61 a id="l00153" na │ │ │ +000072a0: 6d65 3d22 6c30 3031 3533 223e 3c2f 613e me="l00153"> │ │ │ +000072b0: 3c73 7061 6e20 636c 6173 733d 226c 696e 153 b │ │ │ +000072f0: 6f6f 6c3c 2f73 7061 6e3e 2069 734c 6561 ool isLea │ │ │ +00007300: 6628 293c 7370 616e 2063 6c61 7373 3d22 f() const │ │ │ +00007320: 6f76 6572 7269 6465 203c 2f73 7061 6e3e override │ │ │ +00007330: 7b20 3c73 7061 6e20 636c 6173 733d 226b { retu │ │ │ +00007350: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn │ │ │ +00007370: 7472 7565 3c2f 7370 616e 3e3b 207d 3c2f true; }.
    .. │ │ │ +00007470: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ +000074a0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 155 pri │ │ │ +000074e0: 7661 7465 3c2f 7370 616e 3e3a 3c2f 6469 vate:.
    156 │ │ │ +00007540: 3c2f 7370 616e 3e20 2020 203c 7370 616e using Ba │ │ │ +00007570: 7365 203d 203c 6120 636c 6173 733d 2263 se = DecisionTree&l │ │ │ +000075b0: 743b 4c2c 2059 2667 743b 3a3a 4e6f 6465 t;L, Y>::Node │ │ │ +000075c0: 3c2f 613e 3b3c 2f64 6976 3e0a 3c64 6976 ;
    .
    < │ │ │ +00007600: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00007610: 6e6f 223e 2020 3135 373c 2f73 7061 6e3e no"> 157 │ │ │ +00007620: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ +00007670: 2020 3135 393c 2f73 7061 6e3e 2020 2020 159 │ │ │ +00007680: 3c73 7061 6e20 636c 6173 733d 226b 6579 friend class │ │ │ +000076c0: 3c2f 7370 616e 3e62 6f6f 7374 3a3a 7365 boost::se │ │ │ +000076d0: 7269 616c 697a 6174 696f 6e3a 3a61 6363 rialization::acc │ │ │ +000076e0: 6573 733b 3c2f 6469 763e 0a3c 6469 7620 ess;
    .
    160 │ │ │ +00007740: 2020 203c 7370 616e 2063 6c61 7373 3d22 templat │ │ │ +00007760: 653c 2f73 7061 6e3e 2026 6c74 3b3c 7370 e <class │ │ │ +00007790: 4152 4348 4956 4526 6774 3b3c 2f64 6976 ARCHIVE>
    .
    161< │ │ │ +000077f0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> void │ │ │ +00007820: 7365 7269 616c 697a 6528 4152 4348 4956 serialize(ARCHIV │ │ │ +00007830: 4526 616d 703b 2061 722c 203c 7370 616e E& ar, const unsigned │ │ │ +00007880: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int /*version*/) {
    .< │ │ │ +000078e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +000078f0: 3e3c 6120 6964 3d22 6c30 3031 3632 2220 > 162 ar & │ │ │ +00007940: 3b20 424f 4f53 545f 5345 5249 414c 495a ; BOOST_SERIALIZ │ │ │ +00007950: 4154 494f 4e5f 4241 5345 5f4f 424a 4543 ATION_BASE_OBJEC │ │ │ +00007960: 545f 4e56 5028 4261 7365 293b 3c2f 6469 T_NVP(Base);.
    163 │ │ │ +000079c0: 3c2f 7370 616e 3e20 2020 2020 2061 7226 ar& │ │ │ +000079d0: 616d 703b 2042 4f4f 5354 5f53 4552 4941 amp; BOOST_SERIA │ │ │ +000079e0: 4c49 5a41 5449 4f4e 5f4e 5650 2863 6f6e LIZATION_NVP(con │ │ │ +000079f0: 7374 616e 745f 293b 3c2f 6469 763e 0a3c stant_);
    .< │ │ │ +00007a00: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00007a10: 3e3c 6120 6964 3d22 6c30 3031 3634 2220 > 164 ar& │ │ │ +00007a60: 2042 4f4f 5354 5f53 4552 4941 4c49 5a41 BOOST_SERIALIZA │ │ │ +00007a70: 5449 4f4e 5f4e 5650 286e 7241 7373 6967 TION_NVP(nrAssig │ │ │ +00007a80: 6e6d 656e 7473 5f29 3b3c 2f64 6976 3e0a nments_);
    . │ │ │ +00007a90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . │ │ │ +00007af0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ +00007b20: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 166 }; │ │ │ +00007b60: 2f2f 204c 6561 663c 2f73 7061 6e3e 3c2f // Leaf.
    .. │ │ │ +00007c60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    │ │ │ +00007d70: 2020 3136 393c 2f73 7061 6e3e 2020 3c73 169 // Choice
    .
    170< │ │ │ +00007e00: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ +00007e10: 656e 7422 3e20 202f 2a2a 2a2a 2a2a 2a2a ent"> /******** │ │ │ +00007e20: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00007e30: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00007e40: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00007e50: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00007e60: 2a2a 2a2a 2f3c 2f73 7061 6e3e 3c2f 6469 ****/.
    171 │ │ │ +00007ec0: 3c2f 7370 616e 3e20 203c 7370 616e 2063 t │ │ │ +00007ee0: 656d 706c 6174 653c 2f73 7061 6e3e 266c emplate&l │ │ │ +00007ef0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;typename │ │ │ +00007f10: 3c2f 7370 616e 3e20 4c2c 203c 7370 616e L, typename │ │ │ +00007f40: 2059 2667 743b 3c2f 6469 763e 0a3c 6469 Y>
    ..
    │ │ │ +00008000: 2031 3732 3c2f 613e 3c2f 7370 616e 3e20 172 │ │ │ +00008010: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct DecisionTree<L, Y>::< │ │ │ +00008080: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ +00008090: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ +000080a0: 3032 3738 302e 6874 6d6c 223e 4368 6f69 02780.html">Choi │ │ │ +000080b0: 6365 3c2f 613e 3a20 3c73 7061 6e20 636c ce: pu │ │ │ +000080d0: 626c 6963 3c2f 7370 616e 3e20 3c61 2063 blic Decision │ │ │ +00008110: 5472 6565 3c2f 613e 266c 743b 4c2c 2059 Tree<L, Y │ │ │ +00008120: 2667 743b 3a3a 4e6f 6465 207b 3c2f 6469 >::Node {.
    │ │ │ +000081c0: 2020 3137 343c 2f61 3e3c 2f73 7061 6e3e 174 │ │ │ +000081d0: 2020 2020 4c20 3c61 2063 6c61 7373 3d22 L label_;
    .
    175 .
    177 std::vecto │ │ │ +00008340: 7226 6c74 3b4e 6f64 6550 7472 2667 743b r<NodePtr> │ │ │ +00008350: 203c 6120 636c 6173 733d 2263 6f64 6520 branches_; │ │ │ +000083b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00008400: 2031 3738 3c2f 7370 616e 3e20 3c2f 6469 178 .
    .
    179< │ │ │ +000084f0: 2f73 7061 6e3e 2020 203c 7370 616e 2063 /span> p │ │ │ +00008510: 7269 7661 7465 3c2f 7370 616e 3e3a 3c2f rivate:.
    1 │ │ │ +00008570: 3834 3c2f 7370 616e 3e20 2020 203c 7370 84 size_t allSame_;.
    1 │ │ │ +00008600: 3835 3c2f 7370 616e 3e20 3c2f 6469 763e 85
    │ │ │ +00008610: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +00008640: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 186 u │ │ │ +00008680: 7369 6e67 203c 2f73 7061 6e3e 4368 6f69 sing Choi │ │ │ +00008690: 6365 5074 7220 3d20 626f 6f73 743a 3a73 cePtr = boost::s │ │ │ +000086a0: 6861 7265 645f 7074 7226 6c74 3b63 6f6e hared_ptr<con │ │ │ +000086b0: 7374 2043 686f 6963 6526 6774 3b3b 3c2f st Choice>;.
    1 │ │ │ +00008710: 3837 3c2f 7370 616e 3e20 3c2f 6469 763e 87
    │ │ │ +00008720: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ +000087b0: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ +000087c0: 7265 663d 2261 3032 3739 362e 6874 6d6c ref="a02796.html │ │ │ +000087d0: 2361 6530 6238 3434 3437 3338 3233 6161 #ae0b844473823aa │ │ │ +000087e0: 3039 6337 3165 3636 3834 3439 3530 3963 09c71e668449509c │ │ │ +000087f0: 6432 223e 2020 3138 383c 2f61 3e3c 2f73 d2"> 188 pub │ │ │ +00008820: 6c69 633c 2f73 7061 6e3e 3a3c 2f64 6976 lic:
    .
    │ │ │ +000088c0: 2031 3930 3c2f 613e 3c2f 7370 616e 3e20 190 │ │ │ +000088d0: 2020 203c 6120 636c 6173 733d 2263 6f64 Choice() │ │ │ +00008930: 207b 7d3c 2f64 6976 3e0a 3c64 6976 2063 {}
    .
    . │ │ │ +00008980: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ +000089b0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 1 │ │ │ +00008a10: 3931 3c2f 613e 3c2f 7370 616e 3e20 3c2f 91 .
    1 │ │ │ +00008a70: 3932 3c2f 7370 616e 3e20 2020 207e 4368 92 ~Ch │ │ │ +00008a80: 6f69 6365 2829 3c73 7061 6e20 636c 6173 oice() ove │ │ │ +00008aa0: 7272 6964 6520 3c2f 7370 616e 3e7b 3c2f rride {.
    1 │ │ │ +00008b00: 3933 3c2f 7370 616e 3e3c 7370 616e 2063 93#ifdef DT_DE │ │ │ +00008b30: 4255 475f 4d45 4d4f 5259 3c2f 7370 616e BUG_MEMORY
    .
    . │ │ │ +00008ba0: 3c61 2069 643d 226c 3030 3139 3422 206e 194 │ │ │ +00008c20: 3c2f 613e 3c2f 7370 616e 3e20 2020 2020 │ │ │ +00008c30: 2073 7464 3a3a 7374 643a 3a63 6f75 7420 std::std::cout │ │ │ +00008c40: 266c 743b 266c 743b 204e 6f64 653a 3a6e << Node::n │ │ │ +00008c50: 724e 6f64 6573 2026 6c74 3b26 6c74 3b20 rNodes << │ │ │ +00008c60: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ +00008c80: 743b 2064 6573 7472 7563 7469 6e67 2028 t; destructing ( │ │ │ +00008c90: 4368 6f69 6365 2920 2671 756f 743b 3c2f Choice) " << t │ │ │ +00008cb0: 6869 732d 2667 743b 6964 2829 3c2f 6469 his->id().
    195 │ │ │ +00008d10: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ +00008d20: 2020 2020 2020 2020 2020 2020 266c 743b < │ │ │ +00008d30: 266c 743b 2073 7464 3a3a 7374 643a 3a65 < std::std::e │ │ │ +00008d40: 6e64 6c3b 3c2f 6469 763e 0a3c 6469 7620 ndl;
    .
    196< │ │ │ +00008da0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class="prep │ │ │ +00008db0: 726f 6365 7373 6f72 223e 2365 6e64 6966 rocessor">#endif │ │ │ +00008dc0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    ...< │ │ │ +00008ed0: 6120 6964 3d22 6c30 3031 3938 2220 6e61 a id="l00198" na │ │ │ +00008ee0: 6d65 3d22 6c30 3031 3938 223e 3c2f 613e me="l00198"> │ │ │ +00008ef0: 3c73 7061 6e20 636c 6173 733d 226c 696e 198
    .
    .< │ │ │ +00008f60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00008f70: 3e3c 6120 6964 3d22 6c30 3032 3030 2220 > 20 │ │ │ +00008ff0: 303c 2f61 3e3c 2f73 7061 6e3e 2020 2020 0 │ │ │ +00009000: 3c73 7061 6e20 636c 6173 733d 226b 6579 static NodePtr │ │ │ +00009080: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Unique(const C │ │ │ +00009100: 686f 6963 6550 7472 2661 6d70 3b20 6629 hoicePtr& f) │ │ │ +00009110: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    .< │ │ │ +00009160: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00009170: 3e3c 6120 6964 3d22 6c30 3032 3031 2220 > 20 │ │ │ +000091f0: 313c 2f61 3e3c 2f73 7061 6e3e 3c73 7061 1#ifndef G │ │ │ +00009220: 5453 414d 5f44 545f 4e4f 5f50 5255 4e49 TSAM_DT_NO_PRUNI │ │ │ +00009230: 4e47 3c2f 7370 616e 3e3c 2f64 6976 3e0a NG
    . │ │ │ +00009240: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ +00009320: 2032 3033 3c2f 7370 616e 3e20 2020 2020 203 │ │ │ +00009330: 2020 2061 7373 6572 7428 662d 2667 743b assert(f-> │ │ │ +00009340: 6272 616e 6368 6573 2829 2e73 697a 6528 branches().size( │ │ │ +00009350: 2920 2667 743b 2030 293b 3c2f 6469 763e ) > 0);
    │ │ │ +00009360: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ +000093f0: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ +00009400: 7265 663d 2261 3032 3739 362e 6874 6d6c ref="a02796.html │ │ │ +00009410: 2361 6662 3635 6266 6535 6433 6463 3262 #afb65bfe5d3dc2b │ │ │ +00009420: 3866 3239 3465 6138 3934 6161 6263 3235 8f294ea894aabc25 │ │ │ +00009430: 6133 223e 2020 3230 343c 2f61 3e3c 2f73 a3"> 204 Node │ │ │ +000094a0: 5074 723c 2f61 3e20 6630 203d 2066 2d26 Ptr f0 = f-& │ │ │ +000094b0: 6774 3b62 7261 6e63 6865 735f 5b30 5d3b gt;branches_[0]; │ │ │ +000094c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00009510: 2032 3035 3c2f 7370 616e 3e20 3c2f 6469 205 .
    206 │ │ │ +00009570: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ +00009580: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00009590: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype">size_t< │ │ │ +000095a0: 2f73 7061 6e3e 206e 7241 7373 6967 6e6d /span> nrAssignm │ │ │ +000095b0: 656e 7473 203d 2030 3b3c 2f64 6976 3e0a ents = 0;
    . │ │ │ +000095c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ +000095f0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 207 for │ │ │ +00009640: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (auto branch: f-> │ │ │ +00009670: 3b62 7261 6e63 6865 7328 2929 207b 3c2f ;branches()) {.
    2 │ │ │ +000096d0: 3038 3c2f 7370 616e 3e20 2020 2020 2020 08 │ │ │ +000096e0: 2020 2061 7373 6572 7428 6272 616e 6368 assert(branch │ │ │ +000096f0: 2d26 6774 3b69 734c 6561 6628 2929 3b3c ->isLeaf());< │ │ │ +00009700: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00009750: 3230 393c 2f73 7061 6e3e 2020 2020 2020 209 │ │ │ +00009760: 2020 2020 6e72 4173 7369 676e 6d65 6e74 nrAssignment │ │ │ +00009770: 7320 2b3d 3c2f 6469 763e 0a3c 6469 7620 s +=
    .
    210 │ │ │ +000097d0: 2020 2020 2020 2020 2020 2020 2062 6f6f boo │ │ │ +000097e0: 7374 3a3a 6479 6e61 6d69 635f 706f 696e st::dynamic_poin │ │ │ +000097f0: 7465 725f 6361 7374 266c 743b 636f 6e73 ter_cast<cons │ │ │ +00009800: 7420 4c65 6166 2667 743b 2862 7261 6e63 t Leaf>(branc │ │ │ +00009810: 6829 2d26 6774 3b6e 7241 7373 6967 6e6d h)->nrAssignm │ │ │ +00009820: 656e 7473 2829 3b3c 2f64 6976 3e0a 3c64 ents();
    . │ │ │ +00009840: 3c61 2069 643d 226c 3030 3231 3122 206e 211 }
    .
    212< │ │ │ +000098e0: 2f73 7061 6e3e 2020 2020 2020 2020 3c61 /span> No │ │ │ +00009940: 6465 5074 723c 2f61 3e20 6e65 774c 6561 dePtr newLea │ │ │ +00009950: 6628 3c2f 6469 763e 0a3c 6469 7620 636c f(
    .
    213 │ │ │ +000099b0: 2020 2020 2020 2020 203c 7370 616e 2063 n │ │ │ +000099d0: 6577 3c2f 7370 616e 3e20 4c65 6166 2862 ew Leaf(b │ │ │ +000099e0: 6f6f 7374 3a3a 6479 6e61 6d69 635f 706f oost::dynamic_po │ │ │ +000099f0: 696e 7465 725f 6361 7374 266c 743b 636f inter_cast<co │ │ │ +00009a00: 6e73 7420 4c65 6166 2667 743b 2866 3029 nst Leaf>(f0) │ │ │ +00009a10: 2d26 6774 3b63 6f6e 7374 616e 7428 292c ->constant(), │ │ │ +00009a20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00009a70: 2032 3134 3c2f 7370 616e 3e20 2020 2020 214 │ │ │ +00009a80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +00009a90: 6e72 4173 7369 676e 6d65 6e74 7329 293b nrAssignments)); │ │ │ +00009aa0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    .< │ │ │ +00009b00: 6120 6964 3d22 6c30 3032 3135 2220 6e61 a id="l00215" na │ │ │ +00009b10: 6d65 3d22 6c30 3032 3135 223e 3c2f 613e me="l00215"> │ │ │ +00009b20: 3c73 7061 6e20 636c 6173 733d 226c 696e 215< │ │ │ +00009b80: 2f61 3e3c 2f73 7061 6e3e 2020 2020 2020 /a> │ │ │ +00009b90: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ +00009bb0: 726e 3c2f 7370 616e 3e20 6e65 774c 6561 rn newLea │ │ │ +00009bc0: 663b 3c2f 6469 763e 0a3c 6469 7620 636c f;
    .
    216 │ │ │ +00009c20: 2020 207d 203c 7370 616e 2063 6c61 7373 } e │ │ │ +00009c40: 6c73 653c 2f73 7061 6e3e 3c2f 6469 763e lse
    │ │ │ +00009c50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +00009c80: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 217 │ │ │ +00009cc0: 2365 6e64 6966 3c2f 7370 616e 3e3c 2f64 #endif.
    21 │ │ │ +00009d20: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ +00009d30: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ +00009d50: 3c2f 7370 616e 3e20 663b 3c2f 6469 763e f;
    │ │ │ +00009d60: 0a3c 6469 7620 636c 6173 733d 226c 696e . │ │ │ +00009dc0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ +00009e30: 6120 6964 3d22 6c30 3032 3231 2220 6e61 a id="l00221" na │ │ │ +00009e40: 6d65 3d22 6c30 3032 3231 223e 3c2f 613e me="l00221"> │ │ │ +00009e50: 3c73 7061 6e20 636c 6173 733d 226c 696e 221 b │ │ │ +00009e90: 6f6f 6c3c 2f73 7061 6e3e 2069 734c 6561 ool isLea │ │ │ +00009ea0: 6628 293c 7370 616e 2063 6c61 7373 3d22 f() const │ │ │ +00009ec0: 6f76 6572 7269 6465 203c 2f73 7061 6e3e override │ │ │ +00009ed0: 7b20 3c73 7061 6e20 636c 6173 733d 226b { retu │ │ │ +00009ef0: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn │ │ │ +00009f10: 6661 6c73 653c 2f73 7061 6e3e 3b20 7d3c false; }< │ │ │ +00009f20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00009f70: 3232 323c 2f73 7061 6e3e 203c 2f64 6976 222
    .
    .
    │ │ │ +0000a010: 3c61 2063 6c61 7373 3d22 6c69 6e65 2220 224 Choice │ │ │ +0000a0c0: 3c2f 613e 283c 7370 616e 2063 6c61 7373 (const │ │ │ +0000a0e0: 3c2f 7370 616e 3e20 4c26 616d 703b 206c L& l │ │ │ +0000a0f0: 6162 656c 2c20 3c73 7061 6e20 636c 6173 abel, │ │ │ +0000a110: 7369 7a65 5f74 3c2f 7370 616e 3e20 636f size_t co │ │ │ +0000a120: 756e 7429 203a 3c2f 6469 763e 0a3c 6469 unt) :
    .< │ │ │ +0000a140: 6120 6964 3d22 6c30 3032 3235 2220 6e61 a id="l00225" na │ │ │ +0000a150: 6d65 3d22 6c30 3032 3235 223e 3c2f 613e me="l00225"> │ │ │ +0000a160: 3c73 7061 6e20 636c 6173 733d 226c 696e 225 label_(la │ │ │ +0000a190: 6265 6c29 2c20 616c 6c53 616d 655f 2874 bel), allSame_(t │ │ │ +0000a1a0: 7275 6529 207b 3c2f 6469 763e 0a3c 6469 rue) {
    .< │ │ │ +0000a1c0: 6120 6964 3d22 6c30 3032 3236 2220 6e61 a id="l00226" na │ │ │ +0000a1d0: 6d65 3d22 6c30 3032 3236 223e 3c2f 613e me="l00226"> │ │ │ +0000a1e0: 3c73 7061 6e20 636c 6173 733d 226c 696e 226 branches_ │ │ │ +0000a210: 2e72 6573 6572 7665 2863 6f75 6e74 293b .reserve(count); │ │ │ +0000a220: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +0000a270: 2032 3237 3c2f 7370 616e 3e20 2020 207d 227 } │ │ │ +0000a280: 3c2f 6469 763e 0a3c 2f64 6976 3e0a 3c64
    .
    ...
    .< │ │ │ +0000a3c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0000a3d0: 3e3c 6120 6964 3d22 6c30 3032 3330 2220 > 23 │ │ │ +0000a450: 303c 2f61 3e3c 2f73 7061 6e3e 2020 2020 0 │ │ │ +0000a460: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Choice(const < │ │ │ +0000a4e0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ +0000a4f0: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ +0000a500: 3032 3738 302e 6874 6d6c 223e 4368 6f69 02780.html">Choi │ │ │ +0000a510: 6365 3c2f 613e 2661 6d70 3b20 662c 203c ce& f, < │ │ │ +0000a520: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +0000a530: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const C │ │ │ +0000a570: 686f 6963 653c 2f61 3e26 616d 703b 2067 hoice& g │ │ │ +0000a580: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const Binary& │ │ │ +0000a5b0: 206f 7029 203a 3c2f 6469 763e 0a3c 6469 op) :
    .< │ │ │ +0000a5d0: 6120 6964 3d22 6c30 3032 3331 2220 6e61 a id="l00231" na │ │ │ +0000a5e0: 6d65 3d22 6c30 3032 3331 223e 3c2f 613e me="l00231"> │ │ │ +0000a5f0: 3c73 7061 6e20 636c 6173 733d 226c 696e 231 allSame_( │ │ │ +0000a620: 7472 7565 2920 7b3c 2f64 6976 3e0a 3c64 true) {
    . │ │ │ +0000a640: 3c61 2069 643d 226c 3030 3233 3222 206e 232 // │ │ │ +0000a6a0: 2043 686f 6f73 6520 7768 6174 2074 6f20 Choose what to │ │ │ +0000a6b0: 646f 2062 6173 6564 206f 6e20 6c61 6265 do based on labe │ │ │ +0000a6c0: 6c3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c l
    .< │ │ │ +0000a6d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0000a6e0: 3e3c 6120 6964 3d22 6c30 3032 3333 2220 > 233 if (f. │ │ │ +0000a750: 3c61 2063 6c61 7373 3d22 636f 6465 2068 label() > │ │ │ +0000a7b0: 3b20 672e 3c61 2063 6c61 7373 3d22 636f ; g.label() │ │ │ +0000a810: 2920 7b3c 2f64 6976 3e0a 3c64 6976 2063 ) {
    .
    234 │ │ │ +0000a870: 2020 2020 2020 3c73 7061 6e20 636c 6173 // f │ │ │ +0000a890: 2068 6967 6865 7220 7468 616e 2067 3c2f higher than g
    .
    < │ │ │ +0000a8e0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +0000a8f0: 6e6f 223e 2020 3233 353c 2f73 7061 6e3e no"> 235 │ │ │ +0000a900: 2020 2020 2020 2020 6c61 6265 6c5f 203d label_ = │ │ │ +0000a910: 2066 2e3c 6120 636c 6173 733d 2263 6f64 f.label(); │ │ │ +0000a970: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +0000a9c0: 2032 3336 3c2f 7370 616e 3e20 2020 2020 236 │ │ │ +0000a9d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 siz │ │ │ +0000a9f0: 655f 743c 2f73 7061 6e3e 2063 6f75 6e74 e_t count │ │ │ +0000aa00: 203d 2066 2e6e 7243 686f 6963 6573 2829 = f.nrChoices() │ │ │ +0000aa10: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ +0000aa60: 2020 3233 373c 2f73 7061 6e3e 2020 2020 237 │ │ │ +0000aa70: 2020 2020 6272 616e 6368 6573 5f2e 7265 branches_.re │ │ │ +0000aa80: 7365 7276 6528 636f 756e 7429 3b3c 2f64 serve(count);.
    23 │ │ │ +0000aae0: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ +0000aaf0: 3c73 7061 6e20 636c 6173 733d 226b 6579 for ( │ │ │ +0000ab30: 7369 7a65 5f74 3c2f 7370 616e 3e20 6920 size_t i │ │ │ +0000ab40: 3d20 303b 2069 2026 6c74 3b20 636f 756e = 0; i < coun │ │ │ +0000ab50: 743b 2069 2b2b 293c 2f64 6976 3e0a 3c64 t; i++)
    . │ │ │ +0000ab70: 3c61 2069 643d 226c 3030 3233 3922 206e 239 push │ │ │ +0000abc0: 5f62 6163 6b28 662e 3c61 2063 6c61 7373 _back(f.branche │ │ │ +0000ac20: 735f 3c2f 613e 5b69 5d2d 2667 743b 6170 s_[i]->ap │ │ │ +0000ac30: 706c 795f 665f 6f70 5f67 2867 2c20 6f70 ply_f_op_g(g, op │ │ │ +0000ac40: 2929 3b3c 2f64 6976 3e0a 3c64 6976 2063 ));
    .
    240 │ │ │ +0000aca0: 2020 2020 7d20 3c73 7061 6e20 636c 6173 } │ │ │ +0000acc0: 656c 7365 3c2f 7370 616e 3e20 3c73 7061 else if │ │ │ +0000acf0: 2867 2e3c 6120 636c 6173 733d 2263 6f64 (g.label() │ │ │ +0000ad50: 2667 743b 2066 2e3c 6120 636c 6173 733d > f.label()) {
    .< │ │ │ +0000add0: 6120 6964 3d22 6c30 3032 3431 2220 6e61 a id="l00241" na │ │ │ +0000ade0: 6d65 3d22 6c30 3032 3431 223e 3c2f 613e me="l00241"> │ │ │ +0000adf0: 3c73 7061 6e20 636c 6173 733d 226c 696e 241 / │ │ │ +0000ae30: 2f20 6620 6c6f 7765 7220 7468 616e 2067 / f lower than g │ │ │ +0000ae40: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    ..
    242 label_ │ │ │ +0000af40: 3d20 672e 3c61 2063 6c61 7373 3d22 636f = g.label() │ │ │ +0000afa0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ +0000aff0: 2020 3234 333c 2f73 7061 6e3e 2020 2020 243 │ │ │ +0000b000: 2020 2020 3c73 7061 6e20 636c 6173 733d si │ │ │ +0000b020: 7a65 5f74 3c2f 7370 616e 3e20 636f 756e ze_t coun │ │ │ +0000b030: 7420 3d20 672e 6e72 4368 6f69 6365 7328 t = g.nrChoices( │ │ │ +0000b040: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    244 │ │ │ +0000b0a0: 2020 2020 2062 7261 6e63 6865 735f 2e72 branches_.r │ │ │ +0000b0b0: 6573 6572 7665 2863 6f75 6e74 293b 3c2f eserve(count);.
    2 │ │ │ +0000b110: 3435 3c2f 7370 616e 3e20 2020 2020 2020 45 │ │ │ +0000b120: 203c 7370 616e 2063 6c61 7373 3d22 6b65 for (size_t i │ │ │ +0000b170: 203d 2030 3b20 6920 266c 743b 2063 6f75 = 0; i < cou │ │ │ +0000b180: 6e74 3b20 692b 2b29 3c2f 6469 763e 0a3c nt; i++)
    .< │ │ │ +0000b190: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0000b1a0: 3e3c 6120 6964 3d22 6c30 3032 3436 2220 > 246 pus │ │ │ +0000b1f0: 685f 6261 636b 2867 2e3c 6120 636c 6173 h_back(g.branch │ │ │ +0000b250: 6573 5f3c 2f61 3e5b 695d 2d26 6774 3b61 es_[i]->a │ │ │ +0000b260: 7070 6c79 5f67 5f6f 705f 6643 2866 2c20 pply_g_op_fC(f, │ │ │ +0000b270: 6f70 2929 3b3c 2f64 6976 3e0a 3c64 6976 op));
    .
    < │ │ │ +0000b2b0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +0000b2c0: 6e6f 223e 2020 3234 373c 2f73 7061 6e3e no"> 247 │ │ │ +0000b2d0: 2020 2020 2020 7d20 3c73 7061 6e20 636c } else {< │ │ │ +0000b300: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +0000b350: 3234 383c 2f73 7061 6e3e 2020 2020 2020 248 │ │ │ +0000b360: 2020 3c73 7061 6e20 636c 6173 733d 2263 // f sam │ │ │ +0000b380: 6520 6c65 7665 6c20 6173 2067 3c2f 7370 e level as g
    .
    249 │ │ │ +0000b3f0: 2020 2020 2020 6c61 6265 6c5f 203d 2066 label_ = f │ │ │ +0000b400: 2e3c 6120 636c 6173 733d 2263 6f64 6520 .label();.
    2 │ │ │ +0000b4b0: 3530 3c2f 7370 616e 3e20 2020 2020 2020 50 │ │ │ +0000b4c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_ │ │ │ +0000b4e0: 743c 2f73 7061 6e3e 2063 6f75 6e74 203d t count = │ │ │ +0000b4f0: 2066 2e6e 7243 686f 6963 6573 2829 3b3c f.nrChoices();< │ │ │ +0000b500: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +0000b550: 3235 313c 2f73 7061 6e3e 2020 2020 2020 251 │ │ │ +0000b560: 2020 6272 616e 6368 6573 5f2e 7265 7365 branches_.rese │ │ │ +0000b570: 7276 6528 636f 756e 7429 3b3c 2f64 6976 rve(count);
    .
    252< │ │ │ +0000b5d0: 2f73 7061 6e3e 2020 2020 2020 2020 3c73 /span> for (si │ │ │ +0000b620: 7a65 5f74 3c2f 7370 616e 3e20 6920 3d20 ze_t i = │ │ │ +0000b630: 303b 2069 2026 6c74 3b20 636f 756e 743b 0; i < count; │ │ │ +0000b640: 2069 2b2b 293c 2f64 6976 3e0a 3c64 6976 i++)
    .
    < │ │ │ +0000b680: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +0000b690: 6e6f 223e 2020 3235 333c 2f73 7061 6e3e no"> 253 │ │ │ +0000b6a0: 2020 2020 2020 2020 2020 7075 7368 5f62 push_b │ │ │ +0000b6b0: 6163 6b28 662e 3c61 2063 6c61 7373 3d22 ack(f.branches_ │ │ │ +0000b710: 3c2f 613e 5b69 5d2d 2667 743b 6170 706c [i]->appl │ │ │ +0000b720: 795f 665f 6f70 5f67 282a 672e 3c61 2063 y_f_op_g(*g.bra │ │ │ +0000b780: 6e63 6865 735f 3c2f 613e 5b69 5d2c 206f nches_[i], o │ │ │ +0000b790: 7029 293b 3c2f 6469 763e 0a3c 6469 7620 p));
    .
    254 │ │ │ +0000b7f0: 2020 2020 207d 3c2f 6469 763e 0a3c 6469 }
    .< │ │ │ +0000b810: 6120 6964 3d22 6c30 3032 3535 2220 6e61 a id="l00255" na │ │ │ +0000b820: 6d65 3d22 6c30 3032 3535 223e 3c2f 613e me="l00255"> │ │ │ +0000b830: 3c73 7061 6e20 636c 6173 733d 226c 696e 255 }
    .< │ │ │ +0000b870: 6120 6964 3d22 6c30 3032 3536 2220 6e61 a id="l00256" na │ │ │ +0000b880: 6d65 3d22 6c30 3032 3536 223e 3c2f 613e me="l00256"> │ │ │ +0000b890: 3c73 7061 6e20 636c 6173 733d 226c 696e 256
    .
    .< │ │ │ +0000b900: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0000b910: 3e3c 6120 6964 3d22 6c30 3032 3538 2220 > 25 │ │ │ +0000b990: 383c 2f61 3e3c 2f73 7061 6e3e 2020 2020 8 │ │ │ +0000b9a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const L& label │ │ │ +0000ba20: 3c2f 613e 2829 3c73 7061 6e20 636c 6173 () con │ │ │ +0000ba40: 7374 203c 2f73 7061 6e3e 7b3c 2f64 6976 st {
    .
    259< │ │ │ +0000baa0: 2f73 7061 6e3e 2020 2020 2020 3c73 7061 /span> return label_;
    .
    │ │ │ +0000bb70: 2032 3630 3c2f 613e 3c2f 7370 616e 3e20 260 │ │ │ +0000bb80: 2020 207d 3c2f 6469 763e 0a3c 2f64 6976 }
    .
    .
    261< │ │ │ +0000bbe0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ +0000bc00: 3c61 2069 643d 226c 3030 3236 3222 206e 262 │ │ │ +0000bc60: 7369 7a65 5f74 3c2f 7370 616e 3e20 6e72 size_t nr │ │ │ +0000bc70: 4368 6f69 6365 7328 293c 7370 616e 2063 Choices() │ │ │ +0000bc90: 636f 6e73 7420 3c2f 7370 616e 3e7b 3c2f const {.
    .
    263 return branches_. │ │ │ +0000bdc0: 7369 7a65 2829 3b3c 2f64 6976 3e0a 3c64 size();
    . │ │ │ +0000bde0: 3c61 2069 643d 226c 3030 3236 3422 206e 264 }
    . │ │ │ +0000be40: 3c61 2069 643d 226c 3030 3236 3522 206e 265
    .
    266 │ │ │ +0000bee0: 2020 3c73 7061 6e20 636c 6173 733d 226b const std::vector │ │ │ +0000bf10: 266c 743b 4e6f 6465 5074 7226 6774 3b26 <NodePtr>& │ │ │ +0000bf20: 616d 703b 2062 7261 6e63 6865 7328 293c amp; branches()< │ │ │ +0000bf30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +0000bf40: 6f72 6422 3e20 636f 6e73 7420 3c2f 7370 ord"> const {
    .
    267 │ │ │ +0000bfb0: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ +0000bfd0: 6574 7572 6e3c 2f73 7061 6e3e 2062 7261 eturn bra │ │ │ +0000bfe0: 6e63 6865 735f 3b3c 2f64 6976 3e0a 3c64 nches_;
    . │ │ │ +0000c000: 3c61 2069 643d 226c 3030 3236 3822 206e 268 }
    . │ │ │ +0000c060: 3c61 2069 643d 226c 3030 3236 3922 206e 269
    .
    . │ │ │ +0000c0f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ +0000c120: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 2 │ │ │ +0000c180: 3731 3c2f 613e 3c2f 7370 616e 3e20 2020 71 │ │ │ +0000c190: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void< │ │ │ +0000c1b0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> push_bac │ │ │ +0000c210: 6b3c 2f61 3e28 3c73 7061 6e20 636c 6173 k(cons │ │ │ +0000c230: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t NodePtr │ │ │ +0000c290: 3c2f 613e 2661 6d70 3b20 6e6f 6465 2920 & node) │ │ │ +0000c2a0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ +0000c2f0: 2020 3237 323c 2f73 7061 6e3e 2020 2020 272 │ │ │ +0000c300: 2020 3c73 7061 6e20 636c 6173 733d 2263 // allSa │ │ │ +0000c320: 6d65 5f20 6973 2072 6573 7472 6963 7465 me_ is restricte │ │ │ +0000c330: 6420 746f 206c 6561 6620 6e6f 6465 7320 d to leaf nodes │ │ │ +0000c340: 696e 2061 2064 6563 6973 696f 6e20 7472 in a decision tr │ │ │ +0000c350: 6565 3c2f 7370 616e 3e3c 2f64 6976 3e0a ee
    . │ │ │ +0000c360: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ +0000c410: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0000c420: 3e3c 6120 6964 3d22 6c30 3032 3734 2220 > 274 allSa │ │ │ +0000c470: 6d65 5f20 3d20 6e6f 6465 2d26 6774 3b73 me_ = node->s │ │ │ +0000c480: 616d 654c 6561 6628 2a62 7261 6e63 6865 ameLeaf(*branche │ │ │ +0000c490: 735f 2e62 6163 6b28 2929 3b3c 2f64 6976 s_.back());
    .
    275< │ │ │ +0000c4f0: 2f73 7061 6e3e 2020 2020 2020 7d3c 2f64 /span> }.
    27 │ │ │ +0000c550: 363c 2f73 7061 6e3e 2020 2020 2020 6272 6 br │ │ │ +0000c560: 616e 6368 6573 5f2e 7075 7368 5f62 6163 anches_.push_bac │ │ │ +0000c570: 6b28 6e6f 6465 293b 3c2f 6469 763e 0a3c k(node);
    .< │ │ │ +0000c580: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0000c590: 3e3c 6120 6964 3d22 6c30 3032 3737 2220 > 277 }
    .< │ │ │ +0000c5e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +0000c630: 3237 383c 2f73 7061 6e3e 203c 2f64 6976 278
    .
    .
    │ │ │ +0000c6d0: 3c61 2063 6c61 7373 3d22 6c69 6e65 2220 280 void < │ │ │ +0000c750: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ +0000c760: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ +0000c770: 2261 3032 3738 302e 6874 6d6c 2361 3437 "a02780.html#a47 │ │ │ +0000c780: 6366 3766 3361 6563 6538 6335 3365 6165 cf7f3aece8c53eae │ │ │ +0000c790: 6531 3039 3664 3665 3565 3062 3034 223e e1096d6e5e0b04"> │ │ │ +0000c7a0: 7072 696e 743c 2f61 3e28 3c73 7061 6e20 print( │ │ │ +0000c7c0: 636f 6e73 743c 2f73 7061 6e3e 2073 7464 const std │ │ │ +0000c7d0: 3a3a 7374 7269 6e67 2661 6d70 3b20 732c ::string& s, │ │ │ +0000c7e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const LabelFormatt │ │ │ +0000c810: 6572 2661 6d70 3b20 6c61 6265 6c46 6f72 er& labelFor │ │ │ +0000c820: 6d61 7474 6572 2c3c 2f64 6976 3e0a 3c64 matter,
    . │ │ │ +0000c840: 3c61 2069 643d 226c 3030 3238 3122 206e 281 │ │ │ +0000c890: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ValueFormatt │ │ │ +0000c8c0: 6572 2661 6d70 3b20 7661 6c75 6546 6f72 er& valueFor │ │ │ +0000c8d0: 6d61 7474 6572 293c 7370 616e 2063 6c61 matter) co │ │ │ +0000c8f0: 6e73 7420 6f76 6572 7269 6465 203c 2f73 nst override
    {
    .
    < │ │ │ +0000c940: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +0000c950: 6e6f 223e 2020 3238 323c 2f73 7061 6e3e no"> 282 │ │ │ +0000c960: 2020 2020 2020 7374 643a 3a63 6f75 7420 std::cout │ │ │ +0000c970: 266c 743b 266c 743b 2073 2026 6c74 3b26 << s <& │ │ │ +0000c980: 6c74 3b20 3c73 7061 6e20 636c 6173 733d lt; │ │ │ +0000c9a0: 2671 756f 743b 2043 686f 6963 6528 2671 " Choice(&q │ │ │ +0000c9b0: 756f 743b 3c2f 7370 616e 3e3b 3c2f 6469 uot;;.
    283 │ │ │ +0000ca10: 3c2f 7370 616e 3e20 2020 2020 2073 7464 std │ │ │ +0000ca20: 3a3a 636f 7574 2026 6c74 3b26 6c74 3b20 ::cout << │ │ │ +0000ca30: 6c61 6265 6c46 6f72 6d61 7474 6572 286c labelFormatter(l │ │ │ +0000ca40: 6162 656c 5f29 2026 6c74 3b26 6c74 3b20 abel_) << │ │ │ +0000ca50: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ +0000ca70: 743b 2920 2671 756f 743b 3c2f 7370 616e t;) " << std:: │ │ │ +0000ca90: 656e 646c 3b3c 2f64 6976 3e0a 3c64 6976 endl;
    .
    < │ │ │ +0000cad0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +0000cae0: 6e6f 223e 2020 3238 343c 2f73 7061 6e3e no"> 284 │ │ │ +0000caf0: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ +0000cb10: 666f 723c 2f73 7061 6e3e 2028 3c73 7061 for (size_t i = 0; i < │ │ │ +0000cb50: 3b20 6272 616e 6368 6573 5f2e 7369 7a65 ; branches_.size │ │ │ +0000cb60: 2829 3b20 692b 2b29 3c2f 6469 763e 0a3c (); i++)
    .< │ │ │ +0000cb70: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0000cb80: 3e3c 6120 6964 3d22 6c30 3032 3835 2220 > 285 branc │ │ │ +0000cbd0: 6865 735f 5b69 5d2d 2667 743b 3c61 2063 hes_[i]->pri │ │ │ +0000cc30: 6e74 3c2f 613e 2828 626f 6f73 743a 3a66 nt((boost::f │ │ │ +0000cc40: 6f72 6d61 7428 3c73 7061 6e20 636c 6173 ormat("%s %d&qu │ │ │ +0000cc70: 6f74 3b3c 2f73 7061 6e3e 2920 2520 7320 ot;) % s │ │ │ +0000cc80: 2520 6929 2e73 7472 2829 2c3c 2f64 6976 % i).str(),
    .
    286< │ │ │ +0000cce0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ +0000ccf0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0000cd00: 2020 6c61 6265 6c46 6f72 6d61 7474 6572 labelFormatter │ │ │ +0000cd10: 2c20 7661 6c75 6546 6f72 6d61 7474 6572 , valueFormatter │ │ │ +0000cd20: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    287 │ │ │ +0000cd80: 207d 3c2f 6469 763e 0a3c 2f64 6976 3e0a }
    .
    . │ │ │ +0000cd90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    .
    │ │ │ +0000cec0: 2032 3930 3c2f 613e 3c2f 7370 616e 3e20 290 │ │ │ +0000ced0: 2020 203c 7370 616e 2063 6c61 7373 3d22 voi │ │ │ +0000cef0: 643c 2f73 7061 6e3e 203c 6120 636c 6173 d dot(std::ostream&a │ │ │ +0000cf60: 6d70 3b20 6f73 2c20 3c73 7061 6e20 636c mp; os, co │ │ │ +0000cf80: 6e73 743c 2f73 7061 6e3e 204c 6162 656c nst Label │ │ │ +0000cf90: 466f 726d 6174 7465 7226 616d 703b 206c Formatter& l │ │ │ +0000cfa0: 6162 656c 466f 726d 6174 7465 722c 3c2f abelFormatter,.
    2 │ │ │ +0000d000: 3931 3c2f 7370 616e 3e20 2020 2020 2020 91 │ │ │ +0000d010: 2020 2020 2020 3c73 7061 6e20 636c 6173 cons │ │ │ +0000d030: 743c 2f73 7061 6e3e 2056 616c 7565 466f t ValueFo │ │ │ +0000d040: 726d 6174 7465 7226 616d 703b 2076 616c rmatter& val │ │ │ +0000d050: 7565 466f 726d 6174 7465 722c 3c2f 6469 ueFormatter,.
    292 │ │ │ +0000d0b0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ +0000d0c0: 2020 2020 3c73 7061 6e20 636c 6173 733d bo │ │ │ +0000d0e0: 6f6c 3c2f 7370 616e 3e20 7368 6f77 5a65 ol showZe │ │ │ +0000d0f0: 726f 293c 7370 616e 2063 6c61 7373 3d22 ro) const │ │ │ +0000d110: 6f76 6572 7269 6465 203c 2f73 7061 6e3e override │ │ │ +0000d120: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ +0000d170: 2020 3239 333c 2f73 7061 6e3e 2020 2020 293 │ │ │ +0000d180: 2020 6f73 2026 6c74 3b26 6c74 3b20 3c73 os << " │ │ │ +0000d1b0: 5c26 7175 6f74 3b26 7175 6f74 3b3c 2f73 \"" << th │ │ │ +0000d1d0: 6973 2d26 6774 3b69 6428 2920 266c 743b is->id() < │ │ │ +0000d1e0: 266c 743b 203c 7370 616e 2063 6c61 7373 < "\" [ │ │ │ +0000d210: 7368 6170 653d 6369 7263 6c65 2c20 6c61 shape=circle, la │ │ │ +0000d220: 6265 6c3d 5c26 7175 6f74 3b26 7175 6f74 bel=\"" │ │ │ +0000d230: 3b3c 2f73 7061 6e3e 2026 6c74 3b26 6c74 ; << │ │ │ +0000d240: 3b20 6c61 6265 6c5f 3c2f 6469 763e 0a3c ; label_
    .< │ │ │ +0000d250: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0000d260: 3e3c 6120 6964 3d22 6c30 3032 3934 2220 > 294 < │ │ │ +0000d2b0: 3b26 6c74 3b20 3c73 7061 6e20 636c 6173 ;< "\"] │ │ │ +0000d2e0: 5c6e 2671 756f 743b 3c2f 7370 616e 3e3b \n"; │ │ │ +0000d2f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +0000d340: 2032 3935 3c2f 7370 616e 3e20 2020 2020 295 │ │ │ +0000d350: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_ │ │ │ +0000d370: 743c 2f73 7061 6e3e 2042 203d 2062 7261 t B = bra │ │ │ +0000d380: 6e63 6865 735f 2e73 697a 6528 293b 3c2f nches_.size();.
    2 │ │ │ +0000d3e0: 3936 3c2f 7370 616e 3e20 2020 2020 203c 96 < │ │ │ +0000d3f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +0000d400: 6f72 6466 6c6f 7722 3e66 6f72 3c2f 7370 ordflow">for (s │ │ │ +0000d430: 697a 655f 743c 2f73 7061 6e3e 2069 203d ize_t i = │ │ │ +0000d440: 2030 3b20 6920 266c 743b 2042 3b20 692b 0; i < B; i+ │ │ │ +0000d450: 2b29 207b 3c2f 6469 763e 0a3c 6469 7620 +) {
    .
    │ │ │ +0000d4a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +0000d4d0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d │ │ │ +0000d530: 3239 373c 2f61 3e3c 2f73 7061 6e3e 2020 297 │ │ │ +0000d540: 2020 2020 2020 3c73 7061 6e20 636c 6173 cons │ │ │ +0000d560: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t NodePtr │ │ │ +0000d5c0: 3c2f 613e 2661 6d70 3b20 6272 616e 6368 & branch │ │ │ +0000d5d0: 203d 2062 7261 6e63 6865 735f 5b69 5d3b = branches_[i]; │ │ │ +0000d5e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +0000d630: 2032 3938 3c2f 7370 616e 3e20 3c2f 6469 298 .
    299 │ │ │ +0000d690: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ +0000d6a0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ +0000d6b0: 656e 7422 3e2f 2f20 4368 6563 6b20 6966 ent">// Check if │ │ │ +0000d6c0: 207a 6572 6f3c 2f73 7061 6e3e 3c2f 6469 zero.
    300 │ │ │ +0000d720: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ +0000d730: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +0000d740: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (!showZero) { │ │ │ +0000d760: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +0000d7b0: 2033 3031 3c2f 7370 616e 3e20 2020 2020 301 │ │ │ +0000d7c0: 2020 2020 203c 7370 616e 2063 6c61 7373 const │ │ │ +0000d7e0: 3c2f 7370 616e 3e20 4c65 6166 2a20 6c65 Leaf* le │ │ │ +0000d7f0: 6166 203d 203c 7370 616e 2063 6c61 7373 af = dynam │ │ │ +0000d810: 6963 5f63 6173 7426 6c74 3b3c 2f73 7061 ic_cast<const Leaf* │ │ │ +0000d860: 2667 743b 3c2f 7370 616e 3e28 6272 616e >(bran │ │ │ +0000d870: 6368 2e67 6574 2829 293b 3c2f 6469 763e ch.get());
    │ │ │ +0000d880: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +0000d8b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 302 < │ │ │ +0000d8e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +0000d8f0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (leaf &&a │ │ │ +0000d910: 6d70 3b20 7661 6c75 6546 6f72 6d61 7474 mp; valueFormatt │ │ │ +0000d920: 6572 286c 6561 662d 2667 743b 636f 6e73 er(leaf->cons │ │ │ +0000d930: 7461 6e74 2829 292e 636f 6d70 6172 6528 tant()).compare( │ │ │ +0000d940: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ +0000d960: 743b 3026 7175 6f74 3b3c 2f73 7061 6e3e t;0" │ │ │ +0000d970: 2929 203c 7370 616e 2063 6c61 7373 3d22 )) con │ │ │ +0000d990: 7469 6e75 653c 2f73 7061 6e3e 3b3c 2f64 tinue;.
    30 │ │ │ +0000d9f0: 333c 2f73 7061 6e3e 2020 2020 2020 2020 3 │ │ │ +0000da00: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ +0000da50: 2020 3330 343c 2f73 7061 6e3e 203c 2f64 304 .
    30 │ │ │ +0000dab0: 353c 2f73 7061 6e3e 2020 2020 2020 2020 5 │ │ │ +0000dac0: 6f73 2026 6c74 3b26 6c74 3b20 3c73 7061 os << "\& │ │ │ +0000daf0: 7175 6f74 3b26 7175 6f74 3b3c 2f73 7061 quot;" << this │ │ │ +0000db10: 2d26 6774 3b69 6428 2920 266c 743b 266c ->id() <&l │ │ │ +0000db20: 743b 203c 7370 616e 2063 6c61 7373 3d22 t; & │ │ │ +0000db40: 7175 6f74 3b5c 2671 756f 743b 202d 2667 quot;\" -&g │ │ │ +0000db50: 743b 205c 2671 756f 743b 2671 756f 743b t; \"" │ │ │ +0000db60: 3c2f 7370 616e 3e20 266c 743b 266c 743b << │ │ │ +0000db70: 2062 7261 6e63 682d 2667 743b 6964 2829 branch->id() │ │ │ +0000db80: 2026 6c74 3b26 6c74 3b20 3c73 7061 6e20 << "\&qu │ │ │ +0000dbb0: 6f74 3b26 7175 6f74 3b3c 2f73 7061 6e3e ot;" │ │ │ +0000dbc0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ +0000dc10: 2020 3330 363c 2f73 7061 6e3e 2020 2020 306 │ │ │ +0000dc20: 2020 2020 3c73 7061 6e20 636c 6173 733d if │ │ │ +0000dc40: 3c2f 7370 616e 3e20 2842 203d 3d20 3220 (B == 2 │ │ │ +0000dc50: 2661 6d70 3b26 616d 703b 2069 203d 3d20 && i == │ │ │ +0000dc60: 3029 206f 7320 266c 743b 266c 743b 203c 0) os << < │ │ │ +0000dc70: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ +0000dc80: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ +0000dc90: 3b20 5b73 7479 6c65 3d64 6173 6865 645d ; [style=dashed] │ │ │ +0000dca0: 2671 756f 743b 3c2f 7370 616e 3e3b 3c2f ";.
    3 │ │ │ +0000dd00: 3037 3c2f 7370 616e 3e20 2020 2020 2020 07 │ │ │ +0000dd10: 206f 7320 266c 743b 266c 743b 2073 7464 os << std │ │ │ +0000dd20: 3a3a 656e 646c 3b3c 2f64 6976 3e0a 3c64 ::endl;
    . │ │ │ +0000dd40: 3c61 2069 643d 226c 3030 3330 3822 206e 308 branch │ │ │ +0000dd90: 2d26 6774 3b64 6f74 286f 732c 206c 6162 ->dot(os, lab │ │ │ +0000dda0: 656c 466f 726d 6174 7465 722c 2076 616c elFormatter, val │ │ │ +0000ddb0: 7565 466f 726d 6174 7465 722c 2073 686f ueFormatter, sho │ │ │ +0000ddc0: 775a 6572 6f29 3b3c 2f64 6976 3e0a 3c64 wZero);
    . │ │ │ +0000dde0: 3c61 2069 643d 226c 3030 3330 3922 206e 309 }
    . │ │ │ +0000de30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ +0000de90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    .
    │ │ │ +0000dfc0: 2033 3133 3c2f 613e 3c2f 7370 616e 3e20 313 │ │ │ +0000dfd0: 2020 203c 7370 616e 2063 6c61 7373 3d22 boo │ │ │ +0000dff0: 6c3c 2f73 7061 6e3e 203c 6120 636c 6173 l sameLe │ │ │ +0000e050: 6166 3c2f 613e 283c 7370 616e 2063 6c61 af(con │ │ │ +0000e070: 7374 3c2f 7370 616e 3e20 3c61 2063 6c61 st Leaf& │ │ │ +0000e0b0: 616d 703b 2071 293c 7370 616e 2063 6c61 amp; q) co │ │ │ +0000e0d0: 6e73 7420 6f76 6572 7269 6465 203c 2f73 nst override {
    .
    .
    │ │ │ +0000e1c0: 2033 3134 3c2f 613e 3c2f 7370 616e 3e20 314 │ │ │ +0000e1d0: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ +0000e1f0: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn false; │ │ │ +0000e220: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +0000e270: 2033 3135 3c2f 7370 616e 3e20 2020 207d 315 } │ │ │ +0000e280: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +0000e2d0: 2033 3136 3c2f 7370 616e 3e20 3c2f 6469 316 .
    .
    318< │ │ │ +0000e3c0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> bool │ │ │ +0000e3f0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 sameLeaf(const │ │ │ +0000e470: 203c 6120 636c 6173 733d 2263 6f64 6520 No │ │ │ +0000e4a0: 6465 3c2f 613e 2661 6d70 3b20 7129 3c73 de& q) const overr │ │ │ +0000e4d0: 6964 6520 3c2f 7370 616e 3e7b 3c2f 6469 ide {.
    319 │ │ │ +0000e530: 3c2f 7370 616e 3e20 2020 2020 203c 7370 return (q.isLeaf() │ │ │ +0000e570: 2026 616d 703b 2661 6d70 3b20 712e 7361 && q.sa │ │ │ +0000e580: 6d65 4c65 6166 282a 3c73 7061 6e20 636c meLeaf(*th │ │ │ +0000e5a0: 6973 3c2f 7370 616e 3e29 293b 3c2f 6469 is));.
    320 │ │ │ +0000e600: 3c2f 7370 616e 3e20 2020 207d 3c2f 6469 }.
    .
    321 < │ │ │ +0000e670: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .
    < │ │ │ +0000e6f0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +0000e700: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 323 bool equals(< │ │ │ +0000e7e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +0000e7f0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const N │ │ │ +0000e830: 6f64 653c 2f61 3e26 616d 703b 2071 2c20 ode& q, │ │ │ +0000e840: 3c73 7061 6e20 636c 6173 733d 226b 6579 const CompareFunc&a │ │ │ +0000e870: 6d70 3b20 636f 6d70 6172 6529 3c73 7061 mp; compare) const overrid │ │ │ +0000e8a0: 6520 3c2f 7370 616e 3e7b 3c2f 6469 763e e {
    │ │ │ +0000e8b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +0000e8e0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 324 const Choic │ │ │ +0000e960: 653c 2f61 3e2a 206f 7468 6572 203d 203c e* other = < │ │ │ +0000e970: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +0000e980: 6f72 6422 3e64 796e 616d 6963 5f63 6173 ord">dynamic_cas │ │ │ +0000e990: 7426 6c74 3b3c 2f73 7061 6e3e 3c73 7061 t<const < │ │ │ +0000e9c0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ +0000e9d0: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ +0000e9e0: 3032 3738 302e 6874 6d6c 223e 4368 6f69 02780.html">Choi │ │ │ +0000e9f0: 6365 3c2f 613e 2a3c 7370 616e 2063 6c61 ce*> │ │ │ +0000ea10: 3b3c 2f73 7061 6e3e 2826 616d 703b 7129 ;(&q) │ │ │ +0000ea20: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ +0000ea70: 2020 3332 353c 2f73 7061 6e3e 2020 2020 325 │ │ │ +0000ea80: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!other) < │ │ │ +0000eab0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +0000eac0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ +0000ead0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> fal │ │ │ +0000eaf0: 7365 3c2f 7370 616e 3e3b 3c2f 6469 763e se;
    │ │ │ +0000eb00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +0000eb30: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 326 if ( │ │ │ +0000eb80: 7468 6973 2d26 6774 3b6c 6162 656c 5f20 this->label_ │ │ │ +0000eb90: 213d 206f 7468 6572 2d26 6774 3b3c 6120 != other->la │ │ │ +0000ebf0: 6265 6c5f 3c2f 613e 2920 3c73 7061 6e20 bel_) return false;
    .
    < │ │ │ +0000ec80: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +0000ec90: 6e6f 223e 2020 3332 373c 2f73 7061 6e3e no"> 327 │ │ │ +0000eca0: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ +0000ecc0: 6966 3c2f 7370 616e 3e20 2862 7261 6e63 if (branc │ │ │ +0000ecd0: 6865 735f 2e73 697a 6528 2920 213d 206f hes_.size() != o │ │ │ +0000ece0: 7468 6572 2d26 6774 3b3c 6120 636c 6173 ther->branch │ │ │ +0000ed40: 6573 5f3c 2f61 3e2e 7369 7a65 2829 2920 es_.size()) │ │ │ +0000ed50: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ +0000ed70: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fa │ │ │ +0000ed90: 6c73 653c 2f73 7061 6e3e 3b3c 2f64 6976 lse;
    .
    328< │ │ │ +0000edf0: 2f73 7061 6e3e 2020 2020 2020 3c73 7061 /span> // we don' │ │ │ +0000ee20: 7420 6361 7265 2061 626f 7574 2073 6861 t care about sha │ │ │ +0000ee30: 7265 6420 706f 696e 7465 7273 2062 6569 red pointers bei │ │ │ +0000ee40: 6e67 2065 7175 616c 2068 6572 653c 2f73 ng equal here
    .
    329 │ │ │ +0000eeb0: 2020 2020 203c 7370 616e 2063 6c61 7373 f │ │ │ +0000eed0: 6f72 3c2f 7370 616e 3e20 283c 7370 616e or (size_t i = 0; i < │ │ │ +0000ef10: 2062 7261 6e63 6865 735f 2e73 697a 6528 branches_.size( │ │ │ +0000ef20: 293b 2069 2b2b 293c 2f64 6976 3e0a 3c64 ); i++)
    . │ │ │ +0000ef40: 3c61 2069 643d 226c 3030 3333 3022 206e 330 if (! │ │ │ +0000efb0: 2862 7261 6e63 6865 735f 5b69 5d2d 2667 (branches_[i]-&g │ │ │ +0000efc0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;e │ │ │ +0000eff0: 7175 616c 733c 2f61 3e28 2a28 6f74 6865 quals(*(othe │ │ │ +0000f000: 722d 2667 743b 3c61 2063 6c61 7373 3d22 r->branches_ │ │ │ +0000f060: 3c2f 613e 5b69 5d29 2c20 636f 6d70 6172 [i]), compar │ │ │ +0000f070: 6529 2929 3c2f 6469 763e 0a3c 6469 7620 e)))
    .
    331 │ │ │ +0000f0d0: 2020 2020 2020 2020 203c 7370 616e 2063 return │ │ │ +0000f100: 203c 7370 616e 2063 6c61 7373 3d22 6b65 false;
    .
    332 │ │ │ +0000f180: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ +0000f1a0: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn true;< │ │ │ +0000f1d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +0000f220: 3333 333c 2f73 7061 6e3e 2020 2020 7d3c 333 }< │ │ │ +0000f230: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 6469 /div>.
    .< │ │ │ +0000f250: 6120 6964 3d22 6c30 3033 3334 2220 6e61 a id="l00334" na │ │ │ +0000f260: 6d65 3d22 6c30 3033 3334 223e 3c2f 613e me="l00334"> │ │ │ +0000f270: 3c73 7061 6e20 636c 6173 733d 226c 696e 334
    .
    .< │ │ │ +0000f2e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0000f2f0: 3e3c 6120 6964 3d22 6c30 3033 3336 2220 > 33 │ │ │ +0000f370: 363c 2f61 3e3c 2f73 7061 6e3e 2020 2020 6 │ │ │ +0000f380: 3c73 7061 6e20 636c 6173 733d 226b 6579 const Y& opera │ │ │ +0000f400: 746f 7228 293c 2f61 3e28 3c73 7061 6e20 tor()( │ │ │ +0000f420: 636f 6e73 743c 2f73 7061 6e3e 203c 6120 const Assignm │ │ │ +0000f460: 656e 7426 6c74 3b4c 2667 743b 3c2f 613e ent<L> │ │ │ +0000f470: 2661 6d70 3b20 7829 3c73 7061 6e20 636c & x) c │ │ │ +0000f490: 6f6e 7374 206f 7665 7272 6964 6520 3c2f onst override {
    .< │ │ │ +0000f4c0: 6120 6964 3d22 6c30 3033 3337 2220 6e61 a id="l00337" na │ │ │ +0000f4d0: 6d65 3d22 6c30 3033 3337 223e 3c2f 613e me="l00337"> │ │ │ +0000f4e0: 3c73 7061 6e20 636c 6173 733d 226c 696e 337#ifn │ │ │ +0000f520: 6465 6620 4e44 4542 5547 3c2f 7370 616e def NDEBUG
    .
    . │ │ │ +0000f590: 3c61 2069 643d 226c 3030 3333 3822 206e 338 │ │ │ +0000f610: 3c2f 613e 3c2f 7370 616e 3e20 2020 2020 │ │ │ +0000f620: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ +0000f640: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> Assignment< │ │ │ +0000f680: 3b4c 2667 743b 3a3a 636f 6e73 745f 6974 ;L>::const_it │ │ │ +0000f690: 6572 6174 6f72 3c2f 613e 2069 7420 3d20 erator it = │ │ │ +0000f6a0: 782e 6669 6e64 286c 6162 656c 5f29 3b3c x.find(label_);< │ │ │ +0000f6b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +0000f700: 3333 393c 2f73 7061 6e3e 2020 2020 2020 339 │ │ │ +0000f710: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (it == x.end │ │ │ +0000f740: 2829 2920 7b3c 2f64 6976 3e0a 3c64 6976 ()) {
    .
    < │ │ │ +0000f780: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +0000f790: 6e6f 223e 2020 3334 303c 2f73 7061 6e3e no"> 340 │ │ │ +0000f7a0: 2020 2020 2020 2020 7374 643a 3a63 6f75 std::cou │ │ │ +0000f7b0: 7420 266c 743b 266c 743b 203c 7370 616e t << "Try │ │ │ +0000f7e0: 696e 6720 746f 2066 696e 6420 7661 6c75 ing to find valu │ │ │ +0000f7f0: 6520 666f 7220 2671 756f 743b 3c2f 7370 e for " << lab │ │ │ +0000f810: 656c 5f20 266c 743b 266c 743b 2073 7464 el_ << std │ │ │ +0000f820: 3a3a 656e 646c 3b3c 2f64 6976 3e0a 3c64 ::endl;
    ..
    341 throw │ │ │ +0000f940: 7374 643a 3a69 6e76 616c 6964 5f61 7267 std::invalid_arg │ │ │ +0000f950: 756d 656e 7428 3c2f 6469 763e 0a3c 6469 ument(
    .< │ │ │ +0000f970: 6120 6964 3d22 6c30 3033 3432 2220 6e61 a id="l00342" na │ │ │ +0000f980: 6d65 3d22 6c30 3033 3432 223e 3c2f 613e me="l00342"> │ │ │ +0000f990: 3c73 7061 6e20 636c 6173 733d 226c 696e 342 "D │ │ │ +0000f9e0: 6563 6973 696f 6e54 7265 653a 3a6f 7065 ecisionTree::ope │ │ │ +0000f9f0: 7261 746f 7228 293a 2076 616c 7565 2075 rator(): value u │ │ │ +0000fa00: 6e64 6566 696e 6564 2066 6f72 2061 206c ndefined for a l │ │ │ +0000fa10: 6162 656c 2671 756f 743b 3c2f 7370 616e abel"
    );
    .
    343 │ │ │ +0000fa80: 2020 2020 7d3c 2f64 6976 3e0a 3c64 6976 }
    .
    < │ │ │ +0000fac0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +0000fad0: 6e6f 223e 2020 3334 343c 2f73 7061 6e3e no"> 344 │ │ │ +0000fae0: 3c73 7061 6e20 636c 6173 733d 2270 7265 #endi │ │ │ +0000fb00: 663c 2f73 7061 6e3e 3c2f 6469 763e 0a3c f
    .< │ │ │ +0000fb10: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0000fb20: 3e3c 6120 6964 3d22 6c30 3033 3435 2220 > 345 size_t │ │ │ +0000fb90: 2069 6e64 6578 203d 2078 2e61 7428 6c61 index = x.at(la │ │ │ +0000fba0: 6265 6c5f 293b 3c2f 6469 763e 0a3c 6469 bel_);
    .< │ │ │ +0000fbc0: 6120 6964 3d22 6c30 3033 3436 2220 6e61 a id="l00346" na │ │ │ +0000fbd0: 6d65 3d22 6c30 3033 3436 223e 3c2f 613e me="l00346"> │ │ │ +0000fbe0: 3c73 7061 6e20 636c 6173 733d 226c 696e 346 NodePtr child = branc │ │ │ +0000fc70: 6865 735f 5b69 6e64 6578 5d3b 3c2f 6469 hes_[index];.
    347 │ │ │ +0000fcd0: 3c2f 7370 616e 3e20 2020 2020 203c 7370 return (*child)(x) │ │ │ +0000fd10: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ +0000fd60: 2020 3334 383c 2f73 7061 6e3e 2020 2020 348 │ │ │ +0000fd70: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ +0000fdc0: 2020 3334 393c 2f73 7061 6e3e 203c 2f64 349 .
    .
    351 │ │ │ +0000feb0: 3c2f 7370 616e 3e20 2020 2043 686f 6963 Choic │ │ │ +0000fec0: 6528 3c73 7061 6e20 636c 6173 733d 226b e(const L& labe │ │ │ +0000fef0: 6c2c 203c 7370 616e 2063 6c61 7373 3d22 l, const Choice& │ │ │ +0000ff20: 3b20 662c 203c 7370 616e 2063 6c61 7373 ; f, const │ │ │ +0000ff40: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 Unary& op) :.
    352 │ │ │ +00010000: 3c2f 7370 616e 3e20 2020 2020 206c 6162 lab │ │ │ +00010010: 656c 5f28 6c61 6265 6c29 2c20 616c 6c53 el_(label), allS │ │ │ +00010020: 616d 655f 2874 7275 6529 207b 3c2f 6469 ame_(true) {.
    353 │ │ │ +00010080: 3c2f 7370 616e 3e20 2020 2020 2062 7261 bra │ │ │ +00010090: 6e63 6865 735f 2e72 6573 6572 7665 2866 nches_.reserve(f │ │ │ +000100a0: 2e62 7261 6e63 6865 735f 2e73 697a 6528 .branches_.size( │ │ │ +000100b0: 2929 3b20 203c 7370 616e 2063 6c61 7373 )); // re │ │ │ +000100d0: 7365 7276 6520 7370 6163 653c 2f73 7061 serve space
    .
    .< │ │ │ +00010130: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00010140: 3e3c 6120 6964 3d22 6c30 3033 3534 2220 > 35 │ │ │ +000101c0: 343c 2f61 3e3c 2f73 7061 6e3e 2020 2020 4 │ │ │ +000101d0: 2020 3c73 7061 6e20 636c 6173 733d 226b for< │ │ │ +000101f0: 2f73 7061 6e3e 2028 3c73 7061 6e20 636c /span> (co │ │ │ +00010210: 6e73 743c 2f73 7061 6e3e 203c 6120 636c nst NodeP │ │ │ +00010270: 7472 3c2f 613e 2661 6d70 3b20 6272 616e tr& bran │ │ │ +00010280: 6368 203a 2066 2e62 7261 6e63 6865 735f ch : f.branches_ │ │ │ +00010290: 2920 7b3c 2f64 6976 3e0a 3c64 6976 2063 ) {
    .
    355 │ │ │ +000102f0: 2020 2020 2020 7075 7368 5f62 6163 6b28 push_back( │ │ │ +00010300: 6272 616e 6368 2d26 6774 3b61 7070 6c79 branch->apply │ │ │ +00010310: 286f 7029 293b 3c2f 6469 763e 0a3c 6469 (op));
    .< │ │ │ +00010330: 6120 6964 3d22 6c30 3033 3536 2220 6e61 a id="l00356" na │ │ │ +00010340: 6d65 3d22 6c30 3033 3536 223e 3c2f 613e me="l00356"> │ │ │ +00010350: 3c73 7061 6e20 636c 6173 733d 226c 696e 356 }
    .< │ │ │ +00010380: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00010390: 3e3c 6120 6964 3d22 6c30 3033 3537 2220 > 357 }
    .< │ │ │ +000103e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +000103f0: 3e3c 6120 6964 3d22 6c30 3033 3538 2220 > 358
    .
    │ │ │ +00010480: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +000104b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d │ │ │ +00010510: 3336 393c 2f61 3e3c 2f73 7061 6e3e 2020 369 │ │ │ +00010520: 2020 3c61 2063 6c61 7373 3d22 636f 6465 Choice(const │ │ │ +000105a0: 204c 2661 6d70 3b20 6c61 6265 6c2c 203c L& label, < │ │ │ +000105b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +000105c0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const C │ │ │ +00010600: 686f 6963 653c 2f61 3e26 616d 703b 2066 hoice& f │ │ │ +00010610: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const UnaryAssign │ │ │ +00010640: 6d65 6e74 2661 6d70 3b20 6f70 2c3c 2f64 ment& op,.
    37 │ │ │ +000106a0: 303c 2f73 7061 6e3e 2020 2020 2020 2020 0 │ │ │ +000106b0: 2020 203c 7370 616e 2063 6c61 7373 3d22 const Assignment< │ │ │ +00010710: 4c26 6774 3b3c 2f61 3e26 616d 703b 2061 L>& a │ │ │ +00010720: 7373 6967 6e6d 656e 7429 3c2f 6469 763e ssignment)
    │ │ │ +00010730: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +00010760: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 371 : l │ │ │ +00010790: 6162 656c 5f28 6c61 6265 6c29 2c20 616c abel_(label), al │ │ │ +000107a0: 6c53 616d 655f 2874 7275 6529 207b 3c2f lSame_(true) {.
    3 │ │ │ +00010800: 3732 3c2f 7370 616e 3e20 2020 2020 2062 72 b │ │ │ +00010810: 7261 6e63 6865 735f 2e72 6573 6572 7665 ranches_.reserve │ │ │ +00010820: 2866 2e3c 6120 636c 6173 733d 2263 6f64 (f.branches_.size()); // reserve spa │ │ │ +000108b0: 6365 3c2f 7370 616e 3e3c 2f64 6976 3e0a ce
    . │ │ │ +000108c0: 3c64 6976 2063 6c61 7373 3d22 666f 6c64
    ..
    374 │ │ │ +00010a00: 2020 2020 203c 6120 636c 6173 733d 2263 Assignment<L │ │ │ +00010a40: 2667 743b 3c2f 613e 2061 7373 6967 6e6d > assignm │ │ │ +00010a50: 656e 745f 203d 2061 7373 6967 6e6d 656e ent_ = assignmen │ │ │ +00010a60: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    375 .
    3 │ │ │ +00010b10: 3736 3c2f 7370 616e 3e20 2020 2020 203c 76 < │ │ │ +00010b20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00010b30: 6f72 6466 6c6f 7722 3e66 6f72 3c2f 7370 ordflow">for (s │ │ │ +00010b60: 697a 655f 743c 2f73 7061 6e3e 2069 203d ize_t i = │ │ │ +00010b70: 2030 3b20 6920 266c 743b 2066 2e3c 6120 0; i < f.br │ │ │ +00010bd0: 616e 6368 6573 5f3c 2f61 3e2e 7369 7a65 anches_.size │ │ │ +00010be0: 2829 3b20 692b 2b29 207b 3c2f 6469 763e (); i++) {
    │ │ │ +00010bf0: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ +00010c80: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ +00010c90: 7265 663d 2261 3032 3739 362e 6874 6d6c ref="a02796.html │ │ │ +00010ca0: 2361 6364 6366 3732 3439 3966 3230 6437 #acdcf72499f20d7 │ │ │ +00010cb0: 3935 3835 6134 3332 3239 3834 3862 3138 9585a43229848b18 │ │ │ +00010cc0: 3433 223e 2020 3337 373c 2f61 3e3c 2f73 43"> 377 assi │ │ │ +00010ce0: 676e 6d65 6e74 5f5b 6c61 6265 6c5f 5d20 gnment_[label_] │ │ │ +00010cf0: 3d20 693b 2020 3c73 7061 6e20 636c 6173 = i; // S │ │ │ +00010d10: 6574 2061 7373 6967 6e6d 656e 7420 666f et assignment fo │ │ │ +00010d20: 7220 6c61 6265 6c20 746f 2069 3c2f 7370 r label to i
    .
    378 < │ │ │ +00010d90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00010de0: 3337 393c 2f73 7061 6e3e 2020 2020 2020 379 │ │ │ +00010df0: 2020 3c73 7061 6e20 636c 6173 733d 226b const NodePtr │ │ │ +00010e70: 2062 7261 6e63 6820 3d20 662e 3c61 2063 branch = f.bra │ │ │ +00010ed0: 6e63 6865 735f 3c2f 613e 5b69 5d3b 3c2f nches_[i];.
    3 │ │ │ +00010f30: 3830 3c2f 7370 616e 3e20 2020 2020 2020 80 │ │ │ +00010f40: 2070 7573 685f 6261 636b 2862 7261 6e63 push_back(branc │ │ │ +00010f50: 682d 2667 743b 6170 706c 7928 6f70 2c20 h->apply(op, │ │ │ +00010f60: 6173 7369 676e 6d65 6e74 5f29 293b 3c2f assignment_));..< │ │ │ +000111d0: 6120 6964 3d22 6c30 3033 3834 2220 6e61 a id="l00384" na │ │ │ +000111e0: 6d65 3d22 6c30 3033 3834 223e 3c2f 613e me="l00384"> │ │ │ +000111f0: 3c73 7061 6e20 636c 6173 733d 226c 696e 384 assignm │ │ │ +00011220: 656e 745f 2e65 7261 7365 2861 7373 6967 ent_.erase(assig │ │ │ +00011230: 6e6d 656e 745f 6974 293b 3c2f 6469 763e nment_it);
    │ │ │ +00011240: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +00011270: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 385 }.
    386 │ │ │ +000112f0: 3c2f 7370 616e 3e20 2020 207d 3c2f 6469 }.
    387 │ │ │ +00011350: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ +00011360: 6469 7620 636c 6173 733d 2266 6f6c 646f div class="foldo │ │ │ +00011370: 7065 6e22 2069 643d 2266 6f6c 646f 7065 pen" id="foldope │ │ │ +00011380: 6e30 3033 3839 2220 6461 7461 2d73 7461 n00389" data-sta │ │ │ +00011390: 7274 3d22 7b22 2064 6174 612d 656e 643d rt="{" data-end= │ │ │ +000113a0: 227d 223e 0a3c 6469 7620 636c 6173 733d "}">.
    389 NodePtr apply(const │ │ │ +00011520: 3c61 2063 6c61 7373 3d22 636f 6465 2068 │ │ │ +00011570: 556e 6172 793c 2f61 3e26 616d 703b 206f Unary& o │ │ │ +00011580: 7029 3c73 7061 6e20 636c 6173 733d 226b p) const o │ │ │ +000115a0: 7665 7272 6964 6520 3c2f 7370 616e 3e7b verride { │ │ │ +000115b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00011600: 2033 3930 3c2f 7370 616e 3e20 2020 2020 390 │ │ │ +00011610: 203c 7370 616e 2063 6c61 7373 3d22 6b65 auto r = boost::ma │ │ │ +00011640: 6b65 5f73 6861 7265 6426 6c74 3b43 686f ke_shared<Cho │ │ │ +00011650: 6963 6526 6774 3b28 6c61 6265 6c5f 2c20 ice>(label_, │ │ │ +00011660: 2a3c 7370 616e 2063 6c61 7373 3d22 6b65 *this, op);
    .< │ │ │ +00011690: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +000116a0: 3e3c 6120 6964 3d22 6c30 3033 3931 2220 > 391 return │ │ │ +00011710: 2055 6e69 7175 6528 7229 3b3c 2f64 6976 Unique(r);
    .
    392< │ │ │ +00011770: 2f73 7061 6e3e 2020 2020 7d3c 2f64 6976 /span> }
    .
    .
    393 .
    .
    395 Node │ │ │ +00011920: 5074 723c 2f61 3e20 3c61 2063 6c61 7373 Ptr apply(const UnaryAssig │ │ │ +000119b0: 6e6d 656e 7426 616d 703b 206f 702c 3c2f nment& op,.
    3 │ │ │ +00011a10: 3936 3c2f 7370 616e 3e20 2020 2020 2020 96 │ │ │ +00011a20: 2020 2020 2020 2020 2020 203c 7370 616e const Assign │ │ │ +00011a80: 6d65 6e74 266c 743b 4c26 6774 3b3c 2f61 ment<L>& assignmen │ │ │ +00011aa0: 7429 3c73 7061 6e20 636c 6173 733d 226b t) const o │ │ │ +00011ac0: 7665 7272 6964 6520 3c2f 7370 616e 3e7b verride { │ │ │ +00011ad0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00011b20: 2033 3937 3c2f 7370 616e 3e20 2020 2020 397 │ │ │ +00011b30: 203c 7370 616e 2063 6c61 7373 3d22 6b65 auto r = boost::ma │ │ │ +00011b60: 6b65 5f73 6861 7265 6426 6c74 3b43 686f ke_shared<Cho │ │ │ +00011b70: 6963 6526 6774 3b28 6c61 6265 6c5f 2c20 ice>(label_, │ │ │ +00011b80: 2a3c 7370 616e 2063 6c61 7373 3d22 6b65 *this, op, assignme │ │ │ +00011bb0: 6e74 293b 3c2f 6469 763e 0a3c 6469 7620 nt);
    .
    398 │ │ │ +00011c10: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ +00011c30: 6574 7572 6e3c 2f73 7061 6e3e 2055 6e69 eturn Uni │ │ │ +00011c40: 7175 6528 7229 3b3c 2f64 6976 3e0a 3c64 que(r);
    . │ │ │ +00011c60: 3c61 2069 643d 226c 3030 3339 3922 206e 399 }
    ..
    4 │ │ │ +00011d00: 3030 3c2f 7370 616e 3e20 3c2f 6469 763e 00
    │ │ │ +00011d10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +00011d40: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 401 / │ │ │ +00011d80: 2f20 4170 706c 7920 6269 6e61 7279 206f / Apply binary o │ │ │ +00011d90: 7065 7261 746f 7220 2671 756f 743b 6820 perator "h │ │ │ +00011da0: 3d20 6620 6f70 2067 2671 756f 743b 206f = f op g" o │ │ │ +00011db0: 6e20 4368 6f69 6365 206e 6f64 653c 2f73 n Choice node
    .
    402 │ │ │ +00011e20: 2020 203c 7370 616e 2063 6c61 7373 3d22 // Note │ │ │ +00011e40: 206f 7020 6973 206e 6f74 2061 7373 756d op is not assum │ │ │ +00011e50: 6564 2063 6f6d 6d75 7461 7469 7665 2073 ed commutative s │ │ │ +00011e60: 6f20 7765 206e 6565 6420 746f 206b 6565 o we need to kee │ │ │ +00011e70: 7020 7472 6163 6b20 6f66 206f 7264 6572 p track of order │ │ │ +00011e80: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ +00011ea0: 3c61 2069 643d 226c 3030 3430 3322 206e 403 // S │ │ │ +00011f00: 696d 706c 7920 6361 6c6c 7320 6170 706c imply calls appl │ │ │ +00011f10: 7920 6f6e 2061 7267 756d 656e 7420 746f y on argument to │ │ │ +00011f20: 2063 616c 6c20 636f 7272 6563 7420 7669 call correct vi │ │ │ +00011f30: 7274 7561 6c20 6d65 7468 6f64 3a3c 2f73 rtual method:
    .
    404 │ │ │ +00011fa0: 2020 203c 7370 616e 2063 6c61 7373 3d22 // fC.a │ │ │ +00011fc0: 7070 6c79 5f66 5f6f 705f 6728 674c 2920 pply_f_op_g(gL) │ │ │ +00011fd0: 2d26 6774 3b20 674c 2e61 7070 6c79 5f67 -> gL.apply_g │ │ │ +00011fe0: 5f6f 705f 6643 2866 4329 202d 2667 743b _op_fC(fC) -> │ │ │ +00011ff0: 2028 4c65 6166 293c 2f73 7061 6e3e 3c2f (Leaf).
    4 │ │ │ +00012050: 3035 3c2f 7370 616e 3e20 2020 203c 7370 05 // fC.apply_f │ │ │ +00012080: 5f6f 705f 6728 6743 2920 2d26 6774 3b20 _op_g(gC) -> │ │ │ +00012090: 6743 2e61 7070 6c79 5f67 5f6f 705f 6643 gC.apply_g_op_fC │ │ │ +000120a0: 2866 4329 202d 2667 743b 2028 6265 6c6f (fC) -> (belo │ │ │ +000120b0: 7729 3c2f 7370 616e 3e3c 2f64 6976 3e0a w)
    . │ │ │ +000120c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ +000120f0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 406 NodePtr< │ │ │ +00012170: 2f61 3e20 6170 706c 795f 665f 6f70 5f67 /a> apply_f_op_g │ │ │ +00012180: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (const Node& g │ │ │ +000121e0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const Binary& │ │ │ +00012210: 206f 7029 3c73 7061 6e20 636c 6173 733d op) const │ │ │ +00012230: 206f 7665 7272 6964 6520 3c2f 7370 616e override {
    .
    407 │ │ │ +000122a0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ +000122c0: 7572 6e3c 2f73 7061 6e3e 2067 2e61 7070 urn g.app │ │ │ +000122d0: 6c79 5f67 5f6f 705f 6643 282a 3c73 7061 ly_g_op_fC(*this, o │ │ │ +00012300: 7029 3b3c 2f64 6976 3e0a 3c64 6976 2063 p);
    .
    408 │ │ │ +00012360: 2020 7d3c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    409 < │ │ │ +000123c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00012410: 3431 303c 2f73 7061 6e3e 2020 2020 3c73 410 // If second │ │ │ +00012440: 2061 7267 756d 656e 7420 6f66 2062 696e argument of bin │ │ │ +00012450: 6172 7920 6f70 2069 7320 4c65 6166 206e ary op is Leaf n │ │ │ +00012460: 6f64 652c 2072 6563 7572 7365 206f 6e20 ode, recurse on │ │ │ +00012470: 6272 616e 6368 6573 3c2f 7370 616e 3e3c branches< │ │ │ +00012480: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +000124d0: 3431 313c 2f73 7061 6e3e 2020 2020 3c61 411 No │ │ │ +00012530: 6465 5074 723c 2f61 3e20 6170 706c 795f dePtr apply_ │ │ │ +00012540: 675f 6f70 5f66 4c28 3c73 7061 6e20 636c g_op_fL(co │ │ │ +00012560: 6e73 743c 2f73 7061 6e3e 204c 6561 6626 nst Leaf& │ │ │ +00012570: 616d 703b 2066 4c2c 203c 7370 616e 2063 amp; fL, c │ │ │ +00012590: 6f6e 7374 3c2f 7370 616e 3e20 4269 6e61 onst Bina │ │ │ +000125a0: 7279 2661 6d70 3b20 6f70 293c 7370 616e ry& op) const override │ │ │ +000125d0: 203c 2f73 7061 6e3e 7b3c 2f64 6976 3e0a {
    . │ │ │ +000125e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ +000126b0: 3c61 2069 643d 226c 3030 3431 3322 206e 413 for (auto& │ │ │ +00012740: 616d 703b 2661 6d70 3b20 6272 616e 6368 amp;& branch │ │ │ +00012750: 203a 2062 7261 6e63 6865 735f 293c 2f64 : branches_).
    41 │ │ │ +000127b0: 343c 2f73 7061 6e3e 2020 2020 2020 2020 4 │ │ │ +000127c0: 682d 2667 743b 7075 7368 5f62 6163 6b28 h->push_back( │ │ │ +000127d0: 664c 2e61 7070 6c79 5f66 5f6f 705f 6728 fL.apply_f_op_g( │ │ │ +000127e0: 2a62 7261 6e63 682c 206f 7029 293b 3c2f *branch, op));.
    4 │ │ │ +00012840: 3135 3c2f 7370 616e 3e20 2020 2020 203c 15 < │ │ │ +00012850: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00012860: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ +00012870: 2f73 7061 6e3e 2055 6e69 7175 6528 6829 /span> Unique(h) │ │ │ +00012880: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ +000128d0: 2020 3431 363c 2f73 7061 6e3e 2020 2020 416 │ │ │ +000128e0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ +00012930: 2020 3431 373c 2f73 7061 6e3e 203c 2f64 417 .
    41 │ │ │ +00012990: 383c 2f73 7061 6e3e 2020 2020 3c73 7061 8 // If second a │ │ │ +000129c0: 7267 756d 656e 7420 6f66 2062 696e 6172 rgument of binar │ │ │ +000129d0: 7920 6f70 2069 7320 4368 6f69 6365 2c20 y op is Choice, │ │ │ +000129e0: 6361 6c6c 2063 6f6e 7374 7275 6374 6f72 call constructor │ │ │ +000129f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ +00012a10: 3c61 2069 643d 226c 3030 3431 3922 206e 419 NodePtr apply_g_op_fC( │ │ │ +00012ac0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const Choice& f │ │ │ +00012af0: 432c 203c 7370 616e 2063 6c61 7373 3d22 C, const Binary& │ │ │ +00012b20: 3b20 6f70 293c 7370 616e 2063 6c61 7373 ; op) cons │ │ │ +00012b40: 7420 6f76 6572 7269 6465 203c 2f73 7061 t override {
    .
    420 │ │ │ +00012bb0: 2020 2020 3c73 7061 6e20 636c 6173 733d auto h = boost: │ │ │ +00012be0: 3a6d 616b 655f 7368 6172 6564 266c 743b :make_shared< │ │ │ +00012bf0: 4368 6f69 6365 2667 743b 2866 432c 202a Choice>(fC, * │ │ │ +00012c00: 3c73 7061 6e20 636c 6173 733d 226b 6579 this, op);
    . │ │ │ +00012c40: 3c61 2069 643d 226c 3030 3432 3122 206e 421 return │ │ │ +00012cb0: 556e 6971 7565 2868 293b 3c2f 6469 763e Unique(h);
    │ │ │ +00012cc0: 0a3c 6469 7620 636c 6173 733d 226c 696e . │ │ │ +00012d20: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ +00012d90: 6120 6964 3d22 6c30 3034 3234 2220 6e61 a id="l00424" na │ │ │ +00012da0: 6d65 3d22 6c30 3034 3234 223e 3c2f 613e me="l00424"> │ │ │ +00012db0: 3c73 7061 6e20 636c 6173 733d 226c 696e 424 // If │ │ │ +00012df0: 2073 6563 6f6e 6420 6172 6775 6d65 6e74 second argument │ │ │ +00012e00: 206f 6620 6269 6e61 7279 206f 7020 6973 of binary op is │ │ │ +00012e10: 204c 6561 663c 2f73 7061 6e3e 3c2f 6469 Leaf.
    425 │ │ │ +00012e70: 3c2f 7370 616e 3e20 2020 203c 7370 616e template │ │ │ +00012ea0: 266c 743b 3c73 7061 6e20 636c 6173 733d <typena │ │ │ +00012ec0: 6d65 3c2f 7370 616e 3e20 4f50 2667 743b me OP> │ │ │ +00012ed0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00012f20: 2034 3236 3c2f 7370 616e 3e20 2020 203c 426 < │ │ │ +00012f30: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ +00012f40: 5f74 7970 6564 6566 2220 6872 6566 3d22 _typedef" href=" │ │ │ +00012f50: 6130 3237 3936 2e68 746d 6c23 6133 3661 a02796.html#a36a │ │ │ +00012f60: 3938 6636 3162 3062 3764 6630 3432 3432 98f61b0b7df04242 │ │ │ +00012f70: 3762 3133 3262 3331 3364 3766 6422 3e4e 7b132b313d7fd">N │ │ │ +00012f80: 6f64 6550 7472 3c2f 613e 2061 7070 6c79 odePtr apply │ │ │ +00012f90: 5f66 435f 6f70 5f67 4c28 3c73 7061 6e20 _fC_op_gL( │ │ │ +00012fb0: 636f 6e73 743c 2f73 7061 6e3e 204c 6561 const Lea │ │ │ +00012fc0: 6626 616d 703b 2067 4c2c 204f 5020 6f70 f& gL, OP op │ │ │ +00012fd0: 293c 7370 616e 2063 6c61 7373 3d22 6b65 ) const {
    .< │ │ │ +00013010: 6120 6964 3d22 6c30 3034 3237 2220 6e61 a id="l00427" na │ │ │ +00013020: 6d65 3d22 6c30 3034 3237 223e 3c2f 613e me="l00427"> │ │ │ +00013030: 3c73 7061 6e20 636c 6173 733d 226c 696e 427 aut │ │ │ +00013070: 6f3c 2f73 7061 6e3e 2068 203d 2062 6f6f o h = boo │ │ │ +00013080: 7374 3a3a 6d61 6b65 5f73 6861 7265 6426 st::make_shared& │ │ │ +00013090: 6c74 3b43 686f 6963 6526 6774 3b28 6c61 lt;Choice>(la │ │ │ +000130a0: 6265 6c28 292c 206e 7243 686f 6963 6573 bel(), nrChoices │ │ │ +000130b0: 2829 293b 3c2f 6469 763e 0a3c 6469 7620 ());
    .
    428 │ │ │ +00013110: 2020 2020 203c 7370 616e 2063 6c61 7373 f │ │ │ +00013130: 6f72 3c2f 7370 616e 3e20 283c 7370 616e or (auto& │ │ │ +00013160: 3b26 616d 703b 2062 7261 6e63 6820 3a20 ;& branch : │ │ │ +00013170: 6272 616e 6368 6573 5f29 3c2f 6469 763e branches_)
    │ │ │ +00013180: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +000131b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 429 h-& │ │ │ +000131e0: 6774 3b70 7573 685f 6261 636b 2862 7261 gt;push_back(bra │ │ │ +000131f0: 6e63 682d 2667 743b 6170 706c 795f 665f nch->apply_f_ │ │ │ +00013200: 6f70 5f67 2867 4c2c 206f 7029 293b 3c2f op_g(gL, op));.
    4 │ │ │ +00013260: 3330 3c2f 7370 616e 3e20 2020 2020 203c 30 < │ │ │ +00013270: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00013280: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ +00013290: 2f73 7061 6e3e 2055 6e69 7175 6528 6829 /span> Unique(h) │ │ │ +000132a0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ +000132f0: 2020 3433 313c 2f73 7061 6e3e 2020 2020 431 │ │ │ +00013300: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ +00013350: 2020 3433 323c 2f73 7061 6e3e 203c 2f64 432 .
    ..
    │ │ │ +000135e0: 2034 3335 3c2f 7370 616e 3e20 2020 2020 435 │ │ │ +000135f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (label_ == │ │ │ +00013620: 6c61 6265 6c29 203c 7370 616e 2063 6c61 label) return b │ │ │ +00013650: 7261 6e63 6865 735f 5b69 6e64 6578 5d3b ranches_[index]; │ │ │ +00013660: 2020 3c73 7061 6e20 636c 6173 733d 2263 // choos │ │ │ +00013680: 6520 6272 616e 6368 3c2f 7370 616e 3e3c e branch< │ │ │ +00013690: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +000136e0: 3433 363c 2f73 7061 6e3e 203c 2f64 6976 436
    .
    437< │ │ │ +00013740: 2f73 7061 6e3e 2020 2020 2020 3c73 7061 /span> // second case │ │ │ +00013770: 2c20 6e6f 7420 6c61 6265 6c20 6f66 2069 , not label of i │ │ │ +00013780: 6e74 6572 6573 742c 206a 7573 7420 7265 nterest, just re │ │ │ +00013790: 6375 7273 653c 2f73 7061 6e3e 3c2f 6469 curse.
    438 │ │ │ +000137f0: 3c2f 7370 616e 3e20 2020 2020 203c 7370 auto r │ │ │ +00013820: 203d 2062 6f6f 7374 3a3a 6d61 6b65 5f73 = boost::make_s │ │ │ +00013830: 6861 7265 6426 6c74 3b43 686f 6963 6526 hared<Choice& │ │ │ +00013840: 6774 3b28 6c61 6265 6c5f 2c20 6272 616e gt;(label_, bran │ │ │ +00013850: 6368 6573 5f2e 7369 7a65 2829 293b 3c2f ches_.size());.
    4 │ │ │ +000138b0: 3339 3c2f 7370 616e 3e20 2020 2020 203c 39 < │ │ │ +000138c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +000138d0: 6f72 6466 6c6f 7722 3e66 6f72 3c2f 7370 ordflow">for (auto< │ │ │ +00013900: 2f73 7061 6e3e 2661 6d70 3b26 616d 703b /span>&& │ │ │ +00013910: 2062 7261 6e63 6820 3a20 6272 616e 6368 branch : branch │ │ │ +00013920: 6573 5f29 3c2f 6469 763e 0a3c 6469 7620 es_)
    .
    440 │ │ │ +00013980: 2020 2020 2020 2072 2d26 6774 3b70 7573 r->pus │ │ │ +00013990: 685f 6261 636b 2862 7261 6e63 682d 2667 h_back(branch-&g │ │ │ +000139a0: 743b 6368 6f6f 7365 286c 6162 656c 2c20 t;choose(label, │ │ │ +000139b0: 696e 6465 7829 293b 3c2f 6469 763e 0a3c index));
    .< │ │ │ +000139c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +000139d0: 3e3c 6120 6964 3d22 6c30 3034 3431 2220 > 441
    return │ │ │ +00013a40: 2055 6e69 7175 6528 7229 3b3c 2f64 6976 Unique(r);
    .
    442< │ │ │ +00013aa0: 2f73 7061 6e3e 2020 2020 7d3c 2f64 6976 /span> }
    .
    .
    443 .
    4 │ │ │ +00013b60: 3434 3c2f 7370 616e 3e20 2020 3c73 7061 44 private │ │ │ +00013b90: 3a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 :
    .
    │ │ │ +00013be0: 2020 3434 353c 2f73 7061 6e3e 2020 2020 445 │ │ │ +00013bf0: 3c73 7061 6e20 636c 6173 733d 226b 6579 using Base = DecisionT │ │ │ +00013c50: 7265 6526 6c74 3b4c 2c20 5926 6774 3b3a ree<L, Y>: │ │ │ +00013c60: 3a4e 6f64 653c 2f61 3e3b 3c2f 6469 763e :Node;
    │ │ │ +00013c70: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ +00013ce0: 6120 6964 3d22 6c30 3034 3438 2220 6e61 a id="l00448" na │ │ │ +00013cf0: 6d65 3d22 6c30 3034 3438 223e 3c2f 613e me="l00448"> │ │ │ +00013d00: 3c73 7061 6e20 636c 6173 733d 226c 696e 448 frien │ │ │ +00013d40: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d c │ │ │ +00013d60: 6c61 7373 203c 2f73 7061 6e3e 3c61 2063 lass boost │ │ │ +00013dc0: 3a3a 7365 7269 616c 697a 6174 696f 6e3a ::serialization: │ │ │ +00013dd0: 3a61 6363 6573 733c 2f61 3e3b 3c2f 6469 :access;.
    449 │ │ │ +00013e30: 3c2f 7370 616e 3e20 2020 203c 7370 616e template │ │ │ +00013e60: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <class │ │ │ +00013e80: 3c2f 7370 616e 3e20 4152 4348 4956 4526 ARCHIVE& │ │ │ +00013e90: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    450 │ │ │ +00013ef0: 2020 3c73 7061 6e20 636c 6173 733d 226b void │ │ │ +00013f10: 3c2f 7370 616e 3e20 7365 7269 616c 697a serializ │ │ │ +00013f20: 6528 4152 4348 4956 4526 616d 703b 2061 e(ARCHIVE& a │ │ │ +00013f30: 722c 203c 7370 616e 2063 6c61 7373 3d22 r, const │ │ │ +00013f70: 756e 7369 676e 6564 3c2f 7370 616e 3e20 unsigned │ │ │ +00013f80: 3c73 7061 6e20 636c 6173 733d 226b 6579 int /*ver │ │ │ +00013fc0: 7369 6f6e 2a2f 3c2f 7370 616e 3e29 207b sion*/) { │ │ │ +00013fd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00014020: 2034 3531 3c2f 7370 616e 3e20 2020 2020 451 │ │ │ +00014030: 2061 7220 2661 6d70 3b20 424f 4f53 545f ar & BOOST_ │ │ │ +00014040: 5345 5249 414c 495a 4154 494f 4e5f 4241 SERIALIZATION_BA │ │ │ +00014050: 5345 5f4f 424a 4543 545f 4e56 5028 4261 SE_OBJECT_NVP(Ba │ │ │ +00014060: 7365 293b 3c2f 6469 763e 0a3c 6469 7620 se);
    .
    452 │ │ │ +000140c0: 2020 2020 2061 7226 616d 703b 2042 4f4f ar& BOO │ │ │ +000140d0: 5354 5f53 4552 4941 4c49 5a41 5449 4f4e ST_SERIALIZATION │ │ │ +000140e0: 5f4e 5650 286c 6162 656c 5f29 3b3c 2f64 _NVP(label_);.
    45 │ │ │ +00014140: 333c 2f73 7061 6e3e 2020 2020 2020 6172 3 ar │ │ │ +00014150: 2661 6d70 3b20 424f 4f53 545f 5345 5249 & BOOST_SERI │ │ │ +00014160: 414c 495a 4154 494f 4e5f 4e56 5028 6272 ALIZATION_NVP(br │ │ │ +00014170: 616e 6368 6573 5f29 3b3c 2f64 6976 3e0a anches_);
    . │ │ │ +00014180: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    455 │ │ │ +00014260: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    456 │ │ │ +000142c0: 207d 3b20 203c 7370 616e 2063 6c61 7373 }; // Ch │ │ │ +000142e0: 6f69 6365 3c2f 7370 616e 3e3c 2f64 6976 oice
    .
    457< │ │ │ +00014340: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ +00014360: 3c61 2069 643d 226c 3030 3435 3822 206e 458 /***** │ │ │ +000143c0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000143d0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000143e0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000143f0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00014400: 2a2a 2a2a 2a2a 2a2f 3c2f 7370 616e 3e3c *******/< │ │ │ +00014410: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00014460: 3435 393c 2f73 7061 6e3e 2020 3c73 7061 459 // DecisionTre │ │ │ +00014490: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .< │ │ │ +000144a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +000144b0: 3e3c 6120 6964 3d22 6c30 3034 3630 2220 > 460 /**** │ │ │ +00014510: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00014520: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00014530: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00014540: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00014550: 2a2a 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e ********/ │ │ │ +00014560: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +000145b0: 2034 3631 3c2f 7370 616e 3e20 203c 7370 461 template<type │ │ │ +00014600: 6e61 6d65 3c2f 7370 616e 3e20 4c2c 203c name L, < │ │ │ +00014610: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00014620: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename Y>
    │ │ │ +00014640: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ +000146d0: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ +000146e0: 7265 663d 2261 3032 3739 362e 6874 6d6c ref="a02796.html │ │ │ +000146f0: 2361 6632 3930 6664 6232 3962 6232 3534 #af290fdb29bb254 │ │ │ +00014700: 6535 3162 6661 3239 3532 3038 3635 3562 e51bfa295208655b │ │ │ +00014710: 6366 223e 2020 3436 323c 2f61 3e3c 2f73 cf"> 462 DecisionT │ │ │ +00014780: 7265 6526 6c74 3b4c 2c20 5926 6774 3b3a ree<L, Y>: │ │ │ +00014790: 3a44 6563 6973 696f 6e54 7265 653c 2f61 :DecisionTree() {
    .
    < │ │ │ +000147e0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +000147f0: 6e6f 223e 2020 3436 333c 2f73 7061 6e3e no"> 463 │ │ │ +00014800: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ +00014810: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ +00014880: 6120 6964 3d22 6c30 3034 3635 2220 6e61 a id="l00465" na │ │ │ +00014890: 6d65 3d22 6c30 3034 3635 223e 3c2f 613e me="l00465"> │ │ │ +000148a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 465 templat │ │ │ +000148e0: 653c 2f73 7061 6e3e 266c 743b 3c73 7061 e<typename L, typen │ │ │ +00014930: 616d 653c 2f73 7061 6e3e 2059 2667 743b ame Y> │ │ │ +00014940: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00014990: 2034 3636 3c2f 7370 616e 3e20 203c 6120 466 De │ │ │ +000149f0: 6369 7369 6f6e 5472 6565 266c 743b 4c2c cisionTree<L, │ │ │ +00014a00: 2059 2667 743b 3a3a 4465 6369 7369 6f6e Y>::Decision │ │ │ +00014a10: 5472 6565 3c2f 613e 283c 7370 616e 2063 Tree(c │ │ │ +00014a30: 6f6e 7374 3c2f 7370 616e 3e20 4e6f 6465 onst Node │ │ │ +00014a40: 5074 7226 616d 703b 2072 6f6f 7429 203a Ptr& root) : │ │ │ +00014a50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00014aa0: 2034 3637 3c2f 7370 616e 3e20 2020 2072 467 r │ │ │ +00014ab0: 6f6f 745f 2872 6f6f 7429 207b 3c2f 6469 oot_(root) {.
    468 │ │ │ +00014b10: 3c2f 7370 616e 3e20 207d 3c2f 6469 763e }
    │ │ │ +00014b20: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ +00014b90: 6120 6964 3d22 6c30 3034 3730 2220 6e61 a id="l00470" na │ │ │ +00014ba0: 6d65 3d22 6c30 3034 3730 223e 3c2f 613e me="l00470"> │ │ │ +00014bb0: 3c73 7061 6e20 636c 6173 733d 226c 696e 470 /****** │ │ │ +00014bf0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00014c00: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00014c10: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00014c20: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00014c30: 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e 3c2f ******/.
    4 │ │ │ +00014c90: 3731 3c2f 7370 616e 3e20 203c 7370 616e 71 template │ │ │ +00014cc0: 266c 743b 3c73 7061 6e20 636c 6173 733d <typena │ │ │ +00014ce0: 6d65 3c2f 7370 616e 3e20 4c2c 203c 7370 me L, typename Y>
    .< │ │ │ +00014d20: 6469 7620 636c 6173 733d 2266 6f6c 646f div class="foldo │ │ │ +00014d30: 7065 6e22 2069 643d 2266 6f6c 646f 7065 pen" id="foldope │ │ │ +00014d40: 6e30 3034 3732 2220 6461 7461 2d73 7461 n00472" data-sta │ │ │ +00014d50: 7274 3d22 7b22 2064 6174 612d 656e 643d rt="{" data-end= │ │ │ +00014d60: 227d 223e 0a3c 6469 7620 636c 6173 733d "}">.
    472 DecisionTre │ │ │ +00014e60: 6526 6c74 3b4c 2c20 5926 6774 3b3a 3a44 e<L, Y>::D │ │ │ +00014e70: 6563 6973 696f 6e54 7265 653c 2f61 3e28 ecisionTree( │ │ │ +00014e80: 3c73 7061 6e20 636c 6173 733d 226b 6579 const Y& y) {< │ │ │ +00014eb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00014f00: 3437 333c 2f73 7061 6e3e 2020 2020 726f 473 ro │ │ │ +00014f10: 6f74 5f20 3d20 3c61 2063 6c61 7373 3d22 ot_ = NodePtr(new │ │ │ +00014fc0: 4c65 6166 3c2f 613e 2879 2929 3b3c 2f64 Leaf(y));.
    47 │ │ │ +00015020: 343c 2f73 7061 6e3e 2020 7d3c 2f64 6976 4 }
    .
    .
    475 .
    4 │ │ │ +000150e0: 3736 3c2f 7370 616e 3e3c 7370 616e 2063 76 │ │ │ +00015100: 202f 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a /************** │ │ │ +00015110: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00015120: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00015130: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00015140: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2f3c **************/< │ │ │ +00015150: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ +00015170: 6120 6964 3d22 6c30 3034 3737 2220 6e61 a id="l00477" na │ │ │ +00015180: 6d65 3d22 6c30 3034 3737 223e 3c2f 613e me="l00477"> │ │ │ +00015190: 3c73 7061 6e20 636c 6173 733d 226c 696e 477 templat │ │ │ +000151d0: 653c 2f73 7061 6e3e 2026 6c74 3b3c 7370 e <typename
    L, type │ │ │ +00015220: 6e61 6d65 3c2f 7370 616e 3e20 5926 6774 name Y> │ │ │ +00015230: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    . │ │ │ +00015290: 3c61 2069 643d 226c 3030 3437 3822 206e 478 │ │ │ +00015310: 3c2f 613e 3c2f 7370 616e 3e20 203c 6120 De │ │ │ +00015370: 6369 7369 6f6e 5472 6565 266c 743b 4c2c cisionTree<L, │ │ │ +00015380: 2059 2667 743b 3a3a 4465 6369 7369 6f6e Y>::Decision │ │ │ +00015390: 5472 6565 3c2f 613e 283c 7370 616e 2063 Tree(c │ │ │ +000153b0: 6f6e 7374 3c2f 7370 616e 3e20 4c26 616d onst L&am │ │ │ +000153c0: 703b 206c 6162 656c 2c20 3c73 7061 6e20 p; label, │ │ │ +000153e0: 636f 6e73 743c 2f73 7061 6e3e 2059 2661 const Y&a │ │ │ +000153f0: 6d70 3b20 7931 2c20 3c73 7061 6e20 636c mp; y1, co │ │ │ +00015410: 6e73 743c 2f73 7061 6e3e 2059 2661 6d70 nst Y& │ │ │ +00015420: 3b20 7932 2920 7b3c 2f64 6976 3e0a 3c64 ; y2) {
    . │ │ │ +00015440: 3c61 2069 643d 226c 3030 3437 3922 206e 479 auto │ │ │ +000154a0: 3c2f 7370 616e 3e20 6120 3d20 626f 6f73 a = boos │ │ │ +000154b0: 743a 3a6d 616b 655f 7368 6172 6564 266c t::make_shared&l │ │ │ +000154c0: 743b 4368 6f69 6365 2667 743b 286c 6162 t;Choice>(lab │ │ │ +000154d0: 656c 2c20 3229 3b3c 2f64 6976 3e0a 3c64 el, 2);
    . │ │ │ +000154f0: 3c61 2069 643d 226c 3030 3438 3022 206e 480 NodePtr l1(new Leaf(y1)) │ │ │ +000155f0: 2c20 6c32 283c 7370 616e 2063 6c61 7373 , l2(new Leaf(y2)) │ │ │ +00015650: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ +000156a0: 2020 3438 313c 2f73 7061 6e3e 2020 2020 481 │ │ │ +000156b0: 612d 2667 743b 7075 7368 5f62 6163 6b28 a->push_back( │ │ │ +000156c0: 6c31 293b 3c2f 6469 763e 0a3c 6469 7620 l1);
    .
    482 │ │ │ +00015720: 2020 2061 2d26 6774 3b70 7573 685f 6261 a->push_ba │ │ │ +00015730: 636b 286c 3229 3b3c 2f64 6976 3e0a 3c64 ck(l2);
    . │ │ │ +00015750: 3c61 2069 643d 226c 3030 3438 3322 206e 483 root_ = Ch │ │ │ +000157a0: 6f69 6365 3a3a 556e 6971 7565 2861 293b oice::Unique(a); │ │ │ +000157b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00015800: 2034 3834 3c2f 7370 616e 3e20 207d 3c2f 484 }.
    .
    < │ │ │ +00015850: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00015860: 6e6f 223e 2020 3438 353c 2f73 7061 6e3e no"> 485 │ │ │ +00015870: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ +000158c0: 2020 3438 363c 2f73 7061 6e3e 3c73 7061 486 /*********** │ │ │ +000158f0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00015900: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00015910: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00015920: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00015930: 2a2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a */
    . │ │ │ +00015940: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ +00015a60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +00015a90: 3c2f 613e 3c73 7061 6e20 636c 6173 733d │ │ │ +00015af0: 3438 383c 2f61 3e3c 2f73 7061 6e3e 2020 488 │ │ │ +00015b00: 3c61 2063 6c61 7373 3d22 636f 6465 2068 DecisionTree< │ │ │ +00015b60: 3b4c 2c20 5926 6774 3b3a 3a44 6563 6973 ;L, Y>::Decis │ │ │ +00015b70: 696f 6e54 7265 653c 2f61 3e28 3c73 7061 ionTree(const < │ │ │ +00015ba0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ +00015bb0: 5f74 7970 6564 6566 2220 6872 6566 3d22 _typedef" href=" │ │ │ +00015bc0: 6130 3237 3936 2e68 746d 6c23 6164 6364 a02796.html#adcd │ │ │ +00015bd0: 6438 3061 6231 6166 3431 3564 3231 3233 d80ab1af415d2123 │ │ │ +00015be0: 3937 6132 3636 3633 3230 6533 3522 3e4c 97a2666320e35">L │ │ │ +00015bf0: 6162 656c 433c 2f61 3e26 616d 703b 206c abelC& l │ │ │ +00015c00: 6162 656c 432c 203c 7370 616e 2063 6c61 abelC, con │ │ │ +00015c20: 7374 3c2f 7370 616e 3e20 5926 616d 703b st Y& │ │ │ +00015c30: 2079 312c 3c2f 6469 763e 0a3c 6469 7620 y1,
    .
    489 │ │ │ +00015c90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +00015ca0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +00015cb0: 2020 3c73 7061 6e20 636c 6173 733d 226b const Y& y2) │ │ │ +00015ce0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ +00015d30: 2020 3439 303c 2f73 7061 6e3e 2020 2020 490 │ │ │ +00015d40: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (labelC.seco │ │ │ +00015d70: 6e64 2021 3d20 3229 203c 7370 616e 2063 nd != 2) throw │ │ │ +00015da0: 7374 643a 3a69 6e76 616c 6964 5f61 7267 std::invalid_arg │ │ │ +00015db0: 756d 656e 7428 3c2f 6469 763e 0a3c 6469 ument(
    .< │ │ │ +00015dd0: 6120 6964 3d22 6c30 3034 3931 2220 6e61 a id="l00491" na │ │ │ +00015de0: 6d65 3d22 6c30 3034 3931 223e 3c2f 613e me="l00491"> │ │ │ +00015df0: 3c73 7061 6e20 636c 6173 733d 226c 696e 491 "Decis │ │ │ +00015e40: 696f 6e54 7265 653a 2062 696e 6172 7920 ionTree: binary │ │ │ +00015e50: 636f 6e73 7472 7563 746f 7220 6361 6c6c constructor call │ │ │ +00015e60: 6564 2077 6974 6820 6e6f 6e2d 6269 6e61 ed with non-bina │ │ │ +00015e70: 7279 206c 6162 656c 2671 756f 743b 3c2f ry label");
    . │ │ │ +00015ea0: 3c61 2069 643d 226c 3030 3439 3222 206e 492 auto │ │ │ +00015f00: 3c2f 7370 616e 3e20 6120 3d20 626f 6f73 a = boos │ │ │ +00015f10: 743a 3a6d 616b 655f 7368 6172 6564 266c t::make_shared&l │ │ │ +00015f20: 743b 4368 6f69 6365 2667 743b 286c 6162 t;Choice>(lab │ │ │ +00015f30: 656c 432e 6669 7273 742c 2032 293b 3c2f elC.first, 2);.
    4 │ │ │ +00015f90: 3933 3c2f 7370 616e 3e20 2020 203c 6120 93 Nod │ │ │ +00015ff0: 6550 7472 3c2f 613e 206c 3128 3c73 7061 ePtr l1(new Leaf(y1)), l2(new Leaf(y2));
    .< │ │ │ +000160c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +000160d0: 3e3c 6120 6964 3d22 6c30 3034 3934 2220 > 494 a->pus │ │ │ +00016120: 685f 6261 636b 286c 3129 3b3c 2f64 6976 h_back(l1);
    .
    495< │ │ │ +00016180: 2f73 7061 6e3e 2020 2020 612d 2667 743b /span> a-> │ │ │ +00016190: 7075 7368 5f62 6163 6b28 6c32 293b 3c2f push_back(l2);.
    4 │ │ │ +000161f0: 3936 3c2f 7370 616e 3e20 2020 2072 6f6f 96 roo │ │ │ +00016200: 745f 203d 2043 686f 6963 653a 3a55 6e69 t_ = Choice::Uni │ │ │ +00016210: 7175 6528 6129 3b3c 2f64 6976 3e0a 3c64 que(a);
    . │ │ │ +00016230: 3c61 2069 643d 226c 3030 3439 3722 206e 497 }
    ..
    498 │ │ │ +000162d0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ +000162e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +000162f0: 3e3c 6120 6964 3d22 6c30 3034 3939 2220 > 499 /**** │ │ │ +00016350: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00016360: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00016370: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00016380: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00016390: 2a2a 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e ********/ │ │ │ +000163a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +000163f0: 2035 3030 3c2f 7370 616e 3e20 203c 7370 500 template<type │ │ │ +00016440: 6e61 6d65 3c2f 7370 616e 3e20 4c2c 203c name L, < │ │ │ +00016450: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00016460: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename Y>
    │ │ │ +00016480: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ +00016510: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ +00016520: 7265 663d 2261 3032 3739 362e 6874 6d6c ref="a02796.html │ │ │ +00016530: 2361 6437 3534 6438 3639 3963 6232 3035 #ad754d8699cb205 │ │ │ +00016540: 3738 3866 3838 3966 3031 3237 3831 6264 788f889f012781bd │ │ │ +00016550: 6332 223e 2020 3530 313c 2f61 3e3c 2f73 c2"> 501 DecisionT │ │ │ +000165c0: 7265 6526 6c74 3b4c 2c20 5926 6774 3b3a ree<L, Y>: │ │ │ +000165d0: 3a44 6563 6973 696f 6e54 7265 653c 2f61 :DecisionTree(const std::vector │ │ │ +00016610: 266c 743b 4c61 6265 6c43 2667 743b 2661 <LabelC>&a │ │ │ +00016620: 6d70 3b20 6c61 6265 6c43 732c 3c2f 6469 mp; labelCs,.
    502 │ │ │ +00016680: 3c2f 7370 616e 3e20 2020 2020 203c 7370 const │ │ │ +000166b0: 7374 643a 3a76 6563 746f 7226 6c74 3b59 std::vector<Y │ │ │ +000166c0: 2667 743b 2661 6d70 3b20 7973 2920 7b3c >& ys) {< │ │ │ +000166d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00016720: 3530 333c 2f73 7061 6e3e 2020 2020 3c73 503 // call recu │ │ │ +00016750: 7273 6976 6520 4372 6561 7465 3c2f 7370 rsive Create
    .
    504 │ │ │ +000167c0: 2020 726f 6f74 5f20 3d20 6372 6561 7465 root_ = create │ │ │ +000167d0: 286c 6162 656c 4373 2e62 6567 696e 2829 (labelCs.begin() │ │ │ +000167e0: 2c20 6c61 6265 6c43 732e 656e 6428 292c , labelCs.end(), │ │ │ +000167f0: 2079 732e 6265 6769 6e28 292c 2079 732e ys.begin(), ys. │ │ │ +00016800: 656e 6428 2929 3b3c 2f64 6976 3e0a 3c64 end());
    . │ │ │ +00016820: 3c61 2069 643d 226c 3030 3530 3522 206e 505 }
    ..
    506 │ │ │ +000168c0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ +000168d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +000168e0: 3e3c 6120 6964 3d22 6c30 3035 3037 2220 > 507 /**** │ │ │ +00016940: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00016950: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00016960: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00016970: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00016980: 2a2a 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e ********/ │ │ │ +00016990: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +000169e0: 2035 3038 3c2f 7370 616e 3e20 203c 7370 508 template<type │ │ │ +00016a30: 6e61 6d65 3c2f 7370 616e 3e20 4c2c 203c name L, < │ │ │ +00016a40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00016a50: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename Y>
    │ │ │ +00016a70: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ +00016b00: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ +00016b10: 7265 663d 2261 3032 3739 362e 6874 6d6c ref="a02796.html │ │ │ +00016b20: 2361 3361 3961 3462 3432 3039 3831 3266 #a3a9a4b4209812f │ │ │ +00016b30: 3037 3163 3132 3235 6439 3534 3266 6134 071c1225d9542fa4 │ │ │ +00016b40: 3433 223e 2020 3530 393c 2f61 3e3c 2f73 43"> 509 DecisionT │ │ │ +00016bb0: 7265 6526 6c74 3b4c 2c20 5926 6774 3b3a ree<L, Y>: │ │ │ +00016bc0: 3a44 6563 6973 696f 6e54 7265 653c 2f61 :DecisionTree(const std::vector │ │ │ +00016c00: 266c 743b 4c61 6265 6c43 2667 743b 2661 <LabelC>&a │ │ │ +00016c10: 6d70 3b20 6c61 6265 6c43 732c 3c2f 6469 mp; labelCs,.
    510 │ │ │ +00016c70: 3c2f 7370 616e 3e20 2020 2020 203c 7370 const │ │ │ +00016ca0: 7374 643a 3a73 7472 696e 6726 616d 703b std::string& │ │ │ +00016cb0: 2074 6162 6c65 2920 7b3c 2f64 6976 3e0a table) {
    . │ │ │ +00016cc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ +00016cf0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 511 // │ │ │ +00016d30: 2043 6f6e 7665 7274 2073 7464 3a3a 7374 Convert std::st │ │ │ +00016d40: 7269 6e67 2074 6f20 7661 6c75 6573 206f ring to values o │ │ │ +00016d50: 6620 7479 7065 2059 3c2f 7370 616e 3e3c f type Y< │ │ │ +00016d60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00016db0: 3531 323c 2f73 7061 6e3e 2020 2020 7374 512 st │ │ │ +00016dc0: 643a 3a76 6563 746f 7226 6c74 3b59 2667 d::vector<Y&g │ │ │ +00016dd0: 743b 2079 733b 3c2f 6469 763e 0a3c 6469 t; ys;
    .< │ │ │ +00016df0: 6120 6964 3d22 6c30 3035 3133 2220 6e61 a id="l00513" na │ │ │ +00016e00: 6d65 3d22 6c30 3035 3133 223e 3c2f 613e me="l00513"> │ │ │ +00016e10: 3c73 7061 6e20 636c 6173 733d 226c 696e 513 std::istrin │ │ │ +00016e40: 6773 7472 6561 6d20 6973 7328 7461 626c gstream iss(tabl │ │ │ +00016e50: 6529 3b3c 2f64 6976 3e0a 3c64 6976 2063 e);
    .
    514 │ │ │ +00016eb0: 2020 636f 7079 2873 7464 3a3a 6973 7472 copy(std::istr │ │ │ +00016ec0: 6561 6d5f 6974 6572 6174 6f72 266c 743b eam_iterator< │ │ │ +00016ed0: 5926 6774 3b28 6973 7329 2c20 7374 643a Y>(iss), std: │ │ │ +00016ee0: 3a69 7374 7265 616d 5f69 7465 7261 746f :istream_iterato │ │ │ +00016ef0: 7226 6c74 3b59 2667 743b 2829 2c3c 2f64 r<Y>(),.
    51 │ │ │ +00016f50: 353c 2f73 7061 6e3e 2020 2020 2020 2020 5 │ │ │ +00016f60: 2062 6163 6b5f 696e 7365 7274 6572 2879 back_inserter(y │ │ │ +00016f70: 7329 293b 3c2f 6469 763e 0a3c 6469 7620 s));
    .
    516 │ │ │ +00016fd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00017020: 2035 3137 3c2f 7370 616e 3e20 2020 203c 517 < │ │ │ +00017030: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ +00017040: 656e 7422 3e2f 2f20 6e6f 7720 6361 6c6c ent">// now call │ │ │ +00017050: 2072 6563 7572 7369 7665 2043 7265 6174 recursive Creat │ │ │ +00017060: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .< │ │ │ +00017070: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00017080: 3e3c 6120 6964 3d22 6c30 3035 3138 2220 > 518
    root_ = c │ │ │ +000170d0: 7265 6174 6528 6c61 6265 6c43 732e 6265 reate(labelCs.be │ │ │ +000170e0: 6769 6e28 292c 206c 6162 656c 4373 2e65 gin(), labelCs.e │ │ │ +000170f0: 6e64 2829 2c20 7973 2e62 6567 696e 2829 nd(), ys.begin() │ │ │ +00017100: 2c20 7973 2e65 6e64 2829 293b 3c2f 6469 , ys.end());.
    519 │ │ │ +00017160: 3c2f 7370 616e 3e20 207d 3c2f 6469 763e }
    │ │ │ +00017170: 0a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 .
    .
    │ │ │ +000171c0: 2020 3532 303c 2f73 7061 6e3e 203c 2f64 520 .
    52 │ │ │ +00017220: 313c 2f73 7061 6e3e 3c73 7061 6e20 636c 1 │ │ │ +00017240: 2f2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a /*************** │ │ │ +00017250: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00017260: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00017270: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00017280: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2f 3c2f *************/
    .
    < │ │ │ +000172d0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +000172e0: 6e6f 223e 2020 3532 323c 2f73 7061 6e3e no"> 522 │ │ │ +000172f0: 2020 3c73 7061 6e20 636c 6173 733d 226b template │ │ │ +00017310: 3c2f 7370 616e 3e26 6c74 3b3c 7370 616e <typename │ │ │ +00017340: 204c 2c20 3c73 7061 6e20 636c 6173 733d L, typena │ │ │ +00017360: 6d65 3c2f 7370 616e 3e20 5926 6774 3b3c me Y>< │ │ │ +00017370: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ..
    524 │ │ │ +00017590: 2020 2020 4974 6572 6174 6f72 2062 6567 Iterator beg │ │ │ +000175a0: 696e 2c20 4974 6572 6174 6f72 2065 6e64 in, Iterator end │ │ │ +000175b0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const L& labe │ │ │ +000175e0: 6c29 207b 3c2f 6469 763e 0a3c 6469 7620 l) {
    .
    525 │ │ │ +00017640: 2020 2072 6f6f 745f 203d 2063 6f6d 706f root_ = compo │ │ │ +00017650: 7365 2862 6567 696e 2c20 656e 642c 206c se(begin, end, l │ │ │ +00017660: 6162 656c 293b 3c2f 6469 763e 0a3c 6469 abel);
    .< │ │ │ +00017680: 6120 6964 3d22 6c30 3035 3236 2220 6e61 a id="l00526" na │ │ │ +00017690: 6d65 3d22 6c30 3035 3236 223e 3c2f 613e me="l00526"> │ │ │ +000176a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 526 }
    .
    .
    527< │ │ │ +00017720: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ +00017740: 3c61 2069 643d 226c 3030 3532 3822 206e 528 /***** │ │ │ +000177a0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000177b0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000177c0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000177d0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000177e0: 2a2a 2a2a 2a2a 2a2f 3c2f 7370 616e 3e3c *******/< │ │ │ +000177f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00017840: 3532 393c 2f73 7061 6e3e 2020 3c73 7061 529 template<typen │ │ │ +00017890: 616d 653c 2f73 7061 6e3e 204c 2c20 3c73 ame L, typename Y>
    . │ │ │ +000178d0: 3c64 6976 2063 6c61 7373 3d22 666f 6c64
    .
    530 DecisionTr │ │ │ +00017a10: 6565 266c 743b 4c2c 2059 2667 743b 3a3a ee<L, Y>:: │ │ │ +00017a20: 4465 6369 7369 6f6e 5472 6565 3c2f 613e DecisionTree │ │ │ +00017a30: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (const L& label │ │ │ +00017a60: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ +00017ab0: 2020 3533 313c 2f73 7061 6e3e 2020 2020 531 │ │ │ +00017ac0: 2020 3c73 7061 6e20 636c 6173 733d 226b const DecisionTree& f0, const Decisi │ │ │ +00017b80: 6f6e 5472 6565 3c2f 613e 2661 6d70 3b20 onTree& │ │ │ +00017b90: 6631 2920 207b 3c2f 6469 763e 0a3c 6469 f1) {
    .< │ │ │ +00017bb0: 6120 6964 3d22 6c30 3035 3332 2220 6e61 a id="l00532" na │ │ │ +00017bc0: 6d65 3d22 6c30 3035 3332 223e 3c2f 613e me="l00532"> │ │ │ +00017bd0: 3c73 7061 6e20 636c 6173 733d 226c 696e 532 const │ │ │ +00017c10: 3c2f 7370 616e 3e20 7374 643a 3a76 6563 std::vec │ │ │ +00017c20: 746f 7226 6c74 3b44 6563 6973 696f 6e54 tor<DecisionT │ │ │ +00017c30: 7265 6526 6774 3b20 6675 6e63 7469 6f6e ree> function │ │ │ +00017c40: 737b 6630 2c20 6631 7d3b 3c2f 6469 763e s{f0, f1};
    │ │ │ +00017c50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +00017c80: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 533 root_ = │ │ │ +00017cb0: 2063 6f6d 706f 7365 2866 756e 6374 696f compose(functio │ │ │ +00017cc0: 6e73 2e62 6567 696e 2829 2c20 6675 6e63 ns.begin(), func │ │ │ +00017cd0: 7469 6f6e 732e 656e 6428 292c 206c 6162 tions.end(), lab │ │ │ +00017ce0: 656c 293b 3c2f 6469 763e 0a3c 6469 7620 el);
    .
    534 │ │ │ +00017d40: 207d 3c2f 6469 763e 0a3c 2f64 6976 3e0a }
    .
    . │ │ │ +00017d50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ +00017de0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00017df0: 6e6f 223e 2020 3533 363c 2f73 7061 6e3e no"> 536 │ │ │ +00017e00: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /******* │ │ │ +00017e20: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00017e30: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00017e40: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00017e50: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00017e60: 2a2a 2a2a 2a2f 3c2f 7370 616e 3e3c 2f64 *****/.
    53 │ │ │ +00017ec0: 373c 2f73 7061 6e3e 2020 3c73 7061 6e20 7 │ │ │ +00017ee0: 7465 6d70 6c61 7465 3c2f 7370 616e 3e20 template │ │ │ +00017ef0: 266c 743b 3c73 7061 6e20 636c 6173 733d <typena │ │ │ +00017f10: 6d65 3c2f 7370 616e 3e20 4c2c 203c 7370 me L, typename Y>
    .< │ │ │ +00017f50: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00017f60: 3e3c 6120 6964 3d22 6c30 3035 3338 2220 > 538 templ │ │ │ +00017fc0: 6174 653c 2f73 7061 6e3e 2026 6c74 3b3c ate << │ │ │ +00017fd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00017fe0: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename
    X, ty │ │ │ +00018010: 7065 6e61 6d65 3c2f 7370 616e 3e20 4675 pename Fu │ │ │ +00018020: 6e63 2667 743b 3c2f 6469 763e 0a3c 6469 nc>
    ...
    < │ │ │ +00018240: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00018250: 6e6f 223e 2020 3534 303c 2f73 7061 6e3e no"> 540 │ │ │ +00018260: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +00018270: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +00018280: 2020 2046 756e 6320 595f 6f66 5f58 2920 Func Y_of_X) │ │ │ +00018290: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ +000182e0: 2020 3534 313c 2f73 7061 6e3e 2020 2020 541 │ │ │ +000182f0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // Define │ │ │ +00018310: 6675 6e63 746f 7220 666f 7220 6964 656e functor for iden │ │ │ +00018320: 7469 7479 206d 6170 7069 6e67 206f 6620 tity mapping of │ │ │ +00018330: 6e6f 6465 206c 6162 656c 2e3c 2f73 7061 node label.
    .
    542 │ │ │ +000183a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 auto L_of_L = [](< │ │ │ +000183d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +000183e0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const L& label) │ │ │ +00018400: 7b20 3c73 7061 6e20 636c 6173 733d 226b { retu │ │ │ +00018420: 726e 3c2f 7370 616e 3e20 6c61 6265 6c3b rn label; │ │ │ +00018430: 207d 3b3c 2f64 6976 3e0a 3c64 6976 2063 };
    .
    543 │ │ │ +00018490: 2020 726f 6f74 5f20 3d20 636f 6e76 6572 root_ = conver │ │ │ +000184a0: 7446 726f 6d26 6c74 3b4c 2c20 5826 6774 tFrom<L, X> │ │ │ +000184b0: 3b28 6f74 6865 722e 3c61 2063 6c61 7373 ;(other.root_, L_of_L, Y_of │ │ │ +00018520: 5f58 293b 3c2f 6469 763e 0a3c 6469 7620 _X);
    .
    544 │ │ │ +00018580: 207d 3c2f 6469 763e 0a3c 2f64 6976 3e0a }
    .
    . │ │ │ +00018590: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ +00018620: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00018630: 6e6f 223e 2020 3534 363c 2f73 7061 6e3e no"> 546 │ │ │ +00018640: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /******* │ │ │ +00018660: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00018670: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00018680: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00018690: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000186a0: 2a2a 2a2a 2a2f 3c2f 7370 616e 3e3c 2f64 *****/.
    54 │ │ │ +00018700: 373c 2f73 7061 6e3e 2020 3c73 7061 6e20 7 │ │ │ +00018720: 7465 6d70 6c61 7465 3c2f 7370 616e 3e20 template │ │ │ +00018730: 266c 743b 3c73 7061 6e20 636c 6173 733d <typena │ │ │ +00018750: 6d65 3c2f 7370 616e 3e20 4c2c 203c 7370 me L, typename Y>
    .< │ │ │ +00018790: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +000187a0: 3e3c 6120 6964 3d22 6c30 3035 3438 2220 > 548 templ │ │ │ +00018800: 6174 653c 2f73 7061 6e3e 2026 6c74 3b3c ate << │ │ │ +00018810: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00018820: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename
    M, ty │ │ │ +00018850: 7065 6e61 6d65 3c2f 7370 616e 3e20 582c pename X, │ │ │ +00018860: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ +00018880: 2f73 7061 6e3e 2046 756e 6326 6774 3b3c /span> Func>< │ │ │ +00018890: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .
    < │ │ │ +00018910: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00018920: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 549 Deci │ │ │ +000189d0: 7369 6f6e 5472 6565 266c 743b 4c2c 2059 sionTree<L, Y │ │ │ +000189e0: 2667 743b 3a3a 4465 6369 7369 6f6e 5472 >::DecisionTr │ │ │ +000189f0: 6565 3c2f 613e 283c 7370 616e 2063 6c61 ee(con │ │ │ +00018a10: 7374 3c2f 7370 616e 3e20 3c61 2063 6c61 st DecisionTr │ │ │ +00018a50: 6565 266c 743b 4d2c 2058 2667 743b 3c2f ee<M, X>& other,.
    5 │ │ │ +00018ac0: 3530 3c2f 7370 616e 3e20 2020 2020 2020 50 │ │ │ +00018ad0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +00018ae0: 2020 2020 2020 2020 2020 2020 3c73 7061 const s │ │ │ +00018b10: 7464 3a3a 6d61 7026 6c74 3b4d 2c20 4c26 td::map<M, L& │ │ │ +00018b20: 6774 3b26 616d 703b 206d 6170 2c20 4675 gt;& map, Fu │ │ │ +00018b30: 6e63 2059 5f6f 665f 5829 207b 3c2f 6469 nc Y_of_X) {.
    551 │ │ │ +00018b90: 3c2f 7370 616e 3e20 2020 203c 7370 616e auto L_o │ │ │ +00018bc0: 665f 4d20 3d20 5b26 616d 703b 6d61 705d f_M = [&map] │ │ │ +00018bd0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (const M& label │ │ │ +00018c00: 2920 2d26 6774 3b20 4c20 7b20 3c73 7061 ) -> L { return map.at(label │ │ │ +00018c40: 293b 207d 3b3c 2f64 6976 3e0a 3c64 6976 ); };
    .
    < │ │ │ +00018c80: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00018c90: 6e6f 223e 2020 3535 323c 2f73 7061 6e3e no"> 552 │ │ │ +00018ca0: 2020 2020 726f 6f74 5f20 3d20 636f 6e76 root_ = conv │ │ │ +00018cb0: 6572 7446 726f 6d26 6c74 3b4d 2c20 5826 ertFrom<M, X& │ │ │ +00018cc0: 6774 3b28 6f74 6865 722e 3c61 2063 6c61 gt;(other.root_ │ │ │ +00018d20: 3c2f 613e 2c20 4c5f 6f66 5f4d 2c20 595f , L_of_M, Y_ │ │ │ +00018d30: 6f66 5f58 293b 3c2f 6469 763e 0a3c 6469 of_X);
    .< │ │ │ +00018d50: 6120 6964 3d22 6c30 3035 3533 2220 6e61 a id="l00553" na │ │ │ +00018d60: 6d65 3d22 6c30 3035 3533 223e 3c2f 613e me="l00553"> │ │ │ +00018d70: 3c73 7061 6e20 636c 6173 733d 226c 696e 553 }
    .
    .
    554< │ │ │ +00018df0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ +00018e10: 3c61 2069 643d 226c 3030 3535 3522 206e 555 /***** │ │ │ +00018e70: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00018e80: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00018e90: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00018ea0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00018eb0: 2a2a 2a2a 2a2a 2a2f 3c2f 7370 616e 3e3c *******/< │ │ │ +00018ec0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00018f10: 3535 363c 2f73 7061 6e3e 2020 3c73 7061 556 // Called by t │ │ │ +00018f40: 776f 2063 6f6e 7374 7275 6374 6f72 7320 wo constructors │ │ │ +00018f50: 6162 6f76 652e 3c2f 7370 616e 3e3c 2f64 above..
    55 │ │ │ +00018fb0: 373c 2f73 7061 6e3e 2020 3c73 7061 6e20 7 │ │ │ +00018fd0: 2f2f 2054 616b 6573 2061 206c 6162 656c // Takes a label │ │ │ +00018fe0: 2061 6e64 2061 2063 6f72 7265 7370 6f6e and a correspon │ │ │ +00018ff0: 6469 6e67 2072 616e 6765 206f 6620 6465 ding range of de │ │ │ +00019000: 6369 7369 6f6e 2074 7265 6573 2c20 616e cision trees, an │ │ │ +00019010: 6420 6372 6561 7465 7320 613c 2f73 7061 d creates a
    .
    558 < │ │ │ +00019080: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ +00019090: 656e 7422 3e2f 2f20 6e65 7720 6465 6369 ent">// new deci │ │ │ +000190a0: 7369 6f6e 2074 7265 652e 2048 6f77 6576 sion tree. Howev │ │ │ +000190b0: 6572 2c20 7468 6520 6f72 6465 7220 6f66 er, the order of │ │ │ +000190c0: 2074 6865 206c 6162 656c 7320 6e65 6564 the labels need │ │ │ +000190d0: 7320 746f 2062 6520 7265 7370 6563 7465 s to be respecte │ │ │ +000190e0: 642c 3c2f 7370 616e 3e3c 2f64 6976 3e0a d,
    . │ │ │ +000190f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ +00019120: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 559 // s │ │ │ +00019160: 6f20 7765 2063 616e 6e6f 7420 6a75 7374 o we cannot just │ │ │ +00019170: 2063 7265 6174 6520 6120 726f 6f74 2043 create a root C │ │ │ +00019180: 686f 6963 6520 6e6f 6465 206f 6e20 7468 hoice node on th │ │ │ +00019190: 6520 6c61 6265 6c3a 2069 6620 7468 6520 e label: if the │ │ │ +000191a0: 6c61 6265 6c20 6973 3c2f 7370 616e 3e3c label is< │ │ │ +000191b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00019200: 3536 303c 2f73 7061 6e3e 2020 3c73 7061 560 // not the hig │ │ │ +00019230: 6865 7374 206c 6162 656c 2c20 7765 206e hest label, we n │ │ │ +00019240: 6565 6420 6120 636f 6d70 6c69 6361 7465 eed a complicate │ │ │ +00019250: 642f 2065 7870 656e 7369 7665 2072 6563 d/ expensive rec │ │ │ +00019260: 7572 7369 7665 2063 616c 6c2e 3c2f 7370 ursive call.
    .
    561 │ │ │ +000192d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 template < │ │ │ +00019310: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ +00019320: 4c2c 203c 7370 616e 2063 6c61 7373 3d22 L, typenam │ │ │ +00019340: 653c 2f73 7061 6e3e 2059 2667 743b 3c2f e Y>.
    5 │ │ │ +000193a0: 3632 3c2f 7370 616e 3e20 203c 7370 616e 62 template │ │ │ +000193d0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ +000193f0: 616d 653c 2f73 7061 6e3e 2049 7465 7261 ame Itera │ │ │ +00019400: 746f 7226 6774 3b3c 2f64 6976 3e0a 3c64 tor>
    . │ │ │ +00019420: 3c61 2069 643d 226c 3030 3536 3322 206e 563 typena │ │ │ +00019480: 6d65 3c2f 7370 616e 3e20 3c61 2063 6c61 me Decisi │ │ │ +000194e0: 6f6e 5472 6565 266c 743b 4c2c 2059 2667 onTree<L, Y&g │ │ │ +000194f0: 743b 3a3a 4e6f 6465 5074 723c 2f61 3e20 t;::NodePtr │ │ │ +00019500: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Deci │ │ │ +00019530: 7369 6f6e 5472 6565 266c 743b 4c2c 2059 sionTree<L, Y │ │ │ +00019540: 2667 743b 3a3a 636f 6d70 6f73 653c 2f61 >::compose(
    .
    564 │ │ │ +000195b0: 2020 2049 7465 7261 746f 7220 6265 6769 Iterator begi │ │ │ +000195c0: 6e2c 2049 7465 7261 746f 7220 656e 642c n, Iterator end, │ │ │ +000195d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const L& label │ │ │ +00019600: 293c 7370 616e 2063 6c61 7373 3d22 6b65 ) const {
    .< │ │ │ +00019640: 6120 6964 3d22 6c30 3035 3635 2220 6e61 a id="l00565" na │ │ │ +00019650: 6d65 3d22 6c30 3035 3635 223e 3c2f 613e me="l00565"> │ │ │ +00019660: 3c73 7061 6e20 636c 6173 733d 226c 696e 565 // fi │ │ │ +000196a0: 6e64 2068 6967 6865 7374 206c 6162 656c nd highest label │ │ │ +000196b0: 2061 6d6f 6e67 2062 7261 6e63 6865 733c among branches< │ │ │ +000196c0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ +000196e0: 6120 6964 3d22 6c30 3035 3636 2220 6e61 a id="l00566" na │ │ │ +000196f0: 6d65 3d22 6c30 3035 3636 223e 3c2f 613e me="l00566"> │ │ │ +00019700: 3c73 7061 6e20 636c 6173 733d 226c 696e 566 boost::opti │ │ │ +00019730: 6f6e 616c 266c 743b 4c26 6774 3b20 6869 onal<L> hi │ │ │ +00019740: 6768 6573 744c 6162 656c 3b3c 2f64 6976 ghestLabel;
    .
    567< │ │ │ +000197a0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> size_t nrChoices = 0; │ │ │ +000197e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00019830: 2035 3638 3c2f 7370 616e 3e20 2020 203c 568 < │ │ │ +00019840: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00019850: 6f72 6466 6c6f 7722 3e66 6f72 3c2f 7370 ordflow">for (Iterator it │ │ │ +00019870: 203d 2062 6567 696e 3b20 6974 2021 3d20 = begin; it != │ │ │ +00019880: 656e 643b 2069 742b 2b29 207b 3c2f 6469 end; it++) {.
    569 │ │ │ +000198e0: 3c2f 7370 616e 3e20 2020 2020 203c 7370 if │ │ │ +00019910: 2028 6974 2d26 6774 3b72 6f6f 745f 2d26 (it->root_-& │ │ │ +00019920: 6774 3b69 734c 6561 6628 2929 3c2f 6469 gt;isLeaf()).
    570 │ │ │ +00019980: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ +00019990: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +000199a0: 6f72 6466 6c6f 7722 3e63 6f6e 7469 6e75 ordflow">continu │ │ │ +000199b0: 653c 2f73 7061 6e3e 3b3c 2f64 6976 3e0a e;
    . │ │ │ +000199c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    572 │ │ │ +00019aa0: 2020 2020 2020 2020 626f 6f73 743a 3a64 boost::d │ │ │ +00019ab0: 796e 616d 6963 5f70 6f69 6e74 6572 5f63 ynamic_pointer_c │ │ │ +00019ac0: 6173 7426 6c74 3b63 6f6e 7374 2043 686f ast<const Cho │ │ │ +00019ad0: 6963 6526 6774 3b28 6974 2d26 6774 3b72 ice>(it->r │ │ │ +00019ae0: 6f6f 745f 293b 3c2f 6469 763e 0a3c 6469 oot_);
    .< │ │ │ +00019b00: 6120 6964 3d22 6c30 3035 3733 2220 6e61 a id="l00573" na │ │ │ +00019b10: 6d65 3d22 6c30 3035 3733 223e 3c2f 613e me="l00573"> │ │ │ +00019b20: 3c73 7061 6e20 636c 6173 733d 226c 696e 573 if (!hig │ │ │ +00019b70: 6865 7374 4c61 6265 6c20 7c7c 2063 2d26 hestLabel || c-& │ │ │ +00019b80: 6774 3b6c 6162 656c 2829 2026 6774 3b20 gt;label() > │ │ │ +00019b90: 2a68 6967 6865 7374 4c61 6265 6c29 207b *highestLabel) { │ │ │ +00019ba0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00019bf0: 2035 3734 3c2f 7370 616e 3e20 2020 2020 574 │ │ │ +00019c00: 2020 2068 6967 6865 7374 4c61 6265 6c2e highestLabel. │ │ │ +00019c10: 7265 7365 7428 632d 2667 743b 6c61 6265 reset(c->labe │ │ │ +00019c20: 6c28 2929 3b3c 2f64 6976 3e0a 3c64 6976 l());
    .
    < │ │ │ +00019c60: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00019c70: 6e6f 223e 2020 3537 353c 2f73 7061 6e3e no"> 575 │ │ │ +00019c80: 2020 2020 2020 2020 6e72 4368 6f69 6365 nrChoice │ │ │ +00019c90: 7320 3d20 632d 2667 743b 6e72 4368 6f69 s = c->nrChoi │ │ │ +00019ca0: 6365 7328 293b 3c2f 6469 763e 0a3c 6469 ces();
    .< │ │ │ +00019cc0: 6120 6964 3d22 6c30 3035 3736 2220 6e61 a id="l00576" na │ │ │ +00019cd0: 6d65 3d22 6c30 3035 3736 223e 3c2f 613e me="l00576"> │ │ │ +00019ce0: 3c73 7061 6e20 636c 6173 733d 226c 696e 576 }
    .< │ │ │ +00019d10: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00019d20: 3e3c 6120 6964 3d22 6c30 3035 3737 2220 > 577 }
    .< │ │ │ +00019d70: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00019d80: 3e3c 6120 6964 3d22 6c30 3035 3738 2220 > 578
    .
    579 │ │ │ +00019e20: 2020 203c 7370 616e 2063 6c61 7373 3d22 // if l │ │ │ +00019e40: 6162 656c 2069 7320 616c 7265 6164 7920 abel is already │ │ │ +00019e50: 696e 2063 6f72 7265 6374 206f 7264 6572 in correct order │ │ │ +00019e60: 2c20 6a75 7374 2070 7574 2074 6f67 6574 , just put toget │ │ │ +00019e70: 6865 7220 6120 6368 6f69 6365 206f 6e20 her a choice on │ │ │ +00019e80: 6c61 6265 6c3c 2f73 7061 6e3e 3c2f 6469 label.
    580 │ │ │ +00019ee0: 3c2f 7370 616e 3e20 2020 203c 7370 616e if ( │ │ │ +00019f10: 216e 7243 686f 6963 6573 207c 7c20 2168 !nrChoices || !h │ │ │ +00019f20: 6967 6865 7374 4c61 6265 6c20 7c7c 206c ighestLabel || l │ │ │ +00019f30: 6162 656c 2026 6774 3b20 2a68 6967 6865 abel > *highe │ │ │ +00019f40: 7374 4c61 6265 6c29 207b 3c2f 6469 763e stLabel) {
    │ │ │ +00019f50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +00019f80: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 581 auto cho │ │ │ +00019fd0: 6963 654f 6e4c 6162 656c 203d 2062 6f6f iceOnLabel = boo │ │ │ +00019fe0: 7374 3a3a 6d61 6b65 5f73 6861 7265 6426 st::make_shared& │ │ │ +00019ff0: 6c74 3b43 686f 6963 6526 6774 3b28 6c61 lt;Choice>(la │ │ │ +0001a000: 6265 6c2c 2065 6e64 202d 2062 6567 696e bel, end - begin │ │ │ +0001a010: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    582 │ │ │ +0001a070: 2020 203c 7370 616e 2063 6c61 7373 3d22 for │ │ │ +0001a090: 3c2f 7370 616e 3e20 2849 7465 7261 746f (Iterato │ │ │ +0001a0a0: 7220 6974 203d 2062 6567 696e 3b20 6974 r it = begin; it │ │ │ +0001a0b0: 2021 3d20 656e 643b 2069 742b 2b29 3c2f != end; it++).
    5 │ │ │ +0001a110: 3833 3c2f 7370 616e 3e20 2020 2020 2020 83 │ │ │ +0001a120: 2063 686f 6963 654f 6e4c 6162 656c 2d26 choiceOnLabel-& │ │ │ +0001a130: 6774 3b70 7573 685f 6261 636b 2869 742d gt;push_back(it- │ │ │ +0001a140: 2667 743b 726f 6f74 5f29 3b3c 2f64 6976 >root_);
    .
    584< │ │ │ +0001a1a0: 2f73 7061 6e3e 2020 2020 2020 3c73 7061 /span> return Choice::Uniq │ │ │ +0001a1e0: 7565 2863 686f 6963 654f 6e4c 6162 656c ue(choiceOnLabel │ │ │ +0001a1f0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    585 │ │ │ +0001a250: 207d 203c 7370 616e 2063 6c61 7373 3d22 } els │ │ │ +0001a270: 653c 2f73 7061 6e3e 207b 3c2f 6469 763e e {
    │ │ │ +0001a280: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +0001a2b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 586 // Set up a new │ │ │ +0001a300: 2063 686f 6963 6520 6f6e 2074 6865 2068 choice on the h │ │ │ +0001a310: 6967 6865 7374 206c 6162 656c 3c2f 7370 ighest label
    .
    587 │ │ │ +0001a380: 2020 2020 3c73 7061 6e20 636c 6173 733d auto choiceOnHi │ │ │ +0001a3b0: 6768 6573 744c 6162 656c 203d 3c2f 6469 ghestLabel =.
    588 │ │ │ +0001a410: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ +0001a420: 2062 6f6f 7374 3a3a 6d61 6b65 5f73 6861 boost::make_sha │ │ │ +0001a430: 7265 6426 6c74 3b43 686f 6963 6526 6774 red<Choice> │ │ │ +0001a440: 3b28 2a68 6967 6865 7374 4c61 6265 6c2c ;(*highestLabel, │ │ │ +0001a450: 206e 7243 686f 6963 6573 293b 3c2f 6469 nrChoices);.
    589 │ │ │ +0001a4b0: 3c2f 7370 616e 3e20 2020 2020 203c 7370 // now, for a │ │ │ +0001a4e0: 6c6c 2070 6f73 7369 626c 6520 7661 6c75 ll possible valu │ │ │ +0001a4f0: 6573 206f 6620 6869 6768 6573 744c 6162 es of highestLab │ │ │ +0001a500: 656c 3c2f 7370 616e 3e3c 2f64 6976 3e0a el
    . │ │ │ +0001a510: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    591 │ │ │ +0001a640: 2020 2020 2020 3c73 7061 6e20 636c 6173 // m │ │ │ +0001a660: 616b 6520 6120 6e65 7720 7365 7420 6f66 ake a new set of │ │ │ +0001a670: 2066 756e 6374 696f 6e73 2066 6f72 2063 functions for c │ │ │ +0001a680: 6f6d 706f 7369 6e67 2062 7920 6974 6572 omposing by iter │ │ │ +0001a690: 6174 696e 6720 6f76 6572 2074 6865 2067 ating over the g │ │ │ +0001a6a0: 6976 656e 3c2f 7370 616e 3e3c 2f64 6976 iven
    .
    592< │ │ │ +0001a700: 2f73 7061 6e3e 2020 2020 2020 2020 3c73 /span> // functions │ │ │ +0001a730: 2c20 616e 6420 7365 6c65 6374 696e 6720 , and selecting │ │ │ +0001a740: 7468 6520 6170 7072 6f70 7269 6174 6520 the appropriate │ │ │ +0001a750: 6272 616e 6368 2e3c 2f73 7061 6e3e 3c2f branch..
    5 │ │ │ +0001a7b0: 3933 3c2f 7370 616e 3e20 2020 2020 2020 93 │ │ │ +0001a7c0: 2073 7464 3a3a 7665 6374 6f72 266c 743b std::vector< │ │ │ +0001a7d0: 4465 6369 7369 6f6e 5472 6565 2667 743b DecisionTree> │ │ │ +0001a7e0: 2066 756e 6374 696f 6e73 3b3c 2f64 6976 functions;
    .
    594< │ │ │ +0001a840: 2f73 7061 6e3e 2020 2020 2020 2020 3c73 /span> for (Iterator it │ │ │ +0001a880: 3d20 6265 6769 6e3b 2069 7420 213d 2065 = begin; it != e │ │ │ +0001a890: 6e64 3b20 6974 2b2b 2920 7b3c 2f64 6976 nd; it++) {
    .
    595< │ │ │ +0001a8f0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ +0001a900: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // by rest │ │ │ +0001a920: 7269 6374 696e 6720 7468 6520 696e 7075 ricting the inpu │ │ │ +0001a930: 7420 6675 6e63 7469 6f6e 7320 746f 2076 t functions to v │ │ │ +0001a940: 616c 7565 2069 2066 6f72 206c 6162 656c alue i for label │ │ │ +0001a950: 4265 6c6f 773c 2f73 7061 6e3e 3c2f 6469 Below.
    596 │ │ │ +0001a9b0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ +0001a9c0: 2044 6563 6973 696f 6e54 7265 6520 6368 DecisionTree ch │ │ │ +0001a9d0: 6f73 656e 203d 2069 742d 2667 743b 6368 osen = it->ch │ │ │ +0001a9e0: 6f6f 7365 282a 6869 6768 6573 744c 6162 oose(*highestLab │ │ │ +0001a9f0: 656c 2c20 696e 6465 7829 3b3c 2f64 6976 el, index);
    .
    597< │ │ │ +0001aa50: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ +0001aa60: 6675 6e63 7469 6f6e 732e 7075 7368 5f62 functions.push_b │ │ │ +0001aa70: 6163 6b28 6368 6f73 656e 293b 3c2f 6469 ack(chosen);.
    598 │ │ │ +0001aad0: 3c2f 7370 616e 3e20 2020 2020 2020 207d } │ │ │ +0001aae0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +0001ab30: 2035 3939 3c2f 7370 616e 3e20 2020 2020 599 │ │ │ +0001ab40: 2020 203c 7370 616e 2063 6c61 7373 3d22 // We t │ │ │ +0001ab60: 6865 6e20 7265 6375 7273 652c 2066 6f72 hen recurse, for │ │ │ +0001ab70: 2061 6c6c 2076 616c 7565 7320 6f66 2074 all values of t │ │ │ +0001ab80: 6865 2068 6967 6865 7374 206c 6162 656c he highest label │ │ │ +0001ab90: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ +0001abb0: 3c61 2069 643d 226c 3030 3630 3022 206e 600 NodePt │ │ │ +0001ac00: 7220 6669 203d 2063 6f6d 706f 7365 2866 r fi = compose(f │ │ │ +0001ac10: 756e 6374 696f 6e73 2e62 6567 696e 2829 unctions.begin() │ │ │ +0001ac20: 2c20 6675 6e63 7469 6f6e 732e 656e 6428 , functions.end( │ │ │ +0001ac30: 292c 206c 6162 656c 293b 3c2f 6469 763e ), label);
    │ │ │ +0001ac40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +0001ac70: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 601 cho │ │ │ +0001aca0: 6963 654f 6e48 6967 6865 7374 4c61 6265 iceOnHighestLabe │ │ │ +0001acb0: 6c2d 2667 743b 7075 7368 5f62 6163 6b28 l->push_back( │ │ │ +0001acc0: 6669 293b 3c2f 6469 763e 0a3c 6469 7620 fi);
    .
    602 │ │ │ +0001ad20: 2020 2020 207d 3c2f 6469 763e 0a3c 6469 }
    .< │ │ │ +0001ad40: 6120 6964 3d22 6c30 3036 3033 2220 6e61 a id="l00603" na │ │ │ +0001ad50: 6d65 3d22 6c30 3036 3033 223e 3c2f 613e me="l00603"> │ │ │ +0001ad60: 3c73 7061 6e20 636c 6173 733d 226c 696e 603 return C │ │ │ +0001adb0: 686f 6963 653a 3a55 6e69 7175 6528 6368 hoice::Unique(ch │ │ │ +0001adc0: 6f69 6365 4f6e 4869 6768 6573 744c 6162 oiceOnHighestLab │ │ │ +0001add0: 656c 293b 3c2f 6469 763e 0a3c 6469 7620 el);
    .
    604 │ │ │ +0001ae30: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    605 │ │ │ +0001ae90: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    606 .
    6 │ │ │ +0001af40: 3037 3c2f 7370 616e 3e3c 7370 616e 2063 07 │ │ │ +0001af60: 202f 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a /************** │ │ │ +0001af70: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +0001af80: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +0001af90: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +0001afa0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2f3c **************/< │ │ │ +0001afb0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ +0001afd0: 6120 6964 3d22 6c30 3036 3038 2220 6e61 a id="l00608" na │ │ │ +0001afe0: 6d65 3d22 6c30 3036 3038 223e 3c2f 613e me="l00608"> │ │ │ +0001aff0: 3c73 7061 6e20 636c 6173 733d 226c 696e 608 // &quo │ │ │ +0001b030: 743b 6372 6561 7465 2671 756f 743b 2069 t;create" i │ │ │ +0001b040: 7320 6120 6269 7420 6f66 2061 2063 6f6d s a bit of a com │ │ │ +0001b050: 706c 6963 6174 6564 2074 6869 6e67 2c20 plicated thing, │ │ │ +0001b060: 6275 7420 7665 7279 2075 7365 6675 6c2e but very useful. │ │ │ +0001b070: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ +0001b090: 3c61 2069 643d 226c 3030 3630 3922 206e 609 // It │ │ │ +0001b0f0: 7461 6b65 7320 6120 7261 6e67 6520 6f66 takes a range of │ │ │ +0001b100: 206c 6162 656c 7320 616e 6420 6120 636f labels and a co │ │ │ +0001b110: 7272 6573 706f 6e64 696e 6720 7261 6e67 rresponding rang │ │ │ +0001b120: 6520 6f66 2076 616c 7565 732c 3c2f 7370 e of values,
    .
    610 │ │ │ +0001b190: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // and cre │ │ │ +0001b1b0: 6174 6573 2061 2064 6563 6973 696f 6e20 ates a decision │ │ │ +0001b1c0: 7472 6565 2c20 6173 2066 6f6c 6c6f 7773 tree, as follows │ │ │ +0001b1d0: 3a3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c :
    .< │ │ │ +0001b1e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0001b1f0: 3e3c 6120 6964 3d22 6c30 3036 3131 2220 > 611 // - │ │ │ +0001b250: 6966 2074 6865 7265 2069 7320 6f6e 6c79 if there is only │ │ │ +0001b260: 206f 6e65 206c 6162 656c 2c20 6372 6561 one label, crea │ │ │ +0001b270: 7465 7320 6120 6368 6f69 6365 206e 6f64 tes a choice nod │ │ │ +0001b280: 6520 7769 7468 2076 616c 7565 7320 696e e with values in │ │ │ +0001b290: 206c 6561 7665 733c 2f73 7061 6e3e 3c2f leaves.
    6 │ │ │ +0001b2f0: 3132 3c2f 7370 616e 3e20 203c 7370 616e 12 // - otherwise, │ │ │ +0001b320: 2069 7420 6576 656e 6c79 2073 706c 6974 it evenly split │ │ │ +0001b330: 7320 7570 2074 6865 2072 616e 6765 206f s up the range o │ │ │ +0001b340: 6620 7661 6c75 6573 2061 6e64 2063 7265 f values and cre │ │ │ +0001b350: 6174 6573 2061 2074 7265 6520 666f 723c ates a tree for< │ │ │ +0001b360: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ +0001b380: 6120 6964 3d22 6c30 3036 3133 2220 6e61 a id="l00613" na │ │ │ +0001b390: 6d65 3d22 6c30 3036 3133 223e 3c2f 613e me="l00613"> │ │ │ +0001b3a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 613 // ea │ │ │ +0001b3e0: 6368 2073 7562 2d72 616e 6765 2c20 616e ch sub-range, an │ │ │ +0001b3f0: 6420 6173 7369 676e 7320 7468 6174 2074 d assigns that t │ │ │ +0001b400: 7265 6520 746f 2066 6972 7374 206c 6162 ree to first lab │ │ │ +0001b410: 656c 2623 3339 3b73 2063 686f 6963 6573 el's choices │ │ │ +0001b420: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ +0001b440: 3c61 2069 643d 226c 3030 3631 3422 206e 614 // Exa │ │ │ +0001b4a0: 6d70 6c65 3a3c 2f73 7061 6e3e 3c2f 6469 mple:.
    615 │ │ │ +0001b500: 3c2f 7370 616e 3e20 203c 7370 616e 2063 / │ │ │ +0001b520: 2f20 6372 6561 7465 285b 4220 415d 2c5b / create([B A],[ │ │ │ +0001b530: 3120 3220 3320 345d 2920 776f 756c 6420 1 2 3 4]) would │ │ │ +0001b540: 6361 6c6c 3c2f 7370 616e 3e3c 2f64 6976 call
    .
    616< │ │ │ +0001b5a0: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> // │ │ │ +0001b5c0: 2020 2063 7265 6174 6528 5b41 5d2c 5b31 create([A],[1 │ │ │ +0001b5d0: 2032 5d29 3c2f 7370 616e 3e3c 2f64 6976 2])
    .
    617< │ │ │ +0001b630: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> // │ │ │ +0001b650: 2020 2063 7265 6174 6528 5b41 5d2c 5b33 create([A],[3 │ │ │ +0001b660: 2034 5d29 3c2f 7370 616e 3e3c 2f64 6976 4])
    .
    618< │ │ │ +0001b6c0: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> // │ │ │ +0001b6e0: 2061 6e64 2070 726f 6475 6365 3c2f 7370 and produce
    .
    619 │ │ │ +0001b750: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // B=0
    .
    620 │ │ │ +0001b7d0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // A=0: 1 │ │ │ +0001b7f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ +0001b810: 3c61 2069 643d 226c 3030 3632 3122 206e 621 // A= │ │ │ +0001b870: 313a 2032 3c2f 7370 616e 3e3c 2f64 6976 1: 2
    .
    622< │ │ │ +0001b8d0: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> // │ │ │ +0001b8f0: 2042 3d31 3c2f 7370 616e 3e3c 2f64 6976 B=1
    .
    623< │ │ │ +0001b950: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> // │ │ │ +0001b970: 2020 413d 303a 2033 3c2f 7370 616e 3e3c A=0: 3< │ │ │ +0001b980: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +0001b9d0: 3632 343c 2f73 7061 6e3e 2020 3c73 7061 624 // A=1: 4
    .
    625 │ │ │ +0001ba60: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // Note, t │ │ │ +0001ba80: 6872 6f75 6768 2074 6865 206d 6167 6963 hrough the magic │ │ │ +0001ba90: 206f 6620 2671 756f 743b 636f 6d70 6f73 of "compos │ │ │ +0001baa0: 6526 7175 6f74 3b2c 2063 7265 6174 6528 e", create( │ │ │ +0001bab0: 5b41 2042 5d2c 5b31 2033 2032 2034 5d29 [A B],[1 3 2 4]) │ │ │ +0001bac0: 2077 696c 6c20 7072 6f64 7563 653c 2f73 will produce
    .
    626 │ │ │ +0001bb30: 203c 7370 616e 2063 6c61 7373 3d22 636f // exactl │ │ │ +0001bb50: 7920 7468 6520 7361 6d65 2074 7265 6520 y the same tree │ │ │ +0001bb60: 6173 2061 626f 7665 3a20 7468 6520 6869 as above: the hi │ │ │ +0001bb70: 6768 6573 7420 6c61 6265 6c20 6973 2061 ghest label is a │ │ │ +0001bb80: 6c77 6179 7320 7468 6520 726f 6f74 2e3c lways the root.< │ │ │ +0001bb90: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ +0001bbb0: 6120 6964 3d22 6c30 3036 3237 2220 6e61 a id="l00627" na │ │ │ +0001bbc0: 6d65 3d22 6c30 3036 3237 223e 3c2f 613e me="l00627"> │ │ │ +0001bbd0: 3c73 7061 6e20 636c 6173 733d 226c 696e 627 // Howe │ │ │ +0001bc10: 7665 722c 2069 7420 7769 6c6c 2062 6520 ver, it will be │ │ │ +0001bc20: 2a77 6179 2a20 6661 7374 6572 2069 6620 *way* faster if │ │ │ +0001bc30: 6c61 6265 6c73 2061 7265 2067 6976 656e labels are given │ │ │ +0001bc40: 2068 6967 6865 7374 2074 6f20 6c6f 7765 highest to lowe │ │ │ +0001bc50: 7374 2e3c 2f73 7061 6e3e 3c2f 6469 763e st.
    │ │ │ +0001bc60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +0001bc90: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 628 tem │ │ │ +0001bcd0: 706c 6174 653c 2f73 7061 6e3e 266c 743b plate< │ │ │ +0001bce0: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename L, t │ │ │ +0001bd20: 7970 656e 616d 653c 2f73 7061 6e3e 2059 ypename Y │ │ │ +0001bd30: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    629 │ │ │ +0001bd90: 203c 7370 616e 2063 6c61 7373 3d22 6b65 template< │ │ │ +0001bdb0: 2f73 7061 6e3e 266c 743b 3c73 7061 6e20 /span>< │ │ │ +0001bdd0: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ +0001bde0: 4974 2c20 3c73 7061 6e20 636c 6173 733d It, typena │ │ │ +0001be00: 6d65 3c2f 7370 616e 3e20 5661 6c75 6549 me ValueI │ │ │ +0001be10: 7426 6774 3b3c 2f64 6976 3e0a 3c64 6976 t>
    .
    ..
    631 │ │ │ +0001c070: 2020 2020 4974 2062 6567 696e 2c20 4974 It begin, It │ │ │ +0001c080: 2065 6e64 2c20 5661 6c75 6549 7420 6265 end, ValueIt be │ │ │ +0001c090: 6769 6e59 2c20 5661 6c75 6549 7420 656e ginY, ValueIt en │ │ │ +0001c0a0: 6459 293c 7370 616e 2063 6c61 7373 3d22 dY) const │ │ │ +0001c0c0: 3c2f 7370 616e 3e7b 3c2f 6469 763e 0a3c {
    .< │ │ │ +0001c0d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0001c0e0: 3e3c 6120 6964 3d22 6c30 3036 3332 2220 > 632 // │ │ │ +0001c140: 6765 7420 6372 7563 6961 6c20 636f 756e get crucial coun │ │ │ +0001c150: 7473 3c2f 7370 616e 3e3c 2f64 6976 3e0a ts
    . │ │ │ +0001c160: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ +0001c190: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 633 size_t │ │ │ +0001c1e0: 6e72 4368 6f69 6365 7320 3d20 6265 6769 nrChoices = begi │ │ │ +0001c1f0: 6e2d 2667 743b 7365 636f 6e64 3b3c 2f64 n->second;.
    63 │ │ │ +0001c250: 343c 2f73 7061 6e3e 2020 2020 3c73 7061 4 size_t size = endY │ │ │ +0001c290: 2d20 6265 6769 6e59 3b3c 2f64 6976 3e0a - beginY;
    . │ │ │ +0001c2a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ +0001c330: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +0001c340: 6e6f 223e 2020 3633 363c 2f73 7061 6e3e no"> 636 │ │ │ +0001c350: 2020 2020 3c73 7061 6e20 636c 6173 733d // Fin │ │ │ +0001c370: 6420 7468 6520 6e65 7874 206b 6579 2074 d the next key t │ │ │ +0001c380: 6f20 776f 726b 206f 6e3c 2f73 7061 6e3e o work on │ │ │ +0001c390: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +0001c3e0: 2036 3337 3c2f 7370 616e 3e20 2020 2049 637 I │ │ │ +0001c3f0: 7420 6c61 6265 6c43 203d 2062 6567 696e t labelC = begin │ │ │ +0001c400: 202b 2031 3b3c 2f64 6976 3e0a 3c64 6976 + 1;
    .
    < │ │ │ +0001c440: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +0001c450: 6e6f 223e 2020 3633 383c 2f73 7061 6e3e no"> 638 │ │ │ +0001c460: 2020 2020 3c73 7061 6e20 636c 6173 733d if │ │ │ +0001c480: 3c2f 7370 616e 3e20 286c 6162 656c 4320 (labelC │ │ │ +0001c490: 3d3d 2065 6e64 2920 7b3c 2f64 6976 3e0a == end) {
    . │ │ │ +0001c4a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ +0001c550: 6120 6964 3d22 6c30 3036 3430 2220 6e61 a id="l00640" na │ │ │ +0001c560: 6d65 3d22 6c30 3036 3430 223e 3c2f 613e me="l00640"> │ │ │ +0001c570: 3c73 7061 6e20 636c 6173 733d 226c 696e 640 // │ │ │ +0001c5b0: 4372 6561 7465 2061 2073 696d 706c 6520 Create a simple │ │ │ +0001c5c0: 6368 6f69 6365 206e 6f64 6520 7769 7468 choice node with │ │ │ +0001c5d0: 2076 616c 7565 7320 6173 206c 6561 7665 values as leave │ │ │ +0001c5e0: 732e 3c2f 7370 616e 3e3c 2f64 6976 3e0a s.
    . │ │ │ +0001c5f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    642 │ │ │ +0001c6e0: 2020 2020 2020 7374 643a 3a63 6f75 7420 std::cout │ │ │ +0001c6f0: 266c 743b 266c 743b 203c 7370 616e 2063 << "Tryin │ │ │ +0001c720: 6720 746f 2063 7265 6174 6520 4444 206f g to create DD o │ │ │ +0001c730: 6e20 2671 756f 743b 3c2f 7370 616e 3e20 n " │ │ │ +0001c740: 266c 743b 266c 743b 2062 6567 696e 2d26 << begin-& │ │ │ +0001c750: 6774 3b66 6972 7374 2026 6c74 3b26 6c74 gt;first << │ │ │ +0001c760: 3b20 7374 643a 3a65 6e64 6c3b 3c2f 6469 ; std::endl;.
    643 │ │ │ +0001c7c0: 3c2f 7370 616e 3e20 2020 2020 2020 2073 s │ │ │ +0001c7d0: 7464 3a3a 636f 7574 2026 6c74 3b26 6c74 td::cout << │ │ │ +0001c7e0: 3b20 626f 6f73 743a 3a66 6f72 6d61 7428 ; boost::format( │ │ │ +0001c7f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +0001c840: 2036 3434 3c2f 7370 616e 3e20 2020 2020 644 │ │ │ +0001c850: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0001c860: 2020 2020 3c73 7061 6e20 636c 6173 733d │ │ │ +0001c880: 2671 756f 743b 4465 6369 7369 6f6e 5472 "DecisionTr │ │ │ +0001c890: 6565 3a3a 6372 6561 7465 3a20 6578 7065 ee::create: expe │ │ │ +0001c8a0: 6374 6564 2025 6420 7661 6c75 6573 2062 cted %d values b │ │ │ +0001c8b0: 7574 2067 6f74 2025 6420 2671 756f 743b ut got %d " │ │ │ +0001c8c0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ +0001c8e0: 3c61 2069 643d 226c 3030 3634 3522 206e 645 │ │ │ +0001c930: 2020 2020 2020 2020 2020 203c 7370 616e "ins │ │ │ +0001c960: 7465 6164 2671 756f 743b 3c2f 7370 616e tead") %
    .
    646 │ │ │ +0001c9d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0001c9e0: 2020 2020 2020 2020 6e72 4368 6f69 6365 nrChoice │ │ │ +0001c9f0: 7320 2520 7369 7a65 3c2f 6469 763e 0a3c s % size
    .< │ │ │ +0001ca00: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0001ca10: 3e3c 6120 6964 3d22 6c30 3036 3437 2220 > 647 │ │ │ +0001ca60: 2020 2020 2026 6c74 3b26 6c74 3b20 7374 << st │ │ │ +0001ca70: 643a 3a65 6e64 6c3b 3c2f 6469 763e 0a3c d::endl;
    .< │ │ │ +0001ca80: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0001ca90: 3e3c 6120 6964 3d22 6c30 3036 3438 2220 > 648 throw std::invalid_a │ │ │ +0001cb10: 7267 756d 656e 7428 3c73 7061 6e20 636c rgument("Decisi │ │ │ +0001cb40: 6f6e 5472 6565 3a3a 6372 6561 7465 2069 onTree::create i │ │ │ +0001cb50: 6e76 616c 6964 2061 7267 756d 656e 7426 nvalid argument& │ │ │ +0001cb60: 7175 6f74 3b3c 2f73 7061 6e3e 293b 3c2f quot;);.
    6 │ │ │ +0001cbc0: 3439 3c2f 7370 616e 3e20 2020 2020 207d 49 } │ │ │ +0001cbd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +0001cc20: 2036 3530 3c2f 7370 616e 3e20 2020 2020 650 │ │ │ +0001cc30: 203c 7370 616e 2063 6c61 7373 3d22 6b65 auto choice = boos │ │ │ +0001cc60: 743a 3a6d 616b 655f 7368 6172 6564 266c t::make_shared&l │ │ │ +0001cc70: 743b 4368 6f69 6365 2667 743b 2862 6567 t;Choice>(beg │ │ │ +0001cc80: 696e 2d26 6774 3b66 6972 7374 2c20 656e in->first, en │ │ │ +0001cc90: 6459 202d 2062 6567 696e 5929 3b3c 2f64 dY - beginY);.
    65 │ │ │ +0001ccf0: 313c 2f73 7061 6e3e 2020 2020 2020 3c73 1 for (ValueIt y = │ │ │ +0001cd30: 6265 6769 6e59 3b20 7920 213d 2065 6e64 beginY; y != end │ │ │ +0001cd40: 593b 2079 2b2b 293c 2f64 6976 3e0a 3c64 Y; y++)
    . │ │ │ +0001cd60: 3c61 2069 643d 226c 3030 3635 3222 206e 652 choice │ │ │ +0001cdb0: 2d26 6774 3b70 7573 685f 6261 636b 283c ->push_back(< │ │ │ +0001cdc0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ +0001cdd0: 5f74 7970 6564 6566 2220 6872 6566 3d22 _typedef" href=" │ │ │ +0001cde0: 6130 3237 3936 2e68 746d 6c23 6133 3661 a02796.html#a36a │ │ │ +0001cdf0: 3938 6636 3162 3062 3764 6630 3432 3432 98f61b0b7df04242 │ │ │ +0001ce00: 3762 3133 3262 3331 3364 3766 6422 3e4e 7b132b313d7fd">N │ │ │ +0001ce10: 6f64 6550 7472 3c2f 613e 283c 7370 616e odePtr(new Leaf(*y)));
    .< │ │ │ +0001ce80: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0001ce90: 3e3c 6120 6964 3d22 6c30 3036 3533 2220 > 653 return │ │ │ +0001cf00: 2043 686f 6963 653a 3a55 6e69 7175 6528 Choice::Unique( │ │ │ +0001cf10: 6368 6f69 6365 293b 3c2f 6469 763e 0a3c choice);
    .< │ │ │ +0001cf20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0001cf30: 3e3c 6120 6964 3d22 6c30 3036 3534 2220 > 654 }
    .< │ │ │ +0001cf80: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0001cf90: 3e3c 6120 6964 3d22 6c30 3036 3535 2220 > 655
    .
    656 │ │ │ +0001d030: 2020 203c 7370 616e 2063 6c61 7373 3d22 // Recu │ │ │ +0001d050: 7273 6976 6520 6361 7365 3a20 7065 7266 rsive case: perf │ │ │ +0001d060: 6f72 6d20 2671 756f 743b 5368 616e 6e6f orm "Shanno │ │ │ +0001d070: 6e20 6578 7061 6e73 696f 6e26 7175 6f74 n expansion" │ │ │ +0001d080: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .< │ │ │ +0001d090: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0001d0a0: 3e3c 6120 6964 3d22 6c30 3036 3537 2220 > 657 // │ │ │ +0001d100: 4372 6561 7465 7320 6f6e 6520 7472 6565 Creates one tree │ │ │ +0001d110: 2028 692e 652e 2c66 756e 6374 696f 6e29 (i.e.,function) │ │ │ +0001d120: 2066 6f72 2065 6163 6820 6368 6f69 6365 for each choice │ │ │ +0001d130: 206f 6620 6375 7272 656e 7420 6b65 793c of current key< │ │ │ +0001d140: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ +0001d160: 6120 6964 3d22 6c30 3036 3538 2220 6e61 a id="l00658" na │ │ │ +0001d170: 6d65 3d22 6c30 3036 3538 223e 3c2f 613e me="l00658"> │ │ │ +0001d180: 3c73 7061 6e20 636c 6173 733d 226c 696e 658 // by │ │ │ +0001d1c0: 2063 616c 6c69 6e67 2063 7265 6174 6520 calling create │ │ │ +0001d1d0: 7265 6375 7273 6976 656c 792c 2061 6e64 recursively, and │ │ │ +0001d1e0: 2074 6865 6e20 7075 7473 2074 6865 6d20 then puts them │ │ │ +0001d1f0: 616c 6c20 746f 6765 7468 6572 2e3c 2f73 all together.
    .
    659 │ │ │ +0001d260: 2020 2073 7464 3a3a 7665 6374 6f72 266c std::vector&l │ │ │ +0001d270: 743b 4465 6369 7369 6f6e 5472 6565 2667 t;DecisionTree&g │ │ │ +0001d280: 743b 2066 756e 6374 696f 6e73 3b3c 2f64 t; functions;.
    66 │ │ │ +0001d2e0: 303c 2f73 7061 6e3e 2020 2020 3c73 7061 0 size_t split = │ │ │ +0001d370: 2073 697a 6520 2f20 6e72 4368 6f69 6365 size / nrChoice │ │ │ +0001d380: 733b 3c2f 6469 763e 0a3c 6469 7620 636c s;
    .
    661 │ │ │ +0001d3e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 for (size_t i │ │ │ +0001d430: 203d 2030 3b20 6920 266c 743b 206e 7243 = 0; i < nrC │ │ │ +0001d440: 686f 6963 6573 3b20 692b 2b2c 2062 6567 hoices; i++, beg │ │ │ +0001d450: 696e 5920 2b3d 203c 6120 636c 6173 733d inY += split) {
    .
    662 │ │ │ +0001d510: 2020 2020 203c 6120 636c 6173 733d 2263 NodePtr │ │ │ +0001d570: 2066 203d 2063 7265 6174 6526 6c74 3b49 f = create<I │ │ │ +0001d580: 742c 2056 616c 7565 4974 2667 743b 286c t, ValueIt>(l │ │ │ +0001d590: 6162 656c 432c 2065 6e64 2c20 6265 6769 abelC, end, begi │ │ │ +0001d5a0: 6e59 2c20 6265 6769 6e59 202b 203c 6120 nY, beginY + sp │ │ │ +0001d600: 6c69 743c 2f61 3e29 3b3c 2f64 6976 3e0a lit);
    . │ │ │ +0001d610: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    664 │ │ │ +0001d6e0: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    665 │ │ │ +0001d740: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ +0001d760: 7572 6e3c 2f73 7061 6e3e 2063 6f6d 706f urn compo │ │ │ +0001d770: 7365 2866 756e 6374 696f 6e73 2e62 6567 se(functions.beg │ │ │ +0001d780: 696e 2829 2c20 6675 6e63 7469 6f6e 732e in(), functions. │ │ │ +0001d790: 656e 6428 292c 2062 6567 696e 2d26 6774 end(), begin-> │ │ │ +0001d7a0: 3b66 6972 7374 293b 3c2f 6469 763e 0a3c ;first);
    .< │ │ │ +0001d7b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0001d7c0: 3e3c 6120 6964 3d22 6c30 3036 3636 2220 > 666 }
    ..
    66 │ │ │ +0001d860: 373c 2f73 7061 6e3e 203c 2f64 6976 3e0a 7
    . │ │ │ +0001d870: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ +0001d980: 2020 3636 393c 2f73 7061 6e3e 2020 3c73 669 template <ty │ │ │ +0001d9d0: 7065 6e61 6d65 3c2f 7370 616e 3e20 4c2c pename L, │ │ │ +0001d9e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ +0001da00: 2f73 7061 6e3e 2059 2667 743b 3c2f 6469 /span> Y>.
    670 │ │ │ +0001da60: 3c2f 7370 616e 3e20 203c 7370 616e 2063 t │ │ │ +0001da80: 656d 706c 6174 653c 2f73 7061 6e3e 2026 emplate & │ │ │ +0001da90: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;typenam │ │ │ +0001dab0: 653c 2f73 7061 6e3e 204d 2c20 3c73 7061 e M, typename X>
    ..
    671 typenam │ │ │ +0001dbf0: 653c 2f73 7061 6e3e 203c 6120 636c 6173 e Decisio │ │ │ +0001dc50: 6e54 7265 6526 6c74 3b4c 2c20 5926 6774 nTree<L, Y> │ │ │ +0001dc60: 3b3a 3a4e 6f64 6550 7472 3c2f 613e 203c ;::NodePtr < │ │ │ +0001dc70: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ +0001dc80: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ +0001dc90: 2261 3032 3739 362e 6874 6d6c 2361 3134 "a02796.html#a14 │ │ │ +0001dca0: 3936 3661 3365 3231 6334 3239 3063 3430 966a3e21c4290c40 │ │ │ +0001dcb0: 6133 3338 3833 3133 3437 3862 6638 223e a3388313478bf8"> │ │ │ +0001dcc0: 4465 6369 7369 6f6e 5472 6565 266c 743b DecisionTree< │ │ │ +0001dcd0: 4c2c 2059 2667 743b 3a3a 636f 6e76 6572 L, Y>::conver │ │ │ +0001dce0: 7446 726f 6d3c 2f61 3e28 3c2f 6469 763e tFrom(
    │ │ │ +0001dcf0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    │ │ │ +0001de60: 2020 3637 333c 2f73 7061 6e3e 2020 2020 673 │ │ │ +0001de70: 2020 7374 643a 3a66 756e 6374 696f 6e26 std::function& │ │ │ +0001de80: 6c74 3b4c 283c 7370 616e 2063 6c61 7373 lt;L(const │ │ │ +0001dea0: 3c2f 7370 616e 3e20 4d26 616d 703b 2926 M&)& │ │ │ +0001deb0: 6774 3b20 4c5f 6f66 5f4d 2c3c 2f64 6976 gt; L_of_M,
    .
    674< │ │ │ +0001df10: 2f73 7061 6e3e 2020 2020 2020 7374 643a /span> std: │ │ │ +0001df20: 3a66 756e 6374 696f 6e26 6c74 3b59 283c :function<Y(< │ │ │ +0001df30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +0001df40: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const X&)> Y_ │ │ │ +0001df60: 6f66 5f58 293c 7370 616e 2063 6c61 7373 of_X) cons │ │ │ +0001df80: 7420 3c2f 7370 616e 3e7b 3c2f 6469 763e t {
    │ │ │ +0001df90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +0001dfc0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 675 u │ │ │ +0001e000: 7369 6e67 203c 2f73 7061 6e3e 4c59 203d sing LY = │ │ │ +0001e010: 203c 6120 636c 6173 733d 2263 6f64 6520 Dec │ │ │ +0001e040: 6973 696f 6e54 7265 6526 6c74 3b4c 2c20 isionTree<L, │ │ │ +0001e050: 5926 6774 3b3c 2f61 3e3b 3c2f 6469 763e Y>;
    │ │ │ +0001e060: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ +0001e0d0: 6120 6964 3d22 6c30 3036 3737 2220 6e61 a id="l00677" na │ │ │ +0001e0e0: 6d65 3d22 6c30 3036 3737 223e 3c2f 613e me="l00677"> │ │ │ +0001e0f0: 3c73 7061 6e20 636c 6173 733d 226c 696e 677 // Ug │ │ │ +0001e130: 6c69 6e65 7373 2062 656c 6f77 2062 6563 liness below bec │ │ │ +0001e140: 6175 7365 2061 7070 6172 656e 746c 7920 ause apparently │ │ │ +0001e150: 7765 2063 616e 2623 3339 3b74 2068 6176 we can't hav │ │ │ +0001e160: 6520 7465 6d70 6c61 7465 6420 7669 7274 e templated virt │ │ │ +0001e170: 7561 6c3c 2f73 7061 6e3e 3c2f 6469 763e ual
    │ │ │ +0001e180: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +0001e1b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 678 / │ │ │ +0001e1f0: 2f20 6675 6e63 7469 6f6e 732e 3c2f 7370 / functions.
    .
    679 │ │ │ +0001e260: 2020 3c73 7061 6e20 636c 6173 733d 2263 // If le │ │ │ +0001e280: 6166 2c20 6170 706c 7920 756e 6172 7920 af, apply unary │ │ │ +0001e290: 636f 6e76 6572 7369 6f6e 2026 7175 6f74 conversion " │ │ │ +0001e2a0: 3b6f 7026 7175 6f74 3b20 616e 6420 6372 ;op" and cr │ │ │ +0001e2b0: 6561 7465 2061 2075 6e69 7175 6520 6c65 eate a unique le │ │ │ +0001e2c0: 6166 2e3c 2f73 7061 6e3e 3c2f 6469 763e af.
    │ │ │ +0001e2d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +0001e300: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 680 u │ │ │ +0001e340: 7369 6e67 203c 2f73 7061 6e3e 4d58 4c65 sing MXLe │ │ │ +0001e350: 6166 203d 203c 7370 616e 2063 6c61 7373 af = typen │ │ │ +0001e370: 616d 653c 2f73 7061 6e3e 203c 6120 636c ame Decision │ │ │ +0001e3b0: 5472 6565 266c 743b 4d2c 2058 2667 743b Tree<M, X> │ │ │ +0001e3c0: 3a3a 4c65 6166 3c2f 613e 3b3c 2f64 6976 ::Leaf;
    .
    681< │ │ │ +0001e420: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> if (< │ │ │ +0001e450: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +0001e460: 6f72 6422 3e61 7574 6f3c 2f73 7061 6e3e ord">auto │ │ │ +0001e470: 206c 6561 6620 3d20 626f 6f73 743a 3a64 leaf = boost::d │ │ │ +0001e480: 796e 616d 6963 5f70 6f69 6e74 6572 5f63 ynamic_pointer_c │ │ │ +0001e490: 6173 7426 6c74 3b63 6f6e 7374 204d 584c ast<const MXL │ │ │ +0001e4a0: 6561 6626 6774 3b28 6629 2920 7b3c 2f64 eaf>(f)) {.
    68 │ │ │ +0001e500: 323c 2f73 7061 6e3e 2020 2020 2020 3c73 2 return NodePtr(new │ │ │ +0001e5e0: 4c65 6166 3c2f 613e 2859 5f6f 665f 5828 Leaf(Y_of_X( │ │ │ +0001e5f0: 6c65 6166 2d26 6774 3b63 6f6e 7374 616e leaf->constan │ │ │ +0001e600: 7428 2929 2c20 6c65 6166 2d26 6774 3b6e t()), leaf->n │ │ │ +0001e610: 7241 7373 6967 6e6d 656e 7473 2829 2929 rAssignments())) │ │ │ +0001e620: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ +0001e670: 2020 3638 333c 2f73 7061 6e3e 2020 2020 683 │ │ │ +0001e680: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ +0001e6d0: 2020 3638 343c 2f73 7061 6e3e 203c 2f64 684 .
    68 │ │ │ +0001e730: 353c 2f73 7061 6e3e 2020 2020 3c73 7061 5 // Check if Ch │ │ │ +0001e760: 6f69 6365 3c2f 7370 616e 3e3c 2f64 6976 oice
    .
    686< │ │ │ +0001e7c0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ +0001e7e0: 7573 696e 6720 3c2f 7370 616e 3e4d 5843 using MXC │ │ │ +0001e7f0: 686f 6963 6520 3d20 3c73 7061 6e20 636c hoice = ty │ │ │ +0001e810: 7065 6e61 6d65 3c2f 7370 616e 3e20 3c61 pename Decis │ │ │ +0001e850: 696f 6e54 7265 6526 6c74 3b4d 2c20 5826 ionTree<M, X& │ │ │ +0001e860: 6774 3b3a 3a43 686f 6963 653c 2f61 3e3b gt;::Choice; │ │ │ +0001e870: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +0001e8c0: 2036 3837 3c2f 7370 616e 3e20 2020 203c 687 < │ │ │ +0001e8d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +0001e8e0: 6f72 6422 3e61 7574 6f3c 2f73 7061 6e3e ord">auto │ │ │ +0001e8f0: 2063 686f 6963 6520 3d20 626f 6f73 743a choice = boost: │ │ │ +0001e900: 3a64 796e 616d 6963 5f70 6f69 6e74 6572 :dynamic_pointer │ │ │ +0001e910: 5f63 6173 7426 6c74 3b63 6f6e 7374 204d _cast<const M │ │ │ +0001e920: 5843 686f 6963 6526 6774 3b28 6629 3b3c XChoice>(f);< │ │ │ +0001e930: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +0001e980: 3638 383c 2f73 7061 6e3e 2020 2020 3c73 688 if (!choice) throw std::invalid_ │ │ │ +0001e9f0: 6172 6775 6d65 6e74 283c 2f64 6976 3e0a argument(
    . │ │ │ +0001ea00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . │ │ │ +0001ead0: 3c61 2069 643d 226c 3030 3639 3022 206e 690
    .
    691 │ │ │ +0001eb70: 2020 3c73 7061 6e20 636c 6173 733d 2263 // get n │ │ │ +0001eb90: 6577 206c 6162 656c 3c2f 7370 616e 3e3c ew label< │ │ │ +0001eba0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +0001ebf0: 3639 323c 2f73 7061 6e3e 2020 2020 3c73 692 const │ │ │ +0001ec20: 204d 206f 6c64 4c61 6265 6c20 3d20 6368 M oldLabel = ch │ │ │ +0001ec30: 6f69 6365 2d26 6774 3b6c 6162 656c 2829 oice->label() │ │ │ +0001ec40: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ +0001ec90: 2020 3639 333c 2f73 7061 6e3e 2020 2020 693 │ │ │ +0001eca0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const L newLabel = │ │ │ +0001ecd0: 4c5f 6f66 5f4d 286f 6c64 4c61 6265 6c29 L_of_M(oldLabel) │ │ │ +0001ece0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ +0001ed30: 2020 3639 343c 2f73 7061 6e3e 203c 2f64 694 .
    69 │ │ │ +0001ed90: 353c 2f73 7061 6e3e 2020 2020 3c73 7061 5 // put togethe │ │ │ +0001edc0: 7220 7669 6120 5368 616e 6e6f 6e20 6578 r via Shannon ex │ │ │ +0001edd0: 7061 6e73 696f 6e20 6f74 6865 7277 6973 pansion otherwis │ │ │ +0001ede0: 6520 6e6f 7420 736f 7274 6564 2e3c 2f73 e not sorted.
    .
    696 │ │ │ +0001ee50: 2020 2073 7464 3a3a 7665 6374 6f72 266c std::vector&l │ │ │ +0001ee60: 743b 4c59 2667 743b 2066 756e 6374 696f t;LY> functio │ │ │ +0001ee70: 6e73 3b3c 2f64 6976 3e0a 3c64 6976 2063 ns;
    .
    697 │ │ │ +0001eed0: 2020 3c73 7061 6e20 636c 6173 733d 226b for< │ │ │ +0001eef0: 2f73 7061 6e3e 2028 3c73 7061 6e20 636c /span> (au │ │ │ +0001ef10: 746f 3c2f 7370 616e 3e26 616d 703b 2661 to&&a │ │ │ +0001ef20: 6d70 3b20 6272 616e 6368 203a 2063 686f mp; branch : cho │ │ │ +0001ef30: 6963 652d 2667 743b 6272 616e 6368 6573 ice->branches │ │ │ +0001ef40: 2829 2920 7b3c 2f64 6976 3e0a 3c64 6976 ()) {
    .
    < │ │ │ +0001ef80: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +0001ef90: 6e6f 223e 2020 3639 383c 2f73 7061 6e3e no"> 698 │ │ │ +0001efa0: 2020 2020 2020 6675 6e63 7469 6f6e 732e functions. │ │ │ +0001efb0: 656d 706c 6163 655f 6261 636b 2863 6f6e emplace_back(con │ │ │ +0001efc0: 7665 7274 4672 6f6d 266c 743b 4d2c 2058 vertFrom<M, X │ │ │ +0001efd0: 2667 743b 2862 7261 6e63 682c 204c 5f6f >(branch, L_o │ │ │ +0001efe0: 665f 4d2c 2059 5f6f 665f 5829 293b 3c2f f_M, Y_of_X));.
    6 │ │ │ +0001f040: 3939 3c2f 7370 616e 3e20 2020 207d 3c2f 99 }.
    7 │ │ │ +0001f0a0: 3030 3c2f 7370 616e 3e20 2020 203c 7370 00 return LY::compose │ │ │ +0001f0e0: 2866 756e 6374 696f 6e73 2e62 6567 696e (functions.begin │ │ │ +0001f0f0: 2829 2c20 6675 6e63 7469 6f6e 732e 656e (), functions.en │ │ │ +0001f100: 6428 292c 206e 6577 4c61 6265 6c29 3b3c d(), newLabel);< │ │ │ +0001f110: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +0001f160: 3730 313c 2f73 7061 6e3e 2020 7d3c 2f64 701 }.
    .
    702 │ │ │ +0001f1d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +0001f220: 2037 3033 3c2f 7370 616e 3e3c 7370 616e 703 /************ │ │ │ +0001f250: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +0001f260: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +0001f270: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +0001f280: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +0001f290: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .< │ │ │ +0001f2a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0001f2b0: 3e3c 6120 6964 3d22 6c30 3037 3134 2220 > 714 templ │ │ │ +0001f310: 6174 653c 2f73 7061 6e3e 2026 6c74 3b3c ate << │ │ │ +0001f320: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +0001f330: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename
    L, ty │ │ │ +0001f360: 7065 6e61 6d65 3c2f 7370 616e 3e20 5926 pename Y& │ │ │ +0001f370: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    │ │ │ +0001f3c0: 0a3c 6469 7620 636c 6173 733d 226c 696e . │ │ │ +0001f4a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +0001f4d0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 716 u │ │ │ +0001f510: 7369 6e67 203c 2f73 7061 6e3e 4620 3d20 sing F = │ │ │ +0001f520: 7374 643a 3a66 756e 6374 696f 6e26 6c74 std::function< │ │ │ +0001f530: 3b76 6f69 6428 3c73 7061 6e20 636c 6173 ;void(cons │ │ │ +0001f550: 743c 2f73 7061 6e3e 2059 2661 6d70 3b29 t Y&) │ │ │ +0001f560: 2667 743b 3b3c 2f64 6976 3e0a 3c64 6976 >;
    .
    < │ │ │ +0001f5a0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +0001f5b0: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 717 explicit Visit(F │ │ │ +0001f690: 3c61 2063 6c61 7373 3d22 636f 6465 2068 f) : f │ │ │ +0001f740: 283c 6120 636c 6173 733d 2263 6f64 6520 (f) {} .
    .
    718 F f │ │ │ +0001f8e0: 3c2f 613e 3b20 2020 2020 2020 2020 2020 ; │ │ │ +0001f8f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0001f900: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +0001f950: 2037 3139 3c2f 7370 616e 3e20 3c2f 6469 719 .
    .
    721< │ │ │ +0001fa40: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> void │ │ │ +0001fa70: 3c61 2063 6c61 7373 3d22 636f 6465 2068 operator()( │ │ │ +0001fad0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const typenam │ │ │ +0001fb10: 653c 2f73 7061 6e3e 203c 6120 636c 6173 e Decisio │ │ │ +0001fb70: 6e54 7265 6526 6c74 3b4c 2c20 5926 6774 nTree<L, Y> │ │ │ +0001fb80: 3b3a 3a4e 6f64 6550 7472 3c2f 613e 2661 ;::NodePtr&a │ │ │ +0001fb90: 6d70 3b20 6e6f 6465 293c 7370 616e 2063 mp; node) │ │ │ +0001fbb0: 636f 6e73 7420 3c2f 7370 616e 3e7b 3c2f const {.
    7 │ │ │ +0001fc10: 3232 3c2f 7370 616e 3e20 2020 2020 203c 22 < │ │ │ +0001fc20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +0001fc30: 6f72 6422 3e75 7369 6e67 203c 2f73 7061 ord">using Leaf = t │ │ │ +0001fc60: 7970 656e 616d 653c 2f73 7061 6e3e 203c ypename < │ │ │ +0001fc70: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ +0001fc80: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ +0001fc90: 3032 3737 362e 6874 6d6c 223e 4465 6369 02776.html">Deci │ │ │ +0001fca0: 7369 6f6e 5472 6565 266c 743b 4c2c 2059 sionTree<L, Y │ │ │ +0001fcb0: 2667 743b 3a3a 4c65 6166 3c2f 613e 3b3c >::Leaf;< │ │ │ +0001fcc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +0001fd10: 3732 333c 2f73 7061 6e3e 2020 2020 2020 723 │ │ │ +0001fd20: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (auto< │ │ │ +0001fd60: 2f73 7061 6e3e 206c 6561 6620 3d20 626f /span> leaf = bo │ │ │ +0001fd70: 6f73 743a 3a64 796e 616d 6963 5f70 6f69 ost::dynamic_poi │ │ │ +0001fd80: 6e74 6572 5f63 6173 7426 6c74 3b63 6f6e nter_cast<con │ │ │ +0001fd90: 7374 204c 6561 6626 6774 3b28 6e6f 6465 st Leaf>(node │ │ │ +0001fda0: 2929 3c2f 6469 763e 0a3c 6469 7620 636c ))
    .
    724 │ │ │ +0001fe00: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ +0001fe20: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn f< │ │ │ +0001fe80: 2f61 3e28 6c65 6166 2d26 6774 3b63 6f6e /a>(leaf->con │ │ │ +0001fe90: 7374 616e 7428 2929 3b3c 2f64 6976 3e0a stant());
    . │ │ │ +0001fea0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ +0001ff30: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +0001ff40: 6e6f 223e 2020 3732 363c 2f73 7061 6e3e no"> 726 │ │ │ +0001ff50: 2020 2020 2020 3c73 7061 6e20 636c 6173 usin │ │ │ +0001ff70: 6720 3c2f 7370 616e 3e43 686f 6963 6520 g Choice │ │ │ +0001ff80: 3d20 3c73 7061 6e20 636c 6173 733d 226b = typename │ │ │ +0001ffa0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 DecisionTre │ │ │ +0001ffe0: 6526 6c74 3b4c 2c20 5926 6774 3b3a 3a43 e<L, Y>::C │ │ │ +0001fff0: 686f 6963 653c 2f61 3e3b 3c2f 6469 763e hoice;
    │ │ │ +00020000: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +00020030: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 727 auto cho │ │ │ +00020080: 6963 6520 3d20 626f 6f73 743a 3a64 796e ice = boost::dyn │ │ │ +00020090: 616d 6963 5f70 6f69 6e74 6572 5f63 6173 amic_pointer_cas │ │ │ +000200a0: 7426 6c74 3b63 6f6e 7374 2043 686f 6963 t<const Choic │ │ │ +000200b0: 6526 6774 3b28 6e6f 6465 293b 3c2f 6469 e>(node);.
    728 │ │ │ +00020110: 3c2f 7370 616e 3e20 2020 2020 203c 7370 if │ │ │ +00020140: 2028 2163 686f 6963 6529 3c2f 6469 763e (!choice)
    │ │ │ +00020150: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +00020180: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 729 throw std::invalid │ │ │ +000201e0: 5f61 7267 756d 656e 7428 3c73 7061 6e20 _argument("Deci │ │ │ +00020210: 7369 6f6e 5472 6565 3a3a 5669 7369 743a sionTree::Visit: │ │ │ +00020220: 2049 6e76 616c 6964 204e 6f64 6550 7472 Invalid NodePtr │ │ │ +00020230: 2671 756f 743b 3c2f 7370 616e 3e29 3b3c ");< │ │ │ +00020240: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00020290: 3733 303c 2f73 7061 6e3e 2020 2020 2020 730 │ │ │ +000202a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 for (auto │ │ │ +000202e0: 3c2f 7370 616e 3e26 616d 703b 2661 6d70 && │ │ │ +000202f0: 3b20 6272 616e 6368 203a 2063 686f 6963 ; branch : choic │ │ │ +00020300: 652d 2667 743b 6272 616e 6368 6573 2829 e->branches() │ │ │ +00020310: 2920 282a 3c73 7061 6e20 636c 6173 733d ) (*this)(branch); │ │ │ +00020340: 203c 7370 616e 2063 6c61 7373 3d22 636f // recurs │ │ │ +00020360: 6521 3c2f 7370 616e 3e3c 2f64 6976 3e0a e!
    . │ │ │ +00020370: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ +000203d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00020420: 2037 3332 3c2f 7370 616e 3e20 207d 3b3c 732 };< │ │ │ +00020430: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00020480: 3733 333c 2f73 7061 6e3e 203c 2f64 6976 733
    .
    734< │ │ │ +000204e0: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> te │ │ │ +00020500: 6d70 6c61 7465 3c2f 7370 616e 3e20 266c mplate &l │ │ │ +00020510: 743b 3c73 7061 6e20 636c 6173 733d 226b t;typename │ │ │ +00020530: 3c2f 7370 616e 3e20 4c2c 203c 7370 616e L, typename │ │ │ +00020560: 2059 2667 743b 3c2f 6469 763e 0a3c 6469 Y>
    .< │ │ │ +00020580: 6120 6964 3d22 6c30 3037 3335 2220 6e61 a id="l00735" na │ │ │ +00020590: 6d65 3d22 6c30 3037 3335 223e 3c2f 613e me="l00735"> │ │ │ +000205a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 735 templat │ │ │ +000205e0: 653c 2f73 7061 6e3e 2026 6c74 3b3c 7370 e <typename Func>
    .
    .
    │ │ │ +000206b0: 3c61 2063 6c61 7373 3d22 6c69 6e65 2220 736 void De │ │ │ +00020780: 6369 7369 6f6e 5472 6565 266c 743b 4c2c cisionTree<L, │ │ │ +00020790: 2059 2667 743b 3a3a 7669 7369 743c 2f61 Y>::visit(Func f) │ │ │ +000207c0: 636f 6e73 7420 3c2f 7370 616e 3e7b 3c2f const {.
    7 │ │ │ +00020820: 3337 3c2f 7370 616e 3e20 2020 203c 6120 37 Visit& │ │ │ +00020860: 6c74 3b4c 2c20 5926 6774 3b3c 2f61 3e20 lt;L, Y> │ │ │ +00020870: 7669 7369 7428 6629 3b3c 2f64 6976 3e0a visit(f);
    . │ │ │ +00020880: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ +00020920: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00020930: 6e6f 223e 2020 3733 393c 2f73 7061 6e3e no"> 739 │ │ │ +00020940: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ +00020950: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ +000209c0: 6120 6964 3d22 6c30 3037 3431 2220 6e61 a id="l00741" na │ │ │ +000209d0: 6d65 3d22 6c30 3037 3431 223e 3c2f 613e me="l00741"> │ │ │ +000209e0: 3c73 7061 6e20 636c 6173 733d 226c 696e 741 /****** │ │ │ +00020a20: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00020a30: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00020a40: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00020a50: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00020a60: 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e 3c2f ******/.
    7 │ │ │ +00020ac0: 3531 3c2f 7370 616e 3e20 203c 7370 616e 51 template │ │ │ +00020af0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ +00020b10: 616d 653c 2f73 7061 6e3e 204c 2c20 3c73 ame L, typename Y>
    . │ │ │ +00020b50: 3c64 6976 2063 6c61 7373 3d22 666f 6c64
    .
    < │ │ │ +00020be0: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ +00020bf0: 7265 663d 2261 3032 3738 382e 6874 6d6c ref="a02788.html │ │ │ +00020c00: 223e 2020 3735 323c 2f61 3e3c 2f73 7061 "> 752 struct │ │ │ +00020c30: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 VisitLeaf {
    .
    753 │ │ │ +00020cd0: 2020 203c 7370 616e 2063 6c61 7373 3d22 using < │ │ │ +00020cf0: 2f73 7061 6e3e 4620 3d20 7374 643a 3a66 /span>F = std::f │ │ │ +00020d00: 756e 6374 696f 6e26 6c74 3b76 6f69 6428 unction<void( │ │ │ +00020d10: 3c73 7061 6e20 636c 6173 733d 226b 6579 const typenam │ │ │ +00020d50: 653c 2f73 7061 6e3e 203c 6120 636c 6173 e DecisionTr │ │ │ +00020d90: 6565 266c 743b 4c2c 2059 2667 743b 3a3a ee<L, Y>:: │ │ │ +00020da0: 4c65 6166 3c2f 613e 2661 6d70 3b29 2667 Leaf&)&g │ │ │ +00020db0: 743b 3b3c 2f64 6976 3e0a 3c64 6976 2063 t;;
    .
    754 │ │ │ +00020e50: 3c2f 7370 616e 3e20 2020 203c 7370 616e explicit │ │ │ +00020e80: 203c 6120 636c 6173 733d 2263 6f64 6520 VisitLeaf( │ │ │ +00020ee0: 4620 3c61 2063 6c61 7373 3d22 636f 6465 F f) : f(f) {} < │ │ │ +00020ff0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .< │ │ │ +00021050: 6120 6964 3d22 6c30 3037 3535 2220 6e61 a id="l00755" na │ │ │ +00021060: 6d65 3d22 6c30 3037 3535 223e 3c2f 613e me="l00755"> │ │ │ +00021070: 3c73 7061 6e20 636c 6173 733d 226c 696e 755< │ │ │ +000210d0: 2f61 3e3c 2f73 7061 6e3e 2020 2020 4620 /a> F │ │ │ +000210e0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 f; │ │ │ +00021140: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +00021150: 2020 3c2f 6469 763e 0a3c 6469 7620 636c
    .
    756 .
    .
    758 void operator()(const typen │ │ │ +00021360: 616d 653c 2f73 7061 6e3e 203c 6120 636c ame Decis │ │ │ +000213c0: 696f 6e54 7265 6526 6c74 3b4c 2c20 5926 ionTree<L, Y& │ │ │ +000213d0: 6774 3b3a 3a4e 6f64 6550 7472 3c2f 613e gt;::NodePtr │ │ │ +000213e0: 2661 6d70 3b20 6e6f 6465 293c 7370 616e & node) const { │ │ │ +00021410: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00021460: 2037 3539 3c2f 7370 616e 3e20 2020 2020 759 │ │ │ +00021470: 203c 7370 616e 2063 6c61 7373 3d22 6b65 using Leaf = typename │ │ │ +000214c0: 203c 6120 636c 6173 733d 2263 6f64 6520 De │ │ │ +000214f0: 6369 7369 6f6e 5472 6565 266c 743b 4c2c cisionTree<L, │ │ │ +00021500: 2059 2667 743b 3a3a 4c65 6166 3c2f 613e Y>::Leaf │ │ │ +00021510: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ +00021560: 2020 3736 303c 2f73 7061 6e3e 2020 2020 760 │ │ │ +00021570: 2020 3c73 7061 6e20 636c 6173 733d 226b if (aut │ │ │ +000215b0: 6f3c 2f73 7061 6e3e 206c 6561 6620 3d20 o leaf = │ │ │ +000215c0: 626f 6f73 743a 3a64 796e 616d 6963 5f70 boost::dynamic_p │ │ │ +000215d0: 6f69 6e74 6572 5f63 6173 7426 6c74 3b63 ointer_cast<c │ │ │ +000215e0: 6f6e 7374 204c 6561 6626 6774 3b28 6e6f onst Leaf>(no │ │ │ +000215f0: 6465 2929 3c2f 6469 763e 0a3c 6469 7620 de))
    .
    761 │ │ │ +00021650: 2020 2020 2020 203c 7370 616e 2063 6c61 return < │ │ │ +00021680: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ +00021690: 5f76 6172 6961 626c 6522 2068 7265 663d _variable" href= │ │ │ +000216a0: 2261 3032 3738 382e 6874 6d6c 2361 6330 "a02788.html#ac0 │ │ │ +000216b0: 6231 6136 6637 3233 3434 6638 6363 3436 b1a6f72344f8cc46 │ │ │ +000216c0: 3038 6130 3564 6162 3433 3961 3461 223e 08a05dab439a4a"> │ │ │ +000216d0: 663c 2f61 3e28 2a6c 6561 6629 3b3c 2f64 f(*leaf);.
    76 │ │ │ +00021730: 323c 2f73 7061 6e3e 203c 2f64 6976 3e0a 2
    . │ │ │ +00021740: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ +00021770: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 763 │ │ │ +000217b0: 7573 696e 6720 3c2f 7370 616e 3e43 686f using Cho │ │ │ +000217c0: 6963 6520 3d20 3c73 7061 6e20 636c 6173 ice = type │ │ │ +000217e0: 6e61 6d65 3c2f 7370 616e 3e20 3c61 2063 name Decisio │ │ │ +00021820: 6e54 7265 6526 6c74 3b4c 2c20 5926 6774 nTree<L, Y> │ │ │ +00021830: 3b3a 3a43 686f 6963 653c 2f61 3e3b 3c2f ;::Choice;.
    7 │ │ │ +00021890: 3634 3c2f 7370 616e 3e20 2020 2020 203c 64 < │ │ │ +000218a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +000218b0: 6f72 6422 3e61 7574 6f3c 2f73 7061 6e3e ord">auto │ │ │ +000218c0: 2063 686f 6963 6520 3d20 626f 6f73 743a choice = boost: │ │ │ +000218d0: 3a64 796e 616d 6963 5f70 6f69 6e74 6572 :dynamic_pointer │ │ │ +000218e0: 5f63 6173 7426 6c74 3b63 6f6e 7374 2043 _cast<const C │ │ │ +000218f0: 686f 6963 6526 6774 3b28 6e6f 6465 293b hoice>(node); │ │ │ +00021900: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00021950: 2037 3635 3c2f 7370 616e 3e20 2020 2020 765 │ │ │ +00021960: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!choice).
    7 │ │ │ +000219e0: 3636 3c2f 7370 616e 3e20 2020 2020 2020 66 │ │ │ +000219f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 throw │ │ │ +00021a10: 3c2f 7370 616e 3e20 7374 643a 3a69 6e76 std::inv │ │ │ +00021a20: 616c 6964 5f61 7267 756d 656e 7428 3c73 alid_argument(" │ │ │ +00021a50: 4465 6369 7369 6f6e 5472 6565 3a3a 5669 DecisionTree::Vi │ │ │ +00021a60: 7369 744c 6561 663a 2049 6e76 616c 6964 sitLeaf: Invalid │ │ │ +00021a70: 204e 6f64 6550 7472 2671 756f 743b 3c2f NodePtr");
    . │ │ │ +00021aa0: 3c61 2069 643d 226c 3030 3736 3722 206e 767 for (auto& │ │ │ +00021b30: 616d 703b 2661 6d70 3b20 6272 616e 6368 amp;& branch │ │ │ +00021b40: 203a 2063 686f 6963 652d 2667 743b 6272 : choice->br │ │ │ +00021b50: 616e 6368 6573 2829 2920 282a 3c73 7061 anches()) (*this)(b │ │ │ +00021b80: 7261 6e63 6829 3b20 203c 7370 616e 2063 ranch); / │ │ │ +00021ba0: 2f20 7265 6375 7273 6521 3c2f 7370 616e / recurse!
    .
    │ │ │ +00021c00: 2020 3736 383c 2f73 7061 6e3e 2020 2020 768 │ │ │ +00021c10: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 0a3c }
    .
    .< │ │ │ +00021c20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00021c30: 3e3c 6120 6964 3d22 6c30 3037 3639 2220 > 769 };
    . │ │ │ +00021c90: 3c61 2069 643d 226c 3030 3737 3022 206e 770
    .
    771 │ │ │ +00021d30: 3c73 7061 6e20 636c 6173 733d 226b 6579 template < │ │ │ +00021d70: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ +00021d80: 4c2c 203c 7370 616e 2063 6c61 7373 3d22 L, typenam │ │ │ +00021da0: 653c 2f73 7061 6e3e 2059 2667 743b 3c2f e Y>.
    7 │ │ │ +00021e00: 3732 3c2f 7370 616e 3e20 203c 7370 616e 72 template │ │ │ +00021e30: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ +00021e50: 616d 653c 2f73 7061 6e3e 2046 756e 6326 ame Func& │ │ │ +00021e60: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    . │ │ │ +00021eb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ +00021ee0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 7 │ │ │ +00021f40: 3733 3c2f 613e 3c2f 7370 616e 3e20 203c 73 < │ │ │ +00021f50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00021f60: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void DecisionTr │ │ │ +00021fd0: 6565 266c 743b 4c2c 2059 2667 743b 3a3a ee<L, Y>:: │ │ │ +00021fe0: 7669 7369 744c 6561 663c 2f61 3e28 4675 visitLeaf(Fu │ │ │ +00021ff0: 6e63 2066 293c 7370 616e 2063 6c61 7373 nc f) cons │ │ │ +00022010: 7420 3c2f 7370 616e 3e7b 3c2f 6469 763e t {
    │ │ │ +00022020: 0a3c 6469 7620 636c 6173 733d 226c 696e .. │ │ │ +000220d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ +00022170: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00022180: 6e6f 223e 2020 3737 363c 2f73 7061 6e3e no"> 776 │ │ │ +00022190: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ +000221a0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ +00022210: 6120 6964 3d22 6c30 3037 3738 2220 6e61 a id="l00778" na │ │ │ +00022220: 6d65 3d22 6c30 3037 3738 223e 3c2f 613e me="l00778"> │ │ │ +00022230: 3c73 7061 6e20 636c 6173 733d 226c 696e 778 /****** │ │ │ +00022270: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00022280: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00022290: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000222a0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000222b0: 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e 3c2f ******/.
    7 │ │ │ +00022310: 3835 3c2f 7370 616e 3e20 203c 7370 616e 85 template │ │ │ +00022340: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ +00022360: 616d 653c 2f73 7061 6e3e 204c 2c20 3c73 ame L, typename Y>
    . │ │ │ +000223a0: 3c64 6976 2063 6c61 7373 3d22 666f 6c64
    .
    < │ │ │ +00022430: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ +00022440: 7265 663d 2261 3032 3739 322e 6874 6d6c ref="a02792.html │ │ │ +00022450: 223e 2020 3738 363c 2f61 3e3c 2f73 7061 "> 786 struct │ │ │ +00022480: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 VisitWith {
    .
    787 │ │ │ +00022520: 2020 203c 7370 616e 2063 6c61 7373 3d22 using < │ │ │ +00022540: 2f73 7061 6e3e 4620 3d20 7374 643a 3a66 /span>F = std::f │ │ │ +00022550: 756e 6374 696f 6e26 6c74 3b76 6f69 6428 unction<void( │ │ │ +00022560: 3c73 7061 6e20 636c 6173 733d 226b 6579 const A │ │ │ +000225b0: 7373 6967 6e6d 656e 7426 6c74 3b4c 2667 ssignment<L&g │ │ │ +000225c0: 743b 3c2f 613e 2661 6d70 3b2c 203c 7370 t;&, const │ │ │ +000225f0: 5926 616d 703b 2926 6774 3b3b 3c2f 6469 Y&)>;.
    │ │ │ +00022690: 2020 3738 383c 2f61 3e3c 2f73 7061 6e3e 788 │ │ │ +000226a0: 2020 2020 3c73 7061 6e20 636c 6173 733d explic │ │ │ +000226c0: 6974 3c2f 7370 616e 3e20 3c61 2063 6c61 it Visit │ │ │ +00022720: 5769 7468 3c2f 613e 2846 203c 6120 636c With(F f) : f(f) {}
    .< │ │ │ +00022840: 6469 7620 636c 6173 733d 2266 6f6c 646f div class="foldo │ │ │ +00022850: 7065 6e22 2069 643d 2266 6f6c 646f 7065 pen" id="foldope │ │ │ +00022860: 6e30 3037 3839 2220 6461 7461 2d73 7461 n00789" data-sta │ │ │ +00022870: 7274 3d22 7b22 2064 6174 612d 656e 643d rt="{" data-end= │ │ │ +00022880: 227d 3b22 3e0a 3c64 6976 2063 6c61 7373 "};">.
    789 Assignment< │ │ │ +00022960: 3b4c 2667 743b 3c2f 613e 203c 6120 636c ;L> assi │ │ │ +000229c0: 676e 6d65 6e74 3c2f 613e 3b20 203c 2f64 gnment; .
    790 F f; │ │ │ +00022ad0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +00022ae0: 2020 2020 203c 2f64 6976 3e0a 3c64 6976
    .
    < │ │ │ +00022b20: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00022b30: 6e6f 223e 2020 3739 313c 2f73 7061 6e3e no"> 791 │ │ │ +00022b40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    . │ │ │ +00022ba0: 3c61 2069 643d 226c 3030 3739 3322 206e 793 │ │ │ +00022c20: 3c2f 613e 3c2f 7370 616e 3e20 2020 203c < │ │ │ +00022c30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00022c40: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void operator() │ │ │ +00022cb0: 3c2f 613e 283c 7370 616e 2063 6c61 7373 (const │ │ │ +00022cd0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ty │ │ │ +00022cf0: 7065 6e61 6d65 3c2f 7370 616e 3e20 3c61 pename De │ │ │ +00022d50: 6369 7369 6f6e 5472 6565 266c 743b 4c2c cisionTree<L, │ │ │ +00022d60: 2059 2667 743b 3a3a 4e6f 6465 5074 723c Y>::NodePtr< │ │ │ +00022d70: 2f61 3e26 616d 703b 206e 6f64 6529 207b /a>& node) { │ │ │ +00022d80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00022dd0: 2037 3934 3c2f 7370 616e 3e20 2020 2020 794 │ │ │ +00022de0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 using Leaf = typename │ │ │ +00022e30: 203c 6120 636c 6173 733d 2263 6f64 6520 De │ │ │ +00022e60: 6369 7369 6f6e 5472 6565 266c 743b 4c2c cisionTree<L, │ │ │ +00022e70: 2059 2667 743b 3a3a 4c65 6166 3c2f 613e Y>::Leaf │ │ │ +00022e80: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ +00022ed0: 2020 3739 353c 2f73 7061 6e3e 2020 2020 795 │ │ │ +00022ee0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (aut │ │ │ +00022f20: 6f3c 2f73 7061 6e3e 206c 6561 6620 3d20 o leaf = │ │ │ +00022f30: 626f 6f73 743a 3a64 796e 616d 6963 5f70 boost::dynamic_p │ │ │ +00022f40: 6f69 6e74 6572 5f63 6173 7426 6c74 3b63 ointer_cast<c │ │ │ +00022f50: 6f6e 7374 204c 6561 6626 6774 3b28 6e6f onst Leaf>(no │ │ │ +00022f60: 6465 2929 3c2f 6469 763e 0a3c 6469 7620 de))
    .
    796 │ │ │ +00022fc0: 2020 2020 2020 203c 7370 616e 2063 6c61 return < │ │ │ +00022ff0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ +00023000: 5f76 6172 6961 626c 6522 2068 7265 663d _variable" href= │ │ │ +00023010: 2261 3032 3739 322e 6874 6d6c 2361 6463 "a02792.html#adc │ │ │ +00023020: 3463 6662 3532 6434 3430 3932 6364 6165 4cfb52d44092cdae │ │ │ +00023030: 3966 3136 6365 6461 3835 3066 3535 223e 9f16ceda850f55"> │ │ │ +00023040: 663c 2f61 3e28 3c61 2063 6c61 7373 3d22 f(assignmen │ │ │ +000230a0: 743c 2f61 3e2c 206c 6561 662d 2667 743b t, leaf-> │ │ │ +000230b0: 636f 6e73 7461 6e74 2829 293b 3c2f 6469 constant());.
    797 │ │ │ +00023110: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ +00023120: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00023130: 3e3c 6120 6964 3d22 6c30 3037 3938 2220 > 798 u │ │ │ +00023190: 7369 6e67 203c 2f73 7061 6e3e 4368 6f69 sing Choi │ │ │ +000231a0: 6365 203d 203c 7370 616e 2063 6c61 7373 ce = typen │ │ │ +000231c0: 616d 653c 2f73 7061 6e3e 203c 6120 636c ame Decision │ │ │ +00023200: 5472 6565 266c 743b 4c2c 2059 2667 743b Tree<L, Y> │ │ │ +00023210: 3a3a 4368 6f69 6365 3c2f 613e 3b3c 2f64 ::Choice;.
    79 │ │ │ +00023270: 393c 2f73 7061 6e3e 2020 2020 2020 3c73 9 auto │ │ │ +000232a0: 6368 6f69 6365 203d 2062 6f6f 7374 3a3a choice = boost:: │ │ │ +000232b0: 6479 6e61 6d69 635f 706f 696e 7465 725f dynamic_pointer_ │ │ │ +000232c0: 6361 7374 266c 743b 636f 6e73 7420 4368 cast<const Ch │ │ │ +000232d0: 6f69 6365 2667 743b 286e 6f64 6529 3b3c oice>(node);< │ │ │ +000232e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00023330: 3830 303c 2f73 7061 6e3e 2020 2020 2020 800 │ │ │ +00023340: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (!choice).
    80 │ │ │ +000233c0: 313c 2f73 7061 6e3e 2020 2020 2020 2020 1 │ │ │ +000233d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 throw< │ │ │ +000233f0: 2f73 7061 6e3e 2073 7464 3a3a 696e 7661 /span> std::inva │ │ │ +00023400: 6c69 645f 6172 6775 6d65 6e74 283c 7370 lid_argument("D │ │ │ +00023430: 6563 6973 696f 6e54 7265 653a 3a56 6973 ecisionTree::Vis │ │ │ +00023440: 6974 5769 7468 3a20 496e 7661 6c69 6420 itWith: Invalid │ │ │ +00023450: 4e6f 6465 5074 7226 7175 6f74 3b3c 2f73 NodePtr");
    .< │ │ │ +00023480: 6120 6964 3d22 6c30 3038 3032 2220 6e61 a id="l00802" na │ │ │ +00023490: 6d65 3d22 6c30 3038 3032 223e 3c2f 613e me="l00802"> │ │ │ +000234a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 802 for (size_t
    i = 0; i &l │ │ │ +00023520: 743b 2063 686f 6963 652d 2667 743b 6e72 t; choice->nr │ │ │ +00023530: 4368 6f69 6365 7328 293b 2069 2b2b 2920 Choices(); i++) │ │ │ +00023540: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    ..
    804< │ │ │ +000236b0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ +000236d0: 3c61 2069 643d 226c 3030 3830 3522 206e 805 (*this │ │ │ +00023720: 2928 6368 6f69 6365 2d26 6774 3b62 7261 )(choice->bra │ │ │ +00023730: 6e63 6865 7328 295b 695d 293b 2020 3c73 nches()[i]); // recurse!< │ │ │ +00023760: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ +00023780: 6120 6964 3d22 6c30 3038 3036 2220 6e61 a id="l00806" na │ │ │ +00023790: 6d65 3d22 6c30 3038 3036 223e 3c2f 613e me="l00806"> │ │ │ +000237a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 806
    .
    807 │ │ │ +00023820: 2020 2020 203c 7370 616e 2063 6c61 7373 // Re │ │ │ +00023840: 6d6f 7665 2074 6865 2063 686f 6963 6520 move the choice │ │ │ +00023850: 736f 2077 6520 6172 6520 6261 636b 7472 so we are backtr │ │ │ +00023860: 6163 6b69 6e67 3c2f 7370 616e 3e3c 2f64 acking.
    80 │ │ │ +000238c0: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ +000238d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 auto choice_it = a │ │ │ +00023950: 7373 6967 6e6d 656e 743c 2f61 3e2e 6669 ssignment.fi │ │ │ +00023960: 6e64 2863 686f 6963 652d 2667 743b 6c61 nd(choice->la │ │ │ +00023970: 6265 6c28 2929 3b3c 2f64 6976 3e0a 3c64 bel());
    . │ │ │ +00023990: 3c61 2069 643d 226c 3030 3830 3922 206e 809
    assig │ │ │ +00023a30: 6e6d 656e 743c 2f61 3e2e 6572 6173 6528 nment.erase( │ │ │ +00023a40: 6368 6f69 6365 5f69 7429 3b3c 2f64 6976 choice_it);
    .
    810< │ │ │ +00023aa0: 2f73 7061 6e3e 2020 2020 2020 7d3c 2f64 /span> }.
    81 │ │ │ +00023b00: 313c 2f73 7061 6e3e 2020 2020 7d3c 2f64 1 }.
    .
    812 │ │ │ +00023b70: 207d 3b3c 2f64 6976 3e0a 3c64 6976 2063 };
    .
    813 < │ │ │ +00023bd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00023c20: 3831 343c 2f73 7061 6e3e 2020 3c73 7061 814 template <type │ │ │ +00023c70: 6e61 6d65 3c2f 7370 616e 3e20 4c2c 203c name L, < │ │ │ +00023c80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00023c90: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename Y>
    │ │ │ +00023cb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +00023ce0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 815 tem │ │ │ +00023d20: 706c 6174 653c 2f73 7061 6e3e 2026 6c74 plate < │ │ │ +00023d30: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;typename< │ │ │ +00023d50: 2f73 7061 6e3e 2046 756e 6326 6774 3b3c /span> Func>< │ │ │ +00023d60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .
    < │ │ │ +00023de0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00023df0: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 816 void │ │ │ +00023e70: 203c 6120 636c 6173 733d 2263 6f64 6520 DecisionTree&l │ │ │ +00023ed0: 743b 4c2c 2059 2667 743b 3a3a 7669 7369 t;L, Y>::visi │ │ │ +00023ee0: 7457 6974 683c 2f61 3e28 4675 6e63 2066 tWith(Func f │ │ │ +00023ef0: 293c 7370 616e 2063 6c61 7373 3d22 6b65 ) const {
    .< │ │ │ +00023f30: 6120 6964 3d22 6c30 3038 3137 2220 6e61 a id="l00817" na │ │ │ +00023f40: 6d65 3d22 6c30 3038 3137 223e 3c2f 613e me="l00817"> │ │ │ +00023f50: 3c73 7061 6e20 636c 6173 733d 226c 696e 817 VisitWith<L │ │ │ +00023fb0: 2c20 5926 6774 3b3c 2f61 3e20 7669 7369 , Y> visi │ │ │ +00023fc0: 7428 6629 3b3c 2f64 6976 3e0a 3c64 6976 t(f);
    .
    < │ │ │ +00024000: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00024010: 6e6f 223e 2020 3831 383c 2f73 7061 6e3e no"> 818 │ │ │ +00024020: 2020 2020 7669 7369 7428 726f 6f74 5f29 visit(root_) │ │ │ +00024030: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ +00024080: 2020 3831 393c 2f73 7061 6e3e 2020 7d3c 819 }< │ │ │ +00024090: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 6469 /div>.
    .< │ │ │ +000240b0: 6120 6964 3d22 6c30 3038 3230 2220 6e61 a id="l00820" na │ │ │ +000240c0: 6d65 3d22 6c30 3038 3230 223e 3c2f 613e me="l00820"> │ │ │ +000240d0: 3c73 7061 6e20 636c 6173 733d 226c 696e 820
    .
    821 /********** │ │ │ +00024170: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00024180: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00024190: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000241a0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000241b0: 2a2a 2f3c 2f73 7061 6e3e 3c2f 6469 763e **/
    │ │ │ +000241c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +000241f0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 822 tem │ │ │ +00024230: 706c 6174 653c 2f73 7061 6e3e 2026 6c74 plate < │ │ │ +00024240: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;typename< │ │ │ +00024260: 2f73 7061 6e3e 204c 2c20 3c73 7061 6e20 /span> L, │ │ │ +00024280: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ +00024290: 5926 6774 3b3c 2f64 6976 3e0a 3c64 6976 Y>
    .
    .
    │ │ │ +00024370: 2038 3233 3c2f 613e 3c2f 7370 616e 3e20 823 │ │ │ +00024380: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_ │ │ │ +000243a0: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t Decisi │ │ │ +00024400: 6f6e 5472 6565 266c 743b 4c2c 2059 2667 onTree<L, Y&g │ │ │ +00024410: 743b 3a3a 6e72 4c65 6176 6573 3c2f 613e t;::nrLeaves │ │ │ +00024420: 2829 3c73 7061 6e20 636c 6173 733d 226b () const < │ │ │ +00024440: 2f73 7061 6e3e 7b3c 2f64 6976 3e0a 3c64 /span>{
    . │ │ │ +00024460: 3c61 2069 643d 226c 3030 3832 3422 206e 824 │ │ │ +000244c0: 7369 7a65 5f74 3c2f 7370 616e 3e20 746f size_t to │ │ │ +000244d0: 7461 6c20 3d20 303b 3c2f 6469 763e 0a3c tal = 0;
    .< │ │ │ +000244e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +000244f0: 3e3c 6120 6964 3d22 6c30 3038 3235 2220 > 825 visit([&a │ │ │ +00024540: 6d70 3b74 6f74 616c 5d28 3c73 7061 6e20 mp;total]( │ │ │ +00024560: 636f 6e73 743c 2f73 7061 6e3e 2059 2661 const Y&a │ │ │ +00024570: 6d70 3b20 6e6f 6465 2920 7b20 746f 7461 mp; node) { tota │ │ │ +00024580: 6c20 2b3d 2031 3b20 7d29 3b3c 2f64 6976 l += 1; });
    .
    826< │ │ │ +000245e0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> return total;
    .< │ │ │ +00024620: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00024630: 3e3c 6120 6964 3d22 6c30 3038 3237 2220 > 827 }
    ..
    82 │ │ │ +000246d0: 383c 2f73 7061 6e3e 203c 2f64 6976 3e0a 8
    . │ │ │ +000246e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ +000247f0: 2020 3833 303c 2f73 7061 6e3e 2020 3c73 830 // fold is j │ │ │ +00024820: 7573 7420 646f 6e65 2077 6974 6820 6120 ust done with a │ │ │ +00024830: 7669 7369 743c 2f73 7061 6e3e 3c2f 6469 visit.
    831 │ │ │ +00024890: 3c2f 7370 616e 3e20 203c 7370 616e 2063 t │ │ │ +000248b0: 656d 706c 6174 653c 2f73 7061 6e3e 2026 emplate & │ │ │ +000248c0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;typenam │ │ │ +000248e0: 653c 2f73 7061 6e3e 204c 2c20 3c73 7061 e L, typename Y>
    . │ │ │ +00024930: 3c61 2069 643d 226c 3030 3833 3222 206e 832 templa │ │ │ +00024990: 7465 3c2f 7370 616e 3e20 266c 743b 3c73 te <typename Func, │ │ │ +000249e0: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ +000249f0: 5826 6774 3b3c 2f64 6976 3e0a 3c64 6976 X>
    ..
    │ │ │ +00024d10: 2020 3833 363c 2f73 7061 6e3e 2020 7d3c 836 }< │ │ │ +00024d20: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 6469 /div>.
    .< │ │ │ +00024d40: 6120 6964 3d22 6c30 3038 3337 2220 6e61 a id="l00837" na │ │ │ +00024d50: 6d65 3d22 6c30 3038 3337 223e 3c2f 613e me="l00837"> │ │ │ +00024d60: 3c73 7061 6e20 636c 6173 733d 226c 696e 837
    .
    838 /********** │ │ │ +00024e00: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00024e10: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00024e20: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00024e30: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00024e40: 2a2a 2f3c 2f73 7061 6e3e 3c2f 6469 763e **/
    │ │ │ +00024e50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +00024e80: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 852 tem │ │ │ +00024ec0: 706c 6174 653c 2f73 7061 6e3e 2026 6c74 plate < │ │ │ +00024ed0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;typename< │ │ │ +00024ef0: 2f73 7061 6e3e 204c 2c20 3c73 7061 6e20 /span> L, │ │ │ +00024f10: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ +00024f20: 5926 6774 3b3c 2f64 6976 3e0a 3c64 6976 Y>
    .
    .
    │ │ │ +00025000: 2038 3533 3c2f 613e 3c2f 7370 616e 3e20 853 │ │ │ +00025010: 2073 7464 3a3a 7365 7426 6c74 3b4c 2667 std::set<L&g │ │ │ +00025020: 743b 203c 6120 636c 6173 733d 2263 6f64 t; DecisionTree │ │ │ +00025080: 266c 743b 4c2c 2059 2667 743b 3a3a 6c61 <L, Y>::la │ │ │ +00025090: 6265 6c73 3c2f 613e 2829 3c73 7061 6e20 bels() │ │ │ +000250b0: 2063 6f6e 7374 203c 2f73 7061 6e3e 7b3c const {< │ │ │ +000250c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00025110: 3835 343c 2f73 7061 6e3e 2020 2020 7374 854 st │ │ │ +00025120: 643a 3a73 6574 266c 743b 4c26 6774 3b20 d::set<L> │ │ │ +00025130: 756e 6971 7565 3b3c 2f64 6976 3e0a 3c64 unique;
    . │ │ │ +00025150: 3c61 2069 643d 226c 3030 3835 3522 206e 855 auto │ │ │ +000251b0: 3c2f 7370 616e 3e20 6620 3d20 5b26 616d f = [&am │ │ │ +000251c0: 703b 5d28 3c73 7061 6e20 636c 6173 733d p;](const< │ │ │ +000251e0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> Assignment< │ │ │ +00025220: 3b4c 2667 743b 3c2f 613e 2661 6d70 3b20 ;L>& │ │ │ +00025230: 6173 7369 676e 6d65 6e74 2c20 3c73 7061 assignment, const Y │ │ │ +00025260: 2661 6d70 3b29 207b 3c2f 6469 763e 0a3c &) {
    .< │ │ │ +00025270: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00025280: 3e3c 6120 6964 3d22 6c30 3038 3536 2220 > 856 for (< │ │ │ +000252f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00025300: 6f72 6422 3e61 7574 6f3c 2f73 7061 6e3e ord">auto │ │ │ +00025310: 2661 6d70 3b26 616d 703b 206b 7620 3a20 && kv : │ │ │ +00025320: 6173 7369 676e 6d65 6e74 2920 7b3c 2f64 assignment) {.
    85 │ │ │ +00025380: 373c 2f73 7061 6e3e 2020 2020 2020 2020 7 │ │ │ +00025390: 756e 6971 7565 2e69 6e73 6572 7428 6b76 unique.insert(kv │ │ │ +000253a0: 2e66 6972 7374 293b 3c2f 6469 763e 0a3c .first);
    .< │ │ │ +000253b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +000253c0: 3e3c 6120 6964 3d22 6c30 3038 3538 2220 > 858 }
    │ │ │ +00025410: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    860< │ │ │ +000254c0: 2f73 7061 6e3e 2020 2020 7669 7369 7457 /span> visitW │ │ │ +000254d0: 6974 6828 6629 3b3c 2f64 6976 3e0a 3c64 ith(f);
    . │ │ │ +000254f0: 3c61 2069 643d 226c 3030 3836 3122 206e 861 │ │ │ +00025550: 7265 7475 726e 3c2f 7370 616e 3e20 756e return un │ │ │ +00025560: 6971 7565 3b3c 2f64 6976 3e0a 3c64 6976 ique;
    .
    < │ │ │ +000255a0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +000255b0: 6e6f 223e 2020 3836 323c 2f73 7061 6e3e no"> 862 │ │ │ +000255c0: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ +000255d0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ +00025640: 6120 6964 3d22 6c30 3038 3634 2220 6e61 a id="l00864" na │ │ │ +00025650: 6d65 3d22 6c30 3038 3634 223e 3c2f 613e me="l00864"> │ │ │ +00025660: 3c73 7061 6e20 636c 6173 733d 226c 696e 864/******** │ │ │ +000256a0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000256b0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000256c0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000256d0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000256e0: 2a2a 2a2a 2f3c 2f73 7061 6e3e 3c2f 6469 ****/.
    865 │ │ │ +00025740: 3c2f 7370 616e 3e20 203c 7370 616e 2063 t │ │ │ +00025760: 656d 706c 6174 653c 2f73 7061 6e3e 2026 emplate & │ │ │ +00025770: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;typenam │ │ │ +00025790: 653c 2f73 7061 6e3e 204c 2c20 3c73 7061 e L, typename Y>
    . │ │ │ +000257e0: 3c61 2069 643d 226c 3030 3836 3622 206e 866 bo │ │ │ +00025840: 6f6c 3c2f 7370 616e 3e20 3c61 2063 6c61 ol DecisionTr │ │ │ +00025880: 6565 266c 743b 4c2c 2059 2667 743b 3a3a ee<L, Y>:: │ │ │ +00025890: 6571 7561 6c73 3c2f 613e 283c 7370 616e equals(const Decisi │ │ │ +000258f0: 6f6e 5472 6565 3c2f 613e 2661 6d70 3b20 onTree& │ │ │ +00025900: 6f74 6865 722c 3c2f 6469 763e 0a3c 6469 other,
    .< │ │ │ +00025920: 6120 6964 3d22 6c30 3038 3637 2220 6e61 a id="l00867" na │ │ │ +00025930: 6d65 3d22 6c30 3038 3637 223e 3c2f 613e me="l00867"> │ │ │ +00025940: 3c73 7061 6e20 636c 6173 733d 226c 696e 867 │ │ │ +00025970: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +00025980: 2020 203c 7370 616e 2063 6c61 7373 3d22 const CompareFun │ │ │ +000259b0: 6326 616d 703b 2063 6f6d 7061 7265 293c c& compare)< │ │ │ +000259c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +000259d0: 6f72 6422 3e20 636f 6e73 7420 3c2f 7370 ord"> const {
    .
    868 │ │ │ +00025a40: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ +00025a60: 7572 6e3c 2f73 7061 6e3e 2072 6f6f 745f urn root_ │ │ │ +00025a70: 2d26 6774 3b65 7175 616c 7328 2a6f 7468 ->equals(*oth │ │ │ +00025a80: 6572 2e3c 6120 636c 6173 733d 2263 6f64 er.root_, c │ │ │ +00025ae0: 6f6d 7061 7265 293b 3c2f 6469 763e 0a3c ompare);
    .< │ │ │ +00025af0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00025b00: 3e3c 6120 6964 3d22 6c30 3038 3639 2220 > 869 }
    .< │ │ │ +00025b60: 6120 6964 3d22 6c30 3038 3730 2220 6e61 a id="l00870" na │ │ │ +00025b70: 6d65 3d22 6c30 3038 3730 223e 3c2f 613e me="l00870"> │ │ │ +00025b80: 3c73 7061 6e20 636c 6173 733d 226c 696e 870
    .
    871 < │ │ │ +00025c00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00025c10: 6f72 6422 3e74 656d 706c 6174 653c 2f73 ord">template <t │ │ │ +00025c40: 7970 656e 616d 653c 2f73 7061 6e3e 204c ypename L │ │ │ +00025c50: 2c20 3c73 7061 6e20 636c 6173 733d 226b , typename │ │ │ +00025c70: 3c2f 7370 616e 3e20 5926 6774 3b3c 2f64 Y>.
    .
    872 │ │ │ +00025d60: 3c2f 7370 616e 3e20 203c 7370 616e 2063 void < │ │ │ +00025d90: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ +00025da0: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ +00025db0: 2261 3032 3739 362e 6874 6d6c 2361 3930 "a02796.html#a90 │ │ │ +00025dc0: 3835 3439 3336 3135 3938 6562 6364 3661 8549361598ebcd6a │ │ │ +00025dd0: 6434 3061 3565 3565 6562 6337 3363 223e d40a5e5eebc73c"> │ │ │ +00025de0: 4465 6369 7369 6f6e 5472 6565 266c 743b DecisionTree< │ │ │ +00025df0: 4c2c 2059 2667 743b 3a3a 7072 696e 743c L, Y>::print< │ │ │ +00025e00: 2f61 3e28 3c73 7061 6e20 636c 6173 733d /a>(const< │ │ │ +00025e20: 2f73 7061 6e3e 2073 7464 3a3a 7374 7269 /span> std::stri │ │ │ +00025e30: 6e67 2661 6d70 3b20 732c 3c2f 6469 763e ng& s,
    │ │ │ +00025e40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +00025e70: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 873 │ │ │ +00025ea0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +00025eb0: 2020 2020 2020 3c73 7061 6e20 636c 6173 cons │ │ │ +00025ed0: 743c 2f73 7061 6e3e 204c 6162 656c 466f t LabelFo │ │ │ +00025ee0: 726d 6174 7465 7226 616d 703b 206c 6162 rmatter& lab │ │ │ +00025ef0: 656c 466f 726d 6174 7465 722c 3c2f 6469 elFormatter,.
    874 │ │ │ +00025f50: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ +00025f60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +00025f70: 2020 2020 2020 2020 3c73 7061 6e20 636c co │ │ │ +00025f90: 6e73 743c 2f73 7061 6e3e 2056 616c 7565 nst Value │ │ │ +00025fa0: 466f 726d 6174 7465 7226 616d 703b 2076 Formatter& v │ │ │ +00025fb0: 616c 7565 466f 726d 6174 7465 7229 3c73 alueFormatter) const {
    .
    875 │ │ │ +00026040: 2020 726f 6f74 5f2d 2667 743b 7072 696e root_->prin │ │ │ +00026050: 7428 732c 206c 6162 656c 466f 726d 6174 t(s, labelFormat │ │ │ +00026060: 7465 722c 2076 616c 7565 466f 726d 6174 ter, valueFormat │ │ │ +00026070: 7465 7229 3b3c 2f64 6976 3e0a 3c64 6976 ter);
    .
    < │ │ │ +000260b0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +000260c0: 6e6f 223e 2020 3837 363c 2f73 7061 6e3e no"> 876 │ │ │ +000260d0: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ +000260e0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ +00026150: 6120 6964 3d22 6c30 3038 3738 2220 6e61 a id="l00878" na │ │ │ +00026160: 6d65 3d22 6c30 3038 3738 223e 3c2f 613e me="l00878"> │ │ │ +00026170: 3c73 7061 6e20 636c 6173 733d 226c 696e 878 templat │ │ │ +000261b0: 653c 2f73 7061 6e3e 266c 743b 3c73 7061 e<typename L, typen │ │ │ +00026200: 616d 653c 2f73 7061 6e3e 2059 2667 743b ame Y> │ │ │ +00026210: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    .< │ │ │ +00026270: 6120 6964 3d22 6c30 3038 3739 2220 6e61 a id="l00879" na │ │ │ +00026280: 6d65 3d22 6c30 3038 3739 223e 3c2f 613e me="l00879"> │ │ │ +00026290: 3c73 7061 6e20 636c 6173 733d 226c 696e 879< │ │ │ +000262f0: 2f61 3e3c 2f73 7061 6e3e 2020 3c73 7061 /a> bool DecisionTree& │ │ │ +00026380: 6c74 3b4c 2c20 5926 6774 3b3a 3a6f 7065 lt;L, Y>::ope │ │ │ +00026390: 7261 746f 723d 3d3c 2f61 3e28 3c73 7061 rator==(const < │ │ │ +000263c0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ +000263d0: 5f63 6c61 7373 2220 6872 6566 3d22 6130 _class" href="a0 │ │ │ +000263e0: 3237 3936 2e68 746d 6c22 3e44 6563 6973 2796.html">Decis │ │ │ +000263f0: 696f 6e54 7265 653c 2f61 3e26 616d 703b ionTree& │ │ │ +00026400: 206f 7468 6572 293c 7370 616e 2063 6c61 other) co │ │ │ +00026420: 6e73 7420 3c2f 7370 616e 3e7b 3c2f 6469 nst {.
    880 │ │ │ +00026480: 3c2f 7370 616e 3e20 2020 203c 7370 616e return root_->equ │ │ │ +000264c0: 616c 7328 2a6f 7468 6572 2e3c 6120 636c als(*other.root │ │ │ +00026520: 5f3c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 _);
    . │ │ │ +00026540: 3c61 2069 643d 226c 3030 3838 3122 206e 881 }
    ..
    882 │ │ │ +000265e0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ +000265f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00026600: 3e3c 6120 6964 3d22 6c30 3038 3833 2220 > 883 templ │ │ │ +00026660: 6174 653c 2f73 7061 6e3e 266c 743b 3c73 ate<typename L, typ │ │ │ +000266b0: 656e 616d 653c 2f73 7061 6e3e 2059 2667 ename Y&g │ │ │ +000266c0: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    ..
    < │ │ │ +00026920: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00026930: 6e6f 223e 2020 3838 353c 2f73 7061 6e3e no"> 885 │ │ │ +00026940: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ +00026960: 7475 726e 3c2f 7370 616e 3e20 726f 6f74 turn root │ │ │ +00026970: 5f2d 2667 743b 6f70 6572 6174 6f72 2028 _->operator ( │ │ │ +00026980: 2928 7829 3b3c 2f64 6976 3e0a 3c64 6976 )(x);
    .
    < │ │ │ +000269c0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +000269d0: 6e6f 223e 2020 3838 363c 2f73 7061 6e3e no"> 886 │ │ │ +000269e0: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ +000269f0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ +00026a60: 6120 6964 3d22 6c30 3038 3838 2220 6e61 a id="l00888" na │ │ │ +00026a70: 6d65 3d22 6c30 3038 3838 223e 3c2f 613e me="l00888"> │ │ │ +00026a80: 3c73 7061 6e20 636c 6173 733d 226c 696e 888 templat │ │ │ +00026ac0: 653c 2f73 7061 6e3e 266c 743b 3c73 7061 e<typename L, typen │ │ │ +00026b10: 616d 653c 2f73 7061 6e3e 2059 2667 743b ame Y> │ │ │ +00026b20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    .< │ │ │ +00026b80: 6120 6964 3d22 6c30 3038 3839 2220 6e61 a id="l00889" na │ │ │ +00026b90: 6d65 3d22 6c30 3038 3839 223e 3c2f 613e me="l00889"> │ │ │ +00026ba0: 3c73 7061 6e20 636c 6173 733d 226c 696e 889< │ │ │ +00026c00: 2f61 3e3c 2f73 7061 6e3e 2020 3c61 2063 /a> Decision │ │ │ +00026c40: 5472 6565 266c 743b 4c2c 2059 2667 743b Tree<L, Y> │ │ │ +00026c50: 3c2f 613e 203c 6120 636c 6173 733d 2263 DecisionTr │ │ │ +00026cb0: 6565 266c 743b 4c2c 2059 2667 743b 3a3a ee<L, Y>:: │ │ │ +00026cc0: 6170 706c 793c 2f61 3e28 3c73 7061 6e20 apply( │ │ │ +00026ce0: 636f 6e73 743c 2f73 7061 6e3e 203c 6120 const Una │ │ │ +00026d40: 7279 3c2f 613e 2661 6d70 3b20 6f70 293c ry& op)< │ │ │ +00026d50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00026d60: 6f72 6422 3e20 636f 6e73 7420 3c2f 7370 ord"> const {
    .
    890 │ │ │ +00026dd0: 2020 203c 7370 616e 2063 6c61 7373 3d22 // It i │ │ │ +00026df0: 7320 756e 636c 6561 7220 7768 6174 2073 s unclear what s │ │ │ +00026e00: 686f 756c 6420 6861 7070 656e 2069 6620 hould happen if │ │ │ +00026e10: 7472 6565 2069 7320 656d 7074 793a 3c2f tree is empty:
    .
    < │ │ │ +00026e60: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00026e70: 6e6f 223e 2020 3839 313c 2f73 7061 6e3e no"> 891 │ │ │ +00026e80: 2020 2020 3c73 7061 6e20 636c 6173 733d if │ │ │ +00026ea0: 3c2f 7370 616e 3e20 2865 6d70 7479 2829 (empty() │ │ │ +00026eb0: 2920 7b3c 2f64 6976 3e0a 3c64 6976 2063 ) {
    .
    892 │ │ │ +00026f10: 2020 2020 3c73 7061 6e20 636c 6173 733d th │ │ │ +00026f30: 726f 773c 2f73 7061 6e3e 2073 7464 3a3a row std:: │ │ │ +00026f40: 7275 6e74 696d 655f 6572 726f 7228 3c2f runtime_error(.
    8 │ │ │ +00026fa0: 3933 3c2f 7370 616e 3e20 2020 2020 2020 93 │ │ │ +00026fb0: 2020 203c 7370 616e 2063 6c61 7373 3d22 & │ │ │ +00026fd0: 7175 6f74 3b44 6563 6973 696f 6e54 7265 quot;DecisionTre │ │ │ +00026fe0: 653a 3a61 7070 6c79 2875 6e61 7279 206f e::apply(unary o │ │ │ +00026ff0: 7029 2075 6e64 6566 696e 6564 2066 6f72 p) undefined for │ │ │ +00027000: 2065 6d70 7479 2074 7265 652e 2671 756f empty tree.&quo │ │ │ +00027010: 743b 3c2f 7370 616e 3e29 3b3c 2f64 6976 t;);
    .
    894< │ │ │ +00027070: 2f73 7061 6e3e 2020 2020 7d3c 2f64 6976 /span> }
    .
    895< │ │ │ +000270d0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> return De │ │ │ +00027130: 6369 7369 6f6e 5472 6565 3c2f 613e 2872 cisionTree(r │ │ │ +00027140: 6f6f 745f 2d26 6774 3b61 7070 6c79 286f oot_->apply(o │ │ │ +00027150: 7029 293b 3c2f 6469 763e 0a3c 6469 7620 p));
    .
    896 │ │ │ +000271b0: 207d 3c2f 6469 763e 0a3c 2f64 6976 3e0a }
    .
    . │ │ │ +000271c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ +00027250: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00027260: 6e6f 223e 2020 3839 393c 2f73 7061 6e3e no"> 899 │ │ │ +00027270: 2020 3c73 7061 6e20 636c 6173 733d 226b template │ │ │ +00027290: 3c2f 7370 616e 3e20 266c 743b 3c73 7061 <typename L, typen │ │ │ +000272e0: 616d 653c 2f73 7061 6e3e 2059 2667 743b ame Y> │ │ │ +000272f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    . │ │ │ +000274a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +000274d0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 901 const Un │ │ │ +00027520: 6172 7941 7373 6967 6e6d 656e 7426 616d aryAssignment&am │ │ │ +00027530: 703b 206f 7029 3c73 7061 6e20 636c 6173 p; op) con │ │ │ +00027550: 7374 203c 2f73 7061 6e3e 7b3c 2f64 6976 st {
    .
    902< │ │ │ +000275b0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ +000275d0: 2f2f 2049 7420 6973 2075 6e63 6c65 6172 // It is unclear │ │ │ +000275e0: 2077 6861 7420 7368 6f75 6c64 2068 6170 what should hap │ │ │ +000275f0: 7065 6e20 6966 2074 7265 6520 6973 2065 pen if tree is e │ │ │ +00027600: 6d70 7479 3a3c 2f73 7061 6e3e 3c2f 6469 mpty:.
    903 │ │ │ +00027660: 3c2f 7370 616e 3e20 2020 203c 7370 616e if ( │ │ │ +00027690: 656d 7074 7928 2929 207b 3c2f 6469 763e empty()) {
    │ │ │ +000276a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +000276d0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 904 throw std::runtime_e │ │ │ +00027730: 7272 6f72 283c 2f64 6976 3e0a 3c64 6976 rror(
    .
    < │ │ │ +00027770: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00027780: 6e6f 223e 2020 3930 353c 2f73 7061 6e3e no"> 905 │ │ │ +00027790: 2020 2020 2020 2020 2020 3c73 7061 6e20 "Deci │ │ │ +000277c0: 7369 6f6e 5472 6565 3a3a 6170 706c 7928 sionTree::apply( │ │ │ +000277d0: 756e 6172 7920 6f70 2920 756e 6465 6669 unary op) undefi │ │ │ +000277e0: 6e65 6420 666f 7220 656d 7074 7920 7472 ned for empty tr │ │ │ +000277f0: 6565 2e26 7175 6f74 3b3c 2f73 7061 6e3e ee." │ │ │ +00027800: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    906 │ │ │ +00027860: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    907 │ │ │ +000278c0: 203c 6120 636c 6173 733d 2263 6f64 6520 Ass │ │ │ +000278f0: 6967 6e6d 656e 7426 6c74 3b4c 2667 743b ignment<L> │ │ │ +00027900: 3c2f 613e 2061 7373 6967 6e6d 656e 743b assignment; │ │ │ +00027910: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00027960: 2039 3038 3c2f 7370 616e 3e20 2020 203c 908 < │ │ │ +00027970: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00027980: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ +00027990: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> DecisionTree< │ │ │ +000279d0: 2f61 3e28 726f 6f74 5f2d 2667 743b 6170 /a>(root_->ap │ │ │ +000279e0: 706c 7928 6f70 2c20 6173 7369 676e 6d65 ply(op, assignme │ │ │ +000279f0: 6e74 2929 3b3c 2f64 6976 3e0a 3c64 6976 nt));
    .
    < │ │ │ +00027a30: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +00027a40: 6e6f 223e 2020 3930 393c 2f73 7061 6e3e no"> 909 │ │ │ +00027a50: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ +00027a60: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ +00027ad0: 6120 6964 3d22 6c30 3039 3131 2220 6e61 a id="l00911" na │ │ │ +00027ae0: 6d65 3d22 6c30 3039 3131 223e 3c2f 613e me="l00911"> │ │ │ +00027af0: 3c73 7061 6e20 636c 6173 733d 226c 696e 911 /****** │ │ │ +00027b30: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00027b40: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00027b50: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00027b60: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00027b70: 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e 3c2f ******/.
    9 │ │ │ +00027bd0: 3132 3c2f 7370 616e 3e20 203c 7370 616e 12 template │ │ │ +00027c00: 266c 743b 3c73 7061 6e20 636c 6173 733d <typena │ │ │ +00027c20: 6d65 3c2f 7370 616e 3e20 4c2c 203c 7370 me L, typename Y>
    .< │ │ │ +00027c60: 6469 7620 636c 6173 733d 2266 6f6c 646f div class="foldo │ │ │ +00027c70: 7065 6e22 2069 643d 2266 6f6c 646f 7065 pen" id="foldope │ │ │ +00027c80: 6e30 3039 3133 2220 6461 7461 2d73 7461 n00913" data-sta │ │ │ +00027c90: 7274 3d22 7b22 2064 6174 612d 656e 643d rt="{" data-end= │ │ │ +00027ca0: 227d 223e 0a3c 6469 7620 636c 6173 733d "}">.
    . │ │ │ +00027e70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ +00027f70: 2020 3931 353c 2f73 7061 6e3e 2020 2020 915 │ │ │ +00027f80: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // It is u │ │ │ +00027fa0: 6e63 6c65 6172 2077 6861 7420 7368 6f75 nclear what shou │ │ │ +00027fb0: 6c64 2068 6170 7065 6e20 6966 2065 6974 ld happen if eit │ │ │ +00027fc0: 6865 7220 7472 6565 2069 7320 656d 7074 her tree is empt │ │ │ +00027fd0: 793a 3c2f 7370 616e 3e3c 2f64 6976 3e0a y:
    . │ │ │ +00027fe0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ +000280d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    918 │ │ │ +000281c0: 2020 2020 2020 2020 203c 7370 616e 2063 "Decis │ │ │ +000281f0: 696f 6e54 7265 653a 3a61 7070 6c79 2862 ionTree::apply(b │ │ │ +00028200: 696e 6172 7920 6f70 2920 756e 6465 6669 inary op) undefi │ │ │ +00028210: 6e65 6420 666f 7220 656d 7074 7920 7472 ned for empty tr │ │ │ +00028220: 6565 732e 2671 756f 743b 3c2f 7370 616e ees.");
    .
    919 │ │ │ +00028290: 2020 7d3c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    920 │ │ │ +000282f0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // apply │ │ │ +00028310: 2074 6865 206f 7065 7261 746f 6e20 6f6e the operaton on │ │ │ +00028320: 2074 6865 2072 6f6f 7420 6f66 2062 6f74 the root of bot │ │ │ +00028330: 6820 6469 6167 7261 6d73 3c2f 7370 616e h diagrams
    .
    │ │ │ +00028390: 2020 3932 313c 2f73 7061 6e3e 2020 2020 921 │ │ │ +000283a0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 │ │ │ +000283f0: 4e6f 6465 5074 723c 2f61 3e20 6820 3d20 NodePtr h = │ │ │ +00028400: 726f 6f74 5f2d 2667 743b 6170 706c 795f root_->apply_ │ │ │ +00028410: 665f 6f70 5f67 282a 672e 3c61 2063 6c61 f_op_g(*g.root_ │ │ │ +00028470: 3c2f 613e 2c20 6f70 293b 3c2f 6469 763e , op);
    │ │ │ +00028480: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +000284b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 922 / │ │ │ +000284f0: 2f20 6372 6561 7465 2061 206e 6577 2063 / create a new c │ │ │ +00028500: 6c61 7373 2077 6974 6820 7468 6520 7265 lass with the re │ │ │ +00028510: 7375 6c74 696e 6720 726f 6f74 2026 7175 sulting root &qu │ │ │ +00028520: 6f74 3b68 2671 756f 743b 3c2f 7370 616e ot;h"
    .
    │ │ │ +00028580: 2020 3932 333c 2f73 7061 6e3e 2020 2020 923 │ │ │ +00028590: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Deci │ │ │ +000285c0: 7369 6f6e 5472 6565 3c2f 613e 2072 6573 sionTree res │ │ │ +000285d0: 756c 7428 6829 3b3c 2f64 6976 3e0a 3c64 ult(h);
    . │ │ │ +000285f0: 3c61 2069 643d 226c 3030 3932 3422 206e 924 │ │ │ +00028650: 7265 7475 726e 3c2f 7370 616e 3e20 7265 return re │ │ │ +00028660: 7375 6c74 3b3c 2f64 6976 3e0a 3c64 6976 sult;
    .
    < │ │ │ +000286a0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ +000286b0: 6e6f 223e 2020 3932 353c 2f73 7061 6e3e no"> 925 │ │ │ +000286c0: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ +000286d0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ +00028740: 6120 6964 3d22 6c30 3039 3237 2220 6e61 a id="l00927" na │ │ │ +00028750: 6d65 3d22 6c30 3039 3237 223e 3c2f 613e me="l00927"> │ │ │ +00028760: 3c73 7061 6e20 636c 6173 733d 226c 696e 927 /****** │ │ │ +000287a0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000287b0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000287c0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000287d0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +000287e0: 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e 3c2f ******/.
    9 │ │ │ +00028840: 3238 3c2f 7370 616e 3e20 203c 7370 616e 28 // The way this │ │ │ +00028870: 2077 6f72 6b73 3a3c 2f73 7061 6e3e 3c2f works:.
    9 │ │ │ +000288d0: 3239 3c2f 7370 616e 3e20 203c 7370 616e 29 // We have an A │ │ │ +00028900: 4454 2c20 7069 6374 7572 6520 6974 2061 DT, picture it a │ │ │ +00028910: 7320 6120 7472 6565 2e3c 2f73 7061 6e3e s a tree. │ │ │ +00028920: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00028970: 2039 3330 3c2f 7370 616e 3e20 203c 7370 930 // At a certa │ │ │ +000289a0: 696e 2064 6570 7468 2c20 7765 2068 6176 in depth, we hav │ │ │ +000289b0: 6520 6120 6272 616e 6368 206f 6e20 2671 e a branch on &q │ │ │ +000289c0: 756f 743b 6c61 6265 6c26 7175 6f74 3b2e uot;label". │ │ │ +000289d0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ +000289f0: 3c61 2069 643d 226c 3030 3933 3122 206e 931 // The │ │ │ +00028a50: 2066 756e 6374 696f 6e20 2671 756f 743b function " │ │ │ +00028a60: 6368 6f6f 7365 286c 6162 656c 2c69 6e64 choose(label,ind │ │ │ +00028a70: 6578 2926 7175 6f74 3b20 7769 6c6c 2072 ex)" will r │ │ │ +00028a80: 6574 7572 6e20 6120 7472 6565 206f 6620 eturn a tree of │ │ │ +00028a90: 6f6e 6520 6c65 7373 2064 6570 7468 2c3c one less depth,< │ │ │ +00028aa0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ +00028ac0: 6120 6964 3d22 6c30 3039 3332 2220 6e61 a id="l00932" na │ │ │ +00028ad0: 6d65 3d22 6c30 3039 3332 223e 3c2f 613e me="l00932"> │ │ │ +00028ae0: 3c73 7061 6e20 636c 6173 733d 226c 696e 932 // wher │ │ │ +00028b20: 6520 7468 6572 6520 6973 206e 6f20 6d6f e there is no mo │ │ │ +00028b30: 7265 2062 7261 6e63 6820 6f6e 2026 7175 re branch on &qu │ │ │ +00028b40: 6f74 3b6c 6162 656c 2671 756f 743b 3a20 ot;label": │ │ │ +00028b50: 6f6e 6c79 2074 6865 2073 7562 7472 6565 only the subtree │ │ │ +00028b60: 2075 6e64 6572 2074 6861 743c 2f73 7061 under that
    .
    933 < │ │ │ +00028bd0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ +00028be0: 656e 7422 3e2f 2f20 6272 616e 6368 2070 ent">// branch p │ │ │ +00028bf0: 6f69 6e74 2063 6f72 7265 7370 6f6e 6469 oint correspondi │ │ │ +00028c00: 6e67 2074 6f20 7468 6520 7661 6c75 6520 ng to the value │ │ │ +00028c10: 2671 756f 743b 696e 6465 7826 7175 6f74 "index" │ │ │ +00028c20: 3b20 6973 206c 6566 7420 696e 7374 6561 ; is left instea │ │ │ +00028c30: 642e 3c2f 7370 616e 3e3c 2f64 6976 3e0a d.
    . │ │ │ +00028c40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ +00028d20: 3c61 2069 643d 226c 3030 3933 3522 206e 935 // Thi │ │ │ +00028d80: 7320 696d 706c 656d 656e 7473 206d 6172 s implements mar │ │ │ +00028d90: 6769 6e61 6c69 7a61 7469 6f6e 2069 6e20 ginalization in │ │ │ +00028da0: 4461 7277 6963 6865 3039 626f 6f6b 2c20 Darwiche09book, │ │ │ +00028db0: 7067 2033 3330 3c2f 7370 616e 3e3c 2f64 pg 330.
    93 │ │ │ +00028e10: 363c 2f73 7061 6e3e 2020 3c73 7061 6e20 6 │ │ │ +00028e30: 7465 6d70 6c61 7465 3c2f 7370 616e 3e26 template& │ │ │ +00028e40: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;typenam │ │ │ +00028e60: 653c 2f73 7061 6e3e 204c 2c20 3c73 7061 e L, typename Y>
    ...
    938 │ │ │ +000290d0: 2020 2020 3c73 7061 6e20 636c 6173 733d si │ │ │ +000290f0: 7a65 5f74 3c2f 7370 616e 3e20 6361 7264 ze_t card │ │ │ +00029100: 696e 616c 6974 792c 203c 7370 616e 2063 inality, c │ │ │ +00029120: 6f6e 7374 3c2f 7370 616e 3e20 4269 6e61 onst Bina │ │ │ +00029130: 7279 2661 6d70 3b20 6f70 293c 7370 616e ry& op) const { │ │ │ +00029160: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +000291b0: 2039 3339 3c2f 7370 616e 3e20 2020 203c 939 < │ │ │ +000291c0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ +000291d0: 5f63 6c61 7373 2220 6872 6566 3d22 6130 _class" href="a0 │ │ │ +000291e0: 3237 3936 2e68 746d 6c22 3e44 6563 6973 2796.html">Decis │ │ │ +000291f0: 696f 6e54 7265 653c 2f61 3e20 7265 7375 ionTree resu │ │ │ +00029200: 6c74 203d 2063 686f 6f73 6528 6c61 6265 lt = choose(labe │ │ │ +00029210: 6c2c 2030 293b 3c2f 6469 763e 0a3c 6469 l, 0);
    .< │ │ │ +00029230: 6120 6964 3d22 6c30 3039 3430 2220 6e61 a id="l00940" na │ │ │ +00029240: 6d65 3d22 6c30 3039 3430 223e 3c2f 613e me="l00940"> │ │ │ +00029250: 3c73 7061 6e20 636c 6173 733d 226c 696e 940 f │ │ │ +00029290: 6f72 3c2f 7370 616e 3e20 283c 7370 616e or (size_t index = 1; in │ │ │ +000292d0: 6465 7820 266c 743b 2063 6172 6469 6e61 dex < cardina │ │ │ +000292e0: 6c69 7479 3b20 696e 6465 782b 2b29 207b lity; index++) { │ │ │ +000292f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00029340: 2039 3431 3c2f 7370 616e 3e20 2020 2020 941 │ │ │ +00029350: 203c 6120 636c 6173 733d 2263 6f64 6520 Dec │ │ │ +00029380: 6973 696f 6e54 7265 653c 2f61 3e20 6368 isionTree ch │ │ │ +00029390: 6f73 656e 203d 2063 686f 6f73 6528 6c61 osen = choose(la │ │ │ +000293a0: 6265 6c2c 2069 6e64 6578 293b 3c2f 6469 bel, index);.
    942 │ │ │ +00029400: 3c2f 7370 616e 3e20 2020 2020 2072 6573 res │ │ │ +00029410: 756c 7420 3d20 7265 7375 6c74 2e61 7070 ult = result.app │ │ │ +00029420: 6c79 2863 686f 7365 6e2c 206f 7029 3b3c ly(chosen, op);< │ │ │ +00029430: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00029480: 3934 333c 2f73 7061 6e3e 2020 2020 7d3c 943 }< │ │ │ +00029490: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +000294e0: 3934 343c 2f73 7061 6e3e 2020 2020 3c73 944 return result;.
    94 │ │ │ +00029570: 353c 2f73 7061 6e3e 2020 7d3c 2f64 6976 5 }
    .
    .
    946 .
    9 │ │ │ +00029630: 3437 3c2f 7370 616e 3e3c 7370 616e 2063 47 │ │ │ +00029650: 202f 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a /************** │ │ │ +00029660: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00029670: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00029680: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +00029690: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2f3c **************/< │ │ │ +000296a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ +000296c0: 6120 6964 3d22 6c30 3039 3438 2220 6e61 a id="l00948" na │ │ │ +000296d0: 6d65 3d22 6c30 3039 3438 223e 3c2f 613e me="l00948"> │ │ │ +000296e0: 3c73 7061 6e20 636c 6173 733d 226c 696e 948 templat │ │ │ +00029720: 653c 2f73 7061 6e3e 2026 6c74 3b3c 7370 e <typename
    L, type │ │ │ +00029770: 6e61 6d65 3c2f 7370 616e 3e20 5926 6774 name Y> │ │ │ +00029780: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    . │ │ │ +000297e0: 3c61 2069 643d 226c 3030 3934 3922 206e 949 │ │ │ +00029860: 3c2f 613e 3c2f 7370 616e 3e20 203c 7370 void DecisionTree │ │ │ +000298f0: 266c 743b 4c2c 2059 2667 743b 3a3a 646f <L, Y>::do │ │ │ +00029900: 743c 2f61 3e28 7374 643a 3a6f 7374 7265 t(std::ostre │ │ │ +00029910: 616d 2661 6d70 3b20 6f73 2c3c 2f64 6976 am& os,
    .
    950< │ │ │ +00029970: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ +00029980: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +00029990: 2020 2020 203c 7370 616e 2063 6c61 7373 const │ │ │ +000299b0: 3c2f 7370 616e 3e20 4c61 6265 6c46 6f72 LabelFor │ │ │ +000299c0: 6d61 7474 6572 2661 6d70 3b20 6c61 6265 matter& labe │ │ │ +000299d0: 6c46 6f72 6d61 7474 6572 2c3c 2f64 6976 lFormatter,
    .
    951< │ │ │ +00029a30: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ +00029a40: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +00029a50: 2020 2020 203c 7370 616e 2063 6c61 7373 const │ │ │ +00029a70: 3c2f 7370 616e 3e20 5661 6c75 6546 6f72 ValueFor │ │ │ +00029a80: 6d61 7474 6572 2661 6d70 3b20 7661 6c75 matter& valu │ │ │ +00029a90: 6546 6f72 6d61 7474 6572 2c3c 2f64 6976 eFormatter,
    .
    952< │ │ │ +00029af0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ +00029b00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +00029b10: 2020 2020 203c 7370 616e 2063 6c61 7373 b │ │ │ +00029b30: 6f6f 6c3c 2f73 7061 6e3e 2073 686f 775a ool showZ │ │ │ +00029b40: 6572 6f29 3c73 7061 6e20 636c 6173 733d ero) const │ │ │ +00029b60: 203c 2f73 7061 6e3e 7b3c 2f64 6976 3e0a {
    . │ │ │ +00029b70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ +00029c60: 2020 3935 343c 2f73 7061 6e3e 2020 2020 954 │ │ │ +00029c70: 726f 6f74 5f2d 2667 743b 646f 7428 6f73 root_->dot(os │ │ │ +00029c80: 2c20 6c61 6265 6c46 6f72 6d61 7474 6572 , labelFormatter │ │ │ +00029c90: 2c20 7661 6c75 6546 6f72 6d61 7474 6572 , valueFormatter │ │ │ +00029ca0: 2c20 7368 6f77 5a65 726f 293b 3c2f 6469 , showZero);.
    955 │ │ │ +00029d00: 3c2f 7370 616e 3e20 2020 206f 7320 266c os &l │ │ │ +00029d10: 743b 266c 743b 203c 7370 616e 2063 6c61 t;< " [order │ │ │ +00029d40: 696e 673d 6f75 745d 7d26 7175 6f74 3b3c ing=out]}"< │ │ │ +00029d50: 2f73 7061 6e3e 2026 6c74 3b26 6c74 3b20 /span> << │ │ │ +00029d60: 7374 643a 3a65 6e64 6c3b 3c2f 6469 763e std::endl;
    │ │ │ +00029d70: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ +00029dd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00029e20: 3935 373c 2f73 7061 6e3e 203c 2f64 6976 957
    .
    958< │ │ │ +00029e80: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> te │ │ │ +00029ea0: 6d70 6c61 7465 3c2f 7370 616e 3e20 266c mplate &l │ │ │ +00029eb0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;typename │ │ │ +00029ed0: 3c2f 7370 616e 3e20 4c2c 203c 7370 616e L, typename │ │ │ +00029f00: 2059 2667 743b 3c2f 6469 763e 0a3c 6469 Y>
    ..
    │ │ │ +00029fe0: 2020 3935 393c 2f61 3e3c 2f73 7061 6e3e 959 │ │ │ +00029ff0: 2020 3c73 7061 6e20 636c 6173 733d 226b void │ │ │ +0002a010: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 Decisio │ │ │ +0002a070: 6e54 7265 6526 6c74 3b4c 2c20 5926 6774 nTree<L, Y> │ │ │ +0002a080: 3b3a 3a64 6f74 3c2f 613e 283c 7370 616e ;::dot(const st │ │ │ +0002a0b0: 643a 3a73 7472 696e 6726 616d 703b 206e d::string& n │ │ │ +0002a0c0: 616d 652c 3c2f 6469 763e 0a3c 6469 7620 ame,
    .
    960 │ │ │ +0002a120: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0002a130: 2020 2020 2020 2020 2020 2020 2020 3c73 const │ │ │ +0002a160: 204c 6162 656c 466f 726d 6174 7465 7226 LabelFormatter& │ │ │ +0002a170: 616d 703b 206c 6162 656c 466f 726d 6174 amp; labelFormat │ │ │ +0002a180: 7465 722c 3c2f 6469 763e 0a3c 6469 7620 ter,
    .
    961 │ │ │ +0002a1e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0002a1f0: 2020 2020 2020 2020 2020 2020 2020 3c73 const │ │ │ +0002a220: 2056 616c 7565 466f 726d 6174 7465 7226 ValueFormatter& │ │ │ +0002a230: 616d 703b 2076 616c 7565 466f 726d 6174 amp; valueFormat │ │ │ +0002a240: 7465 722c 3c2f 6469 763e 0a3c 6469 7620 ter,
    .
    962 │ │ │ +0002a2a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0002a2b0: 2020 2020 2020 2020 2020 2020 2020 3c73 bool showZero) const {
    .
    963 │ │ │ +0002a370: 2073 7464 3a3a 6f66 7374 7265 616d 206f std::ofstream o │ │ │ +0002a380: 7328 286e 616d 6520 2b20 3c73 7061 6e20 s((name + ".dot │ │ │ +0002a3b0: 2671 756f 743b 3c2f 7370 616e 3e29 2e63 ").c │ │ │ +0002a3c0: 5f73 7472 2829 293b 3c2f 6469 763e 0a3c _str());
    .< │ │ │ +0002a3d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +0002a3e0: 3e3c 6120 6964 3d22 6c30 3039 3634 2220 > 964 dot( │ │ │ +0002a480: 6f73 2c20 6c61 6265 6c46 6f72 6d61 7474 os, labelFormatt │ │ │ +0002a490: 6572 2c20 7661 6c75 6546 6f72 6d61 7474 er, valueFormatt │ │ │ +0002a4a0: 6572 2c20 7368 6f77 5a65 726f 293b 3c2f er, showZero);.
    9 │ │ │ +0002a500: 3635 3c2f 7370 616e 3e20 2020 203c 7370 65 int result =
    │ │ │ +0002a540: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +0002a570: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 966 sys │ │ │ +0002a5a0: 7465 6d28 283c 7370 616e 2063 6c61 7373 tem(("dot -Tpdf │ │ │ +0002a5d0: 2026 7175 6f74 3b3c 2f73 7061 6e3e 202b " + │ │ │ +0002a5e0: 206e 616d 6520 2b20 3c73 7061 6e20 636c name + ".dot - │ │ │ +0002a610: 6f20 2671 756f 743b 3c2f 7370 616e 3e20 o " │ │ │ +0002a620: 2b20 6e61 6d65 202b 203c 7370 616e 2063 + name + ".pdf │ │ │ +0002a650: 2667 743b 2661 6d70 3b20 2f64 6576 2f6e >& /dev/n │ │ │ +0002a660: 756c 6c26 7175 6f74 3b3c 2f73 7061 6e3e ull" │ │ │ +0002a670: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    │ │ │ +0002a6c0: 2020 3936 373c 2f73 7061 6e3e 2020 2020 967 │ │ │ +0002a6d0: 2020 2020 2020 2020 2020 2020 2020 202e . │ │ │ +0002a6e0: 635f 7374 7228 2929 3b3c 2f64 6976 3e0a c_str());
    . │ │ │ +0002a6f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ +0002a780: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +0002a7b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 969 throw std::runtime_e │ │ │ +0002a810: 7272 6f72 283c 7370 616e 2063 6c61 7373 rror("DecisionT │ │ │ +0002a840: 7265 653a 3a64 6f74 2073 7973 7465 6d20 ree::dot system │ │ │ +0002a850: 6361 6c6c 2066 6169 6c65 6426 7175 6f74 call failed" │ │ │ +0002a860: 3b3c 2f73 7061 6e3e 293b 3c2f 6469 763e ;);
    │ │ │ +0002a870: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ +0002a8d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +0002a920: 3937 313c 2f73 7061 6e3e 203c 2f64 6976 971
    .
    972< │ │ │ +0002a980: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> te │ │ │ +0002a9a0: 6d70 6c61 7465 3c2f 7370 616e 3e20 266c mplate &l │ │ │ +0002a9b0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;typename │ │ │ +0002a9d0: 3c2f 7370 616e 3e20 4c2c 203c 7370 616e L, typename │ │ │ +0002aa00: 2059 2667 743b 3c2f 6469 763e 0a3c 6469 Y>
    ..
    │ │ │ +0002aae0: 2020 3937 333c 2f61 3e3c 2f73 7061 6e3e 973 │ │ │ +0002aaf0: 2020 7374 643a 3a73 7472 696e 6720 3c61 std::string D │ │ │ +0002ab50: 6563 6973 696f 6e54 7265 6526 6c74 3b4c ecisionTree<L │ │ │ +0002ab60: 2c20 5926 6774 3b3a 3a64 6f74 3c2f 613e , Y>::dot │ │ │ +0002ab70: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (const LabelFormatt │ │ │ +0002aba0: 6572 2661 6d70 3b20 6c61 6265 6c46 6f72 er& labelFor │ │ │ +0002abb0: 6d61 7474 6572 2c3c 2f64 6976 3e0a 3c64 matter,
    . │ │ │ +0002abd0: 3c61 2069 643d 226c 3030 3937 3422 206e 974 │ │ │ +0002ac20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0002ac30: 2020 2020 2020 2020 3c73 7061 6e20 636c co │ │ │ +0002ac50: 6e73 743c 2f73 7061 6e3e 2056 616c 7565 nst Value │ │ │ +0002ac60: 466f 726d 6174 7465 7226 616d 703b 2076 Formatter& v │ │ │ +0002ac70: 616c 7565 466f 726d 6174 7465 722c 3c2f alueFormatter,.
    9 │ │ │ +0002acd0: 3735 3c2f 7370 616e 3e20 2020 2020 2020 75 │ │ │ +0002ace0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ +0002acf0: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ +0002ad00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +0002ad10: 6f72 6474 7970 6522 3e62 6f6f 6c3c 2f73 ordtype">bool showZero) const {
    .
    976 │ │ │ +0002adb0: 2020 7374 643a 3a73 7472 696e 6773 7472 std::stringstr │ │ │ +0002adc0: 6561 6d20 7373 3b3c 2f64 6976 3e0a 3c64 eam ss;
    . │ │ │ +0002ade0: 3c61 2069 643d 226c 3030 3937 3722 206e 977 dot(s │ │ │ +0002ae80: 732c 206c 6162 656c 466f 726d 6174 7465 s, labelFormatte │ │ │ +0002ae90: 722c 2076 616c 7565 466f 726d 6174 7465 r, valueFormatte │ │ │ +0002aea0: 722c 2073 686f 775a 6572 6f29 3b3c 2f64 r, showZero);.
    97 │ │ │ +0002af00: 383c 2f73 7061 6e3e 2020 2020 3c73 7061 8 return ss.str();.
    97 │ │ │ +0002af90: 393c 2f73 7061 6e3e 2020 7d3c 2f64 6976 9 }
    .
    .
    980 .
    9 │ │ │ +0002b050: 3831 3c2f 7370 616e 3e3c 7370 616e 2063 81/ │ │ │ +0002b070: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +0002b080: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +0002b090: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +0002b0a0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ +0002b0b0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2f3c **************/< │ │ │ +0002b0c0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ +0002b0e0: 6120 6964 3d22 6c30 3039 3832 2220 6e61 a id="l00982" na │ │ │ +0002b0f0: 6d65 3d22 6c30 3039 3832 223e 3c2f 613e me="l00982"> │ │ │ +0002b100: 3c73 7061 6e20 636c 6173 733d 226c 696e 982
    .
    983 } │ │ │ +0002b180: 2020 3c73 7061 6e20 636c 6173 733d 2263 // names │ │ │ +0002b1a0: 7061 6365 2067 7473 616d 3c2f 7370 616e pace gtsam
    .
    .< │ │ │ +0002b1c0: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 2f64 /div>.
    ..
    .
    .
    .
    . │ │ │ +0002b1f0: 3c2f 6469 763e 0a3c 2f64 6976 3e0a 3c2f
    .
    ..
    ..
    .
    │ │ │ +0002b220: 0a3c 2f64 6976 3e0a 3c2f 6469 763e 0a3c .
    .
    .< │ │ │ +0002b230: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 2f64 /div>.
    ..
    .
    .
    .
    . │ │ │ +0002b260: 3c2f 6469 763e 0a3c 2f64 6976 3e0a 3c2f
    .
    ..
    ..
    .
    │ │ │ +0002b290: 0a3c 2f64 6976 3e0a 3c2f 6469 763e 0a3c .
    .
    .< │ │ │ +0002b2a0: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 2f64 /div>.
    ...
    Global function │ │ │ +0002b3e0: 7320 696e 2061 2073 6570 6172 6174 6520 s in a separate │ │ │ +0002b3f0: 7465 7374 696e 6720 6e61 6d65 7370 6163 testing namespac │ │ │ +0002b400: 652e 3c2f 6469 763e 3c64 6976 2063 6c61 e.
    De │ │ │ +0002b420: 6669 6e69 7469 6f6e 3c2f 623e 2063 6861 finition cha │ │ │ +0002b430: 7274 5465 7374 696e 672e 683a 3238 3c2f rtTesting.h:28
    .
    │ │ │ +0002b490: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    gtsa │ │ │ +0002b4e0: 6d3a 3a73 706c 6974 3c2f 613e 3c2f 6469 m::split
    void split │ │ │ +0002b510: 2863 6f6e 7374 2047 2026 616d 703b 672c (const G &g, │ │ │ +0002b520: 2063 6f6e 7374 2050 7265 6465 6365 7373 const Predecess │ │ │ +0002b530: 6f72 4d61 7026 6c74 3b20 4b45 5920 2667 orMap< KEY &g │ │ │ +0002b540: 743b 2026 616d 703b 7472 6565 2c20 4720 t; &tree, G │ │ │ +0002b550: 2661 6d70 3b41 6231 2c20 4720 2661 6d70 &Ab1, G & │ │ │ +0002b560: 3b41 6232 293c 2f64 6976 3e3c 6469 7620 ;Ab2)
    Sp │ │ │ +0002b580: 6c69 7420 7468 6520 6772 6170 6820 696e lit the graph in │ │ │ +0002b590: 746f 2074 776f 2070 6172 7473 3a20 6f6e to two parts: on │ │ │ +0002b5a0: 6520 636f 7272 6573 706f 6e64 7320 746f e corresponds to │ │ │ +0002b5b0: 2074 6865 2067 6976 656e 2073 7061 6e6e the given spann │ │ │ +0002b5c0: 696e 6720 7472 6565 2c20 616e 6420 7468 ing tree, and th │ │ │ +0002b5d0: 6520 6f74 6865 7220 636f 7272 6573 706f e other correspo │ │ │ +0002b5e0: 6e64 732e 2e2e 3c2f 6469 763e 3c64 6976 nds...
    < │ │ │ +0002b600: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ +0002b610: 2067 7261 7068 2d69 6e6c 2e68 3a32 3535 graph-inl.h:255 │ │ │ +0002b620: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    gt │ │ │ +0002b6c0: 7361 6d3a 3a64 6f74 3c2f 613e 3c2f 6469 sam::dot
    double dot │ │ │ +0002b6f0: 2863 6f6e 7374 2056 3120 2661 6d70 3b61 (const V1 &a │ │ │ +0002b700: 2c20 636f 6e73 7420 5632 2026 616d 703b , const V2 & │ │ │ +0002b710: 6229 3c2f 6469 763e 3c64 6976 2063 6c61 b)
    Dot p │ │ │ +0002b730: 726f 6475 6374 2e3c 2f64 6976 3e3c 6469 roduct.
    │ │ │ +0002b750: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition Vector.h:195
    .< │ │ │ +0002b7e0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ +0002b7f0: 223e 5465 6d70 6c61 7465 2074 6f20 6372 ">Template to cr │ │ │ +0002b800: 6561 7465 2061 2062 696e 6172 7920 7072 eate a binary pr │ │ │ +0002b810: 6564 6963 6174 652e 3c2f 6469 763e 3c64 edicate.
    Definition Testable.h:11 │ │ │ +0002b850: 313c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 1
    .
    gtsam │ │ │ +0002b8b0: 3a3a 4173 7369 676e 6d65 6e74 3c2f 613e ::Assignment │ │ │ +0002b8c0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    An assi │ │ │ +0002b8e0: 676e 6d65 6e74 2066 726f 6d20 6c61 6265 gnment from labe │ │ │ +0002b8f0: 6c73 2074 6f20 7661 6c75 6520 696e 6465 ls to value inde │ │ │ +0002b900: 7820 2873 697a 655f 7429 2e3c 2f64 6976 x (size_t).
    Definitio │ │ │ +0002b930: 6e3c 2f62 3e20 4173 7369 676e 6d65 6e74 n Assignment │ │ │ +0002b940: 2e68 3a33 373c 2f64 6976 3e3c 2f64 6976 .h:37
    .
    g │ │ │ +0002b9a0: 7473 616d 3a3a 4465 6369 7369 6f6e 5472 tsam::DecisionTr │ │ │ +0002b9b0: 6565 3a3a 4c65 6166 3c2f 613e 3c2f 6469 ee::Leaf
    Definiti │ │ │ +0002b9e0: 6f6e 3c2f 623e 2044 6563 6973 696f 6e54 on DecisionT │ │ │ +0002b9f0: 7265 652d 696e 6c2e 683a 3532 3c2f 6469 ree-inl.h:52
    .
    gtsam: │ │ │ +0002baa0: 3a44 6563 6973 696f 6e54 7265 653a 3a4c :DecisionTree::L │ │ │ +0002bab0: 6561 663a 3a63 686f 6f73 653c 2f61 3e3c eaf::choose< │ │ │ +0002bac0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    NodePtr │ │ │ +0002bae0: 2063 686f 6f73 6528 636f 6e73 7420 4c20 choose(const L │ │ │ +0002baf0: 2661 6d70 3b6c 6162 656c 2c20 7369 7a65 &label, size │ │ │ +0002bb00: 5f74 2069 6e64 6578 2920 636f 6e73 7420 _t index) const │ │ │ +0002bb10: 6f76 6572 7269 6465 3c2f 6469 763e 3c64 override
    choose a branch │ │ │ +0002bb40: 2c20 6372 6561 7465 206e 6577 206d 656d , create new mem │ │ │ +0002bb50: 6f72 7920 213c 2f64 6976 3e3c 6469 7620 ory !
    Definition │ │ │ +0002bb80: 4465 6369 7369 6f6e 5472 6565 2d69 6e6c DecisionTree-inl │ │ │ +0002bb90: 2e68 3a31 3439 3c2f 6469 763e 3c2f 6469 .h:149
    .
    gtsam::Decis │ │ │ +0002bc40: 696f 6e54 7265 653a 3a4c 6561 663a 3a6f ionTree::Leaf::o │ │ │ +0002bc50: 7065 7261 746f 7228 293c 2f61 3e3c 2f64 perator()
    const Y & │ │ │ +0002bc80: 616d 703b 206f 7065 7261 746f 7228 2928 amp; operator()( │ │ │ +0002bc90: 636f 6e73 7420 4173 7369 676e 6d65 6e74 const Assignment │ │ │ +0002bca0: 266c 743b 204c 2026 6774 3b20 2661 6d70 < L > & │ │ │ +0002bcb0: 3b78 2920 636f 6e73 7420 6f76 6572 7269 ;x) const overri │ │ │ +0002bcc0: 6465 3c2f 6469 763e 3c64 6976 2063 6c61 de
    evalu │ │ │ +0002bce0: 6174 653c 2f64 6976 3e3c 6469 7620 636c ate
    D │ │ │ +0002bd00: 6566 696e 6974 696f 6e3c 2f62 3e20 4465 efinition De │ │ │ +0002bd10: 6369 7369 6f6e 5472 6565 2d69 6e6c 2e68 cisionTree-inl.h │ │ │ +0002bd20: 3a31 3130 3c2f 6469 763e 3c2f 6469 763e :110
    │ │ │ +0002bd30: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    │ │ │ +0002be00: 4e6f 6465 5074 7220 6170 706c 7928 636f NodePtr apply(co │ │ │ +0002be10: 6e73 7420 556e 6172 7941 7373 6967 6e6d nst UnaryAssignm │ │ │ +0002be20: 656e 7420 2661 6d70 3b6f 702c 2063 6f6e ent &op, con │ │ │ +0002be30: 7374 2041 7373 6967 6e6d 656e 7426 6c74 st Assignment< │ │ │ +0002be40: 3b20 4c20 2667 743b 2026 616d 703b 6173 ; L > &as │ │ │ +0002be50: 7369 676e 6d65 6e74 2920 636f 6e73 7420 signment) const │ │ │ +0002be60: 6f76 6572 7269 6465 3c2f 6469 763e 3c64 override
    Apply unary ope │ │ │ +0002be90: 7261 746f 7220 7769 7468 2061 7373 6967 rator with assig │ │ │ +0002bea0: 6e6d 656e 742e 3c2f 6469 763e 3c64 6976 nment.
    < │ │ │ +0002bec0: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ +0002bed0: 2044 6563 6973 696f 6e54 7265 652d 696e DecisionTree-in │ │ │ +0002bee0: 6c2e 683a 3132 313c 2f64 6976 3e3c 2f64 l.h:121
    .
    │ │ │ +0002bfb0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    bool equals( │ │ │ +0002bfd0: 636f 6e73 7420 4e6f 6465 2026 616d 703b const Node & │ │ │ +0002bfe0: 712c 2063 6f6e 7374 2043 6f6d 7061 7265 q, const Compare │ │ │ +0002bff0: 4675 6e63 2026 616d 703b 636f 6d70 6172 Func &compar │ │ │ +0002c000: 6529 2063 6f6e 7374 206f 7665 7272 6964 e) const overrid │ │ │ +0002c010: 653c 2f64 6976 3e3c 6469 7620 636c 6173 e
    equali │ │ │ +0002c030: 7479 2075 7020 746f 2074 6f6c 6572 616e ty up to toleran │ │ │ +0002c040: 6365 3c2f 6469 763e 3c64 6976 2063 6c61 ce
    De │ │ │ +0002c060: 6669 6e69 7469 6f6e 3c2f 623e 2044 6563 finition Dec │ │ │ +0002c070: 6973 696f 6e54 7265 652d 696e 6c2e 683a isionTree-inl.h: │ │ │ +0002c080: 3837 3c2f 6469 763e 3c2f 6469 763e 0a3c 87
    .< │ │ │ +0002c090: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ +0002c0a0: 6964 3d22 6161 3032 3737 365f 6874 6d6c id="aa02776_html │ │ │ +0002c0b0: 5f61 3763 3231 6461 6661 6262 3566 6261 _a7c21dafabb5fba │ │ │ +0002c0c0: 3661 3661 6263 6362 3839 6564 3230 3739 6a6abccb89ed2079 │ │ │ +0002c0d0: 3563 223e 3c64 6976 2063 6c61 7373 3d22 5c">Y constant_
    constant s │ │ │ +0002c190: 746f 7265 6420 696e 2074 6869 7320 6c65 tored in this le │ │ │ +0002c1a0: 6166 3c2f 6469 763e 3c64 6976 2063 6c61 af
    De │ │ │ +0002c1c0: 6669 6e69 7469 6f6e 3c2f 623e 2044 6563 finition Dec │ │ │ +0002c1d0: 6973 696f 6e54 7265 652d 696e 6c2e 683a isionTree-inl.h: │ │ │ +0002c1e0: 3534 3c2f 6469 763e 3c2f 6469 763e 0a3c 54
    .< │ │ │ +0002c1f0: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ +0002c200: 6964 3d22 6161 3032 3737 365f 6874 6d6c id="aa02776_html │ │ │ +0002c210: 5f61 3835 6536 3464 6336 6431 6434 6534 _a85e64dc6d1d4e4 │ │ │ +0002c220: 3063 6135 3639 6439 3739 6236 3535 3433 0ca569d979b65543 │ │ │ +0002c230: 6535 223e 3c64 6976 2063 6c61 7373 3d22 e5">
    vo │ │ │ +0002c2c0: 6964 2070 7269 6e74 2863 6f6e 7374 2073 id print(const s │ │ │ +0002c2d0: 7464 3a3a 7374 7269 6e67 2026 616d 703b td::string & │ │ │ +0002c2e0: 732c 2063 6f6e 7374 204c 6162 656c 466f s, const LabelFo │ │ │ +0002c2f0: 726d 6174 7465 7220 2661 6d70 3b6c 6162 rmatter &lab │ │ │ +0002c300: 656c 466f 726d 6174 7465 722c 2063 6f6e elFormatter, con │ │ │ +0002c310: 7374 2056 616c 7565 466f 726d 6174 7465 st ValueFormatte │ │ │ +0002c320: 7220 2661 6d70 3b76 616c 7565 466f 726d r &valueForm │ │ │ +0002c330: 6174 7465 7229 2063 6f6e 7374 206f 7665 atter) const ove │ │ │ +0002c340: 7272 6964 653c 2f64 6976 3e3c 6469 7620 rride
    pr │ │ │ +0002c360: 696e 743c 2f64 6976 3e3c 6469 7620 636c int
    D │ │ │ +0002c380: 6566 696e 6974 696f 6e3c 2f62 3e20 4465 efinition De │ │ │ +0002c390: 6369 7369 6f6e 5472 6565 2d69 6e6c 2e68 cisionTree-inl.h │ │ │ +0002c3a0: 3a39 343c 2f64 6976 3e3c 2f64 6976 3e0a :94
    . │ │ │ +0002c3b0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    N │ │ │ +0002c480: 6f64 6550 7472 2061 7070 6c79 2863 6f6e odePtr apply(con │ │ │ +0002c490: 7374 2055 6e61 7279 2026 616d 703b 6f70 st Unary &op │ │ │ +0002c4a0: 2920 636f 6e73 7420 6f76 6572 7269 6465 ) const override │ │ │ +0002c4b0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    apply u │ │ │ +0002c4d0: 6e61 7279 206f 7065 7261 746f 723c 2f64 nary operator
    Definit │ │ │ +0002c500: 696f 6e3c 2f62 3e20 4465 6369 7369 6f6e ion Decision │ │ │ +0002c510: 5472 6565 2d69 6e6c 2e68 3a31 3135 3c2f Tree-inl.h:115
    .
    │ │ │ +0002c570: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 .
    < │ │ │ +0002c760: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ +0002c770: 6922 3e4c 6561 6628 636f 6e73 7420 5920 i">Leaf(const Y │ │ │ +0002c780: 2661 6d70 3b63 6f6e 7374 616e 742c 2073 &constant, s │ │ │ +0002c790: 697a 655f 7420 6e72 4173 7369 676e 6d65 ize_t nrAssignme │ │ │ +0002c7a0: 6e74 733d 3129 3c2f 6469 763e 3c64 6976 nts=1)
    C │ │ │ +0002c7c0: 6f6e 7374 7275 6374 6f72 2066 726f 6d20 onstructor from │ │ │ +0002c7d0: 636f 6e73 7461 6e74 2e3c 2f64 6976 3e3c constant.
    < │ │ │ +0002c7e0: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ +0002c7f0: 223e 3c62 3e44 6566 696e 6974 696f 6e3c ">Definition< │ │ │ +0002c800: 2f62 3e20 4465 6369 7369 6f6e 5472 6565 /b> DecisionTree │ │ │ +0002c810: 2d69 6e6c 2e68 3a36 353c 2f64 6976 3e3c -inl.h:65
    < │ │ │ +0002c820: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ +0002c880: 6120 6872 6566 3d22 6130 3237 3736 2e68 a href="a02776.h │ │ │ +0002c890: 746d 6c23 6162 3932 3036 3930 3338 3030 tml#ab9206903800 │ │ │ +0002c8a0: 3830 3735 3165 6138 3037 6535 6233 6365 80751ea807e5b3ce │ │ │ +0002c8b0: 3962 3638 3322 3e67 7473 616d 3a3a 4465 9b683">gtsam::De │ │ │ +0002c8c0: 6369 7369 6f6e 5472 6565 3a3a 4c65 6166 cisionTree::Leaf │ │ │ +0002c8d0: 3a3a 6e72 4173 7369 676e 6d65 6e74 735f ::nrAssignments_ │ │ │ +0002c8e0: 3c2f 613e 3c2f 6469 763e 3c64 6976 2063
    si │ │ │ +0002c900: 7a65 5f74 206e 7241 7373 6967 6e6d 656e ze_t nrAssignmen │ │ │ +0002c910: 7473 5f3c 2f64 6976 3e3c 6469 7620 636c ts_
    The │ │ │ +0002c930: 6e75 6d62 6572 206f 6620 6173 7369 676e number of assign │ │ │ +0002c940: 6d65 6e74 7320 636f 6e74 6169 6e65 6420 ments contained │ │ │ +0002c950: 7769 7468 696e 2074 6869 7320 6c65 6166 within this leaf │ │ │ +0002c960: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def │ │ │ +0002c980: 696e 6974 696f 6e3c 2f62 3e20 4465 6369 inition Deci │ │ │ +0002c990: 7369 6f6e 5472 6565 2d69 6e6c 2e68 3a35 sionTree-inl.h:5 │ │ │ +0002c9a0: 393c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 9
    .
    void │ │ │ +0002ca80: 646f 7428 7374 643a 3a6f 7374 7265 616d dot(std::ostream │ │ │ +0002ca90: 2026 616d 703b 6f73 2c20 636f 6e73 7420 &os, const │ │ │ +0002caa0: 4c61 6265 6c46 6f72 6d61 7474 6572 2026 LabelFormatter & │ │ │ +0002cab0: 616d 703b 6c61 6265 6c46 6f72 6d61 7474 amp;labelFormatt │ │ │ +0002cac0: 6572 2c20 636f 6e73 7420 5661 6c75 6546 er, const ValueF │ │ │ +0002cad0: 6f72 6d61 7474 6572 2026 616d 703b 7661 ormatter &va │ │ │ +0002cae0: 6c75 6546 6f72 6d61 7474 6572 2c20 626f lueFormatter, bo │ │ │ +0002caf0: 6f6c 2073 686f 775a 6572 6f29 2063 6f6e ol showZero) con │ │ │ +0002cb00: 7374 206f 7665 7272 6964 653c 2f64 6976 st override
    Write graphv │ │ │ +0002cb30: 697a 2066 6f72 6d61 7420 746f 2073 7472 iz format to str │ │ │ +0002cb40: 6561 6d20 6f73 2e3c 2f64 6976 3e3c 6469 eam os.
    │ │ │ +0002cb60: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition DecisionTree-i │ │ │ +0002cb80: 6e6c 2e68 3a31 3030 3c2f 6469 763e 3c2f nl.h:100
    .
    < │ │ │ +0002cc50: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ +0002cc60: 6922 3e4c 6561 6628 293c 2f64 6976 3e3c i">Leaf()
    < │ │ │ +0002cc70: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ +0002cc80: 223e 4465 6661 756c 7420 636f 6e73 7472 ">Default constr │ │ │ +0002cc90: 7563 746f 7220 666f 7220 7365 7269 616c uctor for serial │ │ │ +0002cca0: 697a 6174 696f 6e2e 3c2f 6469 763e 3c64 ization.
    Definition DecisionTree- │ │ │ +0002cce0: 696e 6c2e 683a 3632 3c2f 6469 763e 3c2f inl.h:62
    .
    gtsam::Dec │ │ │ +0002cd90: 6973 696f 6e54 7265 653a 3a4c 6561 663a isionTree::Leaf: │ │ │ +0002cda0: 3a73 616d 654c 6561 663c 2f61 3e3c 2f64 :sameLeaf
    bool same │ │ │ +0002cdd0: 4c65 6166 2863 6f6e 7374 204e 6f64 6520 Leaf(const Node │ │ │ +0002cde0: 2661 6d70 3b71 2920 636f 6e73 7420 6f76 &q) const ov │ │ │ +0002cdf0: 6572 7269 6465 3c2f 6469 763e 3c64 6976 erride
    p │ │ │ +0002ce10: 6f6c 796d 6f72 7068 6963 2065 7175 616c olymorphic equal │ │ │ +0002ce20: 6974 793a 2069 7320 7120 6120 6c65 6166 ity: is q a leaf │ │ │ +0002ce30: 2061 6e64 2069 7320 6974 2074 6865 2073 and is it the s │ │ │ +0002ce40: 616d 6520 6173 2074 6869 7320 6c65 6166 ame as this leaf │ │ │ +0002ce50: 3f3c 2f64 6976 3e3c 6469 7620 636c 6173 ?
    Def │ │ │ +0002ce70: 696e 6974 696f 6e3c 2f62 3e20 4465 6369 inition Deci │ │ │ +0002ce80: 7369 6f6e 5472 6565 2d69 6e6c 2e68 3a38 sionTree-inl.h:8 │ │ │ +0002ce90: 323c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 2
    .
    │ │ │ +0002cf70: 636f 6e73 7420 5920 2661 6d70 3b20 636f const Y & co │ │ │ +0002cf80: 6e73 7461 6e74 2829 2063 6f6e 7374 3c2f nstant() const
    Return th │ │ │ +0002cfb0: 6520 636f 6e73 7461 6e74 2e3c 2f64 6976 e constant.
    Definitio │ │ │ +0002cfe0: 6e3c 2f62 3e20 4465 6369 7369 6f6e 5472 n DecisionTr │ │ │ +0002cff0: 6565 2d69 6e6c 2e68 3a36 393c 2f64 6976 ee-inl.h:69
    .
    s │ │ │ +0002d0e0: 697a 655f 7420 6e72 4173 7369 676e 6d65 ize_t nrAssignme │ │ │ +0002d0f0: 6e74 7328 2920 636f 6e73 743c 2f64 6976 nts() const
    Return the n │ │ │ +0002d120: 756d 6265 7220 6f66 2061 7373 6967 6e6d umber of assignm │ │ │ +0002d130: 656e 7473 2063 6f6e 7461 696e 6564 2077 ents contained w │ │ │ +0002d140: 6974 6869 6e20 7468 6973 206c 6561 662e ithin this leaf. │ │ │ +0002d150: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ +0002d170: 6e69 7469 6f6e 3c2f 623e 2044 6563 6973 nition Decis │ │ │ +0002d180: 696f 6e54 7265 652d 696e 6c2e 683a 3734 ionTree-inl.h:74 │ │ │ +0002d190: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    . │ │ │ +0002d1c0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 < │ │ │ +0002d210: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ +0002d220: 223e 3c62 3e44 6566 696e 6974 696f 6e3c ">Definition< │ │ │ +0002d230: 2f62 3e20 4465 6369 7369 6f6e 5472 6565 /b> DecisionTree │ │ │ +0002d240: 2d69 6e6c 2e68 3a31 3732 3c2f 6469 763e -inl.h:172
    │ │ │ +0002d250: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +0002d2b0: 3c61 2068 7265 663d 2261 3032 3738 302e gtsam::D │ │ │ +0002d2f0: 6563 6973 696f 6e54 7265 653a 3a43 686f ecisionTree::Cho │ │ │ +0002d300: 6963 653a 3a61 7070 6c79 3c2f 613e 3c2f ice::apply
    NodePtr │ │ │ +0002d330: 6170 706c 7928 636f 6e73 7420 556e 6172 apply(const Unar │ │ │ +0002d340: 7920 2661 6d70 3b6f 7029 2063 6f6e 7374 y &op) const │ │ │ +0002d350: 206f 7665 7272 6964 653c 2f64 6976 3e3c override
    < │ │ │ +0002d360: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ +0002d370: 223e 6170 706c 7920 756e 6172 7920 6f70 ">apply unary op │ │ │ +0002d380: 6572 6174 6f72 2e3c 2f64 6976 3e3c 6469 erator.
    │ │ │ +0002d3a0: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition DecisionTree-i │ │ │ +0002d3c0: 6e6c 2e68 3a33 3839 3c2f 6469 763e 3c2f nl.h:389
    .
    gtsam::Dec │ │ │ +0002d470: 6973 696f 6e54 7265 653a 3a43 686f 6963 isionTree::Choic │ │ │ +0002d480: 653a 3a43 686f 6963 653c 2f61 3e3c 2f64 e::Choice
    Choice(co │ │ │ +0002d4b0: 6e73 7420 4c20 2661 6d70 3b6c 6162 656c nst L &label │ │ │ +0002d4c0: 2c20 636f 6e73 7420 4368 6f69 6365 2026 , const Choice & │ │ │ +0002d4d0: 616d 703b 662c 2063 6f6e 7374 2055 6e61 amp;f, const Una │ │ │ +0002d4e0: 7279 4173 7369 676e 6d65 6e74 2026 616d ryAssignment &am │ │ │ +0002d4f0: 703b 6f70 2c20 636f 6e73 7420 4173 7369 p;op, const Assi │ │ │ +0002d500: 676e 6d65 6e74 266c 743b 204c 2026 6774 gnment< L > │ │ │ +0002d510: 3b20 2661 6d70 3b61 7373 6967 6e6d 656e ; &assignmen │ │ │ +0002d520: 7429 3c2f 6469 763e 3c64 6976 2063 6c61 t)
    Const │ │ │ +0002d540: 7275 6374 6f72 2077 6869 6368 2061 6363 ructor which acc │ │ │ +0002d550: 6570 7473 2061 2055 6e61 7279 4173 7369 epts a UnaryAssi │ │ │ +0002d560: 676e 6d65 6e74 206f 7020 616e 6420 7468 gnment op and th │ │ │ +0002d570: 6520 636f 7272 6573 706f 6e64 696e 6720 e corresponding │ │ │ +0002d580: 6173 7369 676e 6d65 6e74 2e3c 2f64 6976 assignment.
    Definitio │ │ │ +0002d5b0: 6e3c 2f62 3e20 4465 6369 7369 6f6e 5472 n DecisionTr │ │ │ +0002d5c0: 6565 2d69 6e6c 2e68 3a33 3639 3c2f 6469 ee-inl.h:369
    .
    const │ │ │ +0002d6b0: 4c20 2661 6d70 3b20 6c61 6265 6c28 2920 L & label() │ │ │ +0002d6c0: 636f 6e73 743c 2f64 6976 3e3c 6469 7620 const
    Re │ │ │ +0002d6e0: 7475 726e 2074 6865 206c 6162 656c 206f turn the label o │ │ │ +0002d6f0: 6620 7468 6973 2063 686f 6963 6520 6e6f f this choice no │ │ │ +0002d700: 6465 2e3c 2f64 6976 3e3c 6469 7620 636c de.
    D │ │ │ +0002d720: 6566 696e 6974 696f 6e3c 2f62 3e20 4465 efinition De │ │ │ +0002d730: 6369 7369 6f6e 5472 6565 2d69 6e6c 2e68 cisionTree-inl.h │ │ │ +0002d740: 3a32 3538 3c2f 6469 763e 3c2f 6469 763e :258
    │ │ │ +0002d750: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    void print(con │ │ │ +0002d830: 7374 2073 7464 3a3a 7374 7269 6e67 2026 st std::string & │ │ │ +0002d840: 616d 703b 732c 2063 6f6e 7374 204c 6162 amp;s, const Lab │ │ │ +0002d850: 656c 466f 726d 6174 7465 7220 2661 6d70 elFormatter & │ │ │ +0002d860: 3b6c 6162 656c 466f 726d 6174 7465 722c ;labelFormatter, │ │ │ +0002d870: 2063 6f6e 7374 2056 616c 7565 466f 726d const ValueForm │ │ │ +0002d880: 6174 7465 7220 2661 6d70 3b76 616c 7565 atter &value │ │ │ +0002d890: 466f 726d 6174 7465 7229 2063 6f6e 7374 Formatter) const │ │ │ +0002d8a0: 206f 7665 7272 6964 653c 2f64 6976 3e3c override
    < │ │ │ +0002d8b0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ +0002d8c0: 223e 7072 696e 7420 2861 7320 6120 7472 ">print (as a tr │ │ │ +0002d8d0: 6565 292e 3c2f 6469 763e 3c64 6976 2063 ee).
    │ │ │ +0002d8f0: 4465 6669 6e69 7469 6f6e 3c2f 623e 2044 Definition D │ │ │ +0002d900: 6563 6973 696f 6e54 7265 652d 696e 6c2e ecisionTree-inl. │ │ │ +0002d910: 683a 3238 303c 2f64 6976 3e3c 2f64 6976 h:280
    .
    < │ │ │ +0002d9e0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ +0002d9f0: 6922 3e4e 6f64 6550 7472 2061 7070 6c79 i">NodePtr apply │ │ │ +0002da00: 2863 6f6e 7374 2055 6e61 7279 4173 7369 (const UnaryAssi │ │ │ +0002da10: 676e 6d65 6e74 2026 616d 703b 6f70 2c20 gnment &op, │ │ │ +0002da20: 636f 6e73 7420 4173 7369 676e 6d65 6e74 const Assignment │ │ │ +0002da30: 266c 743b 204c 2026 6774 3b20 2661 6d70 < L > & │ │ │ +0002da40: 3b61 7373 6967 6e6d 656e 7429 2063 6f6e ;assignment) con │ │ │ +0002da50: 7374 206f 7665 7272 6964 653c 2f64 6976 st override
    Apply unary │ │ │ +0002da80: 6f70 6572 6174 6f72 2077 6974 6820 6173 operator with as │ │ │ +0002da90: 7369 676e 6d65 6e74 2e3c 2f64 6976 3e3c signment.
    < │ │ │ +0002daa0: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ +0002dab0: 223e 3c62 3e44 6566 696e 6974 696f 6e3c ">Definition< │ │ │ +0002dac0: 2f62 3e20 4465 6369 7369 6f6e 5472 6565 /b> DecisionTree │ │ │ +0002dad0: 2d69 6e6c 2e68 3a33 3935 3c2f 6469 763e -inl.h:395
    │ │ │ +0002dae0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +0002db40: 3c61 2068 7265 663d 2261 3032 3738 302e gtsam::D │ │ │ +0002db80: 6563 6973 696f 6e54 7265 653a 3a43 686f ecisionTree::Cho │ │ │ +0002db90: 6963 653a 3a6c 6162 656c 5f3c 2f61 3e3c ice::label_< │ │ │ +0002dba0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    L label │ │ │ +0002dbc0: 5f3c 2f64 6976 3e3c 6469 7620 636c 6173 _
    the la │ │ │ +0002dbe0: 6265 6c20 6f66 2074 6865 2076 6172 6961 bel of the varia │ │ │ +0002dbf0: 626c 6520 6f6e 2077 6869 6368 2077 6520 ble on which we │ │ │ +0002dc00: 7370 6c69 743c 2f64 6976 3e3c 6469 7620 split
    Definition │ │ │ +0002dc30: 4465 6369 7369 6f6e 5472 6565 2d69 6e6c DecisionTree-inl │ │ │ +0002dc40: 2e68 3a31 3734 3c2f 6469 763e 3c2f 6469 .h:174
    .
    gtsam::Decis │ │ │ +0002dcf0: 696f 6e54 7265 653a 3a43 686f 6963 653a ionTree::Choice: │ │ │ +0002dd00: 3a73 616d 654c 6561 663c 2f61 3e3c 2f64 :sameLeaf
    bool same │ │ │ +0002dd30: 4c65 6166 2863 6f6e 7374 204e 6f64 6520 Leaf(const Node │ │ │ +0002dd40: 2661 6d70 3b71 2920 636f 6e73 7420 6f76 &q) const ov │ │ │ +0002dd50: 6572 7269 6465 3c2f 6469 763e 3c64 6976 erride
    p │ │ │ +0002dd70: 6f6c 796d 6f72 7068 6963 2065 7175 616c olymorphic equal │ │ │ +0002dd80: 6974 793a 2069 6620 7120 6973 2061 206c ity: if q is a l │ │ │ +0002dd90: 6561 662c 2063 6f75 6c64 2062 652e 2e2e eaf, could be... │ │ │ +0002dda0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ +0002ddc0: 6e69 7469 6f6e 3c2f 623e 2044 6563 6973 nition Decis │ │ │ +0002ddd0: 696f 6e54 7265 652d 696e 6c2e 683a 3331 ionTree-inl.h:31 │ │ │ +0002dde0: 383c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 8
    .
    │ │ │ +0002dec0: 4368 6f69 6365 2863 6f6e 7374 2043 686f Choice(const Cho │ │ │ +0002ded0: 6963 6520 2661 6d70 3b66 2c20 636f 6e73 ice &f, cons │ │ │ +0002dee0: 7420 4368 6f69 6365 2026 616d 703b 672c t Choice &g, │ │ │ +0002def0: 2063 6f6e 7374 2042 696e 6172 7920 2661 const Binary &a │ │ │ +0002df00: 6d70 3b6f 7029 3c2f 6469 763e 3c64 6976 mp;op)
    C │ │ │ +0002df20: 6f6e 7374 7275 6374 2066 726f 6d20 6170 onstruct from ap │ │ │ +0002df30: 706c 7969 6e67 2062 696e 6172 7920 6f70 plying binary op │ │ │ +0002df40: 2074 6f20 7477 6f20 4368 6f69 6365 206e to two Choice n │ │ │ +0002df50: 6f64 6573 2e3c 2f64 6976 3e3c 6469 7620 odes.
    Definition │ │ │ +0002df80: 4465 6369 7369 6f6e 5472 6565 2d69 6e6c DecisionTree-inl │ │ │ +0002df90: 2e68 3a32 3330 3c2f 6469 763e 3c2f 6469 .h:230
    .
    gtsam::Decis │ │ │ +0002e040: 696f 6e54 7265 653a 3a43 686f 6963 653a ionTree::Choice: │ │ │ +0002e050: 3a70 7573 685f 6261 636b 3c2f 613e 3c2f :push_back
    void pus │ │ │ +0002e080: 685f 6261 636b 2863 6f6e 7374 204e 6f64 h_back(const Nod │ │ │ +0002e090: 6550 7472 2026 616d 703b 6e6f 6465 293c ePtr &node)< │ │ │ +0002e0a0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    add a br │ │ │ +0002e0c0: 616e 6368 3a20 544f 444f 206d 6572 6765 anch: TODO merge │ │ │ +0002e0d0: 2069 6e74 6f20 636f 6e73 7472 7563 746f into constructo │ │ │ +0002e0e0: 723c 2f64 6976 3e3c 6469 7620 636c 6173 r
    Def │ │ │ +0002e100: 696e 6974 696f 6e3c 2f62 3e20 4465 6369 inition Deci │ │ │ +0002e110: 7369 6f6e 5472 6565 2d69 6e6c 2e68 3a32 sionTree-inl.h:2 │ │ │ +0002e120: 3731 3c2f 6469 763e 3c2f 6469 763e 0a3c 71
    .< │ │ │ +0002e130: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ +0002e140: 6964 3d22 6161 3032 3738 305f 6874 6d6c id="aa02780_html │ │ │ +0002e150: 5f61 6131 3132 3136 6433 3066 6131 6430 _aa11216d30fa1d0 │ │ │ +0002e160: 6162 6632 6634 6432 3666 3832 6331 6637 abf2f4d26f82c1f7 │ │ │ +0002e170: 3832 223e 3c64 6976 2063 6c61 7373 3d22 82"> │ │ │ +0002e1f0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    std::vector& │ │ │ +0002e210: 6c74 3b20 4e6f 6465 5074 7220 2667 743b lt; NodePtr > │ │ │ +0002e220: 2062 7261 6e63 6865 735f 3c2f 6469 763e branches_
    │ │ │ +0002e230: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    The children │ │ │ +0002e250: 6f66 2074 6869 7320 4368 6f69 6365 206e of this Choice n │ │ │ +0002e260: 6f64 652e 3c2f 6469 763e 3c64 6976 2063 ode.
    │ │ │ +0002e280: 4465 6669 6e69 7469 6f6e 3c2f 623e 2044 Definition D │ │ │ +0002e290: 6563 6973 696f 6e54 7265 652d 696e 6c2e ecisionTree-inl. │ │ │ +0002e2a0: 683a 3137 373c 2f64 6976 3e3c 2f64 6976 h:177
    .
    │ │ │ +0002e370: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Choice()
    Default con │ │ │ +0002e3b0: 7374 7275 6374 6f72 2066 6f72 2073 6572 structor for ser │ │ │ +0002e3c0: 6961 6c69 7a61 7469 6f6e 2e3c 2f64 6976 ialization.
    Definitio │ │ │ +0002e3f0: 6e3c 2f62 3e20 4465 6369 7369 6f6e 5472 n DecisionTr │ │ │ +0002e400: 6565 2d69 6e6c 2e68 3a31 3930 3c2f 6469 ee-inl.h:190
    .
    c │ │ │ +0002e4f0: 6f6e 7374 2059 2026 616d 703b 206f 7065 onst Y & ope │ │ │ +0002e500: 7261 746f 7228 2928 636f 6e73 7420 4173 rator()(const As │ │ │ +0002e510: 7369 676e 6d65 6e74 266c 743b 204c 2026 signment< L & │ │ │ +0002e520: 6774 3b20 2661 6d70 3b78 2920 636f 6e73 gt; &x) cons │ │ │ +0002e530: 7420 6f76 6572 7269 6465 3c2f 6469 763e t override
    │ │ │ +0002e540: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    evaluate
    Definitio │ │ │ +0002e580: 6e3c 2f62 3e20 4465 6369 7369 6f6e 5472 n DecisionTr │ │ │ +0002e590: 6565 2d69 6e6c 2e68 3a33 3336 3c2f 6469 ee-inl.h:336
    .
    Choic │ │ │ +0002e680: 6528 636f 6e73 7420 4c20 2661 6d70 3b6c e(const L &l │ │ │ +0002e690: 6162 656c 2c20 7369 7a65 5f74 2063 6f75 abel, size_t cou │ │ │ +0002e6a0: 6e74 293c 2f64 6976 3e3c 6469 7620 636c nt)
    Cons │ │ │ +0002e6c0: 7472 7563 746f 722c 2067 6976 656e 2063 tructor, given c │ │ │ +0002e6d0: 686f 6963 6520 6c61 6265 6c20 616e 6420 hoice label and │ │ │ +0002e6e0: 6d61 6e64 6174 6f72 7920 6578 7065 6374 mandatory expect │ │ │ +0002e6f0: 6564 2062 7261 6e63 6820 636f 756e 742e ed branch count. │ │ │ +0002e700: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ +0002e720: 6e69 7469 6f6e 3c2f 623e 2044 6563 6973 nition Decis │ │ │ +0002e730: 696f 6e54 7265 652d 696e 6c2e 683a 3232 ionTree-inl.h:22 │ │ │ +0002e740: 343c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 4
    .
    │ │ │ +0002e820: 4e6f 6465 5074 7220 6368 6f6f 7365 2863 NodePtr choose(c │ │ │ +0002e830: 6f6e 7374 204c 2026 616d 703b 6c61 6265 onst L &labe │ │ │ +0002e840: 6c2c 2073 697a 655f 7420 696e 6465 7829 l, size_t index) │ │ │ +0002e850: 2063 6f6e 7374 206f 7665 7272 6964 653c const override< │ │ │ +0002e860: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    choose a │ │ │ +0002e880: 2062 7261 6e63 682c 2072 6563 7572 7369 branch, recursi │ │ │ +0002e890: 7665 6c79 3c2f 6469 763e 3c64 6976 2063 vely
    │ │ │ +0002e8b0: 4465 6669 6e69 7469 6f6e 3c2f 623e 2044 Definition D │ │ │ +0002e8c0: 6563 6973 696f 6e54 7265 652d 696e 6c2e ecisionTree-inl. │ │ │ +0002e8d0: 683a 3433 343c 2f64 6976 3e3c 2f64 6976 h:434
    .
    void dot(std::o │ │ │ +0002e9c0: 7374 7265 616d 2026 616d 703b 6f73 2c20 stream &os, │ │ │ +0002e9d0: 636f 6e73 7420 4c61 6265 6c46 6f72 6d61 const LabelForma │ │ │ +0002e9e0: 7474 6572 2026 616d 703b 6c61 6265 6c46 tter &labelF │ │ │ +0002e9f0: 6f72 6d61 7474 6572 2c20 636f 6e73 7420 ormatter, const │ │ │ +0002ea00: 5661 6c75 6546 6f72 6d61 7474 6572 2026 ValueFormatter & │ │ │ +0002ea10: 616d 703b 7661 6c75 6546 6f72 6d61 7474 amp;valueFormatt │ │ │ +0002ea20: 6572 2c20 626f 6f6c 2073 686f 775a 6572 er, bool showZer │ │ │ +0002ea30: 6f29 2063 6f6e 7374 206f 7665 7272 6964 o) const overrid │ │ │ +0002ea40: 653c 2f64 6976 3e3c 6469 7620 636c 6173 e
    output │ │ │ +0002ea60: 2074 6f20 6772 6170 6876 697a 2028 6173 to graphviz (as │ │ │ +0002ea70: 2061 2061 2067 7261 7068 293c 2f64 6976 a a graph)
    Definitio │ │ │ +0002eaa0: 6e3c 2f62 3e20 4465 6369 7369 6f6e 5472 n DecisionTr │ │ │ +0002eab0: 6565 2d69 6e6c 2e68 3a32 3930 3c2f 6469 ee-inl.h:290
    .< │ │ │ +0002ec50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ +0002ecb0: 6120 6872 6566 3d22 6130 3237 3830 2e68 a href="a02780.h │ │ │ +0002ecc0: 746d 6c23 6166 3936 6332 3331 3633 3662 tml#af96c231636b │ │ │ +0002ecd0: 3534 3862 6234 6466 3934 3165 3564 3137 548bb4df941e5d17 │ │ │ +0002ece0: 3265 3032 6622 3e67 7473 616d 3a3a 4465 2e02f">gtsam::De │ │ │ +0002ecf0: 6369 7369 6f6e 5472 6565 3a3a 4368 6f69 cisionTree::Choi │ │ │ +0002ed00: 6365 3a3a 556e 6971 7565 3c2f 613e 3c2f ce::Unique
    static N │ │ │ +0002ed30: 6f64 6550 7472 2055 6e69 7175 6528 636f odePtr Unique(co │ │ │ +0002ed40: 6e73 7420 4368 6f69 6365 5074 7220 2661 nst ChoicePtr &a │ │ │ +0002ed50: 6d70 3b66 293c 2f64 6976 3e3c 6469 7620 mp;f)
    If │ │ │ +0002ed70: 2061 6c6c 2062 7261 6e63 6865 7320 6f66 all branches of │ │ │ +0002ed80: 2061 2063 686f 6963 6520 6e6f 6465 2066 a choice node f │ │ │ +0002ed90: 2061 7265 2074 6865 2073 616d 652c 206a are the same, j │ │ │ +0002eda0: 7573 7420 7265 7475 726e 2061 2062 7261 ust return a bra │ │ │ +0002edb0: 6e63 682e 3c2f 6469 763e 3c64 6976 2063 nch.
    │ │ │ +0002edd0: 4465 6669 6e69 7469 6f6e 3c2f 623e 2044 Definition D │ │ │ +0002ede0: 6563 6973 696f 6e54 7265 652d 696e 6c2e ecisionTree-inl. │ │ │ +0002edf0: 683a 3230 303c 2f64 6976 3e3c 2f64 6976 h:200
    .
    │ │ │ +0002eec0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    bool equals( │ │ │ +0002eee0: 636f 6e73 7420 4e6f 6465 2026 616d 703b const Node & │ │ │ +0002eef0: 712c 2063 6f6e 7374 2043 6f6d 7061 7265 q, const Compare │ │ │ +0002ef00: 4675 6e63 2026 616d 703b 636f 6d70 6172 Func &compar │ │ │ +0002ef10: 6529 2063 6f6e 7374 206f 7665 7272 6964 e) const overrid │ │ │ +0002ef20: 653c 2f64 6976 3e3c 6469 7620 636c 6173 e
    equali │ │ │ +0002ef40: 7479 3c2f 6469 763e 3c64 6976 2063 6c61 ty
    De │ │ │ +0002ef60: 6669 6e69 7469 6f6e 3c2f 623e 2044 6563 finition Dec │ │ │ +0002ef70: 6973 696f 6e54 7265 652d 696e 6c2e 683a isionTree-inl.h: │ │ │ +0002ef80: 3332 333c 2f64 6976 3e3c 2f64 6976 3e0a 323
    . │ │ │ +0002ef90: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    gts │ │ │ +0002efe0: 616d 3a3a 5669 7369 743c 2f61 3e3c 2f64 am::Visit
    Functor pe │ │ │ +0002f010: 7266 6f72 6d69 6e67 2064 6570 7468 2d66 rforming depth-f │ │ │ +0002f020: 6972 7374 2076 6973 6974 2074 6f20 6561 irst visit to ea │ │ │ +0002f030: 6368 206c 6561 6620 7769 7468 2074 6865 ch leaf with the │ │ │ +0002f040: 206c 6561 6620 7661 6c75 6520 6173 2074 leaf value as t │ │ │ +0002f050: 6865 2061 7267 756d 656e 742e 3c2f 6469 he argument.
    Definiti │ │ │ +0002f080: 6f6e 3c2f 623e 2044 6563 6973 696f 6e54 on DecisionT │ │ │ +0002f090: 7265 652d 696e 6c2e 683a 3731 353c 2f64 ree-inl.h:715
    .
    < │ │ │ +0002f0f0: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ +0002f100: 6522 3e3c 6120 6872 6566 3d22 6130 3237 e">gtsam │ │ │ +0002f140: 3a3a 5669 7369 743a 3a66 3c2f 613e 3c2f ::Visit::f
    F f
    folding func │ │ │ +0002f190: 7469 6f6e 206f 626a 6563 742e 3c2f 6469 tion object.
    Definiti │ │ │ +0002f1c0: 6f6e 3c2f 623e 2044 6563 6973 696f 6e54 on DecisionT │ │ │ +0002f1d0: 7265 652d 696e 6c2e 683a 3731 383c 2f64 ree-inl.h:718
    .
    < │ │ │ +0002f230: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ +0002f240: 6522 3e3c 6120 6872 6566 3d22 6130 3237 e">gtsam │ │ │ +0002f280: 3a3a 5669 7369 743a 3a6f 7065 7261 746f ::Visit::operato │ │ │ +0002f290: 7228 293c 2f61 3e3c 2f64 6976 3e3c 6469 r()
    void operator() │ │ │ +0002f2c0: 2863 6f6e 7374 2074 7970 656e 616d 6520 (const typename │ │ │ +0002f2d0: 4465 6369 7369 6f6e 5472 6565 266c 743b DecisionTree< │ │ │ +0002f2e0: 204c 2c20 5920 2667 743b 3a3a 4e6f 6465 L, Y >::Node │ │ │ +0002f2f0: 5074 7220 2661 6d70 3b6e 6f64 6529 2063 Ptr &node) c │ │ │ +0002f300: 6f6e 7374 3c2f 6469 763e 3c64 6976 2063 onst
    Do │ │ │ +0002f320: 6120 6465 7074 682d 6669 7273 7420 7669 a depth-first vi │ │ │ +0002f330: 7369 7420 6f6e 2074 6865 2074 7265 6520 sit on the tree │ │ │ +0002f340: 726f 6f74 6564 2061 7420 6e6f 6465 2e3c rooted at node.< │ │ │ +0002f350: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ +0002f370: 6974 696f 6e3c 2f62 3e20 4465 6369 7369 ition Decisi │ │ │ +0002f380: 6f6e 5472 6565 2d69 6e6c 2e68 3a37 3231 onTree-inl.h:721 │ │ │ +0002f390: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    V │ │ │ +0002f460: 6973 6974 2846 2066 293c 2f64 6976 3e3c isit(F f)
    < │ │ │ +0002f470: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ +0002f480: 223e 436f 6e73 7472 7563 7420 6672 6f6d ">Construct from │ │ │ +0002f490: 2066 6f6c 6469 6e67 2066 756e 6374 696f folding functio │ │ │ +0002f4a0: 6e2e 3c2f 6469 763e 3c64 6976 2063 6c61 n.
    De │ │ │ +0002f4c0: 6669 6e69 7469 6f6e 3c2f 623e 2044 6563 finition Dec │ │ │ +0002f4d0: 6973 696f 6e54 7265 652d 696e 6c2e 683a isionTree-inl.h: │ │ │ +0002f4e0: 3731 373c 2f64 6976 3e3c 2f64 6976 3e0a 717
    . │ │ │ +0002f4f0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    Functo │ │ │ +0002f570: 7220 7065 7266 6f72 6d69 6e67 2064 6570 r performing dep │ │ │ +0002f580: 7468 2d66 6972 7374 2076 6973 6974 2074 th-first visit t │ │ │ +0002f590: 6f20 6561 6368 206c 6561 6620 7769 7468 o each leaf with │ │ │ +0002f5a0: 2074 6865 204c 6561 6620 6f62 6a65 6374 the Leaf object │ │ │ +0002f5b0: 2070 6173 7365 6420 6173 2061 6e20 6172 passed as an ar │ │ │ +0002f5c0: 6775 6d65 6e74 2e3c 2f64 6976 3e3c 6469 gument.
    │ │ │ +0002f5e0: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition DecisionTree-i │ │ │ +0002f600: 6e6c 2e68 3a37 3532 3c2f 6469 763e 3c2f nl.h:752
    .
    V │ │ │ +0002f6e0: 6973 6974 4c65 6166 2846 2066 293c 2f64 isitLeaf(F f)
    Construct │ │ │ +0002f710: 6672 6f6d 2066 6f6c 6469 6e67 2066 756e from folding fun │ │ │ +0002f720: 6374 696f 6e2e 3c2f 6469 763e 3c64 6976 ction.
    < │ │ │ +0002f740: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ +0002f750: 2044 6563 6973 696f 6e54 7265 652d 696e DecisionTree-in │ │ │ +0002f760: 6c2e 683a 3735 343c 2f64 6976 3e3c 2f64 l.h:754
    .
    v │ │ │ +0002f840: 6f69 6420 6f70 6572 6174 6f72 2829 2863 oid operator()(c │ │ │ +0002f850: 6f6e 7374 2074 7970 656e 616d 6520 4465 onst typename De │ │ │ +0002f860: 6369 7369 6f6e 5472 6565 266c 743b 204c cisionTree< L │ │ │ +0002f870: 2c20 5920 2667 743b 3a3a 4e6f 6465 5074 , Y >::NodePt │ │ │ +0002f880: 7220 2661 6d70 3b6e 6f64 6529 2063 6f6e r &node) con │ │ │ +0002f890: 7374 3c2f 6469 763e 3c64 6976 2063 6c61 st
    Do a │ │ │ +0002f8b0: 6465 7074 682d 6669 7273 7420 7669 7369 depth-first visi │ │ │ +0002f8c0: 7420 6f6e 2074 6865 2074 7265 6520 726f t on the tree ro │ │ │ +0002f8d0: 6f74 6564 2061 7420 6e6f 6465 2e3c 2f64 oted at node.
    Definit │ │ │ +0002f900: 696f 6e3c 2f62 3e20 4465 6369 7369 6f6e ion Decision │ │ │ +0002f910: 5472 6565 2d69 6e6c 2e68 3a37 3538 3c2f Tree-inl.h:758
    ..< │ │ │ +0002fa70: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ +0002fa80: 6964 3d22 6161 3032 3739 325f 6874 6d6c id="aa02792_html │ │ │ +0002fa90: 223e 3c64 6976 2063 6c61 7373 3d22 7474 ">
    gtsa │ │ │ +0002fac0: 6d3a 3a56 6973 6974 5769 7468 3c2f 613e m::VisitWith │ │ │ +0002fad0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Functor │ │ │ +0002faf0: 2070 6572 666f 726d 696e 6720 6465 7074 performing dept │ │ │ +0002fb00: 682d 6669 7273 7420 7669 7369 7420 746f h-first visit to │ │ │ +0002fb10: 2065 6163 6820 6c65 6166 2077 6974 6820 each leaf with │ │ │ +0002fb20: 7468 6520 6c65 6166 2773 2041 7373 6967 the leaf's Assig │ │ │ +0002fb30: 6e6d 656e 7426 6c74 3b4c 2667 743b 2061 nment<L> a │ │ │ +0002fb40: 6e64 2076 616c 7565 2070 6173 7365 6420 nd value passed │ │ │ +0002fb50: 6173 2061 2e2e 2e3c 2f64 6976 3e3c 6469 as a...
    │ │ │ +0002fb70: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition DecisionTree-i │ │ │ +0002fb90: 6e6c 2e68 3a37 3836 3c2f 6469 763e 3c2f nl.h:786
    .
    V │ │ │ +0002fc70: 6973 6974 5769 7468 2846 2066 293c 2f64 isitWith(F f)
    Construct │ │ │ +0002fca0: 6672 6f6d 2066 6f6c 6469 6e67 2066 756e from folding fun │ │ │ +0002fcb0: 6374 696f 6e2e 3c2f 6469 763e 3c64 6976 ction.
    < │ │ │ +0002fcd0: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ +0002fce0: 2044 6563 6973 696f 6e54 7265 652d 696e DecisionTree-in │ │ │ +0002fcf0: 6c2e 683a 3738 383c 2f64 6976 3e3c 2f64 l.h:788
    .
    A │ │ │ +0002fdd0: 7373 6967 6e6d 656e 7426 6c74 3b20 4c20 ssignment< L │ │ │ +0002fde0: 2667 743b 2061 7373 6967 6e6d 656e 743c > assignment< │ │ │ +0002fdf0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Assignme │ │ │ +0002fe10: 6e74 2c20 6d75 7461 7469 6e67 2074 6872 nt, mutating thr │ │ │ +0002fe20: 6f75 6768 2072 6563 7572 7369 6f6e 2e3c ough recursion.< │ │ │ +0002fe30: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ +0002fe50: 6974 696f 6e3c 2f62 3e20 4465 6369 7369 ition Decisi │ │ │ +0002fe60: 6f6e 5472 6565 2d69 6e6c 2e68 3a37 3839 onTree-inl.h:789 │ │ │ +0002fe70: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    gt │ │ │ +0002ff10: 7361 6d3a 3a56 6973 6974 5769 7468 3a3a sam::VisitWith:: │ │ │ +0002ff20: 6f70 6572 6174 6f72 2829 3c2f 613e 3c2f operator()
    void ope │ │ │ +0002ff50: 7261 746f 7228 2928 636f 6e73 7420 7479 rator()(const ty │ │ │ +0002ff60: 7065 6e61 6d65 2044 6563 6973 696f 6e54 pename DecisionT │ │ │ +0002ff70: 7265 6526 6c74 3b20 4c2c 2059 2026 6774 ree< L, Y > │ │ │ +0002ff80: 3b3a 3a4e 6f64 6550 7472 2026 616d 703b ;::NodePtr & │ │ │ +0002ff90: 6e6f 6465 293c 2f64 6976 3e3c 6469 7620 node)
    Do │ │ │ +0002ffb0: 2061 2064 6570 7468 2d66 6972 7374 2076 a depth-first v │ │ │ +0002ffc0: 6973 6974 206f 6e20 7468 6520 7472 6565 isit on the tree │ │ │ +0002ffd0: 2072 6f6f 7465 6420 6174 206e 6f64 652e rooted at node. │ │ │ +0002ffe0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ +00030000: 6e69 7469 6f6e 3c2f 623e 2044 6563 6973 nition Decis │ │ │ +00030010: 696f 6e54 7265 652d 696e 6c2e 683a 3739 ionTree-inl.h:79 │ │ │ +00030020: 333c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 3
    .
    │ │ │ +000300f0: 4620 663c 2f64 6976 3e3c 6469 7620 636c F f
    fold │ │ │ +00030110: 696e 6720 6675 6e63 7469 6f6e 206f 626a ing function obj │ │ │ +00030120: 6563 742e 3c2f 6469 763e 3c64 6976 2063 ect.
    │ │ │ +00030140: 4465 6669 6e69 7469 6f6e 3c2f 623e 2044 Definition D │ │ │ +00030150: 6563 6973 696f 6e54 7265 652d 696e 6c2e ecisionTree-inl. │ │ │ +00030160: 683a 3739 303c 2f64 6976 3e3c 2f64 6976 h:790
    .
    a │ │ │ +000301f0: 2064 6563 6973 696f 6e20 7472 6565 2069 decision tree i │ │ │ +00030200: 7320 6120 6675 6e63 7469 6f6e 2066 726f s a function fro │ │ │ +00030210: 6d20 6173 7369 676e 6d65 6e74 7320 746f m assignments to │ │ │ +00030220: 2076 616c 7565 732e 3c2f 6469 763e 3c64 values.
    Definition DecisionTree. │ │ │ +00030260: 683a 3631 3c2f 6469 763e 3c2f 6469 763e h:61
    │ │ │ +00030270: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    gtsam::Decisio │ │ │ +00030310: 6e54 7265 653a 3a61 7070 6c79 3c2f 613e nTree::apply │ │ │ +00030320: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Decisi │ │ │ +00030340: 6f6e 5472 6565 2061 7070 6c79 2863 6f6e onTree apply(con │ │ │ +00030350: 7374 2055 6e61 7279 2026 616d 703b 6f70 st Unary &op │ │ │ +00030360: 2920 636f 6e73 743c 2f64 6976 3e3c 6469 ) const
    │ │ │ +00030380: 6170 706c 7920 556e 6172 7920 6f70 6572 apply Unary oper │ │ │ +00030390: 6174 696f 6e20 2671 756f 743b 6f70 2671 ation "op&q │ │ │ +000303a0: 756f 743b 2074 6f20 663c 2f64 6976 3e3c uot; to f
    < │ │ │ +000303b0: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ +000303c0: 223e 3c62 3e44 6566 696e 6974 696f 6e3c ">Definition< │ │ │ +000303d0: 2f62 3e20 4465 6369 7369 6f6e 5472 6565 /b> DecisionTree │ │ │ +000303e0: 2d69 6e6c 2e68 3a38 3839 3c2f 6469 763e -inl.h:889
    │ │ │ +000303f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00030450: 3c61 2068 7265 663d 2261 3032 3739 362e gtsam::D │ │ │ +00030490: 6563 6973 696f 6e54 7265 653a 3a63 6f6e ecisionTree::con │ │ │ +000304a0: 7665 7274 4672 6f6d 3c2f 613e 3c2f 6469 vertFrom
    NodePtr co │ │ │ +000304d0: 6e76 6572 7446 726f 6d28 636f 6e73 7420 nvertFrom(const │ │ │ +000304e0: 7479 7065 6e61 6d65 2044 6563 6973 696f typename Decisio │ │ │ +000304f0: 6e54 7265 6526 6c74 3b20 4d2c 2058 2026 nTree< M, X & │ │ │ +00030500: 6774 3b3a 3a4e 6f64 6550 7472 2026 616d gt;::NodePtr &am │ │ │ +00030510: 703b 662c 2073 7464 3a3a 6675 6e63 7469 p;f, std::functi │ │ │ +00030520: 6f6e 266c 743b 204c 2863 6f6e 7374 204d on< L(const M │ │ │ +00030530: 2026 616d 703b 2926 6774 3b20 4c5f 6f66 &)> L_of │ │ │ +00030540: 5f4d 2c20 7374 643a 3a66 756e 6374 696f _M, std::functio │ │ │ +00030550: 6e26 6c74 3b20 5928 636f 6e73 7420 5820 n< Y(const X │ │ │ +00030560: 2661 6d70 3b29 2667 743b 2059 5f6f 665f &)> Y_of_ │ │ │ +00030570: 5829 2063 6f6e 7374 3c2f 6469 763e 3c64 X) const
    Convert from a │ │ │ +000305a0: 4465 6369 7369 6f6e 5472 6565 266c 743b DecisionTree< │ │ │ +000305b0: 4d2c 2058 2667 743b 2074 6f20 4465 6369 M, X> to Deci │ │ │ +000305c0: 7369 6f6e 5472 6565 266c 743b 4c2c 2059 sionTree<L, Y │ │ │ +000305d0: 2667 743b 2e3c 2f64 6976 3e3c 6469 7620 >.
    Definition │ │ │ +00030600: 4465 6369 7369 6f6e 5472 6565 2d69 6e6c DecisionTree-inl │ │ │ +00030610: 2e68 3a36 3731 3c2f 6469 763e 3c2f 6469 .h:671
    ..
    │ │ │ +000308b0: 7479 7065 6e61 6d65 204e 6f64 653a 3a50 typename Node::P │ │ │ +000308c0: 7472 204e 6f64 6550 7472 3c2f 6469 763e tr NodePtr
    │ │ │ +000308d0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    ------------- │ │ │ +000308f0: 2d2d 2d2d 2d2d 2d2d e280 9420 4e6f 6465 --------... Node │ │ │ +00030900: 2062 6173 6520 636c 6173 7320 2d2d 2d2d base class ---- │ │ │ +00030910: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ +00030920: 2d2d 2d2d e280 943c 2f64 6976 3e3c 6469 ----...
    │ │ │ +00030940: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition DecisionTree.h │ │ │ +00030960: 3a31 3433 3c2f 6469 763e 3c2f 6469 763e :143
    │ │ │ +00030970: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    std:: │ │ │ +00030a40: 7365 7426 6c74 3b20 4c20 2667 743b 206c set< L > l │ │ │ +00030a50: 6162 656c 7328 2920 636f 6e73 743c 2f64 abels() const
    Retrieve a │ │ │ +00030a80: 6c6c 2075 6e69 7175 6520 6c61 6265 6c73 ll unique labels │ │ │ +00030a90: 2061 7320 6120 7365 742e 3c2f 6469 763e as a set.
    │ │ │ +00030aa0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ +00030ac0: 3c2f 623e 2044 6563 6973 696f 6e54 7265 DecisionTre │ │ │ +00030ad0: 652d 696e 6c2e 683a 3835 333c 2f64 6976 e-inl.h:853
    .bool empty() co │ │ │ +00030bc0: 6e73 743c 2f64 6976 3e3c 6469 7620 636c nst
    Chec │ │ │ +00030be0: 6b20 6966 2074 7265 6520 6973 2065 6d70 k if tree is emp │ │ │ +00030bf0: 7479 2e3c 2f64 6976 3e3c 6469 7620 636c ty.
    D │ │ │ +00030c10: 6566 696e 6974 696f 6e3c 2f62 3e20 4465 efinition De │ │ │ +00030c20: 6369 7369 6f6e 5472 6565 2e68 3a32 3537 cisionTree.h:257 │ │ │ +00030c30: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    gt │ │ │ +00030cd0: 7361 6d3a 3a44 6563 6973 696f 6e54 7265 sam::DecisionTre │ │ │ +00030ce0: 653a 3a76 6973 6974 3c2f 613e 3c2f 6469 e::visit
    void visit │ │ │ +00030d10: 2846 756e 6320 6629 2063 6f6e 7374 3c2f (Func f) const
    Visit all │ │ │ +00030d40: 206c 6561 7665 7320 696e 2064 6570 7468 leaves in depth │ │ │ +00030d50: 2d66 6972 7374 2066 6173 6869 6f6e 2e3c -first fashion.< │ │ │ +00030d60: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ +00030d80: 6974 696f 6e3c 2f62 3e20 4465 6369 7369 ition Decisi │ │ │ +00030d90: 6f6e 5472 6565 2d69 6e6c 2e68 3a37 3336 onTree-inl.h:736 │ │ │ +00030da0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    void v │ │ │ +00030e80: 6973 6974 4c65 6166 2846 756e 6320 6629 isitLeaf(Func f) │ │ │ +00030e90: 2063 6f6e 7374 3c2f 6469 763e 3c64 6976 const
    V │ │ │ +00030eb0: 6973 6974 2061 6c6c 206c 6561 7665 7320 isit all leaves │ │ │ +00030ec0: 696e 2064 6570 7468 2d66 6972 7374 2066 in depth-first f │ │ │ +00030ed0: 6173 6869 6f6e 2e3c 2f64 6976 3e3c 6469 ashion.
    │ │ │ +00030ef0: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition DecisionTree-i │ │ │ +00030f10: 6e6c 2e68 3a37 3733 3c2f 6469 763e 3c2f nl.h:773
    .
    st │ │ │ +00030ff0: 643a 3a66 756e 6374 696f 6e26 6c74 3b20 d::function< │ │ │ +00031000: 5928 636f 6e73 7420 5920 2661 6d70 3b29 Y(const Y &) │ │ │ +00031010: 2667 743b 2055 6e61 7279 3c2f 6469 763e > Unary
    │ │ │ +00031020: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Handy typedef │ │ │ +00031040: 7320 666f 7220 756e 6172 7920 616e 6420 s for unary and │ │ │ +00031050: 6269 6e61 7279 2066 756e 6374 696f 6e20 binary function │ │ │ +00031060: 7479 7065 732e 3c2f 6469 763e 3c64 6976 types.
    < │ │ │ +00031080: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ +00031090: 2044 6563 6973 696f 6e54 7265 652e 683a DecisionTree.h: │ │ │ +000310a0: 3734 3c2f 6469 763e 3c2f 6469 763e 0a3c 74
    .< │ │ │ +000310b0: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ +000310c0: 6964 3d22 6161 3032 3739 365f 6874 6d6c id="aa02796_html │ │ │ +000310d0: 5f61 3733 6361 3535 3833 6163 3264 6262 _a73ca5583ac2dbb │ │ │ +000310e0: 3236 6163 6366 6335 3464 6536 3961 3963 26accfc54de69a9c │ │ │ +000310f0: 3061 223e 3c64 6976 2063 6c61 7373 3d22 0a">
    │ │ │ +00031140: 6774 7361 6d3a 3a44 6563 6973 696f 6e54 gtsam::DecisionT │ │ │ +00031150: 7265 653a 3a66 6f6c 643c 2f61 3e3c 2f64 ree::fold
    X fold(Fu │ │ │ +00031180: 6e63 2066 2c20 5820 7830 2920 636f 6e73 nc f, X x0) cons │ │ │ +00031190: 743c 2f64 6976 3e3c 6469 7620 636c 6173 t
    Fold a │ │ │ +000311b0: 2062 696e 6172 7920 6675 6e63 7469 6f6e binary function │ │ │ +000311c0: 206f 7665 7220 7468 6520 7472 6565 2c20 over the tree, │ │ │ +000311d0: 7265 7475 726e 696e 6720 6163 6375 6d75 returning accumu │ │ │ +000311e0: 6c61 746f 722e 3c2f 6469 763e 3c64 6976 lator.
    < │ │ │ +00031200: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ +00031210: 2044 6563 6973 696f 6e54 7265 652d 696e DecisionTree-in │ │ │ +00031220: 6c2e 683a 3833 333c 2f64 6976 3e3c 2f64 l.h:833
    ..
    │ │ │ +00031500: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    GTSAM-style p │ │ │ +00031520: 7269 6e74 2e3c 2f64 6976 3e3c 6469 7620 rint.
    Definition │ │ │ +00031550: 4465 6369 7369 6f6e 5472 6565 2d69 6e6c DecisionTree-inl │ │ │ +00031560: 2e68 3a38 3732 3c2f 6469 763e 3c2f 6469 .h:872
    .
    De │ │ │ +00031640: 6369 7369 6f6e 5472 6565 2063 6f6d 6269 cisionTree combi │ │ │ +00031650: 6e65 2863 6f6e 7374 204c 2026 616d 703b ne(const L & │ │ │ +00031660: 6c61 6265 6c2c 2073 697a 655f 7420 6361 label, size_t ca │ │ │ +00031670: 7264 696e 616c 6974 792c 2063 6f6e 7374 rdinality, const │ │ │ +00031680: 2042 696e 6172 7920 2661 6d70 3b6f 7029 Binary &op) │ │ │ +00031690: 2063 6f6e 7374 3c2f 6469 763e 3c64 6976 const
    c │ │ │ +000316b0: 6f6d 6269 6e65 2073 7562 7472 6565 7320 ombine subtrees │ │ │ +000316c0: 6f6e 206b 6579 2077 6974 6820 6269 6e61 on key with bina │ │ │ +000316d0: 7279 206f 7065 7261 7469 6f6e 2026 7175 ry operation &qu │ │ │ +000316e0: 6f74 3b6f 7026 7175 6f74 3b3c 2f64 6976 ot;op"
    Definitio │ │ │ +00031710: 6e3c 2f62 3e20 4465 6369 7369 6f6e 5472 n DecisionTr │ │ │ +00031720: 6565 2d69 6e6c 2e68 3a39 3337 3c2f 6469 ee-inl.h:937
    .
    gtsam: │ │ │ +000317d0: 3a44 6563 6973 696f 6e54 7265 653a 3a76 :DecisionTree::v │ │ │ +000317e0: 6973 6974 5769 7468 3c2f 613e 3c2f 6469 isitWith
    void visit │ │ │ +00031810: 5769 7468 2846 756e 6320 6629 2063 6f6e With(Func f) con │ │ │ +00031820: 7374 3c2f 6469 763e 3c64 6976 2063 6c61 st
    Visit │ │ │ +00031840: 2061 6c6c 206c 6561 7665 7320 696e 2064 all leaves in d │ │ │ +00031850: 6570 7468 2d66 6972 7374 2066 6173 6869 epth-first fashi │ │ │ +00031860: 6f6e 2e3c 2f64 6976 3e3c 6469 7620 636c on.
    D │ │ │ +00031880: 6566 696e 6974 696f 6e3c 2f62 3e20 4465 efinition De │ │ │ +00031890: 6369 7369 6f6e 5472 6565 2d69 6e6c 2e68 cisionTree-inl.h │ │ │ +000318a0: 3a38 3136 3c2f 6469 763e 3c2f 6469 763e :816
    │ │ │ +000318b0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    c │ │ │ +00031980: 6f6e 7374 2059 2026 616d 703b 206f 7065 onst Y & ope │ │ │ +00031990: 7261 746f 7228 2928 636f 6e73 7420 4173 rator()(const As │ │ │ +000319a0: 7369 676e 6d65 6e74 266c 743b 204c 2026 signment< L & │ │ │ +000319b0: 6774 3b20 2661 6d70 3b78 2920 636f 6e73 gt; &x) cons │ │ │ +000319c0: 743c 2f64 6976 3e3c 6469 7620 636c 6173 t
    evalua │ │ │ +000319e0: 7465 3c2f 6469 763e 3c64 6976 2063 6c61 te
    De │ │ │ +00031a00: 6669 6e69 7469 6f6e 3c2f 623e 2044 6563 finition Dec │ │ │ +00031a10: 6973 696f 6e54 7265 652d 696e 6c2e 683a isionTree-inl.h: │ │ │ +00031a20: 3838 343c 2f64 6976 3e3c 2f64 6976 3e0a 884
    . │ │ │ +00031a30: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    gtsam::Decision │ │ │ +00031ad0: 5472 6565 3a3a 646f 743c 2f61 3e3c 2f64 Tree::dot
    void dot( │ │ │ +00031b00: 7374 643a 3a6f 7374 7265 616d 2026 616d std::ostream &am │ │ │ +00031b10: 703b 6f73 2c20 636f 6e73 7420 4c61 6265 p;os, const Labe │ │ │ +00031b20: 6c46 6f72 6d61 7474 6572 2026 616d 703b lFormatter & │ │ │ +00031b30: 6c61 6265 6c46 6f72 6d61 7474 6572 2c20 labelFormatter, │ │ │ +00031b40: 636f 6e73 7420 5661 6c75 6546 6f72 6d61 const ValueForma │ │ │ +00031b50: 7474 6572 2026 616d 703b 7661 6c75 6546 tter &valueF │ │ │ +00031b60: 6f72 6d61 7474 6572 2c20 626f 6f6c 2073 ormatter, bool s │ │ │ +00031b70: 686f 775a 6572 6f3d 7472 7565 2920 636f howZero=true) co │ │ │ +00031b80: 6e73 743c 2f64 6976 3e3c 6469 7620 636c nst
    outp │ │ │ +00031ba0: 7574 2074 6f20 6772 6170 6876 697a 2066 ut to graphviz f │ │ │ +00031bb0: 6f72 6d61 742c 2073 7472 6561 6d20 7665 ormat, stream ve │ │ │ +00031bc0: 7273 696f 6e3c 2f64 6976 3e3c 6469 7620 rsion
    Definition │ │ │ +00031bf0: 4465 6369 7369 6f6e 5472 6565 2d69 6e6c DecisionTree-inl │ │ │ +00031c00: 2e68 3a39 3439 3c2f 6469 763e 3c2f 6469 .h:949
    .
    . │ │ │ +00031d80: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    bo │ │ │ +00031e50: 6f6c 206f 7065 7261 746f 723d 3d28 636f ol operator==(co │ │ │ +00031e60: 6e73 7420 4465 6369 7369 6f6e 5472 6565 nst DecisionTree │ │ │ +00031e70: 2026 616d 703b 7129 2063 6f6e 7374 3c2f &q) const
    equality< │ │ │ +00031ea0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ +00031ec0: 6974 696f 6e3c 2f62 3e20 4465 6369 7369 ition Decisi │ │ │ +00031ed0: 6f6e 5472 6565 2d69 6e6c 2e68 3a38 3739 onTree-inl.h:879 │ │ │ +00031ee0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    gt │ │ │ +00031f80: 7361 6d3a 3a44 6563 6973 696f 6e54 7265 sam::DecisionTre │ │ │ +00031f90: 653a 3a4c 6162 656c 433c 2f61 3e3c 2f64 e::LabelC
    std::pair │ │ │ +00031fc0: 266c 743b 204c 2c20 7369 7a65 5f74 2026 < L, size_t & │ │ │ +00031fd0: 6774 3b20 4c61 6265 6c43 3c2f 6469 763e gt; LabelC
    │ │ │ +00031fe0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    A label annot │ │ │ +00032000: 6174 6564 2077 6974 6820 6361 7264 696e ated with cardin │ │ │ +00032010: 616c 6974 792e 3c2f 6469 763e 3c64 6976 ality.
    < │ │ │ +00032030: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ +00032040: 2044 6563 6973 696f 6e54 7265 652e 683a DecisionTree.h: │ │ │ +00032050: 3739 3c2f 6469 763e 3c2f 6469 763e 0a3c 79
    .< │ │ │ +00032060: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ +00032070: 6964 3d22 6161 3032 3739 365f 6874 6d6c id="aa02796_html │ │ │ +00032080: 5f61 6538 3065 3635 6139 3066 6539 6163 _ae80e65a90fe9ac │ │ │ +00032090: 3430 6235 6335 6134 6430 3764 6662 6264 40b5c5a4d07dfbbd │ │ │ +000320a0: 6137 223e 3c64 6976 2063 6c61 7373 3d22 a7">
    size_ │ │ │ +00032130: 7420 6e72 4c65 6176 6573 2829 2063 6f6e t nrLeaves() con │ │ │ +00032140: 7374 3c2f 6469 763e 3c64 6976 2063 6c61 st
    Retur │ │ │ +00032160: 6e20 7468 6520 6e75 6d62 6572 206f 6620 n the number of │ │ │ +00032170: 6c65 6176 6573 2069 6e20 7468 6520 7472 leaves in the tr │ │ │ +00032180: 6565 2e3c 2f64 6976 3e3c 6469 7620 636c ee.
    D │ │ │ +000321a0: 6566 696e 6974 696f 6e3c 2f62 3e20 4465 efinition De │ │ │ +000321b0: 6369 7369 6f6e 5472 6565 2d69 6e6c 2e68 cisionTree-inl.h │ │ │ +000321c0: 3a38 3233 3c2f 6469 763e 3c2f 6469 763e :823
    │ │ │ +000321d0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    DecisionTree()< │ │ │ +000322b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Default │ │ │ +000322d0: 636f 6e73 7472 7563 746f 7220 2866 6f72 constructor (for │ │ │ +000322e0: 2073 6572 6961 6c69 7a61 7469 6f6e 293c serialization)< │ │ │ +000322f0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ +00032310: 6974 696f 6e3c 2f62 3e20 4465 6369 7369 ition Decisi │ │ │ +00032320: 6f6e 5472 6565 2d69 6e6c 2e68 3a34 3632 onTree-inl.h:462 │ │ │ +00032330: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    . │ │ │ +00032360: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 │ │ │ +000323c0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ +000323d0: 2d2d 2d2d 2de2 8094 204e 6f64 6520 6261 -----... Node ba │ │ │ +000323e0: 7365 2063 6c61 7373 202d 2d2d 2d2d 2d2d se class ------- │ │ │ +000323f0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ +00032400: 2de2 8094 3c2f 6469 763e 3c64 6976 2063 -...
    │ │ │ +00032420: 4465 6669 6e69 7469 6f6e 3c2f 623e 2044 Definition D │ │ │ +00032430: 6563 6973 696f 6e54 7265 652e 683a 3836 ecisionTree.h:86 │ │ │ +00032440: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .
    .. │ │ │
    │ │ │
    . gtsam 4.2.0. . │ │ │ +000006f0: 203c 6469 7620 6964 3d22 7072 6f6a 6563
    gtsam.
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

    │ │ │ -Functions

    std::pair< DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr > gtsam::EliminateForMPE (const DiscreteFactorGraph &factors, const Ordering &frontalKeys)
     Alternate elimination function for that creates non-normalized lookup tables.
     
    std::pair< DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr > gtsam::EliminateDiscrete (const DiscreteFactorGraph &factors, const Ordering &frontalKeys)
     Main elimination function for DiscreteFactorGraph.
     
    │ │ │

    Detailed Description

    │ │ │ -
    Date
    Feb 14, 2011
    │ │ │ -
    Author
    Duy-Nguyen Ta
    │ │ │ -
    │ │ │ -Frank Dellaert
    │ │ │ +
    Date
    December 2021
    │ │ │ +
    Author
    Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,34 +1,20 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -DiscreteFactorGraph.cpp File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +DiscreteDistribution.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -std::pair< _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_: _g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_e_F_o_r_M_P_E (const │ │ │ │ -_s_h_a_r_e_d___p_t_r, DecisionTreeFactor:: _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h &factors, const │ │ │ │ - shared_ptr >  _O_r_d_e_r_i_n_g &frontalKeys) │ │ │ │ -  Alternate elimination function for that │ │ │ │ - creates non-normalized lookup tables. │ │ │ │ -  │ │ │ │ -std::pair< _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_: _g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_e_D_i_s_c_r_e_t_e (const │ │ │ │ -_s_h_a_r_e_d___p_t_r, DecisionTreeFactor:: _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h &factors, const │ │ │ │ - shared_ptr >  _O_r_d_e_r_i_n_g &frontalKeys) │ │ │ │ -  Main elimination function for │ │ │ │ - _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h. │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - Feb 14, 2011 │ │ │ │ + December 2021 │ │ │ │ Author │ │ │ │ - Duy-Nguyen Ta │ │ │ │ Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_._c_p_p │ │ │ │ + * _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00218.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteFactor.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteValues.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,52 +94,44 @@ │ │ │
    │ │ │
    │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ -Classes | │ │ │ Namespaces | │ │ │ Functions
    │ │ │ -
    DiscreteFactor.h File Reference
    │ │ │ +
    DiscreteValues.cpp File Reference
    │ │ │
    │ │ │
    │ │ │ - │ │ │ -

    Go to the source code of this file.

    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Classes

    class  gtsam::DiscreteFactor
     Base class for discrete probabilistic factors The most general one is the derived DecisionTreeFactor. More...
     
    struct  gtsam::traits< DiscreteFactor >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ Functions

    std::vector< double > gtsam::expNormalize (const std::vector< double > &logProbs)
     Normalize a set of log probabilities.
     
    │ │ │ +string gtsam::markdown (const DiscreteValues &values, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DiscreteValues::Names &names={})
     Free version of markdown.
     
    │ │ │ +string gtsam::html (const DiscreteValues &values, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DiscreteValues::Names &names={})
     Free version of html.
     
    │ │ │

    Detailed Description

    │ │ │ -
    Date
    Feb 14, 2011
    │ │ │ -
    Author
    Duy-Nguyen Ta
    │ │ │ -
    │ │ │ -Frank Dellaert
    │ │ │ +
    Date
    January, 2022
    │ │ │ +
    Author
    Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,34 +1,31 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -DiscreteFactor.h File Reference │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r │ │ │ │ -  Base class for discrete probabilistic factors The most general one is │ │ │ │ - the derived _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_i_s_c_r_e_t_e_F_a_c_t_o_r_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +DiscreteValues.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -std::vector< double >  _g_t_s_a_m_:_:_e_x_p_N_o_r_m_a_l_i_z_e (const std::vector< double > │ │ │ │ - &logProbs) │ │ │ │ -  Normalize a set of log probabilities. │ │ │ │ +string  ggttssaamm::::mmaarrkkddoowwnn (const _D_i_s_c_r_e_t_e_V_a_l_u_e_s &values, const _K_e_y_F_o_r_m_a_t_t_e_r │ │ │ │ + &keyFormatter=DefaultKeyFormatter, const _D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_N_a_m_e_s &names= │ │ │ │ + {}) │ │ │ │ +  Free version of markdown. │ │ │ │ +  │ │ │ │ +string  ggttssaamm::::hhttmmll (const _D_i_s_c_r_e_t_e_V_a_l_u_e_s &values, const _K_e_y_F_o_r_m_a_t_t_e_r │ │ │ │ + &keyFormatter=DefaultKeyFormatter, const _D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_N_a_m_e_s &names= │ │ │ │ + {}) │ │ │ │ +  Free version of html. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - Feb 14, 2011 │ │ │ │ + January, 2022 │ │ │ │ Author │ │ │ │ - Duy-Nguyen Ta │ │ │ │ Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_F_a_c_t_o_r_._h │ │ │ │ + * _D_i_s_c_r_e_t_e_V_a_l_u_e_s_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00218.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,4 @@ │ │ │ │ var a00218 = [ │ │ │ │ - ["gtsam::traits< DiscreteFactor >", "a02856.html", null], │ │ │ │ - ["expNormalize", "a00218.html#ae1c1177c8725296b34601409322400ea", null] │ │ │ │ + ["html", "a00218.html#a147114735037c2260d4810a8820e72f6", null], │ │ │ │ + ["markdown", "a00218.html#a2b6707b04064df79d26d1016dfa2a013", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00221.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteFactor.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DecisionTreeFactor.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,45 +94,45 @@ │ │ │
    │ │ │
    │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ -Namespaces | │ │ │ -Functions
    │ │ │ -
    DiscreteFactor.cpp File Reference
    │ │ │ +Classes | │ │ │ +Namespaces
    │ │ │ +
    DecisionTreeFactor.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    discrete factor │ │ │ -More...

    │ │ │ +

    Go to the source code of this file.

    │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Classes

    class  gtsam::DecisionTreeFactor
     A discrete probabilistic factor. More...
     
    struct  gtsam::traits< DecisionTreeFactor >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

    │ │ │ -Functions

    std::vector< double > gtsam::expNormalize (const std::vector< double > &logProbs)
     Normalize a set of log probabilities.
     
    │ │ │

    Detailed Description

    │ │ │ -

    discrete factor

    │ │ │ -
    Date
    Feb 14, 2011
    │ │ │ +
    Date
    Feb 14, 2011
    │ │ │
    Author
    Duy-Nguyen Ta
    │ │ │
    │ │ │ Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +1,28 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -DiscreteFactor.cpp File Reference │ │ │ │ -discrete factor _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +DecisionTreeFactor.h File Reference │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ + class   _g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r │ │ │ │ +  A discrete probabilistic factor. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -std::vector< double >  _g_t_s_a_m_:_:_e_x_p_N_o_r_m_a_l_i_z_e (const std::vector< double > │ │ │ │ - &logProbs) │ │ │ │ -  Normalize a set of log probabilities. │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -discrete factor │ │ │ │ Date │ │ │ │ Feb 14, 2011 │ │ │ │ Author │ │ │ │ Duy-Nguyen Ta │ │ │ │ Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_F_a_c_t_o_r_._c_p_p │ │ │ │ + * _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00221.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ var a00221 = [ │ │ │ │ - ["expNormalize", "a00221.html#ae1c1177c8725296b34601409322400ea", null] │ │ │ │ + ["gtsam::traits< DecisionTreeFactor >", "a02812.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00224.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteEliminationTree.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/Signature.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,43 +94,84 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Classes | │ │ │ -Namespaces
    │ │ │ -
    DiscreteEliminationTree.h File Reference
    │ │ │ +Namespaces | │ │ │ +Typedefs | │ │ │ +Functions | │ │ │ +Variables
    │ │ │ +
    Signature.cpp File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    Go to the source code of this file.

    │ │ │ +

    signatures for conditional densities │ │ │ +More...

    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Classes

    class  gtsam::DiscreteEliminationTree
     Elimination tree for discrete factors. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Typedefs

    │ │ │ +typedef string::const_iterator gtsam::parser::It
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Functions

    │ │ │ +Signature::Table gtsam::parser::logic (bool ff, bool ft, bool tf, bool tt)
     
    │ │ │ +ostream & gtsam::operator<< (ostream &os, const Signature::Row &row)
     
    │ │ │ +ostream & gtsam::operator<< (ostream &os, const Signature::Table &table)
     
    │ │ │ +ostream & gtsam::operator<< (ostream &os, const Signature &s)
     
    │ │ │ +Signature gtsam::operator| (const DiscreteKey &key, const DiscreteKey &parent)
     Helper function to create Signature objects example: Signature s = D | E;.
     
    │ │ │ +Signature gtsam::operator% (const DiscreteKey &key, const std::string &parent)
     Helper function to create Signature objects example: Signature s(D % "99/1");.
     
    │ │ │ +Signature gtsam::operator% (const DiscreteKey &key, const Signature::Table &parent)
     Helper function to create Signature objects, using table construction directly example: Signature s(D % table);.
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ +Variables

    │ │ │ +Signature::Row gtsam::parser::F {1, 0}
     
    │ │ │ +Signature::Row gtsam::parser::T {0, 1}
     
    │ │ │ +struct gtsam::parser::Grammar gtsam::parser::grammar
     
    │ │ │

    Detailed Description

    │ │ │ -
    Date
    Mar 29, 2013
    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ -
    │ │ │ -Richard Roberts
    │ │ │ +

    signatures for conditional densities

    │ │ │ +
    Author
    Frank Dellaert
    │ │ │ +
    Date
    Feb 27, 2011
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,26 +1,57 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -DiscreteEliminationTree.h File Reference │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e │ │ │ │ -  Elimination tree for discrete factors. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ +Signature.cpp File Reference │ │ │ │ +signatures for conditional densities _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +typedef string::const_iterator  ggttssaamm::::ppaarrsseerr::::IItt │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +Signature::Table  ggttssaamm::::ppaarrsseerr::::llooggiicc (bool ff, bool ft, bool tf, bool tt) │ │ │ │ +  │ │ │ │ + ostream &  ggttssaamm::::ooppeerraattoorr<<<< (ostream &os, const _S_i_g_n_a_t_u_r_e_:_:_R_o_w &_r_o_w) │ │ │ │ +  │ │ │ │ + ostream &  ggttssaamm::::ooppeerraattoorr<<<< (ostream &os, const Signature::Table │ │ │ │ + &table) │ │ │ │ +  │ │ │ │ + ostream &  ggttssaamm::::ooppeerraattoorr<<<< (ostream &os, const _S_i_g_n_a_t_u_r_e &s) │ │ │ │ +  │ │ │ │ + _S_i_g_n_a_t_u_r_e  ggttssaamm::::ooppeerraattoorr|| (const _D_i_s_c_r_e_t_e_K_e_y &key, const _D_i_s_c_r_e_t_e_K_e_y │ │ │ │ + &parent) │ │ │ │ +  Helper function to create _S_i_g_n_a_t_u_r_e objects example: │ │ │ │ + _S_i_g_n_a_t_u_r_e s = D | E;. │ │ │ │ +  │ │ │ │ + _S_i_g_n_a_t_u_r_e  ggttssaamm::::ooppeerraattoorr%% (const _D_i_s_c_r_e_t_e_K_e_y &key, const std::string │ │ │ │ + &parent) │ │ │ │ +  Helper function to create _S_i_g_n_a_t_u_r_e objects example: │ │ │ │ + _S_i_g_n_a_t_u_r_e s(D % "99/1");. │ │ │ │ +  │ │ │ │ + _S_i_g_n_a_t_u_r_e  ggttssaamm::::ooppeerraattoorr%% (const _D_i_s_c_r_e_t_e_K_e_y &key, const Signature:: │ │ │ │ + Table &parent) │ │ │ │ +  Helper function to create _S_i_g_n_a_t_u_r_e objects, using table │ │ │ │ + construction directly example: _S_i_g_n_a_t_u_r_e s(D % table);. │ │ │ │ +  │ │ │ │ +VVaarriiaabblleess │ │ │ │ + _S_i_g_n_a_t_u_r_e_:_:_R_o_w  ggttssaamm::::ppaarrsseerr::::FF {1, 0} │ │ │ │ +  │ │ │ │ + _S_i_g_n_a_t_u_r_e_:_:_R_o_w  ggttssaamm::::ppaarrsseerr::::TT {0, 1} │ │ │ │ +  │ │ │ │ +struct gtsam::parser::Grammar  ggttssaamm::::ppaarrsseerr::::ggrraammmmaarr │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ - Date │ │ │ │ - Mar 29, 2013 │ │ │ │ +signatures for conditional densities │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - Richard Roberts │ │ │ │ + Date │ │ │ │ + Feb 27, 2011 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_._h │ │ │ │ + * _S_i_g_n_a_t_u_r_e_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00227.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteEliminationTree.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/AlgebraicDecisionTree.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,34 +94,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ +Classes | │ │ │ Namespaces
    │ │ │ -
    DiscreteEliminationTree.cpp File Reference
    │ │ │ +
    AlgebraicDecisionTree.h File Reference
    │ │ │
    │ │ │
    │ │ │ + │ │ │ +

    Algebraic Decision Trees. │ │ │ +More...

    │ │ │ + │ │ │ +

    Go to the source code of this file.

    │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Classes

    class  gtsam::AlgebraicDecisionTree< L >
     An algebraic decision tree fixes the range of a DecisionTree to double. More...
     
    struct  gtsam::AlgebraicDecisionTree< L >::Ring
     The Real ring with addition and multiplication. More...
     
    struct  gtsam::traits< AlgebraicDecisionTree< T > >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │

    Detailed Description

    │ │ │ -
    Date
    Mar 29, 2013
    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ -
    │ │ │ -Richard Roberts
    │ │ │ +

    Algebraic Decision Trees.

    │ │ │ +
    Author
    Frank Dellaert
    │ │ │ +
    Date
    Mar 14, 2011
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,21 +1,33 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -DiscreteEliminationTree.cpp File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +AlgebraicDecisionTree.h File Reference │ │ │ │ +Algebraic Decision Trees. _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ + class   _g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_ _L_ _> │ │ │ │ +  An algebraic decision tree fixes the range of a _D_e_c_i_s_i_o_n_T_r_e_e to │ │ │ │ + double. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_ _L_ _>_:_:_R_i_n_g │ │ │ │ +  The Real ring with addition and multiplication. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_ _T_ _>_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ - Date │ │ │ │ - Mar 29, 2013 │ │ │ │ +Algebraic Decision Trees. │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - Richard Roberts │ │ │ │ + Date │ │ │ │ + Mar 14, 2011 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_._c_p_p │ │ │ │ + * _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00230.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteDistribution.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DecisionTreeFactor.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,43 +94,38 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Classes | │ │ │ Namespaces
    │ │ │ -
    DiscreteDistribution.h File Reference
    │ │ │ +
    DecisionTreeFactor.cpp File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    Go to the source code of this file.

    │ │ │ +

    discrete factor │ │ │ +More...

    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Classes

    class  gtsam::DiscreteDistribution
     A prior probability on a set of discrete variables. More...
     
    struct  gtsam::traits< DiscreteDistribution >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │

    Detailed Description

    │ │ │ -
    Date
    December 2021
    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ +

    discrete factor

    │ │ │ +
    Date
    Feb 14, 2011
    │ │ │ +
    Author
    Duy-Nguyen Ta
    │ │ │ +
    │ │ │ +Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,27 +1,23 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -DiscreteDistribution.h File Reference │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ -  A prior probability on a set of discrete variables. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +DecisionTreeFactor.cpp File Reference │ │ │ │ +discrete factor _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +discrete factor │ │ │ │ Date │ │ │ │ - December 2021 │ │ │ │ + Feb 14, 2011 │ │ │ │ Author │ │ │ │ + Duy-Nguyen Ta │ │ │ │ Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n_._h │ │ │ │ + * _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00233.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteDistribution.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteLookupDAG.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,31 +95,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Namespaces
    │ │ │ -
    DiscreteDistribution.cpp File Reference
    │ │ │ +
    DiscreteLookupDAG.cpp File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │

    Detailed Description

    │ │ │ -
    Date
    December 2021
    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ +
    Date
    Feb 14, 2011
    │ │ │ +
    Author
    Duy-Nguyen Ta
    │ │ │ +
    │ │ │ +Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,20 +1,21 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ -DiscreteDistribution.cpp File Reference │ │ │ │ +DiscreteLookupDAG.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - December 2021 │ │ │ │ + Feb 14, 2011 │ │ │ │ Author │ │ │ │ + Duy-Nguyen Ta │ │ │ │ Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n_._c_p_p │ │ │ │ + * _D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00236.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteConditional.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteJunctionTree.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,44 +95,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Classes | │ │ │ -Namespaces
    │ │ │ -
    DiscreteConditional.h File Reference
    │ │ │ +Namespaces | │ │ │ +Typedefs
    │ │ │ +
    DiscreteJunctionTree.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │

    Go to the source code of this file.

    │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │

    │ │ │ Classes

    class  gtsam::DiscreteConditional
     Discrete Conditional Density Derives from DecisionTreeFactor. More...
     
    struct  gtsam::traits< DiscreteConditional >
    class  gtsam::DiscreteJunctionTree
     An EliminatableClusterTree, i.e., a set of variable clusters with factors, arranged in a tree, with the additional property that it represents the clique tree associated with a Bayes net. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ +Typedefs

    │ │ │ +using gtsam::DiscreteCluster = DiscreteJunctionTree::Cluster
     typedef for wrapper:
     
    │ │ │

    Detailed Description

    │ │ │ -
    Date
    Feb 14, 2011
    │ │ │ -
    Author
    Duy-Nguyen Ta
    │ │ │ +
    Date
    Mar 29, 2013
    │ │ │ +
    Author
    Frank Dellaert
    │ │ │
    │ │ │ -Frank Dellaert
    │ │ │ +Richard Roberts
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +1,32 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -DiscreteConditional.h File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ +DiscreteJunctionTree.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -  Discrete _C_o_n_d_i_t_i_o_n_a_l Density Derives from _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_ _> │ │ │ │ +class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e │ │ │ │ + An _E_l_i_m_i_n_a_t_a_b_l_e_C_l_u_s_t_e_r_T_r_e_e, i.e., a set of variable clusters with │ │ │ │ +  factors, arranged in a tree, with the additional property that it │ │ │ │ + represents the clique tree associated with a Bayes net. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +using  ggttssaamm::::DDiissccrreetteeCClluusstteerr = _D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e_:_:_C_l_u_s_t_e_r │ │ │ │ +  typedef for wrapper: │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - Feb 14, 2011 │ │ │ │ + Mar 29, 2013 │ │ │ │ Author │ │ │ │ - Duy-Nguyen Ta │ │ │ │ Frank Dellaert │ │ │ │ + Richard Roberts │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ + * _D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00236.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ var a00236 = [ │ │ │ │ - ["gtsam::traits< DiscreteConditional >", "a02836.html", null] │ │ │ │ + ["DiscreteCluster", "a00236.html#aa8c26fa5afbbfd23795d7d421e543a81", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00236_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteConditional.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteJunctionTree.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,15 +98,15 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    DiscreteConditional.h
    │ │ │ +
    DiscreteJunctionTree.h
    │ │ │
    │ │ │
    │ │ │ Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │
    4 * Atlanta, Georgia 30332-0415
    │ │ │
    5 * All Rights Reserved
    │ │ │ @@ -114,212 +114,52 @@ │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │
    19#pragma once
    │ │ │
    20
    │ │ │ -
    21#include <gtsam/inference/Conditional-inst.h>
    │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │
    24
    │ │ │ -
    25#include <boost/make_shared.hpp>
    │ │ │ -
    26#include <boost/shared_ptr.hpp>
    │ │ │ -
    27#include <string>
    │ │ │ -
    28#include <vector>
    │ │ │ +
    25namespace gtsam {
    │ │ │ +
    26
    │ │ │ +
    27 // Forward declarations
    │ │ │ +
    28 class DiscreteEliminationTree;
    │ │ │
    29
    │ │ │ -
    30namespace gtsam {
    │ │ │ -
    31
    │ │ │ -
    │ │ │ -
    38class GTSAM_EXPORT DiscreteConditional
    │ │ │ -
    39 : public DecisionTreeFactor,
    │ │ │ -
    40 public Conditional<DecisionTreeFactor, DiscreteConditional> {
    │ │ │ -
    41 public:
    │ │ │ -
    42 // typedefs needed to play nice with gtsam
    │ │ │ - │ │ │ -
    44 typedef boost::shared_ptr<This> shared_ptr;
    │ │ │ - │ │ │ - │ │ │ - │ │ │ -
    48
    │ │ │ - │ │ │ -
    50
    │ │ │ -
    53
    │ │ │ - │ │ │ -
    56
    │ │ │ -
    58 DiscreteConditional(size_t nFrontals, const DecisionTreeFactor& f);
    │ │ │ -
    59
    │ │ │ -
    64 DiscreteConditional(size_t nFrontals, const DiscreteKeys& keys,
    │ │ │ -
    65 const ADT& potentials);
    │ │ │ -
    66
    │ │ │ -
    68 explicit DiscreteConditional(const Signature& signature);
    │ │ │ -
    69
    │ │ │ -
    │ │ │ -
    77 DiscreteConditional(const DiscreteKey& key, const DiscreteKeys& parents,
    │ │ │ -
    78 const Signature::Table& table)
    │ │ │ -
    79 : DiscreteConditional(Signature(key, parents, table)) {}
    │ │ │ -
    │ │ │ -
    80
    │ │ │ -
    │ │ │ -
    90 DiscreteConditional(const DiscreteKey& key, const DiscreteKeys& parents,
    │ │ │ -
    91 const std::string& spec)
    │ │ │ -
    92 : DiscreteConditional(Signature(key, parents, spec)) {}
    │ │ │ -
    │ │ │ -
    93
    │ │ │ -
    │ │ │ -
    95 DiscreteConditional(const DiscreteKey& key, const std::string& spec)
    │ │ │ -
    96 : DiscreteConditional(Signature(key, {}, spec)) {}
    │ │ │ -
    │ │ │ -
    97
    │ │ │ -
    102 DiscreteConditional(const DecisionTreeFactor& joint,
    │ │ │ -
    103 const DecisionTreeFactor& marginal);
    │ │ │ -
    104
    │ │ │ -
    110 DiscreteConditional(const DecisionTreeFactor& joint,
    │ │ │ -
    111 const DecisionTreeFactor& marginal,
    │ │ │ -
    112 const Ordering& orderedKeys);
    │ │ │ -
    113
    │ │ │ -
    129 DiscreteConditional operator*(const DiscreteConditional& other) const;
    │ │ │ -
    130
    │ │ │ -
    132 DiscreteConditional marginal(Key key) const;
    │ │ │ -
    133
    │ │ │ -
    137
    │ │ │ -
    139 void print(
    │ │ │ -
    140 const std::string& s = "Discrete Conditional: ",
    │ │ │ -
    141 const KeyFormatter& formatter = DefaultKeyFormatter) const override;
    │ │ │ -
    142
    │ │ │ -
    144 bool equals(const DiscreteFactor& other, double tol = 1e-9) const override;
    │ │ │ -
    145
    │ │ │ -
    149
    │ │ │ -
    │ │ │ -
    151 double logProbability(const DiscreteValues& x) const {
    │ │ │ -
    152 return -error(x);
    │ │ │ -
    153 }
    │ │ │ -
    │ │ │ -
    154
    │ │ │ -
    │ │ │ - │ │ │ -
    157 const std::string& s = "Discrete Conditional: ",
    │ │ │ -
    158 const KeyFormatter& formatter = DefaultKeyFormatter) const {
    │ │ │ -
    159 static_cast<const BaseConditional*>(this)->print(s, formatter);
    │ │ │ -
    160 }
    │ │ │ -
    │ │ │ -
    161
    │ │ │ -
    │ │ │ -
    163 double evaluate(const DiscreteValues& values) const {
    │ │ │ -
    164 return ADT::operator()(values);
    │ │ │ -
    165 }
    │ │ │ -
    │ │ │ -
    166
    │ │ │ -
    167 using DecisionTreeFactor::error;
    │ │ │ -
    168 using DecisionTreeFactor::operator();
    │ │ │ -
    169
    │ │ │ -
    183 shared_ptr choose(const DiscreteValues& given) const;
    │ │ │ -
    184
    │ │ │ -
    186 DecisionTreeFactor::shared_ptr likelihood(
    │ │ │ -
    187 const DiscreteValues& frontalValues) const;
    │ │ │ -
    188
    │ │ │ -
    190 DecisionTreeFactor::shared_ptr likelihood(size_t frontal) const;
    │ │ │ -
    191
    │ │ │ -
    197 size_t sample(const DiscreteValues& parentsValues) const;
    │ │ │ -
    198
    │ │ │ -
    200 size_t sample(size_t parent_value) const;
    │ │ │ -
    201
    │ │ │ -
    203 size_t sample() const;
    │ │ │ -
    204
    │ │ │ -
    209 size_t argmax() const;
    │ │ │ -
    210
    │ │ │ -
    214
    │ │ │ -
    216 void sampleInPlace(DiscreteValues* parentsValues) const;
    │ │ │ -
    217
    │ │ │ -
    219 std::vector<DiscreteValues> frontalAssignments() const;
    │ │ │ -
    220
    │ │ │ -
    222 std::vector<DiscreteValues> allAssignments() const;
    │ │ │ -
    223
    │ │ │ -
    227
    │ │ │ -
    229 std::string markdown(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
    │ │ │ -
    230 const Names& names = {}) const override;
    │ │ │ -
    231
    │ │ │ -
    233 std::string html(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
    │ │ │ -
    234 const Names& names = {}) const override;
    │ │ │ -
    235
    │ │ │ -
    236
    │ │ │ -
    240
    │ │ │ -
    245 double evaluate(const HybridValues& x) const override;
    │ │ │ -
    246
    │ │ │ -
    247 using BaseConditional::operator();
    │ │ │ -
    248
    │ │ │ -
    │ │ │ -
    253 double logProbability(const HybridValues& x) const override {
    │ │ │ -
    254 return -error(x);
    │ │ │ -
    255 }
    │ │ │ -
    │ │ │ -
    256
    │ │ │ -
    262 double logNormalizationConstant() const override { return 0.0; }
    │ │ │ -
    263
    │ │ │ -
    265
    │ │ │ -
    266#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
    │ │ │ -
    269 size_t GTSAM_DEPRECATED solve(const DiscreteValues& parentsValues) const;
    │ │ │ -
    270 void GTSAM_DEPRECATED solveInPlace(DiscreteValues* parentsValues) const;
    │ │ │ -
    272#endif
    │ │ │ -
    273
    │ │ │ -
    274 protected:
    │ │ │ -
    276 DiscreteConditional::ADT choose(const DiscreteValues& given,
    │ │ │ -
    277 bool forceComplete) const;
    │ │ │ -
    278
    │ │ │ -
    279 private:
    │ │ │ -
    281 friend class boost::serialization::access;
    │ │ │ -
    282 template <class Archive>
    │ │ │ -
    283 void serialize(Archive& ar, const unsigned int /*version*/) {
    │ │ │ -
    284 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(BaseFactor);
    │ │ │ -
    285 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(BaseConditional);
    │ │ │ -
    286 }
    │ │ │ -
    287};
    │ │ │ -
    │ │ │ -
    288// DiscreteConditional
    │ │ │ -
    289
    │ │ │ -
    290// traits
    │ │ │ -
    291template <>
    │ │ │ -
    292struct traits<DiscreteConditional> : public Testable<DiscreteConditional> {};
    │ │ │ -
    293
    │ │ │ -
    294} // namespace gtsam
    │ │ │ -
    signatures for conditional densities
    │ │ │ - │ │ │ -
    std::pair< Key, size_t > DiscreteKey
    Key type for discrete variables.
    Definition DiscreteKey.h:36
    │ │ │ +
    │ │ │ +
    51 class GTSAM_EXPORT DiscreteJunctionTree :
    │ │ │ +
    52 public JunctionTree<DiscreteBayesTree, DiscreteFactorGraph> {
    │ │ │ +
    53 public:
    │ │ │ + │ │ │ + │ │ │ +
    56 typedef boost::shared_ptr<This> shared_ptr;
    │ │ │ +
    57
    │ │ │ +
    66 DiscreteJunctionTree(const DiscreteEliminationTree& eliminationTree);
    │ │ │ +
    67 };
    │ │ │ +
    │ │ │ +
    68
    │ │ │ + │ │ │ +
    71}
    │ │ │ + │ │ │ +
    Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree.
    │ │ │ +
    The junction tree.
    │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │ -
    string markdown(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
    Free version of markdown.
    Definition DiscreteValues.cpp:129
    │ │ │ -
    void print(const Matrix &A, const string &s, ostream &stream)
    print without optional string, must specify cout yourself
    Definition Matrix.cpp:156
    │ │ │ -
    std::function< std::string(Key)> KeyFormatter
    Typedef for a function to format a key, i.e. to convert it to a string.
    Definition Key.h:35
    │ │ │ -
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │ -
    A helper that implements the traits interface for GTSAM types.
    Definition Testable.h:151
    │ │ │ - │ │ │ -
    A discrete probabilistic factor.
    Definition DecisionTreeFactor.h:45
    │ │ │ -
    Discrete Conditional Density Derives from DecisionTreeFactor.
    Definition DiscreteConditional.h:40
    │ │ │ -
    DiscreteConditional(const DiscreteKey &key, const std::string &spec)
    No-parent specialization; can also use DiscreteDistribution.
    Definition DiscreteConditional.h:95
    │ │ │ -
    DiscreteConditional(const DiscreteKey &key, const DiscreteKeys &parents, const std::string &spec)
    Construct from key, parents, and a string specifying the conditional probability table (CPT) in 00 01...
    Definition DiscreteConditional.h:90
    │ │ │ -
    double evaluate(const DiscreteValues &values) const
    Evaluate, just look up in AlgebraicDecisonTree.
    Definition DiscreteConditional.h:163
    │ │ │ -
    boost::shared_ptr< This > shared_ptr
    shared_ptr to this class
    Definition DiscreteConditional.h:44
    │ │ │ -
    DiscreteConditional(const DiscreteKey &key, const DiscreteKeys &parents, const Signature::Table &table)
    Construct from key, parents, and a Signature::Table specifying the conditional probability table (CPT...
    Definition DiscreteConditional.h:77
    │ │ │ -
    Conditional< BaseFactor, This > BaseConditional
    Typedef to our conditional base class.
    Definition DiscreteConditional.h:47
    │ │ │ -
    double logProbability(const HybridValues &x) const override
    < HybridValues version
    Definition DiscreteConditional.h:253
    │ │ │ -
    DiscreteConditional This
    Typedef to this class.
    Definition DiscreteConditional.h:43
    │ │ │ -
    DecisionTreeFactor BaseFactor
    Typedef to our factor base class.
    Definition DiscreteConditional.h:45
    │ │ │ -
    DiscreteConditional()
    Default constructor needed for serialization.
    Definition DiscreteConditional.h:55
    │ │ │ -
    double logProbability(const DiscreteValues &x) const
    Log-probability is just -error(x).
    Definition DiscreteConditional.h:151
    │ │ │ -
    void printSignature(const std::string &s="Discrete Conditional: ", const KeyFormatter &formatter=DefaultKeyFormatter) const
    print index signature only
    Definition DiscreteConditional.h:156
    │ │ │ -
    double logNormalizationConstant() const override
    logNormalizationConstant K is just zero, such that logProbability(x) = log(evaluate(x)) = - error(x) ...
    Definition DiscreteConditional.h:262
    │ │ │ -
    DiscreteKeys is a set of keys that can be assembled using the & operator.
    Definition DiscreteKey.h:39
    │ │ │ -
    A map from keys to values.
    Definition DiscreteValues.h:34
    │ │ │ -
    Signature for a discrete conditional density, used to construct conditionals.
    Definition Signature.h:54
    │ │ │ -
    HybridValues represents a collection of DiscreteValues and VectorValues.
    Definition HybridValues.h:38
    │ │ │ -
    Definition Conditional.h:64
    │ │ │ -
    the error.
    │ │ │ +
    Elimination tree for discrete factors.
    Definition DiscreteEliminationTree.h:33
    │ │ │ +
    An EliminatableClusterTree, i.e., a set of variable clusters with factors, arranged in a tree,...
    Definition DiscreteJunctionTree.h:52
    │ │ │ +
    JunctionTree< DiscreteBayesTree, DiscreteFactorGraph > Base
    Base class.
    Definition DiscreteJunctionTree.h:54
    │ │ │ +
    boost::shared_ptr< This > shared_ptr
    Shared pointer to this class.
    Definition DiscreteJunctionTree.h:56
    │ │ │ +
    DiscreteJunctionTree This
    This class.
    Definition DiscreteJunctionTree.h:55
    │ │ │ +
    A Cluster is just a collection of factors.
    Definition ClusterTree.h:36
    │ │ │ +
    A JunctionTree is a cluster tree, a set of variable clusters with factors, arranged in a tree,...
    Definition JunctionTree.h:50
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -DiscreteConditional.h │ │ │ │ +DiscreteJunctionTree.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ @@ -16,271 +16,66 @@ │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ 19#pragma once │ │ │ │ 20 │ │ │ │ -21#include │ │ │ │ -22#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_._h> │ │ │ │ -23#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_S_i_g_n_a_t_u_r_e_._h> │ │ │ │ +21#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ +22#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_._h> │ │ │ │ +23#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_J_u_n_c_t_i_o_n_T_r_e_e_._h> │ │ │ │ 24 │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27#include │ │ │ │ -28#include │ │ │ │ +25namespace _g_t_s_a_m { │ │ │ │ +26 │ │ │ │ +27 // Forward declarations │ │ │ │ +28 class DiscreteEliminationTree; │ │ │ │ 29 │ │ │ │ -30namespace _g_t_s_a_m { │ │ │ │ -31 │ │ │ │ -_3_8class GTSAM_EXPORT _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -39 : public _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r, │ │ │ │ -40 public _C_o_n_d_i_t_i_o_n_a_l { │ │ │ │ -41 public: │ │ │ │ -42 // typedefs needed to play nice with gtsam │ │ │ │ -_4_3 typedef _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l _T_h_i_s; │ │ │ │ -_4_4 typedef boost::shared_ptr _s_h_a_r_e_d___p_t_r; │ │ │ │ -_4_5 typedef _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r _B_a_s_e_F_a_c_t_o_r; │ │ │ │ -46 typedef _C_o_n_d_i_t_i_o_n_a_l_<_B_a_s_e_F_a_c_t_o_r_,_ _T_h_i_s_> │ │ │ │ -_4_7 _B_a_s_e_C_o_n_d_i_t_i_o_n_a_l; │ │ │ │ -48 │ │ │ │ -_4_9 using _V_a_l_u_e_s = _D_i_s_c_r_e_t_e_V_a_l_u_e_s; │ │ │ │ -50 │ │ │ │ -53 │ │ │ │ -_5_5 _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l() {} │ │ │ │ -56 │ │ │ │ -58 _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(size_t nFrontals, const _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r& f); │ │ │ │ -59 │ │ │ │ -64 _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(size_t nFrontals, const _D_i_s_c_r_e_t_e_K_e_y_s& keys, │ │ │ │ -65 const ADT& potentials); │ │ │ │ -66 │ │ │ │ -68 explicit _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(const _S_i_g_n_a_t_u_r_e& signature); │ │ │ │ -69 │ │ │ │ -_7_7 _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(const _D_i_s_c_r_e_t_e_K_e_y& key, const _D_i_s_c_r_e_t_e_K_e_y_s& parents, │ │ │ │ -78 const Signature::Table& table) │ │ │ │ -79 : _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(_S_i_g_n_a_t_u_r_e(key, parents, table)) {} │ │ │ │ -80 │ │ │ │ -_9_0 _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(const _D_i_s_c_r_e_t_e_K_e_y& key, const _D_i_s_c_r_e_t_e_K_e_y_s& parents, │ │ │ │ -91 const std::string& spec) │ │ │ │ -92 : _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(_S_i_g_n_a_t_u_r_e(key, parents, spec)) {} │ │ │ │ -93 │ │ │ │ -_9_5 _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(const _D_i_s_c_r_e_t_e_K_e_y& key, const std::string& spec) │ │ │ │ -96 : _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(_S_i_g_n_a_t_u_r_e(key, {}, spec)) {} │ │ │ │ -97 │ │ │ │ -102 DiscreteConditional(const DecisionTreeFactor& joint, │ │ │ │ -103 const DecisionTreeFactor& marginal); │ │ │ │ -104 │ │ │ │ -110 DiscreteConditional(const DecisionTreeFactor& joint, │ │ │ │ -111 const DecisionTreeFactor& marginal, │ │ │ │ -112 const Ordering& orderedKeys); │ │ │ │ -113 │ │ │ │ -129 DiscreteConditional operator*(const DiscreteConditional& other) const; │ │ │ │ -130 │ │ │ │ -132 DiscreteConditional marginal(Key key) const; │ │ │ │ -133 │ │ │ │ -137 │ │ │ │ -139 void print( │ │ │ │ -140 const std::string& s = "Discrete Conditional: ", │ │ │ │ -141 const KeyFormatter& formatter = DefaultKeyFormatter) const override; │ │ │ │ -142 │ │ │ │ -144 bool equals(const DiscreteFactor& other, double tol = 1e-9) const override; │ │ │ │ -145 │ │ │ │ -149 │ │ │ │ -_1_5_1 double _l_o_g_P_r_o_b_a_b_i_l_i_t_y(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& x) const { │ │ │ │ -152 return -error(x); │ │ │ │ -153 } │ │ │ │ -154 │ │ │ │ -_1_5_6 void _p_r_i_n_t_S_i_g_n_a_t_u_r_e( │ │ │ │ -157 const std::string& s = "Discrete Conditional: ", │ │ │ │ -158 const _K_e_y_F_o_r_m_a_t_t_e_r& formatter = DefaultKeyFormatter) const { │ │ │ │ -159 static_cast(this)->_p_r_i_n_t(s, formatter); │ │ │ │ -160 } │ │ │ │ -161 │ │ │ │ -_1_6_3 double _e_v_a_l_u_a_t_e(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) const { │ │ │ │ -164 return ADT::operator()(values); │ │ │ │ -165 } │ │ │ │ -166 │ │ │ │ -167 using DecisionTreeFactor::error; │ │ │ │ -168 using DecisionTreeFactor::operator(); │ │ │ │ -169 │ │ │ │ -183 shared_ptr choose(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& given) const; │ │ │ │ -184 │ │ │ │ -186 DecisionTreeFactor::shared_ptr likelihood( │ │ │ │ -187 const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& frontalValues) const; │ │ │ │ -188 │ │ │ │ -190 DecisionTreeFactor::shared_ptr likelihood(size_t frontal) const; │ │ │ │ -191 │ │ │ │ -197 size_t sample(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& parentsValues) const; │ │ │ │ -198 │ │ │ │ -200 size_t sample(size_t parent_value) const; │ │ │ │ -201 │ │ │ │ -203 size_t sample() const; │ │ │ │ -204 │ │ │ │ -209 size_t argmax() const; │ │ │ │ -210 │ │ │ │ -214 │ │ │ │ -216 void sampleInPlace(_D_i_s_c_r_e_t_e_V_a_l_u_e_s* parentsValues) const; │ │ │ │ -217 │ │ │ │ -219 std::vector frontalAssignments() const; │ │ │ │ -220 │ │ │ │ -222 std::vector allAssignments() const; │ │ │ │ -223 │ │ │ │ -227 │ │ │ │ -229 std::string _m_a_r_k_d_o_w_n(const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = │ │ │ │ -DefaultKeyFormatter, │ │ │ │ -230 const Names& names = {}) const override; │ │ │ │ -231 │ │ │ │ -233 std::string html(const KeyFormatter& keyFormatter = DefaultKeyFormatter, │ │ │ │ -234 const Names& names = {}) const override; │ │ │ │ -235 │ │ │ │ -236 │ │ │ │ -240 │ │ │ │ -245 double evaluate(const _H_y_b_r_i_d_V_a_l_u_e_s& x) const override; │ │ │ │ -246 │ │ │ │ -247 using BaseConditional::operator(); │ │ │ │ -248 │ │ │ │ -_2_5_3 double _l_o_g_P_r_o_b_a_b_i_l_i_t_y(const _H_y_b_r_i_d_V_a_l_u_e_s& x) const override { │ │ │ │ -254 return -error(x); │ │ │ │ -255 } │ │ │ │ -256 │ │ │ │ -_2_6_2 double _l_o_g_N_o_r_m_a_l_i_z_a_t_i_o_n_C_o_n_s_t_a_n_t() const override { return 0.0; } │ │ │ │ -263 │ │ │ │ -265 │ │ │ │ -266#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42 │ │ │ │ -269 size_t GTSAM_DEPRECATED solve(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& parentsValues) const; │ │ │ │ -270 void GTSAM_DEPRECATED solveInPlace(_D_i_s_c_r_e_t_e_V_a_l_u_e_s* parentsValues) const; │ │ │ │ -272#endif │ │ │ │ -273 │ │ │ │ -274 protected: │ │ │ │ -276 _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_A_D_T choose(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& given, │ │ │ │ -277 bool forceComplete) const; │ │ │ │ -278 │ │ │ │ -279 private: │ │ │ │ -_2_8_1 friend class boost::serialization::access; │ │ │ │ -282 template │ │ │ │ -283 void serialize(Archive& ar, const unsigned int /*version*/) { │ │ │ │ -284 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e_F_a_c_t_o_r); │ │ │ │ -285 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e_C_o_n_d_i_t_i_o_n_a_l); │ │ │ │ -286 } │ │ │ │ -287}; │ │ │ │ -288// DiscreteConditional │ │ │ │ -289 │ │ │ │ -290// traits │ │ │ │ -291template <> │ │ │ │ -_2_9_2struct _t_r_a_i_t_s<_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l> : public _T_e_s_t_a_b_l_e │ │ │ │ -{}; │ │ │ │ -293 │ │ │ │ -294} // namespace gtsam │ │ │ │ -_S_i_g_n_a_t_u_r_e_._h │ │ │ │ -signatures for conditional densities │ │ │ │ -_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_._h │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_K_e_y │ │ │ │ -std::pair< Key, size_t > DiscreteKey │ │ │ │ -Key type for discrete variables. │ │ │ │ -DDeeffiinniittiioonn DiscreteKey.h:36 │ │ │ │ +_5_1 class GTSAM_EXPORT _D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e : │ │ │ │ +52 public _J_u_n_c_t_i_o_n_T_r_e_e { │ │ │ │ +53 public: │ │ │ │ +_5_4 typedef _J_u_n_c_t_i_o_n_T_r_e_e_<_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_,_ _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_> _B_a_s_e; │ │ │ │ +_5_5 typedef _D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e _T_h_i_s; │ │ │ │ +_5_6 typedef boost::shared_ptr _s_h_a_r_e_d___p_t_r; │ │ │ │ +57 │ │ │ │ +66 _D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e(const _D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e& eliminationTree); │ │ │ │ +67 }; │ │ │ │ +68 │ │ │ │ +_7_0 using _D_i_s_c_r_e_t_e_C_l_u_s_t_e_r = _D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e_:_:_C_l_u_s_t_e_r; │ │ │ │ +71} │ │ │ │ +_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_._h │ │ │ │ +Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. │ │ │ │ +_J_u_n_c_t_i_o_n_T_r_e_e_._h │ │ │ │ +The junction tree. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_m_a_r_k_d_o_w_n │ │ │ │ -string markdown(const DiscreteValues &values, const KeyFormatter &keyFormatter, │ │ │ │ -const DiscreteValues::Names &names) │ │ │ │ -Free version of markdown. │ │ │ │ -DDeeffiinniittiioonn DiscreteValues.cpp:129 │ │ │ │ -_g_t_s_a_m_:_:_p_r_i_n_t │ │ │ │ -void print(const Matrix &A, const string &s, ostream &stream) │ │ │ │ -print without optional string, must specify cout yourself │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:156 │ │ │ │ -_g_t_s_a_m_:_:_K_e_y_F_o_r_m_a_t_t_e_r │ │ │ │ -std::function< std::string(Key)> KeyFormatter │ │ │ │ -Typedef for a function to format a key, i.e. to convert it to a string. │ │ │ │ -DDeeffiinniittiioonn Key.h:35 │ │ │ │ -_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ -A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ -that can be centered ... │ │ │ │ -DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_T_e_s_t_a_b_l_e │ │ │ │ -A helper that implements the traits interface for GTSAM types. │ │ │ │ -DDeeffiinniittiioonn Testable.h:151 │ │ │ │ -_g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_ _K_e_y_ _> │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r │ │ │ │ -A discrete probabilistic factor. │ │ │ │ -DDeeffiinniittiioonn DecisionTreeFactor.h:45 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -Discrete Conditional Density Derives from DecisionTreeFactor. │ │ │ │ -DDeeffiinniittiioonn DiscreteConditional.h:40 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -DiscreteConditional(const DiscreteKey &key, const std::string &spec) │ │ │ │ -No-parent specialization; can also use DiscreteDistribution. │ │ │ │ -DDeeffiinniittiioonn DiscreteConditional.h:95 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -DiscreteConditional(const DiscreteKey &key, const DiscreteKeys &parents, const │ │ │ │ -std::string &spec) │ │ │ │ -Construct from key, parents, and a string specifying the conditional │ │ │ │ -probability table (CPT) in 00 01... │ │ │ │ -DDeeffiinniittiioonn DiscreteConditional.h:90 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_e_v_a_l_u_a_t_e │ │ │ │ -double evaluate(const DiscreteValues &values) const │ │ │ │ -Evaluate, just look up in AlgebraicDecisonTree. │ │ │ │ -DDeeffiinniittiioonn DiscreteConditional.h:163 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_s_h_a_r_e_d___p_t_r │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e │ │ │ │ +Elimination tree for discrete factors. │ │ │ │ +DDeeffiinniittiioonn DiscreteEliminationTree.h:33 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e │ │ │ │ +An EliminatableClusterTree, i.e., a set of variable clusters with factors, │ │ │ │ +arranged in a tree,... │ │ │ │ +DDeeffiinniittiioonn DiscreteJunctionTree.h:52 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e_:_:_B_a_s_e │ │ │ │ +JunctionTree< DiscreteBayesTree, DiscreteFactorGraph > Base │ │ │ │ +Base class. │ │ │ │ +DDeeffiinniittiioonn DiscreteJunctionTree.h:54 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e_:_:_s_h_a_r_e_d___p_t_r │ │ │ │ boost::shared_ptr< This > shared_ptr │ │ │ │ -shared_ptr to this class │ │ │ │ -DDeeffiinniittiioonn DiscreteConditional.h:44 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -DiscreteConditional(const DiscreteKey &key, const DiscreteKeys &parents, const │ │ │ │ -Signature::Table &table) │ │ │ │ -Construct from key, parents, and a Signature::Table specifying the conditional │ │ │ │ -probability table (CPT... │ │ │ │ -DDeeffiinniittiioonn DiscreteConditional.h:77 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_B_a_s_e_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -Conditional< BaseFactor, This > BaseConditional │ │ │ │ -Typedef to our conditional base class. │ │ │ │ -DDeeffiinniittiioonn DiscreteConditional.h:47 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_l_o_g_P_r_o_b_a_b_i_l_i_t_y │ │ │ │ -double logProbability(const HybridValues &x) const override │ │ │ │ -< HybridValues version │ │ │ │ -DDeeffiinniittiioonn DiscreteConditional.h:253 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_T_h_i_s │ │ │ │ -DiscreteConditional This │ │ │ │ -Typedef to this class. │ │ │ │ -DDeeffiinniittiioonn DiscreteConditional.h:43 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_B_a_s_e_F_a_c_t_o_r │ │ │ │ -DecisionTreeFactor BaseFactor │ │ │ │ -Typedef to our factor base class. │ │ │ │ -DDeeffiinniittiioonn DiscreteConditional.h:45 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -DiscreteConditional() │ │ │ │ -Default constructor needed for serialization. │ │ │ │ -DDeeffiinniittiioonn DiscreteConditional.h:55 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_l_o_g_P_r_o_b_a_b_i_l_i_t_y │ │ │ │ -double logProbability(const DiscreteValues &x) const │ │ │ │ -Log-probability is just -error(x). │ │ │ │ -DDeeffiinniittiioonn DiscreteConditional.h:151 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_p_r_i_n_t_S_i_g_n_a_t_u_r_e │ │ │ │ -void printSignature(const std::string &s="Discrete Conditional: ", const │ │ │ │ -KeyFormatter &formatter=DefaultKeyFormatter) const │ │ │ │ -print index signature only │ │ │ │ -DDeeffiinniittiioonn DiscreteConditional.h:156 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_l_o_g_N_o_r_m_a_l_i_z_a_t_i_o_n_C_o_n_s_t_a_n_t │ │ │ │ -double logNormalizationConstant() const override │ │ │ │ -logNormalizationConstant K is just zero, such that logProbability(x) = log │ │ │ │ -(evaluate(x)) = - error(x) ... │ │ │ │ -DDeeffiinniittiioonn DiscreteConditional.h:262 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ -DiscreteKeys is a set of keys that can be assembled using the & operator. │ │ │ │ -DDeeffiinniittiioonn DiscreteKey.h:39 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_V_a_l_u_e_s │ │ │ │ -A map from keys to values. │ │ │ │ -DDeeffiinniittiioonn DiscreteValues.h:34 │ │ │ │ -_g_t_s_a_m_:_:_S_i_g_n_a_t_u_r_e │ │ │ │ -Signature for a discrete conditional density, used to construct conditionals. │ │ │ │ -DDeeffiinniittiioonn Signature.h:54 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s │ │ │ │ -HybridValues represents a collection of DiscreteValues and VectorValues. │ │ │ │ -DDeeffiinniittiioonn HybridValues.h:38 │ │ │ │ -_g_t_s_a_m_:_:_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -DDeeffiinniittiioonn Conditional.h:64 │ │ │ │ -_H_y_b_r_i_d_V_a_l_u_e_s │ │ │ │ -the error. │ │ │ │ +Shared pointer to this class. │ │ │ │ +DDeeffiinniittiioonn DiscreteJunctionTree.h:56 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e_:_:_T_h_i_s │ │ │ │ +DiscreteJunctionTree This │ │ │ │ +This class. │ │ │ │ +DDeeffiinniittiioonn DiscreteJunctionTree.h:55 │ │ │ │ +_g_t_s_a_m_:_:_C_l_u_s_t_e_r_T_r_e_e_:_:_C_l_u_s_t_e_r │ │ │ │ +A Cluster is just a collection of factors. │ │ │ │ +DDeeffiinniittiioonn ClusterTree.h:36 │ │ │ │ +_g_t_s_a_m_:_:_J_u_n_c_t_i_o_n_T_r_e_e │ │ │ │ +A JunctionTree is a cluster tree, a set of variable clusters with factors, │ │ │ │ +arranged in a tree,... │ │ │ │ +DDeeffiinniittiioonn JunctionTree.h:50 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ + * _D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00239.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteConditional.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteDistribution.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,41 +94,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Namespaces | │ │ │ -Variables
    │ │ │ -
    DiscreteConditional.cpp File Reference
    │ │ │ +Classes | │ │ │ +Namespaces
    │ │ │ +
    DiscreteDistribution.h File Reference
    │ │ │ │ │ │
    │ │ │ + │ │ │ +

    Go to the source code of this file.

    │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Classes

    class  gtsam::DiscreteDistribution
     A prior probability on a set of discrete variables. More...
     
    struct  gtsam::traits< DiscreteDistribution >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │

    │ │ │ -Variables

    │ │ │ -template class GTSAM_EXPORT gtsam::Conditional< DecisionTreeFactor, DiscreteConditional >
     
    │ │ │

    Detailed Description

    │ │ │ -
    Date
    Feb 14, 2011
    │ │ │ -
    Author
    Duy-Nguyen Ta
    │ │ │ -
    │ │ │ -Frank Dellaert
    │ │ │ +
    Date
    December 2021
    │ │ │ +
    Author
    Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,25 +1,27 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _V_a_r_i_a_b_l_e_s │ │ │ │ -DiscreteConditional.cpp File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +DiscreteDistribution.h File Reference │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ + class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ +  A prior probability on a set of discrete variables. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -VVaarriiaabblleess │ │ │ │ -template class GTSAM_EXPORT  ggttssaamm::::CCoonnddiittiioonnaall<< DDeecciissiioonnTTrreeeeFFaaccttoorr,, │ │ │ │ - DDiissccrreetteeCCoonnddiittiioonnaall >> │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - Feb 14, 2011 │ │ │ │ + December 2021 │ │ │ │ Author │ │ │ │ - Duy-Nguyen Ta │ │ │ │ Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_._c_p_p │ │ │ │ + * _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00242.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteBayesTree.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteValues.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,48 +95,58 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Classes | │ │ │ -Namespaces
    │ │ │ -
    DiscreteBayesTree.h File Reference
    │ │ │ +Namespaces | │ │ │ +Functions
    │ │ │ +
    DiscreteValues.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. │ │ │ -More...

    │ │ │ - │ │ │

    Go to the source code of this file.

    │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ │ │ │

    │ │ │ Classes

    class  gtsam::DiscreteBayesTreeClique
     A clique in a DiscreteBayesTree. More...
    class  gtsam::DiscreteValues
     A map from keys to values. More...
     
    class  gtsam::DiscreteBayesTree
     A Bayes tree representing a Discrete density. More...
    struct  gtsam::traits< DiscreteValues >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ +Functions

    │ │ │ +std::vector< DiscreteValuesgtsam::cartesianProduct (const DiscreteKeys &keys)
     Free version of CartesianProduct.
     
    │ │ │ +string gtsam::markdown (const DiscreteValues &values, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DiscreteValues::Names &names={})
     Free version of markdown.
     
    │ │ │ +string gtsam::html (const DiscreteValues &values, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DiscreteValues::Names &names={})
     Free version of html.
     
    │ │ │

    Detailed Description

    │ │ │ -

    Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree.

    │ │ │ -

    DiscreteBayesTree

    Author
    Frank Dellaert
    │ │ │ -
    │ │ │ -Richard Roberts
    │ │ │ +
    Date
    Dec 13, 2021
    │ │ │ +
    Author
    Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,30 +1,43 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -DiscreteBayesTree.h File Reference │ │ │ │ -Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +DiscreteValues.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e │ │ │ │ -  A clique in a _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e. _M_o_r_e_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_V_a_l_u_e_s │ │ │ │ +  A map from keys to values. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e │ │ │ │ -  A Bayes tree representing a Discrete density. _M_o_r_e_._._. │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_i_s_c_r_e_t_e_V_a_l_u_e_s_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +std::vector< _D_i_s_c_r_e_t_e_V_a_l_u_e_s >  ggttssaamm::::ccaarrtteessiiaannPPrroodduucctt (const _D_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ + &keys) │ │ │ │ +  Free version of CartesianProduct. │ │ │ │ +  │ │ │ │ + string  ggttssaamm::::mmaarrkkddoowwnn (const _D_i_s_c_r_e_t_e_V_a_l_u_e_s &values, │ │ │ │ + const _K_e_y_F_o_r_m_a_t_t_e_r │ │ │ │ + &keyFormatter=DefaultKeyFormatter, const │ │ │ │ + _D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_N_a_m_e_s &names={}) │ │ │ │ +  Free version of markdown. │ │ │ │ +  │ │ │ │ + string  ggttssaamm::::hhttmmll (const _D_i_s_c_r_e_t_e_V_a_l_u_e_s &values, const │ │ │ │ + _K_e_y_F_o_r_m_a_t_t_e_r &keyFormatter=DefaultKeyFormatter, │ │ │ │ + const _D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_N_a_m_e_s &names={}) │ │ │ │ +  Free version of html. │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. │ │ │ │ -DiscreteBayesTree │ │ │ │ + Date │ │ │ │ + Dec 13, 2021 │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - Richard Roberts │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_._h │ │ │ │ + * _D_i_s_c_r_e_t_e_V_a_l_u_e_s_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00242.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,6 @@ │ │ │ │ var a00242 = [ │ │ │ │ - ["gtsam::DiscreteBayesTreeClique", "a02824.html", "a02824"] │ │ │ │ + ["gtsam::traits< DiscreteValues >", "a02904.html", null], │ │ │ │ + ["cartesianProduct", "a00242.html#a55a86a4657d82f6ff048a10d058c529f", null], │ │ │ │ + ["html", "a00242.html#a147114735037c2260d4810a8820e72f6", null], │ │ │ │ + ["markdown", "a00242.html#a2b6707b04064df79d26d1016dfa2a013", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00242_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteBayesTree.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteValues.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,134 +98,136 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    DiscreteBayesTree.h
    │ │ │ +
    DiscreteValues.h
    │ │ │
    │ │ │
    │ │ │ Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │
    4 * Atlanta, Georgia 30332-0415
    │ │ │
    5 * All Rights Reserved
    │ │ │
    6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
    │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │ -
    21#pragma once
    │ │ │ -
    22
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
    28
    │ │ │ -
    29#include <string>
    │ │ │ -
    30
    │ │ │ -
    31namespace gtsam {
    │ │ │ -
    32
    │ │ │ -
    33// Forward declarations
    │ │ │ -
    34class DiscreteConditional;
    │ │ │ -
    35class VectorValues;
    │ │ │ -
    36
    │ │ │ -
    37/* ************************************************************************* */
    │ │ │ -
    │ │ │ -
    39class GTSAM_EXPORT DiscreteBayesTreeClique
    │ │ │ -
    40 : public BayesTreeCliqueBase<DiscreteBayesTreeClique, DiscreteFactorGraph> {
    │ │ │ -
    41 public:
    │ │ │ - │ │ │ - │ │ │ -
    44 Base;
    │ │ │ -
    45 typedef boost::shared_ptr<This> shared_ptr;
    │ │ │ -
    46 typedef boost::weak_ptr<This> weak_ptr;
    │ │ │ - │ │ │ -
    48 virtual ~DiscreteBayesTreeClique() {}
    │ │ │ - │ │ │ -
    50 const boost::shared_ptr<DiscreteConditional>& conditional)
    │ │ │ -
    51 : Base(conditional) {}
    │ │ │ -
    52
    │ │ │ -
    │ │ │ - │ │ │ -
    55 const std::string& s = "Clique: ",
    │ │ │ -
    56 const KeyFormatter& formatter = DefaultKeyFormatter) const {
    │ │ │ -
    57 conditional_->printSignature(s, formatter);
    │ │ │ -
    58 }
    │ │ │ -
    │ │ │ +
    18#pragma once
    │ │ │ +
    19
    │ │ │ + │ │ │ + │ │ │ +
    22#include <gtsam/inference/Key.h>
    │ │ │ +
    23
    │ │ │ +
    24#include <map>
    │ │ │ +
    25#include <string>
    │ │ │ +
    26#include <vector>
    │ │ │ +
    27
    │ │ │ +
    28namespace gtsam {
    │ │ │ +
    29
    │ │ │ +
    │ │ │ +
    34class GTSAM_EXPORT DiscreteValues : public Assignment<Key> {
    │ │ │ +
    35 public:
    │ │ │ +
    36 using Base = Assignment<Key>; // base class
    │ │ │ +
    37
    │ │ │ +
    40 using Assignment::Assignment; // all constructors
    │ │ │ +
    41
    │ │ │ +
    42 // Define the implicit default constructor.
    │ │ │ +
    43 DiscreteValues() = default;
    │ │ │ +
    44
    │ │ │ +
    45 // Construct from assignment.
    │ │ │ +
    46 explicit DiscreteValues(const Base& a) : Base(a) {}
    │ │ │ +
    47
    │ │ │ +
    48 // Construct from initializer list.
    │ │ │ +
    49 DiscreteValues(std::initializer_list<std::pair<const Key, size_t>> init)
    │ │ │ +
    50 : Assignment<Key>{init} {}
    │ │ │ +
    51
    │ │ │ +
    55
    │ │ │ +
    57 void print(const std::string& s = "",
    │ │ │ +
    58 const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
    │ │ │
    59
    │ │ │ -
    60 //** evaluate conditional probability of subtree for given DiscreteValues */
    │ │ │ -
    61 double evaluate(const DiscreteValues& values) const;
    │ │ │ +
    61 bool equals(const DiscreteValues& x, double tol = 1e-9) const;
    │ │ │
    62
    │ │ │ -
    63 //** (Preferred) sugar for the above for given DiscreteValues */
    │ │ │ -
    64 double operator()(const DiscreteValues& values) const {
    │ │ │ -
    65 return evaluate(values);
    │ │ │ -
    66 }
    │ │ │ -
    67};
    │ │ │ -
    │ │ │ -
    68
    │ │ │ -
    69/* ************************************************************************* */
    │ │ │ -
    │ │ │ -
    74class GTSAM_EXPORT DiscreteBayesTree
    │ │ │ -
    75 : public BayesTree<DiscreteBayesTreeClique> {
    │ │ │ -
    76 private:
    │ │ │ - │ │ │ -
    78
    │ │ │ -
    79 public:
    │ │ │ -
    80 typedef DiscreteBayesTree This;
    │ │ │ -
    81 typedef boost::shared_ptr<This> shared_ptr;
    │ │ │ -
    82
    │ │ │ -
    85
    │ │ │ - │ │ │ -
    87
    │ │ │ -
    89 bool equals(const This& other, double tol = 1e-9) const;
    │ │ │ -
    90
    │ │ │ -
    91 //** evaluate probability for given DiscreteValues */
    │ │ │ -
    92 double evaluate(const DiscreteValues& values) const;
    │ │ │ +
    66
    │ │ │ +
    67 // insert in base class;
    │ │ │ +
    68 std::pair<iterator, bool> insert( const value_type& value ){
    │ │ │ +
    69 return Base::insert(value);
    │ │ │ +
    70 }
    │ │ │ +
    71
    │ │ │ +
    74 DiscreteValues& insert(const DiscreteValues& values);
    │ │ │ +
    75
    │ │ │ +
    79 DiscreteValues& update(const DiscreteValues& values);
    │ │ │ +
    80
    │ │ │ +
    │ │ │ +
    85 static std::vector<DiscreteValues> CartesianProduct(
    │ │ │ +
    86 const DiscreteKeys& keys) {
    │ │ │ +
    87 return Base::CartesianProduct<DiscreteValues>(keys);
    │ │ │ +
    88 }
    │ │ │ +
    │ │ │ +
    89
    │ │ │
    93
    │ │ │ -
    94 //** (Preferred) sugar for the above for given DiscreteValues */
    │ │ │ -
    95 double operator()(const DiscreteValues& values) const {
    │ │ │ -
    96 return evaluate(values);
    │ │ │ -
    97 }
    │ │ │ -
    98
    │ │ │ -
    102
    │ │ │ -
    104 std::string markdown(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
    │ │ │ -
    105 const DiscreteFactor::Names& names = {}) const;
    │ │ │ -
    106
    │ │ │ -
    108 std::string html(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
    │ │ │ -
    109 const DiscreteFactor::Names& names = {}) const;
    │ │ │ -
    110
    │ │ │ -
    112};
    │ │ │ -
    │ │ │ -
    113
    │ │ │ -
    114} // namespace gtsam
    │ │ │ - │ │ │ - │ │ │ -
    Base class for conditional densities.
    │ │ │ -
    Base class for cliques of a BayesTree.
    │ │ │ -
    Bayes Tree is a tree of cliques of a Bayes Chain.
    │ │ │ +
    95 using Names = std::map<Key, std::vector<std::string>>;
    │ │ │ +
    96
    │ │ │ +
    98 static std::string Translate(const Names& names, Key key, size_t index);
    │ │ │ +
    99
    │ │ │ +
    107 std::string markdown(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
    │ │ │ +
    108 const Names& names = {}) const;
    │ │ │ +
    109
    │ │ │ +
    117 std::string html(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
    │ │ │ +
    118 const Names& names = {}) const;
    │ │ │ +
    119
    │ │ │ +
    121};
    │ │ │ +
    │ │ │ +
    122
    │ │ │ +
    │ │ │ +
    124inline std::vector<DiscreteValues> cartesianProduct(const DiscreteKeys& keys) {
    │ │ │ + │ │ │ +
    126}
    │ │ │ +
    │ │ │ +
    127
    │ │ │ +
    129std::string markdown(const DiscreteValues& values,
    │ │ │ +
    130 const KeyFormatter& keyFormatter = DefaultKeyFormatter,
    │ │ │ +
    131 const DiscreteValues::Names& names = {});
    │ │ │ +
    132
    │ │ │ +
    134std::string html(const DiscreteValues& values,
    │ │ │ +
    135 const KeyFormatter& keyFormatter = DefaultKeyFormatter,
    │ │ │ +
    136 const DiscreteValues::Names& names = {});
    │ │ │ +
    137
    │ │ │ +
    138// traits
    │ │ │ +
    139template <>
    │ │ │ +
    140struct traits<DiscreteValues> : public Testable<DiscreteValues> {};
    │ │ │ +
    141
    │ │ │ +
    142} // namespace gtsam
    │ │ │ +
    An assignment from labels to a discrete value index (size_t)
    │ │ │ +
    specialized key for discrete variables
    │ │ │ + │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │
    string html(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
    Free version of html.
    Definition DiscreteValues.cpp:134
    │ │ │ +
    string markdown(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
    Free version of markdown.
    Definition DiscreteValues.cpp:129
    │ │ │ +
    void print(const Matrix &A, const string &s, ostream &stream)
    print without optional string, must specify cout yourself
    Definition Matrix.cpp:156
    │ │ │ +
    std::vector< DiscreteValues > cartesianProduct(const DiscreteKeys &keys)
    Free version of CartesianProduct.
    Definition DiscreteValues.h:124
    │ │ │ +
    std::uint64_t Key
    Integer nonlinear key type.
    Definition types.h:100
    │ │ │
    std::function< std::string(Key)> KeyFormatter
    Typedef for a function to format a key, i.e. to convert it to a string.
    Definition Key.h:35
    │ │ │ +
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │
    Template to create a binary predicate.
    Definition Testable.h:111
    │ │ │ -
    A clique in a DiscreteBayesTree.
    Definition DiscreteBayesTree.h:40
    │ │ │ -
    void printSignature(const std::string &s="Clique: ", const KeyFormatter &formatter=DefaultKeyFormatter) const
    print index signature only
    Definition DiscreteBayesTree.h:54
    │ │ │ -
    A Bayes tree representing a Discrete density.
    Definition DiscreteBayesTree.h:75
    │ │ │ -
    DiscreteBayesTree()
    Default constructor, creates an empty Bayes tree.
    Definition DiscreteBayesTree.h:86
    │ │ │ +
    A helper that implements the traits interface for GTSAM types.
    Definition Testable.h:151
    │ │ │ +
    An assignment from labels to value index (size_t).
    Definition Assignment.h:37
    │ │ │ +
    DiscreteKeys is a set of keys that can be assembled using the & operator.
    Definition DiscreteKey.h:39
    │ │ │
    A map from keys to values.
    Definition DiscreteValues.h:34
    │ │ │ -
    Bayes tree.
    Definition BayesTree.h:67
    │ │ │ -
    This is the base class for BayesTree cliques.
    Definition BayesTreeCliqueBase.h:50
    │ │ │ -
    The Factor::error simply extracts the.
    │ │ │ +
    std::map< Key, std::vector< std::string > > Names
    Translation table from values to strings.
    Definition DiscreteValues.h:95
    │ │ │ +
    static std::vector< DiscreteValues > CartesianProduct(const DiscreteKeys &keys)
    Return a vector of DiscreteValues, one for each possible combination of values.
    Definition DiscreteValues.h:85
    │ │ │ +
    The Factor::error simply extracts the.
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,155 +1,168 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -DiscreteBayesTree.h │ │ │ │ +DiscreteValues.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -21#pragma once │ │ │ │ -22 │ │ │ │ -23#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_._h> │ │ │ │ -24#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ -25#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_B_a_y_e_s_T_r_e_e_._h> │ │ │ │ -26#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_C_o_n_d_i_t_i_o_n_a_l_._h> │ │ │ │ -27#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_B_a_s_e_._h> │ │ │ │ -28 │ │ │ │ -29#include │ │ │ │ -30 │ │ │ │ -31namespace _g_t_s_a_m { │ │ │ │ -32 │ │ │ │ -33// Forward declarations │ │ │ │ -34class DiscreteConditional; │ │ │ │ -35class _V_e_c_t_o_r_V_a_l_u_e_s; │ │ │ │ -36 │ │ │ │ -37/* ************************************************************************* │ │ │ │ -*/ │ │ │ │ -_3_9class GTSAM_EXPORT _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e │ │ │ │ -40 : public _B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_B_a_s_e { │ │ │ │ -41 public: │ │ │ │ -42 typedef _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e _T_h_i_s; │ │ │ │ -43 typedef _B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_B_a_s_e_<_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_,_ _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_> │ │ │ │ -44 _B_a_s_e; │ │ │ │ -45 typedef boost::shared_ptr shared_ptr; │ │ │ │ -46 typedef boost::weak_ptr weak_ptr; │ │ │ │ -47 _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e() {} │ │ │ │ -48 virtual _~_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e() {} │ │ │ │ -49 _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e( │ │ │ │ -50 const boost::shared_ptr& conditional) │ │ │ │ -51 : _B_a_s_e(conditional) {} │ │ │ │ -52 │ │ │ │ -_5_4 void _p_r_i_n_t_S_i_g_n_a_t_u_r_e( │ │ │ │ -55 const std::string& s = "Clique: ", │ │ │ │ -56 const _K_e_y_F_o_r_m_a_t_t_e_r& formatter = DefaultKeyFormatter) const { │ │ │ │ -57 conditional_->printSignature(s, formatter); │ │ │ │ -58 } │ │ │ │ +18#pragma once │ │ │ │ +19 │ │ │ │ +20#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_A_s_s_i_g_n_m_e_n_t_._h> │ │ │ │ +21#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_D_i_s_c_r_e_t_e_K_e_y_._h> │ │ │ │ +22#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_K_e_y_._h> │ │ │ │ +23 │ │ │ │ +24#include │ │ │ │ +25#include │ │ │ │ +26#include │ │ │ │ +27 │ │ │ │ +28namespace _g_t_s_a_m { │ │ │ │ +29 │ │ │ │ +_3_4class GTSAM_EXPORT _D_i_s_c_r_e_t_e_V_a_l_u_e_s : public _A_s_s_i_g_n_m_e_n_t { │ │ │ │ +35 public: │ │ │ │ +36 using _B_a_s_e = _A_s_s_i_g_n_m_e_n_t_<_K_e_y_>; // base class │ │ │ │ +37 │ │ │ │ +40 using Assignment::Assignment; // all constructors │ │ │ │ +41 │ │ │ │ +42 // Define the implicit default constructor. │ │ │ │ +43 _D_i_s_c_r_e_t_e_V_a_l_u_e_s() = default; │ │ │ │ +44 │ │ │ │ +45 // Construct from assignment. │ │ │ │ +46 explicit _D_i_s_c_r_e_t_e_V_a_l_u_e_s(const _B_a_s_e& a) : _B_a_s_e(a) {} │ │ │ │ +47 │ │ │ │ +48 // Construct from initializer list. │ │ │ │ +49 _D_i_s_c_r_e_t_e_V_a_l_u_e_s(std::initializer_list> init) │ │ │ │ +50 : _A_s_s_i_g_n_m_e_n_t_<_K_e_y_>{init} {} │ │ │ │ +51 │ │ │ │ +55 │ │ │ │ +57 void _p_r_i_n_t(const std::string& s = "", │ │ │ │ +58 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter) const; │ │ │ │ 59 │ │ │ │ -60 //** evaluate conditional probability of subtree for given DiscreteValues */ │ │ │ │ -61 double evaluate(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) const; │ │ │ │ +61 bool _e_q_u_a_l_s(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& x, double tol = 1e-9) const; │ │ │ │ 62 │ │ │ │ -63 //** (Preferred) sugar for the above for given DiscreteValues */ │ │ │ │ -64 double operator()(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) const { │ │ │ │ -65 return evaluate(values); │ │ │ │ -66 } │ │ │ │ -67}; │ │ │ │ -68 │ │ │ │ -69/* ************************************************************************* │ │ │ │ -*/ │ │ │ │ -_7_4class GTSAM_EXPORT _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e │ │ │ │ -75 : public _B_a_y_e_s_T_r_e_e { │ │ │ │ -76 private: │ │ │ │ -77 typedef _B_a_y_e_s_T_r_e_e_<_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_> _B_a_s_e; │ │ │ │ -78 │ │ │ │ -79 public: │ │ │ │ -80 typedef _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e _T_h_i_s; │ │ │ │ -81 typedef boost::shared_ptr shared_ptr; │ │ │ │ -82 │ │ │ │ -85 │ │ │ │ -_8_6 _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e() {} │ │ │ │ -87 │ │ │ │ -89 bool _e_q_u_a_l_s(const This& other, double tol = 1e-9) const; │ │ │ │ -90 │ │ │ │ -91 //** evaluate probability for given DiscreteValues */ │ │ │ │ -92 double evaluate(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) const; │ │ │ │ +66 │ │ │ │ +67 // insert in base class; │ │ │ │ +68 std::pair insert( const value_type& value ){ │ │ │ │ +69 return Base::insert(value); │ │ │ │ +70 } │ │ │ │ +71 │ │ │ │ +74 _D_i_s_c_r_e_t_e_V_a_l_u_e_s& insert(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values); │ │ │ │ +75 │ │ │ │ +79 _D_i_s_c_r_e_t_e_V_a_l_u_e_s& update(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values); │ │ │ │ +80 │ │ │ │ +_8_5 static std::vector _C_a_r_t_e_s_i_a_n_P_r_o_d_u_c_t( │ │ │ │ +86 const _D_i_s_c_r_e_t_e_K_e_y_s& keys) { │ │ │ │ +87 return Base::CartesianProduct(keys); │ │ │ │ +88 } │ │ │ │ +89 │ │ │ │ 93 │ │ │ │ -94 //** (Preferred) sugar for the above for given DiscreteValues */ │ │ │ │ -95 double operator()(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) const { │ │ │ │ -96 return evaluate(values); │ │ │ │ -97 } │ │ │ │ -98 │ │ │ │ -102 │ │ │ │ -104 std::string markdown(const KeyFormatter& keyFormatter = │ │ │ │ +_9_5 using _N_a_m_e_s = std::map>; │ │ │ │ +96 │ │ │ │ +98 static std::string Translate(const _N_a_m_e_s& names, _K_e_y key, size_t index); │ │ │ │ +99 │ │ │ │ +107 std::string _m_a_r_k_d_o_w_n(const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = │ │ │ │ DefaultKeyFormatter, │ │ │ │ -105 const DiscreteFactor::Names& names = {}) const; │ │ │ │ -106 │ │ │ │ -108 std::string _h_t_m_l(const KeyFormatter& keyFormatter = DefaultKeyFormatter, │ │ │ │ -109 const DiscreteFactor::Names& names = {}) const; │ │ │ │ -110 │ │ │ │ -112}; │ │ │ │ -113 │ │ │ │ -114} // namespace gtsam │ │ │ │ -_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ -_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_._h │ │ │ │ -_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ -Base class for conditional densities. │ │ │ │ -_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_B_a_s_e_._h │ │ │ │ -Base class for cliques of a BayesTree. │ │ │ │ -_B_a_y_e_s_T_r_e_e_._h │ │ │ │ -Bayes Tree is a tree of cliques of a Bayes Chain. │ │ │ │ +108 const _N_a_m_e_s& names = {}) const; │ │ │ │ +109 │ │ │ │ +117 std::string _h_t_m_l(const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter, │ │ │ │ +118 const Names& names = {}) const; │ │ │ │ +119 │ │ │ │ +121}; │ │ │ │ +122 │ │ │ │ +_1_2_4inline std::vector _c_a_r_t_e_s_i_a_n_P_r_o_d_u_c_t(const _D_i_s_c_r_e_t_e_K_e_y_s& │ │ │ │ +keys) { │ │ │ │ +125 return _D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_C_a_r_t_e_s_i_a_n_P_r_o_d_u_c_t(keys); │ │ │ │ +126} │ │ │ │ +127 │ │ │ │ +129std::string _m_a_r_k_d_o_w_n(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values, │ │ │ │ +130 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter, │ │ │ │ +131 const _D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_N_a_m_e_s& names = {}); │ │ │ │ +132 │ │ │ │ +134std::string _h_t_m_l(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values, │ │ │ │ +135 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter, │ │ │ │ +136 const _D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_N_a_m_e_s& names = {}); │ │ │ │ +137 │ │ │ │ +138// traits │ │ │ │ +139template <> │ │ │ │ +_1_4_0struct _t_r_a_i_t_s<_D_i_s_c_r_e_t_e_V_a_l_u_e_s> : public _T_e_s_t_a_b_l_e {}; │ │ │ │ +141 │ │ │ │ +142} // namespace gtsam │ │ │ │ +_A_s_s_i_g_n_m_e_n_t_._h │ │ │ │ +An assignment from labels to a discrete value index (size_t) │ │ │ │ +_D_i_s_c_r_e_t_e_K_e_y_._h │ │ │ │ +specialized key for discrete variables │ │ │ │ +_K_e_y_._h │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ _g_t_s_a_m_:_:_h_t_m_l │ │ │ │ string html(const DiscreteValues &values, const KeyFormatter &keyFormatter, │ │ │ │ const DiscreteValues::Names &names) │ │ │ │ Free version of html. │ │ │ │ DDeeffiinniittiioonn DiscreteValues.cpp:134 │ │ │ │ +_g_t_s_a_m_:_:_m_a_r_k_d_o_w_n │ │ │ │ +string markdown(const DiscreteValues &values, const KeyFormatter &keyFormatter, │ │ │ │ +const DiscreteValues::Names &names) │ │ │ │ +Free version of markdown. │ │ │ │ +DDeeffiinniittiioonn DiscreteValues.cpp:129 │ │ │ │ +_g_t_s_a_m_:_:_p_r_i_n_t │ │ │ │ +void print(const Matrix &A, const string &s, ostream &stream) │ │ │ │ +print without optional string, must specify cout yourself │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:156 │ │ │ │ +_g_t_s_a_m_:_:_c_a_r_t_e_s_i_a_n_P_r_o_d_u_c_t │ │ │ │ +std::vector< DiscreteValues > cartesianProduct(const DiscreteKeys &keys) │ │ │ │ +Free version of CartesianProduct. │ │ │ │ +DDeeffiinniittiioonn DiscreteValues.h:124 │ │ │ │ +_g_t_s_a_m_:_:_K_e_y │ │ │ │ +std::uint64_t Key │ │ │ │ +Integer nonlinear key type. │ │ │ │ +DDeeffiinniittiioonn types.h:100 │ │ │ │ _g_t_s_a_m_:_:_K_e_y_F_o_r_m_a_t_t_e_r │ │ │ │ std::function< std::string(Key)> KeyFormatter │ │ │ │ Typedef for a function to format a key, i.e. to convert it to a string. │ │ │ │ DDeeffiinniittiioonn Key.h:35 │ │ │ │ +_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ +A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ +that can be centered ... │ │ │ │ +DDeeffiinniittiioonn concepts.h:30 │ │ │ │ _g_t_s_a_m_:_:_e_q_u_a_l_s │ │ │ │ Template to create a binary predicate. │ │ │ │ DDeeffiinniittiioonn Testable.h:111 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e │ │ │ │ -A clique in a DiscreteBayesTree. │ │ │ │ -DDeeffiinniittiioonn DiscreteBayesTree.h:40 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_:_:_p_r_i_n_t_S_i_g_n_a_t_u_r_e │ │ │ │ -void printSignature(const std::string &s="Clique: ", const KeyFormatter │ │ │ │ -&formatter=DefaultKeyFormatter) const │ │ │ │ -print index signature only │ │ │ │ -DDeeffiinniittiioonn DiscreteBayesTree.h:54 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e │ │ │ │ -A Bayes tree representing a Discrete density. │ │ │ │ -DDeeffiinniittiioonn DiscreteBayesTree.h:75 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e │ │ │ │ -DiscreteBayesTree() │ │ │ │ -Default constructor, creates an empty Bayes tree. │ │ │ │ -DDeeffiinniittiioonn DiscreteBayesTree.h:86 │ │ │ │ +_g_t_s_a_m_:_:_T_e_s_t_a_b_l_e │ │ │ │ +A helper that implements the traits interface for GTSAM types. │ │ │ │ +DDeeffiinniittiioonn Testable.h:151 │ │ │ │ +_g_t_s_a_m_:_:_A_s_s_i_g_n_m_e_n_t │ │ │ │ +An assignment from labels to value index (size_t). │ │ │ │ +DDeeffiinniittiioonn Assignment.h:37 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ +DiscreteKeys is a set of keys that can be assembled using the & operator. │ │ │ │ +DDeeffiinniittiioonn DiscreteKey.h:39 │ │ │ │ _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_V_a_l_u_e_s │ │ │ │ A map from keys to values. │ │ │ │ DDeeffiinniittiioonn DiscreteValues.h:34 │ │ │ │ -_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e │ │ │ │ -Bayes tree. │ │ │ │ -DDeeffiinniittiioonn BayesTree.h:67 │ │ │ │ -_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_B_a_s_e │ │ │ │ -This is the base class for BayesTree cliques. │ │ │ │ -DDeeffiinniittiioonn BayesTreeCliqueBase.h:50 │ │ │ │ -_V_e_c_t_o_r_V_a_l_u_e_s │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_N_a_m_e_s │ │ │ │ +std::map< Key, std::vector< std::string > > Names │ │ │ │ +Translation table from values to strings. │ │ │ │ +DDeeffiinniittiioonn DiscreteValues.h:95 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_C_a_r_t_e_s_i_a_n_P_r_o_d_u_c_t │ │ │ │ +static std::vector< DiscreteValues > CartesianProduct(const DiscreteKeys &keys) │ │ │ │ +Return a vector of DiscreteValues, one for each possible combination of values. │ │ │ │ +DDeeffiinniittiioonn DiscreteValues.h:85 │ │ │ │ +_D_i_s_c_r_e_t_e_V_a_l_u_e_s │ │ │ │ The Factor::error simply extracts the. │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_._h │ │ │ │ + * _D_i_s_c_r_e_t_e_V_a_l_u_e_s_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00245.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteBayesTree.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DecisionTree.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,37 +94,74 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Namespaces
    │ │ │ -
    DiscreteBayesTree.cpp File Reference
    │ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Functions
    │ │ │ +
    DecisionTree.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. │ │ │ +

    Decision Tree for use in DiscreteFactors. │ │ │ More...

    │ │ │ + │ │ │ +

    Go to the source code of this file.

    │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Classes

    class  gtsam::DecisionTree< L, Y >
     a decision tree is a function from assignments to values. More...
     
    struct  gtsam::DecisionTree< L, Y >::Node
     ---------------------— Node base class ------------------------— More...
     
    struct  gtsam::traits< DecisionTree< L, Y > >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ +Functions

    template<typename L , typename Y >
    DecisionTree< L, Y > gtsam::apply (const DecisionTree< L, Y > &f, const typename DecisionTree< L, Y >::Unary &op)
     free versions of apply
     
    │ │ │ +template<typename L , typename Y >
    DecisionTree< L, Y > gtsam::apply (const DecisionTree< L, Y > &f, const typename DecisionTree< L, Y >::UnaryAssignment &op)
     Apply unary operator op with Assignment to DecisionTree f.
     
    │ │ │ +template<typename L , typename Y >
    DecisionTree< L, Y > gtsam::apply (const DecisionTree< L, Y > &f, const DecisionTree< L, Y > &g, const typename DecisionTree< L, Y >::Binary &op)
     Apply binary operator op to DecisionTree f.
     
    template<typename L , typename T1 , typename T2 >
    std::pair< DecisionTree< L, T1 >, DecisionTree< L, T2 > > gtsam::unzip (const DecisionTree< L, std::pair< T1, T2 > > &input)
     unzip a DecisionTree with std::pair values.
     
    │ │ │

    Detailed Description

    │ │ │ -

    Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree.

    │ │ │ -

    DiscreteBayesTree

    Author
    Frank Dellaert
    │ │ │ +

    Decision Tree for use in DiscreteFactors.

    │ │ │ +
    Author
    Frank Dellaert
    │ │ │
    │ │ │ -Richard Roberts
    │ │ │ +Can Erdogan
    │ │ │ +
    Date
    Jan 30, 2012
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ @@ -1 +1 @@ │ │ │ │ -us-ascii │ │ │ │ +utf-8 │ │ │ ├── html2text {} │ │ │ │ @@ -1,22 +1,59 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -DiscreteBayesTree.cpp File Reference │ │ │ │ -Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +DecisionTree.h File Reference │ │ │ │ +Decision Tree for use in DiscreteFactors. _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ + class   _g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_<_ _L_,_ _Y_ _> │ │ │ │ +  a decision tree is a function from assignments to values. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_<_ _L_,_ _Y_ _>_:_:_N_o_d_e │ │ │ │ +  ---------------------— _N_o_d_e base class ------------------------ │ │ │ │ + — _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_e_c_i_s_i_o_n_T_r_e_e_<_ _L_,_ _Y_ _>_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ + _D_e_c_i_s_i_o_n_T_r_e_e< L, Y >  _g_t_s_a_m_:_:_a_p_p_l_y (const _D_e_c_i_s_i_o_n_T_r_e_e< L, Y > &f, │ │ │ │ + const typename _D_e_c_i_s_i_o_n_T_r_e_e< L, Y >::Unary │ │ │ │ + &op) │ │ │ │ +  free versions of apply │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _D_e_c_i_s_i_o_n_T_r_e_e< L, Y >  ggttssaamm::::aappppllyy (const _D_e_c_i_s_i_o_n_T_r_e_e< L, Y > &f, │ │ │ │ + const typename _D_e_c_i_s_i_o_n_T_r_e_e< L, Y >:: │ │ │ │ + UnaryAssignment &op) │ │ │ │ +  Apply unary operator op with _A_s_s_i_g_n_m_e_n_t to │ │ │ │ + _D_e_c_i_s_i_o_n_T_r_e_e f. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _D_e_c_i_s_i_o_n_T_r_e_e< L, Y >  ggttssaamm::::aappppllyy (const _D_e_c_i_s_i_o_n_T_r_e_e< L, Y > &f, │ │ │ │ + const _D_e_c_i_s_i_o_n_T_r_e_e< L, Y > &g, const typename │ │ │ │ + _D_e_c_i_s_i_o_n_T_r_e_e< L, Y >::Binary &op) │ │ │ │ +  Apply binary operator op to _D_e_c_i_s_i_o_n_T_r_e_e f. │ │ │ │ +  │ │ │ │ +template │ │ │ │ +std::pair< _D_e_c_i_s_i_o_n_T_r_e_e< L, T1 >, _g_t_s_a_m_:_:_u_n_z_i_p (const _D_e_c_i_s_i_o_n_T_r_e_e< L, std:: │ │ │ │ + _D_e_c_i_s_i_o_n_T_r_e_e< L, T2 > >  pair< T1, T2 > > &input) │ │ │ │ +  unzip a _D_e_c_i_s_i_o_n_T_r_e_e with std::pair values. │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. │ │ │ │ -DiscreteBayesTree │ │ │ │ +Decision Tree for use in DiscreteFactors. │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - Richard Roberts │ │ │ │ + Can Erdogan │ │ │ │ + Date │ │ │ │ + Jan 30, 2012 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_._c_p_p │ │ │ │ + * _D_e_c_i_s_i_o_n_T_r_e_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00248.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteBayesNet.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteEliminationTree.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,45 +94,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Classes | │ │ │ Namespaces
    │ │ │ -
    DiscreteBayesNet.h File Reference
    │ │ │ +
    DiscreteEliminationTree.cpp File Reference
    │ │ │
    │ │ │
    │ │ │ - │ │ │ -

    Go to the source code of this file.

    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Classes

    class  gtsam::DiscreteBayesNet
     A Bayes net made from discrete conditional distributions. More...
     
    struct  gtsam::traits< DiscreteBayesNet >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │

    Detailed Description

    │ │ │ -
    Date
    Feb 15, 2011
    │ │ │ -
    Author
    Duy-Nguyen Ta
    │ │ │ +
    Date
    Mar 29, 2013
    │ │ │ +
    Author
    Frank Dellaert
    │ │ │
    │ │ │ -Frank dellaert
    │ │ │ +Richard Roberts
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +1,21 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -DiscreteBayesNet.h File Reference │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t │ │ │ │ -  A Bayes net made from discrete conditional distributions. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +DiscreteEliminationTree.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - Feb 15, 2011 │ │ │ │ + Mar 29, 2013 │ │ │ │ Author │ │ │ │ - Duy-Nguyen Ta │ │ │ │ - Frank dellaert │ │ │ │ + Frank Dellaert │ │ │ │ + Richard Roberts │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_._h │ │ │ │ + * _D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00251.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteBayesNet.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteFactor.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,34 +94,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Namespaces
    │ │ │ -
    DiscreteBayesNet.cpp File Reference
    │ │ │ +Namespaces | │ │ │ +Functions
    │ │ │ +
    DiscreteFactor.cpp File Reference
    │ │ │ │ │ │
    │ │ │ + │ │ │ +

    discrete factor │ │ │ +More...

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ +Functions

    std::vector< double > gtsam::expNormalize (const std::vector< double > &logProbs)
     Normalize a set of log probabilities.
     
    │ │ │

    Detailed Description

    │ │ │ -
    Date
    Feb 15, 2011
    │ │ │ +

    discrete factor

    │ │ │ +
    Date
    Feb 14, 2011
    │ │ │
    Author
    Duy-Nguyen Ta
    │ │ │
    │ │ │ Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,21 +1,28 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -DiscreteBayesNet.cpp File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +DiscreteFactor.cpp File Reference │ │ │ │ +discrete factor _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +std::vector< double >  _g_t_s_a_m_:_:_e_x_p_N_o_r_m_a_l_i_z_e (const std::vector< double > │ │ │ │ + &logProbs) │ │ │ │ +  Normalize a set of log probabilities. │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +discrete factor │ │ │ │ Date │ │ │ │ - Feb 15, 2011 │ │ │ │ + Feb 14, 2011 │ │ │ │ Author │ │ │ │ Duy-Nguyen Ta │ │ │ │ Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_._c_p_p │ │ │ │ + * _D_i_s_c_r_e_t_e_F_a_c_t_o_r_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00254.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DecisionTreeFactor.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteEliminationTree.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,43 +96,41 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Classes | │ │ │ Namespaces
    │ │ │ -
    DecisionTreeFactor.h File Reference
    │ │ │ +
    DiscreteEliminationTree.h File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │

    Go to the source code of this file.

    │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │

    │ │ │ Classes

    class  gtsam::DecisionTreeFactor
     A discrete probabilistic factor. More...
     
    struct  gtsam::traits< DecisionTreeFactor >
    class  gtsam::DiscreteEliminationTree
     Elimination tree for discrete factors. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │

    Detailed Description

    │ │ │ -
    Date
    Feb 14, 2011
    │ │ │ -
    Author
    Duy-Nguyen Ta
    │ │ │ +
    Date
    Mar 29, 2013
    │ │ │ +
    Author
    Frank Dellaert
    │ │ │
    │ │ │ -Frank Dellaert
    │ │ │ +Richard Roberts
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +1,26 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -DecisionTreeFactor.h File Reference │ │ │ │ +DiscreteEliminationTree.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r │ │ │ │ -  A discrete probabilistic factor. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_ _> │ │ │ │ +class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e │ │ │ │ +  Elimination tree for discrete factors. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - Feb 14, 2011 │ │ │ │ + Mar 29, 2013 │ │ │ │ Author │ │ │ │ - Duy-Nguyen Ta │ │ │ │ Frank Dellaert │ │ │ │ + Richard Roberts │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_._h │ │ │ │ + * _D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00254_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DecisionTreeFactor.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteEliminationTree.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,15 +98,15 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    DecisionTreeFactor.h
    │ │ │ +
    DiscreteEliminationTree.h
    │ │ │
    │ │ │
    │ │ │ Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │
    4 * Atlanta, Georgia 30332-0415
    │ │ │
    5 * All Rights Reserved
    │ │ │ @@ -114,225 +114,62 @@ │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │
    19#pragma once
    │ │ │
    20
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
    25
    │ │ │ -
    26#include <algorithm>
    │ │ │ -
    27#include <boost/shared_ptr.hpp>
    │ │ │ -
    28#include <map>
    │ │ │ -
    29#include <stdexcept>
    │ │ │ -
    30#include <string>
    │ │ │ -
    31#include <utility>
    │ │ │ -
    32#include <vector>
    │ │ │ -
    33
    │ │ │ -
    34namespace gtsam {
    │ │ │ -
    35
    │ │ │ -
    36 class DiscreteConditional;
    │ │ │ -
    37 class HybridValues;
    │ │ │ + │ │ │ + │ │ │ + │ │ │ +
    24
    │ │ │ +
    25namespace gtsam {
    │ │ │ +
    26
    │ │ │ +
    │ │ │ +
    31 class GTSAM_EXPORT DiscreteEliminationTree :
    │ │ │ +
    32 public EliminationTree<DiscreteBayesNet, DiscreteFactorGraph>
    │ │ │ +
    33 {
    │ │ │ +
    34 public:
    │ │ │ + │ │ │ + │ │ │ +
    37 typedef boost::shared_ptr<This> shared_ptr;
    │ │ │
    38
    │ │ │ -
    │ │ │ -
    44 class GTSAM_EXPORT DecisionTreeFactor : public DiscreteFactor,
    │ │ │ -
    45 public AlgebraicDecisionTree<Key> {
    │ │ │ -
    46 public:
    │ │ │ -
    47 // typedefs needed to play nice with gtsam
    │ │ │ - │ │ │ - │ │ │ -
    50 typedef boost::shared_ptr<DecisionTreeFactor> shared_ptr;
    │ │ │ - │ │ │ -
    52
    │ │ │ -
    53 protected:
    │ │ │ -
    54 std::map<Key, size_t> cardinalities_;
    │ │ │ -
    55
    │ │ │ -
    56 public:
    │ │ │ -
    59
    │ │ │ - │ │ │ + │ │ │ +
    48 const VariableIndex& structure, const Ordering& order);
    │ │ │ +
    49
    │ │ │ + │ │ │ +
    56 const Ordering& order);
    │ │ │ +
    57
    │ │ │ +
    59 bool equals(const This& other, double tol = 1e-9) const;
    │ │ │ +
    60
    │ │ │ +
    61 private:
    │ │ │
    62
    │ │ │ -
    64 DecisionTreeFactor(const DiscreteKeys& keys, const ADT& potentials);
    │ │ │ -
    65
    │ │ │ - │ │ │ -
    86 const std::vector<double>& table);
    │ │ │ -
    87
    │ │ │ -
    106 DecisionTreeFactor(const DiscreteKeys& keys, const std::string& table);
    │ │ │ -
    107
    │ │ │ -
    109 template <class SOURCE>
    │ │ │ -
    │ │ │ -
    110 DecisionTreeFactor(const DiscreteKey& key, SOURCE table)
    │ │ │ -
    111 : DecisionTreeFactor(DiscreteKeys{key}, table) {}
    │ │ │ -
    │ │ │ -
    112
    │ │ │ -
    │ │ │ -
    114 DecisionTreeFactor(const DiscreteKey& key, const std::vector<double>& row)
    │ │ │ - │ │ │ -
    │ │ │ -
    116
    │ │ │ -
    118 explicit DecisionTreeFactor(const DiscreteConditional& c);
    │ │ │ -
    119
    │ │ │ -
    123
    │ │ │ -
    125 bool equals(const DiscreteFactor& other, double tol = 1e-9) const override;
    │ │ │ -
    126
    │ │ │ -
    127 // print
    │ │ │ -
    128 void print(
    │ │ │ -
    129 const std::string& s = "DecisionTreeFactor:\n",
    │ │ │ -
    130 const KeyFormatter& formatter = DefaultKeyFormatter) const override;
    │ │ │ -
    131
    │ │ │ -
    135
    │ │ │ -
    │ │ │ -
    138 double evaluate(const DiscreteValues& values) const {
    │ │ │ -
    139 return ADT::operator()(values);
    │ │ │ -
    140 }
    │ │ │ -
    │ │ │ -
    141
    │ │ │ -
    │ │ │ -
    143 double operator()(const DiscreteValues& values) const override {
    │ │ │ -
    144 return ADT::operator()(values);
    │ │ │ -
    145 }
    │ │ │ -
    │ │ │ -
    146
    │ │ │ -
    148 double error(const DiscreteValues& values) const;
    │ │ │ -
    149
    │ │ │ -
    │ │ │ - │ │ │ -
    152 return apply(f, ADT::Ring::mul);
    │ │ │ -
    153 }
    │ │ │ -
    │ │ │ -
    154
    │ │ │ -
    155 static double safe_div(const double& a, const double& b);
    │ │ │ -
    156
    │ │ │ -
    157 size_t cardinality(Key j) const { return cardinalities_.at(j); }
    │ │ │ -
    158
    │ │ │ -
    │ │ │ - │ │ │ -
    161 return apply(f, safe_div);
    │ │ │ -
    162 }
    │ │ │ -
    │ │ │ -
    163
    │ │ │ -
    165 DecisionTreeFactor toDecisionTreeFactor() const override { return *this; }
    │ │ │ -
    166
    │ │ │ -
    │ │ │ -
    168 shared_ptr sum(size_t nrFrontals) const {
    │ │ │ -
    169 return combine(nrFrontals, ADT::Ring::add);
    │ │ │ -
    170 }
    │ │ │ -
    │ │ │ -
    171
    │ │ │ -
    │ │ │ -
    173 shared_ptr sum(const Ordering& keys) const {
    │ │ │ -
    174 return combine(keys, ADT::Ring::add);
    │ │ │ -
    175 }
    │ │ │ -
    │ │ │ -
    176
    │ │ │ -
    │ │ │ -
    178 shared_ptr max(size_t nrFrontals) const {
    │ │ │ -
    179 return combine(nrFrontals, ADT::Ring::max);
    │ │ │ -
    180 }
    │ │ │ -
    │ │ │ -
    181
    │ │ │ -
    │ │ │ -
    183 shared_ptr max(const Ordering& keys) const {
    │ │ │ -
    184 return combine(keys, ADT::Ring::max);
    │ │ │ -
    185 }
    │ │ │ -
    │ │ │ -
    186
    │ │ │ -
    190
    │ │ │ -
    196 DecisionTreeFactor apply(const DecisionTreeFactor& f, ADT::Binary op) const;
    │ │ │ -
    197
    │ │ │ -
    204 shared_ptr combine(size_t nrFrontals, ADT::Binary op) const;
    │ │ │ -
    205
    │ │ │ -
    212 shared_ptr combine(const Ordering& keys, ADT::Binary op) const;
    │ │ │ -
    213
    │ │ │ -
    215 std::vector<std::pair<DiscreteValues, double>> enumerate() const;
    │ │ │ -
    216
    │ │ │ -
    218 DiscreteKeys discreteKeys() const;
    │ │ │ -
    219
    │ │ │ -
    238 DecisionTreeFactor prune(size_t maxNrAssignments) const;
    │ │ │ -
    239
    │ │ │ -
    243
    │ │ │ -
    245 void dot(std::ostream& os,
    │ │ │ -
    246 const KeyFormatter& keyFormatter = DefaultKeyFormatter,
    │ │ │ -
    247 bool showZero = true) const;
    │ │ │ -
    248
    │ │ │ -
    250 void dot(const std::string& name,
    │ │ │ -
    251 const KeyFormatter& keyFormatter = DefaultKeyFormatter,
    │ │ │ -
    252 bool showZero = true) const;
    │ │ │ -
    253
    │ │ │ -
    255 std::string dot(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
    │ │ │ -
    256 bool showZero = true) const;
    │ │ │ -
    257
    │ │ │ -
    265 std::string markdown(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
    │ │ │ -
    266 const Names& names = {}) const override;
    │ │ │ -
    267
    │ │ │ -
    275 std::string html(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
    │ │ │ -
    276 const Names& names = {}) const override;
    │ │ │ -
    277
    │ │ │ -
    281
    │ │ │ -
    286 double error(const HybridValues& values) const override;
    │ │ │ -
    287
    │ │ │ -
    289
    │ │ │ -
    290 private:
    │ │ │ -
    292 friend class boost::serialization::access;
    │ │ │ -
    293 template <class ARCHIVE>
    │ │ │ -
    294 void serialize(ARCHIVE& ar, const unsigned int /*version*/) {
    │ │ │ -
    295 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
    │ │ │ -
    296 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(ADT);
    │ │ │ -
    297 ar& BOOST_SERIALIZATION_NVP(cardinalities_);
    │ │ │ -
    298 }
    │ │ │ -
    299 };
    │ │ │ -
    │ │ │ -
    300
    │ │ │ -
    301// traits
    │ │ │ -
    302template <>
    │ │ │ -
    303struct traits<DecisionTreeFactor> : public Testable<DecisionTreeFactor> {};
    │ │ │ -
    304
    │ │ │ -
    305} // namespace gtsam
    │ │ │ -
    specialized key for discrete variables
    │ │ │ - │ │ │ -
    Algebraic Decision Trees.
    │ │ │ -
    Variable ordering for the elimination algorithm.
    │ │ │ -
    std::pair< Key, size_t > DiscreteKey
    Key type for discrete variables.
    Definition DiscreteKey.h:36
    │ │ │ +
    63 friend class ::EliminationTreeTester;
    │ │ │ +
    64
    │ │ │ +
    65 };
    │ │ │ +
    │ │ │ +
    66
    │ │ │ +
    67}
    │ │ │ + │ │ │ + │ │ │ + │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │ -
    const MATRIX::ConstRowXpr row(const MATRIX &A, size_t j)
    Extracts a row view from a matrix that avoids a copy.
    Definition Matrix.h:222
    │ │ │ -
    string markdown(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
    Free version of markdown.
    Definition DiscreteValues.cpp:129
    │ │ │ -
    void print(const Matrix &A, const string &s, ostream &stream)
    print without optional string, must specify cout yourself
    Definition Matrix.cpp:156
    │ │ │ -
    DecisionTree< L, Y > apply(const DecisionTree< L, Y > &f, const typename DecisionTree< L, Y >::Unary &op)
    free versions of apply
    Definition DecisionTree.h:413
    │ │ │ -
    double dot(const V1 &a, const V2 &b)
    Dot product.
    Definition Vector.h:195
    │ │ │ -
    std::uint64_t Key
    Integer nonlinear key type.
    Definition types.h:100
    │ │ │ -
    std::function< std::string(Key)> KeyFormatter
    Typedef for a function to format a key, i.e. to convert it to a string.
    Definition Key.h:35
    │ │ │ -
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │
    Template to create a binary predicate.
    Definition Testable.h:111
    │ │ │ -
    A helper that implements the traits interface for GTSAM types.
    Definition Testable.h:151
    │ │ │ -
    An algebraic decision tree fixes the range of a DecisionTree to double.
    Definition AlgebraicDecisionTree.h:38
    │ │ │ -
    A discrete probabilistic factor.
    Definition DecisionTreeFactor.h:45
    │ │ │ -
    shared_ptr sum(const Ordering &keys) const
    Create new factor by summing all values with the same separator values.
    Definition DecisionTreeFactor.h:173
    │ │ │ -
    double operator()(const DiscreteValues &values) const override
    Evaluate probability density, sugar.
    Definition DecisionTreeFactor.h:143
    │ │ │ -
    DecisionTreeFactor operator*(const DecisionTreeFactor &f) const override
    multiply two factors
    Definition DecisionTreeFactor.h:151
    │ │ │ -
    shared_ptr max(size_t nrFrontals) const
    Create new factor by maximizing over all values with the same separator.
    Definition DecisionTreeFactor.h:178
    │ │ │ -
    shared_ptr max(const Ordering &keys) const
    Create new factor by maximizing over all values with the same separator.
    Definition DecisionTreeFactor.h:183
    │ │ │ -
    double evaluate(const DiscreteValues &values) const
    Calculate probability for given values x, is just look up in AlgebraicDecisionTree.
    Definition DecisionTreeFactor.h:138
    │ │ │ -
    DiscreteFactor Base
    Typedef to base class.
    Definition DecisionTreeFactor.h:49
    │ │ │ -
    shared_ptr sum(size_t nrFrontals) const
    Create new factor by summing all values with the same separator values.
    Definition DecisionTreeFactor.h:168
    │ │ │ -
    DecisionTreeFactor(const DiscreteKey &key, SOURCE table)
    Single-key specialization.
    Definition DecisionTreeFactor.h:110
    │ │ │ -
    DecisionTreeFactor toDecisionTreeFactor() const override
    Convert into a decisiontree.
    Definition DecisionTreeFactor.h:165
    │ │ │ -
    DecisionTreeFactor operator/(const DecisionTreeFactor &f) const
    divide by factor f (safely)
    Definition DecisionTreeFactor.h:160
    │ │ │ -
    DecisionTreeFactor(const DiscreteKey &key, const std::vector< double > &row)
    Single-key specialization, with vector of doubles.
    Definition DecisionTreeFactor.h:114
    │ │ │ -
    Discrete Conditional Density Derives from DecisionTreeFactor.
    Definition DiscreteConditional.h:40
    │ │ │ -
    Base class for discrete probabilistic factors The most general one is the derived DecisionTreeFactor.
    Definition DiscreteFactor.h:38
    │ │ │ -
    DiscreteKeys is a set of keys that can be assembled using the & operator.
    Definition DiscreteKey.h:39
    │ │ │ -
    A map from keys to values.
    Definition DiscreteValues.h:34
    │ │ │ +
    Elimination tree for discrete factors.
    Definition DiscreteEliminationTree.h:33
    │ │ │ +
    DiscreteEliminationTree This
    This class.
    Definition DiscreteEliminationTree.h:36
    │ │ │ +
    boost::shared_ptr< This > shared_ptr
    Shared pointer to this class.
    Definition DiscreteEliminationTree.h:37
    │ │ │ +
    EliminationTree< DiscreteBayesNet, DiscreteFactorGraph > Base
    Base class.
    Definition DiscreteEliminationTree.h:35
    │ │ │ +
    A Discrete Factor Graph is a factor graph where all factors are Discrete, i.e.
    Definition DiscreteFactorGraph.h:101
    │ │ │ +
    An elimination tree is a data structure used intermediately during elimination.
    Definition EliminationTree.h:52
    │ │ │
    Definition Ordering.h:34
    │ │ │ -
    the error.
    │ │ │ +
    The VariableIndex class computes and stores the block column structure of a factor graph.
    Definition VariableIndex.h:43
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -DecisionTreeFactor.h │ │ │ │ +DiscreteEliminationTree.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ @@ -16,288 +16,76 @@ │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ 19#pragma once │ │ │ │ 20 │ │ │ │ -21#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_._h> │ │ │ │ -22#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_D_i_s_c_r_e_t_e_F_a_c_t_o_r_._h> │ │ │ │ -23#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_D_i_s_c_r_e_t_e_K_e_y_._h> │ │ │ │ -24#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_O_r_d_e_r_i_n_g_._h> │ │ │ │ -25 │ │ │ │ -26#include │ │ │ │ -27#include │ │ │ │ -28#include │ │ │ │ -29#include │ │ │ │ -30#include │ │ │ │ -31#include │ │ │ │ -32#include │ │ │ │ -33 │ │ │ │ -34namespace _g_t_s_a_m { │ │ │ │ -35 │ │ │ │ -36 class DiscreteConditional; │ │ │ │ -37 class _H_y_b_r_i_d_V_a_l_u_e_s; │ │ │ │ +21#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_._h> │ │ │ │ +22#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ +23#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_._h> │ │ │ │ +24 │ │ │ │ +25namespace _g_t_s_a_m { │ │ │ │ +26 │ │ │ │ +_3_1 class GTSAM_EXPORT _D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e : │ │ │ │ +32 public _E_l_i_m_i_n_a_t_i_o_n_T_r_e_e │ │ │ │ +33 { │ │ │ │ +34 public: │ │ │ │ +_3_5 typedef _E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_<_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_,_ _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_> _B_a_s_e; │ │ │ │ +_3_6 typedef _D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e _T_h_i_s; │ │ │ │ +_3_7 typedef boost::shared_ptr _s_h_a_r_e_d___p_t_r; │ │ │ │ 38 │ │ │ │ -_4_4 class GTSAM_EXPORT _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r : public _D_i_s_c_r_e_t_e_F_a_c_t_o_r, │ │ │ │ -45 public _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e { │ │ │ │ -46 public: │ │ │ │ -47 // typedefs needed to play nice with gtsam │ │ │ │ -48 typedef _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r _T_h_i_s; │ │ │ │ -_4_9 typedef _D_i_s_c_r_e_t_e_F_a_c_t_o_r _B_a_s_e; │ │ │ │ -50 typedef boost::shared_ptr shared_ptr; │ │ │ │ -51 typedef _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_K_e_y_> _A_D_T; │ │ │ │ -52 │ │ │ │ -53 protected: │ │ │ │ -54 std::map cardinalities_; │ │ │ │ -55 │ │ │ │ -56 public: │ │ │ │ -59 │ │ │ │ -61 _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r(); │ │ │ │ +47 _D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e(const _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h& factorGraph, │ │ │ │ +48 const _V_a_r_i_a_b_l_e_I_n_d_e_x& structure, const _O_r_d_e_r_i_n_g& order); │ │ │ │ +49 │ │ │ │ +55 _D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e(const _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h& factorGraph, │ │ │ │ +56 const _O_r_d_e_r_i_n_g& order); │ │ │ │ +57 │ │ │ │ +59 bool _e_q_u_a_l_s(const _T_h_i_s& other, double tol = 1e-9) const; │ │ │ │ +60 │ │ │ │ +61 private: │ │ │ │ 62 │ │ │ │ -64 _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r(const _D_i_s_c_r_e_t_e_K_e_y_s& keys, const _A_D_T& potentials); │ │ │ │ -65 │ │ │ │ -85 _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r(const _D_i_s_c_r_e_t_e_K_e_y_s& keys, │ │ │ │ -86 const std::vector& table); │ │ │ │ -87 │ │ │ │ -106 _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r(const _D_i_s_c_r_e_t_e_K_e_y_s& keys, const std::string& table); │ │ │ │ -107 │ │ │ │ -109 template │ │ │ │ -_1_1_0 _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r(const _D_i_s_c_r_e_t_e_K_e_y& key, SOURCE table) │ │ │ │ -111 : _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r(_D_i_s_c_r_e_t_e_K_e_y_s{key}, table) {} │ │ │ │ -112 │ │ │ │ -_1_1_4 _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r(const _D_i_s_c_r_e_t_e_K_e_y& key, const std::vector& row) │ │ │ │ -115 : _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r(_D_i_s_c_r_e_t_e_K_e_y_s{key}, _r_o_w) {} │ │ │ │ -116 │ │ │ │ -118 explicit _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r(const _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l& c); │ │ │ │ -119 │ │ │ │ -123 │ │ │ │ -125 bool _e_q_u_a_l_s(const _D_i_s_c_r_e_t_e_F_a_c_t_o_r& other, double tol = 1e-9) const override; │ │ │ │ -126 │ │ │ │ -127 // print │ │ │ │ -128 void _p_r_i_n_t( │ │ │ │ -129 const std::string& s = "DecisionTreeFactor:\n", │ │ │ │ -130 const _K_e_y_F_o_r_m_a_t_t_e_r& formatter = DefaultKeyFormatter) const override; │ │ │ │ -131 │ │ │ │ -135 │ │ │ │ -_1_3_8 double _e_v_a_l_u_a_t_e(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) const { │ │ │ │ -139 return ADT::operator()(values); │ │ │ │ -140 } │ │ │ │ -141 │ │ │ │ -_1_4_3 double _o_p_e_r_a_t_o_r_(_)(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) const override { │ │ │ │ -144 return ADT::operator()(values); │ │ │ │ -145 } │ │ │ │ -146 │ │ │ │ -148 double error(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) const; │ │ │ │ -149 │ │ │ │ -_1_5_1 _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r _o_p_e_r_a_t_o_r_*(const _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r& f) const override { │ │ │ │ -152 return _a_p_p_l_y(f, ADT::Ring::mul); │ │ │ │ -153 } │ │ │ │ -154 │ │ │ │ -155 static double safe_div(const double& a, const double& b); │ │ │ │ -156 │ │ │ │ -157 size_t cardinality(_K_e_y j) const { return cardinalities_.at(j); } │ │ │ │ -158 │ │ │ │ -_1_6_0 _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r _o_p_e_r_a_t_o_r_/(const _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r& f) const { │ │ │ │ -161 return _a_p_p_l_y(f, safe_div); │ │ │ │ -162 } │ │ │ │ -163 │ │ │ │ -_1_6_5 _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r _t_o_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r() const override { return *this; } │ │ │ │ -166 │ │ │ │ -_1_6_8 shared_ptr _s_u_m(size_t nrFrontals) const { │ │ │ │ -169 return combine(nrFrontals, ADT::Ring::add); │ │ │ │ -170 } │ │ │ │ -171 │ │ │ │ -_1_7_3 shared_ptr _s_u_m(const _O_r_d_e_r_i_n_g& keys) const { │ │ │ │ -174 return combine(keys, ADT::Ring::add); │ │ │ │ -175 } │ │ │ │ -176 │ │ │ │ -_1_7_8 shared_ptr _m_a_x(size_t nrFrontals) const { │ │ │ │ -179 return combine(nrFrontals, ADT::Ring::max); │ │ │ │ -180 } │ │ │ │ -181 │ │ │ │ -_1_8_3 shared_ptr _m_a_x(const _O_r_d_e_r_i_n_g& keys) const { │ │ │ │ -184 return combine(keys, ADT::Ring::max); │ │ │ │ -185 } │ │ │ │ -186 │ │ │ │ -190 │ │ │ │ -196 _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r _a_p_p_l_y(const _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r& f, ADT::Binary op) │ │ │ │ -const; │ │ │ │ -197 │ │ │ │ -204 shared_ptr combine(size_t nrFrontals, ADT::Binary op) const; │ │ │ │ -205 │ │ │ │ -212 shared_ptr combine(const _O_r_d_e_r_i_n_g& keys, ADT::Binary op) const; │ │ │ │ -213 │ │ │ │ -215 std::vector> enumerate() const; │ │ │ │ -216 │ │ │ │ -218 _D_i_s_c_r_e_t_e_K_e_y_s discreteKeys() const; │ │ │ │ -219 │ │ │ │ -238 _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r prune(size_t maxNrAssignments) const; │ │ │ │ -239 │ │ │ │ -243 │ │ │ │ -245 void _d_o_t(std::ostream& os, │ │ │ │ -246 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter, │ │ │ │ -247 bool showZero = true) const; │ │ │ │ -248 │ │ │ │ -250 void _d_o_t(const std::string& name, │ │ │ │ -251 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter, │ │ │ │ -252 bool showZero = true) const; │ │ │ │ -253 │ │ │ │ -255 std::string _d_o_t(const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter, │ │ │ │ -256 bool showZero = true) const; │ │ │ │ -257 │ │ │ │ -265 std::string _m_a_r_k_d_o_w_n(const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = │ │ │ │ -DefaultKeyFormatter, │ │ │ │ -266 const Names& names = {}) const override; │ │ │ │ -267 │ │ │ │ -275 std::string html(const KeyFormatter& keyFormatter = DefaultKeyFormatter, │ │ │ │ -276 const Names& names = {}) const override; │ │ │ │ -277 │ │ │ │ -281 │ │ │ │ -286 double error(const _H_y_b_r_i_d_V_a_l_u_e_s& values) const override; │ │ │ │ -287 │ │ │ │ -289 │ │ │ │ -290 private: │ │ │ │ -_2_9_2 friend class boost::serialization::access; │ │ │ │ -293 template │ │ │ │ -294 void serialize(ARCHIVE& ar, const unsigned int /*version*/) { │ │ │ │ -295 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e); │ │ │ │ -296 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(_A_D_T); │ │ │ │ -297 ar& BOOST_SERIALIZATION_NVP(cardinalities_); │ │ │ │ -298 } │ │ │ │ -299 }; │ │ │ │ -300 │ │ │ │ -301// traits │ │ │ │ -302template <> │ │ │ │ -_3_0_3struct _t_r_a_i_t_s<_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r> : public _T_e_s_t_a_b_l_e {}; │ │ │ │ -304 │ │ │ │ -305} // namespace gtsam │ │ │ │ -_D_i_s_c_r_e_t_e_K_e_y_._h │ │ │ │ -specialized key for discrete variables │ │ │ │ -_D_i_s_c_r_e_t_e_F_a_c_t_o_r_._h │ │ │ │ -_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_._h │ │ │ │ -Algebraic Decision Trees. │ │ │ │ -_O_r_d_e_r_i_n_g_._h │ │ │ │ -Variable ordering for the elimination algorithm. │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_K_e_y │ │ │ │ -std::pair< Key, size_t > DiscreteKey │ │ │ │ -Key type for discrete variables. │ │ │ │ -DDeeffiinniittiioonn DiscreteKey.h:36 │ │ │ │ +63 friend class ::EliminationTreeTester; │ │ │ │ +64 │ │ │ │ +65 }; │ │ │ │ +66 │ │ │ │ +67} │ │ │ │ +_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_._h │ │ │ │ +_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_._h │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_r_o_w │ │ │ │ -const MATRIX::ConstRowXpr row(const MATRIX &A, size_t j) │ │ │ │ -Extracts a row view from a matrix that avoids a copy. │ │ │ │ -DDeeffiinniittiioonn Matrix.h:222 │ │ │ │ -_g_t_s_a_m_:_:_m_a_r_k_d_o_w_n │ │ │ │ -string markdown(const DiscreteValues &values, const KeyFormatter &keyFormatter, │ │ │ │ -const DiscreteValues::Names &names) │ │ │ │ -Free version of markdown. │ │ │ │ -DDeeffiinniittiioonn DiscreteValues.cpp:129 │ │ │ │ -_g_t_s_a_m_:_:_p_r_i_n_t │ │ │ │ -void print(const Matrix &A, const string &s, ostream &stream) │ │ │ │ -print without optional string, must specify cout yourself │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:156 │ │ │ │ -_g_t_s_a_m_:_:_a_p_p_l_y │ │ │ │ -DecisionTree< L, Y > apply(const DecisionTree< L, Y > &f, const typename │ │ │ │ -DecisionTree< L, Y >::Unary &op) │ │ │ │ -free versions of apply │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:413 │ │ │ │ -_g_t_s_a_m_:_:_d_o_t │ │ │ │ -double dot(const V1 &a, const V2 &b) │ │ │ │ -Dot product. │ │ │ │ -DDeeffiinniittiioonn Vector.h:195 │ │ │ │ -_g_t_s_a_m_:_:_K_e_y │ │ │ │ -std::uint64_t Key │ │ │ │ -Integer nonlinear key type. │ │ │ │ -DDeeffiinniittiioonn types.h:100 │ │ │ │ -_g_t_s_a_m_:_:_K_e_y_F_o_r_m_a_t_t_e_r │ │ │ │ -std::function< std::string(Key)> KeyFormatter │ │ │ │ -Typedef for a function to format a key, i.e. to convert it to a string. │ │ │ │ -DDeeffiinniittiioonn Key.h:35 │ │ │ │ -_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ -A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ -that can be centered ... │ │ │ │ -DDeeffiinniittiioonn concepts.h:30 │ │ │ │ _g_t_s_a_m_:_:_e_q_u_a_l_s │ │ │ │ Template to create a binary predicate. │ │ │ │ DDeeffiinniittiioonn Testable.h:111 │ │ │ │ -_g_t_s_a_m_:_:_T_e_s_t_a_b_l_e │ │ │ │ -A helper that implements the traits interface for GTSAM types. │ │ │ │ -DDeeffiinniittiioonn Testable.h:151 │ │ │ │ -_g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e │ │ │ │ -An algebraic decision tree fixes the range of a DecisionTree to double. │ │ │ │ -DDeeffiinniittiioonn AlgebraicDecisionTree.h:38 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r │ │ │ │ -A discrete probabilistic factor. │ │ │ │ -DDeeffiinniittiioonn DecisionTreeFactor.h:45 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_:_:_s_u_m │ │ │ │ -shared_ptr sum(const Ordering &keys) const │ │ │ │ -Create new factor by summing all values with the same separator values. │ │ │ │ -DDeeffiinniittiioonn DecisionTreeFactor.h:173 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -double operator()(const DiscreteValues &values) const override │ │ │ │ -Evaluate probability density, sugar. │ │ │ │ -DDeeffiinniittiioonn DecisionTreeFactor.h:143 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -DecisionTreeFactor operator*(const DecisionTreeFactor &f) const override │ │ │ │ -multiply two factors │ │ │ │ -DDeeffiinniittiioonn DecisionTreeFactor.h:151 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_:_:_m_a_x │ │ │ │ -shared_ptr max(size_t nrFrontals) const │ │ │ │ -Create new factor by maximizing over all values with the same separator. │ │ │ │ -DDeeffiinniittiioonn DecisionTreeFactor.h:178 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_:_:_m_a_x │ │ │ │ -shared_ptr max(const Ordering &keys) const │ │ │ │ -Create new factor by maximizing over all values with the same separator. │ │ │ │ -DDeeffiinniittiioonn DecisionTreeFactor.h:183 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_:_:_e_v_a_l_u_a_t_e │ │ │ │ -double evaluate(const DiscreteValues &values) const │ │ │ │ -Calculate probability for given values x, is just look up in │ │ │ │ -AlgebraicDecisionTree. │ │ │ │ -DDeeffiinniittiioonn DecisionTreeFactor.h:138 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_:_:_B_a_s_e │ │ │ │ -DiscreteFactor Base │ │ │ │ -Typedef to base class. │ │ │ │ -DDeeffiinniittiioonn DecisionTreeFactor.h:49 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_:_:_s_u_m │ │ │ │ -shared_ptr sum(size_t nrFrontals) const │ │ │ │ -Create new factor by summing all values with the same separator values. │ │ │ │ -DDeeffiinniittiioonn DecisionTreeFactor.h:168 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r │ │ │ │ -DecisionTreeFactor(const DiscreteKey &key, SOURCE table) │ │ │ │ -Single-key specialization. │ │ │ │ -DDeeffiinniittiioonn DecisionTreeFactor.h:110 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_:_:_t_o_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r │ │ │ │ -DecisionTreeFactor toDecisionTreeFactor() const override │ │ │ │ -Convert into a decisiontree. │ │ │ │ -DDeeffiinniittiioonn DecisionTreeFactor.h:165 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_:_:_o_p_e_r_a_t_o_r_/ │ │ │ │ -DecisionTreeFactor operator/(const DecisionTreeFactor &f) const │ │ │ │ -divide by factor f (safely) │ │ │ │ -DDeeffiinniittiioonn DecisionTreeFactor.h:160 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r │ │ │ │ -DecisionTreeFactor(const DiscreteKey &key, const std::vector< double > &row) │ │ │ │ -Single-key specialization, with vector of doubles. │ │ │ │ -DDeeffiinniittiioonn DecisionTreeFactor.h:114 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -Discrete Conditional Density Derives from DecisionTreeFactor. │ │ │ │ -DDeeffiinniittiioonn DiscreteConditional.h:40 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r │ │ │ │ -Base class for discrete probabilistic factors The most general one is the │ │ │ │ -derived DecisionTreeFactor. │ │ │ │ -DDeeffiinniittiioonn DiscreteFactor.h:38 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ -DiscreteKeys is a set of keys that can be assembled using the & operator. │ │ │ │ -DDeeffiinniittiioonn DiscreteKey.h:39 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_V_a_l_u_e_s │ │ │ │ -A map from keys to values. │ │ │ │ -DDeeffiinniittiioonn DiscreteValues.h:34 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e │ │ │ │ +Elimination tree for discrete factors. │ │ │ │ +DDeeffiinniittiioonn DiscreteEliminationTree.h:33 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_:_:_T_h_i_s │ │ │ │ +DiscreteEliminationTree This │ │ │ │ +This class. │ │ │ │ +DDeeffiinniittiioonn DiscreteEliminationTree.h:36 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_:_:_s_h_a_r_e_d___p_t_r │ │ │ │ +boost::shared_ptr< This > shared_ptr │ │ │ │ +Shared pointer to this class. │ │ │ │ +DDeeffiinniittiioonn DiscreteEliminationTree.h:37 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_:_:_B_a_s_e │ │ │ │ +EliminationTree< DiscreteBayesNet, DiscreteFactorGraph > Base │ │ │ │ +Base class. │ │ │ │ +DDeeffiinniittiioonn DiscreteEliminationTree.h:35 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +A Discrete Factor Graph is a factor graph where all factors are Discrete, i.e. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:101 │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e │ │ │ │ +An elimination tree is a data structure used intermediately during elimination. │ │ │ │ +DDeeffiinniittiioonn EliminationTree.h:52 │ │ │ │ _g_t_s_a_m_:_:_O_r_d_e_r_i_n_g │ │ │ │ DDeeffiinniittiioonn Ordering.h:34 │ │ │ │ -_H_y_b_r_i_d_V_a_l_u_e_s │ │ │ │ -the error. │ │ │ │ +_g_t_s_a_m_:_:_V_a_r_i_a_b_l_e_I_n_d_e_x │ │ │ │ +The VariableIndex class computes and stores the block column structure of a │ │ │ │ +factor graph. │ │ │ │ +DDeeffiinniittiioonn VariableIndex.h:43 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_._h │ │ │ │ + * _D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00257.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DecisionTreeFactor.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteFactorGraph.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,38 +94,58 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Namespaces
    │ │ │ -
    DecisionTreeFactor.cpp File Reference
    │ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Functions
    │ │ │ +
    DiscreteFactorGraph.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    discrete factor │ │ │ -More...

    │ │ │ +

    Go to the source code of this file.

    │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Classes

    struct  gtsam::EliminationTraits< DiscreteFactorGraph >
     
    class  gtsam::DiscreteFactorGraph
     A Discrete Factor Graph is a factor graph where all factors are Discrete, i.e. More...
     
    struct  gtsam::traits< DiscreteFactorGraph >
     traits More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ +Functions

    std::pair< DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr > gtsam::EliminateDiscrete (const DiscreteFactorGraph &factors, const Ordering &frontalKeys)
     Main elimination function for DiscreteFactorGraph.
     
    std::pair< DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr > gtsam::EliminateForMPE (const DiscreteFactorGraph &factors, const Ordering &frontalKeys)
     Alternate elimination function for that creates non-normalized lookup tables.
     
    │ │ │

    Detailed Description

    │ │ │ -

    discrete factor

    │ │ │ -
    Date
    Feb 14, 2011
    │ │ │ +
    Date
    Feb 14, 2011
    │ │ │
    Author
    Duy-Nguyen Ta
    │ │ │
    │ │ │ Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,45 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -DecisionTreeFactor.cpp File Reference │ │ │ │ -discrete factor _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +DiscreteFactorGraph.h File Reference │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +struct   _g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_i_o_n_T_r_a_i_t_s_<_ _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_ _> │ │ │ │ +  │ │ │ │ + class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +  A Discrete _F_a_c_t_o_r Graph is a factor graph where all factors are │ │ │ │ + Discrete, i.e. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_ _> │ │ │ │ +  traits _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +std::pair< _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_: _g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_e_D_i_s_c_r_e_t_e (const │ │ │ │ +_s_h_a_r_e_d___p_t_r, DecisionTreeFactor:: _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h &factors, const │ │ │ │ + shared_ptr >  _O_r_d_e_r_i_n_g &frontalKeys) │ │ │ │ +  Main elimination function for │ │ │ │ + _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h. │ │ │ │ +  │ │ │ │ +std::pair< _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_: _g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_e_F_o_r_M_P_E (const │ │ │ │ +_s_h_a_r_e_d___p_t_r, DecisionTreeFactor:: _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h &factors, const │ │ │ │ + shared_ptr >  _O_r_d_e_r_i_n_g &frontalKeys) │ │ │ │ +  Alternate elimination function for that │ │ │ │ + creates non-normalized lookup tables. │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -discrete factor │ │ │ │ Date │ │ │ │ Feb 14, 2011 │ │ │ │ Author │ │ │ │ Duy-Nguyen Ta │ │ │ │ Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_._c_p_p │ │ │ │ + * _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00260.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DecisionTree.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteBayesTree.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,74 +94,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Functions
    │ │ │ -
    DecisionTree.h File Reference
    │ │ │ +Namespaces
    │ │ │ +
    DiscreteBayesTree.cpp File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    Decision Tree for use in DiscreteFactors. │ │ │ +

    Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. │ │ │ More...

    │ │ │ - │ │ │ -

    Go to the source code of this file.

    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Classes

    class  gtsam::DecisionTree< L, Y >
     a decision tree is a function from assignments to values. More...
     
    struct  gtsam::DecisionTree< L, Y >::Node
     ---------------------— Node base class ------------------------— More...
     
    struct  gtsam::traits< DecisionTree< L, Y > >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

    │ │ │ -Functions

    template<typename L , typename Y >
    DecisionTree< L, Y > gtsam::apply (const DecisionTree< L, Y > &f, const typename DecisionTree< L, Y >::Unary &op)
     free versions of apply
     
    │ │ │ -template<typename L , typename Y >
    DecisionTree< L, Y > gtsam::apply (const DecisionTree< L, Y > &f, const typename DecisionTree< L, Y >::UnaryAssignment &op)
     Apply unary operator op with Assignment to DecisionTree f.
     
    │ │ │ -template<typename L , typename Y >
    DecisionTree< L, Y > gtsam::apply (const DecisionTree< L, Y > &f, const DecisionTree< L, Y > &g, const typename DecisionTree< L, Y >::Binary &op)
     Apply binary operator op to DecisionTree f.
     
    template<typename L , typename T1 , typename T2 >
    std::pair< DecisionTree< L, T1 >, DecisionTree< L, T2 > > gtsam::unzip (const DecisionTree< L, std::pair< T1, T2 > > &input)
     unzip a DecisionTree with std::pair values.
     
    │ │ │

    Detailed Description

    │ │ │ -

    Decision Tree for use in DiscreteFactors.

    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ +

    Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree.

    │ │ │ +

    DiscreteBayesTree

    Author
    Frank Dellaert
    │ │ │
    │ │ │ -Can Erdogan
    │ │ │ -
    Date
    Jan 30, 2012
    │ │ │ +Richard Roberts
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ @@ -1 +1 @@ │ │ │ │ -utf-8 │ │ │ │ +us-ascii │ │ │ ├── html2text {} │ │ │ │ @@ -1,59 +1,22 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -DecisionTree.h File Reference │ │ │ │ -Decision Tree for use in DiscreteFactors. _M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_<_ _L_,_ _Y_ _> │ │ │ │ -  a decision tree is a function from assignments to values. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_<_ _L_,_ _Y_ _>_:_:_N_o_d_e │ │ │ │ -  ---------------------— _N_o_d_e base class ------------------------ │ │ │ │ - — _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_e_c_i_s_i_o_n_T_r_e_e_<_ _L_,_ _Y_ _>_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +DiscreteBayesTree.cpp File Reference │ │ │ │ +Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ - _D_e_c_i_s_i_o_n_T_r_e_e< L, Y >  _g_t_s_a_m_:_:_a_p_p_l_y (const _D_e_c_i_s_i_o_n_T_r_e_e< L, Y > &f, │ │ │ │ - const typename _D_e_c_i_s_i_o_n_T_r_e_e< L, Y >::Unary │ │ │ │ - &op) │ │ │ │ -  free versions of apply │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _D_e_c_i_s_i_o_n_T_r_e_e< L, Y >  ggttssaamm::::aappppllyy (const _D_e_c_i_s_i_o_n_T_r_e_e< L, Y > &f, │ │ │ │ - const typename _D_e_c_i_s_i_o_n_T_r_e_e< L, Y >:: │ │ │ │ - UnaryAssignment &op) │ │ │ │ -  Apply unary operator op with _A_s_s_i_g_n_m_e_n_t to │ │ │ │ - _D_e_c_i_s_i_o_n_T_r_e_e f. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _D_e_c_i_s_i_o_n_T_r_e_e< L, Y >  ggttssaamm::::aappppllyy (const _D_e_c_i_s_i_o_n_T_r_e_e< L, Y > &f, │ │ │ │ - const _D_e_c_i_s_i_o_n_T_r_e_e< L, Y > &g, const typename │ │ │ │ - _D_e_c_i_s_i_o_n_T_r_e_e< L, Y >::Binary &op) │ │ │ │ -  Apply binary operator op to _D_e_c_i_s_i_o_n_T_r_e_e f. │ │ │ │ -  │ │ │ │ -template │ │ │ │ -std::pair< _D_e_c_i_s_i_o_n_T_r_e_e< L, T1 >, _g_t_s_a_m_:_:_u_n_z_i_p (const _D_e_c_i_s_i_o_n_T_r_e_e< L, std:: │ │ │ │ - _D_e_c_i_s_i_o_n_T_r_e_e< L, T2 > >  pair< T1, T2 > > &input) │ │ │ │ -  unzip a _D_e_c_i_s_i_o_n_T_r_e_e with std::pair values. │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Decision Tree for use in DiscreteFactors. │ │ │ │ +Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. │ │ │ │ +DiscreteBayesTree │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - Can Erdogan │ │ │ │ - Date │ │ │ │ - Jan 30, 2012 │ │ │ │ + Richard Roberts │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _D_e_c_i_s_i_o_n_T_r_e_e_._h │ │ │ │ + * _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00263_source.html │ │ │ @@ -25,12888 +25,1150 @@ │ │ │ 00000180: 656e 743d 2277 6964 7468 3d64 6576 6963 ent="width=devic │ │ │ 00000190: 652d 7769 6474 682c 2069 6e69 7469 616c e-width, initial │ │ │ 000001a0: 2d73 6361 6c65 3d31 222f 3e0a 3c74 6974 -scale=1"/>.gtsam: /build │ │ │ 000001c0: 2f72 6570 726f 6475 6369 626c 652d 7061 /reproducible-pa │ │ │ 000001d0: 7468 2f67 7473 616d 2d34 2e32 2e30 2b64 th/gtsam-4.2.0+d │ │ │ 000001e0: 6673 672f 6774 7361 6d2f 6469 7363 7265 fsg/gtsam/discre │ │ │ -000001f0: 7465 2f44 6563 6973 696f 6e54 7265 652d te/DecisionTree- │ │ │ -00000200: 696e 6c2e 6820 536f 7572 6365 2046 696c inl.h Source Fil │ │ │ -00000210: 653c 2f74 6974 6c65 3e0a 3c6c 696e 6b20 e... │ │ │ -000002c0: 3c2f 7363 7269 7074 3e0a 3c6c 696e 6b20 ...< │ │ │ -00000340: 7363 7269 7074 2074 7970 653d 2274 6578 script type="tex │ │ │ -00000350: 742f 6a61 7661 7363 7269 7074 2220 7372 t/javascript" sr │ │ │ -00000360: 633d 226e 6176 7472 6565 6461 7461 2e6a c="navtreedata.j │ │ │ -00000370: 7322 3e3c 2f73 6372 6970 743e 0a3c 7363 s">.
    .....MathJax.Hub.C │ │ │ -000004b0: 6f6e 6669 6728 7b0a 2020 6578 7465 6e73 onfig({. extens │ │ │ -000004c0: 696f 6e73 3a20 5b22 7465 7832 6a61 782e ions: ["tex2jax. │ │ │ -000004d0: 6a73 225d 2c0a 2020 6a61 783a 205b 2269 js"],. jax: ["i │ │ │ -000004e0: 6e70 7574 2f54 6558 222c 226f 7574 7075 nput/TeX","outpu │ │ │ -000004f0: 742f 4854 4d4c 2d43 5353 225d 2c0a 7d29 t/HTML-CSS"],.}) │ │ │ -00000500: 3b0a 3c2f 7363 7269 7074 3e0a 3c73 6372 ;.. │ │ │ -00000590: 0a3c 6c69 6e6b 2068 7265 663d 2264 6f78 .....
    .. . │ │ │ -00000680: 0a20 203c 7464 2069 643d 2270 726f 6a65 . . . ....../* @li │ │ │ -000007a0: 6365 6e73 6520 6d61 676e 6574 3a3f 7874 cense magnet:?xt │ │ │ -000007b0: 3d75 726e 3a62 7469 683a 6433 6439 6139 =urn:btih:d3d9a9 │ │ │ -000007c0: 6136 3539 3535 3231 6639 3636 3661 3565 a6595521f9666a5e │ │ │ -000007d0: 3934 6363 3833 3064 6162 3833 6236 3536 94cc830dab83b656 │ │ │ -000007e0: 3939 2661 6d70 3b64 6e3d 6578 7061 742e 99&dn=expat. │ │ │ -000007f0: 7478 7420 4d49 5420 2a2f 0a76 6172 2073 txt MIT */.var s │ │ │ -00000800: 6561 7263 6842 6f78 203d 206e 6577 2053 earchBox = new S │ │ │ -00000810: 6561 7263 6842 6f78 2822 7365 6172 6368 earchBox("search │ │ │ -00000820: 426f 7822 2c20 2273 6561 7263 682f 222c Box", "search/", │ │ │ -00000830: 272e 6874 6d6c 2729 3b0a 2f2a 2040 6c69 '.html');./* @li │ │ │ -00000840: 6365 6e73 652d 656e 6420 2a2f 0a3c 2f73 cense-end */....< │ │ │ -000009e0: 6469 7620 6964 3d22 6d61 696e 2d6e 6176 div id="main-nav │ │ │ -000009f0: 223e 3c2f 6469 763e 0a3c 7363 7269 7074 ">...< │ │ │ -00000ae0: 6469 7620 6964 3d22 7369 6465 2d6e 6176 div id="side-nav │ │ │ -00000af0: 2220 636c 6173 733d 2275 692d 7265 7369 " class="ui-resi │ │ │ -00000b00: 7a61 626c 6520 7369 6465 2d6e 6176 2d72 zable side-nav-r │ │ │ -00000b10: 6573 697a 6162 6c65 223e 0a20 203c 6469 esizable">. │ │ │ -00000b30: 0a20 2020 203c 6469 7620 6964 3d22 6e61 .
    .
    . │ │ │ -00000b80: 2020 203c 2f64 6976 3e0a 2020 3c2f 6469
    .
    .
    . .
    ../* @ │ │ │ -00000c20: 6c69 6365 6e73 6520 6d61 676e 6574 3a3f license magnet:? │ │ │ -00000c30: 7874 3d75 726e 3a62 7469 683a 6433 6439 xt=urn:btih:d3d9 │ │ │ -00000c40: 6139 6136 3539 3535 3231 6639 3636 3661 a9a6595521f9666a │ │ │ -00000c50: 3565 3934 6363 3833 3064 6162 3833 6236 5e94cc830dab83b6 │ │ │ -00000c60: 3536 3939 2661 6d70 3b64 6e3d 6578 7061 5699&dn=expa │ │ │ -00000c70: 742e 7478 7420 4d49 5420 2a2f 0a24 2864 t.txt MIT */.$(d │ │ │ -00000c80: 6f63 756d 656e 7429 2e72 6561 6479 2866 ocument).ready(f │ │ │ -00000c90: 756e 6374 696f 6e28 297b 696e 6974 4e61 unction(){initNa │ │ │ -00000ca0: 7654 7265 6528 2761 3030 3236 335f 736f vTree('a00263_so │ │ │ -00000cb0: 7572 6365 2e68 746d 6c27 2c27 2729 3b20 urce.html',''); │ │ │ -00000cc0: 696e 6974 5265 7369 7a61 626c 6528 293b initResizable(); │ │ │ -00000cd0: 207d 293b 0a2f 2a20 406c 6963 656e 7365 });./* @license │ │ │ -00000ce0: 2d65 6e64 202a 2f0a 3c2f 7363 7269 7074 -end */..
    ..
    .< │ │ │ -00000e00: 2f64 6976 3e0a 0a3c 212d 2d20 6966 7261 /div>...
    .
    . │ │ │ -00000e80: 3c64 6976 2063 6c61 7373 3d22 5352 5061
    .
    .
    .
    Loading... │ │ │ -00000ef0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    Sear │ │ │ -00000f20: 6368 696e 672e 2e2e 3c2f 6469 763e 0a3c ching...
    .< │ │ │ -00000f30: 6469 7620 636c 6173 733d 2253 5253 7461 div class="SRSta │ │ │ -00000f40: 7475 7322 2069 643d 224e 6f4d 6174 6368 tus" id="NoMatch │ │ │ -00000f50: 6573 223e 4e6f 204d 6174 6368 6573 3c2f es">No Matches.
    ..
    .
    │ │ │ -00000f80: 0a0a 3c64 6976 2063 6c61 7373 3d22 6865 ..
    .
    DecisionTre │ │ │ -00000fd0: 652d 696e 6c2e 683c 2f64 6976 3e3c 2f64 e-inl.h
    .
    .
    .< │ │ │ -00001010: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ -00001020: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    │ │ │ -00001070: 2031 3c2f 7370 616e 3e3c 7370 616e 2063 1/ │ │ │ -00001090: 2a20 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d * -------------- │ │ │ -000010a0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ -000010b0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ -000010c0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ -000010d0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 3c2f --------------
    .
    < │ │ │ -00001120: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00001130: 6e6f 223e 2020 2020 323c 2f73 7061 6e3e no"> 2 │ │ │ -00001140: 3c73 7061 6e20 636c 6173 733d 2263 6f6d .
    │ │ │ -000011b0: 2033 3c2f 7370 616e 3e3c 7370 616e 2063 3 │ │ │ -000011d0: 2a20 4754 5341 4d20 436f 7079 7269 6768 * GTSAM Copyrigh │ │ │ -000011e0: 7420 3230 3130 2c20 4765 6f72 6769 6120 t 2010, Georgia │ │ │ -000011f0: 5465 6368 2052 6573 6561 7263 6820 436f Tech Research Co │ │ │ -00001200: 7270 6f72 6174 696f 6e2c 3c2f 7370 616e rporation,
    .
    │ │ │ -00001260: 2020 2020 343c 2f73 7061 6e3e 3c73 7061 4 * Atlanta, Ge │ │ │ -00001290: 6f72 6769 6120 3330 3333 322d 3034 3135 orgia 30332-0415 │ │ │ -000012a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ -000012c0: 3c61 2069 643d 226c 3030 3030 3522 206e 5 * All R │ │ │ -00001320: 6967 6874 7320 5265 7365 7276 6564 3c2f ights Reserved
    .
    < │ │ │ -00001370: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00001380: 6e6f 223e 2020 2020 363c 2f73 7061 6e3e no"> 6 │ │ │ -00001390: 3c73 7061 6e20 636c 6173 733d 2263 6f6d * Authors │ │ │ -000013b0: 3a20 4672 616e 6b20 4465 6c6c 6165 7274 : Frank Dellaert │ │ │ -000013c0: 2c20 6574 2061 6c2e 2028 7365 6520 5448 , et al. (see TH │ │ │ -000013d0: 414e 4b53 2066 6f72 2074 6865 2066 756c ANKS for the ful │ │ │ -000013e0: 6c20 6175 7468 6f72 206c 6973 7429 3c2f l author list)
    .
    < │ │ │ -00001430: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00001440: 6e6f 223e 2020 2020 373c 2f73 7061 6e3e no"> 7 │ │ │ -00001450: 3c73 7061 6e20 636c 6173 733d 2263 6f6d .
    │ │ │ -000014c0: 2038 3c2f 7370 616e 3e3c 7370 616e 2063 8 │ │ │ -000014e0: 2a20 5365 6520 4c49 4345 4e53 4520 666f * See LICENSE fo │ │ │ -000014f0: 7220 7468 6520 6c69 6365 6e73 6520 696e r the license in │ │ │ -00001500: 666f 726d 6174 696f 6e3c 2f73 7061 6e3e formation │ │ │ -00001510: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00001560: 2020 2039 3c2f 7370 616e 3e3c 7370 616e 9
    . │ │ │ -00001590: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    │ │ │ -000016a0: 2020 2031 313c 2f73 7061 6e3e 203c 2f64 11 .
    2 │ │ │ -00001700: 303c 2f73 7061 6e3e 3c73 7061 6e20 636c 0#pragma once< │ │ │ -00001730: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ -00001750: 6120 6964 3d22 6c30 3030 3231 2220 6e61 a id="l00021" na │ │ │ -00001760: 6d65 3d22 6c30 3030 3231 223e 3c2f 613e me="l00021"> │ │ │ -00001770: 3c73 7061 6e20 636c 6173 733d 226c 696e 21
    ..
    23 │ │ │ -000018c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00001910: 2020 3234 3c2f 7370 616e 3e3c 7370 616e 24#include & │ │ │ -00001940: 6c74 3b61 6c67 6f72 6974 686d 2667 743b lt;algorithm> │ │ │ -00001950: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ -00001970: 3c61 2069 643d 226c 3030 3032 3522 206e 25#in │ │ │ -000019d0: 636c 7564 6520 266c 743b 626f 6f73 742f clude <boost/ │ │ │ -000019e0: 666f 726d 6174 2e68 7070 2667 743b 3c2f format.hpp>
    .
    < │ │ │ -00001a30: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00001a40: 6e6f 223e 2020 2032 363c 2f73 7061 6e3e no"> 26 │ │ │ -00001a50: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl │ │ │ -00001a70: 7564 6520 266c 743b 626f 6f73 742f 6d61 ude <boost/ma │ │ │ -00001a80: 6b65 5f73 6861 7265 642e 6870 7026 6774 ke_shared.hpp> │ │ │ -00001a90: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .< │ │ │ -00001aa0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00001ab0: 3e3c 6120 6964 3d22 6c30 3030 3237 2220 > 27#i │ │ │ -00001b10: 6e63 6c75 6465 2026 6c74 3b62 6f6f 7374 nclude <boost │ │ │ -00001b20: 2f6f 7074 696f 6e61 6c2e 6870 7026 6774 /optional.hpp> │ │ │ -00001b30: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .< │ │ │ -00001b40: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00001b50: 3e3c 6120 6964 3d22 6c30 3030 3238 2220 > 28
    .
    29< │ │ │ -00001bf0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class="prep │ │ │ -00001c00: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor">#inclu │ │ │ -00001c10: 6465 2026 6c74 3b63 6d61 7468 2667 743b de <cmath> │ │ │ -00001c20: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ -00001c40: 3c61 2069 643d 226c 3030 3033 3022 206e 30#in │ │ │ -00001ca0: 636c 7564 6520 266c 743b 6673 7472 6561 clude <fstrea │ │ │ -00001cb0: 6d26 6774 3b3c 2f73 7061 6e3e 3c2f 6469 m>.
    31 │ │ │ -00001d10: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 #include <l │ │ │ -00001d40: 6973 7426 6774 3b3c 2f73 7061 6e3e 3c2f ist>.
    │ │ │ -00001da0: 3332 3c2f 7370 616e 3e3c 7370 616e 2063 32#include < │ │ │ -00001dd0: 3b6d 6170 2667 743b 3c2f 7370 616e 3e3c ;map>< │ │ │ -00001de0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00001e30: 2033 333c 2f73 7061 6e3e 3c73 7061 6e20 33#include &l │ │ │ -00001e60: 743b 7365 7426 6774 3b3c 2f73 7061 6e3e t;set> │ │ │ -00001e70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00001ec0: 2020 3334 3c2f 7370 616e 3e3c 7370 616e 34#include & │ │ │ -00001ef0: 6c74 3b73 7374 7265 616d 2667 743b 3c2f lt;sstream>
    .
    < │ │ │ -00001f40: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00001f50: 6e6f 223e 2020 2033 353c 2f73 7061 6e3e no"> 35 │ │ │ -00001f60: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl │ │ │ -00001f80: 7564 6520 266c 743b 7374 7269 6e67 2667 ude <string&g │ │ │ -00001f90: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    . │ │ │ -00001fa0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -00001fd0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 36# │ │ │ -00002010: 696e 636c 7564 6520 266c 743b 7665 6374 include <vect │ │ │ -00002020: 6f72 2667 743b 3c2f 7370 616e 3e3c 2f64 or>.
    3 │ │ │ -00002080: 373c 2f73 7061 6e3e 203c 2f64 6976 3e0a 7
    . │ │ │ -00002090: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ -00002160: 6120 6964 3d22 6c30 3030 3339 2220 6e61 a id="l00039" na │ │ │ -00002170: 6d65 3d22 6c30 3030 3339 223e 3c2f 613e me="l00039"> │ │ │ -00002180: 3c73 7061 6e20 636c 6173 733d 226c 696e 39
    .
    40 /********** │ │ │ -00002220: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00002230: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00002240: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00002250: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00002260: 2a2a 2f3c 2f73 7061 6e3e 3c2f 6469 763e **/
    │ │ │ -00002270: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -000022a0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 41 // │ │ │ -000022e0: 4e6f 6465 3c2f 7370 616e 3e3c 2f64 6976 Node
    .
    42< │ │ │ -00002340: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span> /* │ │ │ -00002360: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00002370: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00002380: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00002390: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000023a0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2f 3c2f 7370 ***********/
    .
    43#ifdef │ │ │ -00002430: 4454 5f44 4542 5547 5f4d 454d 4f52 593c DT_DEBUG_MEMORY< │ │ │ -00002440: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ -00002460: 6120 6964 3d22 6c30 3030 3434 2220 6e61 a id="l00044" na │ │ │ -00002470: 6d65 3d22 6c30 3030 3434 223e 3c2f 613e me="l00044"> │ │ │ -00002480: 3c73 7061 6e20 636c 6173 733d 226c 696e 44 templat │ │ │ -000024c0: 653c 2f73 7061 6e3e 266c 743b 3c73 7061 e<typename L, typen │ │ │ -00002510: 616d 653c 2f73 7061 6e3e 2059 2667 743b ame Y> │ │ │ -00002520: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00002570: 2020 3435 3c2f 7370 616e 3e20 203c 7370 45 int DecisionTree&l │ │ │ -000025b0: 743b 4c2c 2059 2667 743b 3a3a 4e6f 6465 t;L, Y>::Node │ │ │ -000025c0: 3a3a 6e72 4e6f 6465 7320 3d20 303b 3c2f ::nrNodes = 0;.
    │ │ │ -00002620: 3436 3c2f 7370 616e 3e3c 7370 616e 2063 46#endif
    .
    │ │ │ -000026a0: 2020 2034 373c 2f73 7061 6e3e 203c 2f64 47 .
    4 │ │ │ -00002700: 383c 2f73 7061 6e3e 3c73 7061 6e20 636c 8 │ │ │ -00002720: 2f2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a /*************** │ │ │ -00002730: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00002740: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00002750: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00002760: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2f 3c2f *************/
    .
    < │ │ │ -000027b0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -000027c0: 6e6f 223e 2020 2034 393c 2f73 7061 6e3e no"> 49 │ │ │ -000027d0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // Leaf< │ │ │ -000027f0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ -00002810: 6120 6964 3d22 6c30 3030 3530 2220 6e61 a id="l00050" na │ │ │ -00002820: 6d65 3d22 6c30 3030 3530 223e 3c2f 613e me="l00050"> │ │ │ -00002830: 3c73 7061 6e20 636c 6173 733d 226c 696e 50 /****** │ │ │ -00002870: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00002880: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00002890: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000028a0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000028b0: 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e 3c2f ******/.
    │ │ │ -00002910: 3531 3c2f 7370 616e 3e20 203c 7370 616e 51 template │ │ │ -00002940: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ -00002960: 616d 653c 2f73 7061 6e3e 204c 2c20 3c73 ame L, typename Y>
    . │ │ │ -000029a0: 3c64 6976 2063 6c61 7373 3d22 666f 6c64
    .
    < │ │ │ -00002a30: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ -00002a40: 7265 663d 2261 3032 3737 362e 6874 6d6c ref="a02776.html │ │ │ -00002a50: 223e 2020 2035 323c 2f61 3e3c 2f73 7061 "> 52 struct │ │ │ -00002a80: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 DecisionTree │ │ │ -00002ac0: 3c2f 613e 266c 743b 4c2c 2059 2667 743b <L, Y> │ │ │ -00002ad0: 3a3a 3c61 2063 6c61 7373 3d22 636f 6465 ::L │ │ │ -00002b00: 6561 663c 2f61 3e20 3a20 3c73 7061 6e20 eaf : │ │ │ -00002b20: 7075 626c 6963 3c2f 7370 616e 3e20 3c61 public Decisi │ │ │ -00002b60: 6f6e 5472 6565 3c2f 613e 266c 743b 4c2c onTree<L, │ │ │ -00002b70: 2059 2667 743b 3a3a 4e6f 6465 207b 3c2f Y>::Node {.. │ │ │ -00002ca0: 3c61 2069 643d 226c 3030 3035 3522 206e 55
    .
    59 │ │ │ -00002d80: 3c2f 7370 616e 3e20 2020 203c 7370 616e size_t nrAssignment │ │ │ -00002e10: 735f 3c2f 613e 3b3c 2f64 6976 3e0a 3c64 s_;
    . │ │ │ -00002e30: 3c61 2069 643d 226c 3030 3036 3022 206e 60
    .
    62 │ │ │ -00002f10: 3c2f 7370 616e 3e20 2020 203c 6120 636c Leaf │ │ │ -00002f70: 3c2f 613e 2829 207b 7d3c 2f64 6976 3e0a () {}
    . │ │ │ -00002f80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    .
    │ │ │ -000030b0: 2020 3635 3c2f 613e 3c2f 7370 616e 3e20 65 │ │ │ -000030c0: 2020 203c 6120 636c 6173 733d 2263 6f64 Leaf(const │ │ │ -00003140: 5926 616d 703b 2063 6f6e 7374 616e 742c Y& constant, │ │ │ -00003150: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_ │ │ │ -00003170: 743c 2f73 7061 6e3e 206e 7241 7373 6967 t nrAssig │ │ │ -00003180: 6e6d 656e 7473 203d 2031 293c 2f64 6976 nments = 1)
    .
    66< │ │ │ -000031e0: 2f73 7061 6e3e 2020 2020 2020 2020 3a20 /span> : │ │ │ -000031f0: 636f 6e73 7461 6e74 5f28 636f 6e73 7461 constant_(consta │ │ │ -00003200: 6e74 292c 206e 7241 7373 6967 6e6d 656e nt), nrAssignmen │ │ │ -00003210: 7473 5f28 6e72 4173 7369 676e 6d65 6e74 ts_(nrAssignment │ │ │ -00003220: 7329 207b 7d3c 2f64 6976 3e0a 3c2f 6469 s) {}
    ..
    67 │ │ │ -00003280: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ -00003290: 6469 7620 636c 6173 733d 2266 6f6c 646f div class="foldo │ │ │ -000032a0: 7065 6e22 2069 643d 2266 6f6c 646f 7065 pen" id="foldope │ │ │ -000032b0: 6e30 3030 3639 2220 6461 7461 2d73 7461 n00069" data-sta │ │ │ -000032c0: 7274 3d22 7b22 2064 6174 612d 656e 643d rt="{" data-end= │ │ │ -000032d0: 227d 223e 0a3c 6469 7620 636c 6173 733d "}">.
    69 cons │ │ │ -00003390: 743c 2f73 7061 6e3e 2059 2661 6d70 3b20 t Y& │ │ │ -000033a0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 constant()< │ │ │ -00003400: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00003410: 6f72 6422 3e20 636f 6e73 7420 3c2f 7370 ord"> const {
    .
    ...... │ │ │ +00000340: 3c73 6372 6970 7420 7479 7065 3d22 7465 ......MathJax.Hub. │ │ │ +000004b0: 436f 6e66 6967 287b 0a20 2065 7874 656e Config({. exten │ │ │ +000004c0: 7369 6f6e 733a 205b 2274 6578 326a 6178 sions: ["tex2jax │ │ │ +000004d0: 2e6a 7322 5d2c 0a20 206a 6178 3a20 5b22 .js"],. jax: [" │ │ │ +000004e0: 696e 7075 742f 5465 5822 2c22 6f75 7470 input/TeX","outp │ │ │ +000004f0: 7574 2f48 544d 4c2d 4353 5322 5d2c 0a7d ut/HTML-CSS"],.} │ │ │ +00000500: 293b 0a3c 2f73 6372 6970 743e 0a3c 7363 );....< │ │ │ +000005d0: 2f68 6561 643e 0a3c 626f 6479 3e0a 3c64 /head>...
    ..
    . . . . ....../* @l │ │ │ +000007a0: 6963 656e 7365 206d 6167 6e65 743a 3f78 icense magnet:?x │ │ │ +000007b0: 743d 7572 6e3a 6274 6968 3a64 3364 3961 t=urn:btih:d3d9a │ │ │ +000007c0: 3961 3635 3935 3532 3166 3936 3636 6135 9a6595521f9666a5 │ │ │ +000007d0: 6539 3463 6338 3330 6461 6238 3362 3635 e94cc830dab83b65 │ │ │ +000007e0: 3639 3926 616d 703b 646e 3d65 7870 6174 699&dn=expat │ │ │ +000007f0: 2e74 7874 204d 4954 202a 2f0a 7661 7220 .txt MIT */.var │ │ │ +00000800: 7365 6172 6368 426f 7820 3d20 6e65 7720 searchBox = new │ │ │ +00000810: 5365 6172 6368 426f 7828 2273 6561 7263 SearchBox("searc │ │ │ +00000820: 6842 6f78 222c 2022 7365 6172 6368 2f22 hBox", "search/" │ │ │ +00000830: 2c27 2e68 746d 6c27 293b 0a2f 2a20 406c ,'.html');./* @l │ │ │ +00000840: 6963 656e 7365 2d65 6e64 202a 2f0a 3c2f icense-end */..../* @li │ │ │ +000008f0: 6365 6e73 6520 6d61 676e 6574 3a3f 7874 cense magnet:?xt │ │ │ +00000900: 3d75 726e 3a62 7469 683a 6433 6439 6139 =urn:btih:d3d9a9 │ │ │ +00000910: 6136 3539 3535 3231 6639 3636 3661 3565 a6595521f9666a5e │ │ │ +00000920: 3934 6363 3833 3064 6162 3833 6236 3536 94cc830dab83b656 │ │ │ +00000930: 3939 2661 6d70 3b64 6e3d 6578 7061 742e 99&dn=expat. │ │ │ +00000940: 7478 7420 4d49 5420 2a2f 0a24 2866 756e txt MIT */.$(fun │ │ │ +00000950: 6374 696f 6e28 2920 7b0a 2020 696e 6974 ction() {. init │ │ │ +00000960: 4d65 6e75 2827 272c 7472 7565 2c66 616c Menu('',true,fal │ │ │ +00000970: 7365 2c27 7365 6172 6368 2e70 6870 272c se,'search.php', │ │ │ +00000980: 2753 6561 7263 6827 293b 0a20 2024 2864 'Search');. $(d │ │ │ +00000990: 6f63 756d 656e 7429 2e72 6561 6479 2866 ocument).ready(f │ │ │ +000009a0: 756e 6374 696f 6e28 2920 7b20 696e 6974 unction() { init │ │ │ +000009b0: 5f73 6561 7263 6828 293b 207d 293b 0a7d _search(); });.} │ │ │ +000009c0: 293b 0a2f 2a20 406c 6963 656e 7365 2d65 );./* @license-e │ │ │ +000009d0: 6e64 202a 2f0a 3c2f 7363 7269 7074 3e0a nd */.. │ │ │ +000009e0: 3c64 6976 2069 643d 226d 6169 6e2d 6e61
    ../* @li │ │ │ +00000a20: 6365 6e73 6520 6d61 676e 6574 3a3f 7874 cense magnet:?xt │ │ │ +00000a30: 3d75 726e 3a62 7469 683a 6433 6439 6139 =urn:btih:d3d9a9 │ │ │ +00000a40: 6136 3539 3535 3231 6639 3636 3661 3565 a6595521f9666a5e │ │ │ +00000a50: 3934 6363 3833 3064 6162 3833 6236 3536 94cc830dab83b656 │ │ │ +00000a60: 3939 2661 6d70 3b64 6e3d 6578 7061 742e 99&dn=expat. │ │ │ +00000a70: 7478 7420 4d49 5420 2a2f 0a24 2864 6f63 txt MIT */.$(doc │ │ │ +00000a80: 756d 656e 7429 2e72 6561 6479 2866 756e ument).ready(fun │ │ │ +00000a90: 6374 696f 6e28 2920 7b20 696e 6974 5f63 ction() { init_c │ │ │ +00000aa0: 6f64 6566 6f6c 6428 3029 3b20 7d29 3b0a odefold(0); });. │ │ │ +00000ab0: 2f2a 2040 6c69 6365 6e73 652d 656e 6420 /* @license-end │ │ │ +00000ac0: 2a2f 0a3c 2f73 6372 6970 743e 0a3c 2f64 */... │ │ │ +00000ae0: 3c64 6976 2069 643d 2273 6964 652d 6e61
    . .
    .
    . │ │ │ +00000b80: 2020 2020 3c2f 6469 763e 0a20 203c 2f64
    .
    .
    . < │ │ │ +00000bf0: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 7363 /div>.
    ../* │ │ │ +00000c20: 406c 6963 656e 7365 206d 6167 6e65 743a @license magnet: │ │ │ +00000c30: 3f78 743d 7572 6e3a 6274 6968 3a64 3364 ?xt=urn:btih:d3d │ │ │ +00000c40: 3961 3961 3635 3935 3532 3166 3936 3636 9a9a6595521f9666 │ │ │ +00000c50: 6135 6539 3463 6338 3330 6461 6238 3362 a5e94cc830dab83b │ │ │ +00000c60: 3635 3639 3926 616d 703b 646e 3d65 7870 65699&dn=exp │ │ │ +00000c70: 6174 2e74 7874 204d 4954 202a 2f0a 2428 at.txt MIT */.$( │ │ │ +00000c80: 646f 6375 6d65 6e74 292e 7265 6164 7928 document).ready( │ │ │ +00000c90: 6675 6e63 7469 6f6e 2829 7b69 6e69 744e function(){initN │ │ │ +00000ca0: 6176 5472 6565 2827 6130 3032 3633 5f73 avTree('a00263_s │ │ │ +00000cb0: 6f75 7263 652e 6874 6d6c 272c 2727 293b ource.html',''); │ │ │ +00000cc0: 2069 6e69 7452 6573 697a 6162 6c65 2829 initResizable() │ │ │ +00000cd0: 3b20 7d29 3b0a 2f2a 2040 6c69 6365 6e73 ; });./* @licens │ │ │ +00000ce0: 652d 656e 6420 2a2f 0a3c 2f73 6372 6970 e-end */..
    ..
    . │ │ │ +00000e00: 3c2f 6469 763e 0a0a 3c21 2d2d 2069 6672
    ...
    .
    │ │ │ +00000e80: 0a3c 6469 7620 636c 6173 733d 2253 5250 .
    .
    .
    .
    Loading.. │ │ │ +00000ef0: 2e3c 2f64 6976 3e0a 3c64 6976 2063 6c61 .
    .
    Sea │ │ │ +00000f20: 7263 6869 6e67 2e2e 2e3c 2f64 6976 3e0a rching...
    . │ │ │ +00000f30: 3c64 6976 2063 6c61 7373 3d22 5352 5374
    No Matches< │ │ │ +00000f60: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 2f64 /div>.
    ..
    .
    ..
    .
    DiscreteMa │ │ │ +00000fd0: 7267 696e 616c 732e 683c 2f64 6976 3e3c rginals.h
    < │ │ │ +00000fe0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.
    .
    │ │ │ +00001010: 0a3c 6120 6872 6566 3d22 6130 3032 3633 .Go to the │ │ │ +00001030: 2064 6f63 756d 656e 7461 7469 6f6e 206f documentation o │ │ │ +00001040: 6620 7468 6973 2066 696c 652e 3c2f 613e f this file. │ │ │ +00001050: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    │ │ │ +000010b0: 2020 313c 2f73 7061 6e3e 3c73 7061 6e20 1 │ │ │ +000010d0: 2f2a 202d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d /* ------------- │ │ │ +000010e0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ +000010f0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ +00001100: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ +00001110: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d3c ---------------< │ │ │ +00001120: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ +00001140: 6120 6964 3d22 6c30 3030 3032 2220 6e61 a id="l00002" na │ │ │ +00001150: 6d65 3d22 6c30 3030 3032 223e 3c2f 613e me="l00002"> │ │ │ +00001160: 3c73 7061 6e20 636c 6173 733d 226c 696e 2 < │ │ │ +000011a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +000011f0: 2020 333c 2f73 7061 6e3e 3c73 7061 6e20 3 │ │ │ +00001210: 202a 2047 5453 414d 2043 6f70 7972 6967 * GTSAM Copyrig │ │ │ +00001220: 6874 2032 3031 302c 2047 656f 7267 6961 ht 2010, Georgia │ │ │ +00001230: 2054 6563 6820 5265 7365 6172 6368 2043 Tech Research C │ │ │ +00001240: 6f72 706f 7261 7469 6f6e 2c3c 2f73 7061 orporation,
    .
    4 * Atlanta, G │ │ │ +000012d0: 656f 7267 6961 2033 3033 3332 2d30 3431 eorgia 30332-041 │ │ │ +000012e0: 353c 2f73 7061 6e3e 3c2f 6469 763e 0a3c 5
    .< │ │ │ +000012f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00001300: 3e3c 6120 6964 3d22 6c30 3030 3035 2220 > 5 * All │ │ │ +00001360: 5269 6768 7473 2052 6573 6572 7665 643c Rights Reserved< │ │ │ +00001370: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ +00001390: 6120 6964 3d22 6c30 3030 3036 2220 6e61 a id="l00006" na │ │ │ +000013a0: 6d65 3d22 6c30 3030 3036 223e 3c2f 613e me="l00006"> │ │ │ +000013b0: 3c73 7061 6e20 636c 6173 733d 226c 696e 6 * Author │ │ │ +000013f0: 733a 2046 7261 6e6b 2044 656c 6c61 6572 s: Frank Dellaer │ │ │ +00001400: 742c 2065 7420 616c 2e20 2873 6565 2054 t, et al. (see T │ │ │ +00001410: 4841 4e4b 5320 666f 7220 7468 6520 6675 HANKS for the fu │ │ │ +00001420: 6c6c 2061 7574 686f 7220 6c69 7374 293c ll author list)< │ │ │ +00001430: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ +00001450: 6120 6964 3d22 6c30 3030 3037 2220 6e61 a id="l00007" na │ │ │ +00001460: 6d65 3d22 6c30 3030 3037 223e 3c2f 613e me="l00007"> │ │ │ +00001470: 3c73 7061 6e20 636c 6173 733d 226c 696e 7 < │ │ │ +000014b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00001500: 2020 383c 2f73 7061 6e3e 3c73 7061 6e20 8 │ │ │ +00001520: 202a 2053 6565 204c 4943 454e 5345 2066 * See LICENSE f │ │ │ +00001530: 6f72 2074 6865 206c 6963 656e 7365 2069 or the license i │ │ │ +00001540: 6e66 6f72 6d61 7469 6f6e 3c2f 7370 616e nformation
    .
    │ │ │ +000015a0: 2020 2020 393c 2f73 7061 6e3e 3c73 7061 9
    │ │ │ +000015d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +00001600: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 10 * -- │ │ │ +00001640: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ +00001650: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ +00001660: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ +00001670: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ +00001680: 2d2d 2d2d 2d2d 2d2d 202a 2f3c 2f73 7061 -------- */
    .
    11 .
    │ │ │ +00001740: 3231 3c2f 7370 616e 3e3c 7370 616e 2063 21#pragma once │ │ │ +00001770: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ +00001790: 3c61 2069 643d 226c 3030 3032 3222 206e 22
    .
    23#includ │ │ │ +00001850: 6520 266c 743b 3c61 2063 6c61 7373 3d22 e <gtsam/d │ │ │ +00001880: 6973 6372 6574 652f 4469 7363 7265 7465 iscrete/Discrete │ │ │ +00001890: 4661 6374 6f72 4772 6170 682e 683c 2f61 FactorGraph.h>.
    24 │ │ │ +00001900: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 #include << │ │ │ +00001930: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ +00001940: 7265 663d 2261 3030 3236 392e 6874 6d6c ref="a00269.html │ │ │ +00001950: 223e 6774 7361 6d2f 6469 7363 7265 7465 ">gtsam/discrete │ │ │ +00001960: 2f44 6973 6372 6574 6542 6179 6573 5472 /DiscreteBayesTr │ │ │ +00001970: 6565 2e68 3c2f 613e 2667 743b 3c2f 7370 ee.h>
    .
    25#includ │ │ │ +00001a00: 6520 266c 743b 3c61 2063 6c61 7373 3d22 e <gtsam/b │ │ │ +00001a30: 6173 652f 5665 6374 6f72 2e68 3c2f 613e ase/Vector.h │ │ │ +00001a40: 2667 743b 3c2f 7370 616e 3e3c 2f64 6976 >
    .
    26< │ │ │ +00001aa0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ +00001ac0: 3c61 2069 643d 226c 3030 3032 3722 206e 27namespac │ │ │ +00001b20: 6520 3c2f 7370 616e 3e3c 6120 636c 6173 e gtsam {
    .
    28 │ │ │ +00001bc0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    . │ │ │ +00001c20: 3c61 2069 643d 226c 3030 3033 3322 206e 33c │ │ │ +00001ca0: 6c61 7373 203c 2f73 7061 6e3e 3c61 2063 lass Discrete │ │ │ +00001ce0: 4d61 7267 696e 616c 733c 2f61 3e20 7b3c Marginals {< │ │ │ +00001cf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00001d40: 2033 343c 2f73 7061 6e3e 203c 2f64 6976 34
    .
    35< │ │ │ +00001da0: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> pr │ │ │ +00001dc0: 6f74 6563 7465 643c 2f73 7061 6e3e 3a3c otected:< │ │ │ +00001dd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00001e20: 2033 363c 2f73 7061 6e3e 203c 2f64 6976 36
    .
    37< │ │ │ +00001e80: 2f73 7061 6e3e 2020 2020 4469 7363 7265 /span> Discre │ │ │ +00001e90: 7465 4261 7965 7354 7265 653a 3a73 6861 teBayesTree::sha │ │ │ +00001ea0: 7265 645f 7074 7220 6261 7965 7354 7265 red_ptr bayesTre │ │ │ +00001eb0: 655f 3b3c 2f64 6976 3e0a 3c64 6976 2063 e_;
    .
    38 < │ │ │ +00001f10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +00001f60: 2033 393c 2f73 7061 6e3e 2020 3c73 7061 39 public: │ │ │ +00001f90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00001fe0: 2020 3430 3c2f 7370 616e 3e20 3c2f 6469 40 .
    41 │ │ │ +00002040: 3c2f 7370 616e 3e20 203c 6120 636c 6173 DiscreteMar │ │ │ +00002080: 6769 6e61 6c73 3c2f 613e 2829 207b 7d3c ginals() {}< │ │ │ +00002090: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ +000020e0: 2034 323c 2f73 7061 6e3e 203c 2f64 6976 42
    .
    .
    │ │ │ +00002180: 3c61 2063 6c61 7373 3d22 6c69 6e65 2220 46 Discrete │ │ │ +00002230: 4d61 7267 696e 616c 733c 2f61 3e28 3c73 Marginals(const │ │ │ +00002260: 203c 6120 636c 6173 733d 2263 6f64 6520 Dis │ │ │ +00002290: 6372 6574 6546 6163 746f 7247 7261 7068 creteFactorGraph │ │ │ +000022a0: 3c2f 613e 2661 6d70 3b20 6772 6170 6829 & graph) │ │ │ +000022b0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    47 │ │ │ +00002310: 2062 6179 6573 5472 6565 5f20 3d20 6772 bayesTree_ = gr │ │ │ +00002320: 6170 682e 656c 696d 696e 6174 654d 756c aph.eliminateMul │ │ │ +00002330: 7469 6672 6f6e 7461 6c28 293b 3c2f 6469 tifrontal();.
    48 │ │ │ +00002390: 3c2f 7370 616e 3e20 207d 3c2f 6469 763e }
    │ │ │ +000023a0: 0a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 .
    .
    │ │ │ +000023f0: 2020 2034 393c 2f73 7061 6e3e 203c 2f64 49 .
    .
    51 │ │ │ +000024e0: 3c2f 7370 616e 3e20 203c 6120 636c 6173 Discret │ │ │ +00002540: 6546 6163 746f 723a 3a73 6861 7265 645f eFactor::shared_ │ │ │ +00002550: 7074 723c 2f61 3e20 3c61 2063 6c61 7373 ptr operato │ │ │ +000025b0: 7228 293c 2f61 3e28 3c61 2063 6c61 7373 r()(Key │ │ │ +00002610: 7661 7269 6162 6c65 293c 7370 616e 2063 variable) │ │ │ +00002630: 636f 6e73 7420 3c2f 7370 616e 3e7b 3c2f const {.
    │ │ │ +00002690: 3532 3c2f 7370 616e 3e20 2020 203c 7370 52 // Compute ma │ │ │ +000026c0: 7267 696e 616c 3c2f 7370 616e 3e3c 2f64 rginal.
    5 │ │ │ +00002720: 333c 2f73 7061 6e3e 2020 2020 3c61 2063 3 Disc │ │ │ +00002780: 7265 7465 4661 6374 6f72 3a3a 7368 6172 reteFactor::shar │ │ │ +00002790: 6564 5f70 7472 3c2f 613e 206d 6172 6769 ed_ptr margi │ │ │ +000027a0: 6e61 6c46 6163 746f 723b 3c2f 6469 763e nalFactor;
    │ │ │ +000027b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ +000027e0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 54 margina │ │ │ +00002810: 6c46 6163 746f 7220 3d20 6261 7965 7354 lFactor = bayesT │ │ │ +00002820: 7265 655f 2d26 6774 3b6d 6172 6769 6e61 ree_->margina │ │ │ +00002830: 6c46 6163 746f 7228 7661 7269 6162 6c65 lFactor(variable │ │ │ +00002840: 2c20 2661 6d70 3b3c 6120 636c 6173 733d , &Elimina │ │ │ +000028a0: 7465 4469 7363 7265 7465 3c2f 613e 293b teDiscrete); │ │ │ +000028b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ +00002900: 2020 3535 3c2f 7370 616e 3e20 2020 203c 55 < │ │ │ +00002910: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ +00002920: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ +00002930: 2f73 7061 6e3e 206d 6172 6769 6e61 6c46 /span> marginalF │ │ │ +00002940: 6163 746f 723b 3c2f 6469 763e 0a3c 6469 actor;
    .< │ │ │ +00002960: 6120 6964 3d22 6c30 3030 3536 2220 6e61 a id="l00056" na │ │ │ +00002970: 6d65 3d22 6c30 3030 3536 223e 3c2f 613e me="l00056"> │ │ │ +00002980: 3c73 7061 6e20 636c 6173 733d 226c 696e 56 }
    .
    .
    57< │ │ │ +00002a00: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    ..
    62 Vector margi │ │ │ +00002b50: 6e61 6c50 726f 6261 6269 6c69 7469 6573 nalProbabilities │ │ │ +00002b60: 3c2f 613e 283c 7370 616e 2063 6c61 7373 (const │ │ │ +00002b80: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 Discret │ │ │ +00002be0: 654b 6579 3c2f 613e 2661 6d70 3b20 6b65 eKey& ke │ │ │ +00002bf0: 7929 3c73 7061 6e20 636c 6173 733d 226b y) const < │ │ │ +00002c10: 2f73 7061 6e3e 7b3c 2f64 6976 3e0a 3c64 /span>{
    . │ │ │ +00002c30: 3c61 2069 643d 226c 3030 3036 3322 206e 63 // C │ │ │ +00002c90: 6f6d 7075 7465 206d 6172 6769 6e61 6c3c ompute marginal< │ │ │ +00002ca0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ +00002cc0: 6120 6964 3d22 6c30 3030 3634 2220 6e61 a id="l00064" na │ │ │ +00002cd0: 6d65 3d22 6c30 3030 3634 223e 3c2f 613e me="l00064"> │ │ │ +00002ce0: 3c73 7061 6e20 636c 6173 733d 226c 696e 64 DiscreteFac │ │ │ +00002d60: 746f 723a 3a73 6861 7265 645f 7074 723c tor::shared_ptr< │ │ │ +00002d70: 2f61 3e20 6d61 7267 696e 616c 4661 6374 /a> marginalFact │ │ │ +00002d80: 6f72 3b3c 2f64 6976 3e0a 3c64 6976 2063 or;
    .
    65 │ │ │ +00002de0: 2020 6d61 7267 696e 616c 4661 6374 6f72 marginalFactor │ │ │ +00002df0: 203d 2062 6179 6573 5472 6565 5f2d 2667 = bayesTree_-&g │ │ │ +00002e00: 743b 6d61 7267 696e 616c 4661 6374 6f72 t;marginalFactor │ │ │ +00002e10: 286b 6579 2e66 6972 7374 2c20 2661 6d70 (key.first, & │ │ │ +00002e20: 3b3c 6120 636c 6173 733d 2263 6f64 6520 ;EliminateDisc │ │ │ +00002e80: 7265 7465 3c2f 613e 293b 3c2f 6469 763e rete);
    │ │ │ +00002e90: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ +00002f00: 6120 6964 3d22 6c30 3030 3637 2220 6e61 a id="l00067" na │ │ │ +00002f10: 6d65 3d22 6c30 3030 3637 223e 3c2f 613e me="l00067"> │ │ │ +00002f20: 3c73 7061 6e20 636c 6173 733d 226c 696e 67 //Cre │ │ │ +00002f60: 6174 6520 7265 7375 6c74 3c2f 7370 616e ate result
    .
    │ │ │ +00002fc0: 2020 2036 383c 2f73 7061 6e3e 2020 2020 68 │ │ │ +00002fd0: 5665 6374 6f72 2076 5265 7375 6c74 286b Vector vResult(k │ │ │ +00002fe0: 6579 2e73 6563 6f6e 6429 3b3c 2f64 6976 ey.second);
    .
    69< │ │ │ +00003040: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> for ( │ │ │ +00003070: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t │ │ │ +00003090: 3c2f 7370 616e 3e20 7374 6174 6520 3d20 state = │ │ │ +000030a0: 303b 2073 7461 7465 2026 6c74 3b20 6b65 0; state < ke │ │ │ +000030b0: 792e 7365 636f 6e64 203b 202b 2b20 7374 y.second ; ++ st │ │ │ +000030c0: 6174 6529 207b 3c2f 6469 763e 0a3c 6469 ate) {
    .< │ │ │ +000030e0: 6120 6964 3d22 6c30 3030 3730 2220 6e61 a id="l00070" na │ │ │ +000030f0: 6d65 3d22 6c30 3030 3730 223e 3c2f 613e me="l00070"> │ │ │ +00003100: 3c73 7061 6e20 636c 6173 733d 226c 696e 70 DiscreteValue │ │ │ +00003160: 733c 2f61 3e20 7661 6c75 6573 3b3c 2f64 s values;.
    7 │ │ │ +000031c0: 313c 2f73 7061 6e3e 2020 2020 2020 7661 1 va │ │ │ +000031d0: 6c75 6573 5b6b 6579 2e66 6972 7374 5d20 lues[key.first] │ │ │ +000031e0: 3d20 7374 6174 653b 3c2f 6469 763e 0a3c = state;
    .< │ │ │ +000031f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +00003200: 3e3c 6120 6964 3d22 6c30 3030 3732 2220 > 72 vResult │ │ │ +00003250: 2873 7461 7465 2920 3d20 282a 6d61 7267 (state) = (*marg │ │ │ +00003260: 696e 616c 4661 6374 6f72 2928 7661 6c75 inalFactor)(valu │ │ │ +00003270: 6573 293b 3c2f 6469 763e 0a3c 6469 7620 es);
    .
    73 │ │ │ +000032d0: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    74 │ │ │ +00003330: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ +00003350: 7572 6e3c 2f73 7061 6e3e 2076 5265 7375 urn vResu │ │ │ +00003360: 6c74 3b3c 2f64 6976 3e0a 3c64 6976 2063 lt;
    .
    75 │ │ │ +000033c0: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 0a3c }
    .
    .< │ │ │ +000033d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ +000033e0: 3e3c 6120 6964 3d22 6c30 3030 3736 2220 > 76
    .
    70 │ │ │ -00003480: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ -000034a0: 6574 7572 6e3c 2f73 7061 6e3e 2063 6f6e eturn con │ │ │ -000034b0: 7374 616e 745f 3b3c 2f64 6976 3e0a 3c64 stant_;
    . │ │ │ -000034d0: 3c61 2069 643d 226c 3030 3037 3122 206e 71 }
    ..
    │ │ │ -00003570: 3732 3c2f 7370 616e 3e20 3c2f 6469 763e 72
    │ │ │ -00003580: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -000035b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d │ │ │ -00003610: 2037 343c 2f61 3e3c 2f73 7061 6e3e 2020 74 │ │ │ -00003620: 2020 3c73 7061 6e20 636c 6173 733d 226b size │ │ │ -00003640: 5f74 3c2f 7370 616e 3e20 3c61 2063 6c61 _t nrAss │ │ │ -000036a0: 6967 6e6d 656e 7473 3c2f 613e 2829 3c73 ignments() const { re │ │ │ -000036f0: 7475 726e 3c2f 7370 616e 3e20 6e72 4173 turn nrAs │ │ │ -00003700: 7369 676e 6d65 6e74 735f 3b20 7d3c 2f64 signments_; }.
    7 │ │ │ -00003760: 353c 2f73 7061 6e3e 203c 2f64 6976 3e0a 5
    . │ │ │ -00003770: 3c64 6976 2063 6c61 7373 3d22 666f 6c64
    . │ │ │ -00003ae0: 3c61 2069 643d 226c 3030 3038 3022 206e 80
    .
    . │ │ │ -00003b70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -00003ba0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> │ │ │ -00003c00: 3832 3c2f 613e 3c2f 7370 616e 3e20 2020 82 │ │ │ -00003c10: 203c 7370 616e 2063 6c61 7373 3d22 6b65 bool< │ │ │ -00003c30: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> sameLeaf │ │ │ -00003c90: 3c2f 613e 283c 7370 616e 2063 6c61 7373 (const │ │ │ -00003cb0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 Node&am │ │ │ -00003cf0: 703b 2071 293c 7370 616e 2063 6c61 7373 p; q) cons │ │ │ -00003d10: 7420 6f76 6572 7269 6465 203c 2f73 7061 t override {
    .
    83 │ │ │ -00003d80: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ -00003da0: 7475 726e 3c2f 7370 616e 3e20 2871 2e69 turn (q.i │ │ │ -00003db0: 734c 6561 6628 2920 2661 6d70 3b26 616d sLeaf() &&am │ │ │ -00003dc0: 703b 2071 2e73 616d 654c 6561 6628 2a3c p; q.sameLeaf(*< │ │ │ -00003dd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00003de0: 6f72 6422 3e74 6869 733c 2f73 7061 6e3e ord">this │ │ │ -00003df0: 2929 3b3c 2f64 6976 3e0a 3c64 6976 2063 ));
    .
    84 │ │ │ -00003e50: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ -00003e60: 0a3c 6469 7620 636c 6173 733d 226c 696e ...
    │ │ │ -00003f90: 2020 2038 373c 2f61 3e3c 2f73 7061 6e3e 87 │ │ │ -00003fa0: 2020 2020 3c73 7061 6e20 636c 6173 733d bo │ │ │ -00003fc0: 6f6c 3c2f 7370 616e 3e20 3c61 2063 6c61 ol equal │ │ │ -00004020: 733c 2f61 3e28 3c73 7061 6e20 636c 6173 s(cons │ │ │ -00004040: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t Node&a │ │ │ -00004080: 6d70 3b20 712c 203c 7370 616e 2063 6c61 mp; q, con │ │ │ -000040a0: 7374 3c2f 7370 616e 3e20 436f 6d70 6172 st Compar │ │ │ -000040b0: 6546 756e 6326 616d 703b 2063 6f6d 7061 eFunc& compa │ │ │ -000040c0: 7265 293c 7370 616e 2063 6c61 7373 3d22 re) const │ │ │ -000040e0: 6f76 6572 7269 6465 203c 2f73 7061 6e3e override │ │ │ -000040f0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ -00004140: 2020 2038 383c 2f73 7061 6e3e 2020 2020 88 │ │ │ -00004150: 2020 3c73 7061 6e20 636c 6173 733d 226b const Leaf* othe │ │ │ -000041b0: 7220 3d20 3c73 7061 6e20 636c 6173 733d r = dynami │ │ │ -000041d0: 635f 6361 7374 266c 743b 3c2f 7370 616e c_cast<const Leaf* │ │ │ -00004250: 2667 743b 3c2f 7370 616e 3e28 2661 6d70 >(& │ │ │ -00004260: 3b71 293b 3c2f 6469 763e 0a3c 6469 7620 ;q);
    .
    89 │ │ │ -000042c0: 2020 2020 203c 7370 616e 2063 6c61 7373 i │ │ │ -000042e0: 663c 2f73 7061 6e3e 2028 216f 7468 6572 f (!other │ │ │ -000042f0: 2920 3c73 7061 6e20 636c 6173 733d 226b ) retu │ │ │ -00004310: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn │ │ │ -00004330: 6661 6c73 653c 2f73 7061 6e3e 3b3c 2f64 false;.
    9 │ │ │ -00004390: 303c 2f73 7061 6e3e 2020 2020 2020 3c73 0 return compare(th │ │ │ -000043d0: 6973 2d26 6774 3b63 6f6e 7374 616e 745f is->constant_ │ │ │ -000043e0: 2c20 6f74 6865 722d 2667 743b 3c61 2063 , other->con │ │ │ -00004440: 7374 616e 745f 3c2f 613e 293b 3c2f 6469 stant_);.
    91 │ │ │ -000044a0: 3c2f 7370 616e 3e20 2020 207d 3c2f 6469 }.
    .
    92 < │ │ │ -00004510: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .
    < │ │ │ -00004590: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -000045a0: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 94 void print(const │ │ │ -000046a0: 2073 7464 3a3a 7374 7269 6e67 2661 6d70 std::string& │ │ │ -000046b0: 3b20 732c 203c 7370 616e 2063 6c61 7373 ; s, const │ │ │ -000046d0: 3c2f 7370 616e 3e20 4c61 6265 6c46 6f72 LabelFor │ │ │ -000046e0: 6d61 7474 6572 2661 6d70 3b20 6c61 6265 matter& labe │ │ │ -000046f0: 6c46 6f72 6d61 7474 6572 2c3c 2f64 6976 lFormatter,
    .
    95< │ │ │ -00004750: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ -00004760: 2020 2020 203c 7370 616e 2063 6c61 7373 const │ │ │ -00004780: 3c2f 7370 616e 3e20 5661 6c75 6546 6f72 ValueFor │ │ │ -00004790: 6d61 7474 6572 2661 6d70 3b20 7661 6c75 matter& valu │ │ │ -000047a0: 6546 6f72 6d61 7474 6572 293c 7370 616e eFormatter) const override │ │ │ -000047d0: 203c 2f73 7061 6e3e 7b3c 2f64 6976 3e0a {
    . │ │ │ -000047e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    97 │ │ │ -00004920: 2020 207d 3c2f 6469 763e 0a3c 2f64 6976 }
    .
    .
    98< │ │ │ -00004980: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    ...
    │ │ │ -00004ba0: 2031 3031 3c2f 7370 616e 3e20 2020 2020 101 │ │ │ -00004bb0: 2020 2020 2020 2020 3c73 7061 6e20 636c co │ │ │ -00004bd0: 6e73 743c 2f73 7061 6e3e 2056 616c 7565 nst Value │ │ │ -00004be0: 466f 726d 6174 7465 7226 616d 703b 2076 Formatter& v │ │ │ -00004bf0: 616c 7565 466f 726d 6174 7465 722c 3c2f alueFormatter,.
    1 │ │ │ -00004c50: 3032 3c2f 7370 616e 3e20 2020 2020 2020 02 │ │ │ -00004c60: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ -00004c80: 626f 6f6c 3c2f 7370 616e 3e20 7368 6f77 bool show │ │ │ -00004c90: 5a65 726f 293c 7370 616e 2063 6c61 7373 Zero) cons │ │ │ -00004cb0: 7420 6f76 6572 7269 6465 203c 2f73 7061 t override {
    .
    103 │ │ │ -00004d20: 2020 2020 7374 643a 3a73 7472 696e 6720 std::string │ │ │ -00004d30: 7661 6c75 6520 3d20 7661 6c75 6546 6f72 value = valueFor │ │ │ -00004d40: 6d61 7474 6572 2863 6f6e 7374 616e 745f matter(constant_ │ │ │ -00004d50: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    104 │ │ │ -00004db0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if< │ │ │ -00004dd0: 2f73 7061 6e3e 2028 7368 6f77 5a65 726f /span> (showZero │ │ │ -00004de0: 207c 7c20 7661 6c75 652e 636f 6d70 6172 || value.compar │ │ │ -00004df0: 6528 3c73 7061 6e20 636c 6173 733d 2273 e(&q │ │ │ -00004e10: 756f 743b 3026 7175 6f74 3b3c 2f73 7061 uot;0"))
    .
    105 │ │ │ -00004e80: 2020 2020 2020 206f 7320 266c 743b 266c os <&l │ │ │ -00004e90: 743b 203c 7370 616e 2063 6c61 7373 3d22 t; & │ │ │ -00004eb0: 7175 6f74 3b5c 2671 756f 743b 2671 756f quot;\"&quo │ │ │ -00004ec0: 743b 3c2f 7370 616e 3e20 266c 743b 266c t; <&l │ │ │ -00004ed0: 743b 2074 6869 732d 2667 743b 6964 2829 t; this->id() │ │ │ -00004ee0: 2026 6c74 3b26 6c74 3b20 3c73 7061 6e20 << "\&qu │ │ │ -00004f10: 6f74 3b20 5b6c 6162 656c 3d5c 2671 756f ot; [label=\&quo │ │ │ -00004f20: 743b 2671 756f 743b 3c2f 7370 616e 3e20 t;" │ │ │ -00004f30: 266c 743b 266c 743b 2076 616c 7565 3c2f << value.
    1 │ │ │ -00004f90: 3036 3c2f 7370 616e 3e20 2020 2020 2020 06 │ │ │ -00004fa0: 2020 2020 266c 743b 266c 743b 203c 7370 << "\ │ │ │ -00004fd0: 2671 756f 743b 2c20 7368 6170 653d 626f ", shape=bo │ │ │ -00004fe0: 782c 2072 616e 6b3d 7369 6e6b 2c20 6865 x, rank=sink, he │ │ │ -00004ff0: 6967 6874 3d30 2e33 352c 2066 6978 6564 ight=0.35, fixed │ │ │ -00005000: 7369 7a65 3d74 7275 655d 5c6e 2671 756f size=true]\n&quo │ │ │ -00005010: 743b 3c2f 7370 616e 3e3b 3c2f 6469 763e t;;
    │ │ │ -00005020: 0a3c 6469 7620 636c 6173 733d 226c 696e . │ │ │ -00005080: 0a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 .
    .
    │ │ │ -000050d0: 2020 3130 383c 2f73 7061 6e3e 203c 2f64 108 .
    .
    110 │ │ │ -000051c0: 3c2f 7370 616e 3e20 2020 203c 7370 616e const Y& │ │ │ -000051f0: 616d 703b 203c 6120 636c 6173 733d 2263 amp; operator() │ │ │ -00005250: 3c2f 613e 283c 7370 616e 2063 6c61 7373 (const │ │ │ -00005270: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 Assignment&l │ │ │ -000052b0: 743b 4c26 6774 3b3c 2f61 3e26 616d 703b t;L>& │ │ │ -000052c0: 2078 293c 7370 616e 2063 6c61 7373 3d22 x) const │ │ │ -000052e0: 6f76 6572 7269 6465 203c 2f73 7061 6e3e override │ │ │ -000052f0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ -00005340: 2020 3131 313c 2f73 7061 6e3e 2020 2020 111 │ │ │ -00005350: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ -00005370: 726e 3c2f 7370 616e 3e20 636f 6e73 7461 rn consta │ │ │ -00005380: 6e74 5f3b 3c2f 6469 763e 0a3c 6469 7620 nt_;
    .
    112 │ │ │ -000053e0: 2020 207d 3c2f 6469 763e 0a3c 2f64 6976 }
    .
    .
    113< │ │ │ -00005440: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    ..
    115 NodePtr │ │ │ -00005590: 203c 6120 636c 6173 733d 2263 6f64 6520 apply(const < │ │ │ -00005610: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -00005620: 5f74 7970 6564 6566 2220 6872 6566 3d22 _typedef" href=" │ │ │ -00005630: 6130 3237 3936 2e68 746d 6c23 6136 3065 a02796.html#a60e │ │ │ -00005640: 6436 3136 3235 3934 3564 3039 3636 3130 d61625945d096610 │ │ │ -00005650: 3361 3539 6439 6334 3763 3861 3622 3e55 3a59d9c47c8a6">U │ │ │ -00005660: 6e61 7279 3c2f 613e 2661 6d70 3b20 6f70 nary& op │ │ │ -00005670: 293c 7370 616e 2063 6c61 7373 3d22 6b65 ) const ov │ │ │ -00005690: 6572 7269 6465 203c 2f73 7061 6e3e 7b3c erride {< │ │ │ -000056a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -000056f0: 3131 363c 2f73 7061 6e3e 2020 2020 2020 116 │ │ │ -00005700: 3c61 2063 6c61 7373 3d22 636f 6465 2068 │ │ │ -00005750: 4e6f 6465 5074 723c 2f61 3e20 6628 3c73 NodePtr f(new < │ │ │ -00005780: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -00005790: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ -000057a0: 3032 3737 362e 6874 6d6c 223e 4c65 6166 02776.html">Leaf │ │ │ -000057b0: 3c2f 613e 286f 7028 636f 6e73 7461 6e74 (op(constant │ │ │ -000057c0: 5f29 2c20 6e72 4173 7369 676e 6d65 6e74 _), nrAssignment │ │ │ -000057d0: 735f 2929 3b3c 2f64 6976 3e0a 3c64 6976 s_));
    .
    < │ │ │ -00005810: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00005820: 6e6f 223e 2020 3131 373c 2f73 7061 6e3e no"> 117 │ │ │ -00005830: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ -00005850: 7265 7475 726e 3c2f 7370 616e 3e20 663b return f; │ │ │ -00005860: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -000058b0: 2031 3138 3c2f 7370 616e 3e20 2020 207d 118 } │ │ │ -000058c0: 3c2f 6469 763e 0a3c 2f64 6976 3e0a 3c64
    .
    . │ │ │ -000058e0: 3c61 2069 643d 226c 3030 3131 3922 206e 119
    .
    . │ │ │ -00005970: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -000059a0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 1 │ │ │ -00005a00: 3231 3c2f 613e 3c2f 7370 616e 3e20 2020 21 │ │ │ -00005a10: 203c 6120 636c 6173 733d 2263 6f64 6520 NodePtr ap │ │ │ -00005ac0: 706c 793c 2f61 3e28 3c73 7061 6e20 636c ply(co │ │ │ -00005ae0: 6e73 743c 2f73 7061 6e3e 2055 6e61 7279 nst Unary │ │ │ -00005af0: 4173 7369 676e 6d65 6e74 2661 6d70 3b20 Assignment& │ │ │ -00005b00: 6f70 2c3c 2f64 6976 3e0a 3c64 6976 2063 op,
    .
    122 │ │ │ -00005b60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -00005b70: 3c73 7061 6e20 636c 6173 733d 226b 6579 const A │ │ │ -00005bc0: 7373 6967 6e6d 656e 7426 6c74 3b4c 2667 ssignment<L&g │ │ │ -00005bd0: 743b 3c2f 613e 2661 6d70 3b20 6173 7369 t;& assi │ │ │ -00005be0: 676e 6d65 6e74 293c 7370 616e 2063 6c61 gnment) co │ │ │ -00005c00: 6e73 7420 6f76 6572 7269 6465 203c 2f73 nst override {
    .
    < │ │ │ -00005c50: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00005c60: 6e6f 223e 2020 3132 333c 2f73 7061 6e3e no"> 123 │ │ │ -00005c70: 2020 2020 2020 3c61 2063 6c61 7373 3d22 NodePtr f(new Leaf(op(as │ │ │ -00005d30: 7369 676e 6d65 6e74 2c20 636f 6e73 7461 signment, consta │ │ │ -00005d40: 6e74 5f29 2c20 6e72 4173 7369 676e 6d65 nt_), nrAssignme │ │ │ -00005d50: 6e74 735f 2929 3b3c 2f64 6976 3e0a 3c64 nts_));
    . │ │ │ -00005d70: 3c61 2069 643d 226c 3030 3132 3422 206e 124 return │ │ │ -00005de0: 663b 3c2f 6469 763e 0a3c 6469 7620 636c f;
    .
    125 │ │ │ -00005e40: 207d 3c2f 6469 763e 0a3c 2f64 6976 3e0a }
    .
    . │ │ │ -00005e50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ -00005ee0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00005ef0: 6e6f 223e 2020 3132 373c 2f73 7061 6e3e no"> 127 │ │ │ -00005f00: 2020 2020 3c73 7061 6e20 636c 6173 733d // App │ │ │ -00005f20: 6c79 2062 696e 6172 7920 6f70 6572 6174 ly binary operat │ │ │ -00005f30: 6f72 2026 7175 6f74 3b68 203d 2066 206f or "h = f o │ │ │ -00005f40: 7020 6726 7175 6f74 3b20 6f6e 204c 6561 p g" on Lea │ │ │ -00005f50: 6620 6e6f 6465 3c2f 7370 616e 3e3c 2f64 f node.
    12 │ │ │ -00005fb0: 383c 2f73 7061 6e3e 2020 2020 3c73 7061 8 // Note op is │ │ │ -00005fe0: 6e6f 7420 6173 7375 6d65 6420 636f 6d6d not assumed comm │ │ │ -00005ff0: 7574 6174 6976 6520 736f 2077 6520 6e65 utative so we ne │ │ │ -00006000: 6564 2074 6f20 6b65 6570 2074 7261 636b ed to keep track │ │ │ -00006010: 206f 6620 6f72 6465 723c 2f73 7061 6e3e of order │ │ │ -00006020: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00006070: 2031 3239 3c2f 7370 616e 3e20 2020 203c 129 < │ │ │ -00006080: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ -00006090: 656e 7422 3e2f 2f20 5369 6d70 6c79 2063 ent">// Simply c │ │ │ -000060a0: 616c 6c73 2061 7070 6c79 206f 6e20 6172 alls apply on ar │ │ │ -000060b0: 6775 6d65 6e74 2074 6f20 6361 6c6c 2063 gument to call c │ │ │ -000060c0: 6f72 7265 6374 2076 6972 7475 616c 206d orrect virtual m │ │ │ -000060d0: 6574 686f 643a 3c2f 7370 616e 3e3c 2f64 ethod:.
    13 │ │ │ -00006130: 303c 2f73 7061 6e3e 2020 2020 3c73 7061 0 // fL.apply_f_ │ │ │ -00006160: 6f70 5f67 2867 4c29 202d 2667 743b 2067 op_g(gL) -> g │ │ │ -00006170: 4c2e 6170 706c 795f 675f 6f70 5f66 4c28 L.apply_g_op_fL( │ │ │ -00006180: 664c 2920 2862 656c 6f77 293c 2f73 7061 fL) (below)
    .
    131 │ │ │ -000061f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // fL.app │ │ │ -00006210: 6c79 5f66 5f6f 705f 6728 6743 2920 2d26 ly_f_op_g(gC) -& │ │ │ -00006220: 6774 3b20 6743 2e61 7070 6c79 5f67 5f6f gt; gC.apply_g_o │ │ │ -00006230: 705f 664c 2866 4c29 2028 4368 6f69 6365 p_fL(fL) (Choice │ │ │ -00006240: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    .< │ │ │ -00006250: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00006260: 3e3c 6120 6964 3d22 6c30 3031 3332 2220 > 132 NodePtr apply_f_op_g( │ │ │ -00006310: 3c73 7061 6e20 636c 6173 733d 226b 6579 const │ │ │ -00006360: 4e6f 6465 3c2f 613e 2661 6d70 3b20 672c Node& g, │ │ │ -00006370: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const Binary& │ │ │ -000063a0: 6f70 293c 7370 616e 2063 6c61 7373 3d22 op) const │ │ │ -000063c0: 6f76 6572 7269 6465 203c 2f73 7061 6e3e override │ │ │ -000063d0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ -00006420: 2020 3133 333c 2f73 7061 6e3e 2020 2020 133 │ │ │ -00006430: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ -00006450: 726e 3c2f 7370 616e 3e20 672e 6170 706c rn g.appl │ │ │ -00006460: 795f 675f 6f70 5f66 4c28 2a3c 7370 616e y_g_op_fL(*this, op │ │ │ -00006490: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    134 │ │ │ -000064f0: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    135 .
    1 │ │ │ -000065a0: 3336 3c2f 7370 616e 3e20 2020 203c 7370 36 // Applying b │ │ │ -000065d0: 696e 6172 7920 6f70 6572 6174 6f72 2074 inary operator t │ │ │ -000065e0: 6f20 7477 6f20 6c65 6176 6573 2072 6573 o two leaves res │ │ │ -000065f0: 756c 7473 2069 6e20 6120 6c65 6166 3c2f ults in a leaf
    .
    < │ │ │ -00006640: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00006650: 6e6f 223e 2020 3133 373c 2f73 7061 6e3e no"> 137 │ │ │ -00006660: 2020 2020 3c61 2063 6c61 7373 3d22 636f NodePtr │ │ │ -000066c0: 6170 706c 795f 675f 6f70 5f66 4c28 3c73 apply_g_op_fL(const │ │ │ -000066f0: 204c 6561 6626 616d 703b 2066 4c2c 203c Leaf& fL, < │ │ │ -00006700: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00006710: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const Binary& op │ │ │ -00006730: 293c 7370 616e 2063 6c61 7373 3d22 6b65 ) const ov │ │ │ -00006750: 6572 7269 6465 203c 2f73 7061 6e3e 7b3c erride {< │ │ │ -00006760: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -000067b0: 3133 383c 2f73 7061 6e3e 2020 2020 2020 138 │ │ │ -000067c0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // fL op g │ │ │ -000067e0: 4c3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c L
    .< │ │ │ -000067f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00006800: 3e3c 6120 6964 3d22 6c30 3031 3339 2220 > 139 NodePtr │ │ │ -000068a0: 3c2f 613e 2068 283c 7370 616e 2063 6c61 h(new │ │ │ -000068c0: 3c2f 7370 616e 3e20 4c65 6166 286f 7028 Leaf(op( │ │ │ -000068d0: 664c 2e63 6f6e 7374 616e 745f 2c20 636f fL.constant_, co │ │ │ -000068e0: 6e73 7461 6e74 5f29 2c20 6e72 4173 7369 nstant_), nrAssi │ │ │ -000068f0: 676e 6d65 6e74 735f 2929 3b3c 2f64 6976 gnments_));
    .
    140< │ │ │ -00006950: 2f73 7061 6e3e 2020 2020 2020 3c73 7061 /span> return h;
    .< │ │ │ -000069a0: 6120 6964 3d22 6c30 3031 3431 2220 6e61 a id="l00141" na │ │ │ -000069b0: 6d65 3d22 6c30 3031 3431 223e 3c2f 613e me="l00141"> │ │ │ -000069c0: 3c73 7061 6e20 636c 6173 733d 226c 696e 141 }
    .< │ │ │ -00006a00: 6120 6964 3d22 6c30 3031 3432 2220 6e61 a id="l00142" na │ │ │ -00006a10: 6d65 3d22 6c30 3031 3432 223e 3c2f 613e me="l00142"> │ │ │ -00006a20: 3c73 7061 6e20 636c 6173 733d 226c 696e 142
    .
    143 │ │ │ -00006aa0: 203c 7370 616e 2063 6c61 7373 3d22 636f // If sec │ │ │ -00006ac0: 6f6e 6420 6172 6775 6d65 6e74 2069 7320 ond argument is │ │ │ -00006ad0: 6120 4368 6f69 6365 206e 6f64 652c 2063 a Choice node, c │ │ │ -00006ae0: 616c 6c20 6974 2623 3339 3b73 2061 7070 all it's app │ │ │ -00006af0: 6c79 2077 6974 6820 6c65 6166 2061 7320 ly with leaf as │ │ │ -00006b00: 7365 636f 6e64 3c2f 7370 616e 3e3c 2f64 second.
    14 │ │ │ -00006b60: 343c 2f73 7061 6e3e 2020 2020 3c61 2063 4 Node │ │ │ -00006bc0: 5074 723c 2f61 3e20 6170 706c 795f 675f Ptr apply_g_ │ │ │ -00006bd0: 6f70 5f66 4328 3c73 7061 6e20 636c 6173 op_fC(cons │ │ │ -00006bf0: 743c 2f73 7061 6e3e 2043 686f 6963 6526 t Choice& │ │ │ -00006c00: 616d 703b 2066 432c 203c 7370 616e 2063 amp; fC, c │ │ │ -00006c20: 6f6e 7374 3c2f 7370 616e 3e20 4269 6e61 onst Bina │ │ │ -00006c30: 7279 2661 6d70 3b20 6f70 293c 7370 616e ry& op) const override │ │ │ -00006c60: 203c 2f73 7061 6e3e 7b3c 2f64 6976 3e0a {
    . │ │ │ -00006c70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ -00006d70: 0a3c 6469 7620 636c 6173 733d 226c 696e . │ │ │ -00006dd0: 0a3c 6469 7620 636c 6173 733d 226c 696e ...
    │ │ │ -00006f00: 2020 3134 393c 2f61 3e3c 2f73 7061 6e3e 149 │ │ │ -00006f10: 2020 2020 3c61 2063 6c61 7373 3d22 636f NodePtr │ │ │ -00006f70: 3c61 2063 6c61 7373 3d22 636f 6465 2068 choose(const L │ │ │ -00006ff0: 2661 6d70 3b20 6c61 6265 6c2c 203c 7370 & label, size_t index) const override │ │ │ -00007050: 203c 2f73 7061 6e3e 7b3c 2f64 6976 3e0a {
    . │ │ │ -00007060: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -00007090: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 150 return NodePtr(new < │ │ │ -00007160: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -00007170: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ -00007180: 3032 3737 362e 6874 6d6c 223e 4c65 6166 02776.html">Leaf │ │ │ -00007190: 3c2f 613e 2863 6f6e 7374 616e 7428 292c (constant(), │ │ │ -000071a0: 206e 7241 7373 6967 6e6d 656e 7473 2829 nrAssignments() │ │ │ -000071b0: 2929 3b3c 2f64 6976 3e0a 3c64 6976 2063 ));
    .
    151 │ │ │ -00007210: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ -00007220: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -00007290: 6120 6964 3d22 6c30 3031 3533 2220 6e61 a id="l00153" na │ │ │ -000072a0: 6d65 3d22 6c30 3031 3533 223e 3c2f 613e me="l00153"> │ │ │ -000072b0: 3c73 7061 6e20 636c 6173 733d 226c 696e 153 b │ │ │ -000072f0: 6f6f 6c3c 2f73 7061 6e3e 2069 734c 6561 ool isLea │ │ │ -00007300: 6628 293c 7370 616e 2063 6c61 7373 3d22 f() const │ │ │ -00007320: 6f76 6572 7269 6465 203c 2f73 7061 6e3e override │ │ │ -00007330: 7b20 3c73 7061 6e20 636c 6173 733d 226b { retu │ │ │ -00007350: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn │ │ │ -00007370: 7472 7565 3c2f 7370 616e 3e3b 207d 3c2f true; }.
    .. │ │ │ -00007470: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -000074a0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 155 pri │ │ │ -000074e0: 7661 7465 3c2f 7370 616e 3e3a 3c2f 6469 vate:.
    156 │ │ │ -00007540: 3c2f 7370 616e 3e20 2020 203c 7370 616e using Ba │ │ │ -00007570: 7365 203d 203c 6120 636c 6173 733d 2263 se = DecisionTree&l │ │ │ -000075b0: 743b 4c2c 2059 2667 743b 3a3a 4e6f 6465 t;L, Y>::Node │ │ │ -000075c0: 3c2f 613e 3b3c 2f64 6976 3e0a 3c64 6976 ;
    .
    < │ │ │ -00007600: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00007610: 6e6f 223e 2020 3135 373c 2f73 7061 6e3e no"> 157 │ │ │ -00007620: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ -00007670: 2020 3135 393c 2f73 7061 6e3e 2020 2020 159 │ │ │ -00007680: 3c73 7061 6e20 636c 6173 733d 226b 6579 friend class │ │ │ -000076c0: 3c2f 7370 616e 3e62 6f6f 7374 3a3a 7365 boost::se │ │ │ -000076d0: 7269 616c 697a 6174 696f 6e3a 3a61 6363 rialization::acc │ │ │ -000076e0: 6573 733b 3c2f 6469 763e 0a3c 6469 7620 ess;
    .
    160 │ │ │ -00007740: 2020 203c 7370 616e 2063 6c61 7373 3d22 templat │ │ │ -00007760: 653c 2f73 7061 6e3e 2026 6c74 3b3c 7370 e <class │ │ │ -00007790: 4152 4348 4956 4526 6774 3b3c 2f64 6976 ARCHIVE>
    .
    161< │ │ │ -000077f0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> void │ │ │ -00007820: 7365 7269 616c 697a 6528 4152 4348 4956 serialize(ARCHIV │ │ │ -00007830: 4526 616d 703b 2061 722c 203c 7370 616e E& ar, const unsigned │ │ │ -00007880: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int /*version*/) {
    .< │ │ │ -000078e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -000078f0: 3e3c 6120 6964 3d22 6c30 3031 3632 2220 > 162 ar & │ │ │ -00007940: 3b20 424f 4f53 545f 5345 5249 414c 495a ; BOOST_SERIALIZ │ │ │ -00007950: 4154 494f 4e5f 4241 5345 5f4f 424a 4543 ATION_BASE_OBJEC │ │ │ -00007960: 545f 4e56 5028 4261 7365 293b 3c2f 6469 T_NVP(Base);.
    163 │ │ │ -000079c0: 3c2f 7370 616e 3e20 2020 2020 2061 7226 ar& │ │ │ -000079d0: 616d 703b 2042 4f4f 5354 5f53 4552 4941 amp; BOOST_SERIA │ │ │ -000079e0: 4c49 5a41 5449 4f4e 5f4e 5650 2863 6f6e LIZATION_NVP(con │ │ │ -000079f0: 7374 616e 745f 293b 3c2f 6469 763e 0a3c stant_);
    .< │ │ │ -00007a00: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00007a10: 3e3c 6120 6964 3d22 6c30 3031 3634 2220 > 164 ar& │ │ │ -00007a60: 2042 4f4f 5354 5f53 4552 4941 4c49 5a41 BOOST_SERIALIZA │ │ │ -00007a70: 5449 4f4e 5f4e 5650 286e 7241 7373 6967 TION_NVP(nrAssig │ │ │ -00007a80: 6e6d 656e 7473 5f29 3b3c 2f64 6976 3e0a nments_);
    . │ │ │ -00007a90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . │ │ │ -00007af0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -00007b20: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 166 }; │ │ │ -00007b60: 2f2f 204c 6561 663c 2f73 7061 6e3e 3c2f // Leaf.
    .. │ │ │ -00007c60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    │ │ │ -00007d70: 2020 3136 393c 2f73 7061 6e3e 2020 3c73 169 // Choice
    .
    170< │ │ │ -00007e00: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ -00007e10: 656e 7422 3e20 202f 2a2a 2a2a 2a2a 2a2a ent"> /******** │ │ │ -00007e20: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00007e30: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00007e40: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00007e50: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00007e60: 2a2a 2a2a 2f3c 2f73 7061 6e3e 3c2f 6469 ****/.
    171 │ │ │ -00007ec0: 3c2f 7370 616e 3e20 203c 7370 616e 2063 t │ │ │ -00007ee0: 656d 706c 6174 653c 2f73 7061 6e3e 266c emplate&l │ │ │ -00007ef0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;typename │ │ │ -00007f10: 3c2f 7370 616e 3e20 4c2c 203c 7370 616e L, typename │ │ │ -00007f40: 2059 2667 743b 3c2f 6469 763e 0a3c 6469 Y>
    ..
    │ │ │ -00008000: 2031 3732 3c2f 613e 3c2f 7370 616e 3e20 172 │ │ │ -00008010: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct DecisionTree<L, Y>::< │ │ │ -00008080: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -00008090: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ -000080a0: 3032 3738 302e 6874 6d6c 223e 4368 6f69 02780.html">Choi │ │ │ -000080b0: 6365 3c2f 613e 3a20 3c73 7061 6e20 636c ce: pu │ │ │ -000080d0: 626c 6963 3c2f 7370 616e 3e20 3c61 2063 blic Decision │ │ │ -00008110: 5472 6565 3c2f 613e 266c 743b 4c2c 2059 Tree<L, Y │ │ │ -00008120: 2667 743b 3a3a 4e6f 6465 207b 3c2f 6469 >::Node {.
    │ │ │ -000081c0: 2020 3137 343c 2f61 3e3c 2f73 7061 6e3e 174 │ │ │ -000081d0: 2020 2020 4c20 3c61 2063 6c61 7373 3d22 L label_;
    .
    175 .
    177 std::vecto │ │ │ -00008340: 7226 6c74 3b4e 6f64 6550 7472 2667 743b r<NodePtr> │ │ │ -00008350: 203c 6120 636c 6173 733d 2263 6f64 6520 branches_; │ │ │ -000083b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00008400: 2031 3738 3c2f 7370 616e 3e20 3c2f 6469 178 .
    .
    179< │ │ │ -000084f0: 2f73 7061 6e3e 2020 203c 7370 616e 2063 /span> p │ │ │ -00008510: 7269 7661 7465 3c2f 7370 616e 3e3a 3c2f rivate:.
    1 │ │ │ -00008570: 3834 3c2f 7370 616e 3e20 2020 203c 7370 84 size_t allSame_;.
    1 │ │ │ -00008600: 3835 3c2f 7370 616e 3e20 3c2f 6469 763e 85
    │ │ │ -00008610: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -00008640: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 186 u │ │ │ -00008680: 7369 6e67 203c 2f73 7061 6e3e 4368 6f69 sing Choi │ │ │ -00008690: 6365 5074 7220 3d20 626f 6f73 743a 3a73 cePtr = boost::s │ │ │ -000086a0: 6861 7265 645f 7074 7226 6c74 3b63 6f6e hared_ptr<con │ │ │ -000086b0: 7374 2043 686f 6963 6526 6774 3b3b 3c2f st Choice>;.
    1 │ │ │ -00008710: 3837 3c2f 7370 616e 3e20 3c2f 6469 763e 87
    │ │ │ -00008720: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ -000087b0: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ -000087c0: 7265 663d 2261 3032 3739 362e 6874 6d6c ref="a02796.html │ │ │ -000087d0: 2361 6530 6238 3434 3437 3338 3233 6161 #ae0b844473823aa │ │ │ -000087e0: 3039 6337 3165 3636 3834 3439 3530 3963 09c71e668449509c │ │ │ -000087f0: 6432 223e 2020 3138 383c 2f61 3e3c 2f73 d2"> 188 pub │ │ │ -00008820: 6c69 633c 2f73 7061 6e3e 3a3c 2f64 6976 lic:
    .
    │ │ │ -000088c0: 2031 3930 3c2f 613e 3c2f 7370 616e 3e20 190 │ │ │ -000088d0: 2020 203c 6120 636c 6173 733d 2263 6f64 Choice() │ │ │ -00008930: 207b 7d3c 2f64 6976 3e0a 3c64 6976 2063 {}
    .
    . │ │ │ -00008980: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -000089b0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 1 │ │ │ -00008a10: 3931 3c2f 613e 3c2f 7370 616e 3e20 3c2f 91 .
    1 │ │ │ -00008a70: 3932 3c2f 7370 616e 3e20 2020 207e 4368 92 ~Ch │ │ │ -00008a80: 6f69 6365 2829 3c73 7061 6e20 636c 6173 oice() ove │ │ │ -00008aa0: 7272 6964 6520 3c2f 7370 616e 3e7b 3c2f rride {.
    1 │ │ │ -00008b00: 3933 3c2f 7370 616e 3e3c 7370 616e 2063 93#ifdef DT_DE │ │ │ -00008b30: 4255 475f 4d45 4d4f 5259 3c2f 7370 616e BUG_MEMORY
    .
    . │ │ │ -00008ba0: 3c61 2069 643d 226c 3030 3139 3422 206e 194 │ │ │ -00008c20: 3c2f 613e 3c2f 7370 616e 3e20 2020 2020 │ │ │ -00008c30: 2073 7464 3a3a 7374 643a 3a63 6f75 7420 std::std::cout │ │ │ -00008c40: 266c 743b 266c 743b 204e 6f64 653a 3a6e << Node::n │ │ │ -00008c50: 724e 6f64 6573 2026 6c74 3b26 6c74 3b20 rNodes << │ │ │ -00008c60: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ -00008c80: 743b 2064 6573 7472 7563 7469 6e67 2028 t; destructing ( │ │ │ -00008c90: 4368 6f69 6365 2920 2671 756f 743b 3c2f Choice) " << t │ │ │ -00008cb0: 6869 732d 2667 743b 6964 2829 3c2f 6469 his->id().
    195 │ │ │ -00008d10: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ -00008d20: 2020 2020 2020 2020 2020 2020 266c 743b < │ │ │ -00008d30: 266c 743b 2073 7464 3a3a 7374 643a 3a65 < std::std::e │ │ │ -00008d40: 6e64 6c3b 3c2f 6469 763e 0a3c 6469 7620 ndl;
    .
    196< │ │ │ -00008da0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class="prep │ │ │ -00008db0: 726f 6365 7373 6f72 223e 2365 6e64 6966 rocessor">#endif │ │ │ -00008dc0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    ...< │ │ │ -00008ed0: 6120 6964 3d22 6c30 3031 3938 2220 6e61 a id="l00198" na │ │ │ -00008ee0: 6d65 3d22 6c30 3031 3938 223e 3c2f 613e me="l00198"> │ │ │ -00008ef0: 3c73 7061 6e20 636c 6173 733d 226c 696e 198
    .
    .< │ │ │ -00008f60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00008f70: 3e3c 6120 6964 3d22 6c30 3032 3030 2220 > 20 │ │ │ -00008ff0: 303c 2f61 3e3c 2f73 7061 6e3e 2020 2020 0 │ │ │ -00009000: 3c73 7061 6e20 636c 6173 733d 226b 6579 static NodePtr │ │ │ -00009080: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Unique(const C │ │ │ -00009100: 686f 6963 6550 7472 2661 6d70 3b20 6629 hoicePtr& f) │ │ │ -00009110: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    .< │ │ │ -00009160: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00009170: 3e3c 6120 6964 3d22 6c30 3032 3031 2220 > 20 │ │ │ -000091f0: 313c 2f61 3e3c 2f73 7061 6e3e 3c73 7061 1#ifndef G │ │ │ -00009220: 5453 414d 5f44 545f 4e4f 5f50 5255 4e49 TSAM_DT_NO_PRUNI │ │ │ -00009230: 4e47 3c2f 7370 616e 3e3c 2f64 6976 3e0a NG
    . │ │ │ -00009240: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ -00009320: 2032 3033 3c2f 7370 616e 3e20 2020 2020 203 │ │ │ -00009330: 2020 2061 7373 6572 7428 662d 2667 743b assert(f-> │ │ │ -00009340: 6272 616e 6368 6573 2829 2e73 697a 6528 branches().size( │ │ │ -00009350: 2920 2667 743b 2030 293b 3c2f 6469 763e ) > 0);
    │ │ │ -00009360: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ -000093f0: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ -00009400: 7265 663d 2261 3032 3739 362e 6874 6d6c ref="a02796.html │ │ │ -00009410: 2361 6662 3635 6266 6535 6433 6463 3262 #afb65bfe5d3dc2b │ │ │ -00009420: 3866 3239 3465 6138 3934 6161 6263 3235 8f294ea894aabc25 │ │ │ -00009430: 6133 223e 2020 3230 343c 2f61 3e3c 2f73 a3"> 204 Node │ │ │ -000094a0: 5074 723c 2f61 3e20 6630 203d 2066 2d26 Ptr f0 = f-& │ │ │ -000094b0: 6774 3b62 7261 6e63 6865 735f 5b30 5d3b gt;branches_[0]; │ │ │ -000094c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00009510: 2032 3035 3c2f 7370 616e 3e20 3c2f 6469 205 .
    206 │ │ │ -00009570: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ -00009580: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00009590: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype">size_t< │ │ │ -000095a0: 2f73 7061 6e3e 206e 7241 7373 6967 6e6d /span> nrAssignm │ │ │ -000095b0: 656e 7473 203d 2030 3b3c 2f64 6976 3e0a ents = 0;
    . │ │ │ -000095c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -000095f0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 207 for │ │ │ -00009640: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (auto branch: f-> │ │ │ -00009670: 3b62 7261 6e63 6865 7328 2929 207b 3c2f ;branches()) {.
    2 │ │ │ -000096d0: 3038 3c2f 7370 616e 3e20 2020 2020 2020 08 │ │ │ -000096e0: 2020 2061 7373 6572 7428 6272 616e 6368 assert(branch │ │ │ -000096f0: 2d26 6774 3b69 734c 6561 6628 2929 3b3c ->isLeaf());< │ │ │ -00009700: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00009750: 3230 393c 2f73 7061 6e3e 2020 2020 2020 209 │ │ │ -00009760: 2020 2020 6e72 4173 7369 676e 6d65 6e74 nrAssignment │ │ │ -00009770: 7320 2b3d 3c2f 6469 763e 0a3c 6469 7620 s +=
    .
    210 │ │ │ -000097d0: 2020 2020 2020 2020 2020 2020 2062 6f6f boo │ │ │ -000097e0: 7374 3a3a 6479 6e61 6d69 635f 706f 696e st::dynamic_poin │ │ │ -000097f0: 7465 725f 6361 7374 266c 743b 636f 6e73 ter_cast<cons │ │ │ -00009800: 7420 4c65 6166 2667 743b 2862 7261 6e63 t Leaf>(branc │ │ │ -00009810: 6829 2d26 6774 3b6e 7241 7373 6967 6e6d h)->nrAssignm │ │ │ -00009820: 656e 7473 2829 3b3c 2f64 6976 3e0a 3c64 ents();
    . │ │ │ -00009840: 3c61 2069 643d 226c 3030 3231 3122 206e 211 }
    .
    212< │ │ │ -000098e0: 2f73 7061 6e3e 2020 2020 2020 2020 3c61 /span> No │ │ │ -00009940: 6465 5074 723c 2f61 3e20 6e65 774c 6561 dePtr newLea │ │ │ -00009950: 6628 3c2f 6469 763e 0a3c 6469 7620 636c f(
    .
    213 │ │ │ -000099b0: 2020 2020 2020 2020 203c 7370 616e 2063 n │ │ │ -000099d0: 6577 3c2f 7370 616e 3e20 4c65 6166 2862 ew Leaf(b │ │ │ -000099e0: 6f6f 7374 3a3a 6479 6e61 6d69 635f 706f oost::dynamic_po │ │ │ -000099f0: 696e 7465 725f 6361 7374 266c 743b 636f inter_cast<co │ │ │ -00009a00: 6e73 7420 4c65 6166 2667 743b 2866 3029 nst Leaf>(f0) │ │ │ -00009a10: 2d26 6774 3b63 6f6e 7374 616e 7428 292c ->constant(), │ │ │ -00009a20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00009a70: 2032 3134 3c2f 7370 616e 3e20 2020 2020 214 │ │ │ -00009a80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -00009a90: 6e72 4173 7369 676e 6d65 6e74 7329 293b nrAssignments)); │ │ │ -00009aa0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    .< │ │ │ -00009b00: 6120 6964 3d22 6c30 3032 3135 2220 6e61 a id="l00215" na │ │ │ -00009b10: 6d65 3d22 6c30 3032 3135 223e 3c2f 613e me="l00215"> │ │ │ -00009b20: 3c73 7061 6e20 636c 6173 733d 226c 696e 215< │ │ │ -00009b80: 2f61 3e3c 2f73 7061 6e3e 2020 2020 2020 /a> │ │ │ -00009b90: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ -00009bb0: 726e 3c2f 7370 616e 3e20 6e65 774c 6561 rn newLea │ │ │ -00009bc0: 663b 3c2f 6469 763e 0a3c 6469 7620 636c f;
    .
    216 │ │ │ -00009c20: 2020 207d 203c 7370 616e 2063 6c61 7373 } e │ │ │ -00009c40: 6c73 653c 2f73 7061 6e3e 3c2f 6469 763e lse
    │ │ │ -00009c50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -00009c80: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 217 │ │ │ -00009cc0: 2365 6e64 6966 3c2f 7370 616e 3e3c 2f64 #endif.
    21 │ │ │ -00009d20: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ -00009d30: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ -00009d50: 3c2f 7370 616e 3e20 663b 3c2f 6469 763e f;
    │ │ │ -00009d60: 0a3c 6469 7620 636c 6173 733d 226c 696e . │ │ │ -00009dc0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -00009e30: 6120 6964 3d22 6c30 3032 3231 2220 6e61 a id="l00221" na │ │ │ -00009e40: 6d65 3d22 6c30 3032 3231 223e 3c2f 613e me="l00221"> │ │ │ -00009e50: 3c73 7061 6e20 636c 6173 733d 226c 696e 221 b │ │ │ -00009e90: 6f6f 6c3c 2f73 7061 6e3e 2069 734c 6561 ool isLea │ │ │ -00009ea0: 6628 293c 7370 616e 2063 6c61 7373 3d22 f() const │ │ │ -00009ec0: 6f76 6572 7269 6465 203c 2f73 7061 6e3e override │ │ │ -00009ed0: 7b20 3c73 7061 6e20 636c 6173 733d 226b { retu │ │ │ -00009ef0: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn │ │ │ -00009f10: 6661 6c73 653c 2f73 7061 6e3e 3b20 7d3c false; }< │ │ │ -00009f20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00009f70: 3232 323c 2f73 7061 6e3e 203c 2f64 6976 222
    .
    .
    │ │ │ -0000a010: 3c61 2063 6c61 7373 3d22 6c69 6e65 2220 224 Choice │ │ │ -0000a0c0: 3c2f 613e 283c 7370 616e 2063 6c61 7373 (const │ │ │ -0000a0e0: 3c2f 7370 616e 3e20 4c26 616d 703b 206c L& l │ │ │ -0000a0f0: 6162 656c 2c20 3c73 7061 6e20 636c 6173 abel, │ │ │ -0000a110: 7369 7a65 5f74 3c2f 7370 616e 3e20 636f size_t co │ │ │ -0000a120: 756e 7429 203a 3c2f 6469 763e 0a3c 6469 unt) :
    .< │ │ │ -0000a140: 6120 6964 3d22 6c30 3032 3235 2220 6e61 a id="l00225" na │ │ │ -0000a150: 6d65 3d22 6c30 3032 3235 223e 3c2f 613e me="l00225"> │ │ │ -0000a160: 3c73 7061 6e20 636c 6173 733d 226c 696e 225 label_(la │ │ │ -0000a190: 6265 6c29 2c20 616c 6c53 616d 655f 2874 bel), allSame_(t │ │ │ -0000a1a0: 7275 6529 207b 3c2f 6469 763e 0a3c 6469 rue) {
    .< │ │ │ -0000a1c0: 6120 6964 3d22 6c30 3032 3236 2220 6e61 a id="l00226" na │ │ │ -0000a1d0: 6d65 3d22 6c30 3032 3236 223e 3c2f 613e me="l00226"> │ │ │ -0000a1e0: 3c73 7061 6e20 636c 6173 733d 226c 696e 226 branches_ │ │ │ -0000a210: 2e72 6573 6572 7665 2863 6f75 6e74 293b .reserve(count); │ │ │ -0000a220: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -0000a270: 2032 3237 3c2f 7370 616e 3e20 2020 207d 227 } │ │ │ -0000a280: 3c2f 6469 763e 0a3c 2f64 6976 3e0a 3c64
    .
    ...
    .< │ │ │ -0000a3c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0000a3d0: 3e3c 6120 6964 3d22 6c30 3032 3330 2220 > 23 │ │ │ -0000a450: 303c 2f61 3e3c 2f73 7061 6e3e 2020 2020 0 │ │ │ -0000a460: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Choice(const < │ │ │ -0000a4e0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -0000a4f0: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ -0000a500: 3032 3738 302e 6874 6d6c 223e 4368 6f69 02780.html">Choi │ │ │ -0000a510: 6365 3c2f 613e 2661 6d70 3b20 662c 203c ce& f, < │ │ │ -0000a520: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -0000a530: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const C │ │ │ -0000a570: 686f 6963 653c 2f61 3e26 616d 703b 2067 hoice& g │ │ │ -0000a580: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const Binary& │ │ │ -0000a5b0: 206f 7029 203a 3c2f 6469 763e 0a3c 6469 op) :
    .< │ │ │ -0000a5d0: 6120 6964 3d22 6c30 3032 3331 2220 6e61 a id="l00231" na │ │ │ -0000a5e0: 6d65 3d22 6c30 3032 3331 223e 3c2f 613e me="l00231"> │ │ │ -0000a5f0: 3c73 7061 6e20 636c 6173 733d 226c 696e 231 allSame_( │ │ │ -0000a620: 7472 7565 2920 7b3c 2f64 6976 3e0a 3c64 true) {
    . │ │ │ -0000a640: 3c61 2069 643d 226c 3030 3233 3222 206e 232 // │ │ │ -0000a6a0: 2043 686f 6f73 6520 7768 6174 2074 6f20 Choose what to │ │ │ -0000a6b0: 646f 2062 6173 6564 206f 6e20 6c61 6265 do based on labe │ │ │ -0000a6c0: 6c3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c l
    .< │ │ │ -0000a6d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0000a6e0: 3e3c 6120 6964 3d22 6c30 3032 3333 2220 > 233 if (f. │ │ │ -0000a750: 3c61 2063 6c61 7373 3d22 636f 6465 2068 label() > │ │ │ -0000a7b0: 3b20 672e 3c61 2063 6c61 7373 3d22 636f ; g.label() │ │ │ -0000a810: 2920 7b3c 2f64 6976 3e0a 3c64 6976 2063 ) {
    .
    234 │ │ │ -0000a870: 2020 2020 2020 3c73 7061 6e20 636c 6173 // f │ │ │ -0000a890: 2068 6967 6865 7220 7468 616e 2067 3c2f higher than g
    .
    < │ │ │ -0000a8e0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -0000a8f0: 6e6f 223e 2020 3233 353c 2f73 7061 6e3e no"> 235 │ │ │ -0000a900: 2020 2020 2020 2020 6c61 6265 6c5f 203d label_ = │ │ │ -0000a910: 2066 2e3c 6120 636c 6173 733d 2263 6f64 f.label(); │ │ │ -0000a970: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -0000a9c0: 2032 3336 3c2f 7370 616e 3e20 2020 2020 236 │ │ │ -0000a9d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 siz │ │ │ -0000a9f0: 655f 743c 2f73 7061 6e3e 2063 6f75 6e74 e_t count │ │ │ -0000aa00: 203d 2066 2e6e 7243 686f 6963 6573 2829 = f.nrChoices() │ │ │ -0000aa10: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ -0000aa60: 2020 3233 373c 2f73 7061 6e3e 2020 2020 237 │ │ │ -0000aa70: 2020 2020 6272 616e 6368 6573 5f2e 7265 branches_.re │ │ │ -0000aa80: 7365 7276 6528 636f 756e 7429 3b3c 2f64 serve(count);.
    23 │ │ │ -0000aae0: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ -0000aaf0: 3c73 7061 6e20 636c 6173 733d 226b 6579 for ( │ │ │ -0000ab30: 7369 7a65 5f74 3c2f 7370 616e 3e20 6920 size_t i │ │ │ -0000ab40: 3d20 303b 2069 2026 6c74 3b20 636f 756e = 0; i < coun │ │ │ -0000ab50: 743b 2069 2b2b 293c 2f64 6976 3e0a 3c64 t; i++)
    . │ │ │ -0000ab70: 3c61 2069 643d 226c 3030 3233 3922 206e 239 push │ │ │ -0000abc0: 5f62 6163 6b28 662e 3c61 2063 6c61 7373 _back(f.branche │ │ │ -0000ac20: 735f 3c2f 613e 5b69 5d2d 2667 743b 6170 s_[i]->ap │ │ │ -0000ac30: 706c 795f 665f 6f70 5f67 2867 2c20 6f70 ply_f_op_g(g, op │ │ │ -0000ac40: 2929 3b3c 2f64 6976 3e0a 3c64 6976 2063 ));
    .
    240 │ │ │ -0000aca0: 2020 2020 7d20 3c73 7061 6e20 636c 6173 } │ │ │ -0000acc0: 656c 7365 3c2f 7370 616e 3e20 3c73 7061 else if │ │ │ -0000acf0: 2867 2e3c 6120 636c 6173 733d 2263 6f64 (g.label() │ │ │ -0000ad50: 2667 743b 2066 2e3c 6120 636c 6173 733d > f.label()) {
    .< │ │ │ -0000add0: 6120 6964 3d22 6c30 3032 3431 2220 6e61 a id="l00241" na │ │ │ -0000ade0: 6d65 3d22 6c30 3032 3431 223e 3c2f 613e me="l00241"> │ │ │ -0000adf0: 3c73 7061 6e20 636c 6173 733d 226c 696e 241 / │ │ │ -0000ae30: 2f20 6620 6c6f 7765 7220 7468 616e 2067 / f lower than g │ │ │ -0000ae40: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    ..
    242 label_ │ │ │ -0000af40: 3d20 672e 3c61 2063 6c61 7373 3d22 636f = g.label() │ │ │ -0000afa0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ -0000aff0: 2020 3234 333c 2f73 7061 6e3e 2020 2020 243 │ │ │ -0000b000: 2020 2020 3c73 7061 6e20 636c 6173 733d si │ │ │ -0000b020: 7a65 5f74 3c2f 7370 616e 3e20 636f 756e ze_t coun │ │ │ -0000b030: 7420 3d20 672e 6e72 4368 6f69 6365 7328 t = g.nrChoices( │ │ │ -0000b040: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    244 │ │ │ -0000b0a0: 2020 2020 2062 7261 6e63 6865 735f 2e72 branches_.r │ │ │ -0000b0b0: 6573 6572 7665 2863 6f75 6e74 293b 3c2f eserve(count);.
    2 │ │ │ -0000b110: 3435 3c2f 7370 616e 3e20 2020 2020 2020 45 │ │ │ -0000b120: 203c 7370 616e 2063 6c61 7373 3d22 6b65 for (size_t i │ │ │ -0000b170: 203d 2030 3b20 6920 266c 743b 2063 6f75 = 0; i < cou │ │ │ -0000b180: 6e74 3b20 692b 2b29 3c2f 6469 763e 0a3c nt; i++)
    .< │ │ │ -0000b190: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0000b1a0: 3e3c 6120 6964 3d22 6c30 3032 3436 2220 > 246 pus │ │ │ -0000b1f0: 685f 6261 636b 2867 2e3c 6120 636c 6173 h_back(g.branch │ │ │ -0000b250: 6573 5f3c 2f61 3e5b 695d 2d26 6774 3b61 es_[i]->a │ │ │ -0000b260: 7070 6c79 5f67 5f6f 705f 6643 2866 2c20 pply_g_op_fC(f, │ │ │ -0000b270: 6f70 2929 3b3c 2f64 6976 3e0a 3c64 6976 op));
    .
    < │ │ │ -0000b2b0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -0000b2c0: 6e6f 223e 2020 3234 373c 2f73 7061 6e3e no"> 247 │ │ │ -0000b2d0: 2020 2020 2020 7d20 3c73 7061 6e20 636c } else {< │ │ │ -0000b300: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -0000b350: 3234 383c 2f73 7061 6e3e 2020 2020 2020 248 │ │ │ -0000b360: 2020 3c73 7061 6e20 636c 6173 733d 2263 // f sam │ │ │ -0000b380: 6520 6c65 7665 6c20 6173 2067 3c2f 7370 e level as g
    .
    249 │ │ │ -0000b3f0: 2020 2020 2020 6c61 6265 6c5f 203d 2066 label_ = f │ │ │ -0000b400: 2e3c 6120 636c 6173 733d 2263 6f64 6520 .label();.
    2 │ │ │ -0000b4b0: 3530 3c2f 7370 616e 3e20 2020 2020 2020 50 │ │ │ -0000b4c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_ │ │ │ -0000b4e0: 743c 2f73 7061 6e3e 2063 6f75 6e74 203d t count = │ │ │ -0000b4f0: 2066 2e6e 7243 686f 6963 6573 2829 3b3c f.nrChoices();< │ │ │ -0000b500: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -0000b550: 3235 313c 2f73 7061 6e3e 2020 2020 2020 251 │ │ │ -0000b560: 2020 6272 616e 6368 6573 5f2e 7265 7365 branches_.rese │ │ │ -0000b570: 7276 6528 636f 756e 7429 3b3c 2f64 6976 rve(count);
    .
    252< │ │ │ -0000b5d0: 2f73 7061 6e3e 2020 2020 2020 2020 3c73 /span> for (si │ │ │ -0000b620: 7a65 5f74 3c2f 7370 616e 3e20 6920 3d20 ze_t i = │ │ │ -0000b630: 303b 2069 2026 6c74 3b20 636f 756e 743b 0; i < count; │ │ │ -0000b640: 2069 2b2b 293c 2f64 6976 3e0a 3c64 6976 i++)
    .
    < │ │ │ -0000b680: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -0000b690: 6e6f 223e 2020 3235 333c 2f73 7061 6e3e no"> 253 │ │ │ -0000b6a0: 2020 2020 2020 2020 2020 7075 7368 5f62 push_b │ │ │ -0000b6b0: 6163 6b28 662e 3c61 2063 6c61 7373 3d22 ack(f.branches_ │ │ │ -0000b710: 3c2f 613e 5b69 5d2d 2667 743b 6170 706c [i]->appl │ │ │ -0000b720: 795f 665f 6f70 5f67 282a 672e 3c61 2063 y_f_op_g(*g.bra │ │ │ -0000b780: 6e63 6865 735f 3c2f 613e 5b69 5d2c 206f nches_[i], o │ │ │ -0000b790: 7029 293b 3c2f 6469 763e 0a3c 6469 7620 p));
    .
    254 │ │ │ -0000b7f0: 2020 2020 207d 3c2f 6469 763e 0a3c 6469 }
    .< │ │ │ -0000b810: 6120 6964 3d22 6c30 3032 3535 2220 6e61 a id="l00255" na │ │ │ -0000b820: 6d65 3d22 6c30 3032 3535 223e 3c2f 613e me="l00255"> │ │ │ -0000b830: 3c73 7061 6e20 636c 6173 733d 226c 696e 255 }
    .< │ │ │ -0000b870: 6120 6964 3d22 6c30 3032 3536 2220 6e61 a id="l00256" na │ │ │ -0000b880: 6d65 3d22 6c30 3032 3536 223e 3c2f 613e me="l00256"> │ │ │ -0000b890: 3c73 7061 6e20 636c 6173 733d 226c 696e 256
    .
    .< │ │ │ -0000b900: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0000b910: 3e3c 6120 6964 3d22 6c30 3032 3538 2220 > 25 │ │ │ -0000b990: 383c 2f61 3e3c 2f73 7061 6e3e 2020 2020 8 │ │ │ -0000b9a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const L& label │ │ │ -0000ba20: 3c2f 613e 2829 3c73 7061 6e20 636c 6173 () con │ │ │ -0000ba40: 7374 203c 2f73 7061 6e3e 7b3c 2f64 6976 st {
    .
    259< │ │ │ -0000baa0: 2f73 7061 6e3e 2020 2020 2020 3c73 7061 /span> return label_;
    .
    │ │ │ -0000bb70: 2032 3630 3c2f 613e 3c2f 7370 616e 3e20 260 │ │ │ -0000bb80: 2020 207d 3c2f 6469 763e 0a3c 2f64 6976 }
    .
    .
    261< │ │ │ -0000bbe0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ -0000bc00: 3c61 2069 643d 226c 3030 3236 3222 206e 262 │ │ │ -0000bc60: 7369 7a65 5f74 3c2f 7370 616e 3e20 6e72 size_t nr │ │ │ -0000bc70: 4368 6f69 6365 7328 293c 7370 616e 2063 Choices() │ │ │ -0000bc90: 636f 6e73 7420 3c2f 7370 616e 3e7b 3c2f const {.
    .
    263 return branches_. │ │ │ -0000bdc0: 7369 7a65 2829 3b3c 2f64 6976 3e0a 3c64 size();
    . │ │ │ -0000bde0: 3c61 2069 643d 226c 3030 3236 3422 206e 264 }
    . │ │ │ -0000be40: 3c61 2069 643d 226c 3030 3236 3522 206e 265
    .
    266 │ │ │ -0000bee0: 2020 3c73 7061 6e20 636c 6173 733d 226b const std::vector │ │ │ -0000bf10: 266c 743b 4e6f 6465 5074 7226 6774 3b26 <NodePtr>& │ │ │ -0000bf20: 616d 703b 2062 7261 6e63 6865 7328 293c amp; branches()< │ │ │ -0000bf30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -0000bf40: 6f72 6422 3e20 636f 6e73 7420 3c2f 7370 ord"> const {
    .
    267 │ │ │ -0000bfb0: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ -0000bfd0: 6574 7572 6e3c 2f73 7061 6e3e 2062 7261 eturn bra │ │ │ -0000bfe0: 6e63 6865 735f 3b3c 2f64 6976 3e0a 3c64 nches_;
    . │ │ │ -0000c000: 3c61 2069 643d 226c 3030 3236 3822 206e 268 }
    . │ │ │ -0000c060: 3c61 2069 643d 226c 3030 3236 3922 206e 269
    .
    . │ │ │ -0000c0f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -0000c120: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 2 │ │ │ -0000c180: 3731 3c2f 613e 3c2f 7370 616e 3e20 2020 71 │ │ │ -0000c190: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void< │ │ │ -0000c1b0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> push_bac │ │ │ -0000c210: 6b3c 2f61 3e28 3c73 7061 6e20 636c 6173 k(cons │ │ │ -0000c230: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t NodePtr │ │ │ -0000c290: 3c2f 613e 2661 6d70 3b20 6e6f 6465 2920 & node) │ │ │ -0000c2a0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ -0000c2f0: 2020 3237 323c 2f73 7061 6e3e 2020 2020 272 │ │ │ -0000c300: 2020 3c73 7061 6e20 636c 6173 733d 2263 // allSa │ │ │ -0000c320: 6d65 5f20 6973 2072 6573 7472 6963 7465 me_ is restricte │ │ │ -0000c330: 6420 746f 206c 6561 6620 6e6f 6465 7320 d to leaf nodes │ │ │ -0000c340: 696e 2061 2064 6563 6973 696f 6e20 7472 in a decision tr │ │ │ -0000c350: 6565 3c2f 7370 616e 3e3c 2f64 6976 3e0a ee
    . │ │ │ -0000c360: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ -0000c410: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0000c420: 3e3c 6120 6964 3d22 6c30 3032 3734 2220 > 274 allSa │ │ │ -0000c470: 6d65 5f20 3d20 6e6f 6465 2d26 6774 3b73 me_ = node->s │ │ │ -0000c480: 616d 654c 6561 6628 2a62 7261 6e63 6865 ameLeaf(*branche │ │ │ -0000c490: 735f 2e62 6163 6b28 2929 3b3c 2f64 6976 s_.back());
    .
    275< │ │ │ -0000c4f0: 2f73 7061 6e3e 2020 2020 2020 7d3c 2f64 /span> }.
    27 │ │ │ -0000c550: 363c 2f73 7061 6e3e 2020 2020 2020 6272 6 br │ │ │ -0000c560: 616e 6368 6573 5f2e 7075 7368 5f62 6163 anches_.push_bac │ │ │ -0000c570: 6b28 6e6f 6465 293b 3c2f 6469 763e 0a3c k(node);
    .< │ │ │ -0000c580: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0000c590: 3e3c 6120 6964 3d22 6c30 3032 3737 2220 > 277 }
    .< │ │ │ -0000c5e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -0000c630: 3237 383c 2f73 7061 6e3e 203c 2f64 6976 278
    .
    .
    │ │ │ -0000c6d0: 3c61 2063 6c61 7373 3d22 6c69 6e65 2220 280 void < │ │ │ -0000c750: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -0000c760: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ -0000c770: 2261 3032 3738 302e 6874 6d6c 2361 3437 "a02780.html#a47 │ │ │ -0000c780: 6366 3766 3361 6563 6538 6335 3365 6165 cf7f3aece8c53eae │ │ │ -0000c790: 6531 3039 3664 3665 3565 3062 3034 223e e1096d6e5e0b04"> │ │ │ -0000c7a0: 7072 696e 743c 2f61 3e28 3c73 7061 6e20 print( │ │ │ -0000c7c0: 636f 6e73 743c 2f73 7061 6e3e 2073 7464 const std │ │ │ -0000c7d0: 3a3a 7374 7269 6e67 2661 6d70 3b20 732c ::string& s, │ │ │ -0000c7e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const LabelFormatt │ │ │ -0000c810: 6572 2661 6d70 3b20 6c61 6265 6c46 6f72 er& labelFor │ │ │ -0000c820: 6d61 7474 6572 2c3c 2f64 6976 3e0a 3c64 matter,
    . │ │ │ -0000c840: 3c61 2069 643d 226c 3030 3238 3122 206e 281 │ │ │ -0000c890: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ValueFormatt │ │ │ -0000c8c0: 6572 2661 6d70 3b20 7661 6c75 6546 6f72 er& valueFor │ │ │ -0000c8d0: 6d61 7474 6572 293c 7370 616e 2063 6c61 matter) co │ │ │ -0000c8f0: 6e73 7420 6f76 6572 7269 6465 203c 2f73 nst override
    {
    .
    < │ │ │ -0000c940: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -0000c950: 6e6f 223e 2020 3238 323c 2f73 7061 6e3e no"> 282 │ │ │ -0000c960: 2020 2020 2020 7374 643a 3a63 6f75 7420 std::cout │ │ │ -0000c970: 266c 743b 266c 743b 2073 2026 6c74 3b26 << s <& │ │ │ -0000c980: 6c74 3b20 3c73 7061 6e20 636c 6173 733d lt; │ │ │ -0000c9a0: 2671 756f 743b 2043 686f 6963 6528 2671 " Choice(&q │ │ │ -0000c9b0: 756f 743b 3c2f 7370 616e 3e3b 3c2f 6469 uot;;.
    283 │ │ │ -0000ca10: 3c2f 7370 616e 3e20 2020 2020 2073 7464 std │ │ │ -0000ca20: 3a3a 636f 7574 2026 6c74 3b26 6c74 3b20 ::cout << │ │ │ -0000ca30: 6c61 6265 6c46 6f72 6d61 7474 6572 286c labelFormatter(l │ │ │ -0000ca40: 6162 656c 5f29 2026 6c74 3b26 6c74 3b20 abel_) << │ │ │ -0000ca50: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ -0000ca70: 743b 2920 2671 756f 743b 3c2f 7370 616e t;) " << std:: │ │ │ -0000ca90: 656e 646c 3b3c 2f64 6976 3e0a 3c64 6976 endl;
    .
    < │ │ │ -0000cad0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -0000cae0: 6e6f 223e 2020 3238 343c 2f73 7061 6e3e no"> 284 │ │ │ -0000caf0: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ -0000cb10: 666f 723c 2f73 7061 6e3e 2028 3c73 7061 for (size_t i = 0; i < │ │ │ -0000cb50: 3b20 6272 616e 6368 6573 5f2e 7369 7a65 ; branches_.size │ │ │ -0000cb60: 2829 3b20 692b 2b29 3c2f 6469 763e 0a3c (); i++)
    .< │ │ │ -0000cb70: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0000cb80: 3e3c 6120 6964 3d22 6c30 3032 3835 2220 > 285 branc │ │ │ -0000cbd0: 6865 735f 5b69 5d2d 2667 743b 3c61 2063 hes_[i]->pri │ │ │ -0000cc30: 6e74 3c2f 613e 2828 626f 6f73 743a 3a66 nt((boost::f │ │ │ -0000cc40: 6f72 6d61 7428 3c73 7061 6e20 636c 6173 ormat("%s %d&qu │ │ │ -0000cc70: 6f74 3b3c 2f73 7061 6e3e 2920 2520 7320 ot;) % s │ │ │ -0000cc80: 2520 6929 2e73 7472 2829 2c3c 2f64 6976 % i).str(),
    .
    286< │ │ │ -0000cce0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ -0000ccf0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0000cd00: 2020 6c61 6265 6c46 6f72 6d61 7474 6572 labelFormatter │ │ │ -0000cd10: 2c20 7661 6c75 6546 6f72 6d61 7474 6572 , valueFormatter │ │ │ -0000cd20: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    287 │ │ │ -0000cd80: 207d 3c2f 6469 763e 0a3c 2f64 6976 3e0a }
    .
    . │ │ │ -0000cd90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    .
    │ │ │ -0000cec0: 2032 3930 3c2f 613e 3c2f 7370 616e 3e20 290 │ │ │ -0000ced0: 2020 203c 7370 616e 2063 6c61 7373 3d22 voi │ │ │ -0000cef0: 643c 2f73 7061 6e3e 203c 6120 636c 6173 d dot(std::ostream&a │ │ │ -0000cf60: 6d70 3b20 6f73 2c20 3c73 7061 6e20 636c mp; os, co │ │ │ -0000cf80: 6e73 743c 2f73 7061 6e3e 204c 6162 656c nst Label │ │ │ -0000cf90: 466f 726d 6174 7465 7226 616d 703b 206c Formatter& l │ │ │ -0000cfa0: 6162 656c 466f 726d 6174 7465 722c 3c2f abelFormatter,.
    2 │ │ │ -0000d000: 3931 3c2f 7370 616e 3e20 2020 2020 2020 91 │ │ │ -0000d010: 2020 2020 2020 3c73 7061 6e20 636c 6173 cons │ │ │ -0000d030: 743c 2f73 7061 6e3e 2056 616c 7565 466f t ValueFo │ │ │ -0000d040: 726d 6174 7465 7226 616d 703b 2076 616c rmatter& val │ │ │ -0000d050: 7565 466f 726d 6174 7465 722c 3c2f 6469 ueFormatter,.
    292 │ │ │ -0000d0b0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ -0000d0c0: 2020 2020 3c73 7061 6e20 636c 6173 733d bo │ │ │ -0000d0e0: 6f6c 3c2f 7370 616e 3e20 7368 6f77 5a65 ol showZe │ │ │ -0000d0f0: 726f 293c 7370 616e 2063 6c61 7373 3d22 ro) const │ │ │ -0000d110: 6f76 6572 7269 6465 203c 2f73 7061 6e3e override │ │ │ -0000d120: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ -0000d170: 2020 3239 333c 2f73 7061 6e3e 2020 2020 293 │ │ │ -0000d180: 2020 6f73 2026 6c74 3b26 6c74 3b20 3c73 os << " │ │ │ -0000d1b0: 5c26 7175 6f74 3b26 7175 6f74 3b3c 2f73 \"" << th │ │ │ -0000d1d0: 6973 2d26 6774 3b69 6428 2920 266c 743b is->id() < │ │ │ -0000d1e0: 266c 743b 203c 7370 616e 2063 6c61 7373 < "\" [ │ │ │ -0000d210: 7368 6170 653d 6369 7263 6c65 2c20 6c61 shape=circle, la │ │ │ -0000d220: 6265 6c3d 5c26 7175 6f74 3b26 7175 6f74 bel=\"" │ │ │ -0000d230: 3b3c 2f73 7061 6e3e 2026 6c74 3b26 6c74 ; << │ │ │ -0000d240: 3b20 6c61 6265 6c5f 3c2f 6469 763e 0a3c ; label_
    .< │ │ │ -0000d250: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0000d260: 3e3c 6120 6964 3d22 6c30 3032 3934 2220 > 294 < │ │ │ -0000d2b0: 3b26 6c74 3b20 3c73 7061 6e20 636c 6173 ;< "\"] │ │ │ -0000d2e0: 5c6e 2671 756f 743b 3c2f 7370 616e 3e3b \n"; │ │ │ -0000d2f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -0000d340: 2032 3935 3c2f 7370 616e 3e20 2020 2020 295 │ │ │ -0000d350: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_ │ │ │ -0000d370: 743c 2f73 7061 6e3e 2042 203d 2062 7261 t B = bra │ │ │ -0000d380: 6e63 6865 735f 2e73 697a 6528 293b 3c2f nches_.size();.
    2 │ │ │ -0000d3e0: 3936 3c2f 7370 616e 3e20 2020 2020 203c 96 < │ │ │ -0000d3f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -0000d400: 6f72 6466 6c6f 7722 3e66 6f72 3c2f 7370 ordflow">for (s │ │ │ -0000d430: 697a 655f 743c 2f73 7061 6e3e 2069 203d ize_t i = │ │ │ -0000d440: 2030 3b20 6920 266c 743b 2042 3b20 692b 0; i < B; i+ │ │ │ -0000d450: 2b29 207b 3c2f 6469 763e 0a3c 6469 7620 +) {
    .
    │ │ │ -0000d4a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -0000d4d0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d │ │ │ -0000d530: 3239 373c 2f61 3e3c 2f73 7061 6e3e 2020 297 │ │ │ -0000d540: 2020 2020 2020 3c73 7061 6e20 636c 6173 cons │ │ │ -0000d560: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t NodePtr │ │ │ -0000d5c0: 3c2f 613e 2661 6d70 3b20 6272 616e 6368 & branch │ │ │ -0000d5d0: 203d 2062 7261 6e63 6865 735f 5b69 5d3b = branches_[i]; │ │ │ -0000d5e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -0000d630: 2032 3938 3c2f 7370 616e 3e20 3c2f 6469 298 .
    299 │ │ │ -0000d690: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ -0000d6a0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ -0000d6b0: 656e 7422 3e2f 2f20 4368 6563 6b20 6966 ent">// Check if │ │ │ -0000d6c0: 207a 6572 6f3c 2f73 7061 6e3e 3c2f 6469 zero.
    300 │ │ │ -0000d720: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ -0000d730: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -0000d740: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (!showZero) { │ │ │ -0000d760: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -0000d7b0: 2033 3031 3c2f 7370 616e 3e20 2020 2020 301 │ │ │ -0000d7c0: 2020 2020 203c 7370 616e 2063 6c61 7373 const │ │ │ -0000d7e0: 3c2f 7370 616e 3e20 4c65 6166 2a20 6c65 Leaf* le │ │ │ -0000d7f0: 6166 203d 203c 7370 616e 2063 6c61 7373 af = dynam │ │ │ -0000d810: 6963 5f63 6173 7426 6c74 3b3c 2f73 7061 ic_cast<const Leaf* │ │ │ -0000d860: 2667 743b 3c2f 7370 616e 3e28 6272 616e >(bran │ │ │ -0000d870: 6368 2e67 6574 2829 293b 3c2f 6469 763e ch.get());
    │ │ │ -0000d880: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -0000d8b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 302 < │ │ │ -0000d8e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -0000d8f0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (leaf &&a │ │ │ -0000d910: 6d70 3b20 7661 6c75 6546 6f72 6d61 7474 mp; valueFormatt │ │ │ -0000d920: 6572 286c 6561 662d 2667 743b 636f 6e73 er(leaf->cons │ │ │ -0000d930: 7461 6e74 2829 292e 636f 6d70 6172 6528 tant()).compare( │ │ │ -0000d940: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ -0000d960: 743b 3026 7175 6f74 3b3c 2f73 7061 6e3e t;0" │ │ │ -0000d970: 2929 203c 7370 616e 2063 6c61 7373 3d22 )) con │ │ │ -0000d990: 7469 6e75 653c 2f73 7061 6e3e 3b3c 2f64 tinue;.
    30 │ │ │ -0000d9f0: 333c 2f73 7061 6e3e 2020 2020 2020 2020 3 │ │ │ -0000da00: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ -0000da50: 2020 3330 343c 2f73 7061 6e3e 203c 2f64 304 .
    30 │ │ │ -0000dab0: 353c 2f73 7061 6e3e 2020 2020 2020 2020 5 │ │ │ -0000dac0: 6f73 2026 6c74 3b26 6c74 3b20 3c73 7061 os << "\& │ │ │ -0000daf0: 7175 6f74 3b26 7175 6f74 3b3c 2f73 7061 quot;" << this │ │ │ -0000db10: 2d26 6774 3b69 6428 2920 266c 743b 266c ->id() <&l │ │ │ -0000db20: 743b 203c 7370 616e 2063 6c61 7373 3d22 t; & │ │ │ -0000db40: 7175 6f74 3b5c 2671 756f 743b 202d 2667 quot;\" -&g │ │ │ -0000db50: 743b 205c 2671 756f 743b 2671 756f 743b t; \"" │ │ │ -0000db60: 3c2f 7370 616e 3e20 266c 743b 266c 743b << │ │ │ -0000db70: 2062 7261 6e63 682d 2667 743b 6964 2829 branch->id() │ │ │ -0000db80: 2026 6c74 3b26 6c74 3b20 3c73 7061 6e20 << "\&qu │ │ │ -0000dbb0: 6f74 3b26 7175 6f74 3b3c 2f73 7061 6e3e ot;" │ │ │ -0000dbc0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ -0000dc10: 2020 3330 363c 2f73 7061 6e3e 2020 2020 306 │ │ │ -0000dc20: 2020 2020 3c73 7061 6e20 636c 6173 733d if │ │ │ -0000dc40: 3c2f 7370 616e 3e20 2842 203d 3d20 3220 (B == 2 │ │ │ -0000dc50: 2661 6d70 3b26 616d 703b 2069 203d 3d20 && i == │ │ │ -0000dc60: 3029 206f 7320 266c 743b 266c 743b 203c 0) os << < │ │ │ -0000dc70: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ -0000dc80: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ -0000dc90: 3b20 5b73 7479 6c65 3d64 6173 6865 645d ; [style=dashed] │ │ │ -0000dca0: 2671 756f 743b 3c2f 7370 616e 3e3b 3c2f ";.
    3 │ │ │ -0000dd00: 3037 3c2f 7370 616e 3e20 2020 2020 2020 07 │ │ │ -0000dd10: 206f 7320 266c 743b 266c 743b 2073 7464 os << std │ │ │ -0000dd20: 3a3a 656e 646c 3b3c 2f64 6976 3e0a 3c64 ::endl;
    . │ │ │ -0000dd40: 3c61 2069 643d 226c 3030 3330 3822 206e 308 branch │ │ │ -0000dd90: 2d26 6774 3b64 6f74 286f 732c 206c 6162 ->dot(os, lab │ │ │ -0000dda0: 656c 466f 726d 6174 7465 722c 2076 616c elFormatter, val │ │ │ -0000ddb0: 7565 466f 726d 6174 7465 722c 2073 686f ueFormatter, sho │ │ │ -0000ddc0: 775a 6572 6f29 3b3c 2f64 6976 3e0a 3c64 wZero);
    . │ │ │ -0000dde0: 3c61 2069 643d 226c 3030 3330 3922 206e 309 }
    . │ │ │ -0000de30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ -0000de90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    .
    │ │ │ -0000dfc0: 2033 3133 3c2f 613e 3c2f 7370 616e 3e20 313 │ │ │ -0000dfd0: 2020 203c 7370 616e 2063 6c61 7373 3d22 boo │ │ │ -0000dff0: 6c3c 2f73 7061 6e3e 203c 6120 636c 6173 l sameLe │ │ │ -0000e050: 6166 3c2f 613e 283c 7370 616e 2063 6c61 af(con │ │ │ -0000e070: 7374 3c2f 7370 616e 3e20 3c61 2063 6c61 st Leaf& │ │ │ -0000e0b0: 616d 703b 2071 293c 7370 616e 2063 6c61 amp; q) co │ │ │ -0000e0d0: 6e73 7420 6f76 6572 7269 6465 203c 2f73 nst override {
    .
    .
    │ │ │ -0000e1c0: 2033 3134 3c2f 613e 3c2f 7370 616e 3e20 314 │ │ │ -0000e1d0: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ -0000e1f0: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn false; │ │ │ -0000e220: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -0000e270: 2033 3135 3c2f 7370 616e 3e20 2020 207d 315 } │ │ │ -0000e280: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -0000e2d0: 2033 3136 3c2f 7370 616e 3e20 3c2f 6469 316 .
    .
    318< │ │ │ -0000e3c0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> bool │ │ │ -0000e3f0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 sameLeaf(const │ │ │ -0000e470: 203c 6120 636c 6173 733d 2263 6f64 6520 No │ │ │ -0000e4a0: 6465 3c2f 613e 2661 6d70 3b20 7129 3c73 de& q) const overr │ │ │ -0000e4d0: 6964 6520 3c2f 7370 616e 3e7b 3c2f 6469 ide {.
    319 │ │ │ -0000e530: 3c2f 7370 616e 3e20 2020 2020 203c 7370 return (q.isLeaf() │ │ │ -0000e570: 2026 616d 703b 2661 6d70 3b20 712e 7361 && q.sa │ │ │ -0000e580: 6d65 4c65 6166 282a 3c73 7061 6e20 636c meLeaf(*th │ │ │ -0000e5a0: 6973 3c2f 7370 616e 3e29 293b 3c2f 6469 is));.
    320 │ │ │ -0000e600: 3c2f 7370 616e 3e20 2020 207d 3c2f 6469 }.
    .
    321 < │ │ │ -0000e670: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .
    < │ │ │ -0000e6f0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -0000e700: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 323 bool equals(< │ │ │ -0000e7e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -0000e7f0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const N │ │ │ -0000e830: 6f64 653c 2f61 3e26 616d 703b 2071 2c20 ode& q, │ │ │ -0000e840: 3c73 7061 6e20 636c 6173 733d 226b 6579 const CompareFunc&a │ │ │ -0000e870: 6d70 3b20 636f 6d70 6172 6529 3c73 7061 mp; compare) const overrid │ │ │ -0000e8a0: 6520 3c2f 7370 616e 3e7b 3c2f 6469 763e e {
    │ │ │ -0000e8b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -0000e8e0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 324 const Choic │ │ │ -0000e960: 653c 2f61 3e2a 206f 7468 6572 203d 203c e* other = < │ │ │ -0000e970: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -0000e980: 6f72 6422 3e64 796e 616d 6963 5f63 6173 ord">dynamic_cas │ │ │ -0000e990: 7426 6c74 3b3c 2f73 7061 6e3e 3c73 7061 t<const < │ │ │ -0000e9c0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -0000e9d0: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ -0000e9e0: 3032 3738 302e 6874 6d6c 223e 4368 6f69 02780.html">Choi │ │ │ -0000e9f0: 6365 3c2f 613e 2a3c 7370 616e 2063 6c61 ce*> │ │ │ -0000ea10: 3b3c 2f73 7061 6e3e 2826 616d 703b 7129 ;(&q) │ │ │ -0000ea20: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ -0000ea70: 2020 3332 353c 2f73 7061 6e3e 2020 2020 325 │ │ │ -0000ea80: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!other) < │ │ │ -0000eab0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -0000eac0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ -0000ead0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> fal │ │ │ -0000eaf0: 7365 3c2f 7370 616e 3e3b 3c2f 6469 763e se;
    │ │ │ -0000eb00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -0000eb30: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 326 if ( │ │ │ -0000eb80: 7468 6973 2d26 6774 3b6c 6162 656c 5f20 this->label_ │ │ │ -0000eb90: 213d 206f 7468 6572 2d26 6774 3b3c 6120 != other->la │ │ │ -0000ebf0: 6265 6c5f 3c2f 613e 2920 3c73 7061 6e20 bel_) return false;
    .
    < │ │ │ -0000ec80: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -0000ec90: 6e6f 223e 2020 3332 373c 2f73 7061 6e3e no"> 327 │ │ │ -0000eca0: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ -0000ecc0: 6966 3c2f 7370 616e 3e20 2862 7261 6e63 if (branc │ │ │ -0000ecd0: 6865 735f 2e73 697a 6528 2920 213d 206f hes_.size() != o │ │ │ -0000ece0: 7468 6572 2d26 6774 3b3c 6120 636c 6173 ther->branch │ │ │ -0000ed40: 6573 5f3c 2f61 3e2e 7369 7a65 2829 2920 es_.size()) │ │ │ -0000ed50: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ -0000ed70: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fa │ │ │ -0000ed90: 6c73 653c 2f73 7061 6e3e 3b3c 2f64 6976 lse;
    .
    328< │ │ │ -0000edf0: 2f73 7061 6e3e 2020 2020 2020 3c73 7061 /span> // we don' │ │ │ -0000ee20: 7420 6361 7265 2061 626f 7574 2073 6861 t care about sha │ │ │ -0000ee30: 7265 6420 706f 696e 7465 7273 2062 6569 red pointers bei │ │ │ -0000ee40: 6e67 2065 7175 616c 2068 6572 653c 2f73 ng equal here
    .
    329 │ │ │ -0000eeb0: 2020 2020 203c 7370 616e 2063 6c61 7373 f │ │ │ -0000eed0: 6f72 3c2f 7370 616e 3e20 283c 7370 616e or (size_t i = 0; i < │ │ │ -0000ef10: 2062 7261 6e63 6865 735f 2e73 697a 6528 branches_.size( │ │ │ -0000ef20: 293b 2069 2b2b 293c 2f64 6976 3e0a 3c64 ); i++)
    . │ │ │ -0000ef40: 3c61 2069 643d 226c 3030 3333 3022 206e 330 if (! │ │ │ -0000efb0: 2862 7261 6e63 6865 735f 5b69 5d2d 2667 (branches_[i]-&g │ │ │ -0000efc0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;e │ │ │ -0000eff0: 7175 616c 733c 2f61 3e28 2a28 6f74 6865 quals(*(othe │ │ │ -0000f000: 722d 2667 743b 3c61 2063 6c61 7373 3d22 r->branches_ │ │ │ -0000f060: 3c2f 613e 5b69 5d29 2c20 636f 6d70 6172 [i]), compar │ │ │ -0000f070: 6529 2929 3c2f 6469 763e 0a3c 6469 7620 e)))
    .
    331 │ │ │ -0000f0d0: 2020 2020 2020 2020 203c 7370 616e 2063 return │ │ │ -0000f100: 203c 7370 616e 2063 6c61 7373 3d22 6b65 false;
    .
    332 │ │ │ -0000f180: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ -0000f1a0: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn true;< │ │ │ -0000f1d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -0000f220: 3333 333c 2f73 7061 6e3e 2020 2020 7d3c 333 }< │ │ │ -0000f230: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 6469 /div>.
    .< │ │ │ -0000f250: 6120 6964 3d22 6c30 3033 3334 2220 6e61 a id="l00334" na │ │ │ -0000f260: 6d65 3d22 6c30 3033 3334 223e 3c2f 613e me="l00334"> │ │ │ -0000f270: 3c73 7061 6e20 636c 6173 733d 226c 696e 334
    .
    .< │ │ │ -0000f2e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0000f2f0: 3e3c 6120 6964 3d22 6c30 3033 3336 2220 > 33 │ │ │ -0000f370: 363c 2f61 3e3c 2f73 7061 6e3e 2020 2020 6 │ │ │ -0000f380: 3c73 7061 6e20 636c 6173 733d 226b 6579 const Y& opera │ │ │ -0000f400: 746f 7228 293c 2f61 3e28 3c73 7061 6e20 tor()( │ │ │ -0000f420: 636f 6e73 743c 2f73 7061 6e3e 203c 6120 const Assignm │ │ │ -0000f460: 656e 7426 6c74 3b4c 2667 743b 3c2f 613e ent<L> │ │ │ -0000f470: 2661 6d70 3b20 7829 3c73 7061 6e20 636c & x) c │ │ │ -0000f490: 6f6e 7374 206f 7665 7272 6964 6520 3c2f onst override {
    .< │ │ │ -0000f4c0: 6120 6964 3d22 6c30 3033 3337 2220 6e61 a id="l00337" na │ │ │ -0000f4d0: 6d65 3d22 6c30 3033 3337 223e 3c2f 613e me="l00337"> │ │ │ -0000f4e0: 3c73 7061 6e20 636c 6173 733d 226c 696e 337#ifn │ │ │ -0000f520: 6465 6620 4e44 4542 5547 3c2f 7370 616e def NDEBUG
    .
    . │ │ │ -0000f590: 3c61 2069 643d 226c 3030 3333 3822 206e 338 │ │ │ -0000f610: 3c2f 613e 3c2f 7370 616e 3e20 2020 2020 │ │ │ -0000f620: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ -0000f640: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> Assignment< │ │ │ -0000f680: 3b4c 2667 743b 3a3a 636f 6e73 745f 6974 ;L>::const_it │ │ │ -0000f690: 6572 6174 6f72 3c2f 613e 2069 7420 3d20 erator it = │ │ │ -0000f6a0: 782e 6669 6e64 286c 6162 656c 5f29 3b3c x.find(label_);< │ │ │ -0000f6b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -0000f700: 3333 393c 2f73 7061 6e3e 2020 2020 2020 339 │ │ │ -0000f710: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (it == x.end │ │ │ -0000f740: 2829 2920 7b3c 2f64 6976 3e0a 3c64 6976 ()) {
    .
    < │ │ │ -0000f780: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -0000f790: 6e6f 223e 2020 3334 303c 2f73 7061 6e3e no"> 340 │ │ │ -0000f7a0: 2020 2020 2020 2020 7374 643a 3a63 6f75 std::cou │ │ │ -0000f7b0: 7420 266c 743b 266c 743b 203c 7370 616e t << "Try │ │ │ -0000f7e0: 696e 6720 746f 2066 696e 6420 7661 6c75 ing to find valu │ │ │ -0000f7f0: 6520 666f 7220 2671 756f 743b 3c2f 7370 e for " << lab │ │ │ -0000f810: 656c 5f20 266c 743b 266c 743b 2073 7464 el_ << std │ │ │ -0000f820: 3a3a 656e 646c 3b3c 2f64 6976 3e0a 3c64 ::endl;
    ..
    341 throw │ │ │ -0000f940: 7374 643a 3a69 6e76 616c 6964 5f61 7267 std::invalid_arg │ │ │ -0000f950: 756d 656e 7428 3c2f 6469 763e 0a3c 6469 ument(
    .< │ │ │ -0000f970: 6120 6964 3d22 6c30 3033 3432 2220 6e61 a id="l00342" na │ │ │ -0000f980: 6d65 3d22 6c30 3033 3432 223e 3c2f 613e me="l00342"> │ │ │ -0000f990: 3c73 7061 6e20 636c 6173 733d 226c 696e 342 "D │ │ │ -0000f9e0: 6563 6973 696f 6e54 7265 653a 3a6f 7065 ecisionTree::ope │ │ │ -0000f9f0: 7261 746f 7228 293a 2076 616c 7565 2075 rator(): value u │ │ │ -0000fa00: 6e64 6566 696e 6564 2066 6f72 2061 206c ndefined for a l │ │ │ -0000fa10: 6162 656c 2671 756f 743b 3c2f 7370 616e abel"
    );
    .
    343 │ │ │ -0000fa80: 2020 2020 7d3c 2f64 6976 3e0a 3c64 6976 }
    .
    < │ │ │ -0000fac0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -0000fad0: 6e6f 223e 2020 3334 343c 2f73 7061 6e3e no"> 344 │ │ │ -0000fae0: 3c73 7061 6e20 636c 6173 733d 2270 7265 #endi │ │ │ -0000fb00: 663c 2f73 7061 6e3e 3c2f 6469 763e 0a3c f
    .< │ │ │ -0000fb10: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0000fb20: 3e3c 6120 6964 3d22 6c30 3033 3435 2220 > 345 size_t │ │ │ -0000fb90: 2069 6e64 6578 203d 2078 2e61 7428 6c61 index = x.at(la │ │ │ -0000fba0: 6265 6c5f 293b 3c2f 6469 763e 0a3c 6469 bel_);
    .< │ │ │ -0000fbc0: 6120 6964 3d22 6c30 3033 3436 2220 6e61 a id="l00346" na │ │ │ -0000fbd0: 6d65 3d22 6c30 3033 3436 223e 3c2f 613e me="l00346"> │ │ │ -0000fbe0: 3c73 7061 6e20 636c 6173 733d 226c 696e 346 NodePtr child = branc │ │ │ -0000fc70: 6865 735f 5b69 6e64 6578 5d3b 3c2f 6469 hes_[index];.
    347 │ │ │ -0000fcd0: 3c2f 7370 616e 3e20 2020 2020 203c 7370 return (*child)(x) │ │ │ -0000fd10: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ -0000fd60: 2020 3334 383c 2f73 7061 6e3e 2020 2020 348 │ │ │ -0000fd70: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ -0000fdc0: 2020 3334 393c 2f73 7061 6e3e 203c 2f64 349 .
    .
    351 │ │ │ -0000feb0: 3c2f 7370 616e 3e20 2020 2043 686f 6963 Choic │ │ │ -0000fec0: 6528 3c73 7061 6e20 636c 6173 733d 226b e(const L& labe │ │ │ -0000fef0: 6c2c 203c 7370 616e 2063 6c61 7373 3d22 l, const Choice& │ │ │ -0000ff20: 3b20 662c 203c 7370 616e 2063 6c61 7373 ; f, const │ │ │ -0000ff40: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 Unary& op) :.
    352 │ │ │ -00010000: 3c2f 7370 616e 3e20 2020 2020 206c 6162 lab │ │ │ -00010010: 656c 5f28 6c61 6265 6c29 2c20 616c 6c53 el_(label), allS │ │ │ -00010020: 616d 655f 2874 7275 6529 207b 3c2f 6469 ame_(true) {.
    353 │ │ │ -00010080: 3c2f 7370 616e 3e20 2020 2020 2062 7261 bra │ │ │ -00010090: 6e63 6865 735f 2e72 6573 6572 7665 2866 nches_.reserve(f │ │ │ -000100a0: 2e62 7261 6e63 6865 735f 2e73 697a 6528 .branches_.size( │ │ │ -000100b0: 2929 3b20 203c 7370 616e 2063 6c61 7373 )); // re │ │ │ -000100d0: 7365 7276 6520 7370 6163 653c 2f73 7061 serve space
    .
    .< │ │ │ -00010130: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00010140: 3e3c 6120 6964 3d22 6c30 3033 3534 2220 > 35 │ │ │ -000101c0: 343c 2f61 3e3c 2f73 7061 6e3e 2020 2020 4 │ │ │ -000101d0: 2020 3c73 7061 6e20 636c 6173 733d 226b for< │ │ │ -000101f0: 2f73 7061 6e3e 2028 3c73 7061 6e20 636c /span> (co │ │ │ -00010210: 6e73 743c 2f73 7061 6e3e 203c 6120 636c nst NodeP │ │ │ -00010270: 7472 3c2f 613e 2661 6d70 3b20 6272 616e tr& bran │ │ │ -00010280: 6368 203a 2066 2e62 7261 6e63 6865 735f ch : f.branches_ │ │ │ -00010290: 2920 7b3c 2f64 6976 3e0a 3c64 6976 2063 ) {
    .
    355 │ │ │ -000102f0: 2020 2020 2020 7075 7368 5f62 6163 6b28 push_back( │ │ │ -00010300: 6272 616e 6368 2d26 6774 3b61 7070 6c79 branch->apply │ │ │ -00010310: 286f 7029 293b 3c2f 6469 763e 0a3c 6469 (op));
    .< │ │ │ -00010330: 6120 6964 3d22 6c30 3033 3536 2220 6e61 a id="l00356" na │ │ │ -00010340: 6d65 3d22 6c30 3033 3536 223e 3c2f 613e me="l00356"> │ │ │ -00010350: 3c73 7061 6e20 636c 6173 733d 226c 696e 356 }
    .< │ │ │ -00010380: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00010390: 3e3c 6120 6964 3d22 6c30 3033 3537 2220 > 357 }
    .< │ │ │ -000103e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -000103f0: 3e3c 6120 6964 3d22 6c30 3033 3538 2220 > 358
    .
    │ │ │ -00010480: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -000104b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d │ │ │ -00010510: 3336 393c 2f61 3e3c 2f73 7061 6e3e 2020 369 │ │ │ -00010520: 2020 3c61 2063 6c61 7373 3d22 636f 6465 Choice(const │ │ │ -000105a0: 204c 2661 6d70 3b20 6c61 6265 6c2c 203c L& label, < │ │ │ -000105b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -000105c0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const C │ │ │ -00010600: 686f 6963 653c 2f61 3e26 616d 703b 2066 hoice& f │ │ │ -00010610: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const UnaryAssign │ │ │ -00010640: 6d65 6e74 2661 6d70 3b20 6f70 2c3c 2f64 ment& op,.
    37 │ │ │ -000106a0: 303c 2f73 7061 6e3e 2020 2020 2020 2020 0 │ │ │ -000106b0: 2020 203c 7370 616e 2063 6c61 7373 3d22 const Assignment< │ │ │ -00010710: 4c26 6774 3b3c 2f61 3e26 616d 703b 2061 L>& a │ │ │ -00010720: 7373 6967 6e6d 656e 7429 3c2f 6469 763e ssignment)
    │ │ │ -00010730: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -00010760: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 371 : l │ │ │ -00010790: 6162 656c 5f28 6c61 6265 6c29 2c20 616c abel_(label), al │ │ │ -000107a0: 6c53 616d 655f 2874 7275 6529 207b 3c2f lSame_(true) {.
    3 │ │ │ -00010800: 3732 3c2f 7370 616e 3e20 2020 2020 2062 72 b │ │ │ -00010810: 7261 6e63 6865 735f 2e72 6573 6572 7665 ranches_.reserve │ │ │ -00010820: 2866 2e3c 6120 636c 6173 733d 2263 6f64 (f.branches_.size()); // reserve spa │ │ │ -000108b0: 6365 3c2f 7370 616e 3e3c 2f64 6976 3e0a ce
    . │ │ │ -000108c0: 3c64 6976 2063 6c61 7373 3d22 666f 6c64
    ..
    374 │ │ │ -00010a00: 2020 2020 203c 6120 636c 6173 733d 2263 Assignment<L │ │ │ -00010a40: 2667 743b 3c2f 613e 2061 7373 6967 6e6d > assignm │ │ │ -00010a50: 656e 745f 203d 2061 7373 6967 6e6d 656e ent_ = assignmen │ │ │ -00010a60: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    375 .
    3 │ │ │ -00010b10: 3736 3c2f 7370 616e 3e20 2020 2020 203c 76 < │ │ │ -00010b20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00010b30: 6f72 6466 6c6f 7722 3e66 6f72 3c2f 7370 ordflow">for (s │ │ │ -00010b60: 697a 655f 743c 2f73 7061 6e3e 2069 203d ize_t i = │ │ │ -00010b70: 2030 3b20 6920 266c 743b 2066 2e3c 6120 0; i < f.br │ │ │ -00010bd0: 616e 6368 6573 5f3c 2f61 3e2e 7369 7a65 anches_.size │ │ │ -00010be0: 2829 3b20 692b 2b29 207b 3c2f 6469 763e (); i++) {
    │ │ │ -00010bf0: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ -00010c80: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ -00010c90: 7265 663d 2261 3032 3739 362e 6874 6d6c ref="a02796.html │ │ │ -00010ca0: 2361 6364 6366 3732 3439 3966 3230 6437 #acdcf72499f20d7 │ │ │ -00010cb0: 3935 3835 6134 3332 3239 3834 3862 3138 9585a43229848b18 │ │ │ -00010cc0: 3433 223e 2020 3337 373c 2f61 3e3c 2f73 43"> 377 assi │ │ │ -00010ce0: 676e 6d65 6e74 5f5b 6c61 6265 6c5f 5d20 gnment_[label_] │ │ │ -00010cf0: 3d20 693b 2020 3c73 7061 6e20 636c 6173 = i; // S │ │ │ -00010d10: 6574 2061 7373 6967 6e6d 656e 7420 666f et assignment fo │ │ │ -00010d20: 7220 6c61 6265 6c20 746f 2069 3c2f 7370 r label to i
    .
    378 < │ │ │ -00010d90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00010de0: 3337 393c 2f73 7061 6e3e 2020 2020 2020 379 │ │ │ -00010df0: 2020 3c73 7061 6e20 636c 6173 733d 226b const NodePtr │ │ │ -00010e70: 2062 7261 6e63 6820 3d20 662e 3c61 2063 branch = f.bra │ │ │ -00010ed0: 6e63 6865 735f 3c2f 613e 5b69 5d3b 3c2f nches_[i];.
    3 │ │ │ -00010f30: 3830 3c2f 7370 616e 3e20 2020 2020 2020 80 │ │ │ -00010f40: 2070 7573 685f 6261 636b 2862 7261 6e63 push_back(branc │ │ │ -00010f50: 682d 2667 743b 6170 706c 7928 6f70 2c20 h->apply(op, │ │ │ -00010f60: 6173 7369 676e 6d65 6e74 5f29 293b 3c2f assignment_));..< │ │ │ -000111d0: 6120 6964 3d22 6c30 3033 3834 2220 6e61 a id="l00384" na │ │ │ -000111e0: 6d65 3d22 6c30 3033 3834 223e 3c2f 613e me="l00384"> │ │ │ -000111f0: 3c73 7061 6e20 636c 6173 733d 226c 696e 384 assignm │ │ │ -00011220: 656e 745f 2e65 7261 7365 2861 7373 6967 ent_.erase(assig │ │ │ -00011230: 6e6d 656e 745f 6974 293b 3c2f 6469 763e nment_it);
    │ │ │ -00011240: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -00011270: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 385 }.
    386 │ │ │ -000112f0: 3c2f 7370 616e 3e20 2020 207d 3c2f 6469 }.
    387 │ │ │ -00011350: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ -00011360: 6469 7620 636c 6173 733d 2266 6f6c 646f div class="foldo │ │ │ -00011370: 7065 6e22 2069 643d 2266 6f6c 646f 7065 pen" id="foldope │ │ │ -00011380: 6e30 3033 3839 2220 6461 7461 2d73 7461 n00389" data-sta │ │ │ -00011390: 7274 3d22 7b22 2064 6174 612d 656e 643d rt="{" data-end= │ │ │ -000113a0: 227d 223e 0a3c 6469 7620 636c 6173 733d "}">.
    389 NodePtr apply(const │ │ │ -00011520: 3c61 2063 6c61 7373 3d22 636f 6465 2068 │ │ │ -00011570: 556e 6172 793c 2f61 3e26 616d 703b 206f Unary& o │ │ │ -00011580: 7029 3c73 7061 6e20 636c 6173 733d 226b p) const o │ │ │ -000115a0: 7665 7272 6964 6520 3c2f 7370 616e 3e7b verride { │ │ │ -000115b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00011600: 2033 3930 3c2f 7370 616e 3e20 2020 2020 390 │ │ │ -00011610: 203c 7370 616e 2063 6c61 7373 3d22 6b65 auto r = boost::ma │ │ │ -00011640: 6b65 5f73 6861 7265 6426 6c74 3b43 686f ke_shared<Cho │ │ │ -00011650: 6963 6526 6774 3b28 6c61 6265 6c5f 2c20 ice>(label_, │ │ │ -00011660: 2a3c 7370 616e 2063 6c61 7373 3d22 6b65 *this, op);
    .< │ │ │ -00011690: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -000116a0: 3e3c 6120 6964 3d22 6c30 3033 3931 2220 > 391 return │ │ │ -00011710: 2055 6e69 7175 6528 7229 3b3c 2f64 6976 Unique(r);
    .
    392< │ │ │ -00011770: 2f73 7061 6e3e 2020 2020 7d3c 2f64 6976 /span> }
    .
    .
    393 .
    .
    395 Node │ │ │ -00011920: 5074 723c 2f61 3e20 3c61 2063 6c61 7373 Ptr apply(const UnaryAssig │ │ │ -000119b0: 6e6d 656e 7426 616d 703b 206f 702c 3c2f nment& op,.
    3 │ │ │ -00011a10: 3936 3c2f 7370 616e 3e20 2020 2020 2020 96 │ │ │ -00011a20: 2020 2020 2020 2020 2020 203c 7370 616e const Assign │ │ │ -00011a80: 6d65 6e74 266c 743b 4c26 6774 3b3c 2f61 ment<L>& assignmen │ │ │ -00011aa0: 7429 3c73 7061 6e20 636c 6173 733d 226b t) const o │ │ │ -00011ac0: 7665 7272 6964 6520 3c2f 7370 616e 3e7b verride { │ │ │ -00011ad0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00011b20: 2033 3937 3c2f 7370 616e 3e20 2020 2020 397 │ │ │ -00011b30: 203c 7370 616e 2063 6c61 7373 3d22 6b65 auto r = boost::ma │ │ │ -00011b60: 6b65 5f73 6861 7265 6426 6c74 3b43 686f ke_shared<Cho │ │ │ -00011b70: 6963 6526 6774 3b28 6c61 6265 6c5f 2c20 ice>(label_, │ │ │ -00011b80: 2a3c 7370 616e 2063 6c61 7373 3d22 6b65 *this, op, assignme │ │ │ -00011bb0: 6e74 293b 3c2f 6469 763e 0a3c 6469 7620 nt);
    .
    398 │ │ │ -00011c10: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ -00011c30: 6574 7572 6e3c 2f73 7061 6e3e 2055 6e69 eturn Uni │ │ │ -00011c40: 7175 6528 7229 3b3c 2f64 6976 3e0a 3c64 que(r);
    . │ │ │ -00011c60: 3c61 2069 643d 226c 3030 3339 3922 206e 399 }
    ..
    4 │ │ │ -00011d00: 3030 3c2f 7370 616e 3e20 3c2f 6469 763e 00
    │ │ │ -00011d10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -00011d40: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 401 / │ │ │ -00011d80: 2f20 4170 706c 7920 6269 6e61 7279 206f / Apply binary o │ │ │ -00011d90: 7065 7261 746f 7220 2671 756f 743b 6820 perator "h │ │ │ -00011da0: 3d20 6620 6f70 2067 2671 756f 743b 206f = f op g" o │ │ │ -00011db0: 6e20 4368 6f69 6365 206e 6f64 653c 2f73 n Choice node
    .
    402 │ │ │ -00011e20: 2020 203c 7370 616e 2063 6c61 7373 3d22 // Note │ │ │ -00011e40: 206f 7020 6973 206e 6f74 2061 7373 756d op is not assum │ │ │ -00011e50: 6564 2063 6f6d 6d75 7461 7469 7665 2073 ed commutative s │ │ │ -00011e60: 6f20 7765 206e 6565 6420 746f 206b 6565 o we need to kee │ │ │ -00011e70: 7020 7472 6163 6b20 6f66 206f 7264 6572 p track of order │ │ │ -00011e80: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ -00011ea0: 3c61 2069 643d 226c 3030 3430 3322 206e 403 // S │ │ │ -00011f00: 696d 706c 7920 6361 6c6c 7320 6170 706c imply calls appl │ │ │ -00011f10: 7920 6f6e 2061 7267 756d 656e 7420 746f y on argument to │ │ │ -00011f20: 2063 616c 6c20 636f 7272 6563 7420 7669 call correct vi │ │ │ -00011f30: 7274 7561 6c20 6d65 7468 6f64 3a3c 2f73 rtual method:
    .
    404 │ │ │ -00011fa0: 2020 203c 7370 616e 2063 6c61 7373 3d22 // fC.a │ │ │ -00011fc0: 7070 6c79 5f66 5f6f 705f 6728 674c 2920 pply_f_op_g(gL) │ │ │ -00011fd0: 2d26 6774 3b20 674c 2e61 7070 6c79 5f67 -> gL.apply_g │ │ │ -00011fe0: 5f6f 705f 6643 2866 4329 202d 2667 743b _op_fC(fC) -> │ │ │ -00011ff0: 2028 4c65 6166 293c 2f73 7061 6e3e 3c2f (Leaf).
    4 │ │ │ -00012050: 3035 3c2f 7370 616e 3e20 2020 203c 7370 05 // fC.apply_f │ │ │ -00012080: 5f6f 705f 6728 6743 2920 2d26 6774 3b20 _op_g(gC) -> │ │ │ -00012090: 6743 2e61 7070 6c79 5f67 5f6f 705f 6643 gC.apply_g_op_fC │ │ │ -000120a0: 2866 4329 202d 2667 743b 2028 6265 6c6f (fC) -> (belo │ │ │ -000120b0: 7729 3c2f 7370 616e 3e3c 2f64 6976 3e0a w)
    . │ │ │ -000120c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -000120f0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 406 NodePtr< │ │ │ -00012170: 2f61 3e20 6170 706c 795f 665f 6f70 5f67 /a> apply_f_op_g │ │ │ -00012180: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (const Node& g │ │ │ -000121e0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const Binary& │ │ │ -00012210: 206f 7029 3c73 7061 6e20 636c 6173 733d op) const │ │ │ -00012230: 206f 7665 7272 6964 6520 3c2f 7370 616e override {
    .
    407 │ │ │ -000122a0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ -000122c0: 7572 6e3c 2f73 7061 6e3e 2067 2e61 7070 urn g.app │ │ │ -000122d0: 6c79 5f67 5f6f 705f 6643 282a 3c73 7061 ly_g_op_fC(*this, o │ │ │ -00012300: 7029 3b3c 2f64 6976 3e0a 3c64 6976 2063 p);
    .
    408 │ │ │ -00012360: 2020 7d3c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    409 < │ │ │ -000123c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00012410: 3431 303c 2f73 7061 6e3e 2020 2020 3c73 410 // If second │ │ │ -00012440: 2061 7267 756d 656e 7420 6f66 2062 696e argument of bin │ │ │ -00012450: 6172 7920 6f70 2069 7320 4c65 6166 206e ary op is Leaf n │ │ │ -00012460: 6f64 652c 2072 6563 7572 7365 206f 6e20 ode, recurse on │ │ │ -00012470: 6272 616e 6368 6573 3c2f 7370 616e 3e3c branches< │ │ │ -00012480: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -000124d0: 3431 313c 2f73 7061 6e3e 2020 2020 3c61 411 No │ │ │ -00012530: 6465 5074 723c 2f61 3e20 6170 706c 795f dePtr apply_ │ │ │ -00012540: 675f 6f70 5f66 4c28 3c73 7061 6e20 636c g_op_fL(co │ │ │ -00012560: 6e73 743c 2f73 7061 6e3e 204c 6561 6626 nst Leaf& │ │ │ -00012570: 616d 703b 2066 4c2c 203c 7370 616e 2063 amp; fL, c │ │ │ -00012590: 6f6e 7374 3c2f 7370 616e 3e20 4269 6e61 onst Bina │ │ │ -000125a0: 7279 2661 6d70 3b20 6f70 293c 7370 616e ry& op) const override │ │ │ -000125d0: 203c 2f73 7061 6e3e 7b3c 2f64 6976 3e0a {
    . │ │ │ -000125e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ -000126b0: 3c61 2069 643d 226c 3030 3431 3322 206e 413 for (auto& │ │ │ -00012740: 616d 703b 2661 6d70 3b20 6272 616e 6368 amp;& branch │ │ │ -00012750: 203a 2062 7261 6e63 6865 735f 293c 2f64 : branches_).
    41 │ │ │ -000127b0: 343c 2f73 7061 6e3e 2020 2020 2020 2020 4 │ │ │ -000127c0: 682d 2667 743b 7075 7368 5f62 6163 6b28 h->push_back( │ │ │ -000127d0: 664c 2e61 7070 6c79 5f66 5f6f 705f 6728 fL.apply_f_op_g( │ │ │ -000127e0: 2a62 7261 6e63 682c 206f 7029 293b 3c2f *branch, op));.
    4 │ │ │ -00012840: 3135 3c2f 7370 616e 3e20 2020 2020 203c 15 < │ │ │ -00012850: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00012860: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ -00012870: 2f73 7061 6e3e 2055 6e69 7175 6528 6829 /span> Unique(h) │ │ │ -00012880: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ -000128d0: 2020 3431 363c 2f73 7061 6e3e 2020 2020 416 │ │ │ -000128e0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ -00012930: 2020 3431 373c 2f73 7061 6e3e 203c 2f64 417 .
    41 │ │ │ -00012990: 383c 2f73 7061 6e3e 2020 2020 3c73 7061 8 // If second a │ │ │ -000129c0: 7267 756d 656e 7420 6f66 2062 696e 6172 rgument of binar │ │ │ -000129d0: 7920 6f70 2069 7320 4368 6f69 6365 2c20 y op is Choice, │ │ │ -000129e0: 6361 6c6c 2063 6f6e 7374 7275 6374 6f72 call constructor │ │ │ -000129f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ -00012a10: 3c61 2069 643d 226c 3030 3431 3922 206e 419 NodePtr apply_g_op_fC( │ │ │ -00012ac0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const Choice& f │ │ │ -00012af0: 432c 203c 7370 616e 2063 6c61 7373 3d22 C, const Binary& │ │ │ -00012b20: 3b20 6f70 293c 7370 616e 2063 6c61 7373 ; op) cons │ │ │ -00012b40: 7420 6f76 6572 7269 6465 203c 2f73 7061 t override {
    .
    420 │ │ │ -00012bb0: 2020 2020 3c73 7061 6e20 636c 6173 733d auto h = boost: │ │ │ -00012be0: 3a6d 616b 655f 7368 6172 6564 266c 743b :make_shared< │ │ │ -00012bf0: 4368 6f69 6365 2667 743b 2866 432c 202a Choice>(fC, * │ │ │ -00012c00: 3c73 7061 6e20 636c 6173 733d 226b 6579 this, op);
    . │ │ │ -00012c40: 3c61 2069 643d 226c 3030 3432 3122 206e 421 return │ │ │ -00012cb0: 556e 6971 7565 2868 293b 3c2f 6469 763e Unique(h);
    │ │ │ -00012cc0: 0a3c 6469 7620 636c 6173 733d 226c 696e . │ │ │ -00012d20: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -00012d90: 6120 6964 3d22 6c30 3034 3234 2220 6e61 a id="l00424" na │ │ │ -00012da0: 6d65 3d22 6c30 3034 3234 223e 3c2f 613e me="l00424"> │ │ │ -00012db0: 3c73 7061 6e20 636c 6173 733d 226c 696e 424 // If │ │ │ -00012df0: 2073 6563 6f6e 6420 6172 6775 6d65 6e74 second argument │ │ │ -00012e00: 206f 6620 6269 6e61 7279 206f 7020 6973 of binary op is │ │ │ -00012e10: 204c 6561 663c 2f73 7061 6e3e 3c2f 6469 Leaf.
    425 │ │ │ -00012e70: 3c2f 7370 616e 3e20 2020 203c 7370 616e template │ │ │ -00012ea0: 266c 743b 3c73 7061 6e20 636c 6173 733d <typena │ │ │ -00012ec0: 6d65 3c2f 7370 616e 3e20 4f50 2667 743b me OP> │ │ │ -00012ed0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00012f20: 2034 3236 3c2f 7370 616e 3e20 2020 203c 426 < │ │ │ -00012f30: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -00012f40: 5f74 7970 6564 6566 2220 6872 6566 3d22 _typedef" href=" │ │ │ -00012f50: 6130 3237 3936 2e68 746d 6c23 6133 3661 a02796.html#a36a │ │ │ -00012f60: 3938 6636 3162 3062 3764 6630 3432 3432 98f61b0b7df04242 │ │ │ -00012f70: 3762 3133 3262 3331 3364 3766 6422 3e4e 7b132b313d7fd">N │ │ │ -00012f80: 6f64 6550 7472 3c2f 613e 2061 7070 6c79 odePtr apply │ │ │ -00012f90: 5f66 435f 6f70 5f67 4c28 3c73 7061 6e20 _fC_op_gL( │ │ │ -00012fb0: 636f 6e73 743c 2f73 7061 6e3e 204c 6561 const Lea │ │ │ -00012fc0: 6626 616d 703b 2067 4c2c 204f 5020 6f70 f& gL, OP op │ │ │ -00012fd0: 293c 7370 616e 2063 6c61 7373 3d22 6b65 ) const {
    .< │ │ │ -00013010: 6120 6964 3d22 6c30 3034 3237 2220 6e61 a id="l00427" na │ │ │ -00013020: 6d65 3d22 6c30 3034 3237 223e 3c2f 613e me="l00427"> │ │ │ -00013030: 3c73 7061 6e20 636c 6173 733d 226c 696e 427 aut │ │ │ -00013070: 6f3c 2f73 7061 6e3e 2068 203d 2062 6f6f o h = boo │ │ │ -00013080: 7374 3a3a 6d61 6b65 5f73 6861 7265 6426 st::make_shared& │ │ │ -00013090: 6c74 3b43 686f 6963 6526 6774 3b28 6c61 lt;Choice>(la │ │ │ -000130a0: 6265 6c28 292c 206e 7243 686f 6963 6573 bel(), nrChoices │ │ │ -000130b0: 2829 293b 3c2f 6469 763e 0a3c 6469 7620 ());
    .
    428 │ │ │ -00013110: 2020 2020 203c 7370 616e 2063 6c61 7373 f │ │ │ -00013130: 6f72 3c2f 7370 616e 3e20 283c 7370 616e or (auto& │ │ │ -00013160: 3b26 616d 703b 2062 7261 6e63 6820 3a20 ;& branch : │ │ │ -00013170: 6272 616e 6368 6573 5f29 3c2f 6469 763e branches_)
    │ │ │ -00013180: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -000131b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 429 h-& │ │ │ -000131e0: 6774 3b70 7573 685f 6261 636b 2862 7261 gt;push_back(bra │ │ │ -000131f0: 6e63 682d 2667 743b 6170 706c 795f 665f nch->apply_f_ │ │ │ -00013200: 6f70 5f67 2867 4c2c 206f 7029 293b 3c2f op_g(gL, op));.
    4 │ │ │ -00013260: 3330 3c2f 7370 616e 3e20 2020 2020 203c 30 < │ │ │ -00013270: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00013280: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ -00013290: 2f73 7061 6e3e 2055 6e69 7175 6528 6829 /span> Unique(h) │ │ │ -000132a0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ -000132f0: 2020 3433 313c 2f73 7061 6e3e 2020 2020 431 │ │ │ -00013300: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ -00013350: 2020 3433 323c 2f73 7061 6e3e 203c 2f64 432 .
    ..
    │ │ │ -000135e0: 2034 3335 3c2f 7370 616e 3e20 2020 2020 435 │ │ │ -000135f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (label_ == │ │ │ -00013620: 6c61 6265 6c29 203c 7370 616e 2063 6c61 label) return b │ │ │ -00013650: 7261 6e63 6865 735f 5b69 6e64 6578 5d3b ranches_[index]; │ │ │ -00013660: 2020 3c73 7061 6e20 636c 6173 733d 2263 // choos │ │ │ -00013680: 6520 6272 616e 6368 3c2f 7370 616e 3e3c e branch< │ │ │ -00013690: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -000136e0: 3433 363c 2f73 7061 6e3e 203c 2f64 6976 436
    .
    437< │ │ │ -00013740: 2f73 7061 6e3e 2020 2020 2020 3c73 7061 /span> // second case │ │ │ -00013770: 2c20 6e6f 7420 6c61 6265 6c20 6f66 2069 , not label of i │ │ │ -00013780: 6e74 6572 6573 742c 206a 7573 7420 7265 nterest, just re │ │ │ -00013790: 6375 7273 653c 2f73 7061 6e3e 3c2f 6469 curse.
    438 │ │ │ -000137f0: 3c2f 7370 616e 3e20 2020 2020 203c 7370 auto r │ │ │ -00013820: 203d 2062 6f6f 7374 3a3a 6d61 6b65 5f73 = boost::make_s │ │ │ -00013830: 6861 7265 6426 6c74 3b43 686f 6963 6526 hared<Choice& │ │ │ -00013840: 6774 3b28 6c61 6265 6c5f 2c20 6272 616e gt;(label_, bran │ │ │ -00013850: 6368 6573 5f2e 7369 7a65 2829 293b 3c2f ches_.size());.
    4 │ │ │ -000138b0: 3339 3c2f 7370 616e 3e20 2020 2020 203c 39 < │ │ │ -000138c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -000138d0: 6f72 6466 6c6f 7722 3e66 6f72 3c2f 7370 ordflow">for (auto< │ │ │ -00013900: 2f73 7061 6e3e 2661 6d70 3b26 616d 703b /span>&& │ │ │ -00013910: 2062 7261 6e63 6820 3a20 6272 616e 6368 branch : branch │ │ │ -00013920: 6573 5f29 3c2f 6469 763e 0a3c 6469 7620 es_)
    .
    440 │ │ │ -00013980: 2020 2020 2020 2072 2d26 6774 3b70 7573 r->pus │ │ │ -00013990: 685f 6261 636b 2862 7261 6e63 682d 2667 h_back(branch-&g │ │ │ -000139a0: 743b 6368 6f6f 7365 286c 6162 656c 2c20 t;choose(label, │ │ │ -000139b0: 696e 6465 7829 293b 3c2f 6469 763e 0a3c index));
    .< │ │ │ -000139c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -000139d0: 3e3c 6120 6964 3d22 6c30 3034 3431 2220 > 441
    return │ │ │ -00013a40: 2055 6e69 7175 6528 7229 3b3c 2f64 6976 Unique(r);
    .
    442< │ │ │ -00013aa0: 2f73 7061 6e3e 2020 2020 7d3c 2f64 6976 /span> }
    .
    .
    443 .
    4 │ │ │ -00013b60: 3434 3c2f 7370 616e 3e20 2020 3c73 7061 44 private │ │ │ -00013b90: 3a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 :
    .
    │ │ │ -00013be0: 2020 3434 353c 2f73 7061 6e3e 2020 2020 445 │ │ │ -00013bf0: 3c73 7061 6e20 636c 6173 733d 226b 6579 using Base = DecisionT │ │ │ -00013c50: 7265 6526 6c74 3b4c 2c20 5926 6774 3b3a ree<L, Y>: │ │ │ -00013c60: 3a4e 6f64 653c 2f61 3e3b 3c2f 6469 763e :Node;
    │ │ │ -00013c70: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -00013ce0: 6120 6964 3d22 6c30 3034 3438 2220 6e61 a id="l00448" na │ │ │ -00013cf0: 6d65 3d22 6c30 3034 3438 223e 3c2f 613e me="l00448"> │ │ │ -00013d00: 3c73 7061 6e20 636c 6173 733d 226c 696e 448 frien │ │ │ -00013d40: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d c │ │ │ -00013d60: 6c61 7373 203c 2f73 7061 6e3e 3c61 2063 lass boost │ │ │ -00013dc0: 3a3a 7365 7269 616c 697a 6174 696f 6e3a ::serialization: │ │ │ -00013dd0: 3a61 6363 6573 733c 2f61 3e3b 3c2f 6469 :access;.
    449 │ │ │ -00013e30: 3c2f 7370 616e 3e20 2020 203c 7370 616e template │ │ │ -00013e60: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <class │ │ │ -00013e80: 3c2f 7370 616e 3e20 4152 4348 4956 4526 ARCHIVE& │ │ │ -00013e90: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    450 │ │ │ -00013ef0: 2020 3c73 7061 6e20 636c 6173 733d 226b void │ │ │ -00013f10: 3c2f 7370 616e 3e20 7365 7269 616c 697a serializ │ │ │ -00013f20: 6528 4152 4348 4956 4526 616d 703b 2061 e(ARCHIVE& a │ │ │ -00013f30: 722c 203c 7370 616e 2063 6c61 7373 3d22 r, const │ │ │ -00013f70: 756e 7369 676e 6564 3c2f 7370 616e 3e20 unsigned │ │ │ -00013f80: 3c73 7061 6e20 636c 6173 733d 226b 6579 int /*ver │ │ │ -00013fc0: 7369 6f6e 2a2f 3c2f 7370 616e 3e29 207b sion*/) { │ │ │ -00013fd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00014020: 2034 3531 3c2f 7370 616e 3e20 2020 2020 451 │ │ │ -00014030: 2061 7220 2661 6d70 3b20 424f 4f53 545f ar & BOOST_ │ │ │ -00014040: 5345 5249 414c 495a 4154 494f 4e5f 4241 SERIALIZATION_BA │ │ │ -00014050: 5345 5f4f 424a 4543 545f 4e56 5028 4261 SE_OBJECT_NVP(Ba │ │ │ -00014060: 7365 293b 3c2f 6469 763e 0a3c 6469 7620 se);
    .
    452 │ │ │ -000140c0: 2020 2020 2061 7226 616d 703b 2042 4f4f ar& BOO │ │ │ -000140d0: 5354 5f53 4552 4941 4c49 5a41 5449 4f4e ST_SERIALIZATION │ │ │ -000140e0: 5f4e 5650 286c 6162 656c 5f29 3b3c 2f64 _NVP(label_);.
    45 │ │ │ -00014140: 333c 2f73 7061 6e3e 2020 2020 2020 6172 3 ar │ │ │ -00014150: 2661 6d70 3b20 424f 4f53 545f 5345 5249 & BOOST_SERI │ │ │ -00014160: 414c 495a 4154 494f 4e5f 4e56 5028 6272 ALIZATION_NVP(br │ │ │ -00014170: 616e 6368 6573 5f29 3b3c 2f64 6976 3e0a anches_);
    . │ │ │ -00014180: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    455 │ │ │ -00014260: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    456 │ │ │ -000142c0: 207d 3b20 203c 7370 616e 2063 6c61 7373 }; // Ch │ │ │ -000142e0: 6f69 6365 3c2f 7370 616e 3e3c 2f64 6976 oice
    .
    457< │ │ │ -00014340: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ -00014360: 3c61 2069 643d 226c 3030 3435 3822 206e 458 /***** │ │ │ -000143c0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000143d0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000143e0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000143f0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00014400: 2a2a 2a2a 2a2a 2a2f 3c2f 7370 616e 3e3c *******/< │ │ │ -00014410: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00014460: 3435 393c 2f73 7061 6e3e 2020 3c73 7061 459 // DecisionTre │ │ │ -00014490: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .< │ │ │ -000144a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -000144b0: 3e3c 6120 6964 3d22 6c30 3034 3630 2220 > 460 /**** │ │ │ -00014510: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00014520: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00014530: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00014540: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00014550: 2a2a 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e ********/ │ │ │ -00014560: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -000145b0: 2034 3631 3c2f 7370 616e 3e20 203c 7370 461 template<type │ │ │ -00014600: 6e61 6d65 3c2f 7370 616e 3e20 4c2c 203c name L, < │ │ │ -00014610: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00014620: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename Y>
    │ │ │ -00014640: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ -000146d0: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ -000146e0: 7265 663d 2261 3032 3739 362e 6874 6d6c ref="a02796.html │ │ │ -000146f0: 2361 6632 3930 6664 6232 3962 6232 3534 #af290fdb29bb254 │ │ │ -00014700: 6535 3162 6661 3239 3532 3038 3635 3562 e51bfa295208655b │ │ │ -00014710: 6366 223e 2020 3436 323c 2f61 3e3c 2f73 cf"> 462 DecisionT │ │ │ -00014780: 7265 6526 6c74 3b4c 2c20 5926 6774 3b3a ree<L, Y>: │ │ │ -00014790: 3a44 6563 6973 696f 6e54 7265 653c 2f61 :DecisionTree() {
    .
    < │ │ │ -000147e0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -000147f0: 6e6f 223e 2020 3436 333c 2f73 7061 6e3e no"> 463 │ │ │ -00014800: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ -00014810: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -00014880: 6120 6964 3d22 6c30 3034 3635 2220 6e61 a id="l00465" na │ │ │ -00014890: 6d65 3d22 6c30 3034 3635 223e 3c2f 613e me="l00465"> │ │ │ -000148a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 465 templat │ │ │ -000148e0: 653c 2f73 7061 6e3e 266c 743b 3c73 7061 e<typename L, typen │ │ │ -00014930: 616d 653c 2f73 7061 6e3e 2059 2667 743b ame Y> │ │ │ -00014940: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00014990: 2034 3636 3c2f 7370 616e 3e20 203c 6120 466 De │ │ │ -000149f0: 6369 7369 6f6e 5472 6565 266c 743b 4c2c cisionTree<L, │ │ │ -00014a00: 2059 2667 743b 3a3a 4465 6369 7369 6f6e Y>::Decision │ │ │ -00014a10: 5472 6565 3c2f 613e 283c 7370 616e 2063 Tree(c │ │ │ -00014a30: 6f6e 7374 3c2f 7370 616e 3e20 4e6f 6465 onst Node │ │ │ -00014a40: 5074 7226 616d 703b 2072 6f6f 7429 203a Ptr& root) : │ │ │ -00014a50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00014aa0: 2034 3637 3c2f 7370 616e 3e20 2020 2072 467 r │ │ │ -00014ab0: 6f6f 745f 2872 6f6f 7429 207b 3c2f 6469 oot_(root) {.
    468 │ │ │ -00014b10: 3c2f 7370 616e 3e20 207d 3c2f 6469 763e }
    │ │ │ -00014b20: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -00014b90: 6120 6964 3d22 6c30 3034 3730 2220 6e61 a id="l00470" na │ │ │ -00014ba0: 6d65 3d22 6c30 3034 3730 223e 3c2f 613e me="l00470"> │ │ │ -00014bb0: 3c73 7061 6e20 636c 6173 733d 226c 696e 470 /****** │ │ │ -00014bf0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00014c00: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00014c10: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00014c20: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00014c30: 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e 3c2f ******/.
    4 │ │ │ -00014c90: 3731 3c2f 7370 616e 3e20 203c 7370 616e 71 template │ │ │ -00014cc0: 266c 743b 3c73 7061 6e20 636c 6173 733d <typena │ │ │ -00014ce0: 6d65 3c2f 7370 616e 3e20 4c2c 203c 7370 me L, typename Y>
    .< │ │ │ -00014d20: 6469 7620 636c 6173 733d 2266 6f6c 646f div class="foldo │ │ │ -00014d30: 7065 6e22 2069 643d 2266 6f6c 646f 7065 pen" id="foldope │ │ │ -00014d40: 6e30 3034 3732 2220 6461 7461 2d73 7461 n00472" data-sta │ │ │ -00014d50: 7274 3d22 7b22 2064 6174 612d 656e 643d rt="{" data-end= │ │ │ -00014d60: 227d 223e 0a3c 6469 7620 636c 6173 733d "}">.
    472 DecisionTre │ │ │ -00014e60: 6526 6c74 3b4c 2c20 5926 6774 3b3a 3a44 e<L, Y>::D │ │ │ -00014e70: 6563 6973 696f 6e54 7265 653c 2f61 3e28 ecisionTree( │ │ │ -00014e80: 3c73 7061 6e20 636c 6173 733d 226b 6579 const Y& y) {< │ │ │ -00014eb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00014f00: 3437 333c 2f73 7061 6e3e 2020 2020 726f 473 ro │ │ │ -00014f10: 6f74 5f20 3d20 3c61 2063 6c61 7373 3d22 ot_ = NodePtr(new │ │ │ -00014fc0: 4c65 6166 3c2f 613e 2879 2929 3b3c 2f64 Leaf(y));.
    47 │ │ │ -00015020: 343c 2f73 7061 6e3e 2020 7d3c 2f64 6976 4 }
    .
    .
    475 .
    4 │ │ │ -000150e0: 3736 3c2f 7370 616e 3e3c 7370 616e 2063 76 │ │ │ -00015100: 202f 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a /************** │ │ │ -00015110: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00015120: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00015130: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00015140: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2f3c **************/< │ │ │ -00015150: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ -00015170: 6120 6964 3d22 6c30 3034 3737 2220 6e61 a id="l00477" na │ │ │ -00015180: 6d65 3d22 6c30 3034 3737 223e 3c2f 613e me="l00477"> │ │ │ -00015190: 3c73 7061 6e20 636c 6173 733d 226c 696e 477 templat │ │ │ -000151d0: 653c 2f73 7061 6e3e 2026 6c74 3b3c 7370 e <typename
    L, type │ │ │ -00015220: 6e61 6d65 3c2f 7370 616e 3e20 5926 6774 name Y> │ │ │ -00015230: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    . │ │ │ -00015290: 3c61 2069 643d 226c 3030 3437 3822 206e 478 │ │ │ -00015310: 3c2f 613e 3c2f 7370 616e 3e20 203c 6120 De │ │ │ -00015370: 6369 7369 6f6e 5472 6565 266c 743b 4c2c cisionTree<L, │ │ │ -00015380: 2059 2667 743b 3a3a 4465 6369 7369 6f6e Y>::Decision │ │ │ -00015390: 5472 6565 3c2f 613e 283c 7370 616e 2063 Tree(c │ │ │ -000153b0: 6f6e 7374 3c2f 7370 616e 3e20 4c26 616d onst L&am │ │ │ -000153c0: 703b 206c 6162 656c 2c20 3c73 7061 6e20 p; label, │ │ │ -000153e0: 636f 6e73 743c 2f73 7061 6e3e 2059 2661 const Y&a │ │ │ -000153f0: 6d70 3b20 7931 2c20 3c73 7061 6e20 636c mp; y1, co │ │ │ -00015410: 6e73 743c 2f73 7061 6e3e 2059 2661 6d70 nst Y& │ │ │ -00015420: 3b20 7932 2920 7b3c 2f64 6976 3e0a 3c64 ; y2) {
    . │ │ │ -00015440: 3c61 2069 643d 226c 3030 3437 3922 206e 479 auto │ │ │ -000154a0: 3c2f 7370 616e 3e20 6120 3d20 626f 6f73 a = boos │ │ │ -000154b0: 743a 3a6d 616b 655f 7368 6172 6564 266c t::make_shared&l │ │ │ -000154c0: 743b 4368 6f69 6365 2667 743b 286c 6162 t;Choice>(lab │ │ │ -000154d0: 656c 2c20 3229 3b3c 2f64 6976 3e0a 3c64 el, 2);
    . │ │ │ -000154f0: 3c61 2069 643d 226c 3030 3438 3022 206e 480 NodePtr l1(new Leaf(y1)) │ │ │ -000155f0: 2c20 6c32 283c 7370 616e 2063 6c61 7373 , l2(new Leaf(y2)) │ │ │ -00015650: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ -000156a0: 2020 3438 313c 2f73 7061 6e3e 2020 2020 481 │ │ │ -000156b0: 612d 2667 743b 7075 7368 5f62 6163 6b28 a->push_back( │ │ │ -000156c0: 6c31 293b 3c2f 6469 763e 0a3c 6469 7620 l1);
    .
    482 │ │ │ -00015720: 2020 2061 2d26 6774 3b70 7573 685f 6261 a->push_ba │ │ │ -00015730: 636b 286c 3229 3b3c 2f64 6976 3e0a 3c64 ck(l2);
    . │ │ │ -00015750: 3c61 2069 643d 226c 3030 3438 3322 206e 483 root_ = Ch │ │ │ -000157a0: 6f69 6365 3a3a 556e 6971 7565 2861 293b oice::Unique(a); │ │ │ -000157b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00015800: 2034 3834 3c2f 7370 616e 3e20 207d 3c2f 484 }.
    .
    < │ │ │ -00015850: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00015860: 6e6f 223e 2020 3438 353c 2f73 7061 6e3e no"> 485 │ │ │ -00015870: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ -000158c0: 2020 3438 363c 2f73 7061 6e3e 3c73 7061 486 /*********** │ │ │ -000158f0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00015900: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00015910: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00015920: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00015930: 2a2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a */
    . │ │ │ -00015940: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ -00015a60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -00015a90: 3c2f 613e 3c73 7061 6e20 636c 6173 733d │ │ │ -00015af0: 3438 383c 2f61 3e3c 2f73 7061 6e3e 2020 488 │ │ │ -00015b00: 3c61 2063 6c61 7373 3d22 636f 6465 2068 DecisionTree< │ │ │ -00015b60: 3b4c 2c20 5926 6774 3b3a 3a44 6563 6973 ;L, Y>::Decis │ │ │ -00015b70: 696f 6e54 7265 653c 2f61 3e28 3c73 7061 ionTree(const < │ │ │ -00015ba0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -00015bb0: 5f74 7970 6564 6566 2220 6872 6566 3d22 _typedef" href=" │ │ │ -00015bc0: 6130 3237 3936 2e68 746d 6c23 6164 6364 a02796.html#adcd │ │ │ -00015bd0: 6438 3061 6231 6166 3431 3564 3231 3233 d80ab1af415d2123 │ │ │ -00015be0: 3937 6132 3636 3633 3230 6533 3522 3e4c 97a2666320e35">L │ │ │ -00015bf0: 6162 656c 433c 2f61 3e26 616d 703b 206c abelC& l │ │ │ -00015c00: 6162 656c 432c 203c 7370 616e 2063 6c61 abelC, con │ │ │ -00015c20: 7374 3c2f 7370 616e 3e20 5926 616d 703b st Y& │ │ │ -00015c30: 2079 312c 3c2f 6469 763e 0a3c 6469 7620 y1,
    .
    489 │ │ │ -00015c90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -00015ca0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -00015cb0: 2020 3c73 7061 6e20 636c 6173 733d 226b const Y& y2) │ │ │ -00015ce0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ -00015d30: 2020 3439 303c 2f73 7061 6e3e 2020 2020 490 │ │ │ -00015d40: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (labelC.seco │ │ │ -00015d70: 6e64 2021 3d20 3229 203c 7370 616e 2063 nd != 2) throw │ │ │ -00015da0: 7374 643a 3a69 6e76 616c 6964 5f61 7267 std::invalid_arg │ │ │ -00015db0: 756d 656e 7428 3c2f 6469 763e 0a3c 6469 ument(
    .< │ │ │ -00015dd0: 6120 6964 3d22 6c30 3034 3931 2220 6e61 a id="l00491" na │ │ │ -00015de0: 6d65 3d22 6c30 3034 3931 223e 3c2f 613e me="l00491"> │ │ │ -00015df0: 3c73 7061 6e20 636c 6173 733d 226c 696e 491 "Decis │ │ │ -00015e40: 696f 6e54 7265 653a 2062 696e 6172 7920 ionTree: binary │ │ │ -00015e50: 636f 6e73 7472 7563 746f 7220 6361 6c6c constructor call │ │ │ -00015e60: 6564 2077 6974 6820 6e6f 6e2d 6269 6e61 ed with non-bina │ │ │ -00015e70: 7279 206c 6162 656c 2671 756f 743b 3c2f ry label");
    . │ │ │ -00015ea0: 3c61 2069 643d 226c 3030 3439 3222 206e 492 auto │ │ │ -00015f00: 3c2f 7370 616e 3e20 6120 3d20 626f 6f73 a = boos │ │ │ -00015f10: 743a 3a6d 616b 655f 7368 6172 6564 266c t::make_shared&l │ │ │ -00015f20: 743b 4368 6f69 6365 2667 743b 286c 6162 t;Choice>(lab │ │ │ -00015f30: 656c 432e 6669 7273 742c 2032 293b 3c2f elC.first, 2);.
    4 │ │ │ -00015f90: 3933 3c2f 7370 616e 3e20 2020 203c 6120 93 Nod │ │ │ -00015ff0: 6550 7472 3c2f 613e 206c 3128 3c73 7061 ePtr l1(new Leaf(y1)), l2(new Leaf(y2));
    .< │ │ │ -000160c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -000160d0: 3e3c 6120 6964 3d22 6c30 3034 3934 2220 > 494 a->pus │ │ │ -00016120: 685f 6261 636b 286c 3129 3b3c 2f64 6976 h_back(l1);
    .
    495< │ │ │ -00016180: 2f73 7061 6e3e 2020 2020 612d 2667 743b /span> a-> │ │ │ -00016190: 7075 7368 5f62 6163 6b28 6c32 293b 3c2f push_back(l2);.
    4 │ │ │ -000161f0: 3936 3c2f 7370 616e 3e20 2020 2072 6f6f 96 roo │ │ │ -00016200: 745f 203d 2043 686f 6963 653a 3a55 6e69 t_ = Choice::Uni │ │ │ -00016210: 7175 6528 6129 3b3c 2f64 6976 3e0a 3c64 que(a);
    . │ │ │ -00016230: 3c61 2069 643d 226c 3030 3439 3722 206e 497 }
    ..
    498 │ │ │ -000162d0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ -000162e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -000162f0: 3e3c 6120 6964 3d22 6c30 3034 3939 2220 > 499 /**** │ │ │ -00016350: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00016360: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00016370: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00016380: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00016390: 2a2a 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e ********/ │ │ │ -000163a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -000163f0: 2035 3030 3c2f 7370 616e 3e20 203c 7370 500 template<type │ │ │ -00016440: 6e61 6d65 3c2f 7370 616e 3e20 4c2c 203c name L, < │ │ │ -00016450: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00016460: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename Y>
    │ │ │ -00016480: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ -00016510: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ -00016520: 7265 663d 2261 3032 3739 362e 6874 6d6c ref="a02796.html │ │ │ -00016530: 2361 6437 3534 6438 3639 3963 6232 3035 #ad754d8699cb205 │ │ │ -00016540: 3738 3866 3838 3966 3031 3237 3831 6264 788f889f012781bd │ │ │ -00016550: 6332 223e 2020 3530 313c 2f61 3e3c 2f73 c2"> 501 DecisionT │ │ │ -000165c0: 7265 6526 6c74 3b4c 2c20 5926 6774 3b3a ree<L, Y>: │ │ │ -000165d0: 3a44 6563 6973 696f 6e54 7265 653c 2f61 :DecisionTree(const std::vector │ │ │ -00016610: 266c 743b 4c61 6265 6c43 2667 743b 2661 <LabelC>&a │ │ │ -00016620: 6d70 3b20 6c61 6265 6c43 732c 3c2f 6469 mp; labelCs,.
    502 │ │ │ -00016680: 3c2f 7370 616e 3e20 2020 2020 203c 7370 const │ │ │ -000166b0: 7374 643a 3a76 6563 746f 7226 6c74 3b59 std::vector<Y │ │ │ -000166c0: 2667 743b 2661 6d70 3b20 7973 2920 7b3c >& ys) {< │ │ │ -000166d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00016720: 3530 333c 2f73 7061 6e3e 2020 2020 3c73 503 // call recu │ │ │ -00016750: 7273 6976 6520 4372 6561 7465 3c2f 7370 rsive Create
    .
    504 │ │ │ -000167c0: 2020 726f 6f74 5f20 3d20 6372 6561 7465 root_ = create │ │ │ -000167d0: 286c 6162 656c 4373 2e62 6567 696e 2829 (labelCs.begin() │ │ │ -000167e0: 2c20 6c61 6265 6c43 732e 656e 6428 292c , labelCs.end(), │ │ │ -000167f0: 2079 732e 6265 6769 6e28 292c 2079 732e ys.begin(), ys. │ │ │ -00016800: 656e 6428 2929 3b3c 2f64 6976 3e0a 3c64 end());
    . │ │ │ -00016820: 3c61 2069 643d 226c 3030 3530 3522 206e 505 }
    ..
    506 │ │ │ -000168c0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ -000168d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -000168e0: 3e3c 6120 6964 3d22 6c30 3035 3037 2220 > 507 /**** │ │ │ -00016940: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00016950: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00016960: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00016970: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00016980: 2a2a 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e ********/ │ │ │ -00016990: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -000169e0: 2035 3038 3c2f 7370 616e 3e20 203c 7370 508 template<type │ │ │ -00016a30: 6e61 6d65 3c2f 7370 616e 3e20 4c2c 203c name L, < │ │ │ -00016a40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00016a50: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename Y>
    │ │ │ -00016a70: 0a3c 6469 7620 636c 6173 733d 2266 6f6c .
    .
    < │ │ │ -00016b00: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ -00016b10: 7265 663d 2261 3032 3739 362e 6874 6d6c ref="a02796.html │ │ │ -00016b20: 2361 3361 3961 3462 3432 3039 3831 3266 #a3a9a4b4209812f │ │ │ -00016b30: 3037 3163 3132 3235 6439 3534 3266 6134 071c1225d9542fa4 │ │ │ -00016b40: 3433 223e 2020 3530 393c 2f61 3e3c 2f73 43"> 509 DecisionT │ │ │ -00016bb0: 7265 6526 6c74 3b4c 2c20 5926 6774 3b3a ree<L, Y>: │ │ │ -00016bc0: 3a44 6563 6973 696f 6e54 7265 653c 2f61 :DecisionTree(const std::vector │ │ │ -00016c00: 266c 743b 4c61 6265 6c43 2667 743b 2661 <LabelC>&a │ │ │ -00016c10: 6d70 3b20 6c61 6265 6c43 732c 3c2f 6469 mp; labelCs,.
    510 │ │ │ -00016c70: 3c2f 7370 616e 3e20 2020 2020 203c 7370 const │ │ │ -00016ca0: 7374 643a 3a73 7472 696e 6726 616d 703b std::string& │ │ │ -00016cb0: 2074 6162 6c65 2920 7b3c 2f64 6976 3e0a table) {
    . │ │ │ -00016cc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -00016cf0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 511 // │ │ │ -00016d30: 2043 6f6e 7665 7274 2073 7464 3a3a 7374 Convert std::st │ │ │ -00016d40: 7269 6e67 2074 6f20 7661 6c75 6573 206f ring to values o │ │ │ -00016d50: 6620 7479 7065 2059 3c2f 7370 616e 3e3c f type Y< │ │ │ -00016d60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00016db0: 3531 323c 2f73 7061 6e3e 2020 2020 7374 512 st │ │ │ -00016dc0: 643a 3a76 6563 746f 7226 6c74 3b59 2667 d::vector<Y&g │ │ │ -00016dd0: 743b 2079 733b 3c2f 6469 763e 0a3c 6469 t; ys;
    .< │ │ │ -00016df0: 6120 6964 3d22 6c30 3035 3133 2220 6e61 a id="l00513" na │ │ │ -00016e00: 6d65 3d22 6c30 3035 3133 223e 3c2f 613e me="l00513"> │ │ │ -00016e10: 3c73 7061 6e20 636c 6173 733d 226c 696e 513 std::istrin │ │ │ -00016e40: 6773 7472 6561 6d20 6973 7328 7461 626c gstream iss(tabl │ │ │ -00016e50: 6529 3b3c 2f64 6976 3e0a 3c64 6976 2063 e);
    .
    514 │ │ │ -00016eb0: 2020 636f 7079 2873 7464 3a3a 6973 7472 copy(std::istr │ │ │ -00016ec0: 6561 6d5f 6974 6572 6174 6f72 266c 743b eam_iterator< │ │ │ -00016ed0: 5926 6774 3b28 6973 7329 2c20 7374 643a Y>(iss), std: │ │ │ -00016ee0: 3a69 7374 7265 616d 5f69 7465 7261 746f :istream_iterato │ │ │ -00016ef0: 7226 6c74 3b59 2667 743b 2829 2c3c 2f64 r<Y>(),.
    51 │ │ │ -00016f50: 353c 2f73 7061 6e3e 2020 2020 2020 2020 5 │ │ │ -00016f60: 2062 6163 6b5f 696e 7365 7274 6572 2879 back_inserter(y │ │ │ -00016f70: 7329 293b 3c2f 6469 763e 0a3c 6469 7620 s));
    .
    516 │ │ │ -00016fd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00017020: 2035 3137 3c2f 7370 616e 3e20 2020 203c 517 < │ │ │ -00017030: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ -00017040: 656e 7422 3e2f 2f20 6e6f 7720 6361 6c6c ent">// now call │ │ │ -00017050: 2072 6563 7572 7369 7665 2043 7265 6174 recursive Creat │ │ │ -00017060: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .< │ │ │ -00017070: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00017080: 3e3c 6120 6964 3d22 6c30 3035 3138 2220 > 518
    root_ = c │ │ │ -000170d0: 7265 6174 6528 6c61 6265 6c43 732e 6265 reate(labelCs.be │ │ │ -000170e0: 6769 6e28 292c 206c 6162 656c 4373 2e65 gin(), labelCs.e │ │ │ -000170f0: 6e64 2829 2c20 7973 2e62 6567 696e 2829 nd(), ys.begin() │ │ │ -00017100: 2c20 7973 2e65 6e64 2829 293b 3c2f 6469 , ys.end());.
    519 │ │ │ -00017160: 3c2f 7370 616e 3e20 207d 3c2f 6469 763e }
    │ │ │ -00017170: 0a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 .
    .
    │ │ │ -000171c0: 2020 3532 303c 2f73 7061 6e3e 203c 2f64 520 .
    52 │ │ │ -00017220: 313c 2f73 7061 6e3e 3c73 7061 6e20 636c 1 │ │ │ -00017240: 2f2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a /*************** │ │ │ -00017250: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00017260: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00017270: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00017280: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2f 3c2f *************/
    .
    < │ │ │ -000172d0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -000172e0: 6e6f 223e 2020 3532 323c 2f73 7061 6e3e no"> 522 │ │ │ -000172f0: 2020 3c73 7061 6e20 636c 6173 733d 226b template │ │ │ -00017310: 3c2f 7370 616e 3e26 6c74 3b3c 7370 616e <typename │ │ │ -00017340: 204c 2c20 3c73 7061 6e20 636c 6173 733d L, typena │ │ │ -00017360: 6d65 3c2f 7370 616e 3e20 5926 6774 3b3c me Y>< │ │ │ -00017370: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ..
    524 │ │ │ -00017590: 2020 2020 4974 6572 6174 6f72 2062 6567 Iterator beg │ │ │ -000175a0: 696e 2c20 4974 6572 6174 6f72 2065 6e64 in, Iterator end │ │ │ -000175b0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const L& labe │ │ │ -000175e0: 6c29 207b 3c2f 6469 763e 0a3c 6469 7620 l) {
    .
    525 │ │ │ -00017640: 2020 2072 6f6f 745f 203d 2063 6f6d 706f root_ = compo │ │ │ -00017650: 7365 2862 6567 696e 2c20 656e 642c 206c se(begin, end, l │ │ │ -00017660: 6162 656c 293b 3c2f 6469 763e 0a3c 6469 abel);
    .< │ │ │ -00017680: 6120 6964 3d22 6c30 3035 3236 2220 6e61 a id="l00526" na │ │ │ -00017690: 6d65 3d22 6c30 3035 3236 223e 3c2f 613e me="l00526"> │ │ │ -000176a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 526 }
    .
    .
    527< │ │ │ -00017720: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ -00017740: 3c61 2069 643d 226c 3030 3532 3822 206e 528 /***** │ │ │ -000177a0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000177b0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000177c0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000177d0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000177e0: 2a2a 2a2a 2a2a 2a2f 3c2f 7370 616e 3e3c *******/< │ │ │ -000177f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00017840: 3532 393c 2f73 7061 6e3e 2020 3c73 7061 529 template<typen │ │ │ -00017890: 616d 653c 2f73 7061 6e3e 204c 2c20 3c73 ame L, typename Y>
    . │ │ │ -000178d0: 3c64 6976 2063 6c61 7373 3d22 666f 6c64
    .
    530 DecisionTr │ │ │ -00017a10: 6565 266c 743b 4c2c 2059 2667 743b 3a3a ee<L, Y>:: │ │ │ -00017a20: 4465 6369 7369 6f6e 5472 6565 3c2f 613e DecisionTree │ │ │ -00017a30: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (const L& label │ │ │ -00017a60: 2c3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ,
    .
    │ │ │ -00017ab0: 2020 3533 313c 2f73 7061 6e3e 2020 2020 531 │ │ │ -00017ac0: 2020 3c73 7061 6e20 636c 6173 733d 226b const DecisionTree& f0, const Decisi │ │ │ -00017b80: 6f6e 5472 6565 3c2f 613e 2661 6d70 3b20 onTree& │ │ │ -00017b90: 6631 2920 207b 3c2f 6469 763e 0a3c 6469 f1) {
    .< │ │ │ -00017bb0: 6120 6964 3d22 6c30 3035 3332 2220 6e61 a id="l00532" na │ │ │ -00017bc0: 6d65 3d22 6c30 3035 3332 223e 3c2f 613e me="l00532"> │ │ │ -00017bd0: 3c73 7061 6e20 636c 6173 733d 226c 696e 532 const │ │ │ -00017c10: 3c2f 7370 616e 3e20 7374 643a 3a76 6563 std::vec │ │ │ -00017c20: 746f 7226 6c74 3b44 6563 6973 696f 6e54 tor<DecisionT │ │ │ -00017c30: 7265 6526 6774 3b20 6675 6e63 7469 6f6e ree> function │ │ │ -00017c40: 737b 6630 2c20 6631 7d3b 3c2f 6469 763e s{f0, f1};
    │ │ │ -00017c50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -00017c80: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 533 root_ = │ │ │ -00017cb0: 2063 6f6d 706f 7365 2866 756e 6374 696f compose(functio │ │ │ -00017cc0: 6e73 2e62 6567 696e 2829 2c20 6675 6e63 ns.begin(), func │ │ │ -00017cd0: 7469 6f6e 732e 656e 6428 292c 206c 6162 tions.end(), lab │ │ │ -00017ce0: 656c 293b 3c2f 6469 763e 0a3c 6469 7620 el);
    .
    534 │ │ │ -00017d40: 207d 3c2f 6469 763e 0a3c 2f64 6976 3e0a }
    .
    . │ │ │ -00017d50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ -00017de0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00017df0: 6e6f 223e 2020 3533 363c 2f73 7061 6e3e no"> 536 │ │ │ -00017e00: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /******* │ │ │ -00017e20: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00017e30: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00017e40: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00017e50: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00017e60: 2a2a 2a2a 2a2f 3c2f 7370 616e 3e3c 2f64 *****/.
    53 │ │ │ -00017ec0: 373c 2f73 7061 6e3e 2020 3c73 7061 6e20 7 │ │ │ -00017ee0: 7465 6d70 6c61 7465 3c2f 7370 616e 3e20 template │ │ │ -00017ef0: 266c 743b 3c73 7061 6e20 636c 6173 733d <typena │ │ │ -00017f10: 6d65 3c2f 7370 616e 3e20 4c2c 203c 7370 me L, typename Y>
    .< │ │ │ -00017f50: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00017f60: 3e3c 6120 6964 3d22 6c30 3035 3338 2220 > 538 templ │ │ │ -00017fc0: 6174 653c 2f73 7061 6e3e 2026 6c74 3b3c ate << │ │ │ -00017fd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00017fe0: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename
    X, ty │ │ │ -00018010: 7065 6e61 6d65 3c2f 7370 616e 3e20 4675 pename Fu │ │ │ -00018020: 6e63 2667 743b 3c2f 6469 763e 0a3c 6469 nc>
    ...
    < │ │ │ -00018240: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00018250: 6e6f 223e 2020 3534 303c 2f73 7061 6e3e no"> 540 │ │ │ -00018260: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -00018270: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -00018280: 2020 2046 756e 6320 595f 6f66 5f58 2920 Func Y_of_X) │ │ │ -00018290: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ -000182e0: 2020 3534 313c 2f73 7061 6e3e 2020 2020 541 │ │ │ -000182f0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // Define │ │ │ -00018310: 6675 6e63 746f 7220 666f 7220 6964 656e functor for iden │ │ │ -00018320: 7469 7479 206d 6170 7069 6e67 206f 6620 tity mapping of │ │ │ -00018330: 6e6f 6465 206c 6162 656c 2e3c 2f73 7061 node label.
    .
    542 │ │ │ -000183a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 auto L_of_L = [](< │ │ │ -000183d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -000183e0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const L& label) │ │ │ -00018400: 7b20 3c73 7061 6e20 636c 6173 733d 226b { retu │ │ │ -00018420: 726e 3c2f 7370 616e 3e20 6c61 6265 6c3b rn label; │ │ │ -00018430: 207d 3b3c 2f64 6976 3e0a 3c64 6976 2063 };
    .
    543 │ │ │ -00018490: 2020 726f 6f74 5f20 3d20 636f 6e76 6572 root_ = conver │ │ │ -000184a0: 7446 726f 6d26 6c74 3b4c 2c20 5826 6774 tFrom<L, X> │ │ │ -000184b0: 3b28 6f74 6865 722e 3c61 2063 6c61 7373 ;(other.root_, L_of_L, Y_of │ │ │ -00018520: 5f58 293b 3c2f 6469 763e 0a3c 6469 7620 _X);
    .
    544 │ │ │ -00018580: 207d 3c2f 6469 763e 0a3c 2f64 6976 3e0a }
    .
    . │ │ │ -00018590: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ -00018620: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00018630: 6e6f 223e 2020 3534 363c 2f73 7061 6e3e no"> 546 │ │ │ -00018640: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /******* │ │ │ -00018660: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00018670: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00018680: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00018690: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000186a0: 2a2a 2a2a 2a2f 3c2f 7370 616e 3e3c 2f64 *****/.
    54 │ │ │ -00018700: 373c 2f73 7061 6e3e 2020 3c73 7061 6e20 7 │ │ │ -00018720: 7465 6d70 6c61 7465 3c2f 7370 616e 3e20 template │ │ │ -00018730: 266c 743b 3c73 7061 6e20 636c 6173 733d <typena │ │ │ -00018750: 6d65 3c2f 7370 616e 3e20 4c2c 203c 7370 me L, typename Y>
    .< │ │ │ -00018790: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -000187a0: 3e3c 6120 6964 3d22 6c30 3035 3438 2220 > 548 templ │ │ │ -00018800: 6174 653c 2f73 7061 6e3e 2026 6c74 3b3c ate << │ │ │ -00018810: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00018820: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename
    M, ty │ │ │ -00018850: 7065 6e61 6d65 3c2f 7370 616e 3e20 582c pename X, │ │ │ -00018860: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ -00018880: 2f73 7061 6e3e 2046 756e 6326 6774 3b3c /span> Func>< │ │ │ -00018890: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .
    < │ │ │ -00018910: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00018920: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 549 Deci │ │ │ -000189d0: 7369 6f6e 5472 6565 266c 743b 4c2c 2059 sionTree<L, Y │ │ │ -000189e0: 2667 743b 3a3a 4465 6369 7369 6f6e 5472 >::DecisionTr │ │ │ -000189f0: 6565 3c2f 613e 283c 7370 616e 2063 6c61 ee(con │ │ │ -00018a10: 7374 3c2f 7370 616e 3e20 3c61 2063 6c61 st DecisionTr │ │ │ -00018a50: 6565 266c 743b 4d2c 2058 2667 743b 3c2f ee<M, X>& other,.
    5 │ │ │ -00018ac0: 3530 3c2f 7370 616e 3e20 2020 2020 2020 50 │ │ │ -00018ad0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -00018ae0: 2020 2020 2020 2020 2020 2020 3c73 7061 const s │ │ │ -00018b10: 7464 3a3a 6d61 7026 6c74 3b4d 2c20 4c26 td::map<M, L& │ │ │ -00018b20: 6774 3b26 616d 703b 206d 6170 2c20 4675 gt;& map, Fu │ │ │ -00018b30: 6e63 2059 5f6f 665f 5829 207b 3c2f 6469 nc Y_of_X) {.
    551 │ │ │ -00018b90: 3c2f 7370 616e 3e20 2020 203c 7370 616e auto L_o │ │ │ -00018bc0: 665f 4d20 3d20 5b26 616d 703b 6d61 705d f_M = [&map] │ │ │ -00018bd0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (const M& label │ │ │ -00018c00: 2920 2d26 6774 3b20 4c20 7b20 3c73 7061 ) -> L { return map.at(label │ │ │ -00018c40: 293b 207d 3b3c 2f64 6976 3e0a 3c64 6976 ); };
    .
    < │ │ │ -00018c80: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00018c90: 6e6f 223e 2020 3535 323c 2f73 7061 6e3e no"> 552 │ │ │ -00018ca0: 2020 2020 726f 6f74 5f20 3d20 636f 6e76 root_ = conv │ │ │ -00018cb0: 6572 7446 726f 6d26 6c74 3b4d 2c20 5826 ertFrom<M, X& │ │ │ -00018cc0: 6774 3b28 6f74 6865 722e 3c61 2063 6c61 gt;(other.root_ │ │ │ -00018d20: 3c2f 613e 2c20 4c5f 6f66 5f4d 2c20 595f , L_of_M, Y_ │ │ │ -00018d30: 6f66 5f58 293b 3c2f 6469 763e 0a3c 6469 of_X);
    .< │ │ │ -00018d50: 6120 6964 3d22 6c30 3035 3533 2220 6e61 a id="l00553" na │ │ │ -00018d60: 6d65 3d22 6c30 3035 3533 223e 3c2f 613e me="l00553"> │ │ │ -00018d70: 3c73 7061 6e20 636c 6173 733d 226c 696e 553 }
    .
    .
    554< │ │ │ -00018df0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ -00018e10: 3c61 2069 643d 226c 3030 3535 3522 206e 555 /***** │ │ │ -00018e70: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00018e80: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00018e90: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00018ea0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00018eb0: 2a2a 2a2a 2a2a 2a2f 3c2f 7370 616e 3e3c *******/< │ │ │ -00018ec0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00018f10: 3535 363c 2f73 7061 6e3e 2020 3c73 7061 556 // Called by t │ │ │ -00018f40: 776f 2063 6f6e 7374 7275 6374 6f72 7320 wo constructors │ │ │ -00018f50: 6162 6f76 652e 3c2f 7370 616e 3e3c 2f64 above..
    55 │ │ │ -00018fb0: 373c 2f73 7061 6e3e 2020 3c73 7061 6e20 7 │ │ │ -00018fd0: 2f2f 2054 616b 6573 2061 206c 6162 656c // Takes a label │ │ │ -00018fe0: 2061 6e64 2061 2063 6f72 7265 7370 6f6e and a correspon │ │ │ -00018ff0: 6469 6e67 2072 616e 6765 206f 6620 6465 ding range of de │ │ │ -00019000: 6369 7369 6f6e 2074 7265 6573 2c20 616e cision trees, an │ │ │ -00019010: 6420 6372 6561 7465 7320 613c 2f73 7061 d creates a
    .
    558 < │ │ │ -00019080: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ -00019090: 656e 7422 3e2f 2f20 6e65 7720 6465 6369 ent">// new deci │ │ │ -000190a0: 7369 6f6e 2074 7265 652e 2048 6f77 6576 sion tree. Howev │ │ │ -000190b0: 6572 2c20 7468 6520 6f72 6465 7220 6f66 er, the order of │ │ │ -000190c0: 2074 6865 206c 6162 656c 7320 6e65 6564 the labels need │ │ │ -000190d0: 7320 746f 2062 6520 7265 7370 6563 7465 s to be respecte │ │ │ -000190e0: 642c 3c2f 7370 616e 3e3c 2f64 6976 3e0a d,
    . │ │ │ -000190f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -00019120: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 559 // s │ │ │ -00019160: 6f20 7765 2063 616e 6e6f 7420 6a75 7374 o we cannot just │ │ │ -00019170: 2063 7265 6174 6520 6120 726f 6f74 2043 create a root C │ │ │ -00019180: 686f 6963 6520 6e6f 6465 206f 6e20 7468 hoice node on th │ │ │ -00019190: 6520 6c61 6265 6c3a 2069 6620 7468 6520 e label: if the │ │ │ -000191a0: 6c61 6265 6c20 6973 3c2f 7370 616e 3e3c label is< │ │ │ -000191b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00019200: 3536 303c 2f73 7061 6e3e 2020 3c73 7061 560 // not the hig │ │ │ -00019230: 6865 7374 206c 6162 656c 2c20 7765 206e hest label, we n │ │ │ -00019240: 6565 6420 6120 636f 6d70 6c69 6361 7465 eed a complicate │ │ │ -00019250: 642f 2065 7870 656e 7369 7665 2072 6563 d/ expensive rec │ │ │ -00019260: 7572 7369 7665 2063 616c 6c2e 3c2f 7370 ursive call.
    .
    561 │ │ │ -000192d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 template < │ │ │ -00019310: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ -00019320: 4c2c 203c 7370 616e 2063 6c61 7373 3d22 L, typenam │ │ │ -00019340: 653c 2f73 7061 6e3e 2059 2667 743b 3c2f e Y>.
    5 │ │ │ -000193a0: 3632 3c2f 7370 616e 3e20 203c 7370 616e 62 template │ │ │ -000193d0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ -000193f0: 616d 653c 2f73 7061 6e3e 2049 7465 7261 ame Itera │ │ │ -00019400: 746f 7226 6774 3b3c 2f64 6976 3e0a 3c64 tor>
    . │ │ │ -00019420: 3c61 2069 643d 226c 3030 3536 3322 206e 563 typena │ │ │ -00019480: 6d65 3c2f 7370 616e 3e20 3c61 2063 6c61 me Decisi │ │ │ -000194e0: 6f6e 5472 6565 266c 743b 4c2c 2059 2667 onTree<L, Y&g │ │ │ -000194f0: 743b 3a3a 4e6f 6465 5074 723c 2f61 3e20 t;::NodePtr │ │ │ -00019500: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Deci │ │ │ -00019530: 7369 6f6e 5472 6565 266c 743b 4c2c 2059 sionTree<L, Y │ │ │ -00019540: 2667 743b 3a3a 636f 6d70 6f73 653c 2f61 >::compose(
    .
    564 │ │ │ -000195b0: 2020 2049 7465 7261 746f 7220 6265 6769 Iterator begi │ │ │ -000195c0: 6e2c 2049 7465 7261 746f 7220 656e 642c n, Iterator end, │ │ │ -000195d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const L& label │ │ │ -00019600: 293c 7370 616e 2063 6c61 7373 3d22 6b65 ) const {
    .< │ │ │ -00019640: 6120 6964 3d22 6c30 3035 3635 2220 6e61 a id="l00565" na │ │ │ -00019650: 6d65 3d22 6c30 3035 3635 223e 3c2f 613e me="l00565"> │ │ │ -00019660: 3c73 7061 6e20 636c 6173 733d 226c 696e 565 // fi │ │ │ -000196a0: 6e64 2068 6967 6865 7374 206c 6162 656c nd highest label │ │ │ -000196b0: 2061 6d6f 6e67 2062 7261 6e63 6865 733c among branches< │ │ │ -000196c0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ -000196e0: 6120 6964 3d22 6c30 3035 3636 2220 6e61 a id="l00566" na │ │ │ -000196f0: 6d65 3d22 6c30 3035 3636 223e 3c2f 613e me="l00566"> │ │ │ -00019700: 3c73 7061 6e20 636c 6173 733d 226c 696e 566 boost::opti │ │ │ -00019730: 6f6e 616c 266c 743b 4c26 6774 3b20 6869 onal<L> hi │ │ │ -00019740: 6768 6573 744c 6162 656c 3b3c 2f64 6976 ghestLabel;
    .
    567< │ │ │ -000197a0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> size_t nrChoices = 0; │ │ │ -000197e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00019830: 2035 3638 3c2f 7370 616e 3e20 2020 203c 568 < │ │ │ -00019840: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00019850: 6f72 6466 6c6f 7722 3e66 6f72 3c2f 7370 ordflow">for (Iterator it │ │ │ -00019870: 203d 2062 6567 696e 3b20 6974 2021 3d20 = begin; it != │ │ │ -00019880: 656e 643b 2069 742b 2b29 207b 3c2f 6469 end; it++) {.
    569 │ │ │ -000198e0: 3c2f 7370 616e 3e20 2020 2020 203c 7370 if │ │ │ -00019910: 2028 6974 2d26 6774 3b72 6f6f 745f 2d26 (it->root_-& │ │ │ -00019920: 6774 3b69 734c 6561 6628 2929 3c2f 6469 gt;isLeaf()).
    570 │ │ │ -00019980: 3c2f 7370 616e 3e20 2020 2020 2020 203c < │ │ │ -00019990: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -000199a0: 6f72 6466 6c6f 7722 3e63 6f6e 7469 6e75 ordflow">continu │ │ │ -000199b0: 653c 2f73 7061 6e3e 3b3c 2f64 6976 3e0a e;
    . │ │ │ -000199c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    572 │ │ │ -00019aa0: 2020 2020 2020 2020 626f 6f73 743a 3a64 boost::d │ │ │ -00019ab0: 796e 616d 6963 5f70 6f69 6e74 6572 5f63 ynamic_pointer_c │ │ │ -00019ac0: 6173 7426 6c74 3b63 6f6e 7374 2043 686f ast<const Cho │ │ │ -00019ad0: 6963 6526 6774 3b28 6974 2d26 6774 3b72 ice>(it->r │ │ │ -00019ae0: 6f6f 745f 293b 3c2f 6469 763e 0a3c 6469 oot_);
    .< │ │ │ -00019b00: 6120 6964 3d22 6c30 3035 3733 2220 6e61 a id="l00573" na │ │ │ -00019b10: 6d65 3d22 6c30 3035 3733 223e 3c2f 613e me="l00573"> │ │ │ -00019b20: 3c73 7061 6e20 636c 6173 733d 226c 696e 573 if (!hig │ │ │ -00019b70: 6865 7374 4c61 6265 6c20 7c7c 2063 2d26 hestLabel || c-& │ │ │ -00019b80: 6774 3b6c 6162 656c 2829 2026 6774 3b20 gt;label() > │ │ │ -00019b90: 2a68 6967 6865 7374 4c61 6265 6c29 207b *highestLabel) { │ │ │ -00019ba0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00019bf0: 2035 3734 3c2f 7370 616e 3e20 2020 2020 574 │ │ │ -00019c00: 2020 2068 6967 6865 7374 4c61 6265 6c2e highestLabel. │ │ │ -00019c10: 7265 7365 7428 632d 2667 743b 6c61 6265 reset(c->labe │ │ │ -00019c20: 6c28 2929 3b3c 2f64 6976 3e0a 3c64 6976 l());
    .
    < │ │ │ -00019c60: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00019c70: 6e6f 223e 2020 3537 353c 2f73 7061 6e3e no"> 575 │ │ │ -00019c80: 2020 2020 2020 2020 6e72 4368 6f69 6365 nrChoice │ │ │ -00019c90: 7320 3d20 632d 2667 743b 6e72 4368 6f69 s = c->nrChoi │ │ │ -00019ca0: 6365 7328 293b 3c2f 6469 763e 0a3c 6469 ces();
    .< │ │ │ -00019cc0: 6120 6964 3d22 6c30 3035 3736 2220 6e61 a id="l00576" na │ │ │ -00019cd0: 6d65 3d22 6c30 3035 3736 223e 3c2f 613e me="l00576"> │ │ │ -00019ce0: 3c73 7061 6e20 636c 6173 733d 226c 696e 576 }
    .< │ │ │ -00019d10: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00019d20: 3e3c 6120 6964 3d22 6c30 3035 3737 2220 > 577 }
    .< │ │ │ -00019d70: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00019d80: 3e3c 6120 6964 3d22 6c30 3035 3738 2220 > 578
    .
    579 │ │ │ -00019e20: 2020 203c 7370 616e 2063 6c61 7373 3d22 // if l │ │ │ -00019e40: 6162 656c 2069 7320 616c 7265 6164 7920 abel is already │ │ │ -00019e50: 696e 2063 6f72 7265 6374 206f 7264 6572 in correct order │ │ │ -00019e60: 2c20 6a75 7374 2070 7574 2074 6f67 6574 , just put toget │ │ │ -00019e70: 6865 7220 6120 6368 6f69 6365 206f 6e20 her a choice on │ │ │ -00019e80: 6c61 6265 6c3c 2f73 7061 6e3e 3c2f 6469 label.
    580 │ │ │ -00019ee0: 3c2f 7370 616e 3e20 2020 203c 7370 616e if ( │ │ │ -00019f10: 216e 7243 686f 6963 6573 207c 7c20 2168 !nrChoices || !h │ │ │ -00019f20: 6967 6865 7374 4c61 6265 6c20 7c7c 206c ighestLabel || l │ │ │ -00019f30: 6162 656c 2026 6774 3b20 2a68 6967 6865 abel > *highe │ │ │ -00019f40: 7374 4c61 6265 6c29 207b 3c2f 6469 763e stLabel) {
    │ │ │ -00019f50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -00019f80: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 581 auto cho │ │ │ -00019fd0: 6963 654f 6e4c 6162 656c 203d 2062 6f6f iceOnLabel = boo │ │ │ -00019fe0: 7374 3a3a 6d61 6b65 5f73 6861 7265 6426 st::make_shared& │ │ │ -00019ff0: 6c74 3b43 686f 6963 6526 6774 3b28 6c61 lt;Choice>(la │ │ │ -0001a000: 6265 6c2c 2065 6e64 202d 2062 6567 696e bel, end - begin │ │ │ -0001a010: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    582 │ │ │ -0001a070: 2020 203c 7370 616e 2063 6c61 7373 3d22 for │ │ │ -0001a090: 3c2f 7370 616e 3e20 2849 7465 7261 746f (Iterato │ │ │ -0001a0a0: 7220 6974 203d 2062 6567 696e 3b20 6974 r it = begin; it │ │ │ -0001a0b0: 2021 3d20 656e 643b 2069 742b 2b29 3c2f != end; it++).
    5 │ │ │ -0001a110: 3833 3c2f 7370 616e 3e20 2020 2020 2020 83 │ │ │ -0001a120: 2063 686f 6963 654f 6e4c 6162 656c 2d26 choiceOnLabel-& │ │ │ -0001a130: 6774 3b70 7573 685f 6261 636b 2869 742d gt;push_back(it- │ │ │ -0001a140: 2667 743b 726f 6f74 5f29 3b3c 2f64 6976 >root_);
    .
    584< │ │ │ -0001a1a0: 2f73 7061 6e3e 2020 2020 2020 3c73 7061 /span> return Choice::Uniq │ │ │ -0001a1e0: 7565 2863 686f 6963 654f 6e4c 6162 656c ue(choiceOnLabel │ │ │ -0001a1f0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    585 │ │ │ -0001a250: 207d 203c 7370 616e 2063 6c61 7373 3d22 } els │ │ │ -0001a270: 653c 2f73 7061 6e3e 207b 3c2f 6469 763e e {
    │ │ │ -0001a280: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -0001a2b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 586 // Set up a new │ │ │ -0001a300: 2063 686f 6963 6520 6f6e 2074 6865 2068 choice on the h │ │ │ -0001a310: 6967 6865 7374 206c 6162 656c 3c2f 7370 ighest label
    .
    587 │ │ │ -0001a380: 2020 2020 3c73 7061 6e20 636c 6173 733d auto choiceOnHi │ │ │ -0001a3b0: 6768 6573 744c 6162 656c 203d 3c2f 6469 ghestLabel =.
    588 │ │ │ -0001a410: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ -0001a420: 2062 6f6f 7374 3a3a 6d61 6b65 5f73 6861 boost::make_sha │ │ │ -0001a430: 7265 6426 6c74 3b43 686f 6963 6526 6774 red<Choice> │ │ │ -0001a440: 3b28 2a68 6967 6865 7374 4c61 6265 6c2c ;(*highestLabel, │ │ │ -0001a450: 206e 7243 686f 6963 6573 293b 3c2f 6469 nrChoices);.
    589 │ │ │ -0001a4b0: 3c2f 7370 616e 3e20 2020 2020 203c 7370 // now, for a │ │ │ -0001a4e0: 6c6c 2070 6f73 7369 626c 6520 7661 6c75 ll possible valu │ │ │ -0001a4f0: 6573 206f 6620 6869 6768 6573 744c 6162 es of highestLab │ │ │ -0001a500: 656c 3c2f 7370 616e 3e3c 2f64 6976 3e0a el
    . │ │ │ -0001a510: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    591 │ │ │ -0001a640: 2020 2020 2020 3c73 7061 6e20 636c 6173 // m │ │ │ -0001a660: 616b 6520 6120 6e65 7720 7365 7420 6f66 ake a new set of │ │ │ -0001a670: 2066 756e 6374 696f 6e73 2066 6f72 2063 functions for c │ │ │ -0001a680: 6f6d 706f 7369 6e67 2062 7920 6974 6572 omposing by iter │ │ │ -0001a690: 6174 696e 6720 6f76 6572 2074 6865 2067 ating over the g │ │ │ -0001a6a0: 6976 656e 3c2f 7370 616e 3e3c 2f64 6976 iven
    .
    592< │ │ │ -0001a700: 2f73 7061 6e3e 2020 2020 2020 2020 3c73 /span> // functions │ │ │ -0001a730: 2c20 616e 6420 7365 6c65 6374 696e 6720 , and selecting │ │ │ -0001a740: 7468 6520 6170 7072 6f70 7269 6174 6520 the appropriate │ │ │ -0001a750: 6272 616e 6368 2e3c 2f73 7061 6e3e 3c2f branch..
    5 │ │ │ -0001a7b0: 3933 3c2f 7370 616e 3e20 2020 2020 2020 93 │ │ │ -0001a7c0: 2073 7464 3a3a 7665 6374 6f72 266c 743b std::vector< │ │ │ -0001a7d0: 4465 6369 7369 6f6e 5472 6565 2667 743b DecisionTree> │ │ │ -0001a7e0: 2066 756e 6374 696f 6e73 3b3c 2f64 6976 functions;
    .
    594< │ │ │ -0001a840: 2f73 7061 6e3e 2020 2020 2020 2020 3c73 /span> for (Iterator it │ │ │ -0001a880: 3d20 6265 6769 6e3b 2069 7420 213d 2065 = begin; it != e │ │ │ -0001a890: 6e64 3b20 6974 2b2b 2920 7b3c 2f64 6976 nd; it++) {
    .
    595< │ │ │ -0001a8f0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ -0001a900: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // by rest │ │ │ -0001a920: 7269 6374 696e 6720 7468 6520 696e 7075 ricting the inpu │ │ │ -0001a930: 7420 6675 6e63 7469 6f6e 7320 746f 2076 t functions to v │ │ │ -0001a940: 616c 7565 2069 2066 6f72 206c 6162 656c alue i for label │ │ │ -0001a950: 4265 6c6f 773c 2f73 7061 6e3e 3c2f 6469 Below.
    596 │ │ │ -0001a9b0: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ -0001a9c0: 2044 6563 6973 696f 6e54 7265 6520 6368 DecisionTree ch │ │ │ -0001a9d0: 6f73 656e 203d 2069 742d 2667 743b 6368 osen = it->ch │ │ │ -0001a9e0: 6f6f 7365 282a 6869 6768 6573 744c 6162 oose(*highestLab │ │ │ -0001a9f0: 656c 2c20 696e 6465 7829 3b3c 2f64 6976 el, index);
    .
    597< │ │ │ -0001aa50: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ -0001aa60: 6675 6e63 7469 6f6e 732e 7075 7368 5f62 functions.push_b │ │ │ -0001aa70: 6163 6b28 6368 6f73 656e 293b 3c2f 6469 ack(chosen);.
    598 │ │ │ -0001aad0: 3c2f 7370 616e 3e20 2020 2020 2020 207d } │ │ │ -0001aae0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -0001ab30: 2035 3939 3c2f 7370 616e 3e20 2020 2020 599 │ │ │ -0001ab40: 2020 203c 7370 616e 2063 6c61 7373 3d22 // We t │ │ │ -0001ab60: 6865 6e20 7265 6375 7273 652c 2066 6f72 hen recurse, for │ │ │ -0001ab70: 2061 6c6c 2076 616c 7565 7320 6f66 2074 all values of t │ │ │ -0001ab80: 6865 2068 6967 6865 7374 206c 6162 656c he highest label │ │ │ -0001ab90: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ -0001abb0: 3c61 2069 643d 226c 3030 3630 3022 206e 600 NodePt │ │ │ -0001ac00: 7220 6669 203d 2063 6f6d 706f 7365 2866 r fi = compose(f │ │ │ -0001ac10: 756e 6374 696f 6e73 2e62 6567 696e 2829 unctions.begin() │ │ │ -0001ac20: 2c20 6675 6e63 7469 6f6e 732e 656e 6428 , functions.end( │ │ │ -0001ac30: 292c 206c 6162 656c 293b 3c2f 6469 763e ), label);
    │ │ │ -0001ac40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -0001ac70: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 601 cho │ │ │ -0001aca0: 6963 654f 6e48 6967 6865 7374 4c61 6265 iceOnHighestLabe │ │ │ -0001acb0: 6c2d 2667 743b 7075 7368 5f62 6163 6b28 l->push_back( │ │ │ -0001acc0: 6669 293b 3c2f 6469 763e 0a3c 6469 7620 fi);
    .
    602 │ │ │ -0001ad20: 2020 2020 207d 3c2f 6469 763e 0a3c 6469 }
    .< │ │ │ -0001ad40: 6120 6964 3d22 6c30 3036 3033 2220 6e61 a id="l00603" na │ │ │ -0001ad50: 6d65 3d22 6c30 3036 3033 223e 3c2f 613e me="l00603"> │ │ │ -0001ad60: 3c73 7061 6e20 636c 6173 733d 226c 696e 603 return C │ │ │ -0001adb0: 686f 6963 653a 3a55 6e69 7175 6528 6368 hoice::Unique(ch │ │ │ -0001adc0: 6f69 6365 4f6e 4869 6768 6573 744c 6162 oiceOnHighestLab │ │ │ -0001add0: 656c 293b 3c2f 6469 763e 0a3c 6469 7620 el);
    .
    604 │ │ │ -0001ae30: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    605 │ │ │ -0001ae90: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    606 .
    6 │ │ │ -0001af40: 3037 3c2f 7370 616e 3e3c 7370 616e 2063 07 │ │ │ -0001af60: 202f 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a /************** │ │ │ -0001af70: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -0001af80: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -0001af90: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -0001afa0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2f3c **************/< │ │ │ -0001afb0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ -0001afd0: 6120 6964 3d22 6c30 3036 3038 2220 6e61 a id="l00608" na │ │ │ -0001afe0: 6d65 3d22 6c30 3036 3038 223e 3c2f 613e me="l00608"> │ │ │ -0001aff0: 3c73 7061 6e20 636c 6173 733d 226c 696e 608 // &quo │ │ │ -0001b030: 743b 6372 6561 7465 2671 756f 743b 2069 t;create" i │ │ │ -0001b040: 7320 6120 6269 7420 6f66 2061 2063 6f6d s a bit of a com │ │ │ -0001b050: 706c 6963 6174 6564 2074 6869 6e67 2c20 plicated thing, │ │ │ -0001b060: 6275 7420 7665 7279 2075 7365 6675 6c2e but very useful. │ │ │ -0001b070: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ -0001b090: 3c61 2069 643d 226c 3030 3630 3922 206e 609 // It │ │ │ -0001b0f0: 7461 6b65 7320 6120 7261 6e67 6520 6f66 takes a range of │ │ │ -0001b100: 206c 6162 656c 7320 616e 6420 6120 636f labels and a co │ │ │ -0001b110: 7272 6573 706f 6e64 696e 6720 7261 6e67 rresponding rang │ │ │ -0001b120: 6520 6f66 2076 616c 7565 732c 3c2f 7370 e of values,
    .
    610 │ │ │ -0001b190: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // and cre │ │ │ -0001b1b0: 6174 6573 2061 2064 6563 6973 696f 6e20 ates a decision │ │ │ -0001b1c0: 7472 6565 2c20 6173 2066 6f6c 6c6f 7773 tree, as follows │ │ │ -0001b1d0: 3a3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c :
    .< │ │ │ -0001b1e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0001b1f0: 3e3c 6120 6964 3d22 6c30 3036 3131 2220 > 611 // - │ │ │ -0001b250: 6966 2074 6865 7265 2069 7320 6f6e 6c79 if there is only │ │ │ -0001b260: 206f 6e65 206c 6162 656c 2c20 6372 6561 one label, crea │ │ │ -0001b270: 7465 7320 6120 6368 6f69 6365 206e 6f64 tes a choice nod │ │ │ -0001b280: 6520 7769 7468 2076 616c 7565 7320 696e e with values in │ │ │ -0001b290: 206c 6561 7665 733c 2f73 7061 6e3e 3c2f leaves.
    6 │ │ │ -0001b2f0: 3132 3c2f 7370 616e 3e20 203c 7370 616e 12 // - otherwise, │ │ │ -0001b320: 2069 7420 6576 656e 6c79 2073 706c 6974 it evenly split │ │ │ -0001b330: 7320 7570 2074 6865 2072 616e 6765 206f s up the range o │ │ │ -0001b340: 6620 7661 6c75 6573 2061 6e64 2063 7265 f values and cre │ │ │ -0001b350: 6174 6573 2061 2074 7265 6520 666f 723c ates a tree for< │ │ │ -0001b360: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ -0001b380: 6120 6964 3d22 6c30 3036 3133 2220 6e61 a id="l00613" na │ │ │ -0001b390: 6d65 3d22 6c30 3036 3133 223e 3c2f 613e me="l00613"> │ │ │ -0001b3a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 613 // ea │ │ │ -0001b3e0: 6368 2073 7562 2d72 616e 6765 2c20 616e ch sub-range, an │ │ │ -0001b3f0: 6420 6173 7369 676e 7320 7468 6174 2074 d assigns that t │ │ │ -0001b400: 7265 6520 746f 2066 6972 7374 206c 6162 ree to first lab │ │ │ -0001b410: 656c 2623 3339 3b73 2063 686f 6963 6573 el's choices │ │ │ -0001b420: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ -0001b440: 3c61 2069 643d 226c 3030 3631 3422 206e 614 // Exa │ │ │ -0001b4a0: 6d70 6c65 3a3c 2f73 7061 6e3e 3c2f 6469 mple:.
    615 │ │ │ -0001b500: 3c2f 7370 616e 3e20 203c 7370 616e 2063 / │ │ │ -0001b520: 2f20 6372 6561 7465 285b 4220 415d 2c5b / create([B A],[ │ │ │ -0001b530: 3120 3220 3320 345d 2920 776f 756c 6420 1 2 3 4]) would │ │ │ -0001b540: 6361 6c6c 3c2f 7370 616e 3e3c 2f64 6976 call
    .
    616< │ │ │ -0001b5a0: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> // │ │ │ -0001b5c0: 2020 2063 7265 6174 6528 5b41 5d2c 5b31 create([A],[1 │ │ │ -0001b5d0: 2032 5d29 3c2f 7370 616e 3e3c 2f64 6976 2])
    .
    617< │ │ │ -0001b630: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> // │ │ │ -0001b650: 2020 2063 7265 6174 6528 5b41 5d2c 5b33 create([A],[3 │ │ │ -0001b660: 2034 5d29 3c2f 7370 616e 3e3c 2f64 6976 4])
    .
    618< │ │ │ -0001b6c0: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> // │ │ │ -0001b6e0: 2061 6e64 2070 726f 6475 6365 3c2f 7370 and produce
    .
    619 │ │ │ -0001b750: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // B=0
    .
    620 │ │ │ -0001b7d0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // A=0: 1 │ │ │ -0001b7f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ -0001b810: 3c61 2069 643d 226c 3030 3632 3122 206e 621 // A= │ │ │ -0001b870: 313a 2032 3c2f 7370 616e 3e3c 2f64 6976 1: 2
    .
    622< │ │ │ -0001b8d0: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> // │ │ │ -0001b8f0: 2042 3d31 3c2f 7370 616e 3e3c 2f64 6976 B=1
    .
    623< │ │ │ -0001b950: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> // │ │ │ -0001b970: 2020 413d 303a 2033 3c2f 7370 616e 3e3c A=0: 3< │ │ │ -0001b980: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -0001b9d0: 3632 343c 2f73 7061 6e3e 2020 3c73 7061 624 // A=1: 4
    .
    625 │ │ │ -0001ba60: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // Note, t │ │ │ -0001ba80: 6872 6f75 6768 2074 6865 206d 6167 6963 hrough the magic │ │ │ -0001ba90: 206f 6620 2671 756f 743b 636f 6d70 6f73 of "compos │ │ │ -0001baa0: 6526 7175 6f74 3b2c 2063 7265 6174 6528 e", create( │ │ │ -0001bab0: 5b41 2042 5d2c 5b31 2033 2032 2034 5d29 [A B],[1 3 2 4]) │ │ │ -0001bac0: 2077 696c 6c20 7072 6f64 7563 653c 2f73 will produce
    .
    626 │ │ │ -0001bb30: 203c 7370 616e 2063 6c61 7373 3d22 636f // exactl │ │ │ -0001bb50: 7920 7468 6520 7361 6d65 2074 7265 6520 y the same tree │ │ │ -0001bb60: 6173 2061 626f 7665 3a20 7468 6520 6869 as above: the hi │ │ │ -0001bb70: 6768 6573 7420 6c61 6265 6c20 6973 2061 ghest label is a │ │ │ -0001bb80: 6c77 6179 7320 7468 6520 726f 6f74 2e3c lways the root.< │ │ │ -0001bb90: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ -0001bbb0: 6120 6964 3d22 6c30 3036 3237 2220 6e61 a id="l00627" na │ │ │ -0001bbc0: 6d65 3d22 6c30 3036 3237 223e 3c2f 613e me="l00627"> │ │ │ -0001bbd0: 3c73 7061 6e20 636c 6173 733d 226c 696e 627 // Howe │ │ │ -0001bc10: 7665 722c 2069 7420 7769 6c6c 2062 6520 ver, it will be │ │ │ -0001bc20: 2a77 6179 2a20 6661 7374 6572 2069 6620 *way* faster if │ │ │ -0001bc30: 6c61 6265 6c73 2061 7265 2067 6976 656e labels are given │ │ │ -0001bc40: 2068 6967 6865 7374 2074 6f20 6c6f 7765 highest to lowe │ │ │ -0001bc50: 7374 2e3c 2f73 7061 6e3e 3c2f 6469 763e st.
    │ │ │ -0001bc60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -0001bc90: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 628 tem │ │ │ -0001bcd0: 706c 6174 653c 2f73 7061 6e3e 266c 743b plate< │ │ │ -0001bce0: 3c73 7061 6e20 636c 6173 733d 226b 6579 typename L, t │ │ │ -0001bd20: 7970 656e 616d 653c 2f73 7061 6e3e 2059 ypename Y │ │ │ -0001bd30: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    629 │ │ │ -0001bd90: 203c 7370 616e 2063 6c61 7373 3d22 6b65 template< │ │ │ -0001bdb0: 2f73 7061 6e3e 266c 743b 3c73 7061 6e20 /span>< │ │ │ -0001bdd0: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ -0001bde0: 4974 2c20 3c73 7061 6e20 636c 6173 733d It, typena │ │ │ -0001be00: 6d65 3c2f 7370 616e 3e20 5661 6c75 6549 me ValueI │ │ │ -0001be10: 7426 6774 3b3c 2f64 6976 3e0a 3c64 6976 t>
    .
    ..
    631 │ │ │ -0001c070: 2020 2020 4974 2062 6567 696e 2c20 4974 It begin, It │ │ │ -0001c080: 2065 6e64 2c20 5661 6c75 6549 7420 6265 end, ValueIt be │ │ │ -0001c090: 6769 6e59 2c20 5661 6c75 6549 7420 656e ginY, ValueIt en │ │ │ -0001c0a0: 6459 293c 7370 616e 2063 6c61 7373 3d22 dY) const │ │ │ -0001c0c0: 3c2f 7370 616e 3e7b 3c2f 6469 763e 0a3c {
    .< │ │ │ -0001c0d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0001c0e0: 3e3c 6120 6964 3d22 6c30 3036 3332 2220 > 632 // │ │ │ -0001c140: 6765 7420 6372 7563 6961 6c20 636f 756e get crucial coun │ │ │ -0001c150: 7473 3c2f 7370 616e 3e3c 2f64 6976 3e0a ts
    . │ │ │ -0001c160: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -0001c190: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 633 size_t │ │ │ -0001c1e0: 6e72 4368 6f69 6365 7320 3d20 6265 6769 nrChoices = begi │ │ │ -0001c1f0: 6e2d 2667 743b 7365 636f 6e64 3b3c 2f64 n->second;.
    63 │ │ │ -0001c250: 343c 2f73 7061 6e3e 2020 2020 3c73 7061 4 size_t size = endY │ │ │ -0001c290: 2d20 6265 6769 6e59 3b3c 2f64 6976 3e0a - beginY;
    . │ │ │ -0001c2a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ -0001c330: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -0001c340: 6e6f 223e 2020 3633 363c 2f73 7061 6e3e no"> 636 │ │ │ -0001c350: 2020 2020 3c73 7061 6e20 636c 6173 733d // Fin │ │ │ -0001c370: 6420 7468 6520 6e65 7874 206b 6579 2074 d the next key t │ │ │ -0001c380: 6f20 776f 726b 206f 6e3c 2f73 7061 6e3e o work on │ │ │ -0001c390: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -0001c3e0: 2036 3337 3c2f 7370 616e 3e20 2020 2049 637 I │ │ │ -0001c3f0: 7420 6c61 6265 6c43 203d 2062 6567 696e t labelC = begin │ │ │ -0001c400: 202b 2031 3b3c 2f64 6976 3e0a 3c64 6976 + 1;
    .
    < │ │ │ -0001c440: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -0001c450: 6e6f 223e 2020 3633 383c 2f73 7061 6e3e no"> 638 │ │ │ -0001c460: 2020 2020 3c73 7061 6e20 636c 6173 733d if │ │ │ -0001c480: 3c2f 7370 616e 3e20 286c 6162 656c 4320 (labelC │ │ │ -0001c490: 3d3d 2065 6e64 2920 7b3c 2f64 6976 3e0a == end) {
    . │ │ │ -0001c4a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ -0001c550: 6120 6964 3d22 6c30 3036 3430 2220 6e61 a id="l00640" na │ │ │ -0001c560: 6d65 3d22 6c30 3036 3430 223e 3c2f 613e me="l00640"> │ │ │ -0001c570: 3c73 7061 6e20 636c 6173 733d 226c 696e 640 // │ │ │ -0001c5b0: 4372 6561 7465 2061 2073 696d 706c 6520 Create a simple │ │ │ -0001c5c0: 6368 6f69 6365 206e 6f64 6520 7769 7468 choice node with │ │ │ -0001c5d0: 2076 616c 7565 7320 6173 206c 6561 7665 values as leave │ │ │ -0001c5e0: 732e 3c2f 7370 616e 3e3c 2f64 6976 3e0a s.
    . │ │ │ -0001c5f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    642 │ │ │ -0001c6e0: 2020 2020 2020 7374 643a 3a63 6f75 7420 std::cout │ │ │ -0001c6f0: 266c 743b 266c 743b 203c 7370 616e 2063 << "Tryin │ │ │ -0001c720: 6720 746f 2063 7265 6174 6520 4444 206f g to create DD o │ │ │ -0001c730: 6e20 2671 756f 743b 3c2f 7370 616e 3e20 n " │ │ │ -0001c740: 266c 743b 266c 743b 2062 6567 696e 2d26 << begin-& │ │ │ -0001c750: 6774 3b66 6972 7374 2026 6c74 3b26 6c74 gt;first << │ │ │ -0001c760: 3b20 7374 643a 3a65 6e64 6c3b 3c2f 6469 ; std::endl;.
    643 │ │ │ -0001c7c0: 3c2f 7370 616e 3e20 2020 2020 2020 2073 s │ │ │ -0001c7d0: 7464 3a3a 636f 7574 2026 6c74 3b26 6c74 td::cout << │ │ │ -0001c7e0: 3b20 626f 6f73 743a 3a66 6f72 6d61 7428 ; boost::format( │ │ │ -0001c7f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -0001c840: 2036 3434 3c2f 7370 616e 3e20 2020 2020 644 │ │ │ -0001c850: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0001c860: 2020 2020 3c73 7061 6e20 636c 6173 733d │ │ │ -0001c880: 2671 756f 743b 4465 6369 7369 6f6e 5472 "DecisionTr │ │ │ -0001c890: 6565 3a3a 6372 6561 7465 3a20 6578 7065 ee::create: expe │ │ │ -0001c8a0: 6374 6564 2025 6420 7661 6c75 6573 2062 cted %d values b │ │ │ -0001c8b0: 7574 2067 6f74 2025 6420 2671 756f 743b ut got %d " │ │ │ -0001c8c0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ -0001c8e0: 3c61 2069 643d 226c 3030 3634 3522 206e 645 │ │ │ -0001c930: 2020 2020 2020 2020 2020 203c 7370 616e "ins │ │ │ -0001c960: 7465 6164 2671 756f 743b 3c2f 7370 616e tead") %
    .
    646 │ │ │ -0001c9d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0001c9e0: 2020 2020 2020 2020 6e72 4368 6f69 6365 nrChoice │ │ │ -0001c9f0: 7320 2520 7369 7a65 3c2f 6469 763e 0a3c s % size
    .< │ │ │ -0001ca00: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0001ca10: 3e3c 6120 6964 3d22 6c30 3036 3437 2220 > 647 │ │ │ -0001ca60: 2020 2020 2026 6c74 3b26 6c74 3b20 7374 << st │ │ │ -0001ca70: 643a 3a65 6e64 6c3b 3c2f 6469 763e 0a3c d::endl;
    .< │ │ │ -0001ca80: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0001ca90: 3e3c 6120 6964 3d22 6c30 3036 3438 2220 > 648 throw std::invalid_a │ │ │ -0001cb10: 7267 756d 656e 7428 3c73 7061 6e20 636c rgument("Decisi │ │ │ -0001cb40: 6f6e 5472 6565 3a3a 6372 6561 7465 2069 onTree::create i │ │ │ -0001cb50: 6e76 616c 6964 2061 7267 756d 656e 7426 nvalid argument& │ │ │ -0001cb60: 7175 6f74 3b3c 2f73 7061 6e3e 293b 3c2f quot;);.
    6 │ │ │ -0001cbc0: 3439 3c2f 7370 616e 3e20 2020 2020 207d 49 } │ │ │ -0001cbd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -0001cc20: 2036 3530 3c2f 7370 616e 3e20 2020 2020 650 │ │ │ -0001cc30: 203c 7370 616e 2063 6c61 7373 3d22 6b65 auto choice = boos │ │ │ -0001cc60: 743a 3a6d 616b 655f 7368 6172 6564 266c t::make_shared&l │ │ │ -0001cc70: 743b 4368 6f69 6365 2667 743b 2862 6567 t;Choice>(beg │ │ │ -0001cc80: 696e 2d26 6774 3b66 6972 7374 2c20 656e in->first, en │ │ │ -0001cc90: 6459 202d 2062 6567 696e 5929 3b3c 2f64 dY - beginY);.
    65 │ │ │ -0001ccf0: 313c 2f73 7061 6e3e 2020 2020 2020 3c73 1 for (ValueIt y = │ │ │ -0001cd30: 6265 6769 6e59 3b20 7920 213d 2065 6e64 beginY; y != end │ │ │ -0001cd40: 593b 2079 2b2b 293c 2f64 6976 3e0a 3c64 Y; y++)
    . │ │ │ -0001cd60: 3c61 2069 643d 226c 3030 3635 3222 206e 652 choice │ │ │ -0001cdb0: 2d26 6774 3b70 7573 685f 6261 636b 283c ->push_back(< │ │ │ -0001cdc0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -0001cdd0: 5f74 7970 6564 6566 2220 6872 6566 3d22 _typedef" href=" │ │ │ -0001cde0: 6130 3237 3936 2e68 746d 6c23 6133 3661 a02796.html#a36a │ │ │ -0001cdf0: 3938 6636 3162 3062 3764 6630 3432 3432 98f61b0b7df04242 │ │ │ -0001ce00: 3762 3133 3262 3331 3364 3766 6422 3e4e 7b132b313d7fd">N │ │ │ -0001ce10: 6f64 6550 7472 3c2f 613e 283c 7370 616e odePtr(new Leaf(*y)));
    .< │ │ │ -0001ce80: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0001ce90: 3e3c 6120 6964 3d22 6c30 3036 3533 2220 > 653 return │ │ │ -0001cf00: 2043 686f 6963 653a 3a55 6e69 7175 6528 Choice::Unique( │ │ │ -0001cf10: 6368 6f69 6365 293b 3c2f 6469 763e 0a3c choice);
    .< │ │ │ -0001cf20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0001cf30: 3e3c 6120 6964 3d22 6c30 3036 3534 2220 > 654 }
    .< │ │ │ -0001cf80: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0001cf90: 3e3c 6120 6964 3d22 6c30 3036 3535 2220 > 655
    .
    656 │ │ │ -0001d030: 2020 203c 7370 616e 2063 6c61 7373 3d22 // Recu │ │ │ -0001d050: 7273 6976 6520 6361 7365 3a20 7065 7266 rsive case: perf │ │ │ -0001d060: 6f72 6d20 2671 756f 743b 5368 616e 6e6f orm "Shanno │ │ │ -0001d070: 6e20 6578 7061 6e73 696f 6e26 7175 6f74 n expansion" │ │ │ -0001d080: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .< │ │ │ -0001d090: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0001d0a0: 3e3c 6120 6964 3d22 6c30 3036 3537 2220 > 657 // │ │ │ -0001d100: 4372 6561 7465 7320 6f6e 6520 7472 6565 Creates one tree │ │ │ -0001d110: 2028 692e 652e 2c66 756e 6374 696f 6e29 (i.e.,function) │ │ │ -0001d120: 2066 6f72 2065 6163 6820 6368 6f69 6365 for each choice │ │ │ -0001d130: 206f 6620 6375 7272 656e 7420 6b65 793c of current key< │ │ │ -0001d140: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ -0001d160: 6120 6964 3d22 6c30 3036 3538 2220 6e61 a id="l00658" na │ │ │ -0001d170: 6d65 3d22 6c30 3036 3538 223e 3c2f 613e me="l00658"> │ │ │ -0001d180: 3c73 7061 6e20 636c 6173 733d 226c 696e 658 // by │ │ │ -0001d1c0: 2063 616c 6c69 6e67 2063 7265 6174 6520 calling create │ │ │ -0001d1d0: 7265 6375 7273 6976 656c 792c 2061 6e64 recursively, and │ │ │ -0001d1e0: 2074 6865 6e20 7075 7473 2074 6865 6d20 then puts them │ │ │ -0001d1f0: 616c 6c20 746f 6765 7468 6572 2e3c 2f73 all together.
    .
    659 │ │ │ -0001d260: 2020 2073 7464 3a3a 7665 6374 6f72 266c std::vector&l │ │ │ -0001d270: 743b 4465 6369 7369 6f6e 5472 6565 2667 t;DecisionTree&g │ │ │ -0001d280: 743b 2066 756e 6374 696f 6e73 3b3c 2f64 t; functions;.
    66 │ │ │ -0001d2e0: 303c 2f73 7061 6e3e 2020 2020 3c73 7061 0 size_t split = │ │ │ -0001d370: 2073 697a 6520 2f20 6e72 4368 6f69 6365 size / nrChoice │ │ │ -0001d380: 733b 3c2f 6469 763e 0a3c 6469 7620 636c s;
    .
    661 │ │ │ -0001d3e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 for (size_t i │ │ │ -0001d430: 203d 2030 3b20 6920 266c 743b 206e 7243 = 0; i < nrC │ │ │ -0001d440: 686f 6963 6573 3b20 692b 2b2c 2062 6567 hoices; i++, beg │ │ │ -0001d450: 696e 5920 2b3d 203c 6120 636c 6173 733d inY += split) {
    .
    662 │ │ │ -0001d510: 2020 2020 203c 6120 636c 6173 733d 2263 NodePtr │ │ │ -0001d570: 2066 203d 2063 7265 6174 6526 6c74 3b49 f = create<I │ │ │ -0001d580: 742c 2056 616c 7565 4974 2667 743b 286c t, ValueIt>(l │ │ │ -0001d590: 6162 656c 432c 2065 6e64 2c20 6265 6769 abelC, end, begi │ │ │ -0001d5a0: 6e59 2c20 6265 6769 6e59 202b 203c 6120 nY, beginY + sp │ │ │ -0001d600: 6c69 743c 2f61 3e29 3b3c 2f64 6976 3e0a lit);
    . │ │ │ -0001d610: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    664 │ │ │ -0001d6e0: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    665 │ │ │ -0001d740: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ -0001d760: 7572 6e3c 2f73 7061 6e3e 2063 6f6d 706f urn compo │ │ │ -0001d770: 7365 2866 756e 6374 696f 6e73 2e62 6567 se(functions.beg │ │ │ -0001d780: 696e 2829 2c20 6675 6e63 7469 6f6e 732e in(), functions. │ │ │ -0001d790: 656e 6428 292c 2062 6567 696e 2d26 6774 end(), begin-> │ │ │ -0001d7a0: 3b66 6972 7374 293b 3c2f 6469 763e 0a3c ;first);
    .< │ │ │ -0001d7b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0001d7c0: 3e3c 6120 6964 3d22 6c30 3036 3636 2220 > 666 }
    ..
    66 │ │ │ -0001d860: 373c 2f73 7061 6e3e 203c 2f64 6976 3e0a 7
    . │ │ │ -0001d870: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ -0001d980: 2020 3636 393c 2f73 7061 6e3e 2020 3c73 669 template <ty │ │ │ -0001d9d0: 7065 6e61 6d65 3c2f 7370 616e 3e20 4c2c pename L, │ │ │ -0001d9e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typename< │ │ │ -0001da00: 2f73 7061 6e3e 2059 2667 743b 3c2f 6469 /span> Y>.
    670 │ │ │ -0001da60: 3c2f 7370 616e 3e20 203c 7370 616e 2063 t │ │ │ -0001da80: 656d 706c 6174 653c 2f73 7061 6e3e 2026 emplate & │ │ │ -0001da90: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;typenam │ │ │ -0001dab0: 653c 2f73 7061 6e3e 204d 2c20 3c73 7061 e M, typename X>
    ..
    671 typenam │ │ │ -0001dbf0: 653c 2f73 7061 6e3e 203c 6120 636c 6173 e Decisio │ │ │ -0001dc50: 6e54 7265 6526 6c74 3b4c 2c20 5926 6774 nTree<L, Y> │ │ │ -0001dc60: 3b3a 3a4e 6f64 6550 7472 3c2f 613e 203c ;::NodePtr < │ │ │ -0001dc70: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -0001dc80: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ -0001dc90: 2261 3032 3739 362e 6874 6d6c 2361 3134 "a02796.html#a14 │ │ │ -0001dca0: 3936 3661 3365 3231 6334 3239 3063 3430 966a3e21c4290c40 │ │ │ -0001dcb0: 6133 3338 3833 3133 3437 3862 6638 223e a3388313478bf8"> │ │ │ -0001dcc0: 4465 6369 7369 6f6e 5472 6565 266c 743b DecisionTree< │ │ │ -0001dcd0: 4c2c 2059 2667 743b 3a3a 636f 6e76 6572 L, Y>::conver │ │ │ -0001dce0: 7446 726f 6d3c 2f61 3e28 3c2f 6469 763e tFrom(
    │ │ │ -0001dcf0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    │ │ │ -0001de60: 2020 3637 333c 2f73 7061 6e3e 2020 2020 673 │ │ │ -0001de70: 2020 7374 643a 3a66 756e 6374 696f 6e26 std::function& │ │ │ -0001de80: 6c74 3b4c 283c 7370 616e 2063 6c61 7373 lt;L(const │ │ │ -0001dea0: 3c2f 7370 616e 3e20 4d26 616d 703b 2926 M&)& │ │ │ -0001deb0: 6774 3b20 4c5f 6f66 5f4d 2c3c 2f64 6976 gt; L_of_M,
    .
    674< │ │ │ -0001df10: 2f73 7061 6e3e 2020 2020 2020 7374 643a /span> std: │ │ │ -0001df20: 3a66 756e 6374 696f 6e26 6c74 3b59 283c :function<Y(< │ │ │ -0001df30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -0001df40: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const X&)> Y_ │ │ │ -0001df60: 6f66 5f58 293c 7370 616e 2063 6c61 7373 of_X) cons │ │ │ -0001df80: 7420 3c2f 7370 616e 3e7b 3c2f 6469 763e t {
    │ │ │ -0001df90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -0001dfc0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 675 u │ │ │ -0001e000: 7369 6e67 203c 2f73 7061 6e3e 4c59 203d sing LY = │ │ │ -0001e010: 203c 6120 636c 6173 733d 2263 6f64 6520 Dec │ │ │ -0001e040: 6973 696f 6e54 7265 6526 6c74 3b4c 2c20 isionTree<L, │ │ │ -0001e050: 5926 6774 3b3c 2f61 3e3b 3c2f 6469 763e Y>;
    │ │ │ -0001e060: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -0001e0d0: 6120 6964 3d22 6c30 3036 3737 2220 6e61 a id="l00677" na │ │ │ -0001e0e0: 6d65 3d22 6c30 3036 3737 223e 3c2f 613e me="l00677"> │ │ │ -0001e0f0: 3c73 7061 6e20 636c 6173 733d 226c 696e 677 // Ug │ │ │ -0001e130: 6c69 6e65 7373 2062 656c 6f77 2062 6563 liness below bec │ │ │ -0001e140: 6175 7365 2061 7070 6172 656e 746c 7920 ause apparently │ │ │ -0001e150: 7765 2063 616e 2623 3339 3b74 2068 6176 we can't hav │ │ │ -0001e160: 6520 7465 6d70 6c61 7465 6420 7669 7274 e templated virt │ │ │ -0001e170: 7561 6c3c 2f73 7061 6e3e 3c2f 6469 763e ual
    │ │ │ -0001e180: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -0001e1b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 678 / │ │ │ -0001e1f0: 2f20 6675 6e63 7469 6f6e 732e 3c2f 7370 / functions.
    .
    679 │ │ │ -0001e260: 2020 3c73 7061 6e20 636c 6173 733d 2263 // If le │ │ │ -0001e280: 6166 2c20 6170 706c 7920 756e 6172 7920 af, apply unary │ │ │ -0001e290: 636f 6e76 6572 7369 6f6e 2026 7175 6f74 conversion " │ │ │ -0001e2a0: 3b6f 7026 7175 6f74 3b20 616e 6420 6372 ;op" and cr │ │ │ -0001e2b0: 6561 7465 2061 2075 6e69 7175 6520 6c65 eate a unique le │ │ │ -0001e2c0: 6166 2e3c 2f73 7061 6e3e 3c2f 6469 763e af.
    │ │ │ -0001e2d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -0001e300: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 680 u │ │ │ -0001e340: 7369 6e67 203c 2f73 7061 6e3e 4d58 4c65 sing MXLe │ │ │ -0001e350: 6166 203d 203c 7370 616e 2063 6c61 7373 af = typen │ │ │ -0001e370: 616d 653c 2f73 7061 6e3e 203c 6120 636c ame Decision │ │ │ -0001e3b0: 5472 6565 266c 743b 4d2c 2058 2667 743b Tree<M, X> │ │ │ -0001e3c0: 3a3a 4c65 6166 3c2f 613e 3b3c 2f64 6976 ::Leaf;
    .
    681< │ │ │ -0001e420: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> if (< │ │ │ -0001e450: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -0001e460: 6f72 6422 3e61 7574 6f3c 2f73 7061 6e3e ord">auto │ │ │ -0001e470: 206c 6561 6620 3d20 626f 6f73 743a 3a64 leaf = boost::d │ │ │ -0001e480: 796e 616d 6963 5f70 6f69 6e74 6572 5f63 ynamic_pointer_c │ │ │ -0001e490: 6173 7426 6c74 3b63 6f6e 7374 204d 584c ast<const MXL │ │ │ -0001e4a0: 6561 6626 6774 3b28 6629 2920 7b3c 2f64 eaf>(f)) {.
    68 │ │ │ -0001e500: 323c 2f73 7061 6e3e 2020 2020 2020 3c73 2 return NodePtr(new │ │ │ -0001e5e0: 4c65 6166 3c2f 613e 2859 5f6f 665f 5828 Leaf(Y_of_X( │ │ │ -0001e5f0: 6c65 6166 2d26 6774 3b63 6f6e 7374 616e leaf->constan │ │ │ -0001e600: 7428 2929 2c20 6c65 6166 2d26 6774 3b6e t()), leaf->n │ │ │ -0001e610: 7241 7373 6967 6e6d 656e 7473 2829 2929 rAssignments())) │ │ │ -0001e620: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ -0001e670: 2020 3638 333c 2f73 7061 6e3e 2020 2020 683 │ │ │ -0001e680: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ -0001e6d0: 2020 3638 343c 2f73 7061 6e3e 203c 2f64 684 .
    68 │ │ │ -0001e730: 353c 2f73 7061 6e3e 2020 2020 3c73 7061 5 // Check if Ch │ │ │ -0001e760: 6f69 6365 3c2f 7370 616e 3e3c 2f64 6976 oice
    .
    686< │ │ │ -0001e7c0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ -0001e7e0: 7573 696e 6720 3c2f 7370 616e 3e4d 5843 using MXC │ │ │ -0001e7f0: 686f 6963 6520 3d20 3c73 7061 6e20 636c hoice = ty │ │ │ -0001e810: 7065 6e61 6d65 3c2f 7370 616e 3e20 3c61 pename Decis │ │ │ -0001e850: 696f 6e54 7265 6526 6c74 3b4d 2c20 5826 ionTree<M, X& │ │ │ -0001e860: 6774 3b3a 3a43 686f 6963 653c 2f61 3e3b gt;::Choice; │ │ │ -0001e870: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -0001e8c0: 2036 3837 3c2f 7370 616e 3e20 2020 203c 687 < │ │ │ -0001e8d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -0001e8e0: 6f72 6422 3e61 7574 6f3c 2f73 7061 6e3e ord">auto │ │ │ -0001e8f0: 2063 686f 6963 6520 3d20 626f 6f73 743a choice = boost: │ │ │ -0001e900: 3a64 796e 616d 6963 5f70 6f69 6e74 6572 :dynamic_pointer │ │ │ -0001e910: 5f63 6173 7426 6c74 3b63 6f6e 7374 204d _cast<const M │ │ │ -0001e920: 5843 686f 6963 6526 6774 3b28 6629 3b3c XChoice>(f);< │ │ │ -0001e930: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -0001e980: 3638 383c 2f73 7061 6e3e 2020 2020 3c73 688 if (!choice) throw std::invalid_ │ │ │ -0001e9f0: 6172 6775 6d65 6e74 283c 2f64 6976 3e0a argument(
    . │ │ │ -0001ea00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . │ │ │ -0001ead0: 3c61 2069 643d 226c 3030 3639 3022 206e 690
    .
    691 │ │ │ -0001eb70: 2020 3c73 7061 6e20 636c 6173 733d 2263 // get n │ │ │ -0001eb90: 6577 206c 6162 656c 3c2f 7370 616e 3e3c ew label< │ │ │ -0001eba0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -0001ebf0: 3639 323c 2f73 7061 6e3e 2020 2020 3c73 692 const │ │ │ -0001ec20: 204d 206f 6c64 4c61 6265 6c20 3d20 6368 M oldLabel = ch │ │ │ -0001ec30: 6f69 6365 2d26 6774 3b6c 6162 656c 2829 oice->label() │ │ │ -0001ec40: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ -0001ec90: 2020 3639 333c 2f73 7061 6e3e 2020 2020 693 │ │ │ -0001eca0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const L newLabel = │ │ │ -0001ecd0: 4c5f 6f66 5f4d 286f 6c64 4c61 6265 6c29 L_of_M(oldLabel) │ │ │ -0001ece0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ -0001ed30: 2020 3639 343c 2f73 7061 6e3e 203c 2f64 694 .
    69 │ │ │ -0001ed90: 353c 2f73 7061 6e3e 2020 2020 3c73 7061 5 // put togethe │ │ │ -0001edc0: 7220 7669 6120 5368 616e 6e6f 6e20 6578 r via Shannon ex │ │ │ -0001edd0: 7061 6e73 696f 6e20 6f74 6865 7277 6973 pansion otherwis │ │ │ -0001ede0: 6520 6e6f 7420 736f 7274 6564 2e3c 2f73 e not sorted.
    .
    696 │ │ │ -0001ee50: 2020 2073 7464 3a3a 7665 6374 6f72 266c std::vector&l │ │ │ -0001ee60: 743b 4c59 2667 743b 2066 756e 6374 696f t;LY> functio │ │ │ -0001ee70: 6e73 3b3c 2f64 6976 3e0a 3c64 6976 2063 ns;
    .
    697 │ │ │ -0001eed0: 2020 3c73 7061 6e20 636c 6173 733d 226b for< │ │ │ -0001eef0: 2f73 7061 6e3e 2028 3c73 7061 6e20 636c /span> (au │ │ │ -0001ef10: 746f 3c2f 7370 616e 3e26 616d 703b 2661 to&&a │ │ │ -0001ef20: 6d70 3b20 6272 616e 6368 203a 2063 686f mp; branch : cho │ │ │ -0001ef30: 6963 652d 2667 743b 6272 616e 6368 6573 ice->branches │ │ │ -0001ef40: 2829 2920 7b3c 2f64 6976 3e0a 3c64 6976 ()) {
    .
    < │ │ │ -0001ef80: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -0001ef90: 6e6f 223e 2020 3639 383c 2f73 7061 6e3e no"> 698 │ │ │ -0001efa0: 2020 2020 2020 6675 6e63 7469 6f6e 732e functions. │ │ │ -0001efb0: 656d 706c 6163 655f 6261 636b 2863 6f6e emplace_back(con │ │ │ -0001efc0: 7665 7274 4672 6f6d 266c 743b 4d2c 2058 vertFrom<M, X │ │ │ -0001efd0: 2667 743b 2862 7261 6e63 682c 204c 5f6f >(branch, L_o │ │ │ -0001efe0: 665f 4d2c 2059 5f6f 665f 5829 293b 3c2f f_M, Y_of_X));.
    6 │ │ │ -0001f040: 3939 3c2f 7370 616e 3e20 2020 207d 3c2f 99 }.
    7 │ │ │ -0001f0a0: 3030 3c2f 7370 616e 3e20 2020 203c 7370 00 return LY::compose │ │ │ -0001f0e0: 2866 756e 6374 696f 6e73 2e62 6567 696e (functions.begin │ │ │ -0001f0f0: 2829 2c20 6675 6e63 7469 6f6e 732e 656e (), functions.en │ │ │ -0001f100: 6428 292c 206e 6577 4c61 6265 6c29 3b3c d(), newLabel);< │ │ │ -0001f110: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -0001f160: 3730 313c 2f73 7061 6e3e 2020 7d3c 2f64 701 }.
    .
    702 │ │ │ -0001f1d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -0001f220: 2037 3033 3c2f 7370 616e 3e3c 7370 616e 703 /************ │ │ │ -0001f250: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -0001f260: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -0001f270: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -0001f280: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -0001f290: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .< │ │ │ -0001f2a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0001f2b0: 3e3c 6120 6964 3d22 6c30 3037 3134 2220 > 714 templ │ │ │ -0001f310: 6174 653c 2f73 7061 6e3e 2026 6c74 3b3c ate << │ │ │ -0001f320: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -0001f330: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename
    L, ty │ │ │ -0001f360: 7065 6e61 6d65 3c2f 7370 616e 3e20 5926 pename Y& │ │ │ -0001f370: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    │ │ │ -0001f3c0: 0a3c 6469 7620 636c 6173 733d 226c 696e . │ │ │ -0001f4a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -0001f4d0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 716 u │ │ │ -0001f510: 7369 6e67 203c 2f73 7061 6e3e 4620 3d20 sing F = │ │ │ -0001f520: 7374 643a 3a66 756e 6374 696f 6e26 6c74 std::function< │ │ │ -0001f530: 3b76 6f69 6428 3c73 7061 6e20 636c 6173 ;void(cons │ │ │ -0001f550: 743c 2f73 7061 6e3e 2059 2661 6d70 3b29 t Y&) │ │ │ -0001f560: 2667 743b 3b3c 2f64 6976 3e0a 3c64 6976 >;
    .
    < │ │ │ -0001f5a0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -0001f5b0: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 717 explicit Visit(F │ │ │ -0001f690: 3c61 2063 6c61 7373 3d22 636f 6465 2068 f) : f │ │ │ -0001f740: 283c 6120 636c 6173 733d 2263 6f64 6520 (f) {} .
    .
    718 F f │ │ │ -0001f8e0: 3c2f 613e 3b20 2020 2020 2020 2020 2020 ; │ │ │ -0001f8f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0001f900: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -0001f950: 2037 3139 3c2f 7370 616e 3e20 3c2f 6469 719 .
    .
    721< │ │ │ -0001fa40: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> void │ │ │ -0001fa70: 3c61 2063 6c61 7373 3d22 636f 6465 2068 operator()( │ │ │ -0001fad0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const typenam │ │ │ -0001fb10: 653c 2f73 7061 6e3e 203c 6120 636c 6173 e Decisio │ │ │ -0001fb70: 6e54 7265 6526 6c74 3b4c 2c20 5926 6774 nTree<L, Y> │ │ │ -0001fb80: 3b3a 3a4e 6f64 6550 7472 3c2f 613e 2661 ;::NodePtr&a │ │ │ -0001fb90: 6d70 3b20 6e6f 6465 293c 7370 616e 2063 mp; node) │ │ │ -0001fbb0: 636f 6e73 7420 3c2f 7370 616e 3e7b 3c2f const {.
    7 │ │ │ -0001fc10: 3232 3c2f 7370 616e 3e20 2020 2020 203c 22 < │ │ │ -0001fc20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -0001fc30: 6f72 6422 3e75 7369 6e67 203c 2f73 7061 ord">using Leaf = t │ │ │ -0001fc60: 7970 656e 616d 653c 2f73 7061 6e3e 203c ypename < │ │ │ -0001fc70: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -0001fc80: 5f73 7472 7563 7422 2068 7265 663d 2261 _struct" href="a │ │ │ -0001fc90: 3032 3737 362e 6874 6d6c 223e 4465 6369 02776.html">Deci │ │ │ -0001fca0: 7369 6f6e 5472 6565 266c 743b 4c2c 2059 sionTree<L, Y │ │ │ -0001fcb0: 2667 743b 3a3a 4c65 6166 3c2f 613e 3b3c >::Leaf;< │ │ │ -0001fcc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -0001fd10: 3732 333c 2f73 7061 6e3e 2020 2020 2020 723 │ │ │ -0001fd20: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (auto< │ │ │ -0001fd60: 2f73 7061 6e3e 206c 6561 6620 3d20 626f /span> leaf = bo │ │ │ -0001fd70: 6f73 743a 3a64 796e 616d 6963 5f70 6f69 ost::dynamic_poi │ │ │ -0001fd80: 6e74 6572 5f63 6173 7426 6c74 3b63 6f6e nter_cast<con │ │ │ -0001fd90: 7374 204c 6561 6626 6774 3b28 6e6f 6465 st Leaf>(node │ │ │ -0001fda0: 2929 3c2f 6469 763e 0a3c 6469 7620 636c ))
    .
    724 │ │ │ -0001fe00: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ -0001fe20: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn f< │ │ │ -0001fe80: 2f61 3e28 6c65 6166 2d26 6774 3b63 6f6e /a>(leaf->con │ │ │ -0001fe90: 7374 616e 7428 2929 3b3c 2f64 6976 3e0a stant());
    . │ │ │ -0001fea0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ -0001ff30: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -0001ff40: 6e6f 223e 2020 3732 363c 2f73 7061 6e3e no"> 726 │ │ │ -0001ff50: 2020 2020 2020 3c73 7061 6e20 636c 6173 usin │ │ │ -0001ff70: 6720 3c2f 7370 616e 3e43 686f 6963 6520 g Choice │ │ │ -0001ff80: 3d20 3c73 7061 6e20 636c 6173 733d 226b = typename │ │ │ -0001ffa0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 DecisionTre │ │ │ -0001ffe0: 6526 6c74 3b4c 2c20 5926 6774 3b3a 3a43 e<L, Y>::C │ │ │ -0001fff0: 686f 6963 653c 2f61 3e3b 3c2f 6469 763e hoice;
    │ │ │ -00020000: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -00020030: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 727 auto cho │ │ │ -00020080: 6963 6520 3d20 626f 6f73 743a 3a64 796e ice = boost::dyn │ │ │ -00020090: 616d 6963 5f70 6f69 6e74 6572 5f63 6173 amic_pointer_cas │ │ │ -000200a0: 7426 6c74 3b63 6f6e 7374 2043 686f 6963 t<const Choic │ │ │ -000200b0: 6526 6774 3b28 6e6f 6465 293b 3c2f 6469 e>(node);.
    728 │ │ │ -00020110: 3c2f 7370 616e 3e20 2020 2020 203c 7370 if │ │ │ -00020140: 2028 2163 686f 6963 6529 3c2f 6469 763e (!choice)
    │ │ │ -00020150: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -00020180: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 729 throw std::invalid │ │ │ -000201e0: 5f61 7267 756d 656e 7428 3c73 7061 6e20 _argument("Deci │ │ │ -00020210: 7369 6f6e 5472 6565 3a3a 5669 7369 743a sionTree::Visit: │ │ │ -00020220: 2049 6e76 616c 6964 204e 6f64 6550 7472 Invalid NodePtr │ │ │ -00020230: 2671 756f 743b 3c2f 7370 616e 3e29 3b3c ");< │ │ │ -00020240: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00020290: 3733 303c 2f73 7061 6e3e 2020 2020 2020 730 │ │ │ -000202a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 for (auto │ │ │ -000202e0: 3c2f 7370 616e 3e26 616d 703b 2661 6d70 && │ │ │ -000202f0: 3b20 6272 616e 6368 203a 2063 686f 6963 ; branch : choic │ │ │ -00020300: 652d 2667 743b 6272 616e 6368 6573 2829 e->branches() │ │ │ -00020310: 2920 282a 3c73 7061 6e20 636c 6173 733d ) (*this)(branch); │ │ │ -00020340: 203c 7370 616e 2063 6c61 7373 3d22 636f // recurs │ │ │ -00020360: 6521 3c2f 7370 616e 3e3c 2f64 6976 3e0a e!
    . │ │ │ -00020370: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ -000203d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00020420: 2037 3332 3c2f 7370 616e 3e20 207d 3b3c 732 };< │ │ │ -00020430: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00020480: 3733 333c 2f73 7061 6e3e 203c 2f64 6976 733
    .
    734< │ │ │ -000204e0: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> te │ │ │ -00020500: 6d70 6c61 7465 3c2f 7370 616e 3e20 266c mplate &l │ │ │ -00020510: 743b 3c73 7061 6e20 636c 6173 733d 226b t;typename │ │ │ -00020530: 3c2f 7370 616e 3e20 4c2c 203c 7370 616e L, typename │ │ │ -00020560: 2059 2667 743b 3c2f 6469 763e 0a3c 6469 Y>
    .< │ │ │ -00020580: 6120 6964 3d22 6c30 3037 3335 2220 6e61 a id="l00735" na │ │ │ -00020590: 6d65 3d22 6c30 3037 3335 223e 3c2f 613e me="l00735"> │ │ │ -000205a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 735 templat │ │ │ -000205e0: 653c 2f73 7061 6e3e 2026 6c74 3b3c 7370 e <typename Func>
    .
    .
    │ │ │ -000206b0: 3c61 2063 6c61 7373 3d22 6c69 6e65 2220 736 void De │ │ │ -00020780: 6369 7369 6f6e 5472 6565 266c 743b 4c2c cisionTree<L, │ │ │ -00020790: 2059 2667 743b 3a3a 7669 7369 743c 2f61 Y>::visit(Func f) │ │ │ -000207c0: 636f 6e73 7420 3c2f 7370 616e 3e7b 3c2f const {.
    7 │ │ │ -00020820: 3337 3c2f 7370 616e 3e20 2020 203c 6120 37 Visit& │ │ │ -00020860: 6c74 3b4c 2c20 5926 6774 3b3c 2f61 3e20 lt;L, Y> │ │ │ -00020870: 7669 7369 7428 6629 3b3c 2f64 6976 3e0a visit(f);
    . │ │ │ -00020880: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ -00020920: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00020930: 6e6f 223e 2020 3733 393c 2f73 7061 6e3e no"> 739 │ │ │ -00020940: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ -00020950: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -000209c0: 6120 6964 3d22 6c30 3037 3431 2220 6e61 a id="l00741" na │ │ │ -000209d0: 6d65 3d22 6c30 3037 3431 223e 3c2f 613e me="l00741"> │ │ │ -000209e0: 3c73 7061 6e20 636c 6173 733d 226c 696e 741 /****** │ │ │ -00020a20: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00020a30: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00020a40: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00020a50: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00020a60: 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e 3c2f ******/.
    7 │ │ │ -00020ac0: 3531 3c2f 7370 616e 3e20 203c 7370 616e 51 template │ │ │ -00020af0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ -00020b10: 616d 653c 2f73 7061 6e3e 204c 2c20 3c73 ame L, typename Y>
    . │ │ │ -00020b50: 3c64 6976 2063 6c61 7373 3d22 666f 6c64
    .
    < │ │ │ -00020be0: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ -00020bf0: 7265 663d 2261 3032 3738 382e 6874 6d6c ref="a02788.html │ │ │ -00020c00: 223e 2020 3735 323c 2f61 3e3c 2f73 7061 "> 752 struct │ │ │ -00020c30: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 VisitLeaf {
    .
    753 │ │ │ -00020cd0: 2020 203c 7370 616e 2063 6c61 7373 3d22 using < │ │ │ -00020cf0: 2f73 7061 6e3e 4620 3d20 7374 643a 3a66 /span>F = std::f │ │ │ -00020d00: 756e 6374 696f 6e26 6c74 3b76 6f69 6428 unction<void( │ │ │ -00020d10: 3c73 7061 6e20 636c 6173 733d 226b 6579 const typenam │ │ │ -00020d50: 653c 2f73 7061 6e3e 203c 6120 636c 6173 e DecisionTr │ │ │ -00020d90: 6565 266c 743b 4c2c 2059 2667 743b 3a3a ee<L, Y>:: │ │ │ -00020da0: 4c65 6166 3c2f 613e 2661 6d70 3b29 2667 Leaf&)&g │ │ │ -00020db0: 743b 3b3c 2f64 6976 3e0a 3c64 6976 2063 t;;
    .
    754 │ │ │ -00020e50: 3c2f 7370 616e 3e20 2020 203c 7370 616e explicit │ │ │ -00020e80: 203c 6120 636c 6173 733d 2263 6f64 6520 VisitLeaf( │ │ │ -00020ee0: 4620 3c61 2063 6c61 7373 3d22 636f 6465 F f) : f(f) {} < │ │ │ -00020ff0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .< │ │ │ -00021050: 6120 6964 3d22 6c30 3037 3535 2220 6e61 a id="l00755" na │ │ │ -00021060: 6d65 3d22 6c30 3037 3535 223e 3c2f 613e me="l00755"> │ │ │ -00021070: 3c73 7061 6e20 636c 6173 733d 226c 696e 755< │ │ │ -000210d0: 2f61 3e3c 2f73 7061 6e3e 2020 2020 4620 /a> F │ │ │ -000210e0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 f; │ │ │ -00021140: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -00021150: 2020 3c2f 6469 763e 0a3c 6469 7620 636c
    .
    756 .
    .
    758 void operator()(const typen │ │ │ -00021360: 616d 653c 2f73 7061 6e3e 203c 6120 636c ame Decis │ │ │ -000213c0: 696f 6e54 7265 6526 6c74 3b4c 2c20 5926 ionTree<L, Y& │ │ │ -000213d0: 6774 3b3a 3a4e 6f64 6550 7472 3c2f 613e gt;::NodePtr │ │ │ -000213e0: 2661 6d70 3b20 6e6f 6465 293c 7370 616e & node) const { │ │ │ -00021410: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00021460: 2037 3539 3c2f 7370 616e 3e20 2020 2020 759 │ │ │ -00021470: 203c 7370 616e 2063 6c61 7373 3d22 6b65 using Leaf = typename │ │ │ -000214c0: 203c 6120 636c 6173 733d 2263 6f64 6520 De │ │ │ -000214f0: 6369 7369 6f6e 5472 6565 266c 743b 4c2c cisionTree<L, │ │ │ -00021500: 2059 2667 743b 3a3a 4c65 6166 3c2f 613e Y>::Leaf │ │ │ -00021510: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ -00021560: 2020 3736 303c 2f73 7061 6e3e 2020 2020 760 │ │ │ -00021570: 2020 3c73 7061 6e20 636c 6173 733d 226b if (aut │ │ │ -000215b0: 6f3c 2f73 7061 6e3e 206c 6561 6620 3d20 o leaf = │ │ │ -000215c0: 626f 6f73 743a 3a64 796e 616d 6963 5f70 boost::dynamic_p │ │ │ -000215d0: 6f69 6e74 6572 5f63 6173 7426 6c74 3b63 ointer_cast<c │ │ │ -000215e0: 6f6e 7374 204c 6561 6626 6774 3b28 6e6f onst Leaf>(no │ │ │ -000215f0: 6465 2929 3c2f 6469 763e 0a3c 6469 7620 de))
    .
    761 │ │ │ -00021650: 2020 2020 2020 203c 7370 616e 2063 6c61 return < │ │ │ -00021680: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -00021690: 5f76 6172 6961 626c 6522 2068 7265 663d _variable" href= │ │ │ -000216a0: 2261 3032 3738 382e 6874 6d6c 2361 6330 "a02788.html#ac0 │ │ │ -000216b0: 6231 6136 6637 3233 3434 6638 6363 3436 b1a6f72344f8cc46 │ │ │ -000216c0: 3038 6130 3564 6162 3433 3961 3461 223e 08a05dab439a4a"> │ │ │ -000216d0: 663c 2f61 3e28 2a6c 6561 6629 3b3c 2f64 f(*leaf);.
    76 │ │ │ -00021730: 323c 2f73 7061 6e3e 203c 2f64 6976 3e0a 2
    . │ │ │ -00021740: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -00021770: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 763 │ │ │ -000217b0: 7573 696e 6720 3c2f 7370 616e 3e43 686f using Cho │ │ │ -000217c0: 6963 6520 3d20 3c73 7061 6e20 636c 6173 ice = type │ │ │ -000217e0: 6e61 6d65 3c2f 7370 616e 3e20 3c61 2063 name Decisio │ │ │ -00021820: 6e54 7265 6526 6c74 3b4c 2c20 5926 6774 nTree<L, Y> │ │ │ -00021830: 3b3a 3a43 686f 6963 653c 2f61 3e3b 3c2f ;::Choice;.
    7 │ │ │ -00021890: 3634 3c2f 7370 616e 3e20 2020 2020 203c 64 < │ │ │ -000218a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -000218b0: 6f72 6422 3e61 7574 6f3c 2f73 7061 6e3e ord">auto │ │ │ -000218c0: 2063 686f 6963 6520 3d20 626f 6f73 743a choice = boost: │ │ │ -000218d0: 3a64 796e 616d 6963 5f70 6f69 6e74 6572 :dynamic_pointer │ │ │ -000218e0: 5f63 6173 7426 6c74 3b63 6f6e 7374 2043 _cast<const C │ │ │ -000218f0: 686f 6963 6526 6774 3b28 6e6f 6465 293b hoice>(node); │ │ │ -00021900: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00021950: 2037 3635 3c2f 7370 616e 3e20 2020 2020 765 │ │ │ -00021960: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!choice).
    7 │ │ │ -000219e0: 3636 3c2f 7370 616e 3e20 2020 2020 2020 66 │ │ │ -000219f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 throw │ │ │ -00021a10: 3c2f 7370 616e 3e20 7374 643a 3a69 6e76 std::inv │ │ │ -00021a20: 616c 6964 5f61 7267 756d 656e 7428 3c73 alid_argument(" │ │ │ -00021a50: 4465 6369 7369 6f6e 5472 6565 3a3a 5669 DecisionTree::Vi │ │ │ -00021a60: 7369 744c 6561 663a 2049 6e76 616c 6964 sitLeaf: Invalid │ │ │ -00021a70: 204e 6f64 6550 7472 2671 756f 743b 3c2f NodePtr");
    . │ │ │ -00021aa0: 3c61 2069 643d 226c 3030 3736 3722 206e 767 for (auto& │ │ │ -00021b30: 616d 703b 2661 6d70 3b20 6272 616e 6368 amp;& branch │ │ │ -00021b40: 203a 2063 686f 6963 652d 2667 743b 6272 : choice->br │ │ │ -00021b50: 616e 6368 6573 2829 2920 282a 3c73 7061 anches()) (*this)(b │ │ │ -00021b80: 7261 6e63 6829 3b20 203c 7370 616e 2063 ranch); / │ │ │ -00021ba0: 2f20 7265 6375 7273 6521 3c2f 7370 616e / recurse!
    .
    │ │ │ -00021c00: 2020 3736 383c 2f73 7061 6e3e 2020 2020 768 │ │ │ -00021c10: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 0a3c }
    .
    .< │ │ │ -00021c20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00021c30: 3e3c 6120 6964 3d22 6c30 3037 3639 2220 > 769 };
    . │ │ │ -00021c90: 3c61 2069 643d 226c 3030 3737 3022 206e 770
    .
    771 │ │ │ -00021d30: 3c73 7061 6e20 636c 6173 733d 226b 6579 template < │ │ │ -00021d70: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ -00021d80: 4c2c 203c 7370 616e 2063 6c61 7373 3d22 L, typenam │ │ │ -00021da0: 653c 2f73 7061 6e3e 2059 2667 743b 3c2f e Y>.
    7 │ │ │ -00021e00: 3732 3c2f 7370 616e 3e20 203c 7370 616e 72 template │ │ │ -00021e30: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ -00021e50: 616d 653c 2f73 7061 6e3e 2046 756e 6326 ame Func& │ │ │ -00021e60: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    . │ │ │ -00021eb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ -00021ee0: 2f61 3e3c 7370 616e 2063 6c61 7373 3d22 /a> 7 │ │ │ -00021f40: 3733 3c2f 613e 3c2f 7370 616e 3e20 203c 73 < │ │ │ -00021f50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00021f60: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void DecisionTr │ │ │ -00021fd0: 6565 266c 743b 4c2c 2059 2667 743b 3a3a ee<L, Y>:: │ │ │ -00021fe0: 7669 7369 744c 6561 663c 2f61 3e28 4675 visitLeaf(Fu │ │ │ -00021ff0: 6e63 2066 293c 7370 616e 2063 6c61 7373 nc f) cons │ │ │ -00022010: 7420 3c2f 7370 616e 3e7b 3c2f 6469 763e t {
    │ │ │ -00022020: 0a3c 6469 7620 636c 6173 733d 226c 696e .. │ │ │ -000220d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    < │ │ │ -00022170: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00022180: 6e6f 223e 2020 3737 363c 2f73 7061 6e3e no"> 776 │ │ │ -00022190: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ -000221a0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -00022210: 6120 6964 3d22 6c30 3037 3738 2220 6e61 a id="l00778" na │ │ │ -00022220: 6d65 3d22 6c30 3037 3738 223e 3c2f 613e me="l00778"> │ │ │ -00022230: 3c73 7061 6e20 636c 6173 733d 226c 696e 778 /****** │ │ │ -00022270: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00022280: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00022290: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000222a0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000222b0: 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e 3c2f ******/.
    7 │ │ │ -00022310: 3835 3c2f 7370 616e 3e20 203c 7370 616e 85 template │ │ │ -00022340: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <typen │ │ │ -00022360: 616d 653c 2f73 7061 6e3e 204c 2c20 3c73 ame L, typename Y>
    . │ │ │ -000223a0: 3c64 6976 2063 6c61 7373 3d22 666f 6c64
    .
    < │ │ │ -00022430: 6120 636c 6173 733d 226c 696e 6522 2068 a class="line" h │ │ │ -00022440: 7265 663d 2261 3032 3739 322e 6874 6d6c ref="a02792.html │ │ │ -00022450: 223e 2020 3738 363c 2f61 3e3c 2f73 7061 "> 786 struct │ │ │ -00022480: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 VisitWith {
    .
    787 │ │ │ -00022520: 2020 203c 7370 616e 2063 6c61 7373 3d22 using < │ │ │ -00022540: 2f73 7061 6e3e 4620 3d20 7374 643a 3a66 /span>F = std::f │ │ │ -00022550: 756e 6374 696f 6e26 6c74 3b76 6f69 6428 unction<void( │ │ │ -00022560: 3c73 7061 6e20 636c 6173 733d 226b 6579 const A │ │ │ -000225b0: 7373 6967 6e6d 656e 7426 6c74 3b4c 2667 ssignment<L&g │ │ │ -000225c0: 743b 3c2f 613e 2661 6d70 3b2c 203c 7370 t;&, const │ │ │ -000225f0: 5926 616d 703b 2926 6774 3b3b 3c2f 6469 Y&)>;.
    │ │ │ -00022690: 2020 3738 383c 2f61 3e3c 2f73 7061 6e3e 788 │ │ │ -000226a0: 2020 2020 3c73 7061 6e20 636c 6173 733d explic │ │ │ -000226c0: 6974 3c2f 7370 616e 3e20 3c61 2063 6c61 it Visit │ │ │ -00022720: 5769 7468 3c2f 613e 2846 203c 6120 636c With(F f) : f(f) {}
    .< │ │ │ -00022840: 6469 7620 636c 6173 733d 2266 6f6c 646f div class="foldo │ │ │ -00022850: 7065 6e22 2069 643d 2266 6f6c 646f 7065 pen" id="foldope │ │ │ -00022860: 6e30 3037 3839 2220 6461 7461 2d73 7461 n00789" data-sta │ │ │ -00022870: 7274 3d22 7b22 2064 6174 612d 656e 643d rt="{" data-end= │ │ │ -00022880: 227d 3b22 3e0a 3c64 6976 2063 6c61 7373 "};">.
    789 Assignment< │ │ │ -00022960: 3b4c 2667 743b 3c2f 613e 203c 6120 636c ;L> assi │ │ │ -000229c0: 676e 6d65 6e74 3c2f 613e 3b20 203c 2f64 gnment; .
    790 F f; │ │ │ -00022ad0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -00022ae0: 2020 2020 203c 2f64 6976 3e0a 3c64 6976
    .
    < │ │ │ -00022b20: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00022b30: 6e6f 223e 2020 3739 313c 2f73 7061 6e3e no"> 791 │ │ │ -00022b40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    . │ │ │ -00022ba0: 3c61 2069 643d 226c 3030 3739 3322 206e 793 │ │ │ -00022c20: 3c2f 613e 3c2f 7370 616e 3e20 2020 203c < │ │ │ -00022c30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00022c40: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void operator() │ │ │ -00022cb0: 3c2f 613e 283c 7370 616e 2063 6c61 7373 (const │ │ │ -00022cd0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ty │ │ │ -00022cf0: 7065 6e61 6d65 3c2f 7370 616e 3e20 3c61 pename De │ │ │ -00022d50: 6369 7369 6f6e 5472 6565 266c 743b 4c2c cisionTree<L, │ │ │ -00022d60: 2059 2667 743b 3a3a 4e6f 6465 5074 723c Y>::NodePtr< │ │ │ -00022d70: 2f61 3e26 616d 703b 206e 6f64 6529 207b /a>& node) { │ │ │ -00022d80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00022dd0: 2037 3934 3c2f 7370 616e 3e20 2020 2020 794 │ │ │ -00022de0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 using Leaf = typename │ │ │ -00022e30: 203c 6120 636c 6173 733d 2263 6f64 6520 De │ │ │ -00022e60: 6369 7369 6f6e 5472 6565 266c 743b 4c2c cisionTree<L, │ │ │ -00022e70: 2059 2667 743b 3a3a 4c65 6166 3c2f 613e Y>::Leaf │ │ │ -00022e80: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ -00022ed0: 2020 3739 353c 2f73 7061 6e3e 2020 2020 795 │ │ │ -00022ee0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (aut │ │ │ -00022f20: 6f3c 2f73 7061 6e3e 206c 6561 6620 3d20 o leaf = │ │ │ -00022f30: 626f 6f73 743a 3a64 796e 616d 6963 5f70 boost::dynamic_p │ │ │ -00022f40: 6f69 6e74 6572 5f63 6173 7426 6c74 3b63 ointer_cast<c │ │ │ -00022f50: 6f6e 7374 204c 6561 6626 6774 3b28 6e6f onst Leaf>(no │ │ │ -00022f60: 6465 2929 3c2f 6469 763e 0a3c 6469 7620 de))
    .
    796 │ │ │ -00022fc0: 2020 2020 2020 203c 7370 616e 2063 6c61 return < │ │ │ -00022ff0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -00023000: 5f76 6172 6961 626c 6522 2068 7265 663d _variable" href= │ │ │ -00023010: 2261 3032 3739 322e 6874 6d6c 2361 6463 "a02792.html#adc │ │ │ -00023020: 3463 6662 3532 6434 3430 3932 6364 6165 4cfb52d44092cdae │ │ │ -00023030: 3966 3136 6365 6461 3835 3066 3535 223e 9f16ceda850f55"> │ │ │ -00023040: 663c 2f61 3e28 3c61 2063 6c61 7373 3d22 f(assignmen │ │ │ -000230a0: 743c 2f61 3e2c 206c 6561 662d 2667 743b t, leaf-> │ │ │ -000230b0: 636f 6e73 7461 6e74 2829 293b 3c2f 6469 constant());.
    797 │ │ │ -00023110: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ -00023120: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00023130: 3e3c 6120 6964 3d22 6c30 3037 3938 2220 > 798 u │ │ │ -00023190: 7369 6e67 203c 2f73 7061 6e3e 4368 6f69 sing Choi │ │ │ -000231a0: 6365 203d 203c 7370 616e 2063 6c61 7373 ce = typen │ │ │ -000231c0: 616d 653c 2f73 7061 6e3e 203c 6120 636c ame Decision │ │ │ -00023200: 5472 6565 266c 743b 4c2c 2059 2667 743b Tree<L, Y> │ │ │ -00023210: 3a3a 4368 6f69 6365 3c2f 613e 3b3c 2f64 ::Choice;.
    79 │ │ │ -00023270: 393c 2f73 7061 6e3e 2020 2020 2020 3c73 9 auto │ │ │ -000232a0: 6368 6f69 6365 203d 2062 6f6f 7374 3a3a choice = boost:: │ │ │ -000232b0: 6479 6e61 6d69 635f 706f 696e 7465 725f dynamic_pointer_ │ │ │ -000232c0: 6361 7374 266c 743b 636f 6e73 7420 4368 cast<const Ch │ │ │ -000232d0: 6f69 6365 2667 743b 286e 6f64 6529 3b3c oice>(node);< │ │ │ -000232e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00023330: 3830 303c 2f73 7061 6e3e 2020 2020 2020 800 │ │ │ -00023340: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (!choice).
    80 │ │ │ -000233c0: 313c 2f73 7061 6e3e 2020 2020 2020 2020 1 │ │ │ -000233d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 throw< │ │ │ -000233f0: 2f73 7061 6e3e 2073 7464 3a3a 696e 7661 /span> std::inva │ │ │ -00023400: 6c69 645f 6172 6775 6d65 6e74 283c 7370 lid_argument("D │ │ │ -00023430: 6563 6973 696f 6e54 7265 653a 3a56 6973 ecisionTree::Vis │ │ │ -00023440: 6974 5769 7468 3a20 496e 7661 6c69 6420 itWith: Invalid │ │ │ -00023450: 4e6f 6465 5074 7226 7175 6f74 3b3c 2f73 NodePtr");
    .< │ │ │ -00023480: 6120 6964 3d22 6c30 3038 3032 2220 6e61 a id="l00802" na │ │ │ -00023490: 6d65 3d22 6c30 3038 3032 223e 3c2f 613e me="l00802"> │ │ │ -000234a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 802 for (size_t
    i = 0; i &l │ │ │ -00023520: 743b 2063 686f 6963 652d 2667 743b 6e72 t; choice->nr │ │ │ -00023530: 4368 6f69 6365 7328 293b 2069 2b2b 2920 Choices(); i++) │ │ │ -00023540: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    ..
    804< │ │ │ -000236b0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ -000236d0: 3c61 2069 643d 226c 3030 3830 3522 206e 805 (*this │ │ │ -00023720: 2928 6368 6f69 6365 2d26 6774 3b62 7261 )(choice->bra │ │ │ -00023730: 6e63 6865 7328 295b 695d 293b 2020 3c73 nches()[i]); // recurse!< │ │ │ -00023760: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ -00023780: 6120 6964 3d22 6c30 3038 3036 2220 6e61 a id="l00806" na │ │ │ -00023790: 6d65 3d22 6c30 3038 3036 223e 3c2f 613e me="l00806"> │ │ │ -000237a0: 3c73 7061 6e20 636c 6173 733d 226c 696e 806
    .
    807 │ │ │ -00023820: 2020 2020 203c 7370 616e 2063 6c61 7373 // Re │ │ │ -00023840: 6d6f 7665 2074 6865 2063 686f 6963 6520 move the choice │ │ │ -00023850: 736f 2077 6520 6172 6520 6261 636b 7472 so we are backtr │ │ │ -00023860: 6163 6b69 6e67 3c2f 7370 616e 3e3c 2f64 acking.
    80 │ │ │ -000238c0: 383c 2f73 7061 6e3e 2020 2020 2020 2020 8 │ │ │ -000238d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 auto choice_it = a │ │ │ -00023950: 7373 6967 6e6d 656e 743c 2f61 3e2e 6669 ssignment.fi │ │ │ -00023960: 6e64 2863 686f 6963 652d 2667 743b 6c61 nd(choice->la │ │ │ -00023970: 6265 6c28 2929 3b3c 2f64 6976 3e0a 3c64 bel());
    . │ │ │ -00023990: 3c61 2069 643d 226c 3030 3830 3922 206e 809
    assig │ │ │ -00023a30: 6e6d 656e 743c 2f61 3e2e 6572 6173 6528 nment.erase( │ │ │ -00023a40: 6368 6f69 6365 5f69 7429 3b3c 2f64 6976 choice_it);
    .
    810< │ │ │ -00023aa0: 2f73 7061 6e3e 2020 2020 2020 7d3c 2f64 /span> }.
    81 │ │ │ -00023b00: 313c 2f73 7061 6e3e 2020 2020 7d3c 2f64 1 }.
    .
    812 │ │ │ -00023b70: 207d 3b3c 2f64 6976 3e0a 3c64 6976 2063 };
    .
    813 < │ │ │ -00023bd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00023c20: 3831 343c 2f73 7061 6e3e 2020 3c73 7061 814 template <type │ │ │ -00023c70: 6e61 6d65 3c2f 7370 616e 3e20 4c2c 203c name L, < │ │ │ -00023c80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00023c90: 6f72 6422 3e74 7970 656e 616d 653c 2f73 ord">typename Y>
    │ │ │ -00023cb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -00023ce0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 815 tem │ │ │ -00023d20: 706c 6174 653c 2f73 7061 6e3e 2026 6c74 plate < │ │ │ -00023d30: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;typename< │ │ │ -00023d50: 2f73 7061 6e3e 2046 756e 6326 6774 3b3c /span> Func>< │ │ │ -00023d60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .
    < │ │ │ -00023de0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00023df0: 6e6f 223e 3c61 2063 6c61 7373 3d22 6c69 no"> 816 void │ │ │ -00023e70: 203c 6120 636c 6173 733d 2263 6f64 6520 DecisionTree&l │ │ │ -00023ed0: 743b 4c2c 2059 2667 743b 3a3a 7669 7369 t;L, Y>::visi │ │ │ -00023ee0: 7457 6974 683c 2f61 3e28 4675 6e63 2066 tWith(Func f │ │ │ -00023ef0: 293c 7370 616e 2063 6c61 7373 3d22 6b65 ) const {
    .< │ │ │ -00023f30: 6120 6964 3d22 6c30 3038 3137 2220 6e61 a id="l00817" na │ │ │ -00023f40: 6d65 3d22 6c30 3038 3137 223e 3c2f 613e me="l00817"> │ │ │ -00023f50: 3c73 7061 6e20 636c 6173 733d 226c 696e 817 VisitWith<L │ │ │ -00023fb0: 2c20 5926 6774 3b3c 2f61 3e20 7669 7369 , Y> visi │ │ │ -00023fc0: 7428 6629 3b3c 2f64 6976 3e0a 3c64 6976 t(f);
    .
    < │ │ │ -00024000: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00024010: 6e6f 223e 2020 3831 383c 2f73 7061 6e3e no"> 818 │ │ │ -00024020: 2020 2020 7669 7369 7428 726f 6f74 5f29 visit(root_) │ │ │ -00024030: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ -00024080: 2020 3831 393c 2f73 7061 6e3e 2020 7d3c 819 }< │ │ │ -00024090: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 6469 /div>.
    .< │ │ │ -000240b0: 6120 6964 3d22 6c30 3038 3230 2220 6e61 a id="l00820" na │ │ │ -000240c0: 6d65 3d22 6c30 3038 3230 223e 3c2f 613e me="l00820"> │ │ │ -000240d0: 3c73 7061 6e20 636c 6173 733d 226c 696e 820
    .
    821 /********** │ │ │ -00024170: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00024180: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00024190: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000241a0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000241b0: 2a2a 2f3c 2f73 7061 6e3e 3c2f 6469 763e **/
    │ │ │ -000241c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -000241f0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 822 tem │ │ │ -00024230: 706c 6174 653c 2f73 7061 6e3e 2026 6c74 plate < │ │ │ -00024240: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;typename< │ │ │ -00024260: 2f73 7061 6e3e 204c 2c20 3c73 7061 6e20 /span> L, │ │ │ -00024280: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ -00024290: 5926 6774 3b3c 2f64 6976 3e0a 3c64 6976 Y>
    .
    .
    │ │ │ -00024370: 2038 3233 3c2f 613e 3c2f 7370 616e 3e20 823 │ │ │ -00024380: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_ │ │ │ -000243a0: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t Decisi │ │ │ -00024400: 6f6e 5472 6565 266c 743b 4c2c 2059 2667 onTree<L, Y&g │ │ │ -00024410: 743b 3a3a 6e72 4c65 6176 6573 3c2f 613e t;::nrLeaves │ │ │ -00024420: 2829 3c73 7061 6e20 636c 6173 733d 226b () const < │ │ │ -00024440: 2f73 7061 6e3e 7b3c 2f64 6976 3e0a 3c64 /span>{
    . │ │ │ -00024460: 3c61 2069 643d 226c 3030 3832 3422 206e 824 │ │ │ -000244c0: 7369 7a65 5f74 3c2f 7370 616e 3e20 746f size_t to │ │ │ -000244d0: 7461 6c20 3d20 303b 3c2f 6469 763e 0a3c tal = 0;
    .< │ │ │ -000244e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -000244f0: 3e3c 6120 6964 3d22 6c30 3038 3235 2220 > 825 visit([&a │ │ │ -00024540: 6d70 3b74 6f74 616c 5d28 3c73 7061 6e20 mp;total]( │ │ │ -00024560: 636f 6e73 743c 2f73 7061 6e3e 2059 2661 const Y&a │ │ │ -00024570: 6d70 3b20 6e6f 6465 2920 7b20 746f 7461 mp; node) { tota │ │ │ -00024580: 6c20 2b3d 2031 3b20 7d29 3b3c 2f64 6976 l += 1; });
    .
    826< │ │ │ -000245e0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> return total;
    .< │ │ │ -00024620: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00024630: 3e3c 6120 6964 3d22 6c30 3038 3237 2220 > 827 }
    ..
    82 │ │ │ -000246d0: 383c 2f73 7061 6e3e 203c 2f64 6976 3e0a 8
    . │ │ │ -000246e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ -000247f0: 2020 3833 303c 2f73 7061 6e3e 2020 3c73 830 // fold is j │ │ │ -00024820: 7573 7420 646f 6e65 2077 6974 6820 6120 ust done with a │ │ │ -00024830: 7669 7369 743c 2f73 7061 6e3e 3c2f 6469 visit.
    831 │ │ │ -00024890: 3c2f 7370 616e 3e20 203c 7370 616e 2063 t │ │ │ -000248b0: 656d 706c 6174 653c 2f73 7061 6e3e 2026 emplate & │ │ │ -000248c0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;typenam │ │ │ -000248e0: 653c 2f73 7061 6e3e 204c 2c20 3c73 7061 e L, typename Y>
    . │ │ │ -00024930: 3c61 2069 643d 226c 3030 3833 3222 206e 832 templa │ │ │ -00024990: 7465 3c2f 7370 616e 3e20 266c 743b 3c73 te <typename Func, │ │ │ -000249e0: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ -000249f0: 5826 6774 3b3c 2f64 6976 3e0a 3c64 6976 X>
    ..
    │ │ │ -00024d10: 2020 3833 363c 2f73 7061 6e3e 2020 7d3c 836 }< │ │ │ -00024d20: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 6469 /div>.
    .< │ │ │ -00024d40: 6120 6964 3d22 6c30 3038 3337 2220 6e61 a id="l00837" na │ │ │ -00024d50: 6d65 3d22 6c30 3038 3337 223e 3c2f 613e me="l00837"> │ │ │ -00024d60: 3c73 7061 6e20 636c 6173 733d 226c 696e 837
    .
    838 /********** │ │ │ -00024e00: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00024e10: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00024e20: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00024e30: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00024e40: 2a2a 2f3c 2f73 7061 6e3e 3c2f 6469 763e **/
    │ │ │ -00024e50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -00024e80: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 852 tem │ │ │ -00024ec0: 706c 6174 653c 2f73 7061 6e3e 2026 6c74 plate < │ │ │ -00024ed0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;typename< │ │ │ -00024ef0: 2f73 7061 6e3e 204c 2c20 3c73 7061 6e20 /span> L, │ │ │ -00024f10: 7479 7065 6e61 6d65 3c2f 7370 616e 3e20 typename │ │ │ -00024f20: 5926 6774 3b3c 2f64 6976 3e0a 3c64 6976 Y>
    .
    .
    │ │ │ -00025000: 2038 3533 3c2f 613e 3c2f 7370 616e 3e20 853 │ │ │ -00025010: 2073 7464 3a3a 7365 7426 6c74 3b4c 2667 std::set<L&g │ │ │ -00025020: 743b 203c 6120 636c 6173 733d 2263 6f64 t; DecisionTree │ │ │ -00025080: 266c 743b 4c2c 2059 2667 743b 3a3a 6c61 <L, Y>::la │ │ │ -00025090: 6265 6c73 3c2f 613e 2829 3c73 7061 6e20 bels() │ │ │ -000250b0: 2063 6f6e 7374 203c 2f73 7061 6e3e 7b3c const {< │ │ │ -000250c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00025110: 3835 343c 2f73 7061 6e3e 2020 2020 7374 854 st │ │ │ -00025120: 643a 3a73 6574 266c 743b 4c26 6774 3b20 d::set<L> │ │ │ -00025130: 756e 6971 7565 3b3c 2f64 6976 3e0a 3c64 unique;
    . │ │ │ -00025150: 3c61 2069 643d 226c 3030 3835 3522 206e 855 auto │ │ │ -000251b0: 3c2f 7370 616e 3e20 6620 3d20 5b26 616d f = [&am │ │ │ -000251c0: 703b 5d28 3c73 7061 6e20 636c 6173 733d p;](const< │ │ │ -000251e0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> Assignment< │ │ │ -00025220: 3b4c 2667 743b 3c2f 613e 2661 6d70 3b20 ;L>& │ │ │ -00025230: 6173 7369 676e 6d65 6e74 2c20 3c73 7061 assignment, const Y │ │ │ -00025260: 2661 6d70 3b29 207b 3c2f 6469 763e 0a3c &) {
    .< │ │ │ -00025270: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00025280: 3e3c 6120 6964 3d22 6c30 3038 3536 2220 > 856 for (< │ │ │ -000252f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00025300: 6f72 6422 3e61 7574 6f3c 2f73 7061 6e3e ord">auto │ │ │ -00025310: 2661 6d70 3b26 616d 703b 206b 7620 3a20 && kv : │ │ │ -00025320: 6173 7369 676e 6d65 6e74 2920 7b3c 2f64 assignment) {.
    85 │ │ │ -00025380: 373c 2f73 7061 6e3e 2020 2020 2020 2020 7 │ │ │ -00025390: 756e 6971 7565 2e69 6e73 6572 7428 6b76 unique.insert(kv │ │ │ -000253a0: 2e66 6972 7374 293b 3c2f 6469 763e 0a3c .first);
    .< │ │ │ -000253b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -000253c0: 3e3c 6120 6964 3d22 6c30 3038 3538 2220 > 858 }
    │ │ │ -00025410: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    860< │ │ │ -000254c0: 2f73 7061 6e3e 2020 2020 7669 7369 7457 /span> visitW │ │ │ -000254d0: 6974 6828 6629 3b3c 2f64 6976 3e0a 3c64 ith(f);
    . │ │ │ -000254f0: 3c61 2069 643d 226c 3030 3836 3122 206e 861 │ │ │ -00025550: 7265 7475 726e 3c2f 7370 616e 3e20 756e return un │ │ │ -00025560: 6971 7565 3b3c 2f64 6976 3e0a 3c64 6976 ique;
    .
    < │ │ │ -000255a0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -000255b0: 6e6f 223e 2020 3836 323c 2f73 7061 6e3e no"> 862 │ │ │ -000255c0: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ -000255d0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -00025640: 6120 6964 3d22 6c30 3038 3634 2220 6e61 a id="l00864" na │ │ │ -00025650: 6d65 3d22 6c30 3038 3634 223e 3c2f 613e me="l00864"> │ │ │ -00025660: 3c73 7061 6e20 636c 6173 733d 226c 696e 864/******** │ │ │ -000256a0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000256b0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000256c0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000256d0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000256e0: 2a2a 2a2a 2f3c 2f73 7061 6e3e 3c2f 6469 ****/.
    865 │ │ │ -00025740: 3c2f 7370 616e 3e20 203c 7370 616e 2063 t │ │ │ -00025760: 656d 706c 6174 653c 2f73 7061 6e3e 2026 emplate & │ │ │ -00025770: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;typenam │ │ │ -00025790: 653c 2f73 7061 6e3e 204c 2c20 3c73 7061 e L, typename Y>
    . │ │ │ -000257e0: 3c61 2069 643d 226c 3030 3836 3622 206e 866 bo │ │ │ -00025840: 6f6c 3c2f 7370 616e 3e20 3c61 2063 6c61 ol DecisionTr │ │ │ -00025880: 6565 266c 743b 4c2c 2059 2667 743b 3a3a ee<L, Y>:: │ │ │ -00025890: 6571 7561 6c73 3c2f 613e 283c 7370 616e equals(const Decisi │ │ │ -000258f0: 6f6e 5472 6565 3c2f 613e 2661 6d70 3b20 onTree& │ │ │ -00025900: 6f74 6865 722c 3c2f 6469 763e 0a3c 6469 other,
    .< │ │ │ -00025920: 6120 6964 3d22 6c30 3038 3637 2220 6e61 a id="l00867" na │ │ │ -00025930: 6d65 3d22 6c30 3038 3637 223e 3c2f 613e me="l00867"> │ │ │ -00025940: 3c73 7061 6e20 636c 6173 733d 226c 696e 867 │ │ │ -00025970: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -00025980: 2020 203c 7370 616e 2063 6c61 7373 3d22 const CompareFun │ │ │ -000259b0: 6326 616d 703b 2063 6f6d 7061 7265 293c c& compare)< │ │ │ -000259c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -000259d0: 6f72 6422 3e20 636f 6e73 7420 3c2f 7370 ord"> const {
    .
    868 │ │ │ -00025a40: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ -00025a60: 7572 6e3c 2f73 7061 6e3e 2072 6f6f 745f urn root_ │ │ │ -00025a70: 2d26 6774 3b65 7175 616c 7328 2a6f 7468 ->equals(*oth │ │ │ -00025a80: 6572 2e3c 6120 636c 6173 733d 2263 6f64 er.root_, c │ │ │ -00025ae0: 6f6d 7061 7265 293b 3c2f 6469 763e 0a3c ompare);
    .< │ │ │ -00025af0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00025b00: 3e3c 6120 6964 3d22 6c30 3038 3639 2220 > 869 }
    .< │ │ │ -00025b60: 6120 6964 3d22 6c30 3038 3730 2220 6e61 a id="l00870" na │ │ │ -00025b70: 6d65 3d22 6c30 3038 3730 223e 3c2f 613e me="l00870"> │ │ │ -00025b80: 3c73 7061 6e20 636c 6173 733d 226c 696e 870
    .
    871 < │ │ │ -00025c00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00025c10: 6f72 6422 3e74 656d 706c 6174 653c 2f73 ord">template <t │ │ │ -00025c40: 7970 656e 616d 653c 2f73 7061 6e3e 204c ypename L │ │ │ -00025c50: 2c20 3c73 7061 6e20 636c 6173 733d 226b , typename │ │ │ -00025c70: 3c2f 7370 616e 3e20 5926 6774 3b3c 2f64 Y>.
    .
    872 │ │ │ -00025d60: 3c2f 7370 616e 3e20 203c 7370 616e 2063 void < │ │ │ -00025d90: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -00025da0: 5f66 756e 6374 696f 6e22 2068 7265 663d _function" href= │ │ │ -00025db0: 2261 3032 3739 362e 6874 6d6c 2361 3930 "a02796.html#a90 │ │ │ -00025dc0: 3835 3439 3336 3135 3938 6562 6364 3661 8549361598ebcd6a │ │ │ -00025dd0: 6434 3061 3565 3565 6562 6337 3363 223e d40a5e5eebc73c"> │ │ │ -00025de0: 4465 6369 7369 6f6e 5472 6565 266c 743b DecisionTree< │ │ │ -00025df0: 4c2c 2059 2667 743b 3a3a 7072 696e 743c L, Y>::print< │ │ │ -00025e00: 2f61 3e28 3c73 7061 6e20 636c 6173 733d /a>(const< │ │ │ -00025e20: 2f73 7061 6e3e 2073 7464 3a3a 7374 7269 /span> std::stri │ │ │ -00025e30: 6e67 2661 6d70 3b20 732c 3c2f 6469 763e ng& s,
    │ │ │ -00025e40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -00025e70: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 873 │ │ │ -00025ea0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -00025eb0: 2020 2020 2020 3c73 7061 6e20 636c 6173 cons │ │ │ -00025ed0: 743c 2f73 7061 6e3e 204c 6162 656c 466f t LabelFo │ │ │ -00025ee0: 726d 6174 7465 7226 616d 703b 206c 6162 rmatter& lab │ │ │ -00025ef0: 656c 466f 726d 6174 7465 722c 3c2f 6469 elFormatter,.
    874 │ │ │ -00025f50: 3c2f 7370 616e 3e20 2020 2020 2020 2020 │ │ │ -00025f60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -00025f70: 2020 2020 2020 2020 3c73 7061 6e20 636c co │ │ │ -00025f90: 6e73 743c 2f73 7061 6e3e 2056 616c 7565 nst Value │ │ │ -00025fa0: 466f 726d 6174 7465 7226 616d 703b 2076 Formatter& v │ │ │ -00025fb0: 616c 7565 466f 726d 6174 7465 7229 3c73 alueFormatter) const {
    .
    875 │ │ │ -00026040: 2020 726f 6f74 5f2d 2667 743b 7072 696e root_->prin │ │ │ -00026050: 7428 732c 206c 6162 656c 466f 726d 6174 t(s, labelFormat │ │ │ -00026060: 7465 722c 2076 616c 7565 466f 726d 6174 ter, valueFormat │ │ │ -00026070: 7465 7229 3b3c 2f64 6976 3e0a 3c64 6976 ter);
    .
    < │ │ │ -000260b0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -000260c0: 6e6f 223e 2020 3837 363c 2f73 7061 6e3e no"> 876 │ │ │ -000260d0: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ -000260e0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -00026150: 6120 6964 3d22 6c30 3038 3738 2220 6e61 a id="l00878" na │ │ │ -00026160: 6d65 3d22 6c30 3038 3738 223e 3c2f 613e me="l00878"> │ │ │ -00026170: 3c73 7061 6e20 636c 6173 733d 226c 696e 878 templat │ │ │ -000261b0: 653c 2f73 7061 6e3e 266c 743b 3c73 7061 e<typename L, typen │ │ │ -00026200: 616d 653c 2f73 7061 6e3e 2059 2667 743b ame Y> │ │ │ -00026210: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    .< │ │ │ -00026270: 6120 6964 3d22 6c30 3038 3739 2220 6e61 a id="l00879" na │ │ │ -00026280: 6d65 3d22 6c30 3038 3739 223e 3c2f 613e me="l00879"> │ │ │ -00026290: 3c73 7061 6e20 636c 6173 733d 226c 696e 879< │ │ │ -000262f0: 2f61 3e3c 2f73 7061 6e3e 2020 3c73 7061 /a> bool DecisionTree& │ │ │ -00026380: 6c74 3b4c 2c20 5926 6774 3b3a 3a6f 7065 lt;L, Y>::ope │ │ │ -00026390: 7261 746f 723d 3d3c 2f61 3e28 3c73 7061 rator==(const < │ │ │ -000263c0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -000263d0: 5f63 6c61 7373 2220 6872 6566 3d22 6130 _class" href="a0 │ │ │ -000263e0: 3237 3936 2e68 746d 6c22 3e44 6563 6973 2796.html">Decis │ │ │ -000263f0: 696f 6e54 7265 653c 2f61 3e26 616d 703b ionTree& │ │ │ -00026400: 206f 7468 6572 293c 7370 616e 2063 6c61 other) co │ │ │ -00026420: 6e73 7420 3c2f 7370 616e 3e7b 3c2f 6469 nst {.
    880 │ │ │ -00026480: 3c2f 7370 616e 3e20 2020 203c 7370 616e return root_->equ │ │ │ -000264c0: 616c 7328 2a6f 7468 6572 2e3c 6120 636c als(*other.root │ │ │ -00026520: 5f3c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 _);
    . │ │ │ -00026540: 3c61 2069 643d 226c 3030 3838 3122 206e 881 }
    ..
    882 │ │ │ -000265e0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ -000265f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -00026600: 3e3c 6120 6964 3d22 6c30 3038 3833 2220 > 883 templ │ │ │ -00026660: 6174 653c 2f73 7061 6e3e 266c 743b 3c73 ate<typename L, typ │ │ │ -000266b0: 656e 616d 653c 2f73 7061 6e3e 2059 2667 ename Y&g │ │ │ -000266c0: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    ..
    < │ │ │ -00026920: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00026930: 6e6f 223e 2020 3838 353c 2f73 7061 6e3e no"> 885 │ │ │ -00026940: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ -00026960: 7475 726e 3c2f 7370 616e 3e20 726f 6f74 turn root │ │ │ -00026970: 5f2d 2667 743b 6f70 6572 6174 6f72 2028 _->operator ( │ │ │ -00026980: 2928 7829 3b3c 2f64 6976 3e0a 3c64 6976 )(x);
    .
    < │ │ │ -000269c0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -000269d0: 6e6f 223e 2020 3838 363c 2f73 7061 6e3e no"> 886 │ │ │ -000269e0: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ -000269f0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -00026a60: 6120 6964 3d22 6c30 3038 3838 2220 6e61 a id="l00888" na │ │ │ -00026a70: 6d65 3d22 6c30 3038 3838 223e 3c2f 613e me="l00888"> │ │ │ -00026a80: 3c73 7061 6e20 636c 6173 733d 226c 696e 888 templat │ │ │ -00026ac0: 653c 2f73 7061 6e3e 266c 743b 3c73 7061 e<typename L, typen │ │ │ -00026b10: 616d 653c 2f73 7061 6e3e 2059 2667 743b ame Y> │ │ │ -00026b20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    .< │ │ │ -00026b80: 6120 6964 3d22 6c30 3038 3839 2220 6e61 a id="l00889" na │ │ │ -00026b90: 6d65 3d22 6c30 3038 3839 223e 3c2f 613e me="l00889"> │ │ │ -00026ba0: 3c73 7061 6e20 636c 6173 733d 226c 696e 889< │ │ │ -00026c00: 2f61 3e3c 2f73 7061 6e3e 2020 3c61 2063 /a> Decision │ │ │ -00026c40: 5472 6565 266c 743b 4c2c 2059 2667 743b Tree<L, Y> │ │ │ -00026c50: 3c2f 613e 203c 6120 636c 6173 733d 2263 DecisionTr │ │ │ -00026cb0: 6565 266c 743b 4c2c 2059 2667 743b 3a3a ee<L, Y>:: │ │ │ -00026cc0: 6170 706c 793c 2f61 3e28 3c73 7061 6e20 apply( │ │ │ -00026ce0: 636f 6e73 743c 2f73 7061 6e3e 203c 6120 const Una │ │ │ -00026d40: 7279 3c2f 613e 2661 6d70 3b20 6f70 293c ry& op)< │ │ │ -00026d50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00026d60: 6f72 6422 3e20 636f 6e73 7420 3c2f 7370 ord"> const {
    .
    890 │ │ │ -00026dd0: 2020 203c 7370 616e 2063 6c61 7373 3d22 // It i │ │ │ -00026df0: 7320 756e 636c 6561 7220 7768 6174 2073 s unclear what s │ │ │ -00026e00: 686f 756c 6420 6861 7070 656e 2069 6620 hould happen if │ │ │ -00026e10: 7472 6565 2069 7320 656d 7074 793a 3c2f tree is empty:
    .
    < │ │ │ -00026e60: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00026e70: 6e6f 223e 2020 3839 313c 2f73 7061 6e3e no"> 891 │ │ │ -00026e80: 2020 2020 3c73 7061 6e20 636c 6173 733d if │ │ │ -00026ea0: 3c2f 7370 616e 3e20 2865 6d70 7479 2829 (empty() │ │ │ -00026eb0: 2920 7b3c 2f64 6976 3e0a 3c64 6976 2063 ) {
    .
    892 │ │ │ -00026f10: 2020 2020 3c73 7061 6e20 636c 6173 733d th │ │ │ -00026f30: 726f 773c 2f73 7061 6e3e 2073 7464 3a3a row std:: │ │ │ -00026f40: 7275 6e74 696d 655f 6572 726f 7228 3c2f runtime_error(.
    8 │ │ │ -00026fa0: 3933 3c2f 7370 616e 3e20 2020 2020 2020 93 │ │ │ -00026fb0: 2020 203c 7370 616e 2063 6c61 7373 3d22 & │ │ │ -00026fd0: 7175 6f74 3b44 6563 6973 696f 6e54 7265 quot;DecisionTre │ │ │ -00026fe0: 653a 3a61 7070 6c79 2875 6e61 7279 206f e::apply(unary o │ │ │ -00026ff0: 7029 2075 6e64 6566 696e 6564 2066 6f72 p) undefined for │ │ │ -00027000: 2065 6d70 7479 2074 7265 652e 2671 756f empty tree.&quo │ │ │ -00027010: 743b 3c2f 7370 616e 3e29 3b3c 2f64 6976 t;);
    .
    894< │ │ │ -00027070: 2f73 7061 6e3e 2020 2020 7d3c 2f64 6976 /span> }
    .
    895< │ │ │ -000270d0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> return De │ │ │ -00027130: 6369 7369 6f6e 5472 6565 3c2f 613e 2872 cisionTree(r │ │ │ -00027140: 6f6f 745f 2d26 6774 3b61 7070 6c79 286f oot_->apply(o │ │ │ -00027150: 7029 293b 3c2f 6469 763e 0a3c 6469 7620 p));
    .
    896 │ │ │ -000271b0: 207d 3c2f 6469 763e 0a3c 2f64 6976 3e0a }
    .
    . │ │ │ -000271c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    < │ │ │ -00027250: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00027260: 6e6f 223e 2020 3839 393c 2f73 7061 6e3e no"> 899 │ │ │ -00027270: 2020 3c73 7061 6e20 636c 6173 733d 226b template │ │ │ -00027290: 3c2f 7370 616e 3e20 266c 743b 3c73 7061 <typename L, typen │ │ │ -000272e0: 616d 653c 2f73 7061 6e3e 2059 2667 743b ame Y> │ │ │ -000272f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    . │ │ │ -000274a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -000274d0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 901 const Un │ │ │ -00027520: 6172 7941 7373 6967 6e6d 656e 7426 616d aryAssignment&am │ │ │ -00027530: 703b 206f 7029 3c73 7061 6e20 636c 6173 p; op) con │ │ │ -00027550: 7374 203c 2f73 7061 6e3e 7b3c 2f64 6976 st {
    .
    902< │ │ │ -000275b0: 2f73 7061 6e3e 2020 2020 3c73 7061 6e20 /span> │ │ │ -000275d0: 2f2f 2049 7420 6973 2075 6e63 6c65 6172 // It is unclear │ │ │ -000275e0: 2077 6861 7420 7368 6f75 6c64 2068 6170 what should hap │ │ │ -000275f0: 7065 6e20 6966 2074 7265 6520 6973 2065 pen if tree is e │ │ │ -00027600: 6d70 7479 3a3c 2f73 7061 6e3e 3c2f 6469 mpty:.
    903 │ │ │ -00027660: 3c2f 7370 616e 3e20 2020 203c 7370 616e if ( │ │ │ -00027690: 656d 7074 7928 2929 207b 3c2f 6469 763e empty()) {
    │ │ │ -000276a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -000276d0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 904 throw std::runtime_e │ │ │ -00027730: 7272 6f72 283c 2f64 6976 3e0a 3c64 6976 rror(
    .
    < │ │ │ -00027770: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00027780: 6e6f 223e 2020 3930 353c 2f73 7061 6e3e no"> 905 │ │ │ -00027790: 2020 2020 2020 2020 2020 3c73 7061 6e20 "Deci │ │ │ -000277c0: 7369 6f6e 5472 6565 3a3a 6170 706c 7928 sionTree::apply( │ │ │ -000277d0: 756e 6172 7920 6f70 2920 756e 6465 6669 unary op) undefi │ │ │ -000277e0: 6e65 6420 666f 7220 656d 7074 7920 7472 ned for empty tr │ │ │ -000277f0: 6565 2e26 7175 6f74 3b3c 2f73 7061 6e3e ee." │ │ │ -00027800: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    906 │ │ │ -00027860: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    907 │ │ │ -000278c0: 203c 6120 636c 6173 733d 2263 6f64 6520 Ass │ │ │ -000278f0: 6967 6e6d 656e 7426 6c74 3b4c 2667 743b ignment<L> │ │ │ -00027900: 3c2f 613e 2061 7373 6967 6e6d 656e 743b assignment; │ │ │ -00027910: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00027960: 2039 3038 3c2f 7370 616e 3e20 2020 203c 908 < │ │ │ -00027970: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -00027980: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ -00027990: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> DecisionTree< │ │ │ -000279d0: 2f61 3e28 726f 6f74 5f2d 2667 743b 6170 /a>(root_->ap │ │ │ -000279e0: 706c 7928 6f70 2c20 6173 7369 676e 6d65 ply(op, assignme │ │ │ -000279f0: 6e74 2929 3b3c 2f64 6976 3e0a 3c64 6976 nt));
    .
    < │ │ │ -00027a30: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -00027a40: 6e6f 223e 2020 3930 393c 2f73 7061 6e3e no"> 909 │ │ │ -00027a50: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ -00027a60: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -00027ad0: 6120 6964 3d22 6c30 3039 3131 2220 6e61 a id="l00911" na │ │ │ -00027ae0: 6d65 3d22 6c30 3039 3131 223e 3c2f 613e me="l00911"> │ │ │ -00027af0: 3c73 7061 6e20 636c 6173 733d 226c 696e 911 /****** │ │ │ -00027b30: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00027b40: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00027b50: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00027b60: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00027b70: 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e 3c2f ******/.
    9 │ │ │ -00027bd0: 3132 3c2f 7370 616e 3e20 203c 7370 616e 12 template │ │ │ -00027c00: 266c 743b 3c73 7061 6e20 636c 6173 733d <typena │ │ │ -00027c20: 6d65 3c2f 7370 616e 3e20 4c2c 203c 7370 me L, typename Y>
    .< │ │ │ -00027c60: 6469 7620 636c 6173 733d 2266 6f6c 646f div class="foldo │ │ │ -00027c70: 7065 6e22 2069 643d 2266 6f6c 646f 7065 pen" id="foldope │ │ │ -00027c80: 6e30 3039 3133 2220 6461 7461 2d73 7461 n00913" data-sta │ │ │ -00027c90: 7274 3d22 7b22 2064 6174 612d 656e 643d rt="{" data-end= │ │ │ -00027ca0: 227d 223e 0a3c 6469 7620 636c 6173 733d "}">.
    . │ │ │ -00027e70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ -00027f70: 2020 3931 353c 2f73 7061 6e3e 2020 2020 915 │ │ │ -00027f80: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // It is u │ │ │ -00027fa0: 6e63 6c65 6172 2077 6861 7420 7368 6f75 nclear what shou │ │ │ -00027fb0: 6c64 2068 6170 7065 6e20 6966 2065 6974 ld happen if eit │ │ │ -00027fc0: 6865 7220 7472 6565 2069 7320 656d 7074 her tree is empt │ │ │ -00027fd0: 793a 3c2f 7370 616e 3e3c 2f64 6976 3e0a y:
    . │ │ │ -00027fe0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ -000280d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    918 │ │ │ -000281c0: 2020 2020 2020 2020 203c 7370 616e 2063 "Decis │ │ │ -000281f0: 696f 6e54 7265 653a 3a61 7070 6c79 2862 ionTree::apply(b │ │ │ -00028200: 696e 6172 7920 6f70 2920 756e 6465 6669 inary op) undefi │ │ │ -00028210: 6e65 6420 666f 7220 656d 7074 7920 7472 ned for empty tr │ │ │ -00028220: 6565 732e 2671 756f 743b 3c2f 7370 616e ees.");
    .
    919 │ │ │ -00028290: 2020 7d3c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    920 │ │ │ -000282f0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // apply │ │ │ -00028310: 2074 6865 206f 7065 7261 746f 6e20 6f6e the operaton on │ │ │ -00028320: 2074 6865 2072 6f6f 7420 6f66 2062 6f74 the root of bot │ │ │ -00028330: 6820 6469 6167 7261 6d73 3c2f 7370 616e h diagrams
    .
    │ │ │ -00028390: 2020 3932 313c 2f73 7061 6e3e 2020 2020 921 │ │ │ -000283a0: 3c61 2063 6c61 7373 3d22 636f 6465 2068 │ │ │ -000283f0: 4e6f 6465 5074 723c 2f61 3e20 6820 3d20 NodePtr h = │ │ │ -00028400: 726f 6f74 5f2d 2667 743b 6170 706c 795f root_->apply_ │ │ │ -00028410: 665f 6f70 5f67 282a 672e 3c61 2063 6c61 f_op_g(*g.root_ │ │ │ -00028470: 3c2f 613e 2c20 6f70 293b 3c2f 6469 763e , op);
    │ │ │ -00028480: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -000284b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 922 / │ │ │ -000284f0: 2f20 6372 6561 7465 2061 206e 6577 2063 / create a new c │ │ │ -00028500: 6c61 7373 2077 6974 6820 7468 6520 7265 lass with the re │ │ │ -00028510: 7375 6c74 696e 6720 726f 6f74 2026 7175 sulting root &qu │ │ │ -00028520: 6f74 3b68 2671 756f 743b 3c2f 7370 616e ot;h"
    .
    │ │ │ -00028580: 2020 3932 333c 2f73 7061 6e3e 2020 2020 923 │ │ │ -00028590: 3c61 2063 6c61 7373 3d22 636f 6465 2068 Deci │ │ │ -000285c0: 7369 6f6e 5472 6565 3c2f 613e 2072 6573 sionTree res │ │ │ -000285d0: 756c 7428 6829 3b3c 2f64 6976 3e0a 3c64 ult(h);
    . │ │ │ -000285f0: 3c61 2069 643d 226c 3030 3932 3422 206e 924 │ │ │ -00028650: 7265 7475 726e 3c2f 7370 616e 3e20 7265 return re │ │ │ -00028660: 7375 6c74 3b3c 2f64 6976 3e0a 3c64 6976 sult;
    .
    < │ │ │ -000286a0: 7370 616e 2063 6c61 7373 3d22 6c69 6e65 span class="line │ │ │ -000286b0: 6e6f 223e 2020 3932 353c 2f73 7061 6e3e no"> 925 │ │ │ -000286c0: 2020 7d3c 2f64 6976 3e0a 3c2f 6469 763e }
    .
    │ │ │ -000286d0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -00028740: 6120 6964 3d22 6c30 3039 3237 2220 6e61 a id="l00927" na │ │ │ -00028750: 6d65 3d22 6c30 3039 3237 223e 3c2f 613e me="l00927"> │ │ │ -00028760: 3c73 7061 6e20 636c 6173 733d 226c 696e 927 /****** │ │ │ -000287a0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000287b0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000287c0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000287d0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -000287e0: 2a2a 2a2a 2a2a 2f3c 2f73 7061 6e3e 3c2f ******/.
    9 │ │ │ -00028840: 3238 3c2f 7370 616e 3e20 203c 7370 616e 28 // The way this │ │ │ -00028870: 2077 6f72 6b73 3a3c 2f73 7061 6e3e 3c2f works:.
    9 │ │ │ -000288d0: 3239 3c2f 7370 616e 3e20 203c 7370 616e 29 // We have an A │ │ │ -00028900: 4454 2c20 7069 6374 7572 6520 6974 2061 DT, picture it a │ │ │ -00028910: 7320 6120 7472 6565 2e3c 2f73 7061 6e3e s a tree. │ │ │ -00028920: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00028970: 2039 3330 3c2f 7370 616e 3e20 203c 7370 930 // At a certa │ │ │ -000289a0: 696e 2064 6570 7468 2c20 7765 2068 6176 in depth, we hav │ │ │ -000289b0: 6520 6120 6272 616e 6368 206f 6e20 2671 e a branch on &q │ │ │ -000289c0: 756f 743b 6c61 6265 6c26 7175 6f74 3b2e uot;label". │ │ │ -000289d0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ -000289f0: 3c61 2069 643d 226c 3030 3933 3122 206e 931 // The │ │ │ -00028a50: 2066 756e 6374 696f 6e20 2671 756f 743b function " │ │ │ -00028a60: 6368 6f6f 7365 286c 6162 656c 2c69 6e64 choose(label,ind │ │ │ -00028a70: 6578 2926 7175 6f74 3b20 7769 6c6c 2072 ex)" will r │ │ │ -00028a80: 6574 7572 6e20 6120 7472 6565 206f 6620 eturn a tree of │ │ │ -00028a90: 6f6e 6520 6c65 7373 2064 6570 7468 2c3c one less depth,< │ │ │ -00028aa0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ -00028ac0: 6120 6964 3d22 6c30 3039 3332 2220 6e61 a id="l00932" na │ │ │ -00028ad0: 6d65 3d22 6c30 3039 3332 223e 3c2f 613e me="l00932"> │ │ │ -00028ae0: 3c73 7061 6e20 636c 6173 733d 226c 696e 932 // wher │ │ │ -00028b20: 6520 7468 6572 6520 6973 206e 6f20 6d6f e there is no mo │ │ │ -00028b30: 7265 2062 7261 6e63 6820 6f6e 2026 7175 re branch on &qu │ │ │ -00028b40: 6f74 3b6c 6162 656c 2671 756f 743b 3a20 ot;label": │ │ │ -00028b50: 6f6e 6c79 2074 6865 2073 7562 7472 6565 only the subtree │ │ │ -00028b60: 2075 6e64 6572 2074 6861 743c 2f73 7061 under that
    .
    933 < │ │ │ -00028bd0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ -00028be0: 656e 7422 3e2f 2f20 6272 616e 6368 2070 ent">// branch p │ │ │ -00028bf0: 6f69 6e74 2063 6f72 7265 7370 6f6e 6469 oint correspondi │ │ │ -00028c00: 6e67 2074 6f20 7468 6520 7661 6c75 6520 ng to the value │ │ │ -00028c10: 2671 756f 743b 696e 6465 7826 7175 6f74 "index" │ │ │ -00028c20: 3b20 6973 206c 6566 7420 696e 7374 6561 ; is left instea │ │ │ -00028c30: 642e 3c2f 7370 616e 3e3c 2f64 6976 3e0a d.
    . │ │ │ -00028c40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    . │ │ │ -00028d20: 3c61 2069 643d 226c 3030 3933 3522 206e 935 // Thi │ │ │ -00028d80: 7320 696d 706c 656d 656e 7473 206d 6172 s implements mar │ │ │ -00028d90: 6769 6e61 6c69 7a61 7469 6f6e 2069 6e20 ginalization in │ │ │ -00028da0: 4461 7277 6963 6865 3039 626f 6f6b 2c20 Darwiche09book, │ │ │ -00028db0: 7067 2033 3330 3c2f 7370 616e 3e3c 2f64 pg 330.
    93 │ │ │ -00028e10: 363c 2f73 7061 6e3e 2020 3c73 7061 6e20 6 │ │ │ -00028e30: 7465 6d70 6c61 7465 3c2f 7370 616e 3e26 template& │ │ │ -00028e40: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;typenam │ │ │ -00028e60: 653c 2f73 7061 6e3e 204c 2c20 3c73 7061 e L, typename Y>
    ...
    938 │ │ │ -000290d0: 2020 2020 3c73 7061 6e20 636c 6173 733d si │ │ │ -000290f0: 7a65 5f74 3c2f 7370 616e 3e20 6361 7264 ze_t card │ │ │ -00029100: 696e 616c 6974 792c 203c 7370 616e 2063 inality, c │ │ │ -00029120: 6f6e 7374 3c2f 7370 616e 3e20 4269 6e61 onst Bina │ │ │ -00029130: 7279 2661 6d70 3b20 6f70 293c 7370 616e ry& op) const { │ │ │ -00029160: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -000291b0: 2039 3339 3c2f 7370 616e 3e20 2020 203c 939 < │ │ │ -000291c0: 6120 636c 6173 733d 2263 6f64 6520 686c a class="code hl │ │ │ -000291d0: 5f63 6c61 7373 2220 6872 6566 3d22 6130 _class" href="a0 │ │ │ -000291e0: 3237 3936 2e68 746d 6c22 3e44 6563 6973 2796.html">Decis │ │ │ -000291f0: 696f 6e54 7265 653c 2f61 3e20 7265 7375 ionTree resu │ │ │ -00029200: 6c74 203d 2063 686f 6f73 6528 6c61 6265 lt = choose(labe │ │ │ -00029210: 6c2c 2030 293b 3c2f 6469 763e 0a3c 6469 l, 0);
    .< │ │ │ -00029230: 6120 6964 3d22 6c30 3039 3430 2220 6e61 a id="l00940" na │ │ │ -00029240: 6d65 3d22 6c30 3039 3430 223e 3c2f 613e me="l00940"> │ │ │ -00029250: 3c73 7061 6e20 636c 6173 733d 226c 696e 940 f │ │ │ -00029290: 6f72 3c2f 7370 616e 3e20 283c 7370 616e or (size_t index = 1; in │ │ │ -000292d0: 6465 7820 266c 743b 2063 6172 6469 6e61 dex < cardina │ │ │ -000292e0: 6c69 7479 3b20 696e 6465 782b 2b29 207b lity; index++) { │ │ │ -000292f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00029340: 2039 3431 3c2f 7370 616e 3e20 2020 2020 941 │ │ │ -00029350: 203c 6120 636c 6173 733d 2263 6f64 6520 Dec │ │ │ -00029380: 6973 696f 6e54 7265 653c 2f61 3e20 6368 isionTree ch │ │ │ -00029390: 6f73 656e 203d 2063 686f 6f73 6528 6c61 osen = choose(la │ │ │ -000293a0: 6265 6c2c 2069 6e64 6578 293b 3c2f 6469 bel, index);.
    942 │ │ │ -00029400: 3c2f 7370 616e 3e20 2020 2020 2072 6573 res │ │ │ -00029410: 756c 7420 3d20 7265 7375 6c74 2e61 7070 ult = result.app │ │ │ -00029420: 6c79 2863 686f 7365 6e2c 206f 7029 3b3c ly(chosen, op);< │ │ │ -00029430: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00029480: 3934 333c 2f73 7061 6e3e 2020 2020 7d3c 943 }< │ │ │ -00029490: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -000294e0: 3934 343c 2f73 7061 6e3e 2020 2020 3c73 944 return result;.
    94 │ │ │ -00029570: 353c 2f73 7061 6e3e 2020 7d3c 2f64 6976 5 }
    .
    .
    946 .
    9 │ │ │ -00029630: 3437 3c2f 7370 616e 3e3c 7370 616e 2063 47 │ │ │ -00029650: 202f 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a /************** │ │ │ -00029660: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00029670: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00029680: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -00029690: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2f3c **************/< │ │ │ -000296a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ -000296c0: 6120 6964 3d22 6c30 3039 3438 2220 6e61 a id="l00948" na │ │ │ -000296d0: 6d65 3d22 6c30 3039 3438 223e 3c2f 613e me="l00948"> │ │ │ -000296e0: 3c73 7061 6e20 636c 6173 733d 226c 696e 948 templat │ │ │ -00029720: 653c 2f73 7061 6e3e 2026 6c74 3b3c 7370 e <typename
    L, type │ │ │ -00029770: 6e61 6d65 3c2f 7370 616e 3e20 5926 6774 name Y> │ │ │ -00029780: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    . │ │ │ -000297e0: 3c61 2069 643d 226c 3030 3934 3922 206e 949 │ │ │ -00029860: 3c2f 613e 3c2f 7370 616e 3e20 203c 7370 void DecisionTree │ │ │ -000298f0: 266c 743b 4c2c 2059 2667 743b 3a3a 646f <L, Y>::do │ │ │ -00029900: 743c 2f61 3e28 7374 643a 3a6f 7374 7265 t(std::ostre │ │ │ -00029910: 616d 2661 6d70 3b20 6f73 2c3c 2f64 6976 am& os,
    .
    950< │ │ │ -00029970: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ -00029980: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -00029990: 2020 2020 203c 7370 616e 2063 6c61 7373 const │ │ │ -000299b0: 3c2f 7370 616e 3e20 4c61 6265 6c46 6f72 LabelFor │ │ │ -000299c0: 6d61 7474 6572 2661 6d70 3b20 6c61 6265 matter& labe │ │ │ -000299d0: 6c46 6f72 6d61 7474 6572 2c3c 2f64 6976 lFormatter,
    .
    951< │ │ │ -00029a30: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ -00029a40: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -00029a50: 2020 2020 203c 7370 616e 2063 6c61 7373 const │ │ │ -00029a70: 3c2f 7370 616e 3e20 5661 6c75 6546 6f72 ValueFor │ │ │ -00029a80: 6d61 7474 6572 2661 6d70 3b20 7661 6c75 matter& valu │ │ │ -00029a90: 6546 6f72 6d61 7474 6572 2c3c 2f64 6976 eFormatter,
    .
    952< │ │ │ -00029af0: 2f73 7061 6e3e 2020 2020 2020 2020 2020 /span> │ │ │ -00029b00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -00029b10: 2020 2020 203c 7370 616e 2063 6c61 7373 b │ │ │ -00029b30: 6f6f 6c3c 2f73 7061 6e3e 2073 686f 775a ool showZ │ │ │ -00029b40: 6572 6f29 3c73 7061 6e20 636c 6173 733d ero) const │ │ │ -00029b60: 203c 2f73 7061 6e3e 7b3c 2f64 6976 3e0a {
    . │ │ │ -00029b70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    │ │ │ -00029c60: 2020 3935 343c 2f73 7061 6e3e 2020 2020 954 │ │ │ -00029c70: 726f 6f74 5f2d 2667 743b 646f 7428 6f73 root_->dot(os │ │ │ -00029c80: 2c20 6c61 6265 6c46 6f72 6d61 7474 6572 , labelFormatter │ │ │ -00029c90: 2c20 7661 6c75 6546 6f72 6d61 7474 6572 , valueFormatter │ │ │ -00029ca0: 2c20 7368 6f77 5a65 726f 293b 3c2f 6469 , showZero);.
    955 │ │ │ -00029d00: 3c2f 7370 616e 3e20 2020 206f 7320 266c os &l │ │ │ -00029d10: 743b 266c 743b 203c 7370 616e 2063 6c61 t;< " [order │ │ │ -00029d40: 696e 673d 6f75 745d 7d26 7175 6f74 3b3c ing=out]}"< │ │ │ -00029d50: 2f73 7061 6e3e 2026 6c74 3b26 6c74 3b20 /span> << │ │ │ -00029d60: 7374 643a 3a65 6e64 6c3b 3c2f 6469 763e std::endl;
    │ │ │ -00029d70: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -00029dd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -00029e20: 3935 373c 2f73 7061 6e3e 203c 2f64 6976 957
    .
    958< │ │ │ -00029e80: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> te │ │ │ -00029ea0: 6d70 6c61 7465 3c2f 7370 616e 3e20 266c mplate &l │ │ │ -00029eb0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;typename │ │ │ -00029ed0: 3c2f 7370 616e 3e20 4c2c 203c 7370 616e L, typename │ │ │ -00029f00: 2059 2667 743b 3c2f 6469 763e 0a3c 6469 Y>
    ..
    │ │ │ -00029fe0: 2020 3935 393c 2f61 3e3c 2f73 7061 6e3e 959 │ │ │ -00029ff0: 2020 3c73 7061 6e20 636c 6173 733d 226b void │ │ │ -0002a010: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 Decisio │ │ │ -0002a070: 6e54 7265 6526 6c74 3b4c 2c20 5926 6774 nTree<L, Y> │ │ │ -0002a080: 3b3a 3a64 6f74 3c2f 613e 283c 7370 616e ;::dot(const st │ │ │ -0002a0b0: 643a 3a73 7472 696e 6726 616d 703b 206e d::string& n │ │ │ -0002a0c0: 616d 652c 3c2f 6469 763e 0a3c 6469 7620 ame,
    .
    960 │ │ │ -0002a120: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0002a130: 2020 2020 2020 2020 2020 2020 2020 3c73 const │ │ │ -0002a160: 204c 6162 656c 466f 726d 6174 7465 7226 LabelFormatter& │ │ │ -0002a170: 616d 703b 206c 6162 656c 466f 726d 6174 amp; labelFormat │ │ │ -0002a180: 7465 722c 3c2f 6469 763e 0a3c 6469 7620 ter,
    .
    961 │ │ │ -0002a1e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0002a1f0: 2020 2020 2020 2020 2020 2020 2020 3c73 const │ │ │ -0002a220: 2056 616c 7565 466f 726d 6174 7465 7226 ValueFormatter& │ │ │ -0002a230: 616d 703b 2076 616c 7565 466f 726d 6174 amp; valueFormat │ │ │ -0002a240: 7465 722c 3c2f 6469 763e 0a3c 6469 7620 ter,
    .
    962 │ │ │ -0002a2a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0002a2b0: 2020 2020 2020 2020 2020 2020 2020 3c73 bool showZero) const {
    .
    963 │ │ │ -0002a370: 2073 7464 3a3a 6f66 7374 7265 616d 206f std::ofstream o │ │ │ -0002a380: 7328 286e 616d 6520 2b20 3c73 7061 6e20 s((name + ".dot │ │ │ -0002a3b0: 2671 756f 743b 3c2f 7370 616e 3e29 2e63 ").c │ │ │ -0002a3c0: 5f73 7472 2829 293b 3c2f 6469 763e 0a3c _str());
    .< │ │ │ -0002a3d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ -0002a3e0: 3e3c 6120 6964 3d22 6c30 3039 3634 2220 > 964 dot( │ │ │ -0002a480: 6f73 2c20 6c61 6265 6c46 6f72 6d61 7474 os, labelFormatt │ │ │ -0002a490: 6572 2c20 7661 6c75 6546 6f72 6d61 7474 er, valueFormatt │ │ │ -0002a4a0: 6572 2c20 7368 6f77 5a65 726f 293b 3c2f er, showZero);.
    9 │ │ │ -0002a500: 3635 3c2f 7370 616e 3e20 2020 203c 7370 65 int result =
    │ │ │ -0002a540: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -0002a570: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 966 sys │ │ │ -0002a5a0: 7465 6d28 283c 7370 616e 2063 6c61 7373 tem(("dot -Tpdf │ │ │ -0002a5d0: 2026 7175 6f74 3b3c 2f73 7061 6e3e 202b " + │ │ │ -0002a5e0: 206e 616d 6520 2b20 3c73 7061 6e20 636c name + ".dot - │ │ │ -0002a610: 6f20 2671 756f 743b 3c2f 7370 616e 3e20 o " │ │ │ -0002a620: 2b20 6e61 6d65 202b 203c 7370 616e 2063 + name + ".pdf │ │ │ -0002a650: 2667 743b 2661 6d70 3b20 2f64 6576 2f6e >& /dev/n │ │ │ -0002a660: 756c 6c26 7175 6f74 3b3c 2f73 7061 6e3e ull" │ │ │ -0002a670: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    │ │ │ -0002a6c0: 2020 3936 373c 2f73 7061 6e3e 2020 2020 967 │ │ │ -0002a6d0: 2020 2020 2020 2020 2020 2020 2020 202e . │ │ │ -0002a6e0: 635f 7374 7228 2929 3b3c 2f64 6976 3e0a c_str());
    . │ │ │ -0002a6f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ -0002a780: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ -0002a7b0: 3c2f 613e 3c73 7061 6e20 636c 6173 733d 969 throw std::runtime_e │ │ │ -0002a810: 7272 6f72 283c 7370 616e 2063 6c61 7373 rror("DecisionT │ │ │ -0002a840: 7265 653a 3a64 6f74 2073 7973 7465 6d20 ree::dot system │ │ │ -0002a850: 6361 6c6c 2066 6169 6c65 6426 7175 6f74 call failed" │ │ │ -0002a860: 3b3c 2f73 7061 6e3e 293b 3c2f 6469 763e ;);
    │ │ │ -0002a870: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ -0002a8d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ -0002a920: 3937 313c 2f73 7061 6e3e 203c 2f64 6976 971
    .
    972< │ │ │ -0002a980: 2f73 7061 6e3e 2020 3c73 7061 6e20 636c /span> te │ │ │ -0002a9a0: 6d70 6c61 7465 3c2f 7370 616e 3e20 266c mplate &l │ │ │ -0002a9b0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;typename │ │ │ -0002a9d0: 3c2f 7370 616e 3e20 4c2c 203c 7370 616e L, typename │ │ │ -0002aa00: 2059 2667 743b 3c2f 6469 763e 0a3c 6469 Y>
    ..
    │ │ │ -0002aae0: 2020 3937 333c 2f61 3e3c 2f73 7061 6e3e 973 │ │ │ -0002aaf0: 2020 7374 643a 3a73 7472 696e 6720 3c61 std::string D │ │ │ -0002ab50: 6563 6973 696f 6e54 7265 6526 6c74 3b4c ecisionTree<L │ │ │ -0002ab60: 2c20 5926 6774 3b3a 3a64 6f74 3c2f 613e , Y>::dot │ │ │ -0002ab70: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (const LabelFormatt │ │ │ -0002aba0: 6572 2661 6d70 3b20 6c61 6265 6c46 6f72 er& labelFor │ │ │ -0002abb0: 6d61 7474 6572 2c3c 2f64 6976 3e0a 3c64 matter,
    . │ │ │ -0002abd0: 3c61 2069 643d 226c 3030 3937 3422 206e 974 │ │ │ -0002ac20: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0002ac30: 2020 2020 2020 2020 3c73 7061 6e20 636c co │ │ │ -0002ac50: 6e73 743c 2f73 7061 6e3e 2056 616c 7565 nst Value │ │ │ -0002ac60: 466f 726d 6174 7465 7226 616d 703b 2076 Formatter& v │ │ │ -0002ac70: 616c 7565 466f 726d 6174 7465 722c 3c2f alueFormatter,.
    9 │ │ │ -0002acd0: 3735 3c2f 7370 616e 3e20 2020 2020 2020 75 │ │ │ -0002ace0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ -0002acf0: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ -0002ad00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ -0002ad10: 6f72 6474 7970 6522 3e62 6f6f 6c3c 2f73 ordtype">bool showZero) const {
    .
    976 │ │ │ -0002adb0: 2020 7374 643a 3a73 7472 696e 6773 7472 std::stringstr │ │ │ -0002adc0: 6561 6d20 7373 3b3c 2f64 6976 3e0a 3c64 eam ss;
    . │ │ │ -0002ade0: 3c61 2069 643d 226c 3030 3937 3722 206e 977 dot(s │ │ │ -0002ae80: 732c 206c 6162 656c 466f 726d 6174 7465 s, labelFormatte │ │ │ -0002ae90: 722c 2076 616c 7565 466f 726d 6174 7465 r, valueFormatte │ │ │ -0002aea0: 722c 2073 686f 775a 6572 6f29 3b3c 2f64 r, showZero);.
    97 │ │ │ -0002af00: 383c 2f73 7061 6e3e 2020 2020 3c73 7061 8 return ss.str();.
    97 │ │ │ -0002af90: 393c 2f73 7061 6e3e 2020 7d3c 2f64 6976 9 }
    .
    .
    980 .
    9 │ │ │ -0002b050: 3831 3c2f 7370 616e 3e3c 7370 616e 2063 81/ │ │ │ -0002b070: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -0002b080: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -0002b090: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -0002b0a0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a **************** │ │ │ -0002b0b0: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2f3c **************/< │ │ │ -0002b0c0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ -0002b0e0: 6120 6964 3d22 6c30 3039 3832 2220 6e61 a id="l00982" na │ │ │ -0002b0f0: 6d65 3d22 6c30 3039 3832 223e 3c2f 613e me="l00982"> │ │ │ -0002b100: 3c73 7061 6e20 636c 6173 733d 226c 696e 982
    .
    983 } │ │ │ -0002b180: 2020 3c73 7061 6e20 636c 6173 733d 2263 // names │ │ │ -0002b1a0: 7061 6365 2067 7473 616d 3c2f 7370 616e pace gtsam
    .
    .< │ │ │ -0002b1c0: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 2f64 /div>.
    ..
    .
    .
    .
    . │ │ │ -0002b1f0: 3c2f 6469 763e 0a3c 2f64 6976 3e0a 3c2f
    .
    ..
    ..
    .
    │ │ │ -0002b220: 0a3c 2f64 6976 3e0a 3c2f 6469 763e 0a3c .
    .
    .< │ │ │ -0002b230: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 2f64 /div>.
    ..
    .
    .
    .
    . │ │ │ -0002b260: 3c2f 6469 763e 0a3c 2f64 6976 3e0a 3c2f
    .
    ..
    ..
    .
    │ │ │ -0002b290: 0a3c 2f64 6976 3e0a 3c2f 6469 763e 0a3c .
    .
    .< │ │ │ -0002b2a0: 2f64 6976 3e0a 3c2f 6469 763e 0a3c 2f64 /div>.
    ...
    Global function │ │ │ -0002b3e0: 7320 696e 2061 2073 6570 6172 6174 6520 s in a separate │ │ │ -0002b3f0: 7465 7374 696e 6720 6e61 6d65 7370 6163 testing namespac │ │ │ -0002b400: 652e 3c2f 6469 763e 3c64 6976 2063 6c61 e.
    De │ │ │ -0002b420: 6669 6e69 7469 6f6e 3c2f 623e 2063 6861 finition cha │ │ │ -0002b430: 7274 5465 7374 696e 672e 683a 3238 3c2f rtTesting.h:28
    .
    │ │ │ -0002b490: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    gtsa │ │ │ -0002b4e0: 6d3a 3a73 706c 6974 3c2f 613e 3c2f 6469 m::split
    void split │ │ │ -0002b510: 2863 6f6e 7374 2047 2026 616d 703b 672c (const G &g, │ │ │ -0002b520: 2063 6f6e 7374 2050 7265 6465 6365 7373 const Predecess │ │ │ -0002b530: 6f72 4d61 7026 6c74 3b20 4b45 5920 2667 orMap< KEY &g │ │ │ -0002b540: 743b 2026 616d 703b 7472 6565 2c20 4720 t; &tree, G │ │ │ -0002b550: 2661 6d70 3b41 6231 2c20 4720 2661 6d70 &Ab1, G & │ │ │ -0002b560: 3b41 6232 293c 2f64 6976 3e3c 6469 7620 ;Ab2)
    Sp │ │ │ -0002b580: 6c69 7420 7468 6520 6772 6170 6820 696e lit the graph in │ │ │ -0002b590: 746f 2074 776f 2070 6172 7473 3a20 6f6e to two parts: on │ │ │ -0002b5a0: 6520 636f 7272 6573 706f 6e64 7320 746f e corresponds to │ │ │ -0002b5b0: 2074 6865 2067 6976 656e 2073 7061 6e6e the given spann │ │ │ -0002b5c0: 696e 6720 7472 6565 2c20 616e 6420 7468 ing tree, and th │ │ │ -0002b5d0: 6520 6f74 6865 7220 636f 7272 6573 706f e other correspo │ │ │ -0002b5e0: 6e64 732e 2e2e 3c2f 6469 763e 3c64 6976 nds...
    < │ │ │ -0002b600: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ -0002b610: 2067 7261 7068 2d69 6e6c 2e68 3a32 3535 graph-inl.h:255 │ │ │ -0002b620: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    gt │ │ │ -0002b6c0: 7361 6d3a 3a64 6f74 3c2f 613e 3c2f 6469 sam::dot
    double dot │ │ │ -0002b6f0: 2863 6f6e 7374 2056 3120 2661 6d70 3b61 (const V1 &a │ │ │ -0002b700: 2c20 636f 6e73 7420 5632 2026 616d 703b , const V2 & │ │ │ -0002b710: 6229 3c2f 6469 763e 3c64 6976 2063 6c61 b)
    Dot p │ │ │ -0002b730: 726f 6475 6374 2e3c 2f64 6976 3e3c 6469 roduct.
    │ │ │ -0002b750: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition Vector.h:195
    .< │ │ │ -0002b7e0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ -0002b7f0: 223e 5465 6d70 6c61 7465 2074 6f20 6372 ">Template to cr │ │ │ -0002b800: 6561 7465 2061 2062 696e 6172 7920 7072 eate a binary pr │ │ │ -0002b810: 6564 6963 6174 652e 3c2f 6469 763e 3c64 edicate.
    Definition Testable.h:11 │ │ │ -0002b850: 313c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 1
    .
    gtsam │ │ │ -0002b8b0: 3a3a 4173 7369 676e 6d65 6e74 3c2f 613e ::Assignment │ │ │ -0002b8c0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    An assi │ │ │ -0002b8e0: 676e 6d65 6e74 2066 726f 6d20 6c61 6265 gnment from labe │ │ │ -0002b8f0: 6c73 2074 6f20 7661 6c75 6520 696e 6465 ls to value inde │ │ │ -0002b900: 7820 2873 697a 655f 7429 2e3c 2f64 6976 x (size_t).
    Definitio │ │ │ -0002b930: 6e3c 2f62 3e20 4173 7369 676e 6d65 6e74 n Assignment │ │ │ -0002b940: 2e68 3a33 373c 2f64 6976 3e3c 2f64 6976 .h:37
    .
    g │ │ │ -0002b9a0: 7473 616d 3a3a 4465 6369 7369 6f6e 5472 tsam::DecisionTr │ │ │ -0002b9b0: 6565 3a3a 4c65 6166 3c2f 613e 3c2f 6469 ee::Leaf
    Definiti │ │ │ -0002b9e0: 6f6e 3c2f 623e 2044 6563 6973 696f 6e54 on DecisionT │ │ │ -0002b9f0: 7265 652d 696e 6c2e 683a 3532 3c2f 6469 ree-inl.h:52
    .
    gtsam: │ │ │ -0002baa0: 3a44 6563 6973 696f 6e54 7265 653a 3a4c :DecisionTree::L │ │ │ -0002bab0: 6561 663a 3a63 686f 6f73 653c 2f61 3e3c eaf::choose< │ │ │ -0002bac0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    NodePtr │ │ │ -0002bae0: 2063 686f 6f73 6528 636f 6e73 7420 4c20 choose(const L │ │ │ -0002baf0: 2661 6d70 3b6c 6162 656c 2c20 7369 7a65 &label, size │ │ │ -0002bb00: 5f74 2069 6e64 6578 2920 636f 6e73 7420 _t index) const │ │ │ -0002bb10: 6f76 6572 7269 6465 3c2f 6469 763e 3c64 override
    choose a branch │ │ │ -0002bb40: 2c20 6372 6561 7465 206e 6577 206d 656d , create new mem │ │ │ -0002bb50: 6f72 7920 213c 2f64 6976 3e3c 6469 7620 ory !
    Definition │ │ │ -0002bb80: 4465 6369 7369 6f6e 5472 6565 2d69 6e6c DecisionTree-inl │ │ │ -0002bb90: 2e68 3a31 3439 3c2f 6469 763e 3c2f 6469 .h:149
    .
    gtsam::Decis │ │ │ -0002bc40: 696f 6e54 7265 653a 3a4c 6561 663a 3a6f ionTree::Leaf::o │ │ │ -0002bc50: 7065 7261 746f 7228 293c 2f61 3e3c 2f64 perator()
    const Y & │ │ │ -0002bc80: 616d 703b 206f 7065 7261 746f 7228 2928 amp; operator()( │ │ │ -0002bc90: 636f 6e73 7420 4173 7369 676e 6d65 6e74 const Assignment │ │ │ -0002bca0: 266c 743b 204c 2026 6774 3b20 2661 6d70 < L > & │ │ │ -0002bcb0: 3b78 2920 636f 6e73 7420 6f76 6572 7269 ;x) const overri │ │ │ -0002bcc0: 6465 3c2f 6469 763e 3c64 6976 2063 6c61 de
    evalu │ │ │ -0002bce0: 6174 653c 2f64 6976 3e3c 6469 7620 636c ate
    D │ │ │ -0002bd00: 6566 696e 6974 696f 6e3c 2f62 3e20 4465 efinition De │ │ │ -0002bd10: 6369 7369 6f6e 5472 6565 2d69 6e6c 2e68 cisionTree-inl.h │ │ │ -0002bd20: 3a31 3130 3c2f 6469 763e 3c2f 6469 763e :110
    │ │ │ -0002bd30: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    │ │ │ -0002be00: 4e6f 6465 5074 7220 6170 706c 7928 636f NodePtr apply(co │ │ │ -0002be10: 6e73 7420 556e 6172 7941 7373 6967 6e6d nst UnaryAssignm │ │ │ -0002be20: 656e 7420 2661 6d70 3b6f 702c 2063 6f6e ent &op, con │ │ │ -0002be30: 7374 2041 7373 6967 6e6d 656e 7426 6c74 st Assignment< │ │ │ -0002be40: 3b20 4c20 2667 743b 2026 616d 703b 6173 ; L > &as │ │ │ -0002be50: 7369 676e 6d65 6e74 2920 636f 6e73 7420 signment) const │ │ │ -0002be60: 6f76 6572 7269 6465 3c2f 6469 763e 3c64 override
    Apply unary ope │ │ │ -0002be90: 7261 746f 7220 7769 7468 2061 7373 6967 rator with assig │ │ │ -0002bea0: 6e6d 656e 742e 3c2f 6469 763e 3c64 6976 nment.
    < │ │ │ -0002bec0: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ -0002bed0: 2044 6563 6973 696f 6e54 7265 652d 696e DecisionTree-in │ │ │ -0002bee0: 6c2e 683a 3132 313c 2f64 6976 3e3c 2f64 l.h:121
    .
    │ │ │ -0002bfb0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    bool equals( │ │ │ -0002bfd0: 636f 6e73 7420 4e6f 6465 2026 616d 703b const Node & │ │ │ -0002bfe0: 712c 2063 6f6e 7374 2043 6f6d 7061 7265 q, const Compare │ │ │ -0002bff0: 4675 6e63 2026 616d 703b 636f 6d70 6172 Func &compar │ │ │ -0002c000: 6529 2063 6f6e 7374 206f 7665 7272 6964 e) const overrid │ │ │ -0002c010: 653c 2f64 6976 3e3c 6469 7620 636c 6173 e
    equali │ │ │ -0002c030: 7479 2075 7020 746f 2074 6f6c 6572 616e ty up to toleran │ │ │ -0002c040: 6365 3c2f 6469 763e 3c64 6976 2063 6c61 ce
    De │ │ │ -0002c060: 6669 6e69 7469 6f6e 3c2f 623e 2044 6563 finition Dec │ │ │ -0002c070: 6973 696f 6e54 7265 652d 696e 6c2e 683a isionTree-inl.h: │ │ │ -0002c080: 3837 3c2f 6469 763e 3c2f 6469 763e 0a3c 87
    .< │ │ │ -0002c090: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ -0002c0a0: 6964 3d22 6161 3032 3737 365f 6874 6d6c id="aa02776_html │ │ │ -0002c0b0: 5f61 3763 3231 6461 6661 6262 3566 6261 _a7c21dafabb5fba │ │ │ -0002c0c0: 3661 3661 6263 6362 3839 6564 3230 3739 6a6abccb89ed2079 │ │ │ -0002c0d0: 3563 223e 3c64 6976 2063 6c61 7373 3d22 5c">Y constant_
    constant s │ │ │ -0002c190: 746f 7265 6420 696e 2074 6869 7320 6c65 tored in this le │ │ │ -0002c1a0: 6166 3c2f 6469 763e 3c64 6976 2063 6c61 af
    De │ │ │ -0002c1c0: 6669 6e69 7469 6f6e 3c2f 623e 2044 6563 finition Dec │ │ │ -0002c1d0: 6973 696f 6e54 7265 652d 696e 6c2e 683a isionTree-inl.h: │ │ │ -0002c1e0: 3534 3c2f 6469 763e 3c2f 6469 763e 0a3c 54
    .< │ │ │ -0002c1f0: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ -0002c200: 6964 3d22 6161 3032 3737 365f 6874 6d6c id="aa02776_html │ │ │ -0002c210: 5f61 3835 6536 3464 6336 6431 6434 6534 _a85e64dc6d1d4e4 │ │ │ -0002c220: 3063 6135 3639 6439 3739 6236 3535 3433 0ca569d979b65543 │ │ │ -0002c230: 6535 223e 3c64 6976 2063 6c61 7373 3d22 e5">
    vo │ │ │ -0002c2c0: 6964 2070 7269 6e74 2863 6f6e 7374 2073 id print(const s │ │ │ -0002c2d0: 7464 3a3a 7374 7269 6e67 2026 616d 703b td::string & │ │ │ -0002c2e0: 732c 2063 6f6e 7374 204c 6162 656c 466f s, const LabelFo │ │ │ -0002c2f0: 726d 6174 7465 7220 2661 6d70 3b6c 6162 rmatter &lab │ │ │ -0002c300: 656c 466f 726d 6174 7465 722c 2063 6f6e elFormatter, con │ │ │ -0002c310: 7374 2056 616c 7565 466f 726d 6174 7465 st ValueFormatte │ │ │ -0002c320: 7220 2661 6d70 3b76 616c 7565 466f 726d r &valueForm │ │ │ -0002c330: 6174 7465 7229 2063 6f6e 7374 206f 7665 atter) const ove │ │ │ -0002c340: 7272 6964 653c 2f64 6976 3e3c 6469 7620 rride
    pr │ │ │ -0002c360: 696e 743c 2f64 6976 3e3c 6469 7620 636c int
    D │ │ │ -0002c380: 6566 696e 6974 696f 6e3c 2f62 3e20 4465 efinition De │ │ │ -0002c390: 6369 7369 6f6e 5472 6565 2d69 6e6c 2e68 cisionTree-inl.h │ │ │ -0002c3a0: 3a39 343c 2f64 6976 3e3c 2f64 6976 3e0a :94
    . │ │ │ -0002c3b0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    N │ │ │ -0002c480: 6f64 6550 7472 2061 7070 6c79 2863 6f6e odePtr apply(con │ │ │ -0002c490: 7374 2055 6e61 7279 2026 616d 703b 6f70 st Unary &op │ │ │ -0002c4a0: 2920 636f 6e73 7420 6f76 6572 7269 6465 ) const override │ │ │ -0002c4b0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    apply u │ │ │ -0002c4d0: 6e61 7279 206f 7065 7261 746f 723c 2f64 nary operator
    Definit │ │ │ -0002c500: 696f 6e3c 2f62 3e20 4465 6369 7369 6f6e ion Decision │ │ │ -0002c510: 5472 6565 2d69 6e6c 2e68 3a31 3135 3c2f Tree-inl.h:115
    .
    │ │ │ -0002c570: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 .
    < │ │ │ -0002c760: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ -0002c770: 6922 3e4c 6561 6628 636f 6e73 7420 5920 i">Leaf(const Y │ │ │ -0002c780: 2661 6d70 3b63 6f6e 7374 616e 742c 2073 &constant, s │ │ │ -0002c790: 697a 655f 7420 6e72 4173 7369 676e 6d65 ize_t nrAssignme │ │ │ -0002c7a0: 6e74 733d 3129 3c2f 6469 763e 3c64 6976 nts=1)
    C │ │ │ -0002c7c0: 6f6e 7374 7275 6374 6f72 2066 726f 6d20 onstructor from │ │ │ -0002c7d0: 636f 6e73 7461 6e74 2e3c 2f64 6976 3e3c constant.
    < │ │ │ -0002c7e0: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ -0002c7f0: 223e 3c62 3e44 6566 696e 6974 696f 6e3c ">Definition< │ │ │ -0002c800: 2f62 3e20 4465 6369 7369 6f6e 5472 6565 /b> DecisionTree │ │ │ -0002c810: 2d69 6e6c 2e68 3a36 353c 2f64 6976 3e3c -inl.h:65
    < │ │ │ -0002c820: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ -0002c880: 6120 6872 6566 3d22 6130 3237 3736 2e68 a href="a02776.h │ │ │ -0002c890: 746d 6c23 6162 3932 3036 3930 3338 3030 tml#ab9206903800 │ │ │ -0002c8a0: 3830 3735 3165 6138 3037 6535 6233 6365 80751ea807e5b3ce │ │ │ -0002c8b0: 3962 3638 3322 3e67 7473 616d 3a3a 4465 9b683">gtsam::De │ │ │ -0002c8c0: 6369 7369 6f6e 5472 6565 3a3a 4c65 6166 cisionTree::Leaf │ │ │ -0002c8d0: 3a3a 6e72 4173 7369 676e 6d65 6e74 735f ::nrAssignments_ │ │ │ -0002c8e0: 3c2f 613e 3c2f 6469 763e 3c64 6976 2063
    si │ │ │ -0002c900: 7a65 5f74 206e 7241 7373 6967 6e6d 656e ze_t nrAssignmen │ │ │ -0002c910: 7473 5f3c 2f64 6976 3e3c 6469 7620 636c ts_
    The │ │ │ -0002c930: 6e75 6d62 6572 206f 6620 6173 7369 676e number of assign │ │ │ -0002c940: 6d65 6e74 7320 636f 6e74 6169 6e65 6420 ments contained │ │ │ -0002c950: 7769 7468 696e 2074 6869 7320 6c65 6166 within this leaf │ │ │ -0002c960: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def │ │ │ -0002c980: 696e 6974 696f 6e3c 2f62 3e20 4465 6369 inition Deci │ │ │ -0002c990: 7369 6f6e 5472 6565 2d69 6e6c 2e68 3a35 sionTree-inl.h:5 │ │ │ -0002c9a0: 393c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 9
    .
    void │ │ │ -0002ca80: 646f 7428 7374 643a 3a6f 7374 7265 616d dot(std::ostream │ │ │ -0002ca90: 2026 616d 703b 6f73 2c20 636f 6e73 7420 &os, const │ │ │ -0002caa0: 4c61 6265 6c46 6f72 6d61 7474 6572 2026 LabelFormatter & │ │ │ -0002cab0: 616d 703b 6c61 6265 6c46 6f72 6d61 7474 amp;labelFormatt │ │ │ -0002cac0: 6572 2c20 636f 6e73 7420 5661 6c75 6546 er, const ValueF │ │ │ -0002cad0: 6f72 6d61 7474 6572 2026 616d 703b 7661 ormatter &va │ │ │ -0002cae0: 6c75 6546 6f72 6d61 7474 6572 2c20 626f lueFormatter, bo │ │ │ -0002caf0: 6f6c 2073 686f 775a 6572 6f29 2063 6f6e ol showZero) con │ │ │ -0002cb00: 7374 206f 7665 7272 6964 653c 2f64 6976 st override
    Write graphv │ │ │ -0002cb30: 697a 2066 6f72 6d61 7420 746f 2073 7472 iz format to str │ │ │ -0002cb40: 6561 6d20 6f73 2e3c 2f64 6976 3e3c 6469 eam os.
    │ │ │ -0002cb60: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition DecisionTree-i │ │ │ -0002cb80: 6e6c 2e68 3a31 3030 3c2f 6469 763e 3c2f nl.h:100
    .
    < │ │ │ -0002cc50: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ -0002cc60: 6922 3e4c 6561 6628 293c 2f64 6976 3e3c i">Leaf()
    < │ │ │ -0002cc70: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ -0002cc80: 223e 4465 6661 756c 7420 636f 6e73 7472 ">Default constr │ │ │ -0002cc90: 7563 746f 7220 666f 7220 7365 7269 616c uctor for serial │ │ │ -0002cca0: 697a 6174 696f 6e2e 3c2f 6469 763e 3c64 ization.
    Definition DecisionTree- │ │ │ -0002cce0: 696e 6c2e 683a 3632 3c2f 6469 763e 3c2f inl.h:62
    .
    gtsam::Dec │ │ │ -0002cd90: 6973 696f 6e54 7265 653a 3a4c 6561 663a isionTree::Leaf: │ │ │ -0002cda0: 3a73 616d 654c 6561 663c 2f61 3e3c 2f64 :sameLeaf
    bool same │ │ │ -0002cdd0: 4c65 6166 2863 6f6e 7374 204e 6f64 6520 Leaf(const Node │ │ │ -0002cde0: 2661 6d70 3b71 2920 636f 6e73 7420 6f76 &q) const ov │ │ │ -0002cdf0: 6572 7269 6465 3c2f 6469 763e 3c64 6976 erride
    p │ │ │ -0002ce10: 6f6c 796d 6f72 7068 6963 2065 7175 616c olymorphic equal │ │ │ -0002ce20: 6974 793a 2069 7320 7120 6120 6c65 6166 ity: is q a leaf │ │ │ -0002ce30: 2061 6e64 2069 7320 6974 2074 6865 2073 and is it the s │ │ │ -0002ce40: 616d 6520 6173 2074 6869 7320 6c65 6166 ame as this leaf │ │ │ -0002ce50: 3f3c 2f64 6976 3e3c 6469 7620 636c 6173 ?
    Def │ │ │ -0002ce70: 696e 6974 696f 6e3c 2f62 3e20 4465 6369 inition Deci │ │ │ -0002ce80: 7369 6f6e 5472 6565 2d69 6e6c 2e68 3a38 sionTree-inl.h:8 │ │ │ -0002ce90: 323c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 2
    .
    │ │ │ -0002cf70: 636f 6e73 7420 5920 2661 6d70 3b20 636f const Y & co │ │ │ -0002cf80: 6e73 7461 6e74 2829 2063 6f6e 7374 3c2f nstant() const
    Return th │ │ │ -0002cfb0: 6520 636f 6e73 7461 6e74 2e3c 2f64 6976 e constant.
    Definitio │ │ │ -0002cfe0: 6e3c 2f62 3e20 4465 6369 7369 6f6e 5472 n DecisionTr │ │ │ -0002cff0: 6565 2d69 6e6c 2e68 3a36 393c 2f64 6976 ee-inl.h:69
    .
    s │ │ │ -0002d0e0: 697a 655f 7420 6e72 4173 7369 676e 6d65 ize_t nrAssignme │ │ │ -0002d0f0: 6e74 7328 2920 636f 6e73 743c 2f64 6976 nts() const
    Return the n │ │ │ -0002d120: 756d 6265 7220 6f66 2061 7373 6967 6e6d umber of assignm │ │ │ -0002d130: 656e 7473 2063 6f6e 7461 696e 6564 2077 ents contained w │ │ │ -0002d140: 6974 6869 6e20 7468 6973 206c 6561 662e ithin this leaf. │ │ │ -0002d150: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ -0002d170: 6e69 7469 6f6e 3c2f 623e 2044 6563 6973 nition Decis │ │ │ -0002d180: 696f 6e54 7265 652d 696e 6c2e 683a 3734 ionTree-inl.h:74 │ │ │ -0002d190: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    . │ │ │ -0002d1c0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 < │ │ │ -0002d210: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ -0002d220: 223e 3c62 3e44 6566 696e 6974 696f 6e3c ">Definition< │ │ │ -0002d230: 2f62 3e20 4465 6369 7369 6f6e 5472 6565 /b> DecisionTree │ │ │ -0002d240: 2d69 6e6c 2e68 3a31 3732 3c2f 6469 763e -inl.h:172
    │ │ │ -0002d250: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -0002d2b0: 3c61 2068 7265 663d 2261 3032 3738 302e gtsam::D │ │ │ -0002d2f0: 6563 6973 696f 6e54 7265 653a 3a43 686f ecisionTree::Cho │ │ │ -0002d300: 6963 653a 3a61 7070 6c79 3c2f 613e 3c2f ice::apply
    NodePtr │ │ │ -0002d330: 6170 706c 7928 636f 6e73 7420 556e 6172 apply(const Unar │ │ │ -0002d340: 7920 2661 6d70 3b6f 7029 2063 6f6e 7374 y &op) const │ │ │ -0002d350: 206f 7665 7272 6964 653c 2f64 6976 3e3c override
    < │ │ │ -0002d360: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ -0002d370: 223e 6170 706c 7920 756e 6172 7920 6f70 ">apply unary op │ │ │ -0002d380: 6572 6174 6f72 2e3c 2f64 6976 3e3c 6469 erator.
    │ │ │ -0002d3a0: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition DecisionTree-i │ │ │ -0002d3c0: 6e6c 2e68 3a33 3839 3c2f 6469 763e 3c2f nl.h:389
    .
    gtsam::Dec │ │ │ -0002d470: 6973 696f 6e54 7265 653a 3a43 686f 6963 isionTree::Choic │ │ │ -0002d480: 653a 3a43 686f 6963 653c 2f61 3e3c 2f64 e::Choice
    Choice(co │ │ │ -0002d4b0: 6e73 7420 4c20 2661 6d70 3b6c 6162 656c nst L &label │ │ │ -0002d4c0: 2c20 636f 6e73 7420 4368 6f69 6365 2026 , const Choice & │ │ │ -0002d4d0: 616d 703b 662c 2063 6f6e 7374 2055 6e61 amp;f, const Una │ │ │ -0002d4e0: 7279 4173 7369 676e 6d65 6e74 2026 616d ryAssignment &am │ │ │ -0002d4f0: 703b 6f70 2c20 636f 6e73 7420 4173 7369 p;op, const Assi │ │ │ -0002d500: 676e 6d65 6e74 266c 743b 204c 2026 6774 gnment< L > │ │ │ -0002d510: 3b20 2661 6d70 3b61 7373 6967 6e6d 656e ; &assignmen │ │ │ -0002d520: 7429 3c2f 6469 763e 3c64 6976 2063 6c61 t)
    Const │ │ │ -0002d540: 7275 6374 6f72 2077 6869 6368 2061 6363 ructor which acc │ │ │ -0002d550: 6570 7473 2061 2055 6e61 7279 4173 7369 epts a UnaryAssi │ │ │ -0002d560: 676e 6d65 6e74 206f 7020 616e 6420 7468 gnment op and th │ │ │ -0002d570: 6520 636f 7272 6573 706f 6e64 696e 6720 e corresponding │ │ │ -0002d580: 6173 7369 676e 6d65 6e74 2e3c 2f64 6976 assignment.
    Definitio │ │ │ -0002d5b0: 6e3c 2f62 3e20 4465 6369 7369 6f6e 5472 n DecisionTr │ │ │ -0002d5c0: 6565 2d69 6e6c 2e68 3a33 3639 3c2f 6469 ee-inl.h:369
    .
    const │ │ │ -0002d6b0: 4c20 2661 6d70 3b20 6c61 6265 6c28 2920 L & label() │ │ │ -0002d6c0: 636f 6e73 743c 2f64 6976 3e3c 6469 7620 const
    Re │ │ │ -0002d6e0: 7475 726e 2074 6865 206c 6162 656c 206f turn the label o │ │ │ -0002d6f0: 6620 7468 6973 2063 686f 6963 6520 6e6f f this choice no │ │ │ -0002d700: 6465 2e3c 2f64 6976 3e3c 6469 7620 636c de.
    D │ │ │ -0002d720: 6566 696e 6974 696f 6e3c 2f62 3e20 4465 efinition De │ │ │ -0002d730: 6369 7369 6f6e 5472 6565 2d69 6e6c 2e68 cisionTree-inl.h │ │ │ -0002d740: 3a32 3538 3c2f 6469 763e 3c2f 6469 763e :258
    │ │ │ -0002d750: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    void print(con │ │ │ -0002d830: 7374 2073 7464 3a3a 7374 7269 6e67 2026 st std::string & │ │ │ -0002d840: 616d 703b 732c 2063 6f6e 7374 204c 6162 amp;s, const Lab │ │ │ -0002d850: 656c 466f 726d 6174 7465 7220 2661 6d70 elFormatter & │ │ │ -0002d860: 3b6c 6162 656c 466f 726d 6174 7465 722c ;labelFormatter, │ │ │ -0002d870: 2063 6f6e 7374 2056 616c 7565 466f 726d const ValueForm │ │ │ -0002d880: 6174 7465 7220 2661 6d70 3b76 616c 7565 atter &value │ │ │ -0002d890: 466f 726d 6174 7465 7229 2063 6f6e 7374 Formatter) const │ │ │ -0002d8a0: 206f 7665 7272 6964 653c 2f64 6976 3e3c override
    < │ │ │ -0002d8b0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ -0002d8c0: 223e 7072 696e 7420 2861 7320 6120 7472 ">print (as a tr │ │ │ -0002d8d0: 6565 292e 3c2f 6469 763e 3c64 6976 2063 ee).
    │ │ │ -0002d8f0: 4465 6669 6e69 7469 6f6e 3c2f 623e 2044 Definition D │ │ │ -0002d900: 6563 6973 696f 6e54 7265 652d 696e 6c2e ecisionTree-inl. │ │ │ -0002d910: 683a 3238 303c 2f64 6976 3e3c 2f64 6976 h:280
    .
    < │ │ │ -0002d9e0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ -0002d9f0: 6922 3e4e 6f64 6550 7472 2061 7070 6c79 i">NodePtr apply │ │ │ -0002da00: 2863 6f6e 7374 2055 6e61 7279 4173 7369 (const UnaryAssi │ │ │ -0002da10: 676e 6d65 6e74 2026 616d 703b 6f70 2c20 gnment &op, │ │ │ -0002da20: 636f 6e73 7420 4173 7369 676e 6d65 6e74 const Assignment │ │ │ -0002da30: 266c 743b 204c 2026 6774 3b20 2661 6d70 < L > & │ │ │ -0002da40: 3b61 7373 6967 6e6d 656e 7429 2063 6f6e ;assignment) con │ │ │ -0002da50: 7374 206f 7665 7272 6964 653c 2f64 6976 st override
    Apply unary │ │ │ -0002da80: 6f70 6572 6174 6f72 2077 6974 6820 6173 operator with as │ │ │ -0002da90: 7369 676e 6d65 6e74 2e3c 2f64 6976 3e3c signment.
    < │ │ │ -0002daa0: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ -0002dab0: 223e 3c62 3e44 6566 696e 6974 696f 6e3c ">Definition< │ │ │ -0002dac0: 2f62 3e20 4465 6369 7369 6f6e 5472 6565 /b> DecisionTree │ │ │ -0002dad0: 2d69 6e6c 2e68 3a33 3935 3c2f 6469 763e -inl.h:395
    │ │ │ -0002dae0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -0002db40: 3c61 2068 7265 663d 2261 3032 3738 302e gtsam::D │ │ │ -0002db80: 6563 6973 696f 6e54 7265 653a 3a43 686f ecisionTree::Cho │ │ │ -0002db90: 6963 653a 3a6c 6162 656c 5f3c 2f61 3e3c ice::label_< │ │ │ -0002dba0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    L label │ │ │ -0002dbc0: 5f3c 2f64 6976 3e3c 6469 7620 636c 6173 _
    the la │ │ │ -0002dbe0: 6265 6c20 6f66 2074 6865 2076 6172 6961 bel of the varia │ │ │ -0002dbf0: 626c 6520 6f6e 2077 6869 6368 2077 6520 ble on which we │ │ │ -0002dc00: 7370 6c69 743c 2f64 6976 3e3c 6469 7620 split
    Definition │ │ │ -0002dc30: 4465 6369 7369 6f6e 5472 6565 2d69 6e6c DecisionTree-inl │ │ │ -0002dc40: 2e68 3a31 3734 3c2f 6469 763e 3c2f 6469 .h:174
    .
    gtsam::Decis │ │ │ -0002dcf0: 696f 6e54 7265 653a 3a43 686f 6963 653a ionTree::Choice: │ │ │ -0002dd00: 3a73 616d 654c 6561 663c 2f61 3e3c 2f64 :sameLeaf
    bool same │ │ │ -0002dd30: 4c65 6166 2863 6f6e 7374 204e 6f64 6520 Leaf(const Node │ │ │ -0002dd40: 2661 6d70 3b71 2920 636f 6e73 7420 6f76 &q) const ov │ │ │ -0002dd50: 6572 7269 6465 3c2f 6469 763e 3c64 6976 erride
    p │ │ │ -0002dd70: 6f6c 796d 6f72 7068 6963 2065 7175 616c olymorphic equal │ │ │ -0002dd80: 6974 793a 2069 6620 7120 6973 2061 206c ity: if q is a l │ │ │ -0002dd90: 6561 662c 2063 6f75 6c64 2062 652e 2e2e eaf, could be... │ │ │ -0002dda0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ -0002ddc0: 6e69 7469 6f6e 3c2f 623e 2044 6563 6973 nition Decis │ │ │ -0002ddd0: 696f 6e54 7265 652d 696e 6c2e 683a 3331 ionTree-inl.h:31 │ │ │ -0002dde0: 383c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 8
    .
    │ │ │ -0002dec0: 4368 6f69 6365 2863 6f6e 7374 2043 686f Choice(const Cho │ │ │ -0002ded0: 6963 6520 2661 6d70 3b66 2c20 636f 6e73 ice &f, cons │ │ │ -0002dee0: 7420 4368 6f69 6365 2026 616d 703b 672c t Choice &g, │ │ │ -0002def0: 2063 6f6e 7374 2042 696e 6172 7920 2661 const Binary &a │ │ │ -0002df00: 6d70 3b6f 7029 3c2f 6469 763e 3c64 6976 mp;op)
    C │ │ │ -0002df20: 6f6e 7374 7275 6374 2066 726f 6d20 6170 onstruct from ap │ │ │ -0002df30: 706c 7969 6e67 2062 696e 6172 7920 6f70 plying binary op │ │ │ -0002df40: 2074 6f20 7477 6f20 4368 6f69 6365 206e to two Choice n │ │ │ -0002df50: 6f64 6573 2e3c 2f64 6976 3e3c 6469 7620 odes.
    Definition │ │ │ -0002df80: 4465 6369 7369 6f6e 5472 6565 2d69 6e6c DecisionTree-inl │ │ │ -0002df90: 2e68 3a32 3330 3c2f 6469 763e 3c2f 6469 .h:230
    .
    gtsam::Decis │ │ │ -0002e040: 696f 6e54 7265 653a 3a43 686f 6963 653a ionTree::Choice: │ │ │ -0002e050: 3a70 7573 685f 6261 636b 3c2f 613e 3c2f :push_back
    void pus │ │ │ -0002e080: 685f 6261 636b 2863 6f6e 7374 204e 6f64 h_back(const Nod │ │ │ -0002e090: 6550 7472 2026 616d 703b 6e6f 6465 293c ePtr &node)< │ │ │ -0002e0a0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    add a br │ │ │ -0002e0c0: 616e 6368 3a20 544f 444f 206d 6572 6765 anch: TODO merge │ │ │ -0002e0d0: 2069 6e74 6f20 636f 6e73 7472 7563 746f into constructo │ │ │ -0002e0e0: 723c 2f64 6976 3e3c 6469 7620 636c 6173 r
    Def │ │ │ -0002e100: 696e 6974 696f 6e3c 2f62 3e20 4465 6369 inition Deci │ │ │ -0002e110: 7369 6f6e 5472 6565 2d69 6e6c 2e68 3a32 sionTree-inl.h:2 │ │ │ -0002e120: 3731 3c2f 6469 763e 3c2f 6469 763e 0a3c 71
    .< │ │ │ -0002e130: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ -0002e140: 6964 3d22 6161 3032 3738 305f 6874 6d6c id="aa02780_html │ │ │ -0002e150: 5f61 6131 3132 3136 6433 3066 6131 6430 _aa11216d30fa1d0 │ │ │ -0002e160: 6162 6632 6634 6432 3666 3832 6331 6637 abf2f4d26f82c1f7 │ │ │ -0002e170: 3832 223e 3c64 6976 2063 6c61 7373 3d22 82"> │ │ │ -0002e1f0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    std::vector& │ │ │ -0002e210: 6c74 3b20 4e6f 6465 5074 7220 2667 743b lt; NodePtr > │ │ │ -0002e220: 2062 7261 6e63 6865 735f 3c2f 6469 763e branches_
    │ │ │ -0002e230: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    The children │ │ │ -0002e250: 6f66 2074 6869 7320 4368 6f69 6365 206e of this Choice n │ │ │ -0002e260: 6f64 652e 3c2f 6469 763e 3c64 6976 2063 ode.
    │ │ │ -0002e280: 4465 6669 6e69 7469 6f6e 3c2f 623e 2044 Definition D │ │ │ -0002e290: 6563 6973 696f 6e54 7265 652d 696e 6c2e ecisionTree-inl. │ │ │ -0002e2a0: 683a 3137 373c 2f64 6976 3e3c 2f64 6976 h:177
    .
    │ │ │ -0002e370: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Choice()
    Default con │ │ │ -0002e3b0: 7374 7275 6374 6f72 2066 6f72 2073 6572 structor for ser │ │ │ -0002e3c0: 6961 6c69 7a61 7469 6f6e 2e3c 2f64 6976 ialization.
    Definitio │ │ │ -0002e3f0: 6e3c 2f62 3e20 4465 6369 7369 6f6e 5472 n DecisionTr │ │ │ -0002e400: 6565 2d69 6e6c 2e68 3a31 3930 3c2f 6469 ee-inl.h:190
    .
    c │ │ │ -0002e4f0: 6f6e 7374 2059 2026 616d 703b 206f 7065 onst Y & ope │ │ │ -0002e500: 7261 746f 7228 2928 636f 6e73 7420 4173 rator()(const As │ │ │ -0002e510: 7369 676e 6d65 6e74 266c 743b 204c 2026 signment< L & │ │ │ -0002e520: 6774 3b20 2661 6d70 3b78 2920 636f 6e73 gt; &x) cons │ │ │ -0002e530: 7420 6f76 6572 7269 6465 3c2f 6469 763e t override
    │ │ │ -0002e540: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    evaluate
    Definitio │ │ │ -0002e580: 6e3c 2f62 3e20 4465 6369 7369 6f6e 5472 n DecisionTr │ │ │ -0002e590: 6565 2d69 6e6c 2e68 3a33 3336 3c2f 6469 ee-inl.h:336
    .
    Choic │ │ │ -0002e680: 6528 636f 6e73 7420 4c20 2661 6d70 3b6c e(const L &l │ │ │ -0002e690: 6162 656c 2c20 7369 7a65 5f74 2063 6f75 abel, size_t cou │ │ │ -0002e6a0: 6e74 293c 2f64 6976 3e3c 6469 7620 636c nt)
    Cons │ │ │ -0002e6c0: 7472 7563 746f 722c 2067 6976 656e 2063 tructor, given c │ │ │ -0002e6d0: 686f 6963 6520 6c61 6265 6c20 616e 6420 hoice label and │ │ │ -0002e6e0: 6d61 6e64 6174 6f72 7920 6578 7065 6374 mandatory expect │ │ │ -0002e6f0: 6564 2062 7261 6e63 6820 636f 756e 742e ed branch count. │ │ │ -0002e700: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ -0002e720: 6e69 7469 6f6e 3c2f 623e 2044 6563 6973 nition Decis │ │ │ -0002e730: 696f 6e54 7265 652d 696e 6c2e 683a 3232 ionTree-inl.h:22 │ │ │ -0002e740: 343c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 4
    .
    │ │ │ -0002e820: 4e6f 6465 5074 7220 6368 6f6f 7365 2863 NodePtr choose(c │ │ │ -0002e830: 6f6e 7374 204c 2026 616d 703b 6c61 6265 onst L &labe │ │ │ -0002e840: 6c2c 2073 697a 655f 7420 696e 6465 7829 l, size_t index) │ │ │ -0002e850: 2063 6f6e 7374 206f 7665 7272 6964 653c const override< │ │ │ -0002e860: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    choose a │ │ │ -0002e880: 2062 7261 6e63 682c 2072 6563 7572 7369 branch, recursi │ │ │ -0002e890: 7665 6c79 3c2f 6469 763e 3c64 6976 2063 vely
    │ │ │ -0002e8b0: 4465 6669 6e69 7469 6f6e 3c2f 623e 2044 Definition D │ │ │ -0002e8c0: 6563 6973 696f 6e54 7265 652d 696e 6c2e ecisionTree-inl. │ │ │ -0002e8d0: 683a 3433 343c 2f64 6976 3e3c 2f64 6976 h:434
    .
    void dot(std::o │ │ │ -0002e9c0: 7374 7265 616d 2026 616d 703b 6f73 2c20 stream &os, │ │ │ -0002e9d0: 636f 6e73 7420 4c61 6265 6c46 6f72 6d61 const LabelForma │ │ │ -0002e9e0: 7474 6572 2026 616d 703b 6c61 6265 6c46 tter &labelF │ │ │ -0002e9f0: 6f72 6d61 7474 6572 2c20 636f 6e73 7420 ormatter, const │ │ │ -0002ea00: 5661 6c75 6546 6f72 6d61 7474 6572 2026 ValueFormatter & │ │ │ -0002ea10: 616d 703b 7661 6c75 6546 6f72 6d61 7474 amp;valueFormatt │ │ │ -0002ea20: 6572 2c20 626f 6f6c 2073 686f 775a 6572 er, bool showZer │ │ │ -0002ea30: 6f29 2063 6f6e 7374 206f 7665 7272 6964 o) const overrid │ │ │ -0002ea40: 653c 2f64 6976 3e3c 6469 7620 636c 6173 e
    output │ │ │ -0002ea60: 2074 6f20 6772 6170 6876 697a 2028 6173 to graphviz (as │ │ │ -0002ea70: 2061 2061 2067 7261 7068 293c 2f64 6976 a a graph)
    Definitio │ │ │ -0002eaa0: 6e3c 2f62 3e20 4465 6369 7369 6f6e 5472 n DecisionTr │ │ │ -0002eab0: 6565 2d69 6e6c 2e68 3a32 3930 3c2f 6469 ee-inl.h:290
    .< │ │ │ -0002ec50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ -0002ecb0: 6120 6872 6566 3d22 6130 3237 3830 2e68 a href="a02780.h │ │ │ -0002ecc0: 746d 6c23 6166 3936 6332 3331 3633 3662 tml#af96c231636b │ │ │ -0002ecd0: 3534 3862 6234 6466 3934 3165 3564 3137 548bb4df941e5d17 │ │ │ -0002ece0: 3265 3032 6622 3e67 7473 616d 3a3a 4465 2e02f">gtsam::De │ │ │ -0002ecf0: 6369 7369 6f6e 5472 6565 3a3a 4368 6f69 cisionTree::Choi │ │ │ -0002ed00: 6365 3a3a 556e 6971 7565 3c2f 613e 3c2f ce::Unique
    static N │ │ │ -0002ed30: 6f64 6550 7472 2055 6e69 7175 6528 636f odePtr Unique(co │ │ │ -0002ed40: 6e73 7420 4368 6f69 6365 5074 7220 2661 nst ChoicePtr &a │ │ │ -0002ed50: 6d70 3b66 293c 2f64 6976 3e3c 6469 7620 mp;f)
    If │ │ │ -0002ed70: 2061 6c6c 2062 7261 6e63 6865 7320 6f66 all branches of │ │ │ -0002ed80: 2061 2063 686f 6963 6520 6e6f 6465 2066 a choice node f │ │ │ -0002ed90: 2061 7265 2074 6865 2073 616d 652c 206a are the same, j │ │ │ -0002eda0: 7573 7420 7265 7475 726e 2061 2062 7261 ust return a bra │ │ │ -0002edb0: 6e63 682e 3c2f 6469 763e 3c64 6976 2063 nch.
    │ │ │ -0002edd0: 4465 6669 6e69 7469 6f6e 3c2f 623e 2044 Definition D │ │ │ -0002ede0: 6563 6973 696f 6e54 7265 652d 696e 6c2e ecisionTree-inl. │ │ │ -0002edf0: 683a 3230 303c 2f64 6976 3e3c 2f64 6976 h:200
    .
    │ │ │ -0002eec0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    bool equals( │ │ │ -0002eee0: 636f 6e73 7420 4e6f 6465 2026 616d 703b const Node & │ │ │ -0002eef0: 712c 2063 6f6e 7374 2043 6f6d 7061 7265 q, const Compare │ │ │ -0002ef00: 4675 6e63 2026 616d 703b 636f 6d70 6172 Func &compar │ │ │ -0002ef10: 6529 2063 6f6e 7374 206f 7665 7272 6964 e) const overrid │ │ │ -0002ef20: 653c 2f64 6976 3e3c 6469 7620 636c 6173 e
    equali │ │ │ -0002ef40: 7479 3c2f 6469 763e 3c64 6976 2063 6c61 ty
    De │ │ │ -0002ef60: 6669 6e69 7469 6f6e 3c2f 623e 2044 6563 finition Dec │ │ │ -0002ef70: 6973 696f 6e54 7265 652d 696e 6c2e 683a isionTree-inl.h: │ │ │ -0002ef80: 3332 333c 2f64 6976 3e3c 2f64 6976 3e0a 323
    . │ │ │ -0002ef90: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    gts │ │ │ -0002efe0: 616d 3a3a 5669 7369 743c 2f61 3e3c 2f64 am::Visit
    Functor pe │ │ │ -0002f010: 7266 6f72 6d69 6e67 2064 6570 7468 2d66 rforming depth-f │ │ │ -0002f020: 6972 7374 2076 6973 6974 2074 6f20 6561 irst visit to ea │ │ │ -0002f030: 6368 206c 6561 6620 7769 7468 2074 6865 ch leaf with the │ │ │ -0002f040: 206c 6561 6620 7661 6c75 6520 6173 2074 leaf value as t │ │ │ -0002f050: 6865 2061 7267 756d 656e 742e 3c2f 6469 he argument.
    Definiti │ │ │ -0002f080: 6f6e 3c2f 623e 2044 6563 6973 696f 6e54 on DecisionT │ │ │ -0002f090: 7265 652d 696e 6c2e 683a 3731 353c 2f64 ree-inl.h:715
    .
    < │ │ │ -0002f0f0: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ -0002f100: 6522 3e3c 6120 6872 6566 3d22 6130 3237 e">gtsam │ │ │ -0002f140: 3a3a 5669 7369 743a 3a66 3c2f 613e 3c2f ::Visit::f
    F f
    folding func │ │ │ -0002f190: 7469 6f6e 206f 626a 6563 742e 3c2f 6469 tion object.
    Definiti │ │ │ -0002f1c0: 6f6e 3c2f 623e 2044 6563 6973 696f 6e54 on DecisionT │ │ │ -0002f1d0: 7265 652d 696e 6c2e 683a 3731 383c 2f64 ree-inl.h:718
    .
    < │ │ │ -0002f230: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ -0002f240: 6522 3e3c 6120 6872 6566 3d22 6130 3237 e">gtsam │ │ │ -0002f280: 3a3a 5669 7369 743a 3a6f 7065 7261 746f ::Visit::operato │ │ │ -0002f290: 7228 293c 2f61 3e3c 2f64 6976 3e3c 6469 r()
    void operator() │ │ │ -0002f2c0: 2863 6f6e 7374 2074 7970 656e 616d 6520 (const typename │ │ │ -0002f2d0: 4465 6369 7369 6f6e 5472 6565 266c 743b DecisionTree< │ │ │ -0002f2e0: 204c 2c20 5920 2667 743b 3a3a 4e6f 6465 L, Y >::Node │ │ │ -0002f2f0: 5074 7220 2661 6d70 3b6e 6f64 6529 2063 Ptr &node) c │ │ │ -0002f300: 6f6e 7374 3c2f 6469 763e 3c64 6976 2063 onst
    Do │ │ │ -0002f320: 6120 6465 7074 682d 6669 7273 7420 7669 a depth-first vi │ │ │ -0002f330: 7369 7420 6f6e 2074 6865 2074 7265 6520 sit on the tree │ │ │ -0002f340: 726f 6f74 6564 2061 7420 6e6f 6465 2e3c rooted at node.< │ │ │ -0002f350: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ -0002f370: 6974 696f 6e3c 2f62 3e20 4465 6369 7369 ition Decisi │ │ │ -0002f380: 6f6e 5472 6565 2d69 6e6c 2e68 3a37 3231 onTree-inl.h:721 │ │ │ -0002f390: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    V │ │ │ -0002f460: 6973 6974 2846 2066 293c 2f64 6976 3e3c isit(F f)
    < │ │ │ -0002f470: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ -0002f480: 223e 436f 6e73 7472 7563 7420 6672 6f6d ">Construct from │ │ │ -0002f490: 2066 6f6c 6469 6e67 2066 756e 6374 696f folding functio │ │ │ -0002f4a0: 6e2e 3c2f 6469 763e 3c64 6976 2063 6c61 n.
    De │ │ │ -0002f4c0: 6669 6e69 7469 6f6e 3c2f 623e 2044 6563 finition Dec │ │ │ -0002f4d0: 6973 696f 6e54 7265 652d 696e 6c2e 683a isionTree-inl.h: │ │ │ -0002f4e0: 3731 373c 2f64 6976 3e3c 2f64 6976 3e0a 717
    . │ │ │ -0002f4f0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    Functo │ │ │ -0002f570: 7220 7065 7266 6f72 6d69 6e67 2064 6570 r performing dep │ │ │ -0002f580: 7468 2d66 6972 7374 2076 6973 6974 2074 th-first visit t │ │ │ -0002f590: 6f20 6561 6368 206c 6561 6620 7769 7468 o each leaf with │ │ │ -0002f5a0: 2074 6865 204c 6561 6620 6f62 6a65 6374 the Leaf object │ │ │ -0002f5b0: 2070 6173 7365 6420 6173 2061 6e20 6172 passed as an ar │ │ │ -0002f5c0: 6775 6d65 6e74 2e3c 2f64 6976 3e3c 6469 gument.
    │ │ │ -0002f5e0: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition DecisionTree-i │ │ │ -0002f600: 6e6c 2e68 3a37 3532 3c2f 6469 763e 3c2f nl.h:752
    .
    V │ │ │ -0002f6e0: 6973 6974 4c65 6166 2846 2066 293c 2f64 isitLeaf(F f)
    Construct │ │ │ -0002f710: 6672 6f6d 2066 6f6c 6469 6e67 2066 756e from folding fun │ │ │ -0002f720: 6374 696f 6e2e 3c2f 6469 763e 3c64 6976 ction.
    < │ │ │ -0002f740: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ -0002f750: 2044 6563 6973 696f 6e54 7265 652d 696e DecisionTree-in │ │ │ -0002f760: 6c2e 683a 3735 343c 2f64 6976 3e3c 2f64 l.h:754
    .
    v │ │ │ -0002f840: 6f69 6420 6f70 6572 6174 6f72 2829 2863 oid operator()(c │ │ │ -0002f850: 6f6e 7374 2074 7970 656e 616d 6520 4465 onst typename De │ │ │ -0002f860: 6369 7369 6f6e 5472 6565 266c 743b 204c cisionTree< L │ │ │ -0002f870: 2c20 5920 2667 743b 3a3a 4e6f 6465 5074 , Y >::NodePt │ │ │ -0002f880: 7220 2661 6d70 3b6e 6f64 6529 2063 6f6e r &node) con │ │ │ -0002f890: 7374 3c2f 6469 763e 3c64 6976 2063 6c61 st
    Do a │ │ │ -0002f8b0: 6465 7074 682d 6669 7273 7420 7669 7369 depth-first visi │ │ │ -0002f8c0: 7420 6f6e 2074 6865 2074 7265 6520 726f t on the tree ro │ │ │ -0002f8d0: 6f74 6564 2061 7420 6e6f 6465 2e3c 2f64 oted at node.
    Definit │ │ │ -0002f900: 696f 6e3c 2f62 3e20 4465 6369 7369 6f6e ion Decision │ │ │ -0002f910: 5472 6565 2d69 6e6c 2e68 3a37 3538 3c2f Tree-inl.h:758
    ..< │ │ │ -0002fa70: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ -0002fa80: 6964 3d22 6161 3032 3739 325f 6874 6d6c id="aa02792_html │ │ │ -0002fa90: 223e 3c64 6976 2063 6c61 7373 3d22 7474 ">
    gtsa │ │ │ -0002fac0: 6d3a 3a56 6973 6974 5769 7468 3c2f 613e m::VisitWith │ │ │ -0002fad0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Functor │ │ │ -0002faf0: 2070 6572 666f 726d 696e 6720 6465 7074 performing dept │ │ │ -0002fb00: 682d 6669 7273 7420 7669 7369 7420 746f h-first visit to │ │ │ -0002fb10: 2065 6163 6820 6c65 6166 2077 6974 6820 each leaf with │ │ │ -0002fb20: 7468 6520 6c65 6166 2773 2041 7373 6967 the leaf's Assig │ │ │ -0002fb30: 6e6d 656e 7426 6c74 3b4c 2667 743b 2061 nment<L> a │ │ │ -0002fb40: 6e64 2076 616c 7565 2070 6173 7365 6420 nd value passed │ │ │ -0002fb50: 6173 2061 2e2e 2e3c 2f64 6976 3e3c 6469 as a...
    │ │ │ -0002fb70: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition DecisionTree-i │ │ │ -0002fb90: 6e6c 2e68 3a37 3836 3c2f 6469 763e 3c2f nl.h:786
    .
    V │ │ │ -0002fc70: 6973 6974 5769 7468 2846 2066 293c 2f64 isitWith(F f)
    Construct │ │ │ -0002fca0: 6672 6f6d 2066 6f6c 6469 6e67 2066 756e from folding fun │ │ │ -0002fcb0: 6374 696f 6e2e 3c2f 6469 763e 3c64 6976 ction.
    < │ │ │ -0002fcd0: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ -0002fce0: 2044 6563 6973 696f 6e54 7265 652d 696e DecisionTree-in │ │ │ -0002fcf0: 6c2e 683a 3738 383c 2f64 6976 3e3c 2f64 l.h:788
    .
    A │ │ │ -0002fdd0: 7373 6967 6e6d 656e 7426 6c74 3b20 4c20 ssignment< L │ │ │ -0002fde0: 2667 743b 2061 7373 6967 6e6d 656e 743c > assignment< │ │ │ -0002fdf0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Assignme │ │ │ -0002fe10: 6e74 2c20 6d75 7461 7469 6e67 2074 6872 nt, mutating thr │ │ │ -0002fe20: 6f75 6768 2072 6563 7572 7369 6f6e 2e3c ough recursion.< │ │ │ -0002fe30: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ -0002fe50: 6974 696f 6e3c 2f62 3e20 4465 6369 7369 ition Decisi │ │ │ -0002fe60: 6f6e 5472 6565 2d69 6e6c 2e68 3a37 3839 onTree-inl.h:789 │ │ │ -0002fe70: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    gt │ │ │ -0002ff10: 7361 6d3a 3a56 6973 6974 5769 7468 3a3a sam::VisitWith:: │ │ │ -0002ff20: 6f70 6572 6174 6f72 2829 3c2f 613e 3c2f operator()
    void ope │ │ │ -0002ff50: 7261 746f 7228 2928 636f 6e73 7420 7479 rator()(const ty │ │ │ -0002ff60: 7065 6e61 6d65 2044 6563 6973 696f 6e54 pename DecisionT │ │ │ -0002ff70: 7265 6526 6c74 3b20 4c2c 2059 2026 6774 ree< L, Y > │ │ │ -0002ff80: 3b3a 3a4e 6f64 6550 7472 2026 616d 703b ;::NodePtr & │ │ │ -0002ff90: 6e6f 6465 293c 2f64 6976 3e3c 6469 7620 node)
    Do │ │ │ -0002ffb0: 2061 2064 6570 7468 2d66 6972 7374 2076 a depth-first v │ │ │ -0002ffc0: 6973 6974 206f 6e20 7468 6520 7472 6565 isit on the tree │ │ │ -0002ffd0: 2072 6f6f 7465 6420 6174 206e 6f64 652e rooted at node. │ │ │ -0002ffe0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ -00030000: 6e69 7469 6f6e 3c2f 623e 2044 6563 6973 nition Decis │ │ │ -00030010: 696f 6e54 7265 652d 696e 6c2e 683a 3739 ionTree-inl.h:79 │ │ │ -00030020: 333c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 3
    .
    │ │ │ -000300f0: 4620 663c 2f64 6976 3e3c 6469 7620 636c F f
    fold │ │ │ -00030110: 696e 6720 6675 6e63 7469 6f6e 206f 626a ing function obj │ │ │ -00030120: 6563 742e 3c2f 6469 763e 3c64 6976 2063 ect.
    │ │ │ -00030140: 4465 6669 6e69 7469 6f6e 3c2f 623e 2044 Definition D │ │ │ -00030150: 6563 6973 696f 6e54 7265 652d 696e 6c2e ecisionTree-inl. │ │ │ -00030160: 683a 3739 303c 2f64 6976 3e3c 2f64 6976 h:790
    .
    a │ │ │ -000301f0: 2064 6563 6973 696f 6e20 7472 6565 2069 decision tree i │ │ │ -00030200: 7320 6120 6675 6e63 7469 6f6e 2066 726f s a function fro │ │ │ -00030210: 6d20 6173 7369 676e 6d65 6e74 7320 746f m assignments to │ │ │ -00030220: 2076 616c 7565 732e 3c2f 6469 763e 3c64 values.
    Definition DecisionTree. │ │ │ -00030260: 683a 3631 3c2f 6469 763e 3c2f 6469 763e h:61
    │ │ │ -00030270: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    gtsam::Decisio │ │ │ -00030310: 6e54 7265 653a 3a61 7070 6c79 3c2f 613e nTree::apply │ │ │ -00030320: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Decisi │ │ │ -00030340: 6f6e 5472 6565 2061 7070 6c79 2863 6f6e onTree apply(con │ │ │ -00030350: 7374 2055 6e61 7279 2026 616d 703b 6f70 st Unary &op │ │ │ -00030360: 2920 636f 6e73 743c 2f64 6976 3e3c 6469 ) const
    │ │ │ -00030380: 6170 706c 7920 556e 6172 7920 6f70 6572 apply Unary oper │ │ │ -00030390: 6174 696f 6e20 2671 756f 743b 6f70 2671 ation "op&q │ │ │ -000303a0: 756f 743b 2074 6f20 663c 2f64 6976 3e3c uot; to f
    < │ │ │ -000303b0: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ -000303c0: 223e 3c62 3e44 6566 696e 6974 696f 6e3c ">Definition< │ │ │ -000303d0: 2f62 3e20 4465 6369 7369 6f6e 5472 6565 /b> DecisionTree │ │ │ -000303e0: 2d69 6e6c 2e68 3a38 3839 3c2f 6469 763e -inl.h:889
    │ │ │ -000303f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ -00030450: 3c61 2068 7265 663d 2261 3032 3739 362e gtsam::D │ │ │ -00030490: 6563 6973 696f 6e54 7265 653a 3a63 6f6e ecisionTree::con │ │ │ -000304a0: 7665 7274 4672 6f6d 3c2f 613e 3c2f 6469 vertFrom
    NodePtr co │ │ │ -000304d0: 6e76 6572 7446 726f 6d28 636f 6e73 7420 nvertFrom(const │ │ │ -000304e0: 7479 7065 6e61 6d65 2044 6563 6973 696f typename Decisio │ │ │ -000304f0: 6e54 7265 6526 6c74 3b20 4d2c 2058 2026 nTree< M, X & │ │ │ -00030500: 6774 3b3a 3a4e 6f64 6550 7472 2026 616d gt;::NodePtr &am │ │ │ -00030510: 703b 662c 2073 7464 3a3a 6675 6e63 7469 p;f, std::functi │ │ │ -00030520: 6f6e 266c 743b 204c 2863 6f6e 7374 204d on< L(const M │ │ │ -00030530: 2026 616d 703b 2926 6774 3b20 4c5f 6f66 &)> L_of │ │ │ -00030540: 5f4d 2c20 7374 643a 3a66 756e 6374 696f _M, std::functio │ │ │ -00030550: 6e26 6c74 3b20 5928 636f 6e73 7420 5820 n< Y(const X │ │ │ -00030560: 2661 6d70 3b29 2667 743b 2059 5f6f 665f &)> Y_of_ │ │ │ -00030570: 5829 2063 6f6e 7374 3c2f 6469 763e 3c64 X) const
    Convert from a │ │ │ -000305a0: 4465 6369 7369 6f6e 5472 6565 266c 743b DecisionTree< │ │ │ -000305b0: 4d2c 2058 2667 743b 2074 6f20 4465 6369 M, X> to Deci │ │ │ -000305c0: 7369 6f6e 5472 6565 266c 743b 4c2c 2059 sionTree<L, Y │ │ │ -000305d0: 2667 743b 2e3c 2f64 6976 3e3c 6469 7620 >.
    Definition │ │ │ -00030600: 4465 6369 7369 6f6e 5472 6565 2d69 6e6c DecisionTree-inl │ │ │ -00030610: 2e68 3a36 3731 3c2f 6469 763e 3c2f 6469 .h:671
    ..
    │ │ │ -000308b0: 7479 7065 6e61 6d65 204e 6f64 653a 3a50 typename Node::P │ │ │ -000308c0: 7472 204e 6f64 6550 7472 3c2f 6469 763e tr NodePtr
    │ │ │ -000308d0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    ------------- │ │ │ -000308f0: 2d2d 2d2d 2d2d 2d2d e280 9420 4e6f 6465 --------... Node │ │ │ -00030900: 2062 6173 6520 636c 6173 7320 2d2d 2d2d base class ---- │ │ │ -00030910: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ -00030920: 2d2d 2d2d e280 943c 2f64 6976 3e3c 6469 ----...
    │ │ │ -00030940: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition DecisionTree.h │ │ │ -00030960: 3a31 3433 3c2f 6469 763e 3c2f 6469 763e :143
    │ │ │ -00030970: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    std:: │ │ │ -00030a40: 7365 7426 6c74 3b20 4c20 2667 743b 206c set< L > l │ │ │ -00030a50: 6162 656c 7328 2920 636f 6e73 743c 2f64 abels() const
    Retrieve a │ │ │ -00030a80: 6c6c 2075 6e69 7175 6520 6c61 6265 6c73 ll unique labels │ │ │ -00030a90: 2061 7320 6120 7365 742e 3c2f 6469 763e as a set.
    │ │ │ -00030aa0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ -00030ac0: 3c2f 623e 2044 6563 6973 696f 6e54 7265 DecisionTre │ │ │ -00030ad0: 652d 696e 6c2e 683a 3835 333c 2f64 6976 e-inl.h:853
    .bool empty() co │ │ │ -00030bc0: 6e73 743c 2f64 6976 3e3c 6469 7620 636c nst
    Chec │ │ │ -00030be0: 6b20 6966 2074 7265 6520 6973 2065 6d70 k if tree is emp │ │ │ -00030bf0: 7479 2e3c 2f64 6976 3e3c 6469 7620 636c ty.
    D │ │ │ -00030c10: 6566 696e 6974 696f 6e3c 2f62 3e20 4465 efinition De │ │ │ -00030c20: 6369 7369 6f6e 5472 6565 2e68 3a32 3537 cisionTree.h:257 │ │ │ -00030c30: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    gt │ │ │ -00030cd0: 7361 6d3a 3a44 6563 6973 696f 6e54 7265 sam::DecisionTre │ │ │ -00030ce0: 653a 3a76 6973 6974 3c2f 613e 3c2f 6469 e::visit
    void visit │ │ │ -00030d10: 2846 756e 6320 6629 2063 6f6e 7374 3c2f (Func f) const
    Visit all │ │ │ -00030d40: 206c 6561 7665 7320 696e 2064 6570 7468 leaves in depth │ │ │ -00030d50: 2d66 6972 7374 2066 6173 6869 6f6e 2e3c -first fashion.< │ │ │ -00030d60: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ -00030d80: 6974 696f 6e3c 2f62 3e20 4465 6369 7369 ition Decisi │ │ │ -00030d90: 6f6e 5472 6565 2d69 6e6c 2e68 3a37 3336 onTree-inl.h:736 │ │ │ -00030da0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    void v │ │ │ -00030e80: 6973 6974 4c65 6166 2846 756e 6320 6629 isitLeaf(Func f) │ │ │ -00030e90: 2063 6f6e 7374 3c2f 6469 763e 3c64 6976 const
    V │ │ │ -00030eb0: 6973 6974 2061 6c6c 206c 6561 7665 7320 isit all leaves │ │ │ -00030ec0: 696e 2064 6570 7468 2d66 6972 7374 2066 in depth-first f │ │ │ -00030ed0: 6173 6869 6f6e 2e3c 2f64 6976 3e3c 6469 ashion.
    │ │ │ -00030ef0: 3c62 3e44 6566 696e 6974 696f 6e3c 2f62 Definition DecisionTree-i │ │ │ -00030f10: 6e6c 2e68 3a37 3733 3c2f 6469 763e 3c2f nl.h:773
    .
    st │ │ │ -00030ff0: 643a 3a66 756e 6374 696f 6e26 6c74 3b20 d::function< │ │ │ -00031000: 5928 636f 6e73 7420 5920 2661 6d70 3b29 Y(const Y &) │ │ │ -00031010: 2667 743b 2055 6e61 7279 3c2f 6469 763e > Unary
    │ │ │ -00031020: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Handy typedef │ │ │ -00031040: 7320 666f 7220 756e 6172 7920 616e 6420 s for unary and │ │ │ -00031050: 6269 6e61 7279 2066 756e 6374 696f 6e20 binary function │ │ │ -00031060: 7479 7065 732e 3c2f 6469 763e 3c64 6976 types.
    < │ │ │ -00031080: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ -00031090: 2044 6563 6973 696f 6e54 7265 652e 683a DecisionTree.h: │ │ │ -000310a0: 3734 3c2f 6469 763e 3c2f 6469 763e 0a3c 74
    .< │ │ │ -000310b0: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ -000310c0: 6964 3d22 6161 3032 3739 365f 6874 6d6c id="aa02796_html │ │ │ -000310d0: 5f61 3733 6361 3535 3833 6163 3264 6262 _a73ca5583ac2dbb │ │ │ -000310e0: 3236 6163 6366 6335 3464 6536 3961 3963 26accfc54de69a9c │ │ │ -000310f0: 3061 223e 3c64 6976 2063 6c61 7373 3d22 0a">
    │ │ │ -00031140: 6774 7361 6d3a 3a44 6563 6973 696f 6e54 gtsam::DecisionT │ │ │ -00031150: 7265 653a 3a66 6f6c 643c 2f61 3e3c 2f64 ree::fold
    X fold(Fu │ │ │ -00031180: 6e63 2066 2c20 5820 7830 2920 636f 6e73 nc f, X x0) cons │ │ │ -00031190: 743c 2f64 6976 3e3c 6469 7620 636c 6173 t
    Fold a │ │ │ -000311b0: 2062 696e 6172 7920 6675 6e63 7469 6f6e binary function │ │ │ -000311c0: 206f 7665 7220 7468 6520 7472 6565 2c20 over the tree, │ │ │ -000311d0: 7265 7475 726e 696e 6720 6163 6375 6d75 returning accumu │ │ │ -000311e0: 6c61 746f 722e 3c2f 6469 763e 3c64 6976 lator.
    < │ │ │ -00031200: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ -00031210: 2044 6563 6973 696f 6e54 7265 652d 696e DecisionTree-in │ │ │ -00031220: 6c2e 683a 3833 333c 2f64 6976 3e3c 2f64 l.h:833
    ..
    │ │ │ -00031500: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    GTSAM-style p │ │ │ -00031520: 7269 6e74 2e3c 2f64 6976 3e3c 6469 7620 rint.
    Definition │ │ │ -00031550: 4465 6369 7369 6f6e 5472 6565 2d69 6e6c DecisionTree-inl │ │ │ -00031560: 2e68 3a38 3732 3c2f 6469 763e 3c2f 6469 .h:872
    .
    De │ │ │ -00031640: 6369 7369 6f6e 5472 6565 2063 6f6d 6269 cisionTree combi │ │ │ -00031650: 6e65 2863 6f6e 7374 204c 2026 616d 703b ne(const L & │ │ │ -00031660: 6c61 6265 6c2c 2073 697a 655f 7420 6361 label, size_t ca │ │ │ -00031670: 7264 696e 616c 6974 792c 2063 6f6e 7374 rdinality, const │ │ │ -00031680: 2042 696e 6172 7920 2661 6d70 3b6f 7029 Binary &op) │ │ │ -00031690: 2063 6f6e 7374 3c2f 6469 763e 3c64 6976 const
    c │ │ │ -000316b0: 6f6d 6269 6e65 2073 7562 7472 6565 7320 ombine subtrees │ │ │ -000316c0: 6f6e 206b 6579 2077 6974 6820 6269 6e61 on key with bina │ │ │ -000316d0: 7279 206f 7065 7261 7469 6f6e 2026 7175 ry operation &qu │ │ │ -000316e0: 6f74 3b6f 7026 7175 6f74 3b3c 2f64 6976 ot;op"
    Definitio │ │ │ -00031710: 6e3c 2f62 3e20 4465 6369 7369 6f6e 5472 n DecisionTr │ │ │ -00031720: 6565 2d69 6e6c 2e68 3a39 3337 3c2f 6469 ee-inl.h:937
    .
    gtsam: │ │ │ -000317d0: 3a44 6563 6973 696f 6e54 7265 653a 3a76 :DecisionTree::v │ │ │ -000317e0: 6973 6974 5769 7468 3c2f 613e 3c2f 6469 isitWith
    void visit │ │ │ -00031810: 5769 7468 2846 756e 6320 6629 2063 6f6e With(Func f) con │ │ │ -00031820: 7374 3c2f 6469 763e 3c64 6976 2063 6c61 st
    Visit │ │ │ -00031840: 2061 6c6c 206c 6561 7665 7320 696e 2064 all leaves in d │ │ │ -00031850: 6570 7468 2d66 6972 7374 2066 6173 6869 epth-first fashi │ │ │ -00031860: 6f6e 2e3c 2f64 6976 3e3c 6469 7620 636c on.
    D │ │ │ -00031880: 6566 696e 6974 696f 6e3c 2f62 3e20 4465 efinition De │ │ │ -00031890: 6369 7369 6f6e 5472 6565 2d69 6e6c 2e68 cisionTree-inl.h │ │ │ -000318a0: 3a38 3136 3c2f 6469 763e 3c2f 6469 763e :816
    │ │ │ -000318b0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    c │ │ │ -00031980: 6f6e 7374 2059 2026 616d 703b 206f 7065 onst Y & ope │ │ │ -00031990: 7261 746f 7228 2928 636f 6e73 7420 4173 rator()(const As │ │ │ -000319a0: 7369 676e 6d65 6e74 266c 743b 204c 2026 signment< L & │ │ │ -000319b0: 6774 3b20 2661 6d70 3b78 2920 636f 6e73 gt; &x) cons │ │ │ -000319c0: 743c 2f64 6976 3e3c 6469 7620 636c 6173 t
    evalua │ │ │ -000319e0: 7465 3c2f 6469 763e 3c64 6976 2063 6c61 te
    De │ │ │ -00031a00: 6669 6e69 7469 6f6e 3c2f 623e 2044 6563 finition Dec │ │ │ -00031a10: 6973 696f 6e54 7265 652d 696e 6c2e 683a isionTree-inl.h: │ │ │ -00031a20: 3838 343c 2f64 6976 3e3c 2f64 6976 3e0a 884
    . │ │ │ -00031a30: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    gtsam::Decision │ │ │ -00031ad0: 5472 6565 3a3a 646f 743c 2f61 3e3c 2f64 Tree::dot
    void dot( │ │ │ -00031b00: 7374 643a 3a6f 7374 7265 616d 2026 616d std::ostream &am │ │ │ -00031b10: 703b 6f73 2c20 636f 6e73 7420 4c61 6265 p;os, const Labe │ │ │ -00031b20: 6c46 6f72 6d61 7474 6572 2026 616d 703b lFormatter & │ │ │ -00031b30: 6c61 6265 6c46 6f72 6d61 7474 6572 2c20 labelFormatter, │ │ │ -00031b40: 636f 6e73 7420 5661 6c75 6546 6f72 6d61 const ValueForma │ │ │ -00031b50: 7474 6572 2026 616d 703b 7661 6c75 6546 tter &valueF │ │ │ -00031b60: 6f72 6d61 7474 6572 2c20 626f 6f6c 2073 ormatter, bool s │ │ │ -00031b70: 686f 775a 6572 6f3d 7472 7565 2920 636f howZero=true) co │ │ │ -00031b80: 6e73 743c 2f64 6976 3e3c 6469 7620 636c nst
    outp │ │ │ -00031ba0: 7574 2074 6f20 6772 6170 6876 697a 2066 ut to graphviz f │ │ │ -00031bb0: 6f72 6d61 742c 2073 7472 6561 6d20 7665 ormat, stream ve │ │ │ -00031bc0: 7273 696f 6e3c 2f64 6976 3e3c 6469 7620 rsion
    Definition │ │ │ -00031bf0: 4465 6369 7369 6f6e 5472 6565 2d69 6e6c DecisionTree-inl │ │ │ -00031c00: 2e68 3a39 3439 3c2f 6469 763e 3c2f 6469 .h:949
    .
    . │ │ │ -00031d80: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    bo │ │ │ -00031e50: 6f6c 206f 7065 7261 746f 723d 3d28 636f ol operator==(co │ │ │ -00031e60: 6e73 7420 4465 6369 7369 6f6e 5472 6565 nst DecisionTree │ │ │ -00031e70: 2026 616d 703b 7129 2063 6f6e 7374 3c2f &q) const
    equality< │ │ │ -00031ea0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ -00031ec0: 6974 696f 6e3c 2f62 3e20 4465 6369 7369 ition Decisi │ │ │ -00031ed0: 6f6e 5472 6565 2d69 6e6c 2e68 3a38 3739 onTree-inl.h:879 │ │ │ -00031ee0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    gt │ │ │ -00031f80: 7361 6d3a 3a44 6563 6973 696f 6e54 7265 sam::DecisionTre │ │ │ -00031f90: 653a 3a4c 6162 656c 433c 2f61 3e3c 2f64 e::LabelC
    std::pair │ │ │ -00031fc0: 266c 743b 204c 2c20 7369 7a65 5f74 2026 < L, size_t & │ │ │ -00031fd0: 6774 3b20 4c61 6265 6c43 3c2f 6469 763e gt; LabelC
    │ │ │ -00031fe0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    A label annot │ │ │ -00032000: 6174 6564 2077 6974 6820 6361 7264 696e ated with cardin │ │ │ -00032010: 616c 6974 792e 3c2f 6469 763e 3c64 6976 ality.
    < │ │ │ -00032030: 623e 4465 6669 6e69 7469 6f6e 3c2f 623e b>Definition │ │ │ -00032040: 2044 6563 6973 696f 6e54 7265 652e 683a DecisionTree.h: │ │ │ -00032050: 3739 3c2f 6469 763e 3c2f 6469 763e 0a3c 79
    .< │ │ │ -00032060: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ -00032070: 6964 3d22 6161 3032 3739 365f 6874 6d6c id="aa02796_html │ │ │ -00032080: 5f61 6538 3065 3635 6139 3066 6539 6163 _ae80e65a90fe9ac │ │ │ -00032090: 3430 6235 6335 6134 6430 3764 6662 6264 40b5c5a4d07dfbbd │ │ │ -000320a0: 6137 223e 3c64 6976 2063 6c61 7373 3d22 a7">
    size_ │ │ │ -00032130: 7420 6e72 4c65 6176 6573 2829 2063 6f6e t nrLeaves() con │ │ │ -00032140: 7374 3c2f 6469 763e 3c64 6976 2063 6c61 st
    Retur │ │ │ -00032160: 6e20 7468 6520 6e75 6d62 6572 206f 6620 n the number of │ │ │ -00032170: 6c65 6176 6573 2069 6e20 7468 6520 7472 leaves in the tr │ │ │ -00032180: 6565 2e3c 2f64 6976 3e3c 6469 7620 636c ee.
    D │ │ │ -000321a0: 6566 696e 6974 696f 6e3c 2f62 3e20 4465 efinition De │ │ │ -000321b0: 6369 7369 6f6e 5472 6565 2d69 6e6c 2e68 cisionTree-inl.h │ │ │ -000321c0: 3a38 3233 3c2f 6469 763e 3c2f 6469 763e :823
    │ │ │ -000321d0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    DecisionTree()< │ │ │ -000322b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Default │ │ │ -000322d0: 636f 6e73 7472 7563 746f 7220 2866 6f72 constructor (for │ │ │ -000322e0: 2073 6572 6961 6c69 7a61 7469 6f6e 293c serialization)< │ │ │ -000322f0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ -00032310: 6974 696f 6e3c 2f62 3e20 4465 6369 7369 ition Decisi │ │ │ -00032320: 6f6e 5472 6565 2d69 6e6c 2e68 3a34 3632 onTree-inl.h:462 │ │ │ -00032330: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    . │ │ │ -00032360: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 │ │ │ -000323c0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ -000323d0: 2d2d 2d2d 2de2 8094 204e 6f64 6520 6261 -----... Node ba │ │ │ -000323e0: 7365 2063 6c61 7373 202d 2d2d 2d2d 2d2d se class ------- │ │ │ -000323f0: 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d ---------------- │ │ │ -00032400: 2de2 8094 3c2f 6469 763e 3c64 6976 2063 -...
    │ │ │ -00032420: 4465 6669 6e69 7469 6f6e 3c2f 623e 2044 Definition D │ │ │ -00032430: 6563 6973 696f 6e54 7265 652e 683a 3836 ecisionTree.h:86 │ │ │ -00032440: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .
    ...
    . │ │ │ +000046e0: 3c21 2d2d 2073 7461 7274 2066 6f6f 7465 .. │ │ │ +00004950: 3c2f 626f 6479 3e0a 3c2f 6874 6d6c 3e0a .. │ │ │ ├── html2text {} │ │ │ │ @@ -1,1242 +1,118 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -DecisionTree-inl.h │ │ │ │ +DiscreteMarginals.h │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -20#pragma once │ │ │ │ -21 │ │ │ │ -22#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_D_e_c_i_s_i_o_n_T_r_e_e_._h> │ │ │ │ -23 │ │ │ │ -24#include │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27#include │ │ │ │ +21#pragma once │ │ │ │ +22 │ │ │ │ +23#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ +24#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_._h> │ │ │ │ +25#include <_g_t_s_a_m_/_b_a_s_e_/_V_e_c_t_o_r_._h> │ │ │ │ +26 │ │ │ │ +27namespace _g_t_s_a_m { │ │ │ │ 28 │ │ │ │ -29#include │ │ │ │ -30#include │ │ │ │ -31#include │ │ │ │ -32#include │ │ │ │ -33#include │ │ │ │ -34#include │ │ │ │ -35#include │ │ │ │ -36#include │ │ │ │ -37 │ │ │ │ -38namespace _g_t_s_a_m { │ │ │ │ -39 │ │ │ │ -40 / │ │ │ │ -****************************************************************************/ │ │ │ │ -41 // Node │ │ │ │ -42 / │ │ │ │ -****************************************************************************/ │ │ │ │ -43#ifdef DT_DEBUG_MEMORY │ │ │ │ -44 template │ │ │ │ -45 int DecisionTree::Node::nrNodes = 0; │ │ │ │ -46#endif │ │ │ │ -47 │ │ │ │ -48 / │ │ │ │ -****************************************************************************/ │ │ │ │ -49 // Leaf │ │ │ │ -50 / │ │ │ │ -****************************************************************************/ │ │ │ │ -51 template │ │ │ │ -_5_2 struct _D_e_c_i_s_i_o_n_T_r_e_e::_L_e_a_f : public _D_e_c_i_s_i_o_n_T_r_e_e::Node { │ │ │ │ -_5_4 Y _c_o_n_s_t_a_n_t__; │ │ │ │ -55 │ │ │ │ -_5_9 size_t _n_r_A_s_s_i_g_n_m_e_n_t_s__; │ │ │ │ -60 │ │ │ │ -_6_2 _L_e_a_f() {} │ │ │ │ -63 │ │ │ │ -_6_5 _L_e_a_f(const Y& constant, size_t nrAssignments = 1) │ │ │ │ -66 : constant_(constant), nrAssignments_(nrAssignments) {} │ │ │ │ -67 │ │ │ │ -_6_9 const Y& _c_o_n_s_t_a_n_t() const { │ │ │ │ -70 return constant_; │ │ │ │ -71 } │ │ │ │ -72 │ │ │ │ -_7_4 size_t _n_r_A_s_s_i_g_n_m_e_n_t_s() const { return nrAssignments_; } │ │ │ │ -75 │ │ │ │ -_7_7 bool _s_a_m_e_L_e_a_f(const _L_e_a_f& q) const override { │ │ │ │ -78 return constant_ == q._c_o_n_s_t_a_n_t__; │ │ │ │ -79 } │ │ │ │ -80 │ │ │ │ -_8_2 bool _s_a_m_e_L_e_a_f(const _N_o_d_e& q) const override { │ │ │ │ -83 return (q.isLeaf() && q.sameLeaf(*this)); │ │ │ │ -84 } │ │ │ │ -85 │ │ │ │ -_8_7 bool _e_q_u_a_l_s(const _N_o_d_e& q, const CompareFunc& compare) const override { │ │ │ │ -88 const _L_e_a_f* other = dynamic_cast(&q); │ │ │ │ -89 if (!other) return false; │ │ │ │ -90 return compare(this->constant_, other->_c_o_n_s_t_a_n_t__); │ │ │ │ -91 } │ │ │ │ -92 │ │ │ │ -_9_4 void _p_r_i_n_t(const std::string& s, const LabelFormatter& labelFormatter, │ │ │ │ -95 const ValueFormatter& valueFormatter) const override { │ │ │ │ -96 std::cout << s << " Leaf " << valueFormatter(constant_) << std::endl; │ │ │ │ -97 } │ │ │ │ -98 │ │ │ │ -_1_0_0 void _d_o_t(std::ostream& os, const LabelFormatter& labelFormatter, │ │ │ │ -101 const ValueFormatter& valueFormatter, │ │ │ │ -102 bool showZero) const override { │ │ │ │ -103 std::string value = valueFormatter(constant_); │ │ │ │ -104 if (showZero || value.compare("0")) │ │ │ │ -105 os << "\"" << this->id() << "\" [label=\"" << value │ │ │ │ -106 << "\", shape=box, rank=sink, height=0.35, fixedsize=true]\n"; │ │ │ │ -107 } │ │ │ │ -108 │ │ │ │ -_1_1_0 const Y& _o_p_e_r_a_t_o_r_(_)(const _A_s_s_i_g_n_m_e_n_t_<_L_>& x) const override { │ │ │ │ -111 return constant_; │ │ │ │ -112 } │ │ │ │ -113 │ │ │ │ -_1_1_5 _N_o_d_e_P_t_r _a_p_p_l_y(const _U_n_a_r_y& op) const override { │ │ │ │ -116 _N_o_d_e_P_t_r f(new _L_e_a_f(op(constant_), nrAssignments_)); │ │ │ │ -117 return f; │ │ │ │ -118 } │ │ │ │ -119 │ │ │ │ -_1_2_1 _N_o_d_e_P_t_r _a_p_p_l_y(const UnaryAssignment& op, │ │ │ │ -122 const _A_s_s_i_g_n_m_e_n_t_<_L_>& assignment) const override { │ │ │ │ -123 _N_o_d_e_P_t_r f(new _L_e_a_f(op(assignment, constant_), nrAssignments_)); │ │ │ │ -124 return f; │ │ │ │ -125 } │ │ │ │ -126 │ │ │ │ -127 // Apply binary operator "h = f op g" on Leaf node │ │ │ │ -128 // Note op is not assumed commutative so we need to keep track of order │ │ │ │ -129 // Simply calls apply on argument to call correct virtual method: │ │ │ │ -130 // fL.apply_f_op_g(gL) -> gL.apply_g_op_fL(fL) (below) │ │ │ │ -131 // fL.apply_f_op_g(gC) -> gC.apply_g_op_fL(fL) (Choice) │ │ │ │ -132 _N_o_d_e_P_t_r apply_f_op_g(const _N_o_d_e& g, const Binary& op) const override { │ │ │ │ -133 return g.apply_g_op_fL(*this, op); │ │ │ │ -134 } │ │ │ │ -135 │ │ │ │ -136 // Applying binary operator to two leaves results in a leaf │ │ │ │ -137 _N_o_d_e_P_t_r apply_g_op_fL(const Leaf& fL, const Binary& op) const override { │ │ │ │ -138 // fL op gL │ │ │ │ -139 _N_o_d_e_P_t_r h(new Leaf(op(fL.constant_, constant_), nrAssignments_)); │ │ │ │ -140 return h; │ │ │ │ -141 } │ │ │ │ -142 │ │ │ │ -143 // If second argument is a Choice node, call it's apply with leaf as second │ │ │ │ -144 _N_o_d_e_P_t_r apply_g_op_fC(const Choice& fC, const Binary& op) const override { │ │ │ │ -145 return fC.apply_fC_op_gL(*this, op); // operand order back to normal │ │ │ │ -146 } │ │ │ │ -147 │ │ │ │ -_1_4_9 _N_o_d_e_P_t_r _c_h_o_o_s_e(const L& label, size_t index) const override { │ │ │ │ -150 return _N_o_d_e_P_t_r(new _L_e_a_f(constant(), nrAssignments())); │ │ │ │ -151 } │ │ │ │ -152 │ │ │ │ -153 bool isLeaf() const override { return true; } │ │ │ │ -_1_5_4 │ │ │ │ -155 private: │ │ │ │ -156 using Base = _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_N_o_d_e; │ │ │ │ -157 │ │ │ │ -159 friend class boost::serialization::access; │ │ │ │ -160 template │ │ │ │ -161 void serialize(ARCHIVE& ar, const unsigned int /*version*/) { │ │ │ │ -162 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base); │ │ │ │ -163 ar& BOOST_SERIALIZATION_NVP(constant_); │ │ │ │ -164 ar& BOOST_SERIALIZATION_NVP(nrAssignments_); │ │ │ │ -165 } │ │ │ │ -166 }; // Leaf │ │ │ │ -_1_6_7 │ │ │ │ -168 / │ │ │ │ -****************************************************************************/ │ │ │ │ -169 // Choice │ │ │ │ -170 / │ │ │ │ -****************************************************************************/ │ │ │ │ -171 template │ │ │ │ -_1_7_2 struct _D_e_c_i_s_i_o_n_T_r_e_e::_C_h_o_i_c_e: public _D_e_c_i_s_i_o_n_T_r_e_e::Node { │ │ │ │ -_1_7_4 L _l_a_b_e_l__; │ │ │ │ -175 │ │ │ │ -_1_7_7 std::vector _b_r_a_n_c_h_e_s__; │ │ │ │ -178 │ │ │ │ -_1_7_9 private: │ │ │ │ -184 size_t allSame_; │ │ │ │ -185 │ │ │ │ -186 using ChoicePtr = boost::shared_ptr; │ │ │ │ -187 │ │ │ │ -_1_8_8 public: │ │ │ │ -_1_9_0 _C_h_o_i_c_e() {} │ │ │ │ -_1_9_1 │ │ │ │ -192 ~Choice() override { │ │ │ │ -193#ifdef DT_DEBUG_MEMORY │ │ │ │ -_1_9_4 std::std::cout << Node::nrNodes << " destructing (Choice) " << this->id() │ │ │ │ -195 << std::std::endl; │ │ │ │ -196#endif │ │ │ │ -_1_9_7 } │ │ │ │ -198 │ │ │ │ -_2_0_0 static _N_o_d_e_P_t_r _U_n_i_q_u_e(const ChoicePtr& f) { │ │ │ │ -_2_0_1#ifndef GTSAM_DT_NO_PRUNING │ │ │ │ -202 if (f->allSame_) { │ │ │ │ -203 assert(f->branches().size() > 0); │ │ │ │ -_2_0_4 _N_o_d_e_P_t_r f0 = f->branches_[0]; │ │ │ │ -205 │ │ │ │ -206 size_t nrAssignments = 0; │ │ │ │ -207 for(auto branch: f->branches()) { │ │ │ │ -208 assert(branch->isLeaf()); │ │ │ │ -209 nrAssignments += │ │ │ │ -210 boost::dynamic_pointer_cast(branch)->nrAssignments(); │ │ │ │ -211 } │ │ │ │ -212 _N_o_d_e_P_t_r newLeaf( │ │ │ │ -213 new Leaf(boost::dynamic_pointer_cast(f0)->constant(), │ │ │ │ -214 nrAssignments)); │ │ │ │ -_2_1_5 return newLeaf; │ │ │ │ -216 } else │ │ │ │ -217#endif │ │ │ │ -218 return f; │ │ │ │ -219 } │ │ │ │ -220 │ │ │ │ -221 bool isLeaf() const override { return false; } │ │ │ │ -222 │ │ │ │ -_2_2_4 _C_h_o_i_c_e(const L& label, size_t count) : │ │ │ │ -225 label_(label), allSame_(true) { │ │ │ │ -226 branches_.reserve(count); │ │ │ │ -227 } │ │ │ │ -_2_2_8 │ │ │ │ -_2_3_0 _C_h_o_i_c_e(const _C_h_o_i_c_e& f, const _C_h_o_i_c_e& g, const Binary& op) : │ │ │ │ -231 allSame_(true) { │ │ │ │ -232 // Choose what to do based on label │ │ │ │ -233 if (f._l_a_b_e_l() > g._l_a_b_e_l()) { │ │ │ │ -234 // f higher than g │ │ │ │ -235 label_ = f._l_a_b_e_l(); │ │ │ │ -236 size_t count = f.nrChoices(); │ │ │ │ -237 branches_.reserve(count); │ │ │ │ -238 for (size_t i = 0; i < count; i++) │ │ │ │ -239 push_back(f._b_r_a_n_c_h_e_s__[i]->apply_f_op_g(g, op)); │ │ │ │ -240 } else if (g._l_a_b_e_l() > f._l_a_b_e_l()) { │ │ │ │ -241 // f lower than g │ │ │ │ -_2_4_2 label_ = g._l_a_b_e_l(); │ │ │ │ -243 size_t count = g.nrChoices(); │ │ │ │ -244 branches_.reserve(count); │ │ │ │ -245 for (size_t i = 0; i < count; i++) │ │ │ │ -246 push_back(g._b_r_a_n_c_h_e_s__[i]->apply_g_op_fC(f, op)); │ │ │ │ -247 } else { │ │ │ │ -248 // f same level as g │ │ │ │ -249 label_ = f._l_a_b_e_l(); │ │ │ │ -250 size_t count = f.nrChoices(); │ │ │ │ -251 branches_.reserve(count); │ │ │ │ -252 for (size_t i = 0; i < count; i++) │ │ │ │ -253 push_back(f._b_r_a_n_c_h_e_s__[i]->apply_f_op_g(*g._b_r_a_n_c_h_e_s__[i], op)); │ │ │ │ -254 } │ │ │ │ -255 } │ │ │ │ -256 │ │ │ │ -_2_5_8 const L& _l_a_b_e_l() const { │ │ │ │ -259 return label_; │ │ │ │ -_2_6_0 } │ │ │ │ -261 │ │ │ │ -262 size_t nrChoices() const { │ │ │ │ -_2_6_3 return branches_.size(); │ │ │ │ -264 } │ │ │ │ -265 │ │ │ │ -266 const std::vector& branches() const { │ │ │ │ -267 return branches_; │ │ │ │ -268 } │ │ │ │ -269 │ │ │ │ -_2_7_1 void _p_u_s_h___b_a_c_k(const _N_o_d_e_P_t_r& node) { │ │ │ │ -272 // allSame_ is restricted to leaf nodes in a decision tree │ │ │ │ -273 if (allSame_ && !branches_.empty()) { │ │ │ │ -274 allSame_ = node->sameLeaf(*branches_.back()); │ │ │ │ -275 } │ │ │ │ -276 branches_.push_back(node); │ │ │ │ -277 } │ │ │ │ -278 │ │ │ │ -_2_8_0 void _p_r_i_n_t(const std::string& s, const LabelFormatter& labelFormatter, │ │ │ │ -281 const ValueFormatter& valueFormatter) const override { │ │ │ │ -282 std::cout << s << " Choice("; │ │ │ │ -283 std::cout << labelFormatter(label_) << ") " << std::endl; │ │ │ │ -284 for (size_t i = 0; i < branches_.size(); i++) │ │ │ │ -285 branches_[i]->_p_r_i_n_t((boost::format("%s %d") % s % i).str(), │ │ │ │ -286 labelFormatter, valueFormatter); │ │ │ │ -287 } │ │ │ │ -288 │ │ │ │ -_2_9_0 void _d_o_t(std::ostream& os, const LabelFormatter& labelFormatter, │ │ │ │ -291 const ValueFormatter& valueFormatter, │ │ │ │ -292 bool showZero) const override { │ │ │ │ -293 os << "\"" << this->id() << "\" [shape=circle, label=\"" << label_ │ │ │ │ -294 << "\"]\n"; │ │ │ │ -295 size_t B = branches_.size(); │ │ │ │ -296 for (size_t i = 0; i < B; i++) { │ │ │ │ -_2_9_7 const _N_o_d_e_P_t_r& branch = branches_[i]; │ │ │ │ -298 │ │ │ │ -299 // Check if zero │ │ │ │ -300 if (!showZero) { │ │ │ │ -301 const Leaf* leaf = dynamic_cast(branch.get()); │ │ │ │ -302 if (leaf && valueFormatter(leaf->constant()).compare("0")) continue; │ │ │ │ -303 } │ │ │ │ -304 │ │ │ │ -305 os << "\"" << this->id() << "\" -> \"" << branch->id() << "\""; │ │ │ │ -306 if (B == 2 && i == 0) os << " [style=dashed]"; │ │ │ │ -307 os << std::endl; │ │ │ │ -308 branch->dot(os, labelFormatter, valueFormatter, showZero); │ │ │ │ -309 } │ │ │ │ -310 } │ │ │ │ -311 │ │ │ │ -_3_1_3 bool _s_a_m_e_L_e_a_f(const _L_e_a_f& q) const override { │ │ │ │ -_3_1_4 return false; │ │ │ │ -315 } │ │ │ │ -316 │ │ │ │ -_3_1_8 bool _s_a_m_e_L_e_a_f(const _N_o_d_e& q) const override { │ │ │ │ -319 return (q.isLeaf() && q.sameLeaf(*this)); │ │ │ │ -320 } │ │ │ │ -321 │ │ │ │ -_3_2_3 bool _e_q_u_a_l_s(const _N_o_d_e& q, const CompareFunc& compare) const override { │ │ │ │ -324 const _C_h_o_i_c_e* other = dynamic_cast(&q); │ │ │ │ -325 if (!other) return false; │ │ │ │ -326 if (this->label_ != other->_l_a_b_e_l__) return false; │ │ │ │ -327 if (branches_.size() != other->_b_r_a_n_c_h_e_s__.size()) return false; │ │ │ │ -328 // we don't care about shared pointers being equal here │ │ │ │ -329 for (size_t i = 0; i < branches_.size(); i++) │ │ │ │ -330 if (!(branches_[i]->_e_q_u_a_l_s(*(other->_b_r_a_n_c_h_e_s__[i]), compare))) │ │ │ │ -331 return false; │ │ │ │ -332 return true; │ │ │ │ -333 } │ │ │ │ -334 │ │ │ │ -_3_3_6 const Y& _o_p_e_r_a_t_o_r_(_)(const _A_s_s_i_g_n_m_e_n_t_<_L_>& x) const override { │ │ │ │ -337#ifndef NDEBUG │ │ │ │ -_3_3_8 typename _A_s_s_i_g_n_m_e_n_t_<_L_>_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r it = x.find(label_); │ │ │ │ -339 if (it == x.end()) { │ │ │ │ -340 std::cout << "Trying to find value for " << label_ << std::endl; │ │ │ │ -_3_4_1 throw std::invalid_argument( │ │ │ │ -342 "DecisionTree::operator(): value undefined for a label"); │ │ │ │ -343 } │ │ │ │ -344#endif │ │ │ │ -345 size_t index = x.at(label_); │ │ │ │ -346 _N_o_d_e_P_t_r child = branches_[index]; │ │ │ │ -347 return (*child)(x); │ │ │ │ -348 } │ │ │ │ -349 │ │ │ │ -_3_5_1 Choice(const L& label, const Choice& f, const _U_n_a_r_y& op) : │ │ │ │ -352 label_(label), allSame_(true) { │ │ │ │ -353 branches_.reserve(f.branches_.size()); // reserve space │ │ │ │ -_3_5_4 for (const _N_o_d_e_P_t_r& branch : f.branches_) { │ │ │ │ -355 push_back(branch->apply(op)); │ │ │ │ -356 } │ │ │ │ -357 } │ │ │ │ -358 │ │ │ │ -_3_6_9 _C_h_o_i_c_e(const L& label, const _C_h_o_i_c_e& f, const UnaryAssignment& op, │ │ │ │ -370 const _A_s_s_i_g_n_m_e_n_t_<_L_>& assignment) │ │ │ │ -371 : label_(label), allSame_(true) { │ │ │ │ -372 branches_.reserve(f._b_r_a_n_c_h_e_s__.size()); // reserve space │ │ │ │ -_3_7_3 │ │ │ │ -374 _A_s_s_i_g_n_m_e_n_t_<_L_> assignment_ = assignment; │ │ │ │ -375 │ │ │ │ -376 for (size_t i = 0; i < f._b_r_a_n_c_h_e_s__.size(); i++) { │ │ │ │ -_3_7_7 assignment_[label_] = i; // Set assignment for label to i │ │ │ │ -378 │ │ │ │ -379 const _N_o_d_e_P_t_r branch = f._b_r_a_n_c_h_e_s__[i]; │ │ │ │ -380 push_back(branch->apply(op, assignment_)); │ │ │ │ -_3_8_1 │ │ │ │ -382 // Remove the assignment so we are backtracking │ │ │ │ -383 auto assignment_it = assignment_.find(label_); │ │ │ │ -384 assignment_.erase(assignment_it); │ │ │ │ -385 } │ │ │ │ -386 } │ │ │ │ -387 │ │ │ │ -_3_8_9 _N_o_d_e_P_t_r _a_p_p_l_y(const _U_n_a_r_y& op) const override { │ │ │ │ -390 auto r = boost::make_shared(label_, *this, op); │ │ │ │ -391 return Unique(r); │ │ │ │ -392 } │ │ │ │ -393 │ │ │ │ -_3_9_5 _N_o_d_e_P_t_r _a_p_p_l_y(const UnaryAssignment& op, │ │ │ │ -396 const _A_s_s_i_g_n_m_e_n_t_<_L_>& assignment) const override { │ │ │ │ -397 auto r = boost::make_shared(label_, *this, op, assignment); │ │ │ │ -398 return Unique(r); │ │ │ │ -399 } │ │ │ │ -400 │ │ │ │ -401 // Apply binary operator "h = f op g" on Choice node │ │ │ │ -402 // Note op is not assumed commutative so we need to keep track of order │ │ │ │ -403 // Simply calls apply on argument to call correct virtual method: │ │ │ │ -404 // fC.apply_f_op_g(gL) -> gL.apply_g_op_fC(fC) -> (Leaf) │ │ │ │ -405 // fC.apply_f_op_g(gC) -> gC.apply_g_op_fC(fC) -> (below) │ │ │ │ -406 _N_o_d_e_P_t_r apply_f_op_g(const _N_o_d_e& g, const Binary& op) const override { │ │ │ │ -407 return g.apply_g_op_fC(*this, op); │ │ │ │ -408 } │ │ │ │ -409 │ │ │ │ -410 // If second argument of binary op is Leaf node, recurse on branches │ │ │ │ -411 _N_o_d_e_P_t_r apply_g_op_fL(const Leaf& fL, const Binary& op) const override { │ │ │ │ -412 auto h = boost::make_shared(label(), nrChoices()); │ │ │ │ -413 for (auto&& branch : branches_) │ │ │ │ -414 h->push_back(fL.apply_f_op_g(*branch, op)); │ │ │ │ -415 return Unique(h); │ │ │ │ -416 } │ │ │ │ -417 │ │ │ │ -418 // If second argument of binary op is Choice, call constructor │ │ │ │ -419 _N_o_d_e_P_t_r apply_g_op_fC(const Choice& fC, const Binary& op) const override { │ │ │ │ -420 auto h = boost::make_shared(fC, *this, op); │ │ │ │ -421 return Unique(h); │ │ │ │ -422 } │ │ │ │ -423 │ │ │ │ -424 // If second argument of binary op is Leaf │ │ │ │ -425 template │ │ │ │ -426 _N_o_d_e_P_t_r apply_fC_op_gL(const Leaf& gL, OP op) const { │ │ │ │ -427 auto h = boost::make_shared(label(), nrChoices()); │ │ │ │ -428 for (auto&& branch : branches_) │ │ │ │ -429 h->push_back(branch->apply_f_op_g(gL, op)); │ │ │ │ -430 return Unique(h); │ │ │ │ -431 } │ │ │ │ -432 │ │ │ │ -_4_3_4 _N_o_d_e_P_t_r _c_h_o_o_s_e(const L& label, size_t index) const override { │ │ │ │ -435 if (label_ == label) return branches_[index]; // choose branch │ │ │ │ -436 │ │ │ │ -437 // second case, not label of interest, just recurse │ │ │ │ -438 auto r = boost::make_shared(label_, branches_.size()); │ │ │ │ -439 for (auto&& branch : branches_) │ │ │ │ -440 r->push_back(branch->choose(label, index)); │ │ │ │ -441 return Unique(r); │ │ │ │ -442 } │ │ │ │ -443 │ │ │ │ -444 private: │ │ │ │ -445 using Base = _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_N_o_d_e; │ │ │ │ -446 │ │ │ │ -448 friend class _b_o_o_s_t_:_:_s_e_r_i_a_l_i_z_a_t_i_o_n_:_:_a_c_c_e_s_s; │ │ │ │ -449 template │ │ │ │ -450 void serialize(ARCHIVE& ar, const unsigned int /*version*/) { │ │ │ │ -451 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base); │ │ │ │ -452 ar& BOOST_SERIALIZATION_NVP(label_); │ │ │ │ -453 ar& BOOST_SERIALIZATION_NVP(branches_); │ │ │ │ -454 ar& BOOST_SERIALIZATION_NVP(allSame_); │ │ │ │ -455 } │ │ │ │ -456 }; // Choice │ │ │ │ -457 │ │ │ │ -458 / │ │ │ │ -****************************************************************************/ │ │ │ │ -459 // DecisionTree │ │ │ │ -460 / │ │ │ │ -****************************************************************************/ │ │ │ │ -461 template │ │ │ │ -_4_6_2 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_D_e_c_i_s_i_o_n_T_r_e_e() { │ │ │ │ -463 } │ │ │ │ -464 │ │ │ │ -465 template │ │ │ │ -466 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_D_e_c_i_s_i_o_n_T_r_e_e(const NodePtr& root) : │ │ │ │ -467 root_(root) { │ │ │ │ -468 } │ │ │ │ -469 │ │ │ │ -470 / │ │ │ │ -****************************************************************************/ │ │ │ │ -471 template │ │ │ │ -_4_7_2 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_D_e_c_i_s_i_o_n_T_r_e_e(const Y& y) { │ │ │ │ -473 root_ = _N_o_d_e_P_t_r(new _L_e_a_f(y)); │ │ │ │ -474 } │ │ │ │ -475 │ │ │ │ -476 / │ │ │ │ -****************************************************************************/ │ │ │ │ -477 template │ │ │ │ -_4_7_8 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_D_e_c_i_s_i_o_n_T_r_e_e(const L& label, const Y& y1, const Y& y2) │ │ │ │ -{ │ │ │ │ -479 auto a = boost::make_shared(label, 2); │ │ │ │ -480 _N_o_d_e_P_t_r l1(new _L_e_a_f(y1)), l2(new _L_e_a_f(y2)); │ │ │ │ -481 a->push_back(l1); │ │ │ │ -482 a->push_back(l2); │ │ │ │ -483 root_ = Choice::Unique(a); │ │ │ │ -484 } │ │ │ │ -485 │ │ │ │ -486 / │ │ │ │ -****************************************************************************/ │ │ │ │ -487 template │ │ │ │ -_4_8_8 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_D_e_c_i_s_i_o_n_T_r_e_e(const _L_a_b_e_l_C& labelC, const Y& y1, │ │ │ │ -489 const Y& y2) { │ │ │ │ -490 if (labelC.second != 2) throw std::invalid_argument( │ │ │ │ -491 "DecisionTree: binary constructor called with non-binary label"); │ │ │ │ -492 auto a = boost::make_shared(labelC.first, 2); │ │ │ │ -493 _N_o_d_e_P_t_r l1(new _L_e_a_f(y1)), l2(new _L_e_a_f(y2)); │ │ │ │ -494 a->push_back(l1); │ │ │ │ -495 a->push_back(l2); │ │ │ │ -496 root_ = Choice::Unique(a); │ │ │ │ -497 } │ │ │ │ -498 │ │ │ │ -499 / │ │ │ │ -****************************************************************************/ │ │ │ │ -500 template │ │ │ │ -_5_0_1 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_D_e_c_i_s_i_o_n_T_r_e_e(const std::vector& labelCs, │ │ │ │ -502 const std::vector& ys) { │ │ │ │ -503 // call recursive Create │ │ │ │ -504 root_ = create(labelCs.begin(), labelCs.end(), ys.begin(), ys.end()); │ │ │ │ -505 } │ │ │ │ -506 │ │ │ │ -507 / │ │ │ │ -****************************************************************************/ │ │ │ │ -508 template │ │ │ │ -_5_0_9 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_D_e_c_i_s_i_o_n_T_r_e_e(const std::vector& labelCs, │ │ │ │ -510 const std::string& table) { │ │ │ │ -511 // Convert std::string to values of type Y │ │ │ │ -512 std::vector ys; │ │ │ │ -513 std::istringstream iss(table); │ │ │ │ -514 copy(std::istream_iterator(iss), std::istream_iterator(), │ │ │ │ -515 back_inserter(ys)); │ │ │ │ -516 │ │ │ │ -517 // now call recursive Create │ │ │ │ -518 root_ = create(labelCs.begin(), labelCs.end(), ys.begin(), ys.end()); │ │ │ │ -519 } │ │ │ │ -520 │ │ │ │ -521 / │ │ │ │ -****************************************************************************/ │ │ │ │ -522 template │ │ │ │ -_5_2_3 template _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_D_e_c_i_s_i_o_n_T_r_e_e( │ │ │ │ -524 Iterator begin, Iterator end, const L& label) { │ │ │ │ -525 root_ = compose(begin, end, label); │ │ │ │ -526 } │ │ │ │ -527 │ │ │ │ -528 / │ │ │ │ -****************************************************************************/ │ │ │ │ -529 template │ │ │ │ -_5_3_0 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_D_e_c_i_s_i_o_n_T_r_e_e(const L& label, │ │ │ │ -531 const _D_e_c_i_s_i_o_n_T_r_e_e& f0, const _D_e_c_i_s_i_o_n_T_r_e_e& f1) { │ │ │ │ -532 const std::vector functions{f0, f1}; │ │ │ │ -533 root_ = compose(functions.begin(), functions.end(), label); │ │ │ │ -534 } │ │ │ │ -535 │ │ │ │ -536 / │ │ │ │ -****************************************************************************/ │ │ │ │ -537 template │ │ │ │ -538 template │ │ │ │ -_5_3_9 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_D_e_c_i_s_i_o_n_T_r_e_e(const _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _X_>& other, │ │ │ │ -540 Func Y_of_X) { │ │ │ │ -541 // Define functor for identity mapping of node label. │ │ │ │ -542 auto L_of_L = [](const L& label) { return label; }; │ │ │ │ -543 root_ = convertFrom(other._r_o_o_t__, L_of_L, Y_of_X); │ │ │ │ -544 } │ │ │ │ -545 │ │ │ │ -546 / │ │ │ │ -****************************************************************************/ │ │ │ │ -547 template │ │ │ │ -548 template │ │ │ │ -_5_4_9 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_D_e_c_i_s_i_o_n_T_r_e_e(const _D_e_c_i_s_i_o_n_T_r_e_e_<_M_,_ _X_>& other, │ │ │ │ -550 const std::map& map, Func Y_of_X) { │ │ │ │ -551 auto L_of_M = [&map](const M& label) -> L { return map.at(label); }; │ │ │ │ -552 root_ = convertFrom(other._r_o_o_t__, L_of_M, Y_of_X); │ │ │ │ -553 } │ │ │ │ -554 │ │ │ │ -555 / │ │ │ │ -****************************************************************************/ │ │ │ │ -556 // Called by two constructors above. │ │ │ │ -557 // Takes a label and a corresponding range of decision trees, and creates a │ │ │ │ -558 // new decision tree. However, the order of the labels needs to be │ │ │ │ -respected, │ │ │ │ -559 // so we cannot just create a root Choice node on the label: if the label │ │ │ │ -is │ │ │ │ -560 // not the highest label, we need a complicated/ expensive recursive call. │ │ │ │ -561 template │ │ │ │ -562 template │ │ │ │ -563 typename _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_N_o_d_e_P_t_r _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_c_o_m_p_o_s_e( │ │ │ │ -564 Iterator begin, Iterator end, const L& label) const { │ │ │ │ -565 // find highest label among branches │ │ │ │ -566 boost::optional highestLabel; │ │ │ │ -567 size_t nrChoices = 0; │ │ │ │ -568 for (Iterator it = begin; it != end; it++) { │ │ │ │ -569 if (it->root_->isLeaf()) │ │ │ │ -570 continue; │ │ │ │ -571 boost::shared_ptr c = │ │ │ │ -572 boost::dynamic_pointer_cast(it->root_); │ │ │ │ -573 if (!highestLabel || c->label() > *highestLabel) { │ │ │ │ -574 highestLabel.reset(c->label()); │ │ │ │ -575 nrChoices = c->nrChoices(); │ │ │ │ -576 } │ │ │ │ -577 } │ │ │ │ -578 │ │ │ │ -579 // if label is already in correct order, just put together a choice on │ │ │ │ -label │ │ │ │ -580 if (!nrChoices || !highestLabel || label > *highestLabel) { │ │ │ │ -581 auto choiceOnLabel = boost::make_shared(label, end - begin); │ │ │ │ -582 for (Iterator it = begin; it != end; it++) │ │ │ │ -583 choiceOnLabel->push_back(it->root_); │ │ │ │ -584 return Choice::Unique(choiceOnLabel); │ │ │ │ -585 } else { │ │ │ │ -586 // Set up a new choice on the highest label │ │ │ │ -587 auto choiceOnHighestLabel = │ │ │ │ -588 boost::make_shared(*highestLabel, nrChoices); │ │ │ │ -589 // now, for all possible values of highestLabel │ │ │ │ -590 for (size_t index = 0; index < nrChoices; index++) { │ │ │ │ -591 // make a new set of functions for composing by iterating over the given │ │ │ │ -592 // functions, and selecting the appropriate branch. │ │ │ │ -593 std::vector functions; │ │ │ │ -594 for (Iterator it = begin; it != end; it++) { │ │ │ │ -595 // by restricting the input functions to value i for labelBelow │ │ │ │ -596 DecisionTree chosen = it->choose(*highestLabel, index); │ │ │ │ -597 functions.push_back(chosen); │ │ │ │ -598 } │ │ │ │ -599 // We then recurse, for all values of the highest label │ │ │ │ -600 NodePtr fi = compose(functions.begin(), functions.end(), label); │ │ │ │ -601 choiceOnHighestLabel->push_back(fi); │ │ │ │ -602 } │ │ │ │ -603 return Choice::Unique(choiceOnHighestLabel); │ │ │ │ -604 } │ │ │ │ -605 } │ │ │ │ -606 │ │ │ │ -607 / │ │ │ │ -****************************************************************************/ │ │ │ │ -608 // "create" is a bit of a complicated thing, but very useful. │ │ │ │ -609 // It takes a range of labels and a corresponding range of values, │ │ │ │ -610 // and creates a decision tree, as follows: │ │ │ │ -611 // - if there is only one label, creates a choice node with values in │ │ │ │ -leaves │ │ │ │ -612 // - otherwise, it evenly splits up the range of values and creates a tree │ │ │ │ -for │ │ │ │ -613 // each sub-range, and assigns that tree to first label's choices │ │ │ │ -614 // Example: │ │ │ │ -615 // create([B A],[1 2 3 4]) would call │ │ │ │ -616 // create([A],[1 2]) │ │ │ │ -617 // create([A],[3 4]) │ │ │ │ -618 // and produce │ │ │ │ -619 // B=0 │ │ │ │ -620 // A=0: 1 │ │ │ │ -621 // A=1: 2 │ │ │ │ -622 // B=1 │ │ │ │ -623 // A=0: 3 │ │ │ │ -624 // A=1: 4 │ │ │ │ -625 // Note, through the magic of "compose", create([A B],[1 3 2 4]) will │ │ │ │ -produce │ │ │ │ -626 // exactly the same tree as above: the highest label is always the root. │ │ │ │ -627 // However, it will be *way* faster if labels are given highest to lowest. │ │ │ │ -628 template │ │ │ │ -629 template │ │ │ │ -_6_3_0 typename _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_N_o_d_e_P_t_r _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_c_r_e_a_t_e( │ │ │ │ -631 It begin, It end, ValueIt beginY, ValueIt endY) const { │ │ │ │ -632 // get crucial counts │ │ │ │ -633 size_t nrChoices = begin->second; │ │ │ │ -634 size_t size = endY - beginY; │ │ │ │ -635 │ │ │ │ -636 // Find the next key to work on │ │ │ │ -637 It labelC = begin + 1; │ │ │ │ -638 if (labelC == end) { │ │ │ │ -639 // Base case: only one key left │ │ │ │ -640 // Create a simple choice node with values as leaves. │ │ │ │ -641 if (size != nrChoices) { │ │ │ │ -642 std::cout << "Trying to create DD on " << begin->first << std::endl; │ │ │ │ -643 std::cout << boost::format( │ │ │ │ -644 "DecisionTree::create: expected %d values but got %d " │ │ │ │ -645 "instead") % │ │ │ │ -646 nrChoices % size │ │ │ │ -647 << std::endl; │ │ │ │ -648 throw std::invalid_argument("DecisionTree::create invalid argument"); │ │ │ │ -649 } │ │ │ │ -650 auto choice = boost::make_shared(begin->first, endY - beginY); │ │ │ │ -651 for (ValueIt y = beginY; y != endY; y++) │ │ │ │ -652 choice->push_back(_N_o_d_e_P_t_r(new _L_e_a_f(*y))); │ │ │ │ -653 return Choice::Unique(choice); │ │ │ │ -654 } │ │ │ │ -655 │ │ │ │ -656 // Recursive case: perform "Shannon expansion" │ │ │ │ -657 // Creates one tree (i.e.,function) for each choice of current key │ │ │ │ -658 // by calling create recursively, and then puts them all together. │ │ │ │ -659 std::vector functions; │ │ │ │ -660 size_t _s_p_l_i_t = size / nrChoices; │ │ │ │ -661 for (size_t i = 0; i < nrChoices; i++, beginY += _s_p_l_i_t) { │ │ │ │ -662 _N_o_d_e_P_t_r f = create(labelC, end, beginY, beginY + _s_p_l_i_t); │ │ │ │ -663 functions.emplace_back(f); │ │ │ │ -664 } │ │ │ │ -665 return compose(functions.begin(), functions.end(), begin->first); │ │ │ │ -666 } │ │ │ │ -667 │ │ │ │ -668 / │ │ │ │ -****************************************************************************/ │ │ │ │ -669 template │ │ │ │ -670 template │ │ │ │ -_6_7_1 typename _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_N_o_d_e_P_t_r _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_c_o_n_v_e_r_t_F_r_o_m( │ │ │ │ -672 const typename _D_e_c_i_s_i_o_n_T_r_e_e_<_M_,_ _X_>_:_:_N_o_d_e_P_t_r& f, │ │ │ │ -673 std::function L_of_M, │ │ │ │ -674 std::function Y_of_X) const { │ │ │ │ -675 using LY = _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>; │ │ │ │ -676 │ │ │ │ -677 // Ugliness below because apparently we can't have templated virtual │ │ │ │ -678 // functions. │ │ │ │ -679 // If leaf, apply unary conversion "op" and create a unique leaf. │ │ │ │ -680 using MXLeaf = typename _D_e_c_i_s_i_o_n_T_r_e_e_<_M_,_ _X_>_:_:_L_e_a_f; │ │ │ │ -681 if (auto leaf = boost::dynamic_pointer_cast(f)) { │ │ │ │ -682 return _N_o_d_e_P_t_r(new _L_e_a_f(Y_of_X(leaf->constant()), leaf->nrAssignments())); │ │ │ │ -683 } │ │ │ │ -684 │ │ │ │ -685 // Check if Choice │ │ │ │ -686 using MXChoice = typename _D_e_c_i_s_i_o_n_T_r_e_e_<_M_,_ _X_>_:_:_C_h_o_i_c_e; │ │ │ │ -687 auto choice = boost::dynamic_pointer_cast(f); │ │ │ │ -688 if (!choice) throw std::invalid_argument( │ │ │ │ -689 "DecisionTree::convertFrom: Invalid NodePtr"); │ │ │ │ -690 │ │ │ │ -691 // get new label │ │ │ │ -692 const M oldLabel = choice->label(); │ │ │ │ -693 const L newLabel = L_of_M(oldLabel); │ │ │ │ -694 │ │ │ │ -695 // put together via Shannon expansion otherwise not sorted. │ │ │ │ -696 std::vector functions; │ │ │ │ -697 for (auto&& branch : choice->branches()) { │ │ │ │ -698 functions.emplace_back(convertFrom(branch, L_of_M, Y_of_X)); │ │ │ │ -699 } │ │ │ │ -700 return LY::compose(functions.begin(), functions.end(), newLabel); │ │ │ │ -701 } │ │ │ │ -702 │ │ │ │ -703 / │ │ │ │ -****************************************************************************/ │ │ │ │ -714 template │ │ │ │ -_7_1_5 struct _V_i_s_i_t { │ │ │ │ -716 using F = std::function; │ │ │ │ -_7_1_7 explicit _V_i_s_i_t(F _f) : _f(_f) {} │ │ │ │ -_7_1_8 F _f; │ │ │ │ -719 │ │ │ │ -_7_2_1 void _o_p_e_r_a_t_o_r_(_)(const typename _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_N_o_d_e_P_t_r& node) const { │ │ │ │ -722 using Leaf = typename _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_L_e_a_f; │ │ │ │ -723 if (auto leaf = boost::dynamic_pointer_cast(node)) │ │ │ │ -724 return _f(leaf->constant()); │ │ │ │ -725 │ │ │ │ -726 using Choice = typename _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_C_h_o_i_c_e; │ │ │ │ -727 auto choice = boost::dynamic_pointer_cast(node); │ │ │ │ -728 if (!choice) │ │ │ │ -729 throw std::invalid_argument("DecisionTree::Visit: Invalid NodePtr"); │ │ │ │ -730 for (auto&& branch : choice->branches()) (*this)(branch); // recurse! │ │ │ │ -731 } │ │ │ │ -732 }; │ │ │ │ -733 │ │ │ │ -734 template │ │ │ │ -735 template │ │ │ │ -_7_3_6 void _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_v_i_s_i_t(Func f) const { │ │ │ │ -737 _V_i_s_i_t_<_L_,_ _Y_> visit(f); │ │ │ │ -738 visit(root_); │ │ │ │ -739 } │ │ │ │ -740 │ │ │ │ -741 / │ │ │ │ -****************************************************************************/ │ │ │ │ -751 template │ │ │ │ -_7_5_2 struct _V_i_s_i_t_L_e_a_f { │ │ │ │ -753 using F = std::function_:_:_L_e_a_f&)>; │ │ │ │ -_7_5_4 explicit _V_i_s_i_t_L_e_a_f(F _f) : _f(_f) {} │ │ │ │ -_7_5_5 F _f; │ │ │ │ -756 │ │ │ │ -_7_5_8 void _o_p_e_r_a_t_o_r_(_)(const typename _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_N_o_d_e_P_t_r& node) const { │ │ │ │ -759 using Leaf = typename _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_L_e_a_f; │ │ │ │ -760 if (auto leaf = boost::dynamic_pointer_cast(node)) │ │ │ │ -761 return _f(*leaf); │ │ │ │ -762 │ │ │ │ -763 using Choice = typename _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_C_h_o_i_c_e; │ │ │ │ -764 auto choice = boost::dynamic_pointer_cast(node); │ │ │ │ -765 if (!choice) │ │ │ │ -766 throw std::invalid_argument("DecisionTree::VisitLeaf: Invalid NodePtr"); │ │ │ │ -767 for (auto&& branch : choice->branches()) (*this)(branch); // recurse! │ │ │ │ -768 } │ │ │ │ -769 }; │ │ │ │ -770 │ │ │ │ -771 template │ │ │ │ -772 template │ │ │ │ -_7_7_3 void _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_v_i_s_i_t_L_e_a_f(Func f) const { │ │ │ │ -774 _V_i_s_i_t_L_e_a_f_<_L_,_ _Y_> visit(f); │ │ │ │ -775 visit(root_); │ │ │ │ -776 } │ │ │ │ -777 │ │ │ │ -778 / │ │ │ │ -****************************************************************************/ │ │ │ │ -785 template │ │ │ │ -_7_8_6 struct _V_i_s_i_t_W_i_t_h { │ │ │ │ -787 using F = std::function&, const Y&)>; │ │ │ │ -_7_8_8 explicit _V_i_s_i_t_W_i_t_h(F _f) : _f(_f) {} │ │ │ │ -_7_8_9 _A_s_s_i_g_n_m_e_n_t_<_L_> _a_s_s_i_g_n_m_e_n_t; │ │ │ │ -_7_9_0 F _f; │ │ │ │ -791 │ │ │ │ -_7_9_3 void _o_p_e_r_a_t_o_r_(_)(const typename _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_N_o_d_e_P_t_r& node) { │ │ │ │ -794 using Leaf = typename _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_L_e_a_f; │ │ │ │ -795 if (auto leaf = boost::dynamic_pointer_cast(node)) │ │ │ │ -796 return _f(_a_s_s_i_g_n_m_e_n_t, leaf->constant()); │ │ │ │ -797 │ │ │ │ -798 using Choice = typename _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_C_h_o_i_c_e; │ │ │ │ -799 auto choice = boost::dynamic_pointer_cast(node); │ │ │ │ -800 if (!choice) │ │ │ │ -801 throw std::invalid_argument("DecisionTree::VisitWith: Invalid NodePtr"); │ │ │ │ -802 for (size_t i = 0; i < choice->nrChoices(); i++) { │ │ │ │ -803 _a_s_s_i_g_n_m_e_n_t[choice->label()] = i; // Set assignment for label to i │ │ │ │ -804 │ │ │ │ -805 (*this)(choice->branches()[i]); // recurse! │ │ │ │ -806 │ │ │ │ -807 // Remove the choice so we are backtracking │ │ │ │ -808 auto choice_it = _a_s_s_i_g_n_m_e_n_t.find(choice->label()); │ │ │ │ -809 _a_s_s_i_g_n_m_e_n_t.erase(choice_it); │ │ │ │ -810 } │ │ │ │ -811 } │ │ │ │ -812 }; │ │ │ │ -813 │ │ │ │ -814 template │ │ │ │ -815 template │ │ │ │ -_8_1_6 void _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_v_i_s_i_t_W_i_t_h(Func f) const { │ │ │ │ -817 _V_i_s_i_t_W_i_t_h_<_L_,_ _Y_> visit(f); │ │ │ │ -818 visit(root_); │ │ │ │ -819 } │ │ │ │ -820 │ │ │ │ -821 / │ │ │ │ -****************************************************************************/ │ │ │ │ -822 template │ │ │ │ -_8_2_3 size_t _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_n_r_L_e_a_v_e_s() const { │ │ │ │ -824 size_t total = 0; │ │ │ │ -825 visit([&total](const Y& node) { total += 1; }); │ │ │ │ -826 return total; │ │ │ │ -827 } │ │ │ │ -828 │ │ │ │ -829 / │ │ │ │ -****************************************************************************/ │ │ │ │ -830 // fold is just done with a visit │ │ │ │ -831 template │ │ │ │ -832 template │ │ │ │ -_8_3_3 X _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_f_o_l_d(Func f, X x0) const { │ │ │ │ -834 visit([&](const Y& y) { x0 = f(y, x0); }); │ │ │ │ -835 return x0; │ │ │ │ -836 } │ │ │ │ -837 │ │ │ │ -838 / │ │ │ │ -****************************************************************************/ │ │ │ │ -852 template │ │ │ │ -_8_5_3 std::set _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_l_a_b_e_l_s() const { │ │ │ │ -854 std::set unique; │ │ │ │ -855 auto f = [&](const _A_s_s_i_g_n_m_e_n_t_<_L_>& assignment, const Y&) { │ │ │ │ -856 for (auto&& kv : assignment) { │ │ │ │ -857 unique.insert(kv.first); │ │ │ │ -858 } │ │ │ │ -859 }; │ │ │ │ -860 visitWith(f); │ │ │ │ -861 return unique; │ │ │ │ -862 } │ │ │ │ -863 │ │ │ │ -864/ │ │ │ │ -****************************************************************************/ │ │ │ │ -865 template │ │ │ │ -866 bool _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_e_q_u_a_l_s(const _D_e_c_i_s_i_o_n_T_r_e_e& other, │ │ │ │ -867 const CompareFunc& compare) const { │ │ │ │ -868 return root_->equals(*other._r_o_o_t__, compare); │ │ │ │ -869 } │ │ │ │ -870 │ │ │ │ -871 template │ │ │ │ -_8_7_2 void _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_p_r_i_n_t(const std::string& s, │ │ │ │ -873 const LabelFormatter& labelFormatter, │ │ │ │ -874 const ValueFormatter& valueFormatter) const { │ │ │ │ -875 root_->print(s, labelFormatter, valueFormatter); │ │ │ │ -876 } │ │ │ │ -877 │ │ │ │ -878 template │ │ │ │ -_8_7_9 bool _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_o_p_e_r_a_t_o_r_=_=(const _D_e_c_i_s_i_o_n_T_r_e_e& other) const { │ │ │ │ -880 return root_->equals(*other._r_o_o_t__); │ │ │ │ -881 } │ │ │ │ -882 │ │ │ │ -883 template │ │ │ │ -_8_8_4 const Y& _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_o_p_e_r_a_t_o_r_(_)(const _A_s_s_i_g_n_m_e_n_t_<_L_>& x) const { │ │ │ │ -885 return root_->operator ()(x); │ │ │ │ -886 } │ │ │ │ -887 │ │ │ │ -888 template │ │ │ │ -_8_8_9 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_> _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_a_p_p_l_y(const _U_n_a_r_y& op) const { │ │ │ │ -890 // It is unclear what should happen if tree is empty: │ │ │ │ -891 if (empty()) { │ │ │ │ -892 throw std::runtime_error( │ │ │ │ -893 "DecisionTree::apply(unary op) undefined for empty tree."); │ │ │ │ -894 } │ │ │ │ -895 return _D_e_c_i_s_i_o_n_T_r_e_e(root_->apply(op)); │ │ │ │ -896 } │ │ │ │ -897 │ │ │ │ -899 template │ │ │ │ -_9_0_0 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_> _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_a_p_p_l_y( │ │ │ │ -901 const UnaryAssignment& op) const { │ │ │ │ -902 // It is unclear what should happen if tree is empty: │ │ │ │ -903 if (empty()) { │ │ │ │ -904 throw std::runtime_error( │ │ │ │ -905 "DecisionTree::apply(unary op) undefined for empty tree."); │ │ │ │ -906 } │ │ │ │ -907 _A_s_s_i_g_n_m_e_n_t_<_L_> assignment; │ │ │ │ -908 return _D_e_c_i_s_i_o_n_T_r_e_e(root_->apply(op, assignment)); │ │ │ │ -909 } │ │ │ │ -910 │ │ │ │ -911 / │ │ │ │ -****************************************************************************/ │ │ │ │ -912 template │ │ │ │ -_9_1_3 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_> _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_a_p_p_l_y(const _D_e_c_i_s_i_o_n_T_r_e_e& g, │ │ │ │ -914 const Binary& op) const { │ │ │ │ -915 // It is unclear what should happen if either tree is empty: │ │ │ │ -916 if (empty() || g._e_m_p_t_y()) { │ │ │ │ -917 throw std::runtime_error( │ │ │ │ -918 "DecisionTree::apply(binary op) undefined for empty trees."); │ │ │ │ -919 } │ │ │ │ -920 // apply the operaton on the root of both diagrams │ │ │ │ -921 _N_o_d_e_P_t_r h = root_->apply_f_op_g(*g._r_o_o_t__, op); │ │ │ │ -922 // create a new class with the resulting root "h" │ │ │ │ -923 _D_e_c_i_s_i_o_n_T_r_e_e result(h); │ │ │ │ -924 return result; │ │ │ │ -925 } │ │ │ │ -926 │ │ │ │ -927 / │ │ │ │ -****************************************************************************/ │ │ │ │ -928 // The way this works: │ │ │ │ -929 // We have an ADT, picture it as a tree. │ │ │ │ -930 // At a certain depth, we have a branch on "label". │ │ │ │ -931 // The function "choose(label,index)" will return a tree of one less depth, │ │ │ │ -932 // where there is no more branch on "label": only the subtree under that │ │ │ │ -933 // branch point corresponding to the value "index" is left instead. │ │ │ │ -934 // The function below get all these smaller trees and "ops" them together. │ │ │ │ -935 // This implements marginalization in Darwiche09book, pg 330 │ │ │ │ -936 template │ │ │ │ -_9_3_7 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_> _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_c_o_m_b_i_n_e(const L& label, │ │ │ │ -938 size_t cardinality, const Binary& op) const { │ │ │ │ -939 _D_e_c_i_s_i_o_n_T_r_e_e result = choose(label, 0); │ │ │ │ -940 for (size_t index = 1; index < cardinality; index++) { │ │ │ │ -941 _D_e_c_i_s_i_o_n_T_r_e_e chosen = choose(label, index); │ │ │ │ -942 result = result.apply(chosen, op); │ │ │ │ -943 } │ │ │ │ -944 return result; │ │ │ │ -945 } │ │ │ │ -946 │ │ │ │ -947 / │ │ │ │ -****************************************************************************/ │ │ │ │ -948 template │ │ │ │ -_9_4_9 void _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_d_o_t(std::ostream& os, │ │ │ │ -950 const LabelFormatter& labelFormatter, │ │ │ │ -951 const ValueFormatter& valueFormatter, │ │ │ │ -952 bool showZero) const { │ │ │ │ -953 os << "digraph G {\n"; │ │ │ │ -954 root_->dot(os, labelFormatter, valueFormatter, showZero); │ │ │ │ -955 os << " [ordering=out]}" << std::endl; │ │ │ │ -956 } │ │ │ │ -957 │ │ │ │ -958 template │ │ │ │ -_9_5_9 void _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_d_o_t(const std::string& name, │ │ │ │ -960 const LabelFormatter& labelFormatter, │ │ │ │ -961 const ValueFormatter& valueFormatter, │ │ │ │ -962 bool showZero) const { │ │ │ │ -963 std::ofstream os((name + ".dot").c_str()); │ │ │ │ -964 _d_o_t(os, labelFormatter, valueFormatter, showZero); │ │ │ │ -965 int result = │ │ │ │ -966 system(("dot -Tpdf " + name + ".dot -o " + name + ".pdf >& /dev/null") │ │ │ │ -967 .c_str()); │ │ │ │ -968 if (result == -1) │ │ │ │ -969 throw std::runtime_error("DecisionTree::dot system call failed"); │ │ │ │ -970 } │ │ │ │ -971 │ │ │ │ -972 template │ │ │ │ -_9_7_3 std::string _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_d_o_t(const LabelFormatter& labelFormatter, │ │ │ │ -974 const ValueFormatter& valueFormatter, │ │ │ │ -975 bool showZero) const { │ │ │ │ -976 std::stringstream ss; │ │ │ │ -977 _d_o_t(ss, labelFormatter, valueFormatter, showZero); │ │ │ │ -978 return ss.str(); │ │ │ │ -979 } │ │ │ │ -980 │ │ │ │ -981/ │ │ │ │ -******************************************************************************/ │ │ │ │ -982 │ │ │ │ -983 } // namespace gtsam │ │ │ │ -_D_e_c_i_s_i_o_n_T_r_e_e_._h │ │ │ │ -Decision Tree for use in DiscreteFactors. │ │ │ │ +_3_3class _D_i_s_c_r_e_t_e_M_a_r_g_i_n_a_l_s { │ │ │ │ +34 │ │ │ │ +35 protected: │ │ │ │ +36 │ │ │ │ +37 DiscreteBayesTree::shared_ptr bayesTree_; │ │ │ │ +38 │ │ │ │ +39 public: │ │ │ │ +40 │ │ │ │ +41 _D_i_s_c_r_e_t_e_M_a_r_g_i_n_a_l_s() {} │ │ │ │ +42 │ │ │ │ +_4_6 _D_i_s_c_r_e_t_e_M_a_r_g_i_n_a_l_s(const _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h& graph) { │ │ │ │ +47 bayesTree_ = graph.eliminateMultifrontal(); │ │ │ │ +48 } │ │ │ │ +49 │ │ │ │ +_5_1 _D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_s_h_a_r_e_d___p_t_r _o_p_e_r_a_t_o_r_(_)(_K_e_y variable) const { │ │ │ │ +52 // Compute marginal │ │ │ │ +53 _D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_s_h_a_r_e_d___p_t_r marginalFactor; │ │ │ │ +54 marginalFactor = bayesTree_->marginalFactor(variable, &_E_l_i_m_i_n_a_t_e_D_i_s_c_r_e_t_e); │ │ │ │ +55 return marginalFactor; │ │ │ │ +56 } │ │ │ │ +57 │ │ │ │ +_6_2 Vector _m_a_r_g_i_n_a_l_P_r_o_b_a_b_i_l_i_t_i_e_s(const _D_i_s_c_r_e_t_e_K_e_y& key) const { │ │ │ │ +63 // Compute marginal │ │ │ │ +64 _D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_s_h_a_r_e_d___p_t_r marginalFactor; │ │ │ │ +65 marginalFactor = bayesTree_->marginalFactor(key.first, &_E_l_i_m_i_n_a_t_e_D_i_s_c_r_e_t_e); │ │ │ │ +66 │ │ │ │ +67 //Create result │ │ │ │ +68 Vector vResult(key.second); │ │ │ │ +69 for (size_t state = 0; state < key.second ; ++ state) { │ │ │ │ +70 _D_i_s_c_r_e_t_e_V_a_l_u_e_s values; │ │ │ │ +71 values[key.first] = state; │ │ │ │ +72 vResult(state) = (*marginalFactor)(values); │ │ │ │ +73 } │ │ │ │ +74 return vResult; │ │ │ │ +75 } │ │ │ │ +76 │ │ │ │ +77 }; │ │ │ │ +78 │ │ │ │ +79} /* namespace gtsam */ │ │ │ │ +_V_e_c_t_o_r_._h │ │ │ │ +typedef and functions to augment Eigen's VectorXd │ │ │ │ +_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_._h │ │ │ │ +Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_e_D_i_s_c_r_e_t_e │ │ │ │ +std::pair< DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr > │ │ │ │ +EliminateDiscrete(const DiscreteFactorGraph &factors, const Ordering │ │ │ │ +&frontalKeys) │ │ │ │ +Main elimination function for DiscreteFactorGraph. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.cpp:200 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_K_e_y │ │ │ │ +std::pair< Key, size_t > DiscreteKey │ │ │ │ +Key type for discrete variables. │ │ │ │ +DDeeffiinniittiioonn DiscreteKey.h:36 │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_s_p_l_i_t │ │ │ │ -void split(const G &g, const PredecessorMap< KEY > &tree, G &Ab1, G &Ab2) │ │ │ │ -Split the graph into two parts: one corresponds to the given spanning tree, and │ │ │ │ -the other corresponds... │ │ │ │ -DDeeffiinniittiioonn graph-inl.h:255 │ │ │ │ -_g_t_s_a_m_:_:_d_o_t │ │ │ │ -double dot(const V1 &a, const V2 &b) │ │ │ │ -Dot product. │ │ │ │ -DDeeffiinniittiioonn Vector.h:195 │ │ │ │ -_g_t_s_a_m_:_:_e_q_u_a_l_s │ │ │ │ -Template to create a binary predicate. │ │ │ │ -DDeeffiinniittiioonn Testable.h:111 │ │ │ │ -_g_t_s_a_m_:_:_A_s_s_i_g_n_m_e_n_t │ │ │ │ -An assignment from labels to value index (size_t). │ │ │ │ -DDeeffiinniittiioonn Assignment.h:37 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_L_e_a_f │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:52 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_L_e_a_f_:_:_c_h_o_o_s_e │ │ │ │ -NodePtr choose(const L &label, size_t index) const override │ │ │ │ -choose a branch, create new memory ! │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:149 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_L_e_a_f_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -const Y & operator()(const Assignment< L > &x) const override │ │ │ │ -evaluate │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:110 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_L_e_a_f_:_:_a_p_p_l_y │ │ │ │ -NodePtr apply(const UnaryAssignment &op, const Assignment< L > &assignment) │ │ │ │ -const override │ │ │ │ -Apply unary operator with assignment. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:121 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_L_e_a_f_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const Node &q, const CompareFunc &compare) const override │ │ │ │ -equality up to tolerance │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:87 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_L_e_a_f_:_:_c_o_n_s_t_a_n_t__ │ │ │ │ -Y constant_ │ │ │ │ -constant stored in this leaf │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:54 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_L_e_a_f_:_:_p_r_i_n_t │ │ │ │ -void print(const std::string &s, const LabelFormatter &labelFormatter, const │ │ │ │ -ValueFormatter &valueFormatter) const override │ │ │ │ -print │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:94 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_L_e_a_f_:_:_a_p_p_l_y │ │ │ │ -NodePtr apply(const Unary &op) const override │ │ │ │ -apply unary operator │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:115 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_L_e_a_f_:_:_s_a_m_e_L_e_a_f │ │ │ │ -bool sameLeaf(const Leaf &q) const override │ │ │ │ -Leaf-Leaf equality. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:77 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_L_e_a_f_:_:_L_e_a_f │ │ │ │ -Leaf(const Y &constant, size_t nrAssignments=1) │ │ │ │ -Constructor from constant. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:65 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_L_e_a_f_:_:_n_r_A_s_s_i_g_n_m_e_n_t_s__ │ │ │ │ -size_t nrAssignments_ │ │ │ │ -The number of assignments contained within this leaf. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:59 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_L_e_a_f_:_:_d_o_t │ │ │ │ -void dot(std::ostream &os, const LabelFormatter &labelFormatter, const │ │ │ │ -ValueFormatter &valueFormatter, bool showZero) const override │ │ │ │ -Write graphviz format to stream os. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:100 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_L_e_a_f_:_:_L_e_a_f │ │ │ │ -Leaf() │ │ │ │ -Default constructor for serialization. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:62 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_L_e_a_f_:_:_s_a_m_e_L_e_a_f │ │ │ │ -bool sameLeaf(const Node &q) const override │ │ │ │ -polymorphic equality: is q a leaf and is it the same as this leaf? │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:82 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_L_e_a_f_:_:_c_o_n_s_t_a_n_t │ │ │ │ -const Y & constant() const │ │ │ │ -Return the constant. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:69 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_L_e_a_f_:_:_n_r_A_s_s_i_g_n_m_e_n_t_s │ │ │ │ -size_t nrAssignments() const │ │ │ │ -Return the number of assignments contained within this leaf. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:74 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:172 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_a_p_p_l_y │ │ │ │ -NodePtr apply(const Unary &op) const override │ │ │ │ -apply unary operator. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:389 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_C_h_o_i_c_e │ │ │ │ -Choice(const L &label, const Choice &f, const UnaryAssignment &op, const │ │ │ │ -Assignment< L > &assignment) │ │ │ │ -Constructor which accepts a UnaryAssignment op and the corresponding │ │ │ │ -assignment. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:369 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_l_a_b_e_l │ │ │ │ -const L & label() const │ │ │ │ -Return the label of this choice node. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:258 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_p_r_i_n_t │ │ │ │ -void print(const std::string &s, const LabelFormatter &labelFormatter, const │ │ │ │ -ValueFormatter &valueFormatter) const override │ │ │ │ -print (as a tree). │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:280 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_a_p_p_l_y │ │ │ │ -NodePtr apply(const UnaryAssignment &op, const Assignment< L > &assignment) │ │ │ │ -const override │ │ │ │ -Apply unary operator with assignment. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:395 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_l_a_b_e_l__ │ │ │ │ -L label_ │ │ │ │ -the label of the variable on which we split │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:174 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_s_a_m_e_L_e_a_f │ │ │ │ -bool sameLeaf(const Node &q) const override │ │ │ │ -polymorphic equality: if q is a leaf, could be... │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:318 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_C_h_o_i_c_e │ │ │ │ -Choice(const Choice &f, const Choice &g, const Binary &op) │ │ │ │ -Construct from applying binary op to two Choice nodes. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:230 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_p_u_s_h___b_a_c_k │ │ │ │ -void push_back(const NodePtr &node) │ │ │ │ -add a branch: TODO merge into constructor │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:271 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_b_r_a_n_c_h_e_s__ │ │ │ │ -std::vector< NodePtr > branches_ │ │ │ │ -The children of this Choice node. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:177 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_C_h_o_i_c_e │ │ │ │ -Choice() │ │ │ │ -Default constructor for serialization. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:190 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -const Y & operator()(const Assignment< L > &x) const override │ │ │ │ -evaluate │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:336 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_C_h_o_i_c_e │ │ │ │ -Choice(const L &label, size_t count) │ │ │ │ -Constructor, given choice label and mandatory expected branch count. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:224 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_c_h_o_o_s_e │ │ │ │ -NodePtr choose(const L &label, size_t index) const override │ │ │ │ -choose a branch, recursively │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:434 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_d_o_t │ │ │ │ -void dot(std::ostream &os, const LabelFormatter &labelFormatter, const │ │ │ │ -ValueFormatter &valueFormatter, bool showZero) const override │ │ │ │ -output to graphviz (as a a graph) │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:290 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_s_a_m_e_L_e_a_f │ │ │ │ -bool sameLeaf(const Leaf &q) const override │ │ │ │ -Choice-Leaf equality: always false. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:313 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_U_n_i_q_u_e │ │ │ │ -static NodePtr Unique(const ChoicePtr &f) │ │ │ │ -If all branches of a choice node f are the same, just return a branch. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:200 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_C_h_o_i_c_e_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const Node &q, const CompareFunc &compare) const override │ │ │ │ -equality │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:323 │ │ │ │ -_g_t_s_a_m_:_:_V_i_s_i_t │ │ │ │ -Functor performing depth-first visit to each leaf with the leaf value as the │ │ │ │ -argument. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:715 │ │ │ │ -_g_t_s_a_m_:_:_V_i_s_i_t_:_:_f │ │ │ │ -F f │ │ │ │ -folding function object. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:718 │ │ │ │ -_g_t_s_a_m_:_:_V_i_s_i_t_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -void operator()(const typename DecisionTree< L, Y >::NodePtr &node) const │ │ │ │ -Do a depth-first visit on the tree rooted at node. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:721 │ │ │ │ -_g_t_s_a_m_:_:_V_i_s_i_t_:_:_V_i_s_i_t │ │ │ │ -Visit(F f) │ │ │ │ -Construct from folding function. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:717 │ │ │ │ -_g_t_s_a_m_:_:_V_i_s_i_t_L_e_a_f │ │ │ │ -Functor performing depth-first visit to each leaf with the Leaf object passed │ │ │ │ -as an argument. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:752 │ │ │ │ -_g_t_s_a_m_:_:_V_i_s_i_t_L_e_a_f_:_:_V_i_s_i_t_L_e_a_f │ │ │ │ -VisitLeaf(F f) │ │ │ │ -Construct from folding function. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:754 │ │ │ │ -_g_t_s_a_m_:_:_V_i_s_i_t_L_e_a_f_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -void operator()(const typename DecisionTree< L, Y >::NodePtr &node) const │ │ │ │ -Do a depth-first visit on the tree rooted at node. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:758 │ │ │ │ -_g_t_s_a_m_:_:_V_i_s_i_t_L_e_a_f_:_:_f │ │ │ │ -F f │ │ │ │ -folding function object. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:755 │ │ │ │ -_g_t_s_a_m_:_:_V_i_s_i_t_W_i_t_h │ │ │ │ -Functor performing depth-first visit to each leaf with the leaf's Assignment │ │ │ │ -and value passed as a... │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:786 │ │ │ │ -_g_t_s_a_m_:_:_V_i_s_i_t_W_i_t_h_:_:_V_i_s_i_t_W_i_t_h │ │ │ │ -VisitWith(F f) │ │ │ │ -Construct from folding function. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:788 │ │ │ │ -_g_t_s_a_m_:_:_V_i_s_i_t_W_i_t_h_:_:_a_s_s_i_g_n_m_e_n_t │ │ │ │ -Assignment< L > assignment │ │ │ │ -Assignment, mutating through recursion. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:789 │ │ │ │ -_g_t_s_a_m_:_:_V_i_s_i_t_W_i_t_h_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -void operator()(const typename DecisionTree< L, Y >::NodePtr &node) │ │ │ │ -Do a depth-first visit on the tree rooted at node. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:793 │ │ │ │ -_g_t_s_a_m_:_:_V_i_s_i_t_W_i_t_h_:_:_f │ │ │ │ -F f │ │ │ │ -folding function object. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:790 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e │ │ │ │ -a decision tree is a function from assignments to values. │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:61 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_a_p_p_l_y │ │ │ │ -DecisionTree apply(const Unary &op) const │ │ │ │ -apply Unary operation "op" to f │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:889 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_c_o_n_v_e_r_t_F_r_o_m │ │ │ │ -NodePtr convertFrom(const typename DecisionTree< M, X >::NodePtr &f, std:: │ │ │ │ -function< L(const M &)> L_of_M, std::function< Y(const X &)> Y_of_X) const │ │ │ │ -Convert from a DecisionTree to DecisionTree. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:671 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_c_r_e_a_t_e │ │ │ │ -NodePtr create(It begin, It end, ValueIt beginY, ValueIt endY) const │ │ │ │ -Internal recursive function to create from keys, cardinalities, and Y values. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:630 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_N_o_d_e_P_t_r │ │ │ │ -typename Node::Ptr NodePtr │ │ │ │ ----------------------— Node base class ------------------------— │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:143 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_l_a_b_e_l_s │ │ │ │ -std::set< L > labels() const │ │ │ │ -Retrieve all unique labels as a set. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:853 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_e_m_p_t_y │ │ │ │ -bool empty() const │ │ │ │ -Check if tree is empty. │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:257 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_v_i_s_i_t │ │ │ │ -void visit(Func f) const │ │ │ │ -Visit all leaves in depth-first fashion. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:736 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_v_i_s_i_t_L_e_a_f │ │ │ │ -void visitLeaf(Func f) const │ │ │ │ -Visit all leaves in depth-first fashion. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:773 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_U_n_a_r_y │ │ │ │ -std::function< Y(const Y &)> Unary │ │ │ │ -Handy typedefs for unary and binary function types. │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:74 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_f_o_l_d │ │ │ │ -X fold(Func f, X x0) const │ │ │ │ -Fold a binary function over the tree, returning accumulator. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:833 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_r_o_o_t__ │ │ │ │ -NodePtr root_ │ │ │ │ -A DecisionTree just contains the root. TODO(dellaert): make protected. │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:146 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_p_r_i_n_t │ │ │ │ -void print(const std::string &s, const LabelFormatter &labelFormatter, const │ │ │ │ -ValueFormatter &valueFormatter) const │ │ │ │ -GTSAM-style print. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:872 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_c_o_m_b_i_n_e │ │ │ │ -DecisionTree combine(const L &label, size_t cardinality, const Binary &op) │ │ │ │ -const │ │ │ │ -combine subtrees on key with binary operation "op" │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:937 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_v_i_s_i_t_W_i_t_h │ │ │ │ -void visitWith(Func f) const │ │ │ │ -Visit all leaves in depth-first fashion. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:816 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -const Y & operator()(const Assignment< L > &x) const │ │ │ │ -evaluate │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:884 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_d_o_t │ │ │ │ -void dot(std::ostream &os, const LabelFormatter &labelFormatter, const │ │ │ │ -ValueFormatter &valueFormatter, bool showZero=true) const │ │ │ │ -output to graphviz format, stream version │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:949 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_a_c_c_e_s_s │ │ │ │ -friend class boost::serialization::access │ │ │ │ -Serialization function. │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:399 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ -bool operator==(const DecisionTree &q) const │ │ │ │ -equality │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:879 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_L_a_b_e_l_C │ │ │ │ -std::pair< L, size_t > LabelC │ │ │ │ -A label annotated with cardinality. │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:79 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_n_r_L_e_a_v_e_s │ │ │ │ -size_t nrLeaves() const │ │ │ │ -Return the number of leaves in the tree. │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:823 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_D_e_c_i_s_i_o_n_T_r_e_e │ │ │ │ -DecisionTree() │ │ │ │ -Default constructor (for serialization) │ │ │ │ -DDeeffiinniittiioonn DecisionTree-inl.h:462 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_N_o_d_e │ │ │ │ ----------------------— Node base class ------------------------— │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:86 │ │ │ │ +_g_t_s_a_m_:_:_K_e_y │ │ │ │ +std::uint64_t Key │ │ │ │ +Integer nonlinear key type. │ │ │ │ +DDeeffiinniittiioonn types.h:100 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_s_h_a_r_e_d___p_t_r │ │ │ │ +boost::shared_ptr< DiscreteFactor > shared_ptr │ │ │ │ +shared_ptr to this class │ │ │ │ +DDeeffiinniittiioonn DiscreteFactor.h:44 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +A Discrete Factor Graph is a factor graph where all factors are Discrete, i.e. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:101 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_M_a_r_g_i_n_a_l_s │ │ │ │ +A class for computing marginals of variables in a DiscreteFactorGraph. │ │ │ │ +DDeeffiinniittiioonn DiscreteMarginals.h:33 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_M_a_r_g_i_n_a_l_s_:_:_m_a_r_g_i_n_a_l_P_r_o_b_a_b_i_l_i_t_i_e_s │ │ │ │ +Vector marginalProbabilities(const DiscreteKey &key) const │ │ │ │ +Compute the marginal of a single variable. │ │ │ │ +DDeeffiinniittiioonn DiscreteMarginals.h:62 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_M_a_r_g_i_n_a_l_s_:_:_D_i_s_c_r_e_t_e_M_a_r_g_i_n_a_l_s │ │ │ │ +DiscreteMarginals(const DiscreteFactorGraph &graph) │ │ │ │ +Construct a marginals class. │ │ │ │ +DDeeffiinniittiioonn DiscreteMarginals.h:46 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_M_a_r_g_i_n_a_l_s_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ +DiscreteFactor::shared_ptr operator()(Key variable) const │ │ │ │ +Compute the marginal of a single variable. │ │ │ │ +DDeeffiinniittiioonn DiscreteMarginals.h:51 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_V_a_l_u_e_s │ │ │ │ +A map from keys to values. │ │ │ │ +DDeeffiinniittiioonn DiscreteValues.h:34 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * DDeecciissiioonnTTrreeee--iinnll..hh │ │ │ │ + * _D_i_s_c_r_e_t_e_M_a_r_g_i_n_a_l_s_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00266.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/Assignment.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteConditional.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,43 +96,43 @@ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ Classes | │ │ │ Namespaces
    │ │ │ -
    Assignment.h File Reference
    │ │ │ +
    DiscreteConditional.h File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    An assignment from labels to a discrete value index (size_t) │ │ │ -More...

    │ │ │ - │ │ │

    Go to the source code of this file.

    │ │ │
    . gtsam 4.2.0. . │ │ │ -000006f0: 203c 6469 7620 6964 3d22 7072 6f6a 6563
    gtsam.
    . gtsam 4.2.0. . │ │ │ +000006f0: 2020 3c64 6976 2069 643d 2270 726f 6a65
    gtsam.
    │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │

    │ │ │ Classes

    class  gtsam::Assignment< L >
     An assignment from labels to value index (size_t). More...
    class  gtsam::DiscreteConditional
     Discrete Conditional Density Derives from DecisionTreeFactor. More...
     
    struct  gtsam::traits< DiscreteConditional >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │

    Detailed Description

    │ │ │ -

    An assignment from labels to a discrete value index (size_t)

    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ -
    Date
    Feb 5, 2012
    │ │ │ +
    Date
    Feb 14, 2011
    │ │ │ +
    Author
    Duy-Nguyen Ta
    │ │ │ +
    │ │ │ +Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,27 +1,28 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -Assignment.h File Reference │ │ │ │ -An assignment from labels to a discrete value index (size_t) _M_o_r_e_._._. │ │ │ │ +DiscreteConditional.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_A_s_s_i_g_n_m_e_n_t_<_ _L_ _> │ │ │ │ -  An assignment from labels to value index (size_t). _M_o_r_e_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ +  Discrete _C_o_n_d_i_t_i_o_n_a_l Density Derives from _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -An assignment from labels to a discrete value index (size_t) │ │ │ │ + Date │ │ │ │ + Feb 14, 2011 │ │ │ │ Author │ │ │ │ + Duy-Nguyen Ta │ │ │ │ Frank Dellaert │ │ │ │ - Date │ │ │ │ - Feb 5, 2012 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _A_s_s_i_g_n_m_e_n_t_._h │ │ │ │ + * _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00266_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/Assignment.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteConditional.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,15 +98,15 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    Assignment.h
    │ │ │ +
    DiscreteConditional.h
    │ │ │
    │ │ │
    │ │ │ Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │
    4 * Atlanta, Georgia 30332-0415
    │ │ │
    5 * All Rights Reserved
    │ │ │ @@ -114,94 +114,212 @@ │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │
    19#pragma once
    │ │ │
    20
    │ │ │ -
    21#include <functional>
    │ │ │ -
    22#include <iostream>
    │ │ │ -
    23#include <map>
    │ │ │ -
    24#include <sstream>
    │ │ │ -
    25#include <utility>
    │ │ │ -
    26#include <vector>
    │ │ │ -
    27
    │ │ │ -
    28namespace gtsam {
    │ │ │ +
    21#include <gtsam/inference/Conditional-inst.h>
    │ │ │ + │ │ │ + │ │ │ +
    24
    │ │ │ +
    25#include <boost/make_shared.hpp>
    │ │ │ +
    26#include <boost/shared_ptr.hpp>
    │ │ │ +
    27#include <string>
    │ │ │ +
    28#include <vector>
    │ │ │
    29
    │ │ │ -
    36template <class L>
    │ │ │ -
    │ │ │ -
    37class Assignment : public std::map<L, size_t> {
    │ │ │ -
    45 static std::string DefaultFormatter(const L& x) {
    │ │ │ -
    46 std::stringstream ss;
    │ │ │ -
    47 ss << x;
    │ │ │ -
    48 return ss.str();
    │ │ │ -
    49 }
    │ │ │ +
    30namespace gtsam {
    │ │ │ +
    31
    │ │ │ +
    │ │ │ +
    38class GTSAM_EXPORT DiscreteConditional
    │ │ │ +
    39 : public DecisionTreeFactor,
    │ │ │ +
    40 public Conditional<DecisionTreeFactor, DiscreteConditional> {
    │ │ │ +
    41 public:
    │ │ │ +
    42 // typedefs needed to play nice with gtsam
    │ │ │ + │ │ │ +
    44 typedef boost::shared_ptr<This> shared_ptr;
    │ │ │ + │ │ │ + │ │ │ + │ │ │ +
    48
    │ │ │ + │ │ │
    50
    │ │ │ -
    51 public:
    │ │ │ -
    52 using std::map<L, size_t>::operator=;
    │ │ │
    53
    │ │ │ -
    54 // Define the implicit default constructor.
    │ │ │ -
    55 Assignment() = default;
    │ │ │ + │ │ │
    56
    │ │ │ -
    57 // Construct from initializer list.
    │ │ │ -
    58 Assignment(std::initializer_list<std::pair<const L, size_t>> init)
    │ │ │ -
    59 : std::map<L, size_t>{init} {}
    │ │ │ -
    60
    │ │ │ -
    61 void print(const std::string& s = "Assignment: ",
    │ │ │ -
    62 const std::function<std::string(L)>& labelFormatter =
    │ │ │ -
    63 &DefaultFormatter) const {
    │ │ │ -
    64 std::cout << s << ": ";
    │ │ │ -
    65 for (const typename Assignment::value_type& keyValue : *this) {
    │ │ │ -
    66 std::cout << "(" << labelFormatter(keyValue.first) << ", "
    │ │ │ -
    67 << keyValue.second << ")";
    │ │ │ -
    68 }
    │ │ │ -
    69 std::cout << std::endl;
    │ │ │ -
    70 }
    │ │ │ -
    71
    │ │ │ -
    72 bool equals(const Assignment& other, double tol = 1e-9) const {
    │ │ │ -
    73 return (*this == other);
    │ │ │ -
    74 }
    │ │ │ -
    75
    │ │ │ -
    88 template <typename Derived = Assignment<L>>
    │ │ │ -
    │ │ │ -
    89 static std::vector<Derived> CartesianProduct(
    │ │ │ -
    90 const std::vector<std::pair<L, size_t>>& keys) {
    │ │ │ -
    91 std::vector<Derived> allPossValues;
    │ │ │ -
    92 Derived values;
    │ │ │ -
    93 typedef std::pair<L, size_t> DiscreteKey;
    │ │ │ -
    94 for (const DiscreteKey& key : keys)
    │ │ │ -
    95 values[key.first] = 0; // Initialize from 0
    │ │ │ -
    96 while (1) {
    │ │ │ -
    97 allPossValues.push_back(values);
    │ │ │ -
    98 size_t j = 0;
    │ │ │ -
    99 for (j = 0; j < keys.size(); j++) {
    │ │ │ -
    100 L idx = keys[j].first;
    │ │ │ -
    101 values[idx]++;
    │ │ │ -
    102 if (values[idx] < keys[j].second) break;
    │ │ │ -
    103 // Wrap condition
    │ │ │ -
    104 values[idx] = 0;
    │ │ │ -
    105 }
    │ │ │ -
    106 if (j == keys.size()) break;
    │ │ │ -
    107 }
    │ │ │ -
    108 return allPossValues;
    │ │ │ -
    109 }
    │ │ │ +
    58 DiscreteConditional(size_t nFrontals, const DecisionTreeFactor& f);
    │ │ │ +
    59
    │ │ │ +
    64 DiscreteConditional(size_t nFrontals, const DiscreteKeys& keys,
    │ │ │ +
    65 const ADT& potentials);
    │ │ │ +
    66
    │ │ │ +
    68 explicit DiscreteConditional(const Signature& signature);
    │ │ │ +
    69
    │ │ │ +
    │ │ │ +
    77 DiscreteConditional(const DiscreteKey& key, const DiscreteKeys& parents,
    │ │ │ +
    78 const Signature::Table& table)
    │ │ │ +
    79 : DiscreteConditional(Signature(key, parents, table)) {}
    │ │ │
    │ │ │ -
    110}; // Assignment
    │ │ │ +
    80
    │ │ │ +
    │ │ │ +
    90 DiscreteConditional(const DiscreteKey& key, const DiscreteKeys& parents,
    │ │ │ +
    91 const std::string& spec)
    │ │ │ +
    92 : DiscreteConditional(Signature(key, parents, spec)) {}
    │ │ │
    │ │ │ -
    111
    │ │ │ -
    112} // namespace gtsam
    │ │ │ +
    93
    │ │ │ +
    │ │ │ +
    95 DiscreteConditional(const DiscreteKey& key, const std::string& spec)
    │ │ │ +
    96 : DiscreteConditional(Signature(key, {}, spec)) {}
    │ │ │ +
    │ │ │ +
    97
    │ │ │ +
    102 DiscreteConditional(const DecisionTreeFactor& joint,
    │ │ │ +
    103 const DecisionTreeFactor& marginal);
    │ │ │ +
    104
    │ │ │ +
    110 DiscreteConditional(const DecisionTreeFactor& joint,
    │ │ │ +
    111 const DecisionTreeFactor& marginal,
    │ │ │ +
    112 const Ordering& orderedKeys);
    │ │ │ +
    113
    │ │ │ +
    129 DiscreteConditional operator*(const DiscreteConditional& other) const;
    │ │ │ +
    130
    │ │ │ +
    132 DiscreteConditional marginal(Key key) const;
    │ │ │ +
    133
    │ │ │ +
    137
    │ │ │ +
    139 void print(
    │ │ │ +
    140 const std::string& s = "Discrete Conditional: ",
    │ │ │ +
    141 const KeyFormatter& formatter = DefaultKeyFormatter) const override;
    │ │ │ +
    142
    │ │ │ +
    144 bool equals(const DiscreteFactor& other, double tol = 1e-9) const override;
    │ │ │ +
    145
    │ │ │ +
    149
    │ │ │ +
    │ │ │ +
    151 double logProbability(const DiscreteValues& x) const {
    │ │ │ +
    152 return -error(x);
    │ │ │ +
    153 }
    │ │ │ +
    │ │ │ +
    154
    │ │ │ +
    │ │ │ + │ │ │ +
    157 const std::string& s = "Discrete Conditional: ",
    │ │ │ +
    158 const KeyFormatter& formatter = DefaultKeyFormatter) const {
    │ │ │ +
    159 static_cast<const BaseConditional*>(this)->print(s, formatter);
    │ │ │ +
    160 }
    │ │ │ +
    │ │ │ +
    161
    │ │ │ +
    │ │ │ +
    163 double evaluate(const DiscreteValues& values) const {
    │ │ │ +
    164 return ADT::operator()(values);
    │ │ │ +
    165 }
    │ │ │ +
    │ │ │ +
    166
    │ │ │ +
    167 using DecisionTreeFactor::error;
    │ │ │ +
    168 using DecisionTreeFactor::operator();
    │ │ │ +
    169
    │ │ │ +
    183 shared_ptr choose(const DiscreteValues& given) const;
    │ │ │ +
    184
    │ │ │ +
    186 DecisionTreeFactor::shared_ptr likelihood(
    │ │ │ +
    187 const DiscreteValues& frontalValues) const;
    │ │ │ +
    188
    │ │ │ +
    190 DecisionTreeFactor::shared_ptr likelihood(size_t frontal) const;
    │ │ │ +
    191
    │ │ │ +
    197 size_t sample(const DiscreteValues& parentsValues) const;
    │ │ │ +
    198
    │ │ │ +
    200 size_t sample(size_t parent_value) const;
    │ │ │ +
    201
    │ │ │ +
    203 size_t sample() const;
    │ │ │ +
    204
    │ │ │ +
    209 size_t argmax() const;
    │ │ │ +
    210
    │ │ │ +
    214
    │ │ │ +
    216 void sampleInPlace(DiscreteValues* parentsValues) const;
    │ │ │ +
    217
    │ │ │ +
    219 std::vector<DiscreteValues> frontalAssignments() const;
    │ │ │ +
    220
    │ │ │ +
    222 std::vector<DiscreteValues> allAssignments() const;
    │ │ │ +
    223
    │ │ │ +
    227
    │ │ │ +
    229 std::string markdown(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
    │ │ │ +
    230 const Names& names = {}) const override;
    │ │ │ +
    231
    │ │ │ +
    233 std::string html(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
    │ │ │ +
    234 const Names& names = {}) const override;
    │ │ │ +
    235
    │ │ │ +
    236
    │ │ │ +
    240
    │ │ │ +
    245 double evaluate(const HybridValues& x) const override;
    │ │ │ +
    246
    │ │ │ +
    247 using BaseConditional::operator();
    │ │ │ +
    248
    │ │ │ +
    │ │ │ +
    253 double logProbability(const HybridValues& x) const override {
    │ │ │ +
    254 return -error(x);
    │ │ │ +
    255 }
    │ │ │ +
    │ │ │ +
    256
    │ │ │ +
    262 double logNormalizationConstant() const override { return 0.0; }
    │ │ │ +
    263
    │ │ │ +
    265
    │ │ │ +
    266#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
    │ │ │ +
    269 size_t GTSAM_DEPRECATED solve(const DiscreteValues& parentsValues) const;
    │ │ │ +
    270 void GTSAM_DEPRECATED solveInPlace(DiscreteValues* parentsValues) const;
    │ │ │ +
    272#endif
    │ │ │ +
    273
    │ │ │ +
    274 protected:
    │ │ │ +
    276 DiscreteConditional::ADT choose(const DiscreteValues& given,
    │ │ │ +
    277 bool forceComplete) const;
    │ │ │ +
    278
    │ │ │ +
    279 private:
    │ │ │ +
    281 friend class boost::serialization::access;
    │ │ │ +
    282 template <class Archive>
    │ │ │ +
    283 void serialize(Archive& ar, const unsigned int /*version*/) {
    │ │ │ +
    284 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(BaseFactor);
    │ │ │ +
    285 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(BaseConditional);
    │ │ │ +
    286 }
    │ │ │ +
    287};
    │ │ │ +
    │ │ │ +
    288// DiscreteConditional
    │ │ │ +
    289
    │ │ │ +
    290// traits
    │ │ │ +
    291template <>
    │ │ │ +
    292struct traits<DiscreteConditional> : public Testable<DiscreteConditional> {};
    │ │ │ +
    293
    │ │ │ +
    294} // namespace gtsam
    │ │ │ +
    signatures for conditional densities
    │ │ │ + │ │ │
    std::pair< Key, size_t > DiscreteKey
    Key type for discrete variables.
    Definition DiscreteKey.h:36
    │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │ -
    Template to create a binary predicate.
    Definition Testable.h:111
    │ │ │ -
    An assignment from labels to value index (size_t).
    Definition Assignment.h:37
    │ │ │ -
    static std::vector< Derived > CartesianProduct(const std::vector< std::pair< L, size_t > > &keys)
    Get Cartesian product consisting all possible configurations.
    Definition Assignment.h:89
    │ │ │ +
    string markdown(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
    Free version of markdown.
    Definition DiscreteValues.cpp:129
    │ │ │ +
    void print(const Matrix &A, const string &s, ostream &stream)
    print without optional string, must specify cout yourself
    Definition Matrix.cpp:156
    │ │ │ +
    std::function< std::string(Key)> KeyFormatter
    Typedef for a function to format a key, i.e. to convert it to a string.
    Definition Key.h:35
    │ │ │ +
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │ +
    A helper that implements the traits interface for GTSAM types.
    Definition Testable.h:151
    │ │ │ + │ │ │ +
    A discrete probabilistic factor.
    Definition DecisionTreeFactor.h:45
    │ │ │ +
    Discrete Conditional Density Derives from DecisionTreeFactor.
    Definition DiscreteConditional.h:40
    │ │ │ +
    DiscreteConditional(const DiscreteKey &key, const std::string &spec)
    No-parent specialization; can also use DiscreteDistribution.
    Definition DiscreteConditional.h:95
    │ │ │ +
    DiscreteConditional(const DiscreteKey &key, const DiscreteKeys &parents, const std::string &spec)
    Construct from key, parents, and a string specifying the conditional probability table (CPT) in 00 01...
    Definition DiscreteConditional.h:90
    │ │ │ +
    double evaluate(const DiscreteValues &values) const
    Evaluate, just look up in AlgebraicDecisonTree.
    Definition DiscreteConditional.h:163
    │ │ │ +
    boost::shared_ptr< This > shared_ptr
    shared_ptr to this class
    Definition DiscreteConditional.h:44
    │ │ │ +
    DiscreteConditional(const DiscreteKey &key, const DiscreteKeys &parents, const Signature::Table &table)
    Construct from key, parents, and a Signature::Table specifying the conditional probability table (CPT...
    Definition DiscreteConditional.h:77
    │ │ │ +
    Conditional< BaseFactor, This > BaseConditional
    Typedef to our conditional base class.
    Definition DiscreteConditional.h:47
    │ │ │ +
    double logProbability(const HybridValues &x) const override
    < HybridValues version
    Definition DiscreteConditional.h:253
    │ │ │ +
    DiscreteConditional This
    Typedef to this class.
    Definition DiscreteConditional.h:43
    │ │ │ +
    DecisionTreeFactor BaseFactor
    Typedef to our factor base class.
    Definition DiscreteConditional.h:45
    │ │ │ +
    DiscreteConditional()
    Default constructor needed for serialization.
    Definition DiscreteConditional.h:55
    │ │ │ +
    double logProbability(const DiscreteValues &x) const
    Log-probability is just -error(x).
    Definition DiscreteConditional.h:151
    │ │ │ +
    void printSignature(const std::string &s="Discrete Conditional: ", const KeyFormatter &formatter=DefaultKeyFormatter) const
    print index signature only
    Definition DiscreteConditional.h:156
    │ │ │ +
    double logNormalizationConstant() const override
    logNormalizationConstant K is just zero, such that logProbability(x) = log(evaluate(x)) = - error(x) ...
    Definition DiscreteConditional.h:262
    │ │ │ +
    DiscreteKeys is a set of keys that can be assembled using the & operator.
    Definition DiscreteKey.h:39
    │ │ │ +
    A map from keys to values.
    Definition DiscreteValues.h:34
    │ │ │ +
    Signature for a discrete conditional density, used to construct conditionals.
    Definition Signature.h:54
    │ │ │ +
    HybridValues represents a collection of DiscreteValues and VectorValues.
    Definition HybridValues.h:38
    │ │ │ +
    Definition Conditional.h:64
    │ │ │ +
    the error.
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Assignment.h │ │ │ │ +DiscreteConditional.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ @@ -16,96 +16,271 @@ │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ 19#pragma once │ │ │ │ 20 │ │ │ │ -21#include │ │ │ │ -22#include │ │ │ │ -23#include │ │ │ │ -24#include │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27 │ │ │ │ -28namespace _g_t_s_a_m { │ │ │ │ +21#include │ │ │ │ +22#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_._h> │ │ │ │ +23#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_S_i_g_n_a_t_u_r_e_._h> │ │ │ │ +24 │ │ │ │ +25#include │ │ │ │ +26#include │ │ │ │ +27#include │ │ │ │ +28#include │ │ │ │ 29 │ │ │ │ -36template │ │ │ │ -_3_7class _A_s_s_i_g_n_m_e_n_t : public std::map { │ │ │ │ -45 static std::string DefaultFormatter(const L& x) { │ │ │ │ -46 std::stringstream ss; │ │ │ │ -47 ss << x; │ │ │ │ -48 return ss.str(); │ │ │ │ -49 } │ │ │ │ +30namespace _g_t_s_a_m { │ │ │ │ +31 │ │ │ │ +_3_8class GTSAM_EXPORT _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ +39 : public _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r, │ │ │ │ +40 public _C_o_n_d_i_t_i_o_n_a_l { │ │ │ │ +41 public: │ │ │ │ +42 // typedefs needed to play nice with gtsam │ │ │ │ +_4_3 typedef _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l _T_h_i_s; │ │ │ │ +_4_4 typedef boost::shared_ptr _s_h_a_r_e_d___p_t_r; │ │ │ │ +_4_5 typedef _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r _B_a_s_e_F_a_c_t_o_r; │ │ │ │ +46 typedef _C_o_n_d_i_t_i_o_n_a_l_<_B_a_s_e_F_a_c_t_o_r_,_ _T_h_i_s_> │ │ │ │ +_4_7 _B_a_s_e_C_o_n_d_i_t_i_o_n_a_l; │ │ │ │ +48 │ │ │ │ +_4_9 using _V_a_l_u_e_s = _D_i_s_c_r_e_t_e_V_a_l_u_e_s; │ │ │ │ 50 │ │ │ │ -51 public: │ │ │ │ -52 using std::map::operator=; │ │ │ │ 53 │ │ │ │ -54 // Define the implicit default constructor. │ │ │ │ -55 _A_s_s_i_g_n_m_e_n_t() = default; │ │ │ │ +_5_5 _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l() {} │ │ │ │ 56 │ │ │ │ -57 // Construct from initializer list. │ │ │ │ -58 _A_s_s_i_g_n_m_e_n_t(std::initializer_list> init) │ │ │ │ -59 : std::map{init} {} │ │ │ │ -60 │ │ │ │ -61 void print(const std::string& s = "Assignment: ", │ │ │ │ -62 const std::function& labelFormatter = │ │ │ │ -63 &DefaultFormatter) const { │ │ │ │ -64 std::cout << s << ": "; │ │ │ │ -65 for (const typename Assignment::value_type& keyValue : *this) { │ │ │ │ -66 std::cout << "(" << labelFormatter(keyValue.first) << ", " │ │ │ │ -67 << keyValue.second << ")"; │ │ │ │ -68 } │ │ │ │ -69 std::cout << std::endl; │ │ │ │ -70 } │ │ │ │ -71 │ │ │ │ -72 bool _e_q_u_a_l_s(const _A_s_s_i_g_n_m_e_n_t& other, double tol = 1e-9) const { │ │ │ │ -73 return (*this == other); │ │ │ │ -74 } │ │ │ │ -75 │ │ │ │ -88 template > │ │ │ │ -_8_9 static std::vector _C_a_r_t_e_s_i_a_n_P_r_o_d_u_c_t( │ │ │ │ -90 const std::vector>& keys) { │ │ │ │ -91 std::vector allPossValues; │ │ │ │ -92 Derived values; │ │ │ │ -93 typedef std::pair _D_i_s_c_r_e_t_e_K_e_y; │ │ │ │ -94 for (const _D_i_s_c_r_e_t_e_K_e_y& key : keys) │ │ │ │ -95 values[key.first] = 0; // Initialize from 0 │ │ │ │ -96 while (1) { │ │ │ │ -97 allPossValues.push_back(values); │ │ │ │ -98 size_t j = 0; │ │ │ │ -99 for (j = 0; j < keys.size(); j++) { │ │ │ │ -100 L idx = keys[j].first; │ │ │ │ -101 values[idx]++; │ │ │ │ -102 if (values[idx] < keys[j].second) break; │ │ │ │ -103 // Wrap condition │ │ │ │ -104 values[idx] = 0; │ │ │ │ -105 } │ │ │ │ -106 if (j == keys.size()) break; │ │ │ │ -107 } │ │ │ │ -108 return allPossValues; │ │ │ │ -109 } │ │ │ │ -110}; // Assignment │ │ │ │ -111 │ │ │ │ -112} // namespace gtsam │ │ │ │ +58 _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(size_t nFrontals, const _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r& f); │ │ │ │ +59 │ │ │ │ +64 _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(size_t nFrontals, const _D_i_s_c_r_e_t_e_K_e_y_s& keys, │ │ │ │ +65 const ADT& potentials); │ │ │ │ +66 │ │ │ │ +68 explicit _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(const _S_i_g_n_a_t_u_r_e& signature); │ │ │ │ +69 │ │ │ │ +_7_7 _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(const _D_i_s_c_r_e_t_e_K_e_y& key, const _D_i_s_c_r_e_t_e_K_e_y_s& parents, │ │ │ │ +78 const Signature::Table& table) │ │ │ │ +79 : _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(_S_i_g_n_a_t_u_r_e(key, parents, table)) {} │ │ │ │ +80 │ │ │ │ +_9_0 _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(const _D_i_s_c_r_e_t_e_K_e_y& key, const _D_i_s_c_r_e_t_e_K_e_y_s& parents, │ │ │ │ +91 const std::string& spec) │ │ │ │ +92 : _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(_S_i_g_n_a_t_u_r_e(key, parents, spec)) {} │ │ │ │ +93 │ │ │ │ +_9_5 _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(const _D_i_s_c_r_e_t_e_K_e_y& key, const std::string& spec) │ │ │ │ +96 : _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(_S_i_g_n_a_t_u_r_e(key, {}, spec)) {} │ │ │ │ +97 │ │ │ │ +102 DiscreteConditional(const DecisionTreeFactor& joint, │ │ │ │ +103 const DecisionTreeFactor& marginal); │ │ │ │ +104 │ │ │ │ +110 DiscreteConditional(const DecisionTreeFactor& joint, │ │ │ │ +111 const DecisionTreeFactor& marginal, │ │ │ │ +112 const Ordering& orderedKeys); │ │ │ │ +113 │ │ │ │ +129 DiscreteConditional operator*(const DiscreteConditional& other) const; │ │ │ │ +130 │ │ │ │ +132 DiscreteConditional marginal(Key key) const; │ │ │ │ +133 │ │ │ │ +137 │ │ │ │ +139 void print( │ │ │ │ +140 const std::string& s = "Discrete Conditional: ", │ │ │ │ +141 const KeyFormatter& formatter = DefaultKeyFormatter) const override; │ │ │ │ +142 │ │ │ │ +144 bool equals(const DiscreteFactor& other, double tol = 1e-9) const override; │ │ │ │ +145 │ │ │ │ +149 │ │ │ │ +_1_5_1 double _l_o_g_P_r_o_b_a_b_i_l_i_t_y(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& x) const { │ │ │ │ +152 return -error(x); │ │ │ │ +153 } │ │ │ │ +154 │ │ │ │ +_1_5_6 void _p_r_i_n_t_S_i_g_n_a_t_u_r_e( │ │ │ │ +157 const std::string& s = "Discrete Conditional: ", │ │ │ │ +158 const _K_e_y_F_o_r_m_a_t_t_e_r& formatter = DefaultKeyFormatter) const { │ │ │ │ +159 static_cast(this)->_p_r_i_n_t(s, formatter); │ │ │ │ +160 } │ │ │ │ +161 │ │ │ │ +_1_6_3 double _e_v_a_l_u_a_t_e(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) const { │ │ │ │ +164 return ADT::operator()(values); │ │ │ │ +165 } │ │ │ │ +166 │ │ │ │ +167 using DecisionTreeFactor::error; │ │ │ │ +168 using DecisionTreeFactor::operator(); │ │ │ │ +169 │ │ │ │ +183 shared_ptr choose(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& given) const; │ │ │ │ +184 │ │ │ │ +186 DecisionTreeFactor::shared_ptr likelihood( │ │ │ │ +187 const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& frontalValues) const; │ │ │ │ +188 │ │ │ │ +190 DecisionTreeFactor::shared_ptr likelihood(size_t frontal) const; │ │ │ │ +191 │ │ │ │ +197 size_t sample(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& parentsValues) const; │ │ │ │ +198 │ │ │ │ +200 size_t sample(size_t parent_value) const; │ │ │ │ +201 │ │ │ │ +203 size_t sample() const; │ │ │ │ +204 │ │ │ │ +209 size_t argmax() const; │ │ │ │ +210 │ │ │ │ +214 │ │ │ │ +216 void sampleInPlace(_D_i_s_c_r_e_t_e_V_a_l_u_e_s* parentsValues) const; │ │ │ │ +217 │ │ │ │ +219 std::vector frontalAssignments() const; │ │ │ │ +220 │ │ │ │ +222 std::vector allAssignments() const; │ │ │ │ +223 │ │ │ │ +227 │ │ │ │ +229 std::string _m_a_r_k_d_o_w_n(const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = │ │ │ │ +DefaultKeyFormatter, │ │ │ │ +230 const Names& names = {}) const override; │ │ │ │ +231 │ │ │ │ +233 std::string html(const KeyFormatter& keyFormatter = DefaultKeyFormatter, │ │ │ │ +234 const Names& names = {}) const override; │ │ │ │ +235 │ │ │ │ +236 │ │ │ │ +240 │ │ │ │ +245 double evaluate(const _H_y_b_r_i_d_V_a_l_u_e_s& x) const override; │ │ │ │ +246 │ │ │ │ +247 using BaseConditional::operator(); │ │ │ │ +248 │ │ │ │ +_2_5_3 double _l_o_g_P_r_o_b_a_b_i_l_i_t_y(const _H_y_b_r_i_d_V_a_l_u_e_s& x) const override { │ │ │ │ +254 return -error(x); │ │ │ │ +255 } │ │ │ │ +256 │ │ │ │ +_2_6_2 double _l_o_g_N_o_r_m_a_l_i_z_a_t_i_o_n_C_o_n_s_t_a_n_t() const override { return 0.0; } │ │ │ │ +263 │ │ │ │ +265 │ │ │ │ +266#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42 │ │ │ │ +269 size_t GTSAM_DEPRECATED solve(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& parentsValues) const; │ │ │ │ +270 void GTSAM_DEPRECATED solveInPlace(_D_i_s_c_r_e_t_e_V_a_l_u_e_s* parentsValues) const; │ │ │ │ +272#endif │ │ │ │ +273 │ │ │ │ +274 protected: │ │ │ │ +276 _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_A_D_T choose(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& given, │ │ │ │ +277 bool forceComplete) const; │ │ │ │ +278 │ │ │ │ +279 private: │ │ │ │ +_2_8_1 friend class boost::serialization::access; │ │ │ │ +282 template │ │ │ │ +283 void serialize(Archive& ar, const unsigned int /*version*/) { │ │ │ │ +284 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e_F_a_c_t_o_r); │ │ │ │ +285 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e_C_o_n_d_i_t_i_o_n_a_l); │ │ │ │ +286 } │ │ │ │ +287}; │ │ │ │ +288// DiscreteConditional │ │ │ │ +289 │ │ │ │ +290// traits │ │ │ │ +291template <> │ │ │ │ +_2_9_2struct _t_r_a_i_t_s<_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l> : public _T_e_s_t_a_b_l_e │ │ │ │ +{}; │ │ │ │ +293 │ │ │ │ +294} // namespace gtsam │ │ │ │ +_S_i_g_n_a_t_u_r_e_._h │ │ │ │ +signatures for conditional densities │ │ │ │ +_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_._h │ │ │ │ _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_K_e_y │ │ │ │ std::pair< Key, size_t > DiscreteKey │ │ │ │ Key type for discrete variables. │ │ │ │ DDeeffiinniittiioonn DiscreteKey.h:36 │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_e_q_u_a_l_s │ │ │ │ -Template to create a binary predicate. │ │ │ │ -DDeeffiinniittiioonn Testable.h:111 │ │ │ │ -_g_t_s_a_m_:_:_A_s_s_i_g_n_m_e_n_t │ │ │ │ -An assignment from labels to value index (size_t). │ │ │ │ -DDeeffiinniittiioonn Assignment.h:37 │ │ │ │ -_g_t_s_a_m_:_:_A_s_s_i_g_n_m_e_n_t_:_:_C_a_r_t_e_s_i_a_n_P_r_o_d_u_c_t │ │ │ │ -static std::vector< Derived > CartesianProduct(const std::vector< std::pair< L, │ │ │ │ -size_t > > &keys) │ │ │ │ -Get Cartesian product consisting all possible configurations. │ │ │ │ -DDeeffiinniittiioonn Assignment.h:89 │ │ │ │ +_g_t_s_a_m_:_:_m_a_r_k_d_o_w_n │ │ │ │ +string markdown(const DiscreteValues &values, const KeyFormatter &keyFormatter, │ │ │ │ +const DiscreteValues::Names &names) │ │ │ │ +Free version of markdown. │ │ │ │ +DDeeffiinniittiioonn DiscreteValues.cpp:129 │ │ │ │ +_g_t_s_a_m_:_:_p_r_i_n_t │ │ │ │ +void print(const Matrix &A, const string &s, ostream &stream) │ │ │ │ +print without optional string, must specify cout yourself │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:156 │ │ │ │ +_g_t_s_a_m_:_:_K_e_y_F_o_r_m_a_t_t_e_r │ │ │ │ +std::function< std::string(Key)> KeyFormatter │ │ │ │ +Typedef for a function to format a key, i.e. to convert it to a string. │ │ │ │ +DDeeffiinniittiioonn Key.h:35 │ │ │ │ +_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ +A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ +that can be centered ... │ │ │ │ +DDeeffiinniittiioonn concepts.h:30 │ │ │ │ +_g_t_s_a_m_:_:_T_e_s_t_a_b_l_e │ │ │ │ +A helper that implements the traits interface for GTSAM types. │ │ │ │ +DDeeffiinniittiioonn Testable.h:151 │ │ │ │ +_g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_ _K_e_y_ _> │ │ │ │ +_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r │ │ │ │ +A discrete probabilistic factor. │ │ │ │ +DDeeffiinniittiioonn DecisionTreeFactor.h:45 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ +Discrete Conditional Density Derives from DecisionTreeFactor. │ │ │ │ +DDeeffiinniittiioonn DiscreteConditional.h:40 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ +DiscreteConditional(const DiscreteKey &key, const std::string &spec) │ │ │ │ +No-parent specialization; can also use DiscreteDistribution. │ │ │ │ +DDeeffiinniittiioonn DiscreteConditional.h:95 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ +DiscreteConditional(const DiscreteKey &key, const DiscreteKeys &parents, const │ │ │ │ +std::string &spec) │ │ │ │ +Construct from key, parents, and a string specifying the conditional │ │ │ │ +probability table (CPT) in 00 01... │ │ │ │ +DDeeffiinniittiioonn DiscreteConditional.h:90 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_e_v_a_l_u_a_t_e │ │ │ │ +double evaluate(const DiscreteValues &values) const │ │ │ │ +Evaluate, just look up in AlgebraicDecisonTree. │ │ │ │ +DDeeffiinniittiioonn DiscreteConditional.h:163 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_s_h_a_r_e_d___p_t_r │ │ │ │ +boost::shared_ptr< This > shared_ptr │ │ │ │ +shared_ptr to this class │ │ │ │ +DDeeffiinniittiioonn DiscreteConditional.h:44 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ +DiscreteConditional(const DiscreteKey &key, const DiscreteKeys &parents, const │ │ │ │ +Signature::Table &table) │ │ │ │ +Construct from key, parents, and a Signature::Table specifying the conditional │ │ │ │ +probability table (CPT... │ │ │ │ +DDeeffiinniittiioonn DiscreteConditional.h:77 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_B_a_s_e_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ +Conditional< BaseFactor, This > BaseConditional │ │ │ │ +Typedef to our conditional base class. │ │ │ │ +DDeeffiinniittiioonn DiscreteConditional.h:47 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_l_o_g_P_r_o_b_a_b_i_l_i_t_y │ │ │ │ +double logProbability(const HybridValues &x) const override │ │ │ │ +< HybridValues version │ │ │ │ +DDeeffiinniittiioonn DiscreteConditional.h:253 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_T_h_i_s │ │ │ │ +DiscreteConditional This │ │ │ │ +Typedef to this class. │ │ │ │ +DDeeffiinniittiioonn DiscreteConditional.h:43 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_B_a_s_e_F_a_c_t_o_r │ │ │ │ +DecisionTreeFactor BaseFactor │ │ │ │ +Typedef to our factor base class. │ │ │ │ +DDeeffiinniittiioonn DiscreteConditional.h:45 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ +DiscreteConditional() │ │ │ │ +Default constructor needed for serialization. │ │ │ │ +DDeeffiinniittiioonn DiscreteConditional.h:55 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_l_o_g_P_r_o_b_a_b_i_l_i_t_y │ │ │ │ +double logProbability(const DiscreteValues &x) const │ │ │ │ +Log-probability is just -error(x). │ │ │ │ +DDeeffiinniittiioonn DiscreteConditional.h:151 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_p_r_i_n_t_S_i_g_n_a_t_u_r_e │ │ │ │ +void printSignature(const std::string &s="Discrete Conditional: ", const │ │ │ │ +KeyFormatter &formatter=DefaultKeyFormatter) const │ │ │ │ +print index signature only │ │ │ │ +DDeeffiinniittiioonn DiscreteConditional.h:156 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_:_:_l_o_g_N_o_r_m_a_l_i_z_a_t_i_o_n_C_o_n_s_t_a_n_t │ │ │ │ +double logNormalizationConstant() const override │ │ │ │ +logNormalizationConstant K is just zero, such that logProbability(x) = log │ │ │ │ +(evaluate(x)) = - error(x) ... │ │ │ │ +DDeeffiinniittiioonn DiscreteConditional.h:262 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ +DiscreteKeys is a set of keys that can be assembled using the & operator. │ │ │ │ +DDeeffiinniittiioonn DiscreteKey.h:39 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_V_a_l_u_e_s │ │ │ │ +A map from keys to values. │ │ │ │ +DDeeffiinniittiioonn DiscreteValues.h:34 │ │ │ │ +_g_t_s_a_m_:_:_S_i_g_n_a_t_u_r_e │ │ │ │ +Signature for a discrete conditional density, used to construct conditionals. │ │ │ │ +DDeeffiinniittiioonn Signature.h:54 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s │ │ │ │ +HybridValues represents a collection of DiscreteValues and VectorValues. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:38 │ │ │ │ +_g_t_s_a_m_:_:_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ +DDeeffiinniittiioonn Conditional.h:64 │ │ │ │ +_H_y_b_r_i_d_V_a_l_u_e_s │ │ │ │ +the error. │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _A_s_s_i_g_n_m_e_n_t_._h │ │ │ │ + * _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00269.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/AlgebraicDecisionTree.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteBayesTree.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,48 +96,47 @@ │ │ │
    │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Classes | │ │ │ Namespaces
    │ │ │ -
    AlgebraicDecisionTree.h File Reference
    │ │ │ +
    DiscreteBayesTree.h File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    Algebraic Decision Trees. │ │ │ +

    Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. │ │ │ More...

    │ │ │ │ │ │

    Go to the source code of this file.

    │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │

    │ │ │ Classes

    class  gtsam::AlgebraicDecisionTree< L >
     An algebraic decision tree fixes the range of a DecisionTree to double. More...
    class  gtsam::DiscreteBayesTreeClique
     A clique in a DiscreteBayesTree. More...
     
    struct  gtsam::AlgebraicDecisionTree< L >::Ring
     The Real ring with addition and multiplication. More...
     
    struct  gtsam::traits< AlgebraicDecisionTree< T > >
    class  gtsam::DiscreteBayesTree
     A Bayes tree representing a Discrete density. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │

    Detailed Description

    │ │ │ -

    Algebraic Decision Trees.

    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ -
    Date
    Mar 14, 2011
    │ │ │ +

    Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree.

    │ │ │ +

    DiscreteBayesTree

    Author
    Frank Dellaert
    │ │ │ +
    │ │ │ +Richard Roberts
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,33 +1,30 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -AlgebraicDecisionTree.h File Reference │ │ │ │ -Algebraic Decision Trees. _M_o_r_e_._._. │ │ │ │ +DiscreteBayesTree.h File Reference │ │ │ │ +Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_ _L_ _> │ │ │ │ -  An algebraic decision tree fixes the range of a _D_e_c_i_s_i_o_n_T_r_e_e to │ │ │ │ - double. _M_o_r_e_._._. │ │ │ │ +class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e │ │ │ │ +  A clique in a _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_ _L_ _>_:_:_R_i_n_g │ │ │ │ -  The Real ring with addition and multiplication. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_ _T_ _>_ _> │ │ │ │ +class   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e │ │ │ │ +  A Bayes tree representing a Discrete density. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Algebraic Decision Trees. │ │ │ │ +Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. │ │ │ │ +DiscreteBayesTree │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - Date │ │ │ │ - Mar 14, 2011 │ │ │ │ + Richard Roberts │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_._h │ │ │ │ + * _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00269.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ var a00269 = [ │ │ │ │ - ["gtsam::AlgebraicDecisionTree< L >::Ring", "a02764.html", null], │ │ │ │ - ["gtsam::traits< AlgebraicDecisionTree< T > >", "a02768.html", null] │ │ │ │ + ["gtsam::DiscreteBayesTreeClique", "a02824.html", "a02824"] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00269_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/AlgebraicDecisionTree.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteBayesTree.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,217 +98,134 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    AlgebraicDecisionTree.h
    │ │ │ +
    DiscreteBayesTree.h
    │ │ │
    │ │ │
    │ │ │ Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │
    4 * Atlanta, Georgia 30332-0415
    │ │ │
    5 * All Rights Reserved
    │ │ │
    6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
    │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │ -
    19#pragma once
    │ │ │ -
    20
    │ │ │ -
    21#include <gtsam/base/Testable.h>
    │ │ │ -
    22#include <gtsam/discrete/DecisionTree-inl.h>
    │ │ │ -
    23
    │ │ │ -
    24#include <algorithm>
    │ │ │ -
    25#include <map>
    │ │ │ -
    26#include <string>
    │ │ │ -
    27#include <vector>
    │ │ │ -
    28namespace gtsam {
    │ │ │ -
    29
    │ │ │ -
    37 template <typename L>
    │ │ │ -
    │ │ │ -
    38 class GTSAM_EXPORT AlgebraicDecisionTree : public DecisionTree<L, double> {
    │ │ │ -
    46 static std::string DefaultFormatter(const L& x) {
    │ │ │ -
    47 std::stringstream ss;
    │ │ │ -
    48 ss << x;
    │ │ │ -
    49 return ss.str();
    │ │ │ -
    50 }
    │ │ │ -
    51
    │ │ │ -
    52 public:
    │ │ │ - │ │ │ -
    54
    │ │ │ -
    │ │ │ -
    56 struct Ring {
    │ │ │ -
    57 static inline double zero() { return 0.0; }
    │ │ │ -
    58 static inline double one() { return 1.0; }
    │ │ │ -
    59 static inline double add(const double& a, const double& b) {
    │ │ │ -
    60 return a + b;
    │ │ │ -
    61 }
    │ │ │ -
    62 static inline double max(const double& a, const double& b) {
    │ │ │ -
    63 return std::max(a, b);
    │ │ │ -
    64 }
    │ │ │ -
    65 static inline double mul(const double& a, const double& b) {
    │ │ │ -
    66 return a * b;
    │ │ │ -
    67 }
    │ │ │ -
    68 static inline double div(const double& a, const double& b) {
    │ │ │ -
    69 return a / b;
    │ │ │ -
    70 }
    │ │ │ -
    71 static inline double id(const double& x) { return x; }
    │ │ │ -
    72 };
    │ │ │ -
    │ │ │ -
    73
    │ │ │ -
    74 AlgebraicDecisionTree(double leaf = 1.0) : Base(leaf) {}
    │ │ │ -
    75
    │ │ │ -
    76 // Explicitly non-explicit constructor
    │ │ │ -
    77 AlgebraicDecisionTree(const Base& add) : Base(add) {}
    │ │ │ +
    21#pragma once
    │ │ │ +
    22
    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
    28
    │ │ │ +
    29#include <string>
    │ │ │ +
    30
    │ │ │ +
    31namespace gtsam {
    │ │ │ +
    32
    │ │ │ +
    33// Forward declarations
    │ │ │ +
    34class DiscreteConditional;
    │ │ │ +
    35class VectorValues;
    │ │ │ +
    36
    │ │ │ +
    37/* ************************************************************************* */
    │ │ │ +
    │ │ │ +
    39class GTSAM_EXPORT DiscreteBayesTreeClique
    │ │ │ +
    40 : public BayesTreeCliqueBase<DiscreteBayesTreeClique, DiscreteFactorGraph> {
    │ │ │ +
    41 public:
    │ │ │ + │ │ │ + │ │ │ +
    44 Base;
    │ │ │ +
    45 typedef boost::shared_ptr<This> shared_ptr;
    │ │ │ +
    46 typedef boost::weak_ptr<This> weak_ptr;
    │ │ │ + │ │ │ +
    48 virtual ~DiscreteBayesTreeClique() {}
    │ │ │ + │ │ │ +
    50 const boost::shared_ptr<DiscreteConditional>& conditional)
    │ │ │ +
    51 : Base(conditional) {}
    │ │ │ +
    52
    │ │ │ +
    │ │ │ + │ │ │ +
    55 const std::string& s = "Clique: ",
    │ │ │ +
    56 const KeyFormatter& formatter = DefaultKeyFormatter) const {
    │ │ │ +
    57 conditional_->printSignature(s, formatter);
    │ │ │ +
    58 }
    │ │ │ +
    │ │ │ +
    59
    │ │ │ +
    60 //** evaluate conditional probability of subtree for given DiscreteValues */
    │ │ │ +
    61 double evaluate(const DiscreteValues& values) const;
    │ │ │ +
    62
    │ │ │ +
    63 //** (Preferred) sugar for the above for given DiscreteValues */
    │ │ │ +
    64 double operator()(const DiscreteValues& values) const {
    │ │ │ +
    65 return evaluate(values);
    │ │ │ +
    66 }
    │ │ │ +
    67};
    │ │ │ +
    │ │ │ +
    68
    │ │ │ +
    69/* ************************************************************************* */
    │ │ │ +
    │ │ │ +
    74class GTSAM_EXPORT DiscreteBayesTree
    │ │ │ +
    75 : public BayesTree<DiscreteBayesTreeClique> {
    │ │ │ +
    76 private:
    │ │ │ + │ │ │
    78
    │ │ │ -
    │ │ │ -
    80 AlgebraicDecisionTree(const L& label, double y1, double y2)
    │ │ │ -
    81 : Base(label, y1, y2) {}
    │ │ │ -
    │ │ │ +
    79 public:
    │ │ │ +
    80 typedef DiscreteBayesTree This;
    │ │ │ +
    81 typedef boost::shared_ptr<This> shared_ptr;
    │ │ │
    82
    │ │ │ -
    │ │ │ -
    96 AlgebraicDecisionTree(const typename Base::LabelC& labelC, double y1,
    │ │ │ -
    97 double y2)
    │ │ │ -
    98 : Base(labelC, y1, y2) {}
    │ │ │ -
    │ │ │ -
    99
    │ │ │ -
    │ │ │ - │ │ │ -
    125 (const std::vector<typename Base::LabelC>& labelCs,
    │ │ │ -
    126 const std::vector<double>& ys) {
    │ │ │ -
    127 this->root_ =
    │ │ │ -
    128 Base::create(labelCs.begin(), labelCs.end(), ys.begin(), ys.end());
    │ │ │ -
    129 }
    │ │ │ -
    │ │ │ -
    130
    │ │ │ -
    │ │ │ - │ │ │ -
    140 (const std::vector<typename Base::LabelC>& labelCs,
    │ │ │ -
    141 const std::string& table) {
    │ │ │ -
    142 // Convert string to doubles
    │ │ │ -
    143 std::vector<double> ys;
    │ │ │ -
    144 std::istringstream iss(table);
    │ │ │ -
    145 std::copy(std::istream_iterator<double>(iss),
    │ │ │ -
    146 std::istream_iterator<double>(), std::back_inserter(ys));
    │ │ │ -
    147
    │ │ │ -
    148 // now call recursive Create
    │ │ │ -
    149 this->root_ =
    │ │ │ -
    150 Base::create(labelCs.begin(), labelCs.end(), ys.begin(), ys.end());
    │ │ │ -
    151 }
    │ │ │ -
    │ │ │ -
    152
    │ │ │ -
    160 template <typename Iterator>
    │ │ │ -
    │ │ │ -
    161 AlgebraicDecisionTree(Iterator begin, Iterator end, const L& label)
    │ │ │ -
    162 : Base(nullptr) {
    │ │ │ -
    163 this->root_ = compose(begin, end, label);
    │ │ │ -
    164 }
    │ │ │ -
    │ │ │ -
    165
    │ │ │ -
    172 template <typename M>
    │ │ │ -
    │ │ │ - │ │ │ -
    174 const std::map<M, L>& map) {
    │ │ │ -
    175 // Functor for label conversion so we can use `convertFrom`.
    │ │ │ -
    176 std::function<L(const M&)> L_of_M = [&map](const M& label) -> L {
    │ │ │ -
    177 return map.at(label);
    │ │ │ -
    178 };
    │ │ │ -
    179 std::function<double(const double&)> op = Ring::id;
    │ │ │ -
    180 this->root_ = DecisionTree<L, double>::convertFrom(other.root_, L_of_M, op);
    │ │ │ -
    181 }
    │ │ │ -
    │ │ │ -
    182
    │ │ │ -
    │ │ │ - │ │ │ -
    185 return this->apply(g, &Ring::add);
    │ │ │ -
    186 }
    │ │ │ -
    │ │ │ -
    187
    │ │ │ -
    │ │ │ - │ │ │ -
    190 return this->apply(g, &Ring::mul);
    │ │ │ -
    191 }
    │ │ │ -
    │ │ │ -
    192
    │ │ │ -
    │ │ │ - │ │ │ -
    195 return this->apply(g, &Ring::div);
    │ │ │ -
    196 }
    │ │ │ -
    │ │ │ -
    197
    │ │ │ -
    │ │ │ -
    199 AlgebraicDecisionTree sum(const L& label, size_t cardinality) const {
    │ │ │ -
    200 return this->combine(label, cardinality, &Ring::add);
    │ │ │ -
    201 }
    │ │ │ -
    │ │ │ -
    202
    │ │ │ -
    │ │ │ -
    204 AlgebraicDecisionTree sum(const typename Base::LabelC& labelC) const {
    │ │ │ -
    205 return this->combine(labelC, &Ring::add);
    │ │ │ -
    206 }
    │ │ │ -
    │ │ │ -
    207
    │ │ │ -
    │ │ │ -
    209 void print(const std::string& s = "",
    │ │ │ -
    210 const typename Base::LabelFormatter& labelFormatter =
    │ │ │ -
    211 &DefaultFormatter) const {
    │ │ │ -
    212 auto valueFormatter = [](const double& v) {
    │ │ │ -
    213 return (boost::format("%4.8g") % v).str();
    │ │ │ -
    214 };
    │ │ │ -
    215 Base::print(s, labelFormatter, valueFormatter);
    │ │ │ -
    216 }
    │ │ │ -
    │ │ │ -
    217
    │ │ │ -
    │ │ │ -
    219 bool equals(const AlgebraicDecisionTree& other, double tol = 1e-9) const {
    │ │ │ -
    220 // lambda for comparison of two doubles upto some tolerance.
    │ │ │ -
    221 auto compare = [tol](double a, double b) {
    │ │ │ -
    222 return std::abs(a - b) < tol;
    │ │ │ -
    223 };
    │ │ │ -
    224 return Base::equals(other, compare);
    │ │ │ -
    225 }
    │ │ │ -
    │ │ │ -
    226 };
    │ │ │ -
    │ │ │ -
    227
    │ │ │ -
    228template <typename T>
    │ │ │ -
    │ │ │ - │ │ │ -
    230 : public Testable<AlgebraicDecisionTree<T>> {};
    │ │ │ -
    │ │ │ -
    231} // namespace gtsam
    │ │ │ -
    Concept check for values that can be used in unit tests.
    │ │ │ +
    85
    │ │ │ + │ │ │ +
    87
    │ │ │ +
    89 bool equals(const This& other, double tol = 1e-9) const;
    │ │ │ +
    90
    │ │ │ +
    91 //** evaluate probability for given DiscreteValues */
    │ │ │ +
    92 double evaluate(const DiscreteValues& values) const;
    │ │ │ +
    93
    │ │ │ +
    94 //** (Preferred) sugar for the above for given DiscreteValues */
    │ │ │ +
    95 double operator()(const DiscreteValues& values) const {
    │ │ │ +
    96 return evaluate(values);
    │ │ │ +
    97 }
    │ │ │ +
    98
    │ │ │ +
    102
    │ │ │ +
    104 std::string markdown(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
    │ │ │ +
    105 const DiscreteFactor::Names& names = {}) const;
    │ │ │ +
    106
    │ │ │ +
    108 std::string html(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
    │ │ │ +
    109 const DiscreteFactor::Names& names = {}) const;
    │ │ │ +
    110
    │ │ │ +
    112};
    │ │ │ +
    │ │ │ +
    113
    │ │ │ +
    114} // namespace gtsam
    │ │ │ + │ │ │ + │ │ │ +
    Bayes Tree is a tree of cliques of a Bayes Chain.
    │ │ │ +
    Base class for conditional densities.
    │ │ │ +
    Base class for cliques of a BayesTree.
    │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │ -
    DecisionTree< L, Y > apply(const DecisionTree< L, Y > &f, const typename DecisionTree< L, Y >::Unary &op)
    free versions of apply
    Definition DecisionTree.h:413
    │ │ │ -
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │ -
    A helper that implements the traits interface for GTSAM types.
    Definition Testable.h:151
    │ │ │ -
    An algebraic decision tree fixes the range of a DecisionTree to double.
    Definition AlgebraicDecisionTree.h:38
    │ │ │ -
    AlgebraicDecisionTree operator/(const AlgebraicDecisionTree &g) const
    division
    Definition AlgebraicDecisionTree.h:194
    │ │ │ -
    AlgebraicDecisionTree sum(const L &label, size_t cardinality) const
    sum out variable
    Definition AlgebraicDecisionTree.h:199
    │ │ │ -
    AlgebraicDecisionTree(const typename Base::LabelC &labelC, double y1, double y2)
    Create a new leaf function splitting on a variable.
    Definition AlgebraicDecisionTree.h:96
    │ │ │ -
    void print(const std::string &s="", const typename Base::LabelFormatter &labelFormatter=&DefaultFormatter) const
    print method customized to value type double.
    Definition AlgebraicDecisionTree.h:209
    │ │ │ -
    AlgebraicDecisionTree sum(const typename Base::LabelC &labelC) const
    sum out variable
    Definition AlgebraicDecisionTree.h:204
    │ │ │ -
    AlgebraicDecisionTree(const AlgebraicDecisionTree< M > &other, const std::map< M, L > &map)
    Convert labels from type M to type L.
    Definition AlgebraicDecisionTree.h:173
    │ │ │ -
    AlgebraicDecisionTree(const L &label, double y1, double y2)
    Create a new leaf function splitting on a variable.
    Definition AlgebraicDecisionTree.h:80
    │ │ │ -
    bool equals(const AlgebraicDecisionTree &other, double tol=1e-9) const
    Equality method customized to value type double.
    Definition AlgebraicDecisionTree.h:219
    │ │ │ -
    AlgebraicDecisionTree operator+(const AlgebraicDecisionTree &g) const
    sum
    Definition AlgebraicDecisionTree.h:184
    │ │ │ -
    AlgebraicDecisionTree operator*(const AlgebraicDecisionTree &g) const
    product
    Definition AlgebraicDecisionTree.h:189
    │ │ │ -
    AlgebraicDecisionTree(Iterator begin, Iterator end, const L &label)
    Create a range of decision trees, splitting on a single variable.
    Definition AlgebraicDecisionTree.h:161
    │ │ │ -
    The Real ring with addition and multiplication.
    Definition AlgebraicDecisionTree.h:56
    │ │ │ -
    a decision tree is a function from assignments to values.
    Definition DecisionTree.h:61
    │ │ │ -
    NodePtr root_
    A DecisionTree just contains the root. TODO(dellaert): make protected.
    Definition DecisionTree.h:146
    │ │ │ -
    std::pair< L, size_t > LabelC
    A label annotated with cardinality.
    Definition DecisionTree.h:79
    │ │ │ +
    string html(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
    Free version of html.
    Definition DiscreteValues.cpp:134
    │ │ │ +
    std::function< std::string(Key)> KeyFormatter
    Typedef for a function to format a key, i.e. to convert it to a string.
    Definition Key.h:35
    │ │ │ +
    Template to create a binary predicate.
    Definition Testable.h:111
    │ │ │ +
    A clique in a DiscreteBayesTree.
    Definition DiscreteBayesTree.h:40
    │ │ │ +
    void printSignature(const std::string &s="Clique: ", const KeyFormatter &formatter=DefaultKeyFormatter) const
    print index signature only
    Definition DiscreteBayesTree.h:54
    │ │ │ +
    A Bayes tree representing a Discrete density.
    Definition DiscreteBayesTree.h:75
    │ │ │ +
    DiscreteBayesTree()
    Default constructor, creates an empty Bayes tree.
    Definition DiscreteBayesTree.h:86
    │ │ │ +
    A map from keys to values.
    Definition DiscreteValues.h:34
    │ │ │ +
    Bayes tree.
    Definition BayesTree.h:67
    │ │ │ +
    This is the base class for BayesTree cliques.
    Definition BayesTreeCliqueBase.h:50
    │ │ │ +
    The Factor::error simply extracts the.
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,238 +1,155 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -AlgebraicDecisionTree.h │ │ │ │ +DiscreteBayesTree.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -19#pragma once │ │ │ │ -20 │ │ │ │ -21#include <_g_t_s_a_m_/_b_a_s_e_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ -22#include │ │ │ │ -23 │ │ │ │ -24#include │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27#include │ │ │ │ -28namespace _g_t_s_a_m { │ │ │ │ -29 │ │ │ │ -37 template │ │ │ │ -_3_8 class GTSAM_EXPORT _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e : public _D_e_c_i_s_i_o_n_T_r_e_e { │ │ │ │ -46 static std::string DefaultFormatter(const L& x) { │ │ │ │ -47 std::stringstream ss; │ │ │ │ -48 ss << x; │ │ │ │ -49 return ss.str(); │ │ │ │ -50 } │ │ │ │ -51 │ │ │ │ -52 public: │ │ │ │ -53 using _B_a_s_e = _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _d_o_u_b_l_e_>; │ │ │ │ -54 │ │ │ │ -_5_6 struct _R_i_n_g { │ │ │ │ -57 static inline double zero() { return 0.0; } │ │ │ │ -58 static inline double one() { return 1.0; } │ │ │ │ -59 static inline double add(const double& a, const double& b) { │ │ │ │ -60 return a + b; │ │ │ │ -61 } │ │ │ │ -62 static inline double max(const double& a, const double& b) { │ │ │ │ -63 return std::max(a, b); │ │ │ │ -64 } │ │ │ │ -65 static inline double mul(const double& a, const double& b) { │ │ │ │ -66 return a * b; │ │ │ │ -67 } │ │ │ │ -68 static inline double div(const double& a, const double& b) { │ │ │ │ -69 return a / b; │ │ │ │ -70 } │ │ │ │ -71 static inline double id(const double& x) { return x; } │ │ │ │ -72 }; │ │ │ │ -73 │ │ │ │ -74 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e(double leaf = 1.0) : _B_a_s_e(leaf) {} │ │ │ │ -75 │ │ │ │ -76 // Explicitly non-explicit constructor │ │ │ │ -77 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e(const Base& add) : Base(add) {} │ │ │ │ +21#pragma once │ │ │ │ +22 │ │ │ │ +23#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_._h> │ │ │ │ +24#include <_g_t_s_a_m_/_d_i_s_c_r_e_t_e_/_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ +25#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_B_a_y_e_s_T_r_e_e_._h> │ │ │ │ +26#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_C_o_n_d_i_t_i_o_n_a_l_._h> │ │ │ │ +27#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_B_a_s_e_._h> │ │ │ │ +28 │ │ │ │ +29#include │ │ │ │ +30 │ │ │ │ +31namespace _g_t_s_a_m { │ │ │ │ +32 │ │ │ │ +33// Forward declarations │ │ │ │ +34class DiscreteConditional; │ │ │ │ +35class _V_e_c_t_o_r_V_a_l_u_e_s; │ │ │ │ +36 │ │ │ │ +37/* ************************************************************************* │ │ │ │ +*/ │ │ │ │ +_3_9class GTSAM_EXPORT _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e │ │ │ │ +40 : public _B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_B_a_s_e { │ │ │ │ +41 public: │ │ │ │ +42 typedef _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e _T_h_i_s; │ │ │ │ +43 typedef _B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_B_a_s_e_<_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_,_ _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_> │ │ │ │ +44 _B_a_s_e; │ │ │ │ +45 typedef boost::shared_ptr shared_ptr; │ │ │ │ +46 typedef boost::weak_ptr weak_ptr; │ │ │ │ +47 _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e() {} │ │ │ │ +48 virtual _~_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e() {} │ │ │ │ +49 _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e( │ │ │ │ +50 const boost::shared_ptr& conditional) │ │ │ │ +51 : _B_a_s_e(conditional) {} │ │ │ │ +52 │ │ │ │ +_5_4 void _p_r_i_n_t_S_i_g_n_a_t_u_r_e( │ │ │ │ +55 const std::string& s = "Clique: ", │ │ │ │ +56 const _K_e_y_F_o_r_m_a_t_t_e_r& formatter = DefaultKeyFormatter) const { │ │ │ │ +57 conditional_->printSignature(s, formatter); │ │ │ │ +58 } │ │ │ │ +59 │ │ │ │ +60 //** evaluate conditional probability of subtree for given DiscreteValues */ │ │ │ │ +61 double evaluate(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) const; │ │ │ │ +62 │ │ │ │ +63 //** (Preferred) sugar for the above for given DiscreteValues */ │ │ │ │ +64 double operator()(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) const { │ │ │ │ +65 return evaluate(values); │ │ │ │ +66 } │ │ │ │ +67}; │ │ │ │ +68 │ │ │ │ +69/* ************************************************************************* │ │ │ │ +*/ │ │ │ │ +_7_4class GTSAM_EXPORT _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e │ │ │ │ +75 : public _B_a_y_e_s_T_r_e_e { │ │ │ │ +76 private: │ │ │ │ +77 typedef _B_a_y_e_s_T_r_e_e_<_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_> _B_a_s_e; │ │ │ │ 78 │ │ │ │ -_8_0 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e(const L& label, double y1, double y2) │ │ │ │ -81 : _B_a_s_e(label, y1, y2) {} │ │ │ │ +79 public: │ │ │ │ +80 typedef _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e _T_h_i_s; │ │ │ │ +81 typedef boost::shared_ptr shared_ptr; │ │ │ │ 82 │ │ │ │ -_9_6 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e(const typename _B_a_s_e_:_:_L_a_b_e_l_C& labelC, double y1, │ │ │ │ -97 double y2) │ │ │ │ -98 : _B_a_s_e(labelC, y1, y2) {} │ │ │ │ -99 │ │ │ │ -_1_2_4 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e // │ │ │ │ -125 (const std::vector& labelCs, │ │ │ │ -126 const std::vector& ys) { │ │ │ │ -127 this->root_ = │ │ │ │ -128 Base::create(labelCs.begin(), labelCs.end(), ys.begin(), ys.end()); │ │ │ │ -129 } │ │ │ │ -130 │ │ │ │ -_1_3_9 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e // │ │ │ │ -140 (const std::vector& labelCs, │ │ │ │ -141 const std::string& table) { │ │ │ │ -142 // Convert string to doubles │ │ │ │ -143 std::vector ys; │ │ │ │ -144 std::istringstream iss(table); │ │ │ │ -145 std::copy(std::istream_iterator(iss), │ │ │ │ -146 std::istream_iterator(), std::back_inserter(ys)); │ │ │ │ -147 │ │ │ │ -148 // now call recursive Create │ │ │ │ -149 this->root_ = │ │ │ │ -150 Base::create(labelCs.begin(), labelCs.end(), ys.begin(), ys.end()); │ │ │ │ -151 } │ │ │ │ -152 │ │ │ │ -160 template │ │ │ │ -_1_6_1 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e(Iterator begin, Iterator end, const L& label) │ │ │ │ -162 : _B_a_s_e(nullptr) { │ │ │ │ -163 this->root_ = compose(begin, end, label); │ │ │ │ -164 } │ │ │ │ -165 │ │ │ │ -172 template │ │ │ │ -_1_7_3 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e(const _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_M_>& other, │ │ │ │ -174 const std::map& map) { │ │ │ │ -175 // Functor for label conversion so we can use `convertFrom`. │ │ │ │ -176 std::function L_of_M = [&map](const M& label) -> L { │ │ │ │ -177 return map.at(label); │ │ │ │ -178 }; │ │ │ │ -179 std::function op = Ring::id; │ │ │ │ -180 this->root_ = _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _d_o_u_b_l_e_>_:_:_c_o_n_v_e_r_t_F_r_o_m(other._r_o_o_t__, L_of_M, │ │ │ │ -op); │ │ │ │ -181 } │ │ │ │ -182 │ │ │ │ -_1_8_4 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e _o_p_e_r_a_t_o_r_+(const _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e& g) const { │ │ │ │ -185 return this->_a_p_p_l_y(g, &Ring::add); │ │ │ │ -186 } │ │ │ │ -187 │ │ │ │ -_1_8_9 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e _o_p_e_r_a_t_o_r_*(const _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e& g) const { │ │ │ │ -190 return this->_a_p_p_l_y(g, &Ring::mul); │ │ │ │ -191 } │ │ │ │ -192 │ │ │ │ -_1_9_4 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e _o_p_e_r_a_t_o_r_/(const _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e& g) const { │ │ │ │ -195 return this->_a_p_p_l_y(g, &Ring::div); │ │ │ │ -196 } │ │ │ │ -197 │ │ │ │ -_1_9_9 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e _s_u_m(const L& label, size_t cardinality) const { │ │ │ │ -200 return this->combine(label, cardinality, &Ring::add); │ │ │ │ -201 } │ │ │ │ -202 │ │ │ │ -_2_0_4 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e _s_u_m(const typename _B_a_s_e_:_:_L_a_b_e_l_C& labelC) const { │ │ │ │ -205 return this->combine(labelC, &Ring::add); │ │ │ │ -206 } │ │ │ │ -207 │ │ │ │ -_2_0_9 void _p_r_i_n_t(const std::string& s = "", │ │ │ │ -210 const typename Base::LabelFormatter& labelFormatter = │ │ │ │ -211 &DefaultFormatter) const { │ │ │ │ -212 auto valueFormatter = [](const double& v) { │ │ │ │ -213 return (boost::format("%4.8g") % v).str(); │ │ │ │ -214 }; │ │ │ │ -215 Base::print(s, labelFormatter, valueFormatter); │ │ │ │ -216 } │ │ │ │ -217 │ │ │ │ -_2_1_9 bool _e_q_u_a_l_s(const _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e& other, double tol = 1e-9) const { │ │ │ │ -220 // lambda for comparison of two doubles upto some tolerance. │ │ │ │ -221 auto compare = [tol](double a, double b) { │ │ │ │ -222 return std::abs(a - b) < tol; │ │ │ │ -223 }; │ │ │ │ -224 return Base::equals(other, compare); │ │ │ │ -225 } │ │ │ │ -226 }; │ │ │ │ -227 │ │ │ │ -228template │ │ │ │ -_2_2_9struct _t_r_a_i_t_s<_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e> │ │ │ │ -230 : public _T_e_s_t_a_b_l_e> {}; │ │ │ │ -231} // namespace gtsam │ │ │ │ -_T_e_s_t_a_b_l_e_._h │ │ │ │ -Concept check for values that can be used in unit tests. │ │ │ │ +85 │ │ │ │ +_8_6 _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e() {} │ │ │ │ +87 │ │ │ │ +89 bool _e_q_u_a_l_s(const This& other, double tol = 1e-9) const; │ │ │ │ +90 │ │ │ │ +91 //** evaluate probability for given DiscreteValues */ │ │ │ │ +92 double evaluate(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) const; │ │ │ │ +93 │ │ │ │ +94 //** (Preferred) sugar for the above for given DiscreteValues */ │ │ │ │ +95 double operator()(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) const { │ │ │ │ +96 return evaluate(values); │ │ │ │ +97 } │ │ │ │ +98 │ │ │ │ +102 │ │ │ │ +104 std::string markdown(const KeyFormatter& keyFormatter = │ │ │ │ +DefaultKeyFormatter, │ │ │ │ +105 const DiscreteFactor::Names& names = {}) const; │ │ │ │ +106 │ │ │ │ +108 std::string _h_t_m_l(const KeyFormatter& keyFormatter = DefaultKeyFormatter, │ │ │ │ +109 const DiscreteFactor::Names& names = {}) const; │ │ │ │ +110 │ │ │ │ +112}; │ │ │ │ +113 │ │ │ │ +114} // namespace gtsam │ │ │ │ +_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_._h │ │ │ │ +_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +_B_a_y_e_s_T_r_e_e_._h │ │ │ │ +Bayes Tree is a tree of cliques of a Bayes Chain. │ │ │ │ +_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ +Base class for conditional densities. │ │ │ │ +_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_B_a_s_e_._h │ │ │ │ +Base class for cliques of a BayesTree. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_a_p_p_l_y │ │ │ │ -DecisionTree< L, Y > apply(const DecisionTree< L, Y > &f, const typename │ │ │ │ -DecisionTree< L, Y >::Unary &op) │ │ │ │ -free versions of apply │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:413 │ │ │ │ -_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ -A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ -that can be centered ... │ │ │ │ -DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_T_e_s_t_a_b_l_e │ │ │ │ -A helper that implements the traits interface for GTSAM types. │ │ │ │ -DDeeffiinniittiioonn Testable.h:151 │ │ │ │ -_g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e │ │ │ │ -An algebraic decision tree fixes the range of a DecisionTree to double. │ │ │ │ -DDeeffiinniittiioonn AlgebraicDecisionTree.h:38 │ │ │ │ -_g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_:_:_o_p_e_r_a_t_o_r_/ │ │ │ │ -AlgebraicDecisionTree operator/(const AlgebraicDecisionTree &g) const │ │ │ │ -division │ │ │ │ -DDeeffiinniittiioonn AlgebraicDecisionTree.h:194 │ │ │ │ -_g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_:_:_s_u_m │ │ │ │ -AlgebraicDecisionTree sum(const L &label, size_t cardinality) const │ │ │ │ -sum out variable │ │ │ │ -DDeeffiinniittiioonn AlgebraicDecisionTree.h:199 │ │ │ │ -_g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e │ │ │ │ -AlgebraicDecisionTree(const typename Base::LabelC &labelC, double y1, double │ │ │ │ -y2) │ │ │ │ -Create a new leaf function splitting on a variable. │ │ │ │ -DDeeffiinniittiioonn AlgebraicDecisionTree.h:96 │ │ │ │ -_g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_:_:_p_r_i_n_t │ │ │ │ -void print(const std::string &s="", const typename Base::LabelFormatter │ │ │ │ -&labelFormatter=&DefaultFormatter) const │ │ │ │ -print method customized to value type double. │ │ │ │ -DDeeffiinniittiioonn AlgebraicDecisionTree.h:209 │ │ │ │ -_g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_:_:_s_u_m │ │ │ │ -AlgebraicDecisionTree sum(const typename Base::LabelC &labelC) const │ │ │ │ -sum out variable │ │ │ │ -DDeeffiinniittiioonn AlgebraicDecisionTree.h:204 │ │ │ │ -_g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e │ │ │ │ -AlgebraicDecisionTree(const AlgebraicDecisionTree< M > &other, const std::map< │ │ │ │ -M, L > &map) │ │ │ │ -Convert labels from type M to type L. │ │ │ │ -DDeeffiinniittiioonn AlgebraicDecisionTree.h:173 │ │ │ │ -_g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e │ │ │ │ -AlgebraicDecisionTree(const L &label, double y1, double y2) │ │ │ │ -Create a new leaf function splitting on a variable. │ │ │ │ -DDeeffiinniittiioonn AlgebraicDecisionTree.h:80 │ │ │ │ -_g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const AlgebraicDecisionTree &other, double tol=1e-9) const │ │ │ │ -Equality method customized to value type double. │ │ │ │ -DDeeffiinniittiioonn AlgebraicDecisionTree.h:219 │ │ │ │ -_g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_:_:_o_p_e_r_a_t_o_r_+ │ │ │ │ -AlgebraicDecisionTree operator+(const AlgebraicDecisionTree &g) const │ │ │ │ -sum │ │ │ │ -DDeeffiinniittiioonn AlgebraicDecisionTree.h:184 │ │ │ │ -_g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -AlgebraicDecisionTree operator*(const AlgebraicDecisionTree &g) const │ │ │ │ -product │ │ │ │ -DDeeffiinniittiioonn AlgebraicDecisionTree.h:189 │ │ │ │ -_g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e │ │ │ │ -AlgebraicDecisionTree(Iterator begin, Iterator end, const L &label) │ │ │ │ -Create a range of decision trees, splitting on a single variable. │ │ │ │ -DDeeffiinniittiioonn AlgebraicDecisionTree.h:161 │ │ │ │ -_g_t_s_a_m_:_:_A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_:_:_R_i_n_g │ │ │ │ -The Real ring with addition and multiplication. │ │ │ │ -DDeeffiinniittiioonn AlgebraicDecisionTree.h:56 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e │ │ │ │ -a decision tree is a function from assignments to values. │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:61 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_r_o_o_t__ │ │ │ │ -NodePtr root_ │ │ │ │ -A DecisionTree just contains the root. TODO(dellaert): make protected. │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:146 │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_<_ _L_,_ _d_o_u_b_l_e_ _>_:_:_L_a_b_e_l_C │ │ │ │ -std::pair< L, size_t > LabelC │ │ │ │ -A label annotated with cardinality. │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:79 │ │ │ │ +_g_t_s_a_m_:_:_h_t_m_l │ │ │ │ +string html(const DiscreteValues &values, const KeyFormatter &keyFormatter, │ │ │ │ +const DiscreteValues::Names &names) │ │ │ │ +Free version of html. │ │ │ │ +DDeeffiinniittiioonn DiscreteValues.cpp:134 │ │ │ │ +_g_t_s_a_m_:_:_K_e_y_F_o_r_m_a_t_t_e_r │ │ │ │ +std::function< std::string(Key)> KeyFormatter │ │ │ │ +Typedef for a function to format a key, i.e. to convert it to a string. │ │ │ │ +DDeeffiinniittiioonn Key.h:35 │ │ │ │ +_g_t_s_a_m_:_:_e_q_u_a_l_s │ │ │ │ +Template to create a binary predicate. │ │ │ │ +DDeeffiinniittiioonn Testable.h:111 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e │ │ │ │ +A clique in a DiscreteBayesTree. │ │ │ │ +DDeeffiinniittiioonn DiscreteBayesTree.h:40 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_:_:_p_r_i_n_t_S_i_g_n_a_t_u_r_e │ │ │ │ +void printSignature(const std::string &s="Clique: ", const KeyFormatter │ │ │ │ +&formatter=DefaultKeyFormatter) const │ │ │ │ +print index signature only │ │ │ │ +DDeeffiinniittiioonn DiscreteBayesTree.h:54 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e │ │ │ │ +A Bayes tree representing a Discrete density. │ │ │ │ +DDeeffiinniittiioonn DiscreteBayesTree.h:75 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e │ │ │ │ +DiscreteBayesTree() │ │ │ │ +Default constructor, creates an empty Bayes tree. │ │ │ │ +DDeeffiinniittiioonn DiscreteBayesTree.h:86 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_V_a_l_u_e_s │ │ │ │ +A map from keys to values. │ │ │ │ +DDeeffiinniittiioonn DiscreteValues.h:34 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e │ │ │ │ +Bayes tree. │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:67 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_B_a_s_e │ │ │ │ +This is the base class for BayesTree cliques. │ │ │ │ +DDeeffiinniittiioonn BayesTreeCliqueBase.h:50 │ │ │ │ +_V_e_c_t_o_r_V_a_l_u_e_s │ │ │ │ +The Factor::error simply extracts the. │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_._h │ │ │ │ + * _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00272.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/AlgebraicDecisionTree.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteConditional.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,36 +94,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Namespaces
    │ │ │ -
    AlgebraicDecisionTree.cpp File Reference
    │ │ │ +Namespaces | │ │ │ +Variables
    │ │ │ +
    DiscreteConditional.cpp File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ +Variables

    │ │ │ +template class GTSAM_EXPORT gtsam::Conditional< DecisionTreeFactor, DiscreteConditional >
     
    │ │ │

    Detailed Description

    │ │ │ -
    Date
    Feb 20, 2022
    │ │ │ -
    Author
    Mike Sheffler
    │ │ │ -
    │ │ │ -Duy-Nguyen Ta
    │ │ │ +
    Date
    Feb 14, 2011
    │ │ │ +
    Author
    Duy-Nguyen Ta
    │ │ │
    │ │ │ Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,22 +1,25 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -AlgebraicDecisionTree.cpp File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _V_a_r_i_a_b_l_e_s │ │ │ │ +DiscreteConditional.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +VVaarriiaabblleess │ │ │ │ +template class GTSAM_EXPORT  ggttssaamm::::CCoonnddiittiioonnaall<< DDeecciissiioonnTTrreeeeFFaaccttoorr,, │ │ │ │ + DDiissccrreetteeCCoonnddiittiioonnaall >> │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - Feb 20, 2022 │ │ │ │ + Feb 14, 2011 │ │ │ │ Author │ │ │ │ - Mike Sheffler │ │ │ │ Duy-Nguyen Ta │ │ │ │ Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_._c_p_p │ │ │ │ + * _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00275.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/triangulation.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/PinholeSet.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,192 +95,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Typedefs | │ │ │ -Functions
    │ │ │ -
    triangulation.h File Reference
    │ │ │ +Namespaces
    │ │ │ +
    PinholeSet.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    Functions for triangulation. │ │ │ +

    A CameraSet of either CalibratedCamera, PinholePose, or PinholeCamera. │ │ │ More...

    │ │ │ │ │ │

    Go to the source code of this file.

    │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ │ │ │

    │ │ │ Classes

    class  gtsam::TriangulationUnderconstrainedException
     Exception thrown by triangulateDLT when SVD returns rank < 3. More...
    class  gtsam::PinholeSet< CAMERA >
     PinholeSet: triangulates point and keeps an estimate of it around. More...
     
    class  gtsam::TriangulationCheiralityException
     Exception thrown by triangulateDLT when landmark is behind one or more of the cameras. More...
    struct  gtsam::traits< PinholeSet< CAMERA > >
     
    struct  gtsam::TriangulationParameters
     
    class  gtsam::TriangulationResult
     TriangulationResult is an optional point, along with the reasons why it is invalid. More...
    struct  gtsam::traits< const PinholeSet< CAMERA > >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Typedefs

    │ │ │ -using gtsam::CameraSetCal3Bundler = CameraSet< PinholeCamera< Cal3Bundler > >
     
    │ │ │ -using gtsam::CameraSetCal3_S2 = CameraSet< PinholeCamera< Cal3_S2 > >
     
    │ │ │ -using gtsam::CameraSetCal3DS2 = CameraSet< PinholeCamera< Cal3DS2 > >
     
    │ │ │ -using gtsam::CameraSetCal3Fisheye = CameraSet< PinholeCamera< Cal3Fisheye > >
     
    │ │ │ -using gtsam::CameraSetCal3Unified = CameraSet< PinholeCamera< Cal3Unified > >
     
    │ │ │ -using gtsam::CameraSetSpherical = CameraSet< SphericalCamera >
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

    │ │ │ -Functions

    Vector4 gtsam::triangulateHomogeneousDLT (const std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > &projection_matrices, const Point2Vector &measurements, double rank_tol=1e-9)
     DLT triangulation: See Hartley and Zisserman, 2nd Ed., page 312.
     
    Vector4 gtsam::triangulateHomogeneousDLT (const std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > &projection_matrices, const std::vector< Unit3 > &measurements, double rank_tol=1e-9)
     Same math as Hartley and Zisserman, 2nd Ed., page 312, but with unit-norm bearing vectors (contrarily to pinhole projection, the z entry is not assumed to be 1 as in Hartley and Zisserman)
     
    Point3 gtsam::triangulateDLT (const std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > &projection_matrices, const Point2Vector &measurements, double rank_tol=1e-9)
     DLT triangulation: See Hartley and Zisserman, 2nd Ed., page 312.
     
    │ │ │ -Point3 gtsam::triangulateDLT (const std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > &projection_matrices, const std::vector< Unit3 > &measurements, double rank_tol=1e-9)
     overload of previous function to work with Unit3 (projected to canonical camera)
     
    Point3 gtsam::triangulateLOST (const std::vector< Pose3 > &poses, const Point3Vector &calibratedMeasurements, const SharedIsotropic &measurementNoise)
     Triangulation using the LOST (Linear Optimal Sine Triangulation) algorithm proposed in https://arxiv.org/pdf/2205.12197.pdf by Sebastien Henry and John Christian.
     
    template<class CALIBRATION >
    std::pair< NonlinearFactorGraph, Valuesgtsam::triangulationGraph (const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal, const Point2Vector &measurements, Key landmarkKey, const Point3 &initialEstimate, const SharedNoiseModel &model=noiseModel::Unit::Create(2))
     Create a factor graph with projection factors from poses and one calibration.
     
    template<class CAMERA >
    std::pair< NonlinearFactorGraph, Valuesgtsam::triangulationGraph (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measurements, Key landmarkKey, const Point3 &initialEstimate, const SharedNoiseModel &model=nullptr)
     Create a factor graph with projection factors from pinhole cameras (each camera has a pose and calibration)
     
    Point3 gtsam::optimize (const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
     Optimize for triangulation.
     
    template<class CALIBRATION >
    Point3 gtsam::triangulateNonlinear (const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal, const Point2Vector &measurements, const Point3 &initialEstimate, const SharedNoiseModel &model=nullptr)
     Given an initial estimate , refine a point using measurements in several cameras.
     
    template<class CAMERA >
    Point3 gtsam::triangulateNonlinear (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measurements, const Point3 &initialEstimate, const SharedNoiseModel &model=nullptr)
     Given an initial estimate , refine a point using measurements in several cameras.
     
    │ │ │ -template<class CAMERA >
    std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > gtsam::projectionMatricesFromCameras (const CameraSet< CAMERA > &cameras)
     
    │ │ │ -template<class CALIBRATION >
    std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > gtsam::projectionMatricesFromPoses (const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal)
     
    template<class CALIBRATION >
    Cal3_S2 gtsam::createPinholeCalibration (const CALIBRATION &cal)
     Create a pinhole calibration from a different Cal3 object, removing distortion.
     
    │ │ │ -template<class CALIBRATION , class MEASUREMENT >
    MEASUREMENT gtsam::undistortMeasurementInternal (const CALIBRATION &cal, const MEASUREMENT &measurement, boost::optional< Cal3_S2 > pinholeCal=boost::none)
     Internal undistortMeasurement to be used by undistortMeasurement and undistortMeasurements.
     
    template<class CALIBRATION >
    Point2Vector gtsam::undistortMeasurements (const CALIBRATION &cal, const Point2Vector &measurements)
     Remove distortion for measurements so as if the measurements came from a pinhole camera.
     
    │ │ │ -template<>
    Point2Vector gtsam::undistortMeasurements (const Cal3_S2 &cal, const Point2Vector &measurements)
     Specialization for Cal3_S2 as it doesn't need to be undistorted.
     
    template<class CAMERA >
    CAMERA::MeasurementVector gtsam::undistortMeasurements (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measurements)
     Remove distortion for measurements so as if the measurements came from a pinhole camera.
     
    │ │ │ -template<class CAMERA = PinholeCamera<Cal3_S2>>
    PinholeCamera< Cal3_S2 >::MeasurementVector gtsam::undistortMeasurements (const CameraSet< PinholeCamera< Cal3_S2 > > &cameras, const PinholeCamera< Cal3_S2 >::MeasurementVector &measurements)
     Specialize for Cal3_S2 to do nothing.
     
    │ │ │ -template<class CAMERA = SphericalCamera>
    SphericalCamera::MeasurementVector gtsam::undistortMeasurements (const CameraSet< SphericalCamera > &cameras, const SphericalCamera::MeasurementVector &measurements)
     Specialize for SphericalCamera to do nothing.
     
    template<class CALIBRATION >
    Point3Vector gtsam::calibrateMeasurementsShared (const CALIBRATION &cal, const Point2Vector &measurements)
     Convert pixel measurements in image to homogeneous measurements in the image plane using shared camera intrinsics.
     
    template<class CAMERA >
    Point3Vector gtsam::calibrateMeasurements (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measurements)
     Convert pixel measurements in image to homogeneous measurements in the image plane using camera intrinsics of each measurement.
     
    │ │ │ -template<class CAMERA = SphericalCamera>
    Point3Vector gtsam::calibrateMeasurements (const CameraSet< SphericalCamera > &cameras, const SphericalCamera::MeasurementVector &measurements)
     Specialize for SphericalCamera to do nothing.
     
    template<class CALIBRATION >
    Point3 gtsam::triangulatePoint3 (const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal, const Point2Vector &measurements, double rank_tol=1e-9, bool optimize=false, const SharedNoiseModel &model=nullptr, const bool useLOST=false)
     Function to triangulate 3D landmark point from an arbitrary number of poses (at least 2) using the DLT.
     
    template<class CAMERA >
    Point3 gtsam::triangulatePoint3 (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measurements, double rank_tol=1e-9, bool optimize=false, const SharedNoiseModel &model=nullptr, const bool useLOST=false)
     Function to triangulate 3D landmark point from an arbitrary number of poses (at least 2) using the DLT.
     
    │ │ │ -template<class CALIBRATION >
    Point3 gtsam::triangulatePoint3 (const CameraSet< PinholeCamera< CALIBRATION > > &cameras, const Point2Vector &measurements, double rank_tol=1e-9, bool optimize=false, const SharedNoiseModel &model=nullptr, const bool useLOST=false)
     Pinhole-specific version.
     
    │ │ │ -template<class CAMERA >
    TriangulationResult gtsam::triangulateSafe (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measured, const TriangulationParameters &params)
     triangulateSafe: extensive checking of the outcome
     
    │ │ │

    Detailed Description

    │ │ │ -

    Functions for triangulation.

    │ │ │ -
    Date
    July 31, 2013
    │ │ │ -
    Author
    Chris Beall
    │ │ │ -
    │ │ │ -Akshay Krishnan
    │ │ │ -
    Date
    July 31, 2013
    │ │ │ -
    Author
    Chris Beall
    │ │ │ -
    │ │ │ -Luca Carlone
    │ │ │ -
    │ │ │ -Akshay Krishnan
    │ │ │ +

    A CameraSet of either CalibratedCamera, PinholePose, or PinholeCamera.

    │ │ │ +
    Author
    Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,295 +1,30 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -triangulation.h File Reference │ │ │ │ -Functions for triangulation. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +PinholeSet.h File Reference │ │ │ │ +A CameraSet of either CalibratedCamera, PinholePose, or PinholeCamera. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_U_n_d_e_r_c_o_n_s_t_r_a_i_n_e_d_E_x_c_e_p_t_i_o_n │ │ │ │ -  Exception thrown by triangulateDLT when SVD returns rank < 3. _M_o_r_e_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_P_i_n_h_o_l_e_S_e_t_<_ _C_A_M_E_R_A_ _> │ │ │ │ +  _P_i_n_h_o_l_e_S_e_t: triangulates point and keeps an estimate of it around. │ │ │ │ + _M_o_r_e_._._. │ │ │ │   │ │ │ │ - class   _g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n │ │ │ │ -  Exception thrown by triangulateDLT when landmark is behind one or more │ │ │ │ - of the cameras. _M_o_r_e_._._. │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _P_i_n_h_o_l_e_S_e_t_<_ _C_A_M_E_R_A_ _>_ _> │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s │ │ │ │ -  │ │ │ │ - class   _g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t │ │ │ │ -  _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t is an optional point, along with the reasons why │ │ │ │ - it is invalid. _M_o_r_e_._._. │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _P_i_n_h_o_l_e_S_e_t_<_ _C_A_M_E_R_A_ _>_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -using  ggttssaamm::::CCaammeerraaSSeettCCaall33BBuunnddlleerr = _C_a_m_e_r_a_S_e_t< _P_i_n_h_o_l_e_C_a_m_e_r_a< _C_a_l_3_B_u_n_d_l_e_r > > │ │ │ │ -  │ │ │ │ -using  ggttssaamm::::CCaammeerraaSSeettCCaall33__SS22 = _C_a_m_e_r_a_S_e_t< _P_i_n_h_o_l_e_C_a_m_e_r_a< _C_a_l_3___S_2 > > │ │ │ │ -  │ │ │ │ -using  ggttssaamm::::CCaammeerraaSSeettCCaall33DDSS22 = _C_a_m_e_r_a_S_e_t< _P_i_n_h_o_l_e_C_a_m_e_r_a< _C_a_l_3_D_S_2 > > │ │ │ │ -  │ │ │ │ -using  ggttssaamm::::CCaammeerraaSSeettCCaall33FFiisshheeyyee = _C_a_m_e_r_a_S_e_t< _P_i_n_h_o_l_e_C_a_m_e_r_a< _C_a_l_3_F_i_s_h_e_y_e > > │ │ │ │ -  │ │ │ │ -using  ggttssaamm::::CCaammeerraaSSeettCCaall33UUnniiffiieedd = _C_a_m_e_r_a_S_e_t< _P_i_n_h_o_l_e_C_a_m_e_r_a< _C_a_l_3_U_n_i_f_i_e_d > > │ │ │ │ -  │ │ │ │ -using  ggttssaamm::::CCaammeerraaSSeettSSpphheerriiccaall = _C_a_m_e_r_a_S_e_t< _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a > │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ - Vector4  _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_H_o_m_o_g_e_n_e_o_u_s_D_L_T (const │ │ │ │ - std::vector< Matrix34, Eigen:: │ │ │ │ - aligned_allocator< Matrix34 > > │ │ │ │ - &projection_matrices, const │ │ │ │ - Point2Vector &measurements, double │ │ │ │ - rank_tol=1e-9) │ │ │ │ -  DLT triangulation: See Hartley and │ │ │ │ - Zisserman, 2nd Ed., page 312. │ │ │ │ -  │ │ │ │ - Vector4  _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_H_o_m_o_g_e_n_e_o_u_s_D_L_T (const │ │ │ │ - std::vector< Matrix34, Eigen:: │ │ │ │ - aligned_allocator< Matrix34 > > │ │ │ │ - &projection_matrices, const std:: │ │ │ │ - vector< _U_n_i_t_3 > &measurements, double │ │ │ │ - rank_tol=1e-9) │ │ │ │ - Same math as Hartley and Zisserman, 2nd │ │ │ │ - Ed., page 312, but with unit-norm │ │ │ │ -  bearing vectors (contrarily to pinhole │ │ │ │ - projection, the z entry is not assumed │ │ │ │ - to be 1 as in Hartley and Zisserman) │ │ │ │ -  │ │ │ │ - _P_o_i_n_t_3  _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_D_L_T (const std:: │ │ │ │ - vector< Matrix34, Eigen:: │ │ │ │ - aligned_allocator< Matrix34 > > │ │ │ │ - &projection_matrices, const │ │ │ │ - Point2Vector &measurements, double │ │ │ │ - rank_tol=1e-9) │ │ │ │ -  DLT triangulation: See Hartley and │ │ │ │ - Zisserman, 2nd Ed., page 312. │ │ │ │ -  │ │ │ │ - _P_o_i_n_t_3  ggttssaamm::::ttrriiaanngguullaatteeDDLLTT (const std:: │ │ │ │ - vector< Matrix34, Eigen:: │ │ │ │ - aligned_allocator< Matrix34 > > │ │ │ │ - &projection_matrices, const std:: │ │ │ │ - vector< _U_n_i_t_3 > &measurements, double │ │ │ │ - rank_tol=1e-9) │ │ │ │ - overload of previous function to work │ │ │ │ -  with _U_n_i_t_3 (projected to canonical │ │ │ │ - camera) │ │ │ │ -  │ │ │ │ - _P_o_i_n_t_3  _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_L_O_S_T (const std:: │ │ │ │ - vector< _P_o_s_e_3 > &poses, const │ │ │ │ - Point3Vector &calibratedMeasurements, │ │ │ │ - const SharedIsotropic │ │ │ │ - &measurementNoise) │ │ │ │ - Triangulation using the LOST (Linear │ │ │ │ - Optimal Sine Triangulation) algorithm │ │ │ │ -  proposed in _h_t_t_p_s_:_/_/_a_r_x_i_v_._o_r_g_/_p_d_f_/ │ │ │ │ - _2_2_0_5_._1_2_1_9_7_._p_d_f by Sebastien Henry and │ │ │ │ - John Christian. │ │ │ │ -  │ │ │ │ -template │ │ │ │ -std::pair< _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h, _V_a_l_u_e_s _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_i_o_n_G_r_a_p_h (const std:: │ │ │ │ - >  vector< _P_o_s_e_3 > &poses, boost:: │ │ │ │ - shared_ptr< CALIBRATION > sharedCal, │ │ │ │ - const Point2Vector &measurements, _K_e_y │ │ │ │ - landmarkKey, const _P_o_i_n_t_3 │ │ │ │ - &initialEstimate, const │ │ │ │ - _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model=_n_o_i_s_e_M_o_d_e_l_:_: │ │ │ │ - _U_n_i_t_:_:_C_r_e_a_t_e(2)) │ │ │ │ -  Create a factor graph with projection │ │ │ │ - factors from poses and one calibration. │ │ │ │ -  │ │ │ │ -template │ │ │ │ -std::pair< _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h, _V_a_l_u_e_s _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_i_o_n_G_r_a_p_h (const │ │ │ │ - >  _C_a_m_e_r_a_S_e_t< CAMERA > &cameras, const │ │ │ │ - typename CAMERA::MeasurementVector │ │ │ │ - &measurements, _K_e_y landmarkKey, const │ │ │ │ - _P_o_i_n_t_3 &initialEstimate, const │ │ │ │ - _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model=nullptr) │ │ │ │ - Create a factor graph with projection │ │ │ │ -  factors from pinhole cameras (each │ │ │ │ - camera has a pose and calibration) │ │ │ │ -  │ │ │ │ - _P_o_i_n_t_3  _g_t_s_a_m_:_:_o_p_t_i_m_i_z_e (const │ │ │ │ - _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h &graph, const │ │ │ │ - _V_a_l_u_e_s &values, _K_e_y landmarkKey) │ │ │ │ -  Optimize for triangulation. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _P_o_i_n_t_3  _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_N_o_n_l_i_n_e_a_r (const │ │ │ │ - std::vector< _P_o_s_e_3 > &poses, boost:: │ │ │ │ - shared_ptr< CALIBRATION > sharedCal, │ │ │ │ - const Point2Vector &measurements, const │ │ │ │ - _P_o_i_n_t_3 &initialEstimate, const │ │ │ │ - _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model=nullptr) │ │ │ │ - Given an initial estimate , refine a │ │ │ │ -  point using measurements in several │ │ │ │ - cameras. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _P_o_i_n_t_3  _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_N_o_n_l_i_n_e_a_r (const │ │ │ │ - _C_a_m_e_r_a_S_e_t< CAMERA > &cameras, const │ │ │ │ - typename CAMERA::MeasurementVector │ │ │ │ - &measurements, const _P_o_i_n_t_3 │ │ │ │ - &initialEstimate, const │ │ │ │ - _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model=nullptr) │ │ │ │ - Given an initial estimate , refine a │ │ │ │ -  point using measurements in several │ │ │ │ - cameras. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - std::vector< Matrix34, Eigen:: ggttssaamm::::pprroojjeeccttiioonnMMaattrriicceessFFrroommCCaammeerraass │ │ │ │ - aligned_allocator< Matrix34 > >  (const _C_a_m_e_r_a_S_e_t< CAMERA > &cameras) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - std::vector< Matrix34, Eigen:: ggttssaamm::::pprroojjeeccttiioonnMMaattrriicceessFFrroommPPoosseess │ │ │ │ - aligned_allocator< Matrix34 > >  (const std::vector< _P_o_s_e_3 > &poses, │ │ │ │ - boost::shared_ptr< CALIBRATION > │ │ │ │ - sharedCal) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _C_a_l_3___S_2  _g_t_s_a_m_:_:_c_r_e_a_t_e_P_i_n_h_o_l_e_C_a_l_i_b_r_a_t_i_o_n (const │ │ │ │ - CALIBRATION &cal) │ │ │ │ - Create a pinhole calibration from a │ │ │ │ -  different _C_a_l_3 object, removing │ │ │ │ - distortion. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - MEASUREMENT  ggttssaamm::::uunnddiissttoorrttMMeeaassuurreemmeennttIInntteerrnnaall │ │ │ │ - (const CALIBRATION &cal, const │ │ │ │ - MEASUREMENT &measurement, boost:: │ │ │ │ - optional< _C_a_l_3___S_2 > pinholeCal=boost:: │ │ │ │ - none) │ │ │ │ - Internal undistortMeasurement to be │ │ │ │ -  used by undistortMeasurement and │ │ │ │ - undistortMeasurements. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - Point2Vector  _g_t_s_a_m_:_:_u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_s (const │ │ │ │ - CALIBRATION &cal, const Point2Vector │ │ │ │ - &measurements) │ │ │ │ - Remove distortion for measurements so │ │ │ │ -  as if the measurements came from a │ │ │ │ - pinhole camera. │ │ │ │ -  │ │ │ │ - template<> │ │ │ │ - Point2Vector  ggttssaamm::::uunnddiissttoorrttMMeeaassuurreemmeennttss (const │ │ │ │ - _C_a_l_3___S_2 &cal, const Point2Vector │ │ │ │ - &measurements) │ │ │ │ -  Specialization for _C_a_l_3___S_2 as it │ │ │ │ - doesn't need to be undistorted. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - CAMERA::MeasurementVector  _g_t_s_a_m_:_:_u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_s (const │ │ │ │ - _C_a_m_e_r_a_S_e_t< CAMERA > &cameras, const │ │ │ │ - typename CAMERA::MeasurementVector │ │ │ │ - &measurements) │ │ │ │ - Remove distortion for measurements so │ │ │ │ -  as if the measurements came from a │ │ │ │ - pinhole camera. │ │ │ │ -  │ │ │ │ -template> │ │ │ │ - _P_i_n_h_o_l_e_C_a_m_e_r_a< _C_a_l_3___S_2 >:: ggttssaamm::::uunnddiissttoorrttMMeeaassuurreemmeennttss (const │ │ │ │ - MeasurementVector  _C_a_m_e_r_a_S_e_t< _P_i_n_h_o_l_e_C_a_m_e_r_a< _C_a_l_3___S_2 > > │ │ │ │ - &cameras, const _P_i_n_h_o_l_e_C_a_m_e_r_a< _C_a_l_3___S_2 │ │ │ │ - >::MeasurementVector &measurements) │ │ │ │ -  Specialize for _C_a_l_3___S_2 to do nothing. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - SphericalCamera::MeasurementVector  ggttssaamm::::uunnddiissttoorrttMMeeaassuurreemmeennttss (const │ │ │ │ - _C_a_m_e_r_a_S_e_t< _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a > &cameras, │ │ │ │ - const SphericalCamera:: │ │ │ │ - MeasurementVector &measurements) │ │ │ │ -  Specialize for _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a to do │ │ │ │ - nothing. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - Point3Vector  _g_t_s_a_m_:_:_c_a_l_i_b_r_a_t_e_M_e_a_s_u_r_e_m_e_n_t_s_S_h_a_r_e_d │ │ │ │ - (const CALIBRATION &cal, const │ │ │ │ - Point2Vector &measurements) │ │ │ │ - Convert pixel measurements in image to │ │ │ │ -  homogeneous measurements in the image │ │ │ │ - plane using shared camera intrinsics. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - Point3Vector  _g_t_s_a_m_:_:_c_a_l_i_b_r_a_t_e_M_e_a_s_u_r_e_m_e_n_t_s (const │ │ │ │ - _C_a_m_e_r_a_S_e_t< CAMERA > &cameras, const │ │ │ │ - typename CAMERA::MeasurementVector │ │ │ │ - &measurements) │ │ │ │ - Convert pixel measurements in image to │ │ │ │ -  homogeneous measurements in the image │ │ │ │ - plane using camera intrinsics of each │ │ │ │ - measurement. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - Point3Vector  ggttssaamm::::ccaalliibbrraatteeMMeeaassuurreemmeennttss (const │ │ │ │ - _C_a_m_e_r_a_S_e_t< _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a > &cameras, │ │ │ │ - const SphericalCamera:: │ │ │ │ - MeasurementVector &measurements) │ │ │ │ -  Specialize for _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a to do │ │ │ │ - nothing. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _P_o_i_n_t_3  _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_P_o_i_n_t_3 (const std:: │ │ │ │ - vector< _P_o_s_e_3 > &poses, boost:: │ │ │ │ - shared_ptr< CALIBRATION > sharedCal, │ │ │ │ - const Point2Vector &measurements, │ │ │ │ - double rank_tol=1e-9, bool │ │ │ │ - _o_p_t_i_m_i_z_e=false, const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l │ │ │ │ - &model=nullptr, const bool │ │ │ │ - useLOST=false) │ │ │ │ - Function to triangulate 3D landmark │ │ │ │ -  point from an arbitrary number of poses │ │ │ │ - (at least 2) using the DLT. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _P_o_i_n_t_3  _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_P_o_i_n_t_3 (const │ │ │ │ - _C_a_m_e_r_a_S_e_t< CAMERA > &cameras, const │ │ │ │ - typename CAMERA::MeasurementVector │ │ │ │ - &measurements, double rank_tol=1e-9, │ │ │ │ - bool _o_p_t_i_m_i_z_e=false, const │ │ │ │ - _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model=nullptr, const │ │ │ │ - bool useLOST=false) │ │ │ │ - Function to triangulate 3D landmark │ │ │ │ -  point from an arbitrary number of poses │ │ │ │ - (at least 2) using the DLT. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _P_o_i_n_t_3  ggttssaamm::::ttrriiaanngguullaatteePPooiinntt33 (const │ │ │ │ - _C_a_m_e_r_a_S_e_t< _P_i_n_h_o_l_e_C_a_m_e_r_a< CALIBRATION > │ │ │ │ - > &cameras, const Point2Vector │ │ │ │ - &measurements, double rank_tol=1e-9, │ │ │ │ - bool _o_p_t_i_m_i_z_e=false, const │ │ │ │ - _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model=nullptr, const │ │ │ │ - bool useLOST=false) │ │ │ │ -  Pinhole-specific version. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t  ggttssaamm::::ttrriiaanngguullaatteeSSaaffee (const │ │ │ │ - _C_a_m_e_r_a_S_e_t< CAMERA > &cameras, const │ │ │ │ - typename CAMERA::MeasurementVector │ │ │ │ - &measured, const │ │ │ │ - _T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s ¶ms) │ │ │ │ -  triangulateSafe: extensive checking of │ │ │ │ - the outcome │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Functions for triangulation. │ │ │ │ - Date │ │ │ │ - July 31, 2013 │ │ │ │ - Author │ │ │ │ - Chris Beall │ │ │ │ - Akshay Krishnan │ │ │ │ - Date │ │ │ │ - July 31, 2013 │ │ │ │ +A CameraSet of either CalibratedCamera, PinholePose, or PinholeCamera. │ │ │ │ Author │ │ │ │ - Chris Beall │ │ │ │ - Luca Carlone │ │ │ │ - Akshay Krishnan │ │ │ │ + Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _t_r_i_a_n_g_u_l_a_t_i_o_n_._h │ │ │ │ + * _P_i_n_h_o_l_e_S_e_t_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00275.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,30 +1,5 @@ │ │ │ │ var a00275 = [ │ │ │ │ - ["gtsam::TriangulationUnderconstrainedException", "a03364.html", null], │ │ │ │ - ["gtsam::TriangulationCheiralityException", "a03368.html", null], │ │ │ │ - ["gtsam::TriangulationParameters", "a03372.html", "a03372"], │ │ │ │ - ["gtsam::TriangulationResult", "a03376.html", "a03376"], │ │ │ │ - ["calibrateMeasurements", "a00275.html#aebe53b43e5151ce9c355b4aa4ba57c13", null], │ │ │ │ - ["calibrateMeasurements", "a00275.html#a48ad2c1085fcae3881fa956f4cd81890", null], │ │ │ │ - ["calibrateMeasurementsShared", "a00275.html#a0a386184e9ed9cc4ec844d48d91ba759", null], │ │ │ │ - ["createPinholeCalibration", "a00275.html#a3d070e707c4b2d69d0f024a30501f06c", null], │ │ │ │ - ["optimize", "a00275.html#a4b0057879b0c5f323185452b0d1a4232", null], │ │ │ │ - ["triangulateDLT", "a00275.html#aed2918ac0049316bf09f96879efca3b6", null], │ │ │ │ - ["triangulateDLT", "a00275.html#a523a0528f883f1c569a8a4c9a0e514a0", null], │ │ │ │ - ["triangulateHomogeneousDLT", "a00275.html#af378e231b519e8bb1f09f4aa13a38dca", null], │ │ │ │ - ["triangulateHomogeneousDLT", "a00275.html#a8d16887f8890aaf7ceb5e3cbb181a191", null], │ │ │ │ - ["triangulateLOST", "a00275.html#a0f9e5111ffc481b34f0123418b0ecd13", null], │ │ │ │ - ["triangulateNonlinear", "a00275.html#a13ac0858b6f6600f5a4242aeb797692f", null], │ │ │ │ - ["triangulateNonlinear", "a00275.html#a9dab6b5829b51511735b6b841bb36a36", null], │ │ │ │ - ["triangulatePoint3", "a00275.html#a58f4009e3a8872d0ac6780d654cccc2e", null], │ │ │ │ - ["triangulatePoint3", "a00275.html#aac6df5bbfb7131cbb05e2a9691e59ba3", null], │ │ │ │ - ["triangulatePoint3", "a00275.html#ab79854d3cb3bcc4f562fc88a0731a447", null], │ │ │ │ - ["triangulateSafe", "a00275.html#a8d52d7d8a5e5c8d7318ce95ee57e9cfa", null], │ │ │ │ - ["triangulationGraph", "a00275.html#a2b96bc32f3c5c436db3fe60e5139319e", null], │ │ │ │ - ["triangulationGraph", "a00275.html#ad167fac94fa72c0d3b8db36e5fa2becb", null], │ │ │ │ - ["undistortMeasurementInternal", "a00275.html#a46a14c34d729a626825e4eff8a7de8dd", null], │ │ │ │ - ["undistortMeasurements", "a00275.html#af01b2988c1bb89268ad572ea7d7ba293", null], │ │ │ │ - ["undistortMeasurements", "a00275.html#a31e52d463db397f0dda1a13352ab217c", null], │ │ │ │ - ["undistortMeasurements", "a00275.html#a1a0e4ac1b773cc295daae7849c833876", null], │ │ │ │ - ["undistortMeasurements", "a00275.html#a7f3d15de99fffcc537089fa1440d8ca2", null], │ │ │ │ - ["undistortMeasurements", "a00275.html#a6a1849035b3acd163d6de715e7683ebf", null] │ │ │ │ + ["gtsam::PinholeSet< CAMERA >", "a03136.html", "a03136"], │ │ │ │ + ["gtsam::traits< PinholeSet< CAMERA > >", "a03140.html", null], │ │ │ │ + ["gtsam::traits< const PinholeSet< CAMERA > >", "a03144.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00275_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/triangulation.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/PinholeSet.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,675 +98,117 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    triangulation.h
    │ │ │ +
    PinholeSet.h
    │ │ │
    │ │ │
    │ │ │ Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │
    4 * Atlanta, Georgia 30332-0415
    │ │ │
    5 * All Rights Reserved
    │ │ │
    6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
    │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │ -
    21#pragma once
    │ │ │ -
    22
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
    34#include <gtsam/slam/TriangulationFactor.h>
    │ │ │ +
    18#pragma once
    │ │ │ +
    19
    │ │ │ + │ │ │ + │ │ │ +
    22#include <boost/optional.hpp>
    │ │ │ +
    23
    │ │ │ +
    24namespace gtsam {
    │ │ │ +
    25
    │ │ │ +
    29template<class CAMERA>
    │ │ │ +
    │ │ │ +
    30class PinholeSet: public CameraSet<CAMERA> {
    │ │ │ +
    31
    │ │ │ +
    32private:
    │ │ │ +
    33 typedef CameraSet<CAMERA> Base;
    │ │ │ +
    34 typedef PinholeSet<CAMERA> This;
    │ │ │
    35
    │ │ │ -
    36namespace gtsam {
    │ │ │ +
    36protected:
    │ │ │
    37
    │ │ │ -
    │ │ │ -
    39class GTSAM_EXPORT TriangulationUnderconstrainedException: public std::runtime_error {
    │ │ │ -
    40public:
    │ │ │ - │ │ │ -
    42 std::runtime_error("Triangulation Underconstrained Exception.") {
    │ │ │ -
    43 }
    │ │ │ -
    44};
    │ │ │ -
    │ │ │ -
    45
    │ │ │ -
    │ │ │ -
    47class GTSAM_EXPORT TriangulationCheiralityException: public std::runtime_error {
    │ │ │ -
    48public:
    │ │ │ - │ │ │ -
    50 std::runtime_error(
    │ │ │ -
    51 "Triangulation Cheirality Exception: The resulting landmark is behind one or more cameras.") {
    │ │ │ -
    52 }
    │ │ │ -
    53};
    │ │ │ -
    │ │ │ -
    54
    │ │ │ -
    62GTSAM_EXPORT Vector4 triangulateHomogeneousDLT(
    │ │ │ -
    63 const std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>>& projection_matrices,
    │ │ │ -
    64 const Point2Vector& measurements, double rank_tol = 1e-9);
    │ │ │ +
    38public:
    │ │ │ +
    39
    │ │ │ +
    │ │ │ +
    41 virtual ~PinholeSet() {
    │ │ │ +
    42 }
    │ │ │ +
    │ │ │ +
    43
    │ │ │ +
    46
    │ │ │ +
    │ │ │ +
    48 void print(const std::string& s = "") const override {
    │ │ │ +
    49 Base::print(s);
    │ │ │ +
    50 }
    │ │ │ +
    │ │ │ +
    51
    │ │ │ +
    │ │ │ +
    53 bool equals(const PinholeSet& p, double tol = 1e-9) const {
    │ │ │ +
    54 return Base::equals(p, tol); // TODO all flags
    │ │ │ +
    55 }
    │ │ │ +
    │ │ │ +
    56
    │ │ │ +
    58
    │ │ │ +
    │ │ │ + │ │ │ +
    61 const typename CAMERA::MeasurementVector& measured,
    │ │ │ +
    62 const TriangulationParameters& params) const {
    │ │ │ +
    63 return gtsam::triangulateSafe(*this, measured, params);
    │ │ │ +
    64 }
    │ │ │ +
    │ │ │
    65
    │ │ │ -
    74GTSAM_EXPORT Vector4 triangulateHomogeneousDLT(
    │ │ │ -
    75 const std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>>& projection_matrices,
    │ │ │ -
    76 const std::vector<Unit3>& measurements, double rank_tol = 1e-9);
    │ │ │ -
    77
    │ │ │ -
    85GTSAM_EXPORT Point3 triangulateDLT(
    │ │ │ -
    86 const std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>>& projection_matrices,
    │ │ │ -
    87 const Point2Vector& measurements,
    │ │ │ -
    88 double rank_tol = 1e-9);
    │ │ │ -
    89
    │ │ │ -
    93GTSAM_EXPORT Point3 triangulateDLT(
    │ │ │ -
    94 const std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>>& projection_matrices,
    │ │ │ -
    95 const std::vector<Unit3>& measurements,
    │ │ │ -
    96 double rank_tol = 1e-9);
    │ │ │ -
    97
    │ │ │ -
    108GTSAM_EXPORT Point3 triangulateLOST(const std::vector<Pose3>& poses,
    │ │ │ -
    109 const Point3Vector& calibratedMeasurements,
    │ │ │ -
    110 const SharedIsotropic& measurementNoise);
    │ │ │ -
    111
    │ │ │ -
    121template<class CALIBRATION>
    │ │ │ -
    │ │ │ -
    122std::pair<NonlinearFactorGraph, Values> triangulationGraph(
    │ │ │ -
    123 const std::vector<Pose3>& poses, boost::shared_ptr<CALIBRATION> sharedCal,
    │ │ │ -
    124 const Point2Vector& measurements, Key landmarkKey,
    │ │ │ -
    125 const Point3& initialEstimate,
    │ │ │ -
    126 const SharedNoiseModel& model = noiseModel::Unit::Create(2)) {
    │ │ │ -
    127 Values values;
    │ │ │ -
    128 values.insert(landmarkKey, initialEstimate); // Initial landmark value
    │ │ │ - │ │ │ -
    130 for (size_t i = 0; i < measurements.size(); i++) {
    │ │ │ -
    131 const Pose3& pose_i = poses[i];
    │ │ │ -
    132 typedef PinholePose<CALIBRATION> Camera;
    │ │ │ -
    133 Camera camera_i(pose_i, sharedCal);
    │ │ │ -
    134 graph.emplace_shared<TriangulationFactor<Camera> > //
    │ │ │ -
    135 (camera_i, measurements[i], model, landmarkKey);
    │ │ │ -
    136 }
    │ │ │ -
    137 return std::make_pair(graph, values);
    │ │ │ -
    138}
    │ │ │ -
    │ │ │ -
    139
    │ │ │ -
    149template<class CAMERA>
    │ │ │ -
    │ │ │ -
    150std::pair<NonlinearFactorGraph, Values> triangulationGraph(
    │ │ │ -
    151 const CameraSet<CAMERA>& cameras,
    │ │ │ -
    152 const typename CAMERA::MeasurementVector& measurements, Key landmarkKey,
    │ │ │ -
    153 const Point3& initialEstimate,
    │ │ │ -
    154 const SharedNoiseModel& model = nullptr) {
    │ │ │ -
    155 Values values;
    │ │ │ -
    156 values.insert(landmarkKey, initialEstimate); // Initial landmark value
    │ │ │ - │ │ │ - │ │ │ - │ │ │ -
    160 for (size_t i = 0; i < measurements.size(); i++) {
    │ │ │ -
    161 const CAMERA& camera_i = cameras[i];
    │ │ │ -
    162 graph.emplace_shared<TriangulationFactor<CAMERA> > //
    │ │ │ -
    163 (camera_i, measurements[i], model? model : unit, landmarkKey);
    │ │ │ -
    164 }
    │ │ │ -
    165 return std::make_pair(graph, values);
    │ │ │ -
    166}
    │ │ │ -
    │ │ │ -
    167
    │ │ │ -
    175GTSAM_EXPORT Point3 optimize(const NonlinearFactorGraph& graph,
    │ │ │ -
    176 const Values& values, Key landmarkKey);
    │ │ │ -
    177
    │ │ │ -
    186template<class CALIBRATION>
    │ │ │ -
    │ │ │ -
    187Point3 triangulateNonlinear(const std::vector<Pose3>& poses,
    │ │ │ -
    188 boost::shared_ptr<CALIBRATION> sharedCal,
    │ │ │ -
    189 const Point2Vector& measurements, const Point3& initialEstimate,
    │ │ │ -
    190 const SharedNoiseModel& model = nullptr) {
    │ │ │ -
    191
    │ │ │ -
    192 // Create a factor graph and initial values
    │ │ │ -
    193 Values values;
    │ │ │ - │ │ │ -
    195 boost::tie(graph, values) = triangulationGraph<CALIBRATION> //
    │ │ │ -
    196 (poses, sharedCal, measurements, Symbol('p', 0), initialEstimate, model);
    │ │ │ -
    197
    │ │ │ -
    198 return optimize(graph, values, Symbol('p', 0));
    │ │ │ -
    199}
    │ │ │ -
    │ │ │ -
    200
    │ │ │ -
    208template<class CAMERA>
    │ │ │ -
    │ │ │ - │ │ │ -
    210 const CameraSet<CAMERA>& cameras,
    │ │ │ -
    211 const typename CAMERA::MeasurementVector& measurements, const Point3& initialEstimate,
    │ │ │ -
    212 const SharedNoiseModel& model = nullptr) {
    │ │ │ -
    213
    │ │ │ -
    214 // Create a factor graph and initial values
    │ │ │ -
    215 Values values;
    │ │ │ - │ │ │ -
    217 boost::tie(graph, values) = triangulationGraph<CAMERA> //
    │ │ │ -
    218 (cameras, measurements, Symbol('p', 0), initialEstimate, model);
    │ │ │ -
    219
    │ │ │ -
    220 return optimize(graph, values, Symbol('p', 0));
    │ │ │ -
    221}
    │ │ │ -
    │ │ │ -
    222
    │ │ │ -
    223template<class CAMERA>
    │ │ │ -
    224std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>>
    │ │ │ -
    225projectionMatricesFromCameras(const CameraSet<CAMERA> &cameras) {
    │ │ │ -
    226 std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>> projection_matrices;
    │ │ │ -
    227 for (const CAMERA &camera: cameras) {
    │ │ │ -
    228 projection_matrices.push_back(camera.cameraProjectionMatrix());
    │ │ │ -
    229 }
    │ │ │ -
    230 return projection_matrices;
    │ │ │ -
    231}
    │ │ │ -
    232
    │ │ │ -
    233// overload, assuming pinholePose
    │ │ │ -
    234template<class CALIBRATION>
    │ │ │ -
    235std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>> projectionMatricesFromPoses(
    │ │ │ -
    236 const std::vector<Pose3> &poses, boost::shared_ptr<CALIBRATION> sharedCal) {
    │ │ │ -
    237 std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>> projection_matrices;
    │ │ │ -
    238 for (size_t i = 0; i < poses.size(); i++) {
    │ │ │ -
    239 PinholePose<CALIBRATION> camera(poses.at(i), sharedCal);
    │ │ │ -
    240 projection_matrices.push_back(camera.cameraProjectionMatrix());
    │ │ │ -
    241 }
    │ │ │ -
    242 return projection_matrices;
    │ │ │ -
    243}
    │ │ │ -
    244
    │ │ │ -
    252template <class CALIBRATION>
    │ │ │ -
    │ │ │ -
    253Cal3_S2 createPinholeCalibration(const CALIBRATION& cal) {
    │ │ │ -
    254 const auto& K = cal.K();
    │ │ │ -
    255 return Cal3_S2(K(0, 0), K(1, 1), K(0, 1), K(0, 2), K(1, 2));
    │ │ │ -
    256}
    │ │ │ -
    │ │ │ -
    257
    │ │ │ -
    260template <class CALIBRATION, class MEASUREMENT>
    │ │ │ -
    │ │ │ - │ │ │ -
    262 const CALIBRATION& cal, const MEASUREMENT& measurement,
    │ │ │ -
    263 boost::optional<Cal3_S2> pinholeCal = boost::none) {
    │ │ │ -
    264 if (!pinholeCal) {
    │ │ │ -
    265 pinholeCal = createPinholeCalibration(cal);
    │ │ │ -
    266 }
    │ │ │ -
    267 return pinholeCal->uncalibrate(cal.calibrate(measurement));
    │ │ │ -
    268}
    │ │ │ -
    │ │ │ -
    269
    │ │ │ -
    281template <class CALIBRATION>
    │ │ │ -
    │ │ │ -
    282Point2Vector undistortMeasurements(const CALIBRATION& cal,
    │ │ │ -
    283 const Point2Vector& measurements) {
    │ │ │ -
    284 Cal3_S2 pinholeCalibration = createPinholeCalibration(cal);
    │ │ │ -
    285 Point2Vector undistortedMeasurements;
    │ │ │ -
    286 // Calibrate with cal and uncalibrate with pinhole version of cal so that
    │ │ │ -
    287 // measurements are undistorted.
    │ │ │ -
    288 std::transform(measurements.begin(), measurements.end(),
    │ │ │ -
    289 std::back_inserter(undistortedMeasurements),
    │ │ │ -
    290 [&cal, &pinholeCalibration](const Point2& measurement) {
    │ │ │ -
    291 return undistortMeasurementInternal<CALIBRATION>(
    │ │ │ -
    292 cal, measurement, pinholeCalibration);
    │ │ │ -
    293 });
    │ │ │ -
    294 return undistortedMeasurements;
    │ │ │ -
    295}
    │ │ │ -
    │ │ │ -
    296
    │ │ │ -
    298template <>
    │ │ │ -
    │ │ │ -
    299inline Point2Vector undistortMeasurements(const Cal3_S2& cal,
    │ │ │ -
    300 const Point2Vector& measurements) {
    │ │ │ -
    301 return measurements;
    │ │ │ -
    302}
    │ │ │ -
    │ │ │ -
    303
    │ │ │ -
    315template <class CAMERA>
    │ │ │ -
    │ │ │ -
    316typename CAMERA::MeasurementVector undistortMeasurements(
    │ │ │ -
    317 const CameraSet<CAMERA>& cameras,
    │ │ │ -
    318 const typename CAMERA::MeasurementVector& measurements) {
    │ │ │ -
    319 const size_t nrMeasurements = measurements.size();
    │ │ │ -
    320 assert(nrMeasurements == cameras.size());
    │ │ │ -
    321 typename CAMERA::MeasurementVector undistortedMeasurements(nrMeasurements);
    │ │ │ -
    322 for (size_t ii = 0; ii < nrMeasurements; ++ii) {
    │ │ │ -
    323 // Calibrate with cal and uncalibrate with pinhole version of cal so that
    │ │ │ -
    324 // measurements are undistorted.
    │ │ │ -
    325 undistortedMeasurements[ii] =
    │ │ │ -
    326 undistortMeasurementInternal<typename CAMERA::CalibrationType>(
    │ │ │ -
    327 cameras[ii].calibration(), measurements[ii]);
    │ │ │ -
    328 }
    │ │ │ -
    329 return undistortedMeasurements;
    │ │ │ -
    330}
    │ │ │ -
    │ │ │ -
    331
    │ │ │ -
    333template <class CAMERA = PinholeCamera<Cal3_S2>>
    │ │ │ -
    │ │ │ -
    334inline PinholeCamera<Cal3_S2>::MeasurementVector undistortMeasurements(
    │ │ │ -
    335 const CameraSet<PinholeCamera<Cal3_S2>>& cameras,
    │ │ │ -
    336 const PinholeCamera<Cal3_S2>::MeasurementVector& measurements) {
    │ │ │ -
    337 return measurements;
    │ │ │ -
    338}
    │ │ │ -
    │ │ │ -
    339
    │ │ │ -
    341template <class CAMERA = SphericalCamera>
    │ │ │ -
    │ │ │ -
    342inline SphericalCamera::MeasurementVector undistortMeasurements(
    │ │ │ -
    343 const CameraSet<SphericalCamera>& cameras,
    │ │ │ -
    344 const SphericalCamera::MeasurementVector& measurements) {
    │ │ │ -
    345 return measurements;
    │ │ │ -
    346}
    │ │ │ -
    │ │ │ -
    347
    │ │ │ -
    356template <class CALIBRATION>
    │ │ │ -
    │ │ │ -
    357inline Point3Vector calibrateMeasurementsShared(
    │ │ │ -
    358 const CALIBRATION& cal, const Point2Vector& measurements) {
    │ │ │ -
    359 Point3Vector calibratedMeasurements;
    │ │ │ -
    360 // Calibrate with cal and uncalibrate with pinhole version of cal so that
    │ │ │ -
    361 // measurements are undistorted.
    │ │ │ -
    362 std::transform(measurements.begin(), measurements.end(),
    │ │ │ -
    363 std::back_inserter(calibratedMeasurements),
    │ │ │ -
    364 [&cal](const Point2& measurement) {
    │ │ │ -
    365 Point3 p;
    │ │ │ -
    366 p << cal.calibrate(measurement), 1.0;
    │ │ │ -
    367 return p;
    │ │ │ -
    368 });
    │ │ │ -
    369 return calibratedMeasurements;
    │ │ │ -
    370}
    │ │ │ -
    │ │ │ -
    371
    │ │ │ -
    380template <class CAMERA>
    │ │ │ -
    │ │ │ -
    381inline Point3Vector calibrateMeasurements(
    │ │ │ -
    382 const CameraSet<CAMERA>& cameras,
    │ │ │ -
    383 const typename CAMERA::MeasurementVector& measurements) {
    │ │ │ -
    384 const size_t nrMeasurements = measurements.size();
    │ │ │ -
    385 assert(nrMeasurements == cameras.size());
    │ │ │ -
    386 Point3Vector calibratedMeasurements(nrMeasurements);
    │ │ │ -
    387 for (size_t ii = 0; ii < nrMeasurements; ++ii) {
    │ │ │ -
    388 calibratedMeasurements[ii]
    │ │ │ -
    389 << cameras[ii].calibration().calibrate(measurements[ii]),
    │ │ │ -
    390 1.0;
    │ │ │ -
    391 }
    │ │ │ -
    392 return calibratedMeasurements;
    │ │ │ -
    393}
    │ │ │ -
    │ │ │ -
    394
    │ │ │ -
    396template <class CAMERA = SphericalCamera>
    │ │ │ -
    │ │ │ -
    397inline Point3Vector calibrateMeasurements(
    │ │ │ -
    398 const CameraSet<SphericalCamera>& cameras,
    │ │ │ -
    399 const SphericalCamera::MeasurementVector& measurements) {
    │ │ │ -
    400 Point3Vector calibratedMeasurements(measurements.size());
    │ │ │ -
    401 for (size_t ii = 0; ii < measurements.size(); ++ii) {
    │ │ │ -
    402 calibratedMeasurements[ii] << measurements[ii].point3();
    │ │ │ -
    403 }
    │ │ │ -
    404 return calibratedMeasurements;
    │ │ │ -
    405}
    │ │ │ -
    │ │ │ -
    406
    │ │ │ -
    420template <class CALIBRATION>
    │ │ │ -
    │ │ │ -
    421Point3 triangulatePoint3(const std::vector<Pose3>& poses,
    │ │ │ -
    422 boost::shared_ptr<CALIBRATION> sharedCal,
    │ │ │ -
    423 const Point2Vector& measurements,
    │ │ │ -
    424 double rank_tol = 1e-9, bool optimize = false,
    │ │ │ -
    425 const SharedNoiseModel& model = nullptr,
    │ │ │ -
    426 const bool useLOST = false) {
    │ │ │ -
    427 assert(poses.size() == measurements.size());
    │ │ │ -
    428 if (poses.size() < 2) throw(TriangulationUnderconstrainedException());
    │ │ │ -
    429
    │ │ │ -
    430 // Triangulate linearly
    │ │ │ -
    431 Point3 point;
    │ │ │ -
    432 if (useLOST) {
    │ │ │ -
    433 // Reduce input noise model to an isotropic noise model using the mean of
    │ │ │ -
    434 // the diagonal.
    │ │ │ -
    435 const double measurementSigma = model ? model->sigmas().mean() : 1e-4;
    │ │ │ -
    436 SharedIsotropic measurementNoise =
    │ │ │ -
    437 noiseModel::Isotropic::Sigma(2, measurementSigma);
    │ │ │ -
    438 // calibrate the measurements to obtain homogenous coordinates in image
    │ │ │ -
    439 // plane.
    │ │ │ -
    440 auto calibratedMeasurements =
    │ │ │ -
    441 calibrateMeasurementsShared<CALIBRATION>(*sharedCal, measurements);
    │ │ │ -
    442
    │ │ │ -
    443 point = triangulateLOST(poses, calibratedMeasurements, measurementNoise);
    │ │ │ -
    444 } else {
    │ │ │ -
    445 // construct projection matrices from poses & calibration
    │ │ │ -
    446 auto projection_matrices = projectionMatricesFromPoses(poses, sharedCal);
    │ │ │ -
    447
    │ │ │ -
    448 // Undistort the measurements, leaving only the pinhole elements in effect.
    │ │ │ -
    449 auto undistortedMeasurements =
    │ │ │ -
    450 undistortMeasurements<CALIBRATION>(*sharedCal, measurements);
    │ │ │ -
    451
    │ │ │ -
    452 point =
    │ │ │ -
    453 triangulateDLT(projection_matrices, undistortedMeasurements, rank_tol);
    │ │ │ -
    454 }
    │ │ │ -
    455
    │ │ │ -
    456 // Then refine using non-linear optimization
    │ │ │ -
    457 if (optimize)
    │ │ │ -
    458 point = triangulateNonlinear<CALIBRATION> //
    │ │ │ -
    459 (poses, sharedCal, measurements, point, model);
    │ │ │ -
    460
    │ │ │ -
    461#ifdef GTSAM_THROW_CHEIRALITY_EXCEPTION
    │ │ │ -
    462 // verify that the triangulated point lies in front of all cameras
    │ │ │ -
    463 for (const Pose3& pose : poses) {
    │ │ │ -
    464 const Point3& p_local = pose.transformTo(point);
    │ │ │ -
    465 if (p_local.z() <= 0) throw(TriangulationCheiralityException());
    │ │ │ -
    466 }
    │ │ │ -
    467#endif
    │ │ │ -
    468
    │ │ │ -
    469 return point;
    │ │ │ -
    470}
    │ │ │ -
    │ │ │ -
    471
    │ │ │ -
    486template <class CAMERA>
    │ │ │ -
    │ │ │ - │ │ │ -
    488 const typename CAMERA::MeasurementVector& measurements,
    │ │ │ -
    489 double rank_tol = 1e-9, bool optimize = false,
    │ │ │ -
    490 const SharedNoiseModel& model = nullptr,
    │ │ │ -
    491 const bool useLOST = false) {
    │ │ │ -
    492 size_t m = cameras.size();
    │ │ │ -
    493 assert(measurements.size() == m);
    │ │ │ -
    494
    │ │ │ -
    495 if (m < 2) throw(TriangulationUnderconstrainedException());
    │ │ │ -
    496
    │ │ │ -
    497 // Triangulate linearly
    │ │ │ -
    498 Point3 point;
    │ │ │ -
    499 if (useLOST) {
    │ │ │ -
    500 // Reduce input noise model to an isotropic noise model using the mean of
    │ │ │ -
    501 // the diagonal.
    │ │ │ -
    502 const double measurementSigma = model ? model->sigmas().mean() : 1e-4;
    │ │ │ -
    503 SharedIsotropic measurementNoise =
    │ │ │ -
    504 noiseModel::Isotropic::Sigma(2, measurementSigma);
    │ │ │ -
    505
    │ │ │ -
    506 // construct poses from cameras.
    │ │ │ -
    507 std::vector<Pose3> poses;
    │ │ │ -
    508 poses.reserve(cameras.size());
    │ │ │ -
    509 for (const auto& camera : cameras) poses.push_back(camera.pose());
    │ │ │ -
    510
    │ │ │ -
    511 // calibrate the measurements to obtain homogenous coordinates in image
    │ │ │ -
    512 // plane.
    │ │ │ -
    513 auto calibratedMeasurements =
    │ │ │ -
    514 calibrateMeasurements<CAMERA>(cameras, measurements);
    │ │ │ -
    515
    │ │ │ -
    516 point = triangulateLOST(poses, calibratedMeasurements, measurementNoise);
    │ │ │ -
    517 } else {
    │ │ │ -
    518 // construct projection matrices from poses & calibration
    │ │ │ -
    519 auto projection_matrices = projectionMatricesFromCameras(cameras);
    │ │ │ -
    520
    │ │ │ -
    521 // Undistort the measurements, leaving only the pinhole elements in effect.
    │ │ │ -
    522 auto undistortedMeasurements =
    │ │ │ -
    523 undistortMeasurements<CAMERA>(cameras, measurements);
    │ │ │ -
    524
    │ │ │ -
    525 point =
    │ │ │ -
    526 triangulateDLT(projection_matrices, undistortedMeasurements, rank_tol);
    │ │ │ -
    527 }
    │ │ │ -
    528
    │ │ │ -
    529 // Then refine using non-linear optimization
    │ │ │ -
    530 if (optimize) {
    │ │ │ -
    531 point = triangulateNonlinear<CAMERA>(cameras, measurements, point, model);
    │ │ │ -
    532 }
    │ │ │ -
    533
    │ │ │ -
    534#ifdef GTSAM_THROW_CHEIRALITY_EXCEPTION
    │ │ │ -
    535 // verify that the triangulated point lies in front of all cameras
    │ │ │ -
    536 for (const CAMERA& camera : cameras) {
    │ │ │ -
    537 const Point3& p_local = camera.pose().transformTo(point);
    │ │ │ -
    538 if (p_local.z() <= 0) throw(TriangulationCheiralityException());
    │ │ │ -
    539 }
    │ │ │ -
    540#endif
    │ │ │ -
    541
    │ │ │ -
    542 return point;
    │ │ │ -
    543}
    │ │ │ -
    │ │ │ -
    544
    │ │ │ -
    546template <class CALIBRATION>
    │ │ │ -
    │ │ │ - │ │ │ -
    548 const Point2Vector& measurements,
    │ │ │ -
    549 double rank_tol = 1e-9, bool optimize = false,
    │ │ │ -
    550 const SharedNoiseModel& model = nullptr,
    │ │ │ -
    551 const bool useLOST = false) {
    │ │ │ -
    552 return triangulatePoint3<PinholeCamera<CALIBRATION>> //
    │ │ │ -
    553 (cameras, measurements, rank_tol, optimize, model, useLOST);
    │ │ │ -
    554}
    │ │ │ -
    │ │ │ -
    555
    │ │ │ -
    │ │ │ -
    556struct GTSAM_EXPORT TriangulationParameters {
    │ │ │ -
    557
    │ │ │ - │ │ │ - │ │ │ -
    561
    │ │ │ - │ │ │ -
    567
    │ │ │ - │ │ │ -
    574
    │ │ │ - │ │ │ -
    576
    │ │ │ -
    │ │ │ -
    586 TriangulationParameters(const double _rankTolerance = 1.0,
    │ │ │ -
    587 const bool _enableEPI = false, double _landmarkDistanceThreshold = -1,
    │ │ │ -
    588 double _dynamicOutlierRejectionThreshold = -1,
    │ │ │ -
    589 const SharedNoiseModel& _noiseModel = nullptr) :
    │ │ │ -
    590 rankTolerance(_rankTolerance), enableEPI(_enableEPI), //
    │ │ │ -
    591 landmarkDistanceThreshold(_landmarkDistanceThreshold), //
    │ │ │ -
    592 dynamicOutlierRejectionThreshold(_dynamicOutlierRejectionThreshold),
    │ │ │ -
    593 noiseModel(_noiseModel){
    │ │ │ -
    594 }
    │ │ │ -
    │ │ │ -
    595
    │ │ │ -
    596 // stream to output
    │ │ │ -
    597 friend std::ostream &operator<<(std::ostream &os,
    │ │ │ -
    598 const TriangulationParameters& p) {
    │ │ │ -
    599 os << "rankTolerance = " << p.rankTolerance << std::endl;
    │ │ │ -
    600 os << "enableEPI = " << p.enableEPI << std::endl;
    │ │ │ -
    601 os << "landmarkDistanceThreshold = " << p.landmarkDistanceThreshold
    │ │ │ -
    602 << std::endl;
    │ │ │ -
    603 os << "dynamicOutlierRejectionThreshold = "
    │ │ │ -
    604 << p.dynamicOutlierRejectionThreshold << std::endl;
    │ │ │ -
    605 os << "noise model" << std::endl;
    │ │ │ -
    606 return os;
    │ │ │ -
    607 }
    │ │ │ -
    608
    │ │ │ -
    609private:
    │ │ │ -
    610
    │ │ │ -
    612 friend class boost::serialization::access;
    │ │ │ -
    613 template<class ARCHIVE>
    │ │ │ -
    614 void serialize(ARCHIVE & ar, const unsigned int version) {
    │ │ │ -
    615 ar & BOOST_SERIALIZATION_NVP(rankTolerance);
    │ │ │ -
    616 ar & BOOST_SERIALIZATION_NVP(enableEPI);
    │ │ │ -
    617 ar & BOOST_SERIALIZATION_NVP(landmarkDistanceThreshold);
    │ │ │ -
    618 ar & BOOST_SERIALIZATION_NVP(dynamicOutlierRejectionThreshold);
    │ │ │ -
    619 }
    │ │ │ -
    620};
    │ │ │ -
    │ │ │ -
    621
    │ │ │ -
    │ │ │ -
    626class TriangulationResult : public boost::optional<Point3> {
    │ │ │ -
    627 public:
    │ │ │ -
    628 enum Status { VALID, DEGENERATE, BEHIND_CAMERA, OUTLIER, FAR_POINT };
    │ │ │ -
    629 Status status;
    │ │ │ -
    630
    │ │ │ -
    631 private:
    │ │ │ -
    632 TriangulationResult(Status s) : status(s) {}
    │ │ │ -
    633
    │ │ │ -
    634 public:
    │ │ │ - │ │ │ -
    639
    │ │ │ -
    643 TriangulationResult(const Point3& p) : status(VALID) { reset(p); }
    │ │ │ -
    644 static TriangulationResult Degenerate() {
    │ │ │ -
    645 return TriangulationResult(DEGENERATE);
    │ │ │ -
    646 }
    │ │ │ -
    647 static TriangulationResult Outlier() { return TriangulationResult(OUTLIER); }
    │ │ │ -
    648 static TriangulationResult FarPoint() {
    │ │ │ -
    649 return TriangulationResult(FAR_POINT);
    │ │ │ -
    650 }
    │ │ │ -
    651 static TriangulationResult BehindCamera() {
    │ │ │ -
    652 return TriangulationResult(BEHIND_CAMERA);
    │ │ │ -
    653 }
    │ │ │ -
    654 bool valid() const { return status == VALID; }
    │ │ │ -
    655 bool degenerate() const { return status == DEGENERATE; }
    │ │ │ -
    656 bool outlier() const { return status == OUTLIER; }
    │ │ │ -
    657 bool farPoint() const { return status == FAR_POINT; }
    │ │ │ -
    658 bool behindCamera() const { return status == BEHIND_CAMERA; }
    │ │ │ -
    659 // stream to output
    │ │ │ -
    660 friend std::ostream& operator<<(std::ostream& os,
    │ │ │ -
    661 const TriangulationResult& result) {
    │ │ │ -
    662 if (result)
    │ │ │ -
    663 os << "point = " << *result << std::endl;
    │ │ │ -
    664 else
    │ │ │ -
    665 os << "no point, status = " << result.status << std::endl;
    │ │ │ -
    666 return os;
    │ │ │ -
    667 }
    │ │ │ -
    668
    │ │ │ -
    669 private:
    │ │ │ - │ │ │ -
    672 template <class ARCHIVE>
    │ │ │ -
    673 void serialize(ARCHIVE& ar, const unsigned int version) {
    │ │ │ -
    674 ar& BOOST_SERIALIZATION_NVP(status);
    │ │ │ -
    675 }
    │ │ │ -
    676};
    │ │ │ -
    │ │ │ -
    677
    │ │ │ -
    679template<class CAMERA>
    │ │ │ -
    │ │ │ - │ │ │ -
    681 const typename CAMERA::MeasurementVector& measured,
    │ │ │ -
    682 const TriangulationParameters& params) {
    │ │ │ -
    683
    │ │ │ -
    684 size_t m = cameras.size();
    │ │ │ -
    685
    │ │ │ -
    686 // if we have a single pose the corresponding factor is uninformative
    │ │ │ -
    687 if (m < 2)
    │ │ │ -
    688 return TriangulationResult::Degenerate();
    │ │ │ -
    689 else
    │ │ │ -
    690 // We triangulate the 3D position of the landmark
    │ │ │ -
    691 try {
    │ │ │ -
    692 Point3 point =
    │ │ │ -
    693 triangulatePoint3<CAMERA>(cameras, measured, params.rankTolerance,
    │ │ │ -
    694 params.enableEPI, params.noiseModel);
    │ │ │ -
    695
    │ │ │ -
    696 // Check landmark distance and re-projection errors to avoid outliers
    │ │ │ -
    697 size_t i = 0;
    │ │ │ -
    698 double maxReprojError = 0.0;
    │ │ │ -
    699 for(const CAMERA& camera: cameras) {
    │ │ │ -
    700 const Pose3& pose = camera.pose();
    │ │ │ -
    701 if (params.landmarkDistanceThreshold > 0
    │ │ │ -
    702 && distance3(pose.translation(), point)
    │ │ │ - │ │ │ -
    704 return TriangulationResult::FarPoint();
    │ │ │ -
    705#ifdef GTSAM_THROW_CHEIRALITY_EXCEPTION
    │ │ │ -
    706 // verify that the triangulated point lies in front of all cameras
    │ │ │ -
    707 // Only needed if this was not yet handled by exception
    │ │ │ -
    708 const Point3& p_local = pose.transformTo(point);
    │ │ │ -
    709 if (p_local.z() <= 0)
    │ │ │ -
    710 return TriangulationResult::BehindCamera();
    │ │ │ -
    711#endif
    │ │ │ -
    712 // Check reprojection error
    │ │ │ -
    713 if (params.dynamicOutlierRejectionThreshold > 0) {
    │ │ │ -
    714 const typename CAMERA::Measurement& zi = measured.at(i);
    │ │ │ -
    715 Point2 reprojectionError = camera.reprojectionError(point, zi);
    │ │ │ -
    716 maxReprojError = std::max(maxReprojError, reprojectionError.norm());
    │ │ │ -
    717 }
    │ │ │ -
    718 i += 1;
    │ │ │ -
    719 }
    │ │ │ -
    720 // Flag as degenerate if average reprojection error is too large
    │ │ │ - │ │ │ -
    722 && maxReprojError > params.dynamicOutlierRejectionThreshold)
    │ │ │ -
    723 return TriangulationResult::Outlier();
    │ │ │ -
    724
    │ │ │ -
    725 // all good!
    │ │ │ -
    726 return TriangulationResult(point);
    │ │ │ - │ │ │ -
    728 // This exception is thrown if
    │ │ │ -
    729 // 1) There is a single pose for triangulation - this should not happen because we checked the number of poses before
    │ │ │ -
    730 // 2) The rank of the matrix used for triangulation is < 3: rotation-only, parallel cameras (or motion towards the landmark)
    │ │ │ -
    731 return TriangulationResult::Degenerate();
    │ │ │ - │ │ │ -
    733 // point is behind one of the cameras: can be the case of close-to-parallel cameras or may depend on outliers
    │ │ │ -
    734 return TriangulationResult::BehindCamera();
    │ │ │ -
    735 }
    │ │ │ -
    736}
    │ │ │ -
    │ │ │ -
    737
    │ │ │ -
    738// Vector of Cameras - used by the Python/MATLAB wrapper
    │ │ │ -
    739using CameraSetCal3Bundler = CameraSet<PinholeCamera<Cal3Bundler>>;
    │ │ │ -
    740using CameraSetCal3_S2 = CameraSet<PinholeCamera<Cal3_S2>>;
    │ │ │ -
    741using CameraSetCal3DS2 = CameraSet<PinholeCamera<Cal3DS2>>;
    │ │ │ -
    742using CameraSetCal3Fisheye = CameraSet<PinholeCamera<Cal3Fisheye>>;
    │ │ │ -
    743using CameraSetCal3Unified = CameraSet<PinholeCamera<Cal3Unified>>;
    │ │ │ -
    744using CameraSetSpherical = CameraSet<SphericalCamera>;
    │ │ │ -
    745} // \namespace gtsam
    │ │ │ -
    746
    │ │ │ -
    Calibrated camera with spherical projection.
    │ │ │ -
    2D Pose
    │ │ │ -
    Base class for all pinhole cameras.
    │ │ │ -
    Base class to create smart factors on poses or cameras.
    │ │ │ -
    The most common 5DOF 3D->2D calibration.
    │ │ │ -
    Unified Calibration Model, see Mei07icra for details.
    │ │ │ -
    Calibration of a fisheye camera.
    │ │ │ -
    Calibration of a camera with radial distortion, calculations in base class Cal3DS2_Base.
    │ │ │ -
    Calibration used by Bundler.
    │ │ │ -
    Factor Graph consisting of non-linear factors.
    │ │ │ +
    66private:
    │ │ │ +
    67
    │ │ │ + │ │ │ +
    70 template<class ARCHIVE>
    │ │ │ +
    71 void serialize(ARCHIVE & ar, const unsigned int version) {
    │ │ │ +
    72 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
    │ │ │ +
    73 }
    │ │ │ +
    74};
    │ │ │ +
    │ │ │ +
    75
    │ │ │ +
    76template<class CAMERA>
    │ │ │ +
    │ │ │ +
    77struct traits<PinholeSet<CAMERA> > : public Testable<PinholeSet<CAMERA> > {
    │ │ │ +
    78};
    │ │ │ +
    │ │ │ +
    79
    │ │ │ +
    80template<class CAMERA>
    │ │ │ +
    │ │ │ +
    81struct traits<const PinholeSet<CAMERA> > : public Testable<PinholeSet<CAMERA> > {
    │ │ │ +
    82};
    │ │ │ +
    │ │ │ +
    83
    │ │ │ +
    84} // \ namespace gtsam
    │ │ │ +
    Functions for triangulation.
    │ │ │ +
    Base class to create smart factors on poses or cameras.
    │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │ -
    Point3Vector calibrateMeasurementsShared(const CALIBRATION &cal, const Point2Vector &measurements)
    Convert pixel measurements in image to homogeneous measurements in the image plane using shared camer...
    Definition triangulation.h:357
    │ │ │ -
    Point3 triangulateLOST(const std::vector< Pose3 > &poses, const Point3Vector &calibratedMeasurements, const SharedIsotropic &measurementNoise)
    Triangulation using the LOST (Linear Optimal Sine Triangulation) algorithm proposed in https://arxiv....
    Definition triangulation.cpp:92
    │ │ │ -
    Point2Vector undistortMeasurements(const CALIBRATION &cal, const Point2Vector &measurements)
    Remove distortion for measurements so as if the measurements came from a pinhole camera.
    Definition triangulation.h:282
    │ │ │ -
    Cal3_S2 createPinholeCalibration(const CALIBRATION &cal)
    Create a pinhole calibration from a different Cal3 object, removing distortion.
    Definition triangulation.h:253
    │ │ │ -
    MEASUREMENT undistortMeasurementInternal(const CALIBRATION &cal, const MEASUREMENT &measurement, boost::optional< Cal3_S2 > pinholeCal=boost::none)
    Internal undistortMeasurement to be used by undistortMeasurement and undistortMeasurements.
    Definition triangulation.h:261
    │ │ │ -
    Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
    Optimize for triangulation.
    Definition triangulation.cpp:155
    │ │ │ -
    Vector2 Point2
    As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point2 to Vector2...
    Definition Point2.h:27
    │ │ │
    TriangulationResult triangulateSafe(const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measured, const TriangulationParameters &params)
    triangulateSafe: extensive checking of the outcome
    Definition triangulation.h:680
    │ │ │ -
    Point3 triangulateNonlinear(const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal, const Point2Vector &measurements, const Point3 &initialEstimate, const SharedNoiseModel &model=nullptr)
    Given an initial estimate , refine a point using measurements in several cameras.
    Definition triangulation.h:187
    │ │ │ -
    double distance3(const Point3 &p1, const Point3 &q, OptionalJacobian< 1, 3 > H1, OptionalJacobian< 1, 3 > H2)
    distance between two points
    Definition Point3.cpp:27
    │ │ │ -
    Vector3 Point3
    As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point3 to Vector3...
    Definition Point3.h:36
    │ │ │ -
    noiseModel::Base::shared_ptr SharedNoiseModel
    Aliases.
    Definition NoiseModel.h:724
    │ │ │ -
    Point3 triangulatePoint3(const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal, const Point2Vector &measurements, double rank_tol=1e-9, bool optimize=false, const SharedNoiseModel &model=nullptr, const bool useLOST=false)
    Function to triangulate 3D landmark point from an arbitrary number of poses (at least 2) using the DL...
    Definition triangulation.h:421
    │ │ │ -
    std::pair< NonlinearFactorGraph, Values > triangulationGraph(const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal, const Point2Vector &measurements, Key landmarkKey, const Point3 &initialEstimate, const SharedNoiseModel &model=noiseModel::Unit::Create(2))
    Create a factor graph with projection factors from poses and one calibration.
    Definition triangulation.h:122
    │ │ │ -
    std::uint64_t Key
    Integer nonlinear key type.
    Definition types.h:100
    │ │ │ -
    Point3Vector calibrateMeasurements(const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measurements)
    Convert pixel measurements in image to homogeneous measurements in the image plane using camera intri...
    Definition triangulation.h:381
    │ │ │ -
    Point3 triangulateDLT(const std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > &projection_matrices, const Point2Vector &measurements, double rank_tol)
    DLT triangulation: See Hartley and Zisserman, 2nd Ed., page 312.
    Definition triangulation.cpp:127
    │ │ │ -
    Vector4 triangulateHomogeneousDLT(const std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > &projection_matrices, const Point2Vector &measurements, double rank_tol)
    DLT triangulation: See Hartley and Zisserman, 2nd Ed., page 312.
    Definition triangulation.cpp:27
    │ │ │
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │ -
    The most common 5DOF 3D->2D calibration.
    Definition Cal3_S2.h:34
    │ │ │ +
    A helper that implements the traits interface for GTSAM types.
    Definition Testable.h:151
    │ │ │
    A set of cameras, all with their own calibration.
    Definition CameraSet.h:36
    │ │ │ -
    A pinhole camera class that has a Pose3 and a Calibration.
    Definition PinholeCamera.h:33
    │ │ │ -
    A pinhole camera class that has a Pose3 and a fixed Calibration.
    Definition PinholePose.h:243
    │ │ │ -
    A 3D pose (R,t) : (Rot3,Point3)
    Definition Pose3.h:37
    │ │ │ -
    Point3 transformTo(const Point3 &point, OptionalJacobian< 3, 6 > Hself=boost::none, OptionalJacobian< 3, 3 > Hpoint=boost::none) const
    takes point in world coordinates and transforms it to Pose coordinates
    Definition Pose3.cpp:371
    │ │ │ -
    const Point3 & translation(OptionalJacobian< 3, 6 > Hself=boost::none) const
    get translation
    Definition Pose3.cpp:308
    │ │ │ -
    Exception thrown by triangulateDLT when SVD returns rank < 3.
    Definition triangulation.h:39
    │ │ │ -
    Exception thrown by triangulateDLT when landmark is behind one or more of the cameras.
    Definition triangulation.h:47
    │ │ │ +
    PinholeSet: triangulates point and keeps an estimate of it around.
    Definition PinholeSet.h:30
    │ │ │ +
    TriangulationResult triangulateSafe(const typename CAMERA::MeasurementVector &measured, const TriangulationParameters &params) const
    triangulateSafe
    Definition PinholeSet.h:60
    │ │ │ +
    bool equals(const PinholeSet &p, double tol=1e-9) const
    equals
    Definition PinholeSet.h:53
    │ │ │ +
    virtual ~PinholeSet()
    Virtual destructor.
    Definition PinholeSet.h:41
    │ │ │ +
    void print(const std::string &s="") const override
    print
    Definition PinholeSet.h:48
    │ │ │ +
    friend class boost::serialization::access
    Serialization function.
    Definition PinholeSet.h:69
    │ │ │
    Definition triangulation.h:556
    │ │ │ -
    TriangulationParameters(const double _rankTolerance=1.0, const bool _enableEPI=false, double _landmarkDistanceThreshold=-1, double _dynamicOutlierRejectionThreshold=-1, const SharedNoiseModel &_noiseModel=nullptr)
    Constructor.
    Definition triangulation.h:586
    │ │ │ -
    double dynamicOutlierRejectionThreshold
    If this is nonnegative the we will check if the average reprojection error is smaller than this thres...
    Definition triangulation.h:573
    │ │ │ -
    double rankTolerance
    threshold to decide whether triangulation is result.degenerate
    Definition triangulation.h:558
    │ │ │ -
    double landmarkDistanceThreshold
    if the landmark is triangulated at distance larger than this, result is flagged as degenerate.
    Definition triangulation.h:566
    │ │ │ -
    bool enableEPI
    if set to true, will refine triangulation using LM
    Definition triangulation.h:560
    │ │ │ -
    SharedNoiseModel noiseModel
    used in the nonlinear triangulation
    Definition triangulation.h:575
    │ │ │
    TriangulationResult is an optional point, along with the reasons why it is invalid.
    Definition triangulation.h:626
    │ │ │ -
    TriangulationResult()
    Default constructor, only for serialization.
    Definition triangulation.h:638
    │ │ │ -
    TriangulationResult(const Point3 &p)
    Constructor.
    Definition triangulation.h:643
    │ │ │ -
    friend class boost::serialization::access
    Serialization function.
    Definition triangulation.h:671
    │ │ │ -
    Character and index key used to refer to variables.
    Definition Symbol.h:35
    │ │ │ -
    static shared_ptr Sigma(size_t dim, double sigma, bool smart=true)
    An isotropic noise model created by specifying a standard devation sigma.
    Definition NoiseModel.cpp:597
    │ │ │ -
    static shared_ptr Create(size_t dim)
    Create a unit covariance noise model.
    Definition NoiseModel.h:597
    │ │ │ -
    Definition NonlinearFactorGraph.h:55
    │ │ │ -
    A non-templated config holding any types of Manifold-group elements.
    Definition Values.h:65
    │ │ │ -
    void insert(Key j, const Value &val)
    Add a variable with the given j, throws KeyAlreadyExists<J> if j is already present.
    Definition Values.cpp:157
    │ │ │ -
    Non-linear factor for a constraint derived from a 2D measurement.
    Definition TriangulationFactor.h:33
    │ │ │ -
    In nonlinear factors, the error function returns the negative log-likelihood as a non-linear function...
    │ │ │ - │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,815 +1,134 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -triangulation.h │ │ │ │ +PinholeSet.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -21#pragma once │ │ │ │ -22 │ │ │ │ -23#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3_B_u_n_d_l_e_r_._h> │ │ │ │ -24#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3_F_i_s_h_e_y_e_._h> │ │ │ │ -25#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3_U_n_i_f_i_e_d_._h> │ │ │ │ -26#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3___S_2_._h> │ │ │ │ -27#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3_D_S_2_._h> │ │ │ │ -28#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_m_e_r_a_S_e_t_._h> │ │ │ │ -29#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_i_n_h_o_l_e_C_a_m_e_r_a_._h> │ │ │ │ -30#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_._h> │ │ │ │ -31#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_s_e_2_._h> │ │ │ │ -32#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_S_y_m_b_o_l_._h> │ │ │ │ -33#include <_g_t_s_a_m_/_n_o_n_l_i_n_e_a_r_/_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ -34#include │ │ │ │ +18#pragma once │ │ │ │ +19 │ │ │ │ +20#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_m_e_r_a_S_e_t_._h> │ │ │ │ +21#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_t_r_i_a_n_g_u_l_a_t_i_o_n_._h> │ │ │ │ +22#include │ │ │ │ +23 │ │ │ │ +24namespace _g_t_s_a_m { │ │ │ │ +25 │ │ │ │ +29template │ │ │ │ +_3_0class _P_i_n_h_o_l_e_S_e_t: public _C_a_m_e_r_a_S_e_t { │ │ │ │ +31 │ │ │ │ +32private: │ │ │ │ +33 typedef _C_a_m_e_r_a_S_e_t_<_C_A_M_E_R_A_> Base; │ │ │ │ +34 typedef _P_i_n_h_o_l_e_S_e_t_<_C_A_M_E_R_A_> This; │ │ │ │ 35 │ │ │ │ -36namespace _g_t_s_a_m { │ │ │ │ +36protected: │ │ │ │ 37 │ │ │ │ -_3_9class GTSAM_EXPORT _T_r_i_a_n_g_u_l_a_t_i_o_n_U_n_d_e_r_c_o_n_s_t_r_a_i_n_e_d_E_x_c_e_p_t_i_o_n: public std:: │ │ │ │ -runtime_error { │ │ │ │ -40public: │ │ │ │ -41 _T_r_i_a_n_g_u_l_a_t_i_o_n_U_n_d_e_r_c_o_n_s_t_r_a_i_n_e_d_E_x_c_e_p_t_i_o_n() : │ │ │ │ -42 std::runtime_error("Triangulation Underconstrained Exception.") { │ │ │ │ -43 } │ │ │ │ -44}; │ │ │ │ -45 │ │ │ │ -_4_7class GTSAM_EXPORT _T_r_i_a_n_g_u_l_a_t_i_o_n_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n: public std:: │ │ │ │ -runtime_error { │ │ │ │ -48public: │ │ │ │ -49 _T_r_i_a_n_g_u_l_a_t_i_o_n_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n() : │ │ │ │ -50 std::runtime_error( │ │ │ │ -51 "Triangulation Cheirality Exception: The resulting landmark is behind one or │ │ │ │ -more cameras.") { │ │ │ │ -52 } │ │ │ │ -53}; │ │ │ │ -54 │ │ │ │ -62GTSAM_EXPORT Vector4 _t_r_i_a_n_g_u_l_a_t_e_H_o_m_o_g_e_n_e_o_u_s_D_L_T( │ │ │ │ -63 const std::vector>& │ │ │ │ -projection_matrices, │ │ │ │ -64 const Point2Vector& measurements, double rank_tol = 1e-9); │ │ │ │ +38public: │ │ │ │ +39 │ │ │ │ +_4_1 virtual _~_P_i_n_h_o_l_e_S_e_t() { │ │ │ │ +42 } │ │ │ │ +43 │ │ │ │ +46 │ │ │ │ +_4_8 void _p_r_i_n_t(const std::string& s = "") const override { │ │ │ │ +49 Base::print(s); │ │ │ │ +50 } │ │ │ │ +51 │ │ │ │ +_5_3 bool _e_q_u_a_l_s(const _P_i_n_h_o_l_e_S_e_t& p, double tol = 1e-9) const { │ │ │ │ +54 return Base::equals(p, tol); // TODO all flags │ │ │ │ +55 } │ │ │ │ +56 │ │ │ │ +58 │ │ │ │ +_6_0 _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t _t_r_i_a_n_g_u_l_a_t_e_S_a_f_e( │ │ │ │ +61 const typename CAMERA::MeasurementVector& measured, │ │ │ │ +62 const _T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s& params) const { │ │ │ │ +63 return _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_S_a_f_e(*this, measured, params); │ │ │ │ +64 } │ │ │ │ 65 │ │ │ │ -74GTSAM_EXPORT Vector4 _t_r_i_a_n_g_u_l_a_t_e_H_o_m_o_g_e_n_e_o_u_s_D_L_T( │ │ │ │ -75 const std::vector>& │ │ │ │ -projection_matrices, │ │ │ │ -76 const std::vector& measurements, double rank_tol = 1e-9); │ │ │ │ -77 │ │ │ │ -85GTSAM_EXPORT _P_o_i_n_t_3 _t_r_i_a_n_g_u_l_a_t_e_D_L_T( │ │ │ │ -86 const std::vector>& │ │ │ │ -projection_matrices, │ │ │ │ -87 const Point2Vector& measurements, │ │ │ │ -88 double rank_tol = 1e-9); │ │ │ │ -89 │ │ │ │ -93GTSAM_EXPORT _P_o_i_n_t_3 _t_r_i_a_n_g_u_l_a_t_e_D_L_T( │ │ │ │ -94 const std::vector>& │ │ │ │ -projection_matrices, │ │ │ │ -95 const std::vector& measurements, │ │ │ │ -96 double rank_tol = 1e-9); │ │ │ │ -97 │ │ │ │ -108GTSAM_EXPORT _P_o_i_n_t_3 _t_r_i_a_n_g_u_l_a_t_e_L_O_S_T(const std::vector& poses, │ │ │ │ -109 const Point3Vector& calibratedMeasurements, │ │ │ │ -110 const SharedIsotropic& measurementNoise); │ │ │ │ -111 │ │ │ │ -121template │ │ │ │ -_1_2_2std::pair _t_r_i_a_n_g_u_l_a_t_i_o_n_G_r_a_p_h( │ │ │ │ -123 const std::vector& poses, boost::shared_ptr sharedCal, │ │ │ │ -124 const Point2Vector& measurements, _K_e_y landmarkKey, │ │ │ │ -125 const _P_o_i_n_t_3& initialEstimate, │ │ │ │ -126 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model = _n_o_i_s_e_M_o_d_e_l_:_:_U_n_i_t_:_:_C_r_e_a_t_e(2)) { │ │ │ │ -127 _V_a_l_u_e_s values; │ │ │ │ -128 values._i_n_s_e_r_t(landmarkKey, initialEstimate); // Initial landmark value │ │ │ │ -129 _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h graph; │ │ │ │ -130 for (size_t i = 0; i < measurements.size(); i++) { │ │ │ │ -131 const _P_o_s_e_3& pose_i = poses[i]; │ │ │ │ -132 typedef _P_i_n_h_o_l_e_P_o_s_e_<_C_A_L_I_B_R_A_T_I_O_N_> Camera; │ │ │ │ -133 Camera camera_i(pose_i, sharedCal); │ │ │ │ -134 graph.emplace_shared<_T_r_i_a_n_g_u_l_a_t_i_o_n_F_a_c_t_o_r_<_C_a_m_e_r_a_> > // │ │ │ │ -135 (camera_i, measurements[i], model, landmarkKey); │ │ │ │ -136 } │ │ │ │ -137 return std::make_pair(graph, values); │ │ │ │ -138} │ │ │ │ -139 │ │ │ │ -149template │ │ │ │ -_1_5_0std::pair _t_r_i_a_n_g_u_l_a_t_i_o_n_G_r_a_p_h( │ │ │ │ -151 const _C_a_m_e_r_a_S_e_t_<_C_A_M_E_R_A_>& cameras, │ │ │ │ -152 const typename CAMERA::MeasurementVector& measurements, _K_e_y landmarkKey, │ │ │ │ -153 const _P_o_i_n_t_3& initialEstimate, │ │ │ │ -154 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model = nullptr) { │ │ │ │ -155 _V_a_l_u_e_s values; │ │ │ │ -156 values._i_n_s_e_r_t(landmarkKey, initialEstimate); // Initial landmark value │ │ │ │ -157 _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h graph; │ │ │ │ -158 static _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l unit(_n_o_i_s_e_M_o_d_e_l_:_:_U_n_i_t_:_:_C_r_e_a_t_e( │ │ │ │ -159 _t_r_a_i_t_s_<_t_y_p_e_n_a_m_e_ _C_A_M_E_R_A_:_:_M_e_a_s_u_r_e_m_e_n_t_>_:_:_d_i_m_e_n_s_i_o_n)); │ │ │ │ -160 for (size_t i = 0; i < measurements.size(); i++) { │ │ │ │ -161 const CAMERA& camera_i = cameras[i]; │ │ │ │ -162 graph.emplace_shared<_T_r_i_a_n_g_u_l_a_t_i_o_n_F_a_c_t_o_r_<_C_A_M_E_R_A_> > // │ │ │ │ -163 (camera_i, measurements[i], model? model : unit, landmarkKey); │ │ │ │ -164 } │ │ │ │ -165 return std::make_pair(graph, values); │ │ │ │ -166} │ │ │ │ -167 │ │ │ │ -175GTSAM_EXPORT _P_o_i_n_t_3 _o_p_t_i_m_i_z_e(const NonlinearFactorGraph& graph, │ │ │ │ -176 const _V_a_l_u_e_s& values, _K_e_y landmarkKey); │ │ │ │ -177 │ │ │ │ -186template │ │ │ │ -_1_8_7_P_o_i_n_t_3 _t_r_i_a_n_g_u_l_a_t_e_N_o_n_l_i_n_e_a_r(const std::vector& poses, │ │ │ │ -188 boost::shared_ptr sharedCal, │ │ │ │ -189 const Point2Vector& measurements, const _P_o_i_n_t_3& initialEstimate, │ │ │ │ -190 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model = nullptr) { │ │ │ │ -191 │ │ │ │ -192 // Create a factor graph and initial values │ │ │ │ -193 _V_a_l_u_e_s values; │ │ │ │ -194 _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h graph; │ │ │ │ -195 boost::tie(graph, values) = triangulationGraph // │ │ │ │ -196 (poses, sharedCal, measurements, _S_y_m_b_o_l('p', 0), initialEstimate, model); │ │ │ │ -197 │ │ │ │ -198 return _o_p_t_i_m_i_z_e(graph, values, _S_y_m_b_o_l('p', 0)); │ │ │ │ -199} │ │ │ │ -200 │ │ │ │ -208template │ │ │ │ -_2_0_9_P_o_i_n_t_3 _t_r_i_a_n_g_u_l_a_t_e_N_o_n_l_i_n_e_a_r( │ │ │ │ -210 const _C_a_m_e_r_a_S_e_t_<_C_A_M_E_R_A_>& cameras, │ │ │ │ -211 const typename CAMERA::MeasurementVector& measurements, const _P_o_i_n_t_3& │ │ │ │ -initialEstimate, │ │ │ │ -212 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model = nullptr) { │ │ │ │ -213 │ │ │ │ -214 // Create a factor graph and initial values │ │ │ │ -215 _V_a_l_u_e_s values; │ │ │ │ -216 _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h graph; │ │ │ │ -217 boost::tie(graph, values) = triangulationGraph // │ │ │ │ -218 (cameras, measurements, _S_y_m_b_o_l('p', 0), initialEstimate, model); │ │ │ │ -219 │ │ │ │ -220 return _o_p_t_i_m_i_z_e(graph, values, _S_y_m_b_o_l('p', 0)); │ │ │ │ -221} │ │ │ │ -222 │ │ │ │ -223template │ │ │ │ -224std::vector> │ │ │ │ -225projectionMatricesFromCameras(const CameraSet &cameras) { │ │ │ │ -226 std::vector> │ │ │ │ -projection_matrices; │ │ │ │ -227 for (const CAMERA &camera: cameras) { │ │ │ │ -228 projection_matrices.push_back(camera.cameraProjectionMatrix()); │ │ │ │ -229 } │ │ │ │ -230 return projection_matrices; │ │ │ │ -231} │ │ │ │ -232 │ │ │ │ -233// overload, assuming pinholePose │ │ │ │ -234template │ │ │ │ -235std::vector> │ │ │ │ -projectionMatricesFromPoses( │ │ │ │ -236 const std::vector &poses, boost::shared_ptr sharedCal) │ │ │ │ -{ │ │ │ │ -237 std::vector> │ │ │ │ -projection_matrices; │ │ │ │ -238 for (size_t i = 0; i < poses.size(); i++) { │ │ │ │ -239 PinholePose camera(poses.at(i), sharedCal); │ │ │ │ -240 projection_matrices.push_back(camera.cameraProjectionMatrix()); │ │ │ │ -241 } │ │ │ │ -242 return projection_matrices; │ │ │ │ -243} │ │ │ │ -244 │ │ │ │ -252template │ │ │ │ -_2_5_3_C_a_l_3___S_2 _c_r_e_a_t_e_P_i_n_h_o_l_e_C_a_l_i_b_r_a_t_i_o_n(const CALIBRATION& cal) { │ │ │ │ -254 const auto& K = cal.K(); │ │ │ │ -255 return _C_a_l_3___S_2(K(0, 0), K(1, 1), K(0, 1), K(0, 2), K(1, 2)); │ │ │ │ -256} │ │ │ │ -257 │ │ │ │ -260template │ │ │ │ -_2_6_1MEASUREMENT _u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_I_n_t_e_r_n_a_l( │ │ │ │ -262 const CALIBRATION& cal, const MEASUREMENT& measurement, │ │ │ │ -263 boost::optional pinholeCal = boost::none) { │ │ │ │ -264 if (!pinholeCal) { │ │ │ │ -265 pinholeCal = _c_r_e_a_t_e_P_i_n_h_o_l_e_C_a_l_i_b_r_a_t_i_o_n(cal); │ │ │ │ -266 } │ │ │ │ -267 return pinholeCal->uncalibrate(cal.calibrate(measurement)); │ │ │ │ -268} │ │ │ │ -269 │ │ │ │ -281template │ │ │ │ -_2_8_2Point2Vector _u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_s(const CALIBRATION& cal, │ │ │ │ -283 const Point2Vector& measurements) { │ │ │ │ -284 _C_a_l_3___S_2 pinholeCalibration = _c_r_e_a_t_e_P_i_n_h_o_l_e_C_a_l_i_b_r_a_t_i_o_n(cal); │ │ │ │ -285 Point2Vector undistortedMeasurements; │ │ │ │ -286 // Calibrate with cal and uncalibrate with pinhole version of cal so that │ │ │ │ -287 // measurements are undistorted. │ │ │ │ -288 std::transform(measurements.begin(), measurements.end(), │ │ │ │ -289 std::back_inserter(undistortedMeasurements), │ │ │ │ -290 [&cal, &pinholeCalibration](const _P_o_i_n_t_2& measurement) { │ │ │ │ -291 return undistortMeasurementInternal( │ │ │ │ -292 cal, measurement, pinholeCalibration); │ │ │ │ -293 }); │ │ │ │ -294 return undistortedMeasurements; │ │ │ │ -295} │ │ │ │ -296 │ │ │ │ -298template <> │ │ │ │ -_2_9_9inline Point2Vector _u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_s(const _C_a_l_3___S_2& cal, │ │ │ │ -300 const Point2Vector& measurements) { │ │ │ │ -301 return measurements; │ │ │ │ -302} │ │ │ │ -303 │ │ │ │ -315template │ │ │ │ -_3_1_6typename CAMERA::MeasurementVector _u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_s( │ │ │ │ -317 const _C_a_m_e_r_a_S_e_t_<_C_A_M_E_R_A_>& cameras, │ │ │ │ -318 const typename CAMERA::MeasurementVector& measurements) { │ │ │ │ -319 const size_t nrMeasurements = measurements.size(); │ │ │ │ -320 assert(nrMeasurements == cameras.size()); │ │ │ │ -321 typename CAMERA::MeasurementVector undistortedMeasurements(nrMeasurements); │ │ │ │ -322 for (size_t ii = 0; ii < nrMeasurements; ++ii) { │ │ │ │ -323 // Calibrate with cal and uncalibrate with pinhole version of cal so that │ │ │ │ -324 // measurements are undistorted. │ │ │ │ -325 undistortedMeasurements[ii] = │ │ │ │ -326 undistortMeasurementInternal( │ │ │ │ -327 cameras[ii].calibration(), measurements[ii]); │ │ │ │ -328 } │ │ │ │ -329 return undistortedMeasurements; │ │ │ │ -330} │ │ │ │ -331 │ │ │ │ -333template > │ │ │ │ -_3_3_4inline PinholeCamera::MeasurementVector _u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_s( │ │ │ │ -335 const _C_a_m_e_r_a_S_e_t<_P_i_n_h_o_l_e_C_a_m_e_r_a_<_C_a_l_3___S_2_>>& cameras, │ │ │ │ -336 const PinholeCamera::MeasurementVector& measurements) { │ │ │ │ -337 return measurements; │ │ │ │ -338} │ │ │ │ -339 │ │ │ │ -341template │ │ │ │ -_3_4_2inline SphericalCamera::MeasurementVector _u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_s( │ │ │ │ -343 const _C_a_m_e_r_a_S_e_t_<_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_>& cameras, │ │ │ │ -344 const SphericalCamera::MeasurementVector& measurements) { │ │ │ │ -345 return measurements; │ │ │ │ -346} │ │ │ │ -347 │ │ │ │ -356template │ │ │ │ -_3_5_7inline Point3Vector _c_a_l_i_b_r_a_t_e_M_e_a_s_u_r_e_m_e_n_t_s_S_h_a_r_e_d( │ │ │ │ -358 const CALIBRATION& cal, const Point2Vector& measurements) { │ │ │ │ -359 Point3Vector calibratedMeasurements; │ │ │ │ -360 // Calibrate with cal and uncalibrate with pinhole version of cal so that │ │ │ │ -361 // measurements are undistorted. │ │ │ │ -362 std::transform(measurements.begin(), measurements.end(), │ │ │ │ -363 std::back_inserter(calibratedMeasurements), │ │ │ │ -364 [&cal](const _P_o_i_n_t_2& measurement) { │ │ │ │ -365 Point3 p; │ │ │ │ -366 p << cal.calibrate(measurement), 1.0; │ │ │ │ -367 return p; │ │ │ │ -368 }); │ │ │ │ -369 return calibratedMeasurements; │ │ │ │ -370} │ │ │ │ -371 │ │ │ │ -380template │ │ │ │ -_3_8_1inline Point3Vector _c_a_l_i_b_r_a_t_e_M_e_a_s_u_r_e_m_e_n_t_s( │ │ │ │ -382 const _C_a_m_e_r_a_S_e_t_<_C_A_M_E_R_A_>& cameras, │ │ │ │ -383 const typename CAMERA::MeasurementVector& measurements) { │ │ │ │ -384 const size_t nrMeasurements = measurements.size(); │ │ │ │ -385 assert(nrMeasurements == cameras.size()); │ │ │ │ -386 Point3Vector calibratedMeasurements(nrMeasurements); │ │ │ │ -387 for (size_t ii = 0; ii < nrMeasurements; ++ii) { │ │ │ │ -388 calibratedMeasurements[ii] │ │ │ │ -389 << cameras[ii].calibration().calibrate(measurements[ii]), │ │ │ │ -390 1.0; │ │ │ │ -391 } │ │ │ │ -392 return calibratedMeasurements; │ │ │ │ -393} │ │ │ │ -394 │ │ │ │ -396template │ │ │ │ -_3_9_7inline Point3Vector _c_a_l_i_b_r_a_t_e_M_e_a_s_u_r_e_m_e_n_t_s( │ │ │ │ -398 const _C_a_m_e_r_a_S_e_t_<_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_>& cameras, │ │ │ │ -399 const SphericalCamera::MeasurementVector& measurements) { │ │ │ │ -400 Point3Vector calibratedMeasurements(measurements.size()); │ │ │ │ -401 for (size_t ii = 0; ii < measurements.size(); ++ii) { │ │ │ │ -402 calibratedMeasurements[ii] << measurements[ii].point3(); │ │ │ │ -403 } │ │ │ │ -404 return calibratedMeasurements; │ │ │ │ -405} │ │ │ │ -406 │ │ │ │ -420template │ │ │ │ -_4_2_1_P_o_i_n_t_3 _t_r_i_a_n_g_u_l_a_t_e_P_o_i_n_t_3(const std::vector& poses, │ │ │ │ -422 boost::shared_ptr sharedCal, │ │ │ │ -423 const Point2Vector& measurements, │ │ │ │ -424 double rank_tol = 1e-9, bool _o_p_t_i_m_i_z_e = false, │ │ │ │ -425 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model = nullptr, │ │ │ │ -426 const bool useLOST = false) { │ │ │ │ -427 assert(poses.size() == measurements.size()); │ │ │ │ -428 if (poses.size() < 2) throw(_T_r_i_a_n_g_u_l_a_t_i_o_n_U_n_d_e_r_c_o_n_s_t_r_a_i_n_e_d_E_x_c_e_p_t_i_o_n()); │ │ │ │ -429 │ │ │ │ -430 // Triangulate linearly │ │ │ │ -431 _P_o_i_n_t_3 point; │ │ │ │ -432 if (useLOST) { │ │ │ │ -433 // Reduce input noise model to an isotropic noise model using the mean of │ │ │ │ -434 // the diagonal. │ │ │ │ -435 const double measurementSigma = model ? model->sigmas().mean() : 1e-4; │ │ │ │ -436 SharedIsotropic measurementNoise = │ │ │ │ -437 _n_o_i_s_e_M_o_d_e_l_:_:_I_s_o_t_r_o_p_i_c_:_:_S_i_g_m_a(2, measurementSigma); │ │ │ │ -438 // calibrate the measurements to obtain homogenous coordinates in image │ │ │ │ -439 // plane. │ │ │ │ -440 auto calibratedMeasurements = │ │ │ │ -441 calibrateMeasurementsShared(*sharedCal, measurements); │ │ │ │ -442 │ │ │ │ -443 point = _t_r_i_a_n_g_u_l_a_t_e_L_O_S_T(poses, calibratedMeasurements, measurementNoise); │ │ │ │ -444 } else { │ │ │ │ -445 // construct projection matrices from poses & calibration │ │ │ │ -446 auto projection_matrices = projectionMatricesFromPoses(poses, sharedCal); │ │ │ │ -447 │ │ │ │ -448 // Undistort the measurements, leaving only the pinhole elements in effect. │ │ │ │ -449 auto undistortedMeasurements = │ │ │ │ -450 undistortMeasurements(*sharedCal, measurements); │ │ │ │ -451 │ │ │ │ -452 point = │ │ │ │ -453 _t_r_i_a_n_g_u_l_a_t_e_D_L_T(projection_matrices, undistortedMeasurements, rank_tol); │ │ │ │ -454 } │ │ │ │ -455 │ │ │ │ -456 // Then refine using non-linear optimization │ │ │ │ -457 if (_o_p_t_i_m_i_z_e) │ │ │ │ -458 point = triangulateNonlinear // │ │ │ │ -459 (poses, sharedCal, measurements, point, model); │ │ │ │ -460 │ │ │ │ -461#ifdef GTSAM_THROW_CHEIRALITY_EXCEPTION │ │ │ │ -462 // verify that the triangulated point lies in front of all cameras │ │ │ │ -463 for (const _P_o_s_e_3& pose : poses) { │ │ │ │ -464 const _P_o_i_n_t_3& p_local = pose.transformTo(point); │ │ │ │ -465 if (p_local.z() <= 0) throw(_T_r_i_a_n_g_u_l_a_t_i_o_n_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n()); │ │ │ │ -466 } │ │ │ │ -467#endif │ │ │ │ -468 │ │ │ │ -469 return point; │ │ │ │ -470} │ │ │ │ -471 │ │ │ │ -486template │ │ │ │ -_4_8_7_P_o_i_n_t_3 _t_r_i_a_n_g_u_l_a_t_e_P_o_i_n_t_3(const _C_a_m_e_r_a_S_e_t_<_C_A_M_E_R_A_>& cameras, │ │ │ │ -488 const typename CAMERA::MeasurementVector& measurements, │ │ │ │ -489 double rank_tol = 1e-9, bool _o_p_t_i_m_i_z_e = false, │ │ │ │ -490 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model = nullptr, │ │ │ │ -491 const bool useLOST = false) { │ │ │ │ -492 size_t m = cameras.size(); │ │ │ │ -493 assert(measurements.size() == m); │ │ │ │ -494 │ │ │ │ -495 if (m < 2) throw(_T_r_i_a_n_g_u_l_a_t_i_o_n_U_n_d_e_r_c_o_n_s_t_r_a_i_n_e_d_E_x_c_e_p_t_i_o_n()); │ │ │ │ -496 │ │ │ │ -497 // Triangulate linearly │ │ │ │ -498 _P_o_i_n_t_3 point; │ │ │ │ -499 if (useLOST) { │ │ │ │ -500 // Reduce input noise model to an isotropic noise model using the mean of │ │ │ │ -501 // the diagonal. │ │ │ │ -502 const double measurementSigma = model ? model->sigmas().mean() : 1e-4; │ │ │ │ -503 SharedIsotropic measurementNoise = │ │ │ │ -504 _n_o_i_s_e_M_o_d_e_l_:_:_I_s_o_t_r_o_p_i_c_:_:_S_i_g_m_a(2, measurementSigma); │ │ │ │ -505 │ │ │ │ -506 // construct poses from cameras. │ │ │ │ -507 std::vector poses; │ │ │ │ -508 poses.reserve(cameras.size()); │ │ │ │ -509 for (const auto& camera : cameras) poses.push_back(camera.pose()); │ │ │ │ -510 │ │ │ │ -511 // calibrate the measurements to obtain homogenous coordinates in image │ │ │ │ -512 // plane. │ │ │ │ -513 auto calibratedMeasurements = │ │ │ │ -514 calibrateMeasurements(cameras, measurements); │ │ │ │ -515 │ │ │ │ -516 point = _t_r_i_a_n_g_u_l_a_t_e_L_O_S_T(poses, calibratedMeasurements, measurementNoise); │ │ │ │ -517 } else { │ │ │ │ -518 // construct projection matrices from poses & calibration │ │ │ │ -519 auto projection_matrices = projectionMatricesFromCameras(cameras); │ │ │ │ -520 │ │ │ │ -521 // Undistort the measurements, leaving only the pinhole elements in effect. │ │ │ │ -522 auto undistortedMeasurements = │ │ │ │ -523 undistortMeasurements(cameras, measurements); │ │ │ │ -524 │ │ │ │ -525 point = │ │ │ │ -526 _t_r_i_a_n_g_u_l_a_t_e_D_L_T(projection_matrices, undistortedMeasurements, rank_tol); │ │ │ │ -527 } │ │ │ │ -528 │ │ │ │ -529 // Then refine using non-linear optimization │ │ │ │ -530 if (_o_p_t_i_m_i_z_e) { │ │ │ │ -531 point = triangulateNonlinear(cameras, measurements, point, model); │ │ │ │ -532 } │ │ │ │ -533 │ │ │ │ -534#ifdef GTSAM_THROW_CHEIRALITY_EXCEPTION │ │ │ │ -535 // verify that the triangulated point lies in front of all cameras │ │ │ │ -536 for (const CAMERA& camera : cameras) { │ │ │ │ -537 const _P_o_i_n_t_3& p_local = camera.pose().transformTo(point); │ │ │ │ -538 if (p_local.z() <= 0) throw(_T_r_i_a_n_g_u_l_a_t_i_o_n_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n()); │ │ │ │ -539 } │ │ │ │ -540#endif │ │ │ │ -541 │ │ │ │ -542 return point; │ │ │ │ -543} │ │ │ │ -544 │ │ │ │ -546template │ │ │ │ -_5_4_7_P_o_i_n_t_3 _t_r_i_a_n_g_u_l_a_t_e_P_o_i_n_t_3(const _C_a_m_e_r_a_S_e_t<_P_i_n_h_o_l_e_C_a_m_e_r_a_<_C_A_L_I_B_R_A_T_I_O_N_>>& │ │ │ │ -cameras, │ │ │ │ -548 const Point2Vector& measurements, │ │ │ │ -549 double rank_tol = 1e-9, bool _o_p_t_i_m_i_z_e = false, │ │ │ │ -550 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model = nullptr, │ │ │ │ -551 const bool useLOST = false) { │ │ │ │ -552 return triangulatePoint3> // │ │ │ │ -553 (cameras, measurements, rank_tol, _o_p_t_i_m_i_z_e, model, useLOST); │ │ │ │ -554} │ │ │ │ -555 │ │ │ │ -_5_5_6struct GTSAM_EXPORT _T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s { │ │ │ │ -557 │ │ │ │ -_5_5_8 double _r_a_n_k_T_o_l_e_r_a_n_c_e; │ │ │ │ -_5_6_0 bool _e_n_a_b_l_e_E_P_I; │ │ │ │ -561 │ │ │ │ -_5_6_6 double _l_a_n_d_m_a_r_k_D_i_s_t_a_n_c_e_T_h_r_e_s_h_o_l_d; // │ │ │ │ -567 │ │ │ │ -_5_7_3 double _d_y_n_a_m_i_c_O_u_t_l_i_e_r_R_e_j_e_c_t_i_o_n_T_h_r_e_s_h_o_l_d; │ │ │ │ -574 │ │ │ │ -_5_7_5 _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l _n_o_i_s_e_M_o_d_e_l; │ │ │ │ -576 │ │ │ │ -_5_8_6 _T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s(const double _rankTolerance = 1.0, │ │ │ │ -587 const bool _enableEPI = false, double _landmarkDistanceThreshold = -1, │ │ │ │ -588 double _dynamicOutlierRejectionThreshold = -1, │ │ │ │ -589 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& _noiseModel = nullptr) : │ │ │ │ -590 rankTolerance(_rankTolerance), enableEPI(_enableEPI), // │ │ │ │ -591 landmarkDistanceThreshold(_landmarkDistanceThreshold), // │ │ │ │ -592 dynamicOutlierRejectionThreshold(_dynamicOutlierRejectionThreshold), │ │ │ │ -593 noiseModel(_noiseModel){ │ │ │ │ -594 } │ │ │ │ -595 │ │ │ │ -596 // stream to output │ │ │ │ -597 friend std::ostream &operator<<(std::ostream &os, │ │ │ │ -598 const _T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s& p) { │ │ │ │ -599 os << "rankTolerance = " << p._r_a_n_k_T_o_l_e_r_a_n_c_e << std::endl; │ │ │ │ -600 os << "enableEPI = " << p._e_n_a_b_l_e_E_P_I << std::endl; │ │ │ │ -601 os << "landmarkDistanceThreshold = " << p._l_a_n_d_m_a_r_k_D_i_s_t_a_n_c_e_T_h_r_e_s_h_o_l_d │ │ │ │ -602 << std::endl; │ │ │ │ -603 os << "dynamicOutlierRejectionThreshold = " │ │ │ │ -604 << p._d_y_n_a_m_i_c_O_u_t_l_i_e_r_R_e_j_e_c_t_i_o_n_T_h_r_e_s_h_o_l_d << std::endl; │ │ │ │ -605 os << "noise model" << std::endl; │ │ │ │ -606 return os; │ │ │ │ -607 } │ │ │ │ -608 │ │ │ │ -609private: │ │ │ │ -610 │ │ │ │ -_6_1_2 friend class boost::serialization::access; │ │ │ │ -613 template │ │ │ │ -614 void serialize(ARCHIVE & ar, const unsigned int version) { │ │ │ │ -615 ar & BOOST_SERIALIZATION_NVP(rankTolerance); │ │ │ │ -616 ar & BOOST_SERIALIZATION_NVP(enableEPI); │ │ │ │ -617 ar & BOOST_SERIALIZATION_NVP(landmarkDistanceThreshold); │ │ │ │ -618 ar & BOOST_SERIALIZATION_NVP(dynamicOutlierRejectionThreshold); │ │ │ │ -619 } │ │ │ │ -620}; │ │ │ │ -621 │ │ │ │ -_6_2_6class _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t : public boost::optional { │ │ │ │ -627 public: │ │ │ │ -628 enum Status { VALID, DEGENERATE, BEHIND_CAMERA, OUTLIER, FAR_POINT }; │ │ │ │ -629 Status status; │ │ │ │ -630 │ │ │ │ -631 private: │ │ │ │ -632 _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t(Status s) : status(s) {} │ │ │ │ -633 │ │ │ │ -634 public: │ │ │ │ -_6_3_8 _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t() {} │ │ │ │ -639 │ │ │ │ -_6_4_3 _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t(const _P_o_i_n_t_3& p) : status(VALID) { reset(p); } │ │ │ │ -644 static _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t Degenerate() { │ │ │ │ -645 return _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t(DEGENERATE); │ │ │ │ -646 } │ │ │ │ -647 static _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t Outlier() { return _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t(OUTLIER); │ │ │ │ -} │ │ │ │ -648 static _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t FarPoint() { │ │ │ │ -649 return _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t(FAR_POINT); │ │ │ │ -650 } │ │ │ │ -651 static _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t BehindCamera() { │ │ │ │ -652 return _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t(BEHIND_CAMERA); │ │ │ │ -653 } │ │ │ │ -654 bool valid() const { return status == VALID; } │ │ │ │ -655 bool degenerate() const { return status == DEGENERATE; } │ │ │ │ -656 bool outlier() const { return status == OUTLIER; } │ │ │ │ -657 bool farPoint() const { return status == FAR_POINT; } │ │ │ │ -658 bool behindCamera() const { return status == BEHIND_CAMERA; } │ │ │ │ -659 // stream to output │ │ │ │ -660 friend std::ostream& operator<<(std::ostream& os, │ │ │ │ -661 const _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t& result) { │ │ │ │ -662 if (result) │ │ │ │ -663 os << "point = " << *result << std::endl; │ │ │ │ -664 else │ │ │ │ -665 os << "no point, status = " << result.status << std::endl; │ │ │ │ -666 return os; │ │ │ │ -667 } │ │ │ │ -668 │ │ │ │ -669 private: │ │ │ │ -_6_7_1 friend class _b_o_o_s_t_:_:_s_e_r_i_a_l_i_z_a_t_i_o_n_:_:_a_c_c_e_s_s; │ │ │ │ -672 template │ │ │ │ -673 void serialize(ARCHIVE& ar, const unsigned int version) { │ │ │ │ -674 ar& BOOST_SERIALIZATION_NVP(status); │ │ │ │ -675 } │ │ │ │ -676}; │ │ │ │ -677 │ │ │ │ -679template │ │ │ │ -_6_8_0_T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t _t_r_i_a_n_g_u_l_a_t_e_S_a_f_e(const _C_a_m_e_r_a_S_e_t_<_C_A_M_E_R_A_>& cameras, │ │ │ │ -681 const typename CAMERA::MeasurementVector& measured, │ │ │ │ -682 const _T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s& params) { │ │ │ │ -683 │ │ │ │ -684 size_t m = cameras.size(); │ │ │ │ -685 │ │ │ │ -686 // if we have a single pose the corresponding factor is uninformative │ │ │ │ -687 if (m < 2) │ │ │ │ -688 return TriangulationResult::Degenerate(); │ │ │ │ -689 else │ │ │ │ -690 // We triangulate the 3D position of the landmark │ │ │ │ -691 try { │ │ │ │ -692 _P_o_i_n_t_3 point = │ │ │ │ -693 triangulatePoint3(cameras, measured, params._r_a_n_k_T_o_l_e_r_a_n_c_e, │ │ │ │ -694 params._e_n_a_b_l_e_E_P_I, params._n_o_i_s_e_M_o_d_e_l); │ │ │ │ -695 │ │ │ │ -696 // Check landmark distance and re-projection errors to avoid outliers │ │ │ │ -697 size_t i = 0; │ │ │ │ -698 double maxReprojError = 0.0; │ │ │ │ -699 for(const CAMERA& camera: cameras) { │ │ │ │ -700 const _P_o_s_e_3& pose = camera.pose(); │ │ │ │ -701 if (params._l_a_n_d_m_a_r_k_D_i_s_t_a_n_c_e_T_h_r_e_s_h_o_l_d > 0 │ │ │ │ -702 && _d_i_s_t_a_n_c_e_3(pose._t_r_a_n_s_l_a_t_i_o_n(), point) │ │ │ │ -703 > params._l_a_n_d_m_a_r_k_D_i_s_t_a_n_c_e_T_h_r_e_s_h_o_l_d) │ │ │ │ -704 return TriangulationResult::FarPoint(); │ │ │ │ -705#ifdef GTSAM_THROW_CHEIRALITY_EXCEPTION │ │ │ │ -706 // verify that the triangulated point lies in front of all cameras │ │ │ │ -707 // Only needed if this was not yet handled by exception │ │ │ │ -708 const _P_o_i_n_t_3& p_local = pose._t_r_a_n_s_f_o_r_m_T_o(point); │ │ │ │ -709 if (p_local.z() <= 0) │ │ │ │ -710 return TriangulationResult::BehindCamera(); │ │ │ │ -711#endif │ │ │ │ -712 // Check reprojection error │ │ │ │ -713 if (params._d_y_n_a_m_i_c_O_u_t_l_i_e_r_R_e_j_e_c_t_i_o_n_T_h_r_e_s_h_o_l_d > 0) { │ │ │ │ -714 const typename CAMERA::Measurement& zi = measured.at(i); │ │ │ │ -715 _P_o_i_n_t_2 reprojectionError = camera.reprojectionError(point, zi); │ │ │ │ -716 maxReprojError = std::max(maxReprojError, reprojectionError.norm()); │ │ │ │ -717 } │ │ │ │ -718 i += 1; │ │ │ │ -719 } │ │ │ │ -720 // Flag as degenerate if average reprojection error is too large │ │ │ │ -721 if (params._d_y_n_a_m_i_c_O_u_t_l_i_e_r_R_e_j_e_c_t_i_o_n_T_h_r_e_s_h_o_l_d > 0 │ │ │ │ -722 && maxReprojError > params._d_y_n_a_m_i_c_O_u_t_l_i_e_r_R_e_j_e_c_t_i_o_n_T_h_r_e_s_h_o_l_d) │ │ │ │ -723 return TriangulationResult::Outlier(); │ │ │ │ -724 │ │ │ │ -725 // all good! │ │ │ │ -726 return _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t(point); │ │ │ │ -727 } catch (_T_r_i_a_n_g_u_l_a_t_i_o_n_U_n_d_e_r_c_o_n_s_t_r_a_i_n_e_d_E_x_c_e_p_t_i_o_n&) { │ │ │ │ -728 // This exception is thrown if │ │ │ │ -729 // 1) There is a single pose for triangulation - this should not happen │ │ │ │ -because we checked the number of poses before │ │ │ │ -730 // 2) The rank of the matrix used for triangulation is < 3: rotation-only, │ │ │ │ -parallel cameras (or motion towards the landmark) │ │ │ │ -731 return TriangulationResult::Degenerate(); │ │ │ │ -732 } catch (_T_r_i_a_n_g_u_l_a_t_i_o_n_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n&) { │ │ │ │ -733 // point is behind one of the cameras: can be the case of close-to-parallel │ │ │ │ -cameras or may depend on outliers │ │ │ │ -734 return TriangulationResult::BehindCamera(); │ │ │ │ -735 } │ │ │ │ -736} │ │ │ │ -737 │ │ │ │ -738// Vector of Cameras - used by the Python/MATLAB wrapper │ │ │ │ -739using CameraSetCal3Bundler = CameraSet>; │ │ │ │ -740using CameraSetCal3_S2 = CameraSet>; │ │ │ │ -741using CameraSetCal3DS2 = CameraSet>; │ │ │ │ -742using CameraSetCal3Fisheye = CameraSet>; │ │ │ │ -743using CameraSetCal3Unified = CameraSet>; │ │ │ │ -744using CameraSetSpherical = CameraSet; │ │ │ │ -745} // \namespace gtsam │ │ │ │ -746 │ │ │ │ -_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_._h │ │ │ │ -Calibrated camera with spherical projection. │ │ │ │ -_P_o_s_e_2_._h │ │ │ │ -2D Pose │ │ │ │ -_P_i_n_h_o_l_e_C_a_m_e_r_a_._h │ │ │ │ -Base class for all pinhole cameras. │ │ │ │ +66private: │ │ │ │ +67 │ │ │ │ +_6_9 friend class _b_o_o_s_t_:_:_s_e_r_i_a_l_i_z_a_t_i_o_n_:_:_a_c_c_e_s_s; │ │ │ │ +70 template │ │ │ │ +71 void serialize(ARCHIVE & ar, const unsigned int version) { │ │ │ │ +72 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base); │ │ │ │ +73 } │ │ │ │ +74}; │ │ │ │ +75 │ │ │ │ +76template │ │ │ │ +_7_7struct _t_r_a_i_t_s<_P_i_n_h_o_l_e_S_e_t > : public _T_e_s_t_a_b_l_e > { │ │ │ │ +78}; │ │ │ │ +79 │ │ │ │ +80template │ │ │ │ +_8_1struct _t_r_a_i_t_s > : public _T_e_s_t_a_b_l_e │ │ │ │ +> { │ │ │ │ +82}; │ │ │ │ +83 │ │ │ │ +84} // \ namespace gtsam │ │ │ │ +_t_r_i_a_n_g_u_l_a_t_i_o_n_._h │ │ │ │ +Functions for triangulation. │ │ │ │ _C_a_m_e_r_a_S_e_t_._h │ │ │ │ Base class to create smart factors on poses or cameras. │ │ │ │ -_C_a_l_3___S_2_._h │ │ │ │ -The most common 5DOF 3D->2D calibration. │ │ │ │ -_C_a_l_3_U_n_i_f_i_e_d_._h │ │ │ │ -Unified Calibration Model, see Mei07icra for details. │ │ │ │ -_C_a_l_3_F_i_s_h_e_y_e_._h │ │ │ │ -Calibration of a fisheye camera. │ │ │ │ -_C_a_l_3_D_S_2_._h │ │ │ │ -Calibration of a camera with radial distortion, calculations in base class │ │ │ │ -Cal3DS2_Base. │ │ │ │ -_C_a_l_3_B_u_n_d_l_e_r_._h │ │ │ │ -Calibration used by Bundler. │ │ │ │ -_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ -Factor Graph consisting of non-linear factors. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_c_a_l_i_b_r_a_t_e_M_e_a_s_u_r_e_m_e_n_t_s_S_h_a_r_e_d │ │ │ │ -Point3Vector calibrateMeasurementsShared(const CALIBRATION &cal, const │ │ │ │ -Point2Vector &measurements) │ │ │ │ -Convert pixel measurements in image to homogeneous measurements in the image │ │ │ │ -plane using shared camer... │ │ │ │ -DDeeffiinniittiioonn triangulation.h:357 │ │ │ │ -_g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_L_O_S_T │ │ │ │ -Point3 triangulateLOST(const std::vector< Pose3 > &poses, const Point3Vector │ │ │ │ -&calibratedMeasurements, const SharedIsotropic &measurementNoise) │ │ │ │ -Triangulation using the LOST (Linear Optimal Sine Triangulation) algorithm │ │ │ │ -proposed in https://arxiv.... │ │ │ │ -DDeeffiinniittiioonn triangulation.cpp:92 │ │ │ │ -_g_t_s_a_m_:_:_u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_s │ │ │ │ -Point2Vector undistortMeasurements(const CALIBRATION &cal, const Point2Vector │ │ │ │ -&measurements) │ │ │ │ -Remove distortion for measurements so as if the measurements came from a │ │ │ │ -pinhole camera. │ │ │ │ -DDeeffiinniittiioonn triangulation.h:282 │ │ │ │ -_g_t_s_a_m_:_:_c_r_e_a_t_e_P_i_n_h_o_l_e_C_a_l_i_b_r_a_t_i_o_n │ │ │ │ -Cal3_S2 createPinholeCalibration(const CALIBRATION &cal) │ │ │ │ -Create a pinhole calibration from a different Cal3 object, removing distortion. │ │ │ │ -DDeeffiinniittiioonn triangulation.h:253 │ │ │ │ -_g_t_s_a_m_:_:_u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_I_n_t_e_r_n_a_l │ │ │ │ -MEASUREMENT undistortMeasurementInternal(const CALIBRATION &cal, const │ │ │ │ -MEASUREMENT &measurement, boost::optional< Cal3_S2 > pinholeCal=boost::none) │ │ │ │ -Internal undistortMeasurement to be used by undistortMeasurement and │ │ │ │ -undistortMeasurements. │ │ │ │ -DDeeffiinniittiioonn triangulation.h:261 │ │ │ │ -_g_t_s_a_m_:_:_o_p_t_i_m_i_z_e │ │ │ │ -Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key │ │ │ │ -landmarkKey) │ │ │ │ -Optimize for triangulation. │ │ │ │ -DDeeffiinniittiioonn triangulation.cpp:155 │ │ │ │ -_g_t_s_a_m_:_:_P_o_i_n_t_2 │ │ │ │ -Vector2 Point2 │ │ │ │ -As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just │ │ │ │ -typedef Point2 to Vector2... │ │ │ │ -DDeeffiinniittiioonn Point2.h:27 │ │ │ │ _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_S_a_f_e │ │ │ │ TriangulationResult triangulateSafe(const CameraSet< CAMERA > &cameras, const │ │ │ │ typename CAMERA::MeasurementVector &measured, const TriangulationParameters │ │ │ │ ¶ms) │ │ │ │ triangulateSafe: extensive checking of the outcome │ │ │ │ DDeeffiinniittiioonn triangulation.h:680 │ │ │ │ -_g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_N_o_n_l_i_n_e_a_r │ │ │ │ -Point3 triangulateNonlinear(const std::vector< Pose3 > &poses, boost:: │ │ │ │ -shared_ptr< CALIBRATION > sharedCal, const Point2Vector &measurements, const │ │ │ │ -Point3 &initialEstimate, const SharedNoiseModel &model=nullptr) │ │ │ │ -Given an initial estimate , refine a point using measurements in several │ │ │ │ -cameras. │ │ │ │ -DDeeffiinniittiioonn triangulation.h:187 │ │ │ │ -_g_t_s_a_m_:_:_d_i_s_t_a_n_c_e_3 │ │ │ │ -double distance3(const Point3 &p1, const Point3 &q, OptionalJacobian< 1, 3 > │ │ │ │ -H1, OptionalJacobian< 1, 3 > H2) │ │ │ │ -distance between two points │ │ │ │ -DDeeffiinniittiioonn Point3.cpp:27 │ │ │ │ -_g_t_s_a_m_:_:_P_o_i_n_t_3 │ │ │ │ -Vector3 Point3 │ │ │ │ -As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just │ │ │ │ -typedef Point3 to Vector3... │ │ │ │ -DDeeffiinniittiioonn Point3.h:36 │ │ │ │ -_g_t_s_a_m_:_:_S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l │ │ │ │ -noiseModel::Base::shared_ptr SharedNoiseModel │ │ │ │ -Aliases. │ │ │ │ -DDeeffiinniittiioonn NoiseModel.h:724 │ │ │ │ -_g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_P_o_i_n_t_3 │ │ │ │ -Point3 triangulatePoint3(const std::vector< Pose3 > &poses, boost::shared_ptr< │ │ │ │ -CALIBRATION > sharedCal, const Point2Vector &measurements, double rank_tol=1e- │ │ │ │ -9, bool optimize=false, const SharedNoiseModel &model=nullptr, const bool │ │ │ │ -useLOST=false) │ │ │ │ -Function to triangulate 3D landmark point from an arbitrary number of poses (at │ │ │ │ -least 2) using the DL... │ │ │ │ -DDeeffiinniittiioonn triangulation.h:421 │ │ │ │ -_g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_i_o_n_G_r_a_p_h │ │ │ │ -std::pair< NonlinearFactorGraph, Values > triangulationGraph(const std::vector< │ │ │ │ -Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal, const Point2Vector │ │ │ │ -&measurements, Key landmarkKey, const Point3 &initialEstimate, const │ │ │ │ -SharedNoiseModel &model=noiseModel::Unit::Create(2)) │ │ │ │ -Create a factor graph with projection factors from poses and one calibration. │ │ │ │ -DDeeffiinniittiioonn triangulation.h:122 │ │ │ │ -_g_t_s_a_m_:_:_K_e_y │ │ │ │ -std::uint64_t Key │ │ │ │ -Integer nonlinear key type. │ │ │ │ -DDeeffiinniittiioonn types.h:100 │ │ │ │ -_g_t_s_a_m_:_:_c_a_l_i_b_r_a_t_e_M_e_a_s_u_r_e_m_e_n_t_s │ │ │ │ -Point3Vector calibrateMeasurements(const CameraSet< CAMERA > &cameras, const │ │ │ │ -typename CAMERA::MeasurementVector &measurements) │ │ │ │ -Convert pixel measurements in image to homogeneous measurements in the image │ │ │ │ -plane using camera intri... │ │ │ │ -DDeeffiinniittiioonn triangulation.h:381 │ │ │ │ -_g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_D_L_T │ │ │ │ -Point3 triangulateDLT(const std::vector< Matrix34, Eigen::aligned_allocator< │ │ │ │ -Matrix34 > > &projection_matrices, const Point2Vector &measurements, double │ │ │ │ -rank_tol) │ │ │ │ -DLT triangulation: See Hartley and Zisserman, 2nd Ed., page 312. │ │ │ │ -DDeeffiinniittiioonn triangulation.cpp:127 │ │ │ │ -_g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_H_o_m_o_g_e_n_e_o_u_s_D_L_T │ │ │ │ -Vector4 triangulateHomogeneousDLT(const std::vector< Matrix34, Eigen:: │ │ │ │ -aligned_allocator< Matrix34 > > &projection_matrices, const Point2Vector │ │ │ │ -&measurements, double rank_tol) │ │ │ │ -DLT triangulation: See Hartley and Zisserman, 2nd Ed., page 312. │ │ │ │ -DDeeffiinniittiioonn triangulation.cpp:27 │ │ │ │ _g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ that can be centered ... │ │ │ │ DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3___S_2 │ │ │ │ -The most common 5DOF 3D->2D calibration. │ │ │ │ -DDeeffiinniittiioonn Cal3_S2.h:34 │ │ │ │ +_g_t_s_a_m_:_:_T_e_s_t_a_b_l_e │ │ │ │ +A helper that implements the traits interface for GTSAM types. │ │ │ │ +DDeeffiinniittiioonn Testable.h:151 │ │ │ │ _g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t │ │ │ │ A set of cameras, all with their own calibration. │ │ │ │ DDeeffiinniittiioonn CameraSet.h:36 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a │ │ │ │ -A pinhole camera class that has a Pose3 and a Calibration. │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:33 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_P_o_s_e │ │ │ │ -A pinhole camera class that has a Pose3 and a fixed Calibration. │ │ │ │ -DDeeffiinniittiioonn PinholePose.h:243 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_3 │ │ │ │ -A 3D pose (R,t) : (Rot3,Point3) │ │ │ │ -DDeeffiinniittiioonn Pose3.h:37 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_3_:_:_t_r_a_n_s_f_o_r_m_T_o │ │ │ │ -Point3 transformTo(const Point3 &point, OptionalJacobian< 3, 6 > Hself=boost:: │ │ │ │ -none, OptionalJacobian< 3, 3 > Hpoint=boost::none) const │ │ │ │ -takes point in world coordinates and transforms it to Pose coordinates │ │ │ │ -DDeeffiinniittiioonn Pose3.cpp:371 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_3_:_:_t_r_a_n_s_l_a_t_i_o_n │ │ │ │ -const Point3 & translation(OptionalJacobian< 3, 6 > Hself=boost::none) const │ │ │ │ -get translation │ │ │ │ -DDeeffiinniittiioonn Pose3.cpp:308 │ │ │ │ -_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_U_n_d_e_r_c_o_n_s_t_r_a_i_n_e_d_E_x_c_e_p_t_i_o_n │ │ │ │ -Exception thrown by triangulateDLT when SVD returns rank < 3. │ │ │ │ -DDeeffiinniittiioonn triangulation.h:39 │ │ │ │ -_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n │ │ │ │ -Exception thrown by triangulateDLT when landmark is behind one or more of the │ │ │ │ -cameras. │ │ │ │ -DDeeffiinniittiioonn triangulation.h:47 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_S_e_t │ │ │ │ +PinholeSet: triangulates point and keeps an estimate of it around. │ │ │ │ +DDeeffiinniittiioonn PinholeSet.h:30 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_S_e_t_:_:_t_r_i_a_n_g_u_l_a_t_e_S_a_f_e │ │ │ │ +TriangulationResult triangulateSafe(const typename CAMERA::MeasurementVector │ │ │ │ +&measured, const TriangulationParameters ¶ms) const │ │ │ │ +triangulateSafe │ │ │ │ +DDeeffiinniittiioonn PinholeSet.h:60 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_S_e_t_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const PinholeSet &p, double tol=1e-9) const │ │ │ │ +equals │ │ │ │ +DDeeffiinniittiioonn PinholeSet.h:53 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_S_e_t_:_:_~_P_i_n_h_o_l_e_S_e_t │ │ │ │ +virtual ~PinholeSet() │ │ │ │ +Virtual destructor. │ │ │ │ +DDeeffiinniittiioonn PinholeSet.h:41 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_S_e_t_:_:_p_r_i_n_t │ │ │ │ +void print(const std::string &s="") const override │ │ │ │ +print │ │ │ │ +DDeeffiinniittiioonn PinholeSet.h:48 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_S_e_t_:_:_a_c_c_e_s_s │ │ │ │ +friend class boost::serialization::access │ │ │ │ +Serialization function. │ │ │ │ +DDeeffiinniittiioonn PinholeSet.h:69 │ │ │ │ _g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s │ │ │ │ DDeeffiinniittiioonn triangulation.h:556 │ │ │ │ -_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s │ │ │ │ -TriangulationParameters(const double _rankTolerance=1.0, const bool │ │ │ │ -_enableEPI=false, double _landmarkDistanceThreshold=-1, double │ │ │ │ -_dynamicOutlierRejectionThreshold=-1, const SharedNoiseModel │ │ │ │ -&_noiseModel=nullptr) │ │ │ │ -Constructor. │ │ │ │ -DDeeffiinniittiioonn triangulation.h:586 │ │ │ │ -_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s_:_:_d_y_n_a_m_i_c_O_u_t_l_i_e_r_R_e_j_e_c_t_i_o_n_T_h_r_e_s_h_o_l_d │ │ │ │ -double dynamicOutlierRejectionThreshold │ │ │ │ -If this is nonnegative the we will check if the average reprojection error is │ │ │ │ -smaller than this thres... │ │ │ │ -DDeeffiinniittiioonn triangulation.h:573 │ │ │ │ -_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s_:_:_r_a_n_k_T_o_l_e_r_a_n_c_e │ │ │ │ -double rankTolerance │ │ │ │ -threshold to decide whether triangulation is result.degenerate │ │ │ │ -DDeeffiinniittiioonn triangulation.h:558 │ │ │ │ -_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s_:_:_l_a_n_d_m_a_r_k_D_i_s_t_a_n_c_e_T_h_r_e_s_h_o_l_d │ │ │ │ -double landmarkDistanceThreshold │ │ │ │ -if the landmark is triangulated at distance larger than this, result is flagged │ │ │ │ -as degenerate. │ │ │ │ -DDeeffiinniittiioonn triangulation.h:566 │ │ │ │ -_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s_:_:_e_n_a_b_l_e_E_P_I │ │ │ │ -bool enableEPI │ │ │ │ -if set to true, will refine triangulation using LM │ │ │ │ -DDeeffiinniittiioonn triangulation.h:560 │ │ │ │ -_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s_:_:_n_o_i_s_e_M_o_d_e_l │ │ │ │ -SharedNoiseModel noiseModel │ │ │ │ -used in the nonlinear triangulation │ │ │ │ -DDeeffiinniittiioonn triangulation.h:575 │ │ │ │ _g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t │ │ │ │ TriangulationResult is an optional point, along with the reasons why it is │ │ │ │ invalid. │ │ │ │ DDeeffiinniittiioonn triangulation.h:626 │ │ │ │ -_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t │ │ │ │ -TriangulationResult() │ │ │ │ -Default constructor, only for serialization. │ │ │ │ -DDeeffiinniittiioonn triangulation.h:638 │ │ │ │ -_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t │ │ │ │ -TriangulationResult(const Point3 &p) │ │ │ │ -Constructor. │ │ │ │ -DDeeffiinniittiioonn triangulation.h:643 │ │ │ │ -_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t_:_:_a_c_c_e_s_s │ │ │ │ -friend class boost::serialization::access │ │ │ │ -Serialization function. │ │ │ │ -DDeeffiinniittiioonn triangulation.h:671 │ │ │ │ -_g_t_s_a_m_:_:_S_y_m_b_o_l │ │ │ │ -Character and index key used to refer to variables. │ │ │ │ -DDeeffiinniittiioonn Symbol.h:35 │ │ │ │ -_g_t_s_a_m_:_:_n_o_i_s_e_M_o_d_e_l_:_:_I_s_o_t_r_o_p_i_c_:_:_S_i_g_m_a │ │ │ │ -static shared_ptr Sigma(size_t dim, double sigma, bool smart=true) │ │ │ │ -An isotropic noise model created by specifying a standard devation sigma. │ │ │ │ -DDeeffiinniittiioonn NoiseModel.cpp:597 │ │ │ │ -_g_t_s_a_m_:_:_n_o_i_s_e_M_o_d_e_l_:_:_U_n_i_t_:_:_C_r_e_a_t_e │ │ │ │ -static shared_ptr Create(size_t dim) │ │ │ │ -Create a unit covariance noise model. │ │ │ │ -DDeeffiinniittiioonn NoiseModel.h:597 │ │ │ │ -_g_t_s_a_m_:_:_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ -DDeeffiinniittiioonn NonlinearFactorGraph.h:55 │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e_s │ │ │ │ -A non-templated config holding any types of Manifold-group elements. │ │ │ │ -DDeeffiinniittiioonn Values.h:65 │ │ │ │ -_g_t_s_a_m_:_:_V_a_l_u_e_s_:_:_i_n_s_e_r_t │ │ │ │ -void insert(Key j, const Value &val) │ │ │ │ -Add a variable with the given j, throws KeyAlreadyExists if j is already │ │ │ │ -present. │ │ │ │ -DDeeffiinniittiioonn Values.cpp:157 │ │ │ │ -_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_F_a_c_t_o_r │ │ │ │ -Non-linear factor for a constraint derived from a 2D measurement. │ │ │ │ -DDeeffiinniittiioonn TriangulationFactor.h:33 │ │ │ │ -_V_a_l_u_e_s │ │ │ │ -In nonlinear factors, the error function returns the negative log-likelihood as │ │ │ │ -a non-linear function... │ │ │ │ -_S_y_m_b_o_l_._h │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _t_r_i_a_n_g_u_l_a_t_i_o_n_._h │ │ │ │ + * _P_i_n_h_o_l_e_S_e_t_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00281_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Unit3.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3Unified.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,245 +98,127 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    Unit3.h
    │ │ │ +
    Cal3Unified.h
    │ │ │
    │ │ │
    │ │ │ -
    1/* ----------------------------------------------------------------------------
    │ │ │ +Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │ -
    3 * Atlanta, Georgia 30332-0415
    │ │ │ -
    4 * All Rights Reserved
    │ │ │ -
    5 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │ +
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │ +
    4 * Atlanta, Georgia 30332-0415
    │ │ │ +
    5 * All Rights Reserved
    │ │ │
    6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
    │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │ -
    12/*
    │ │ │ -
    13 * @file Unit3.h
    │ │ │ -
    14 * @date Feb 02, 2011
    │ │ │ -
    15 * @author Can Erdogan
    │ │ │ -
    16 * @author Frank Dellaert
    │ │ │ -
    17 * @author Alex Trevor
    │ │ │ -
    18 * @brief Develop a Unit3 class - basically a point on a unit sphere
    │ │ │ -
    19 */
    │ │ │ -
    20
    │ │ │ -
    21#pragma once
    │ │ │ -
    22
    │ │ │ - │ │ │ - │ │ │ -
    25#include <gtsam/base/Manifold.h>
    │ │ │ -
    26#include <gtsam/base/Vector.h>
    │ │ │ - │ │ │ -
    28#include <gtsam/base/Matrix.h>
    │ │ │ -
    29#include <gtsam/dllexport.h>
    │ │ │ -
    30
    │ │ │ -
    31#include <boost/optional.hpp>
    │ │ │ -
    32
    │ │ │ -
    33#include <random>
    │ │ │ -
    34#include <string>
    │ │ │ -
    35
    │ │ │ -
    36#ifdef GTSAM_USE_TBB
    │ │ │ -
    37#include <mutex> // std::mutex
    │ │ │ -
    38#endif
    │ │ │ -
    39
    │ │ │ -
    40namespace gtsam {
    │ │ │ -
    41
    │ │ │ -
    │ │ │ -
    43class GTSAM_EXPORT Unit3 {
    │ │ │ -
    44
    │ │ │ -
    45private:
    │ │ │ -
    46
    │ │ │ -
    47 Vector3 p_;
    │ │ │ -
    48 mutable boost::optional<Matrix32> B_;
    │ │ │ -
    49 mutable boost::optional<Matrix62> H_B_;
    │ │ │ -
    50
    │ │ │ -
    51#ifdef GTSAM_USE_TBB
    │ │ │ -
    52 mutable std::mutex B_mutex_;
    │ │ │ -
    53#endif
    │ │ │ +
    24#pragma once
    │ │ │ +
    25
    │ │ │ +
    26#include <gtsam/geometry/Cal3DS2_Base.h>
    │ │ │ +
    27
    │ │ │ +
    28namespace gtsam {
    │ │ │ +
    29
    │ │ │ +
    │ │ │ +
    45class GTSAM_EXPORT Cal3Unified : public Cal3DS2_Base {
    │ │ │ +
    46 using This = Cal3Unified;
    │ │ │ +
    47 using Base = Cal3DS2_Base;
    │ │ │ +
    48
    │ │ │ +
    49 private:
    │ │ │ +
    50 double xi_ = 0.0f;
    │ │ │ +
    51
    │ │ │ +
    52 public:
    │ │ │ +
    53 enum { dimension = 10 };
    │ │ │
    54
    │ │ │ -
    55public:
    │ │ │ -
    56
    │ │ │ -
    57 enum {
    │ │ │ -
    58 dimension = 2
    │ │ │ -
    59 };
    │ │ │ +
    56 using shared_ptr = boost::shared_ptr<Cal3Unified>;
    │ │ │ +
    57
    │ │ │
    60
    │ │ │ +
    62 Cal3Unified() = default;
    │ │ │
    63
    │ │ │ -
    │ │ │ - │ │ │ -
    66 p_(1.0, 0.0, 0.0) {
    │ │ │ -
    67 }
    │ │ │ -
    │ │ │ -
    68
    │ │ │ -
    70 explicit Unit3(const Vector3& p);
    │ │ │ -
    71
    │ │ │ -
    73 Unit3(double x, double y, double z);
    │ │ │ -
    74
    │ │ │ -
    77 explicit Unit3(const Point2& p, double f);
    │ │ │ -
    78
    │ │ │ -
    │ │ │ -
    80 Unit3(const Unit3& u) {
    │ │ │ -
    81 p_ = u.p_;
    │ │ │ -
    82 }
    │ │ │ -
    │ │ │ -
    83
    │ │ │ -
    │ │ │ -
    85 Unit3& operator=(const Unit3 & u) {
    │ │ │ -
    86 p_ = u.p_;
    │ │ │ -
    87 B_ = u.B_;
    │ │ │ -
    88 H_B_ = u.H_B_;
    │ │ │ -
    89 return *this;
    │ │ │ -
    90 }
    │ │ │ -
    │ │ │ -
    91
    │ │ │ -
    93 static Unit3 FromPoint3(const Point3& point, //
    │ │ │ -
    94 OptionalJacobian<2, 3> H = boost::none);
    │ │ │ -
    95
    │ │ │ -
    102 static Unit3 Random(std::mt19937 & rng);
    │ │ │ -
    103
    │ │ │ -
    105
    │ │ │ -
    108
    │ │ │ -
    109 friend std::ostream& operator<<(std::ostream& os, const Unit3& pair);
    │ │ │ -
    110
    │ │ │ -
    112 void print(const std::string& s = std::string()) const;
    │ │ │ -
    113
    │ │ │ -
    │ │ │ -
    115 bool equals(const Unit3& s, double tol = 1e-9) const {
    │ │ │ -
    116 return equal_with_abs_tol(p_, s.p_, tol);
    │ │ │ -
    117 }
    │ │ │ -
    │ │ │ -
    119
    │ │ │ -
    122
    │ │ │ -
    129 const Matrix32& basis(OptionalJacobian<6, 2> H = boost::none) const;
    │ │ │ -
    130
    │ │ │ -
    132 Matrix3 skew() const;
    │ │ │ -
    133
    │ │ │ -
    135 Point3 point3(OptionalJacobian<3, 2> H = boost::none) const;
    │ │ │ -
    136
    │ │ │ -
    138 Vector3 unitVector(OptionalJacobian<3, 2> H = boost::none) const;
    │ │ │ +
    64 Cal3Unified(double fx, double fy, double s, double u0, double v0, double k1,
    │ │ │ +
    65 double k2, double p1 = 0.0, double p2 = 0.0, double xi = 0.0)
    │ │ │ +
    66 : Base(fx, fy, s, u0, v0, k1, k2, p1, p2), xi_(xi) {}
    │ │ │ +
    67
    │ │ │ +
    68 ~Cal3Unified() override {}
    │ │ │ +
    69
    │ │ │ +
    73
    │ │ │ +
    74 Cal3Unified(const Vector10& v)
    │ │ │ +
    75 : Base(v(0), v(1), v(2), v(3), v(4), v(5), v(6), v(7), v(8)), xi_(v(9)) {}
    │ │ │ +
    76
    │ │ │ +
    80
    │ │ │ +
    82 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os,
    │ │ │ +
    83 const Cal3Unified& cal);
    │ │ │ +
    84
    │ │ │ +
    86 void print(const std::string& s = "") const override;
    │ │ │ +
    87
    │ │ │ +
    89 bool equals(const Cal3Unified& K, double tol = 10e-9) const;
    │ │ │ +
    90
    │ │ │ +
    94
    │ │ │ +
    96 inline double xi() const { return xi_; }
    │ │ │ +
    97
    │ │ │ +
    99 Vector10 vector() const;
    │ │ │ +
    100
    │ │ │ +
    108 Point2 uncalibrate(const Point2& p,
    │ │ │ +
    109 OptionalJacobian<2, 10> Dcal = boost::none,
    │ │ │ +
    110 OptionalJacobian<2, 2> Dp = boost::none) const;
    │ │ │ +
    111
    │ │ │ +
    113 Point2 calibrate(const Point2& p, OptionalJacobian<2, 10> Dcal = boost::none,
    │ │ │ +
    114 OptionalJacobian<2, 2> Dp = boost::none) const;
    │ │ │ +
    115
    │ │ │ +
    117 Point2 spaceToNPlane(const Point2& p) const;
    │ │ │ +
    118
    │ │ │ +
    120 Point2 nPlaneToSpace(const Point2& p) const;
    │ │ │ +
    121
    │ │ │ +
    125
    │ │ │ +
    127 Cal3Unified retract(const Vector& d) const;
    │ │ │ +
    128
    │ │ │ +
    130 Vector localCoordinates(const Cal3Unified& T2) const;
    │ │ │ +
    131
    │ │ │ +
    133 size_t dim() const override { return Dim(); }
    │ │ │ +
    134
    │ │ │ +
    136 inline static size_t Dim() { return dimension; }
    │ │ │ +
    137
    │ │ │
    139
    │ │ │ -
    │ │ │ -
    141 friend Point3 operator*(double s, const Unit3& d) {
    │ │ │ -
    142 return Point3(s * d.p_);
    │ │ │ -
    143 }
    │ │ │ -
    │ │ │ -
    144
    │ │ │ -
    146 double dot(const Unit3& q, OptionalJacobian<1,2> H1 = boost::none, //
    │ │ │ -
    147 OptionalJacobian<1,2> H2 = boost::none) const;
    │ │ │ -
    148
    │ │ │ -
    151 Vector2 error(const Unit3& q, OptionalJacobian<2, 2> H_q = boost::none) const;
    │ │ │ -
    152
    │ │ │ -
    155 Vector2 errorVector(const Unit3& q, OptionalJacobian<2, 2> H_p = boost::none, //
    │ │ │ -
    156 OptionalJacobian<2, 2> H_q = boost::none) const;
    │ │ │ -
    157
    │ │ │ -
    159 double distance(const Unit3& q, OptionalJacobian<1, 2> H = boost::none) const;
    │ │ │ -
    160
    │ │ │ -
    │ │ │ -
    162 Unit3 cross(const Unit3& q) const {
    │ │ │ -
    163 return Unit3(p_.cross(q.p_));
    │ │ │ -
    164 }
    │ │ │ -
    │ │ │ -
    165
    │ │ │ -
    │ │ │ -
    167 Point3 cross(const Point3& q) const {
    │ │ │ -
    168 return point3().cross(q);
    │ │ │ -
    169 }
    │ │ │ -
    │ │ │ -
    170
    │ │ │ -
    172
    │ │ │ -
    175
    │ │ │ -
    │ │ │ -
    177 inline static size_t Dim() {
    │ │ │ -
    178 return 2;
    │ │ │ -
    179 }
    │ │ │ -
    │ │ │ -
    180
    │ │ │ -
    │ │ │ -
    182 inline size_t dim() const {
    │ │ │ -
    183 return 2;
    │ │ │ -
    184 }
    │ │ │ -
    │ │ │ -
    185
    │ │ │ -
    │ │ │ - │ │ │ - │ │ │ -
    188 RENORM
    │ │ │ -
    189 };
    │ │ │ -
    │ │ │ -
    190
    │ │ │ -
    192 Unit3 retract(const Vector2& v, OptionalJacobian<2,2> H = boost::none) const;
    │ │ │ -
    193
    │ │ │ -
    195 Vector2 localCoordinates(const Unit3& s) const;
    │ │ │ -
    196
    │ │ │ -
    198
    │ │ │ -
    199private:
    │ │ │ -
    200
    │ │ │ -
    203
    │ │ │ -
    204 friend class boost::serialization::access;
    │ │ │ -
    205 template<class ARCHIVE>
    │ │ │ -
    206 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
    │ │ │ -
    207 ar & BOOST_SERIALIZATION_NVP(p_);
    │ │ │ -
    208 }
    │ │ │ -
    209
    │ │ │ -
    211
    │ │ │ -
    212public:
    │ │ │ - │ │ │ -
    214};
    │ │ │ -
    │ │ │ -
    215
    │ │ │ -
    216// Define GTSAM traits
    │ │ │ -
    │ │ │ -
    217template<> struct traits<Unit3> : public internal::Manifold<Unit3> {
    │ │ │ -
    218};
    │ │ │ -
    │ │ │ -
    219
    │ │ │ -
    │ │ │ -
    220template<> struct traits<const Unit3> : public internal::Manifold<Unit3> {
    │ │ │ -
    221};
    │ │ │ -
    │ │ │ -
    222
    │ │ │ -
    223} // namespace gtsam
    │ │ │ -
    224
    │ │ │ -
    #define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
    This marks a GTSAM object to require alignment.
    Definition types.h:308
    │ │ │ -
    serialization for Vectors
    │ │ │ -
    typedef and functions to augment Eigen's VectorXd
    │ │ │ -
    typedef and functions to augment Eigen's MatrixXd
    │ │ │ -
    Base class and basic functions for Manifold types.
    │ │ │ -
    3D Point
    │ │ │ -
    2D Point
    │ │ │ +
    140 private:
    │ │ │ +
    142 friend class boost::serialization::access;
    │ │ │ +
    143 template <class Archive>
    │ │ │ +
    144 void serialize(Archive& ar, const unsigned int /*version*/) {
    │ │ │ +
    145 ar& boost::serialization::make_nvp(
    │ │ │ +
    146 "Cal3Unified", boost::serialization::base_object<Cal3DS2_Base>(*this));
    │ │ │ +
    147 ar& BOOST_SERIALIZATION_NVP(xi_);
    │ │ │ +
    148 }
    │ │ │ +
    149};
    │ │ │ +
    │ │ │ +
    150
    │ │ │ +
    151template <>
    │ │ │ +
    152struct traits<Cal3Unified> : public internal::Manifold<Cal3Unified> {};
    │ │ │ +
    153
    │ │ │ +
    154template <>
    │ │ │ +
    155struct traits<const Cal3Unified> : public internal::Manifold<Cal3Unified> {};
    │ │ │ +
    156}
    │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │
    void print(const Matrix &A, const string &s, ostream &stream)
    print without optional string, must specify cout yourself
    Definition Matrix.cpp:156
    │ │ │
    Vector2 Point2
    As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point2 to Vector2...
    Definition Point2.h:27
    │ │ │ -
    Vector3 Point3
    As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point3 to Vector3...
    Definition Point3.h:36
    │ │ │ -
    double dot(const V1 &a, const V2 &b)
    Dot product.
    Definition Vector.h:195
    │ │ │ -
    bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen::DenseBase< MATRIX > &B, double tol=1e-9)
    equals with a tolerance
    Definition Matrix.h:81
    │ │ │
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │
    Both ManifoldTraits and Testable.
    Definition Manifold.h:120
    │ │ │
    OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
    Definition OptionalJacobian.h:41
    │ │ │ -
    Represents a 3D point on a unit sphere.
    Definition Unit3.h:43
    │ │ │ -
    Unit3(const Unit3 &u)
    Copy constructor.
    Definition Unit3.h:80
    │ │ │ -
    Unit3()
    Default constructor.
    Definition Unit3.h:65
    │ │ │ -
    friend Point3 operator*(double s, const Unit3 &d)
    Return scaled direction as Point3.
    Definition Unit3.h:141
    │ │ │ -
    static size_t Dim()
    Dimensionality of tangent space = 2 DOF.
    Definition Unit3.h:177
    │ │ │ -
    size_t dim() const
    Dimensionality of tangent space = 2 DOF.
    Definition Unit3.h:182
    │ │ │ -
    bool equals(const Unit3 &s, double tol=1e-9) const
    The equals function with tolerance.
    Definition Unit3.h:115
    │ │ │ -
    CoordinatesMode
    Definition Unit3.h:186
    │ │ │ -
    @ EXPMAP
    Use the exponential map to retract.
    Definition Unit3.h:187
    │ │ │ -
    Unit3 cross(const Unit3 &q) const
    Cross-product between two Unit3s.
    Definition Unit3.h:162
    │ │ │ -
    Point3 cross(const Point3 &q) const
    Cross-product w Point3.
    Definition Unit3.h:167
    │ │ │ -
    Unit3 & operator=(const Unit3 &u)
    Copy assignment.
    Definition Unit3.h:85
    │ │ │ +
    Calibration of a camera with radial distortion.
    Definition Cal3DS2_Base.h:42
    │ │ │ +
    Calibration of a omni-directional camera with mirror + lens radial distortion.
    Definition Cal3Unified.h:45
    │ │ │ +
    size_t dim() const override
    Return dimensions of calibration manifold object.
    Definition Cal3Unified.h:133
    │ │ │ +
    Cal3Unified()=default
    Default Constructor with only unit focal length.
    │ │ │ +
    double xi() const
    mirror parameter
    Definition Cal3Unified.h:96
    │ │ │ +
    static size_t Dim()
    Return dimensions of calibration manifold object.
    Definition Cal3Unified.h:136
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,285 +1,151 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Unit3.h │ │ │ │ +Cal3Unified.h │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ -3 * Atlanta, Georgia 30332-0415 │ │ │ │ -4 * All Rights Reserved │ │ │ │ -5 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ +3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ +4 * Atlanta, Georgia 30332-0415 │ │ │ │ +5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -12/* │ │ │ │ -13 * @file Unit3.h │ │ │ │ -14 * @date Feb 02, 2011 │ │ │ │ -15 * @author Can Erdogan │ │ │ │ -16 * @author Frank Dellaert │ │ │ │ -17 * @author Alex Trevor │ │ │ │ -18 * @brief Develop a Unit3 class - basically a point on a unit sphere │ │ │ │ -19 */ │ │ │ │ -20 │ │ │ │ -21#pragma once │ │ │ │ -22 │ │ │ │ -23#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_i_n_t_2_._h> │ │ │ │ -24#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_i_n_t_3_._h> │ │ │ │ -25#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_n_i_f_o_l_d_._h> │ │ │ │ -26#include <_g_t_s_a_m_/_b_a_s_e_/_V_e_c_t_o_r_._h> │ │ │ │ -27#include <_g_t_s_a_m_/_b_a_s_e_/_V_e_c_t_o_r_S_e_r_i_a_l_i_z_a_t_i_o_n_._h> │ │ │ │ -28#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_._h> │ │ │ │ -29#include │ │ │ │ -30 │ │ │ │ -31#include │ │ │ │ -32 │ │ │ │ -33#include │ │ │ │ -34#include │ │ │ │ -35 │ │ │ │ -36#ifdef GTSAM_USE_TBB │ │ │ │ -37#include // std::mutex │ │ │ │ -38#endif │ │ │ │ -39 │ │ │ │ -40namespace _g_t_s_a_m { │ │ │ │ -41 │ │ │ │ -_4_3class GTSAM_EXPORT _U_n_i_t_3 { │ │ │ │ -44 │ │ │ │ -45private: │ │ │ │ -46 │ │ │ │ -47 Vector3 p_; │ │ │ │ -48 mutable boost::optional B_; │ │ │ │ -49 mutable boost::optional H_B_; │ │ │ │ -50 │ │ │ │ -51#ifdef GTSAM_USE_TBB │ │ │ │ -52 mutable std::mutex B_mutex_; │ │ │ │ -53#endif │ │ │ │ +24#pragma once │ │ │ │ +25 │ │ │ │ +26#include │ │ │ │ +27 │ │ │ │ +28namespace _g_t_s_a_m { │ │ │ │ +29 │ │ │ │ +_4_5class GTSAM_EXPORT _C_a_l_3_U_n_i_f_i_e_d : public _C_a_l_3_D_S_2___B_a_s_e { │ │ │ │ +46 using _T_h_i_s = _C_a_l_3_U_n_i_f_i_e_d; │ │ │ │ +47 using _B_a_s_e = _C_a_l_3_D_S_2___B_a_s_e; │ │ │ │ +48 │ │ │ │ +49 private: │ │ │ │ +50 double xi_ = 0.0f; │ │ │ │ +51 │ │ │ │ +52 public: │ │ │ │ +53 enum { dimension = 10 }; │ │ │ │ 54 │ │ │ │ -55public: │ │ │ │ -56 │ │ │ │ -57 enum { │ │ │ │ -58 dimension = 2 │ │ │ │ -59 }; │ │ │ │ +56 using shared_ptr = boost::shared_ptr; │ │ │ │ +57 │ │ │ │ 60 │ │ │ │ +_6_2 _C_a_l_3_U_n_i_f_i_e_d() = default; │ │ │ │ 63 │ │ │ │ -_6_5 _U_n_i_t_3() : │ │ │ │ -66 p_(1.0, 0.0, 0.0) { │ │ │ │ -67 } │ │ │ │ -68 │ │ │ │ -70 explicit _U_n_i_t_3(const Vector3& p); │ │ │ │ -71 │ │ │ │ -73 _U_n_i_t_3(double x, double y, double z); │ │ │ │ -74 │ │ │ │ -77 explicit _U_n_i_t_3(const _P_o_i_n_t_2& p, double f); │ │ │ │ -78 │ │ │ │ -_8_0 _U_n_i_t_3(const _U_n_i_t_3& u) { │ │ │ │ -81 p_ = u.p_; │ │ │ │ -82 } │ │ │ │ -83 │ │ │ │ -_8_5 _U_n_i_t_3& _o_p_e_r_a_t_o_r_=(const _U_n_i_t_3 & u) { │ │ │ │ -86 p_ = u.p_; │ │ │ │ -87 B_ = u.B_; │ │ │ │ -88 H_B_ = u.H_B_; │ │ │ │ -89 return *this; │ │ │ │ -90 } │ │ │ │ -91 │ │ │ │ -93 static _U_n_i_t_3 FromPoint3(const _P_o_i_n_t_3& point, // │ │ │ │ -94 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _3_> H = boost::none); │ │ │ │ -95 │ │ │ │ -102 static _U_n_i_t_3 Random(std::mt19937 & rng); │ │ │ │ -103 │ │ │ │ -105 │ │ │ │ -108 │ │ │ │ -109 friend std::ostream& operator<<(std::ostream& os, const _U_n_i_t_3& pair); │ │ │ │ -110 │ │ │ │ -112 void _p_r_i_n_t(const std::string& s = std::string()) const; │ │ │ │ -113 │ │ │ │ -_1_1_5 bool _e_q_u_a_l_s(const _U_n_i_t_3& s, double tol = 1e-9) const { │ │ │ │ -116 return _e_q_u_a_l___w_i_t_h___a_b_s___t_o_l(p_, s.p_, tol); │ │ │ │ -117 } │ │ │ │ -119 │ │ │ │ -122 │ │ │ │ -129 const Matrix32& basis(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _2_> H = boost::none) const; │ │ │ │ -130 │ │ │ │ -132 Matrix3 skew() const; │ │ │ │ -133 │ │ │ │ -135 _P_o_i_n_t_3 point3(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _2_> H = boost::none) const; │ │ │ │ -136 │ │ │ │ -138 Vector3 unitVector(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _2_> H = boost::none) const; │ │ │ │ +64 _C_a_l_3_U_n_i_f_i_e_d(double fx, double fy, double s, double u0, double v0, double k1, │ │ │ │ +65 double k2, double p1 = 0.0, double p2 = 0.0, double xi = 0.0) │ │ │ │ +66 : _B_a_s_e(fx, fy, s, u0, v0, k1, k2, p1, p2), xi_(xi) {} │ │ │ │ +67 │ │ │ │ +68 _~_C_a_l_3_U_n_i_f_i_e_d() override {} │ │ │ │ +69 │ │ │ │ +73 │ │ │ │ +74 Cal3Unified(const Vector10& v) │ │ │ │ +75 : Base(v(0), v(1), v(2), v(3), v(4), v(5), v(6), v(7), v(8)), xi_(v(9)) {} │ │ │ │ +76 │ │ │ │ +80 │ │ │ │ +82 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os, │ │ │ │ +83 const Cal3Unified& cal); │ │ │ │ +84 │ │ │ │ +86 void _p_r_i_n_t(const std::string& s = "") const override; │ │ │ │ +87 │ │ │ │ +89 bool equals(const Cal3Unified& K, double tol = 10e-9) const; │ │ │ │ +90 │ │ │ │ +94 │ │ │ │ +_9_6 inline double _x_i() const { return xi_; } │ │ │ │ +97 │ │ │ │ +99 Vector10 vector() const; │ │ │ │ +100 │ │ │ │ +108 _P_o_i_n_t_2 uncalibrate(const _P_o_i_n_t_2& p, │ │ │ │ +109 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _1_0_> Dcal = boost::none, │ │ │ │ +110 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dp = boost::none) const; │ │ │ │ +111 │ │ │ │ +113 _P_o_i_n_t_2 calibrate(const _P_o_i_n_t_2& p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _1_0_> Dcal = boost:: │ │ │ │ +none, │ │ │ │ +114 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dp = boost::none) const; │ │ │ │ +115 │ │ │ │ +117 _P_o_i_n_t_2 spaceToNPlane(const _P_o_i_n_t_2& p) const; │ │ │ │ +118 │ │ │ │ +120 _P_o_i_n_t_2 nPlaneToSpace(const _P_o_i_n_t_2& p) const; │ │ │ │ +121 │ │ │ │ +125 │ │ │ │ +127 _C_a_l_3_U_n_i_f_i_e_d retract(const Vector& d) const; │ │ │ │ +128 │ │ │ │ +130 Vector localCoordinates(const _C_a_l_3_U_n_i_f_i_e_d& T2) const; │ │ │ │ +131 │ │ │ │ +_1_3_3 size_t _d_i_m() const override { return Dim(); } │ │ │ │ +134 │ │ │ │ +_1_3_6 inline static size_t _D_i_m() { return dimension; } │ │ │ │ +137 │ │ │ │ 139 │ │ │ │ -_1_4_1 friend _P_o_i_n_t_3 _o_p_e_r_a_t_o_r_*(double s, const _U_n_i_t_3& d) { │ │ │ │ -142 return _P_o_i_n_t_3(s * d.p_); │ │ │ │ -143 } │ │ │ │ -144 │ │ │ │ -146 double _d_o_t(const _U_n_i_t_3& q, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_2_> H1 = boost::none, // │ │ │ │ -147 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_2_> H2 = boost::none) const; │ │ │ │ -148 │ │ │ │ -151 Vector2 error(const _U_n_i_t_3& q, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> H_q = boost::none) │ │ │ │ -const; │ │ │ │ -152 │ │ │ │ -155 Vector2 errorVector(const _U_n_i_t_3& q, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> H_p = boost:: │ │ │ │ -none, // │ │ │ │ -156 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> H_q = boost::none) const; │ │ │ │ -157 │ │ │ │ -159 double distance(const _U_n_i_t_3& q, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _2_> H = boost::none) │ │ │ │ -const; │ │ │ │ -160 │ │ │ │ -_1_6_2 _U_n_i_t_3 _c_r_o_s_s(const _U_n_i_t_3& q) const { │ │ │ │ -163 return _U_n_i_t_3(p_.cross(q.p_)); │ │ │ │ -164 } │ │ │ │ -165 │ │ │ │ -_1_6_7 _P_o_i_n_t_3 _c_r_o_s_s(const _P_o_i_n_t_3& q) const { │ │ │ │ -168 return point3().cross(q); │ │ │ │ -169 } │ │ │ │ -170 │ │ │ │ -172 │ │ │ │ -175 │ │ │ │ -_1_7_7 inline static size_t _D_i_m() { │ │ │ │ -178 return 2; │ │ │ │ -179 } │ │ │ │ -180 │ │ │ │ -_1_8_2 inline size_t _d_i_m() const { │ │ │ │ -183 return 2; │ │ │ │ -184 } │ │ │ │ -185 │ │ │ │ -_1_8_6 enum _C_o_o_r_d_i_n_a_t_e_s_M_o_d_e { │ │ │ │ -_1_8_7 _E_X_P_M_A_P, │ │ │ │ -188 RENORM │ │ │ │ -_1_8_9 }; │ │ │ │ -190 │ │ │ │ -192 _U_n_i_t_3 retract(const Vector2& v, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_2_> H = boost::none) │ │ │ │ -const; │ │ │ │ -193 │ │ │ │ -195 Vector2 localCoordinates(const _U_n_i_t_3& s) const; │ │ │ │ -196 │ │ │ │ -198 │ │ │ │ -199private: │ │ │ │ -200 │ │ │ │ -203 │ │ │ │ -_2_0_4 friend class boost::serialization::access; │ │ │ │ -205 template │ │ │ │ -206 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ -207 ar & BOOST_SERIALIZATION_NVP(p_); │ │ │ │ -208 } │ │ │ │ -209 │ │ │ │ -211 │ │ │ │ -212public: │ │ │ │ -213 _G_T_S_A_M___M_A_K_E___A_L_I_G_N_E_D___O_P_E_R_A_T_O_R___N_E_W │ │ │ │ -214}; │ │ │ │ -215 │ │ │ │ -216// Define GTSAM traits │ │ │ │ -_2_1_7template<> struct _t_r_a_i_t_s<_U_n_i_t_3> : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d { │ │ │ │ -218}; │ │ │ │ -219 │ │ │ │ -_2_2_0template<> struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d { │ │ │ │ -221}; │ │ │ │ -222 │ │ │ │ -223} // namespace gtsam │ │ │ │ -224 │ │ │ │ -_G_T_S_A_M___M_A_K_E___A_L_I_G_N_E_D___O_P_E_R_A_T_O_R___N_E_W │ │ │ │ -#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW │ │ │ │ -This marks a GTSAM object to require alignment. │ │ │ │ -DDeeffiinniittiioonn types.h:308 │ │ │ │ -_V_e_c_t_o_r_S_e_r_i_a_l_i_z_a_t_i_o_n_._h │ │ │ │ -serialization for Vectors │ │ │ │ -_V_e_c_t_o_r_._h │ │ │ │ -typedef and functions to augment Eigen's VectorXd │ │ │ │ -_M_a_t_r_i_x_._h │ │ │ │ -typedef and functions to augment Eigen's MatrixXd │ │ │ │ -_M_a_n_i_f_o_l_d_._h │ │ │ │ -Base class and basic functions for Manifold types. │ │ │ │ -_P_o_i_n_t_3_._h │ │ │ │ -3D Point │ │ │ │ -_P_o_i_n_t_2_._h │ │ │ │ -2D Point │ │ │ │ +140 private: │ │ │ │ +_1_4_2 friend class boost::serialization::access; │ │ │ │ +143 template │ │ │ │ +144 void serialize(Archive& ar, const unsigned int /*version*/) { │ │ │ │ +145 ar& boost::serialization::make_nvp( │ │ │ │ +146 "Cal3Unified", boost::serialization::base_object(*this)); │ │ │ │ +147 ar& BOOST_SERIALIZATION_NVP(xi_); │ │ │ │ +148 } │ │ │ │ +149}; │ │ │ │ +150 │ │ │ │ +151template <> │ │ │ │ +_1_5_2struct _t_r_a_i_t_s<_C_a_l_3_U_n_i_f_i_e_d> : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d {}; │ │ │ │ +153 │ │ │ │ +154template <> │ │ │ │ +_1_5_5struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d │ │ │ │ +{}; │ │ │ │ +156} │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ _g_t_s_a_m_:_:_p_r_i_n_t │ │ │ │ void print(const Matrix &A, const string &s, ostream &stream) │ │ │ │ print without optional string, must specify cout yourself │ │ │ │ DDeeffiinniittiioonn Matrix.cpp:156 │ │ │ │ _g_t_s_a_m_:_:_P_o_i_n_t_2 │ │ │ │ Vector2 Point2 │ │ │ │ As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just │ │ │ │ typedef Point2 to Vector2... │ │ │ │ DDeeffiinniittiioonn Point2.h:27 │ │ │ │ -_g_t_s_a_m_:_:_P_o_i_n_t_3 │ │ │ │ -Vector3 Point3 │ │ │ │ -As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just │ │ │ │ -typedef Point3 to Vector3... │ │ │ │ -DDeeffiinniittiioonn Point3.h:36 │ │ │ │ -_g_t_s_a_m_:_:_d_o_t │ │ │ │ -double dot(const V1 &a, const V2 &b) │ │ │ │ -Dot product. │ │ │ │ -DDeeffiinniittiioonn Vector.h:195 │ │ │ │ -_g_t_s_a_m_:_:_e_q_u_a_l___w_i_t_h___a_b_s___t_o_l │ │ │ │ -bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen:: │ │ │ │ -DenseBase< MATRIX > &B, double tol=1e-9) │ │ │ │ -equals with a tolerance │ │ │ │ -DDeeffiinniittiioonn Matrix.h:81 │ │ │ │ _g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ that can be centered ... │ │ │ │ DDeeffiinniittiioonn concepts.h:30 │ │ │ │ _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d │ │ │ │ Both ManifoldTraits and Testable. │ │ │ │ DDeeffiinniittiioonn Manifold.h:120 │ │ │ │ _g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ either a fixed size o... │ │ │ │ DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ -_g_t_s_a_m_:_:_U_n_i_t_3 │ │ │ │ -Represents a 3D point on a unit sphere. │ │ │ │ -DDeeffiinniittiioonn Unit3.h:43 │ │ │ │ -_g_t_s_a_m_:_:_U_n_i_t_3_:_:_U_n_i_t_3 │ │ │ │ -Unit3(const Unit3 &u) │ │ │ │ -Copy constructor. │ │ │ │ -DDeeffiinniittiioonn Unit3.h:80 │ │ │ │ -_g_t_s_a_m_:_:_U_n_i_t_3_:_:_U_n_i_t_3 │ │ │ │ -Unit3() │ │ │ │ -Default constructor. │ │ │ │ -DDeeffiinniittiioonn Unit3.h:65 │ │ │ │ -_g_t_s_a_m_:_:_U_n_i_t_3_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -friend Point3 operator*(double s, const Unit3 &d) │ │ │ │ -Return scaled direction as Point3. │ │ │ │ -DDeeffiinniittiioonn Unit3.h:141 │ │ │ │ -_g_t_s_a_m_:_:_U_n_i_t_3_:_:_D_i_m │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_D_S_2___B_a_s_e │ │ │ │ +Calibration of a camera with radial distortion. │ │ │ │ +DDeeffiinniittiioonn Cal3DS2_Base.h:42 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_U_n_i_f_i_e_d │ │ │ │ +Calibration of a omni-directional camera with mirror + lens radial distortion. │ │ │ │ +DDeeffiinniittiioonn Cal3Unified.h:45 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_U_n_i_f_i_e_d_:_:_d_i_m │ │ │ │ +size_t dim() const override │ │ │ │ +Return dimensions of calibration manifold object. │ │ │ │ +DDeeffiinniittiioonn Cal3Unified.h:133 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_U_n_i_f_i_e_d_:_:_C_a_l_3_U_n_i_f_i_e_d │ │ │ │ +Cal3Unified()=default │ │ │ │ +Default Constructor with only unit focal length. │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_U_n_i_f_i_e_d_:_:_x_i │ │ │ │ +double xi() const │ │ │ │ +mirror parameter │ │ │ │ +DDeeffiinniittiioonn Cal3Unified.h:96 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_U_n_i_f_i_e_d_:_:_D_i_m │ │ │ │ static size_t Dim() │ │ │ │ -Dimensionality of tangent space = 2 DOF. │ │ │ │ -DDeeffiinniittiioonn Unit3.h:177 │ │ │ │ -_g_t_s_a_m_:_:_U_n_i_t_3_:_:_d_i_m │ │ │ │ -size_t dim() const │ │ │ │ -Dimensionality of tangent space = 2 DOF. │ │ │ │ -DDeeffiinniittiioonn Unit3.h:182 │ │ │ │ -_g_t_s_a_m_:_:_U_n_i_t_3_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const Unit3 &s, double tol=1e-9) const │ │ │ │ -The equals function with tolerance. │ │ │ │ -DDeeffiinniittiioonn Unit3.h:115 │ │ │ │ -_g_t_s_a_m_:_:_U_n_i_t_3_:_:_C_o_o_r_d_i_n_a_t_e_s_M_o_d_e │ │ │ │ -CoordinatesMode │ │ │ │ -DDeeffiinniittiioonn Unit3.h:186 │ │ │ │ -_g_t_s_a_m_:_:_U_n_i_t_3_:_:_E_X_P_M_A_P │ │ │ │ -@ EXPMAP │ │ │ │ -Use the exponential map to retract. │ │ │ │ -DDeeffiinniittiioonn Unit3.h:187 │ │ │ │ -_g_t_s_a_m_:_:_U_n_i_t_3_:_:_c_r_o_s_s │ │ │ │ -Unit3 cross(const Unit3 &q) const │ │ │ │ -Cross-product between two Unit3s. │ │ │ │ -DDeeffiinniittiioonn Unit3.h:162 │ │ │ │ -_g_t_s_a_m_:_:_U_n_i_t_3_:_:_c_r_o_s_s │ │ │ │ -Point3 cross(const Point3 &q) const │ │ │ │ -Cross-product w Point3. │ │ │ │ -DDeeffiinniittiioonn Unit3.h:167 │ │ │ │ -_g_t_s_a_m_:_:_U_n_i_t_3_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -Unit3 & operator=(const Unit3 &u) │ │ │ │ -Copy assignment. │ │ │ │ -DDeeffiinniittiioonn Unit3.h:85 │ │ │ │ +Return dimensions of calibration manifold object. │ │ │ │ +DDeeffiinniittiioonn Cal3Unified.h:136 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * UUnniitt33..hh │ │ │ │ + * _C_a_l_3_U_n_i_f_i_e_d_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00287.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/StereoPoint2.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Point3.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,54 +96,97 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Classes | │ │ │ Namespaces | │ │ │ -Typedefs
    │ │ │ -
    StereoPoint2.h File Reference
    │ │ │ +Typedefs | │ │ │ +Functions
    │ │ │ +
    Point3.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    A 2D stereo point (uL,uR,v) │ │ │ +

    3D Point │ │ │ More...

    │ │ │ │ │ │

    Go to the source code of this file.

    │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ │ │ │

    │ │ │ Classes

    class  gtsam::StereoPoint2
     A 2D stereo point, v will be same for rectified images. More...
     
    struct  gtsam::traits< StereoPoint2 >
     
    struct  gtsam::traits< const StereoPoint2 >
    struct  gtsam::Range< Point3, Point3 >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ Typedefs

    │ │ │ -typedef std::vector< StereoPoint2gtsam::StereoPoint2Vector
     
    │ │ │ +typedef Vector3 gtsam::Point3
     As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point3 to Vector3.
     
    │ │ │ +typedef std::vector< Point3, Eigen::aligned_allocator< Point3 > > gtsam::Point3Vector
     
    │ │ │ +using gtsam::Point3Pair = std::pair< Point3, Point3 >
     
    │ │ │ +using gtsam::Point3Pairs = std::vector< Point3Pair >
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ +Functions

    │ │ │ +ostream & gtsam::operator<< (ostream &os, const gtsam::Point3Pair &p)
     
    │ │ │ +double gtsam::distance3 (const Point3 &p1, const Point3 &q, OptionalJacobian< 1, 3 > H1=boost::none, OptionalJacobian< 1, 3 > H2=boost::none)
     distance between two points
     
    │ │ │ +double gtsam::norm3 (const Point3 &p, OptionalJacobian< 1, 3 > H=boost::none)
     Distance of the point from the origin, with Jacobian.
     
    │ │ │ +Point3 gtsam::normalize (const Point3 &p, OptionalJacobian< 3, 3 > H=boost::none)
     normalize, with optional Jacobian
     
    Point3 gtsam::cross (const Point3 &p, const Point3 &q, OptionalJacobian< 3, 3 > H_p=boost::none, OptionalJacobian< 3, 3 > H_q=boost::none)
     cross product
     
    │ │ │ +double gtsam::dot (const Point3 &p, const Point3 &q, OptionalJacobian< 1, 3 > H_p=boost::none, OptionalJacobian< 1, 3 > H_q=boost::none)
     dot product
     
    │ │ │ +template<class CONTAINER >
    Point3 gtsam::mean (const CONTAINER &points)
     mean
     
    │ │ │ +Point3Pair gtsam::means (const std::vector< Point3Pair > &abPointPairs)
     Calculate the two means of a set of Point3 pairs.
     
    │ │ │

    Detailed Description

    │ │ │ -

    A 2D stereo point (uL,uR,v)

    │ │ │ -
    Date
    Jan 26, 2010
    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ +

    3D Point

    │ │ │ +
    Author
    Alireza Fathi
    │ │ │ +
    │ │ │ +Christian Potthast
    │ │ │ +
    │ │ │ +Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,34 +1,72 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ -StereoPoint2.h File Reference │ │ │ │ -A 2D stereo point (uL,uR,v) _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Point3.h File Reference │ │ │ │ +3D Point _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2 │ │ │ │ -  A 2D stereo point, v will be same for rectified images. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _S_t_e_r_e_o_P_o_i_n_t_2_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _S_t_e_r_e_o_P_o_i_n_t_2_ _> │ │ │ │ +struct   _g_t_s_a_m_:_:_R_a_n_g_e_<_ _P_o_i_n_t_3_,_ _P_o_i_n_t_3_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ TTyyppeeddeeffss │ │ │ │ -typedef std::vector< _S_t_e_r_e_o_P_o_i_n_t_2 >  ggttssaamm::::SStteerreeooPPooiinntt22VVeeccttoorr │ │ │ │ + typedef Vector3  ggttssaamm::::PPooiinntt33 │ │ │ │ + As of GTSAM 4, in order to make GTSAM more │ │ │ │ +  lean, it is now possible to just typedef │ │ │ │ + Point3 to Vector3. │ │ │ │ +  │ │ │ │ +typedef std::vector< _P_o_i_n_t_3, Eigen:: │ │ │ │ + aligned_allocator< _P_o_i_n_t_3 > >  ggttssaamm::::PPooiinntt33VVeeccttoorr │ │ │ │ +  │ │ │ │ + using  ggttssaamm::::PPooiinntt33PPaaiirr = std::pair< _P_o_i_n_t_3, │ │ │ │ + _P_o_i_n_t_3 > │ │ │ │ +  │ │ │ │ + using  ggttssaamm::::PPooiinntt33PPaaiirrss = std::vector< │ │ │ │ + Point3Pair > │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ + ostream &  ggttssaamm::::ooppeerraattoorr<<<< (ostream &os, const gtsam::Point3Pair &p) │ │ │ │ +  │ │ │ │ + double  ggttssaamm::::ddiissttaannccee33 (const _P_o_i_n_t_3 &p1, const _P_o_i_n_t_3 &q, │ │ │ │ + _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 3 > H1=boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 3 > │ │ │ │ + H2=boost::none) │ │ │ │ +  distance between two points │ │ │ │ +  │ │ │ │ + double  ggttssaamm::::nnoorrmm33 (const _P_o_i_n_t_3 &p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 3 > H=boost:: │ │ │ │ + none) │ │ │ │ +  Distance of the point from the origin, with Jacobian. │ │ │ │ +  │ │ │ │ + _P_o_i_n_t_3  ggttssaamm::::nnoorrmmaalliizzee (const _P_o_i_n_t_3 &p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 3, 3 > │ │ │ │ + H=boost::none) │ │ │ │ +  normalize, with optional Jacobian │ │ │ │ +  │ │ │ │ + _P_o_i_n_t_3  _g_t_s_a_m_:_:_c_r_o_s_s (const _P_o_i_n_t_3 &p, const _P_o_i_n_t_3 &q, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< │ │ │ │ + 3, 3 > H_p=boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 3, 3 > H_q=boost::none) │ │ │ │ +  cross product │ │ │ │ +  │ │ │ │ + double  ggttssaamm::::ddoott (const _P_o_i_n_t_3 &p, const _P_o_i_n_t_3 &q, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, │ │ │ │ + 3 > H_p=boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 3 > H_q=boost::none) │ │ │ │ +  dot product │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _P_o_i_n_t_3  ggttssaamm::::mmeeaann (const CONTAINER &points) │ │ │ │ +  mean │ │ │ │ +  │ │ │ │ +Point3Pair  ggttssaamm::::mmeeaannss (const std::vector< Point3Pair > &abPointPairs) │ │ │ │ +  Calculate the two means of a set of Point3 pairs. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A 2D stereo point (uL,uR,v) │ │ │ │ - Date │ │ │ │ - Jan 26, 2010 │ │ │ │ +3D Point │ │ │ │ Author │ │ │ │ + Alireza Fathi │ │ │ │ + Christian Potthast │ │ │ │ Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_t_e_r_e_o_P_o_i_n_t_2_._h │ │ │ │ + * _P_o_i_n_t_3_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00287.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,11 @@ │ │ │ │ var a00287 = [ │ │ │ │ - ["gtsam::traits< StereoPoint2 >", "a03356.html", null], │ │ │ │ - ["gtsam::traits< const StereoPoint2 >", "a03360.html", null] │ │ │ │ + ["gtsam::Range< Point3, Point3 >", "a03152.html", null], │ │ │ │ + ["Point3", "a00287.html#aaa8ed89fd60ea4601d9de63c4811525b", null], │ │ │ │ + ["cross", "a00287.html#a86bf6ed2ffb0ecc42a7deb8922f4ca4f", null], │ │ │ │ + ["distance3", "a00287.html#aa42f7ec660b7353de39f9c86a26711cc", null], │ │ │ │ + ["dot", "a00287.html#a7dc820e4e47218768f104b43a184a1bd", null], │ │ │ │ + ["mean", "a00287.html#a300205092710091b8745c0a145da20a1", null], │ │ │ │ + ["means", "a00287.html#a57f778b84bc6106471006421d289b832", null], │ │ │ │ + ["norm3", "a00287.html#ac37b6f807985ffd25217e33f6136fe58", null], │ │ │ │ + ["normalize", "a00287.html#abb52bb00c68909fc1147e5d112e8c2ae", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00287_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/StereoPoint2.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Point3.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,187 +98,113 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    StereoPoint2.h
    │ │ │ +
    Point3.h
    │ │ │
    │ │ │
    │ │ │ Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │
    4 * Atlanta, Georgia 30332-0415
    │ │ │
    5 * All Rights Reserved
    │ │ │
    6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
    │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │ -
    19#pragma once
    │ │ │ -
    20
    │ │ │ - │ │ │ -
    22#include <gtsam/base/VectorSpace.h>
    │ │ │ -
    23#include <boost/serialization/nvp.hpp>
    │ │ │ -
    24
    │ │ │ -
    25namespace gtsam {
    │ │ │ -
    26
    │ │ │ -
    │ │ │ -
    32class GTSAM_EXPORT StereoPoint2 {
    │ │ │ -
    33private:
    │ │ │ -
    34
    │ │ │ -
    35 double uL_, uR_, v_;
    │ │ │ -
    36
    │ │ │ -
    37public:
    │ │ │ -
    38 enum { dimension = 3 };
    │ │ │ -
    41
    │ │ │ -
    │ │ │ - │ │ │ -
    44 uL_(0), uR_(0), v_(0) {
    │ │ │ -
    45 }
    │ │ │ -
    │ │ │ -
    46
    │ │ │ -
    │ │ │ -
    48 StereoPoint2(double uL, double uR, double v) :
    │ │ │ -
    49 uL_(uL), uR_(uR), v_(v) {
    │ │ │ -
    50 }
    │ │ │ -
    │ │ │ -
    51
    │ │ │ -
    │ │ │ -
    53 explicit StereoPoint2(const Vector3& v) :
    │ │ │ -
    54 uL_(v(0)), uR_(v(1)), v_(v(2)) {}
    │ │ │ -
    │ │ │ +
    20// \callgraph
    │ │ │ +
    21
    │ │ │ +
    22#pragma once
    │ │ │ +
    23
    │ │ │ +
    24#include <gtsam/config.h>
    │ │ │ +
    25#include <gtsam/base/VectorSpace.h>
    │ │ │ +
    26#include <gtsam/base/Vector.h>
    │ │ │ +
    27#include <gtsam/dllexport.h>
    │ │ │ + │ │ │ +
    29#include <boost/serialization/nvp.hpp>
    │ │ │ +
    30#include <numeric>
    │ │ │ +
    31
    │ │ │ +
    32namespace gtsam {
    │ │ │ +
    33
    │ │ │ +
    36typedef Vector3 Point3;
    │ │ │ +
    37typedef std::vector<Point3, Eigen::aligned_allocator<Point3> > Point3Vector;
    │ │ │ +
    38
    │ │ │ +
    39// Convenience typedef
    │ │ │ +
    40using Point3Pair = std::pair<Point3, Point3>;
    │ │ │ +
    41GTSAM_EXPORT std::ostream &operator<<(std::ostream &os, const gtsam::Point3Pair &p);
    │ │ │ +
    42
    │ │ │ +
    43using Point3Pairs = std::vector<Point3Pair>;
    │ │ │ +
    44
    │ │ │ +
    46GTSAM_EXPORT double distance3(const Point3& p1, const Point3& q,
    │ │ │ +
    47 OptionalJacobian<1, 3> H1 = boost::none,
    │ │ │ +
    48 OptionalJacobian<1, 3> H2 = boost::none);
    │ │ │ +
    49
    │ │ │ +
    51GTSAM_EXPORT double norm3(const Point3& p, OptionalJacobian<1, 3> H = boost::none);
    │ │ │ +
    52
    │ │ │ +
    54GTSAM_EXPORT Point3 normalize(const Point3& p, OptionalJacobian<3, 3> H = boost::none);
    │ │ │
    55
    │ │ │ -
    59
    │ │ │ -
    61 void print(const std::string& s = "") const;
    │ │ │ -
    62
    │ │ │ -
    │ │ │ -
    64 bool equals(const StereoPoint2& q, double tol = 1e-9) const {
    │ │ │ -
    65 return (std::abs(uL_ - q.uL_) < tol && std::abs(uR_ - q.uR_) < tol
    │ │ │ -
    66 && std::abs(v_ - q.v_) < tol);
    │ │ │ -
    67 }
    │ │ │ -
    │ │ │ -
    68
    │ │ │ -
    72
    │ │ │ -
    │ │ │ -
    74 inline static StereoPoint2 Identity() {
    │ │ │ -
    75 return StereoPoint2();
    │ │ │ -
    76 }
    │ │ │ +
    57GTSAM_EXPORT Point3 cross(const Point3& p, const Point3& q,
    │ │ │ +
    58 OptionalJacobian<3, 3> H_p = boost::none,
    │ │ │ +
    59 OptionalJacobian<3, 3> H_q = boost::none);
    │ │ │ +
    60
    │ │ │ +
    62GTSAM_EXPORT double dot(const Point3& p, const Point3& q,
    │ │ │ +
    63 OptionalJacobian<1, 3> H_p = boost::none,
    │ │ │ +
    64 OptionalJacobian<1, 3> H_q = boost::none);
    │ │ │ +
    65
    │ │ │ +
    67template <class CONTAINER>
    │ │ │ +
    │ │ │ +
    68Point3 mean(const CONTAINER& points) {
    │ │ │ +
    69 if (points.size() == 0) throw std::invalid_argument("Point3::mean input container is empty");
    │ │ │ +
    70 Point3 sum(0, 0, 0);
    │ │ │ +
    71 sum = std::accumulate(points.begin(), points.end(), sum);
    │ │ │ +
    72 return sum / points.size();
    │ │ │ +
    73}
    │ │ │
    │ │ │ +
    74
    │ │ │ +
    76GTSAM_EXPORT Point3Pair means(const std::vector<Point3Pair> &abPointPairs);
    │ │ │
    77
    │ │ │ -
    │ │ │ - │ │ │ -
    80 return StereoPoint2(-uL_, -uR_, -v_);
    │ │ │ -
    81 }
    │ │ │ -
    │ │ │ -
    82
    │ │ │ -
    │ │ │ -
    84 inline StereoPoint2 operator +(const Vector3& v) const {
    │ │ │ -
    85 return StereoPoint2(uL_ + v[0], uR_ + v[1], v_ + v[2]);
    │ │ │ -
    86 }
    │ │ │ -
    │ │ │ -
    87
    │ │ │ -
    │ │ │ -
    89 inline StereoPoint2 operator +(const StereoPoint2& b) const {
    │ │ │ -
    90 return StereoPoint2(uL_ + b.uL_, uR_ + b.uR_, v_ + b.v_);
    │ │ │ -
    91 }
    │ │ │ +
    78template <typename A1, typename A2>
    │ │ │ +
    79struct Range;
    │ │ │ +
    80
    │ │ │ +
    81template <>
    │ │ │ +
    │ │ │ + │ │ │ +
    83 typedef double result_type;
    │ │ │ +
    84 double operator()(const Point3& p, const Point3& q,
    │ │ │ +
    85 OptionalJacobian<1, 3> H1 = boost::none,
    │ │ │ +
    86 OptionalJacobian<1, 3> H2 = boost::none) {
    │ │ │ +
    87 return distance3(p, q, H1, H2);
    │ │ │ +
    88 }
    │ │ │ +
    89};
    │ │ │
    │ │ │ +
    90
    │ │ │ +
    91} // namespace gtsam
    │ │ │
    92
    │ │ │ -
    │ │ │ -
    94 inline StereoPoint2 operator -(const StereoPoint2& b) const {
    │ │ │ -
    95 return StereoPoint2(uL_ - b.uL_, uR_ - b.uR_, v_ - b.v_);
    │ │ │ -
    96 }
    │ │ │ -
    │ │ │ -
    97
    │ │ │ -
    101
    │ │ │ -
    103 inline bool operator ==(const StereoPoint2& q) const {return uL_== q.uL_ && uR_==q.uR_ && v_ == q.v_;}
    │ │ │ -
    104
    │ │ │ -
    106 inline double uL() const {return uL_;}
    │ │ │ -
    107
    │ │ │ -
    109 inline double uR() const {return uR_;}
    │ │ │ -
    110
    │ │ │ -
    112 inline double v() const {return v_;}
    │ │ │ -
    113
    │ │ │ -
    │ │ │ -
    115 Vector3 vector() const {
    │ │ │ -
    116 return Vector3(uL_, uR_, v_);
    │ │ │ -
    117 }
    │ │ │ -
    │ │ │ -
    118
    │ │ │ -
    │ │ │ -
    120 Point2 point2() const {
    │ │ │ -
    121 return Point2(uL_, v_);
    │ │ │ -
    122 }
    │ │ │ -
    │ │ │ -
    123
    │ │ │ -
    │ │ │ -
    125 Point2 right() const {
    │ │ │ -
    126 return Point2(uR_, v_);
    │ │ │ -
    127 }
    │ │ │ -
    │ │ │ -
    128
    │ │ │ -
    131 inline StereoPoint2 inverse() const { return StereoPoint2()- (*this);}
    │ │ │ -
    132 inline StereoPoint2 compose(const StereoPoint2& p1) const { return *this + p1;}
    │ │ │ -
    133 inline StereoPoint2 between(const StereoPoint2& p2) const { return p2 - *this; }
    │ │ │ -
    134 inline Vector localCoordinates(const StereoPoint2& t2) const { return Logmap(between(t2)); }
    │ │ │ -
    135 inline StereoPoint2 retract(const Vector& v) const { return compose(Expmap(v)); }
    │ │ │ -
    136 static inline Vector Logmap(const StereoPoint2& p) { return p.vector(); }
    │ │ │ -
    137 static inline StereoPoint2 Expmap(const Vector& d) { return StereoPoint2(d(0), d(1), d(2)); }
    │ │ │ -
    139
    │ │ │ -
    141 GTSAM_EXPORT friend std::ostream &operator<<(std::ostream &os, const StereoPoint2& p);
    │ │ │ -
    142
    │ │ │ -
    143private:
    │ │ │ -
    144
    │ │ │ -
    148
    │ │ │ -
    150 friend class boost::serialization::access;
    │ │ │ -
    151 template<class ARCHIVE>
    │ │ │ -
    152 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
    │ │ │ -
    153 ar & BOOST_SERIALIZATION_NVP(uL_);
    │ │ │ -
    154 ar & BOOST_SERIALIZATION_NVP(uR_);
    │ │ │ -
    155 ar & BOOST_SERIALIZATION_NVP(v_);
    │ │ │ -
    156 }
    │ │ │ -
    157
    │ │ │ -
    159
    │ │ │ -
    160};
    │ │ │ -
    │ │ │ -
    161
    │ │ │ -
    162typedef std::vector<StereoPoint2> StereoPoint2Vector;
    │ │ │ -
    163
    │ │ │ -
    164template<>
    │ │ │ -
    165struct traits<StereoPoint2> : public internal::VectorSpace<StereoPoint2> {};
    │ │ │ -
    166
    │ │ │ -
    167template<>
    │ │ │ -
    168struct traits<const StereoPoint2> : public internal::VectorSpace<StereoPoint2> {};
    │ │ │ -
    169}
    │ │ │ -
    T between(const T &t1, const T &t2)
    binary functions
    Definition lieProxies.h:36
    │ │ │ -
    2D Point
    │ │ │ +
    serialization for Vectors
    │ │ │ +
    typedef and functions to augment Eigen's VectorXd
    │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │ -
    void print(const Matrix &A, const string &s, ostream &stream)
    print without optional string, must specify cout yourself
    Definition Matrix.cpp:156
    │ │ │ -
    Vector2 Point2
    As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point2 to Vector2...
    Definition Point2.h:27
    │ │ │ -
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │ -
    VectorSpace provides both Testable and VectorSpaceTraits.
    Definition VectorSpace.h:207
    │ │ │ -
    A 2D stereo point, v will be same for rectified images.
    Definition StereoPoint2.h:32
    │ │ │ -
    double uR() const
    get uR
    Definition StereoPoint2.h:109
    │ │ │ -
    StereoPoint2(const Vector3 &v)
    construct from 3D vector
    Definition StereoPoint2.h:53
    │ │ │ -
    Point2 right() const
    convenient function to get a Point2 from the right image
    Definition StereoPoint2.h:125
    │ │ │ -
    Vector3 vector() const
    convert to vector
    Definition StereoPoint2.h:115
    │ │ │ -
    double uL() const
    get uL
    Definition StereoPoint2.h:106
    │ │ │ -
    StereoPoint2(double uL, double uR, double v)
    constructor
    Definition StereoPoint2.h:48
    │ │ │ -
    bool equals(const StereoPoint2 &q, double tol=1e-9) const
    equals
    Definition StereoPoint2.h:64
    │ │ │ -
    StereoPoint2 operator-() const
    inverse
    Definition StereoPoint2.h:79
    │ │ │ -
    double v() const
    get v
    Definition StereoPoint2.h:112
    │ │ │ -
    Point2 point2() const
    convenient function to get a Point2 from the left image
    Definition StereoPoint2.h:120
    │ │ │ -
    static StereoPoint2 Identity()
    identity
    Definition StereoPoint2.h:74
    │ │ │ -
    StereoPoint2()
    default constructor
    Definition StereoPoint2.h:43
    │ │ │ +
    Point3 mean(const CONTAINER &points)
    mean
    Definition Point3.h:68
    │ │ │ +
    Point3 cross(const Point3 &p, const Point3 &q, OptionalJacobian< 3, 3 > H1, OptionalJacobian< 3, 3 > H2)
    cross product
    Definition Point3.cpp:64
    │ │ │ +
    Point2Pair means(const std::vector< Point2Pair > &abPointPairs)
    Calculate the two means of a set of Point2 pairs.
    Definition Point2.cpp:116
    │ │ │ +
    double distance3(const Point3 &p1, const Point3 &q, OptionalJacobian< 1, 3 > H1, OptionalJacobian< 1, 3 > H2)
    distance between two points
    Definition Point3.cpp:27
    │ │ │ +
    Vector3 Point3
    As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point3 to Vector3...
    Definition Point3.h:36
    │ │ │ +
    Point3 normalize(const Point3 &p, OptionalJacobian< 3, 3 > H)
    normalize, with optional Jacobian
    Definition Point3.cpp:52
    │ │ │ +
    double norm3(const Point3 &p, OptionalJacobian< 1, 3 > H)
    Distance of the point from the origin, with Jacobian.
    Definition Point3.cpp:41
    │ │ │ +
    double dot(const V1 &a, const V2 &b)
    Dot product.
    Definition Vector.h:195
    │ │ │ +
    OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
    Definition OptionalJacobian.h:41
    │ │ │ +
    Definition BearingRange.h:40
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,217 +1,140 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -StereoPoint2.h │ │ │ │ +Point3.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -19#pragma once │ │ │ │ -20 │ │ │ │ -21#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_i_n_t_2_._h> │ │ │ │ -22#include │ │ │ │ -23#include │ │ │ │ -24 │ │ │ │ -25namespace _g_t_s_a_m { │ │ │ │ -26 │ │ │ │ -_3_2class GTSAM_EXPORT _S_t_e_r_e_o_P_o_i_n_t_2 { │ │ │ │ -33private: │ │ │ │ -34 │ │ │ │ -35 double uL_, uR_, v_; │ │ │ │ -36 │ │ │ │ -37public: │ │ │ │ -38 enum { dimension = 3 }; │ │ │ │ -41 │ │ │ │ -_4_3 _S_t_e_r_e_o_P_o_i_n_t_2() : │ │ │ │ -44 uL_(0), uR_(0), v_(0) { │ │ │ │ -45 } │ │ │ │ -46 │ │ │ │ -_4_8 _S_t_e_r_e_o_P_o_i_n_t_2(double uL, double uR, double v) : │ │ │ │ -49 uL_(uL), uR_(uR), v_(v) { │ │ │ │ -50 } │ │ │ │ -51 │ │ │ │ -_5_3 explicit _S_t_e_r_e_o_P_o_i_n_t_2(const Vector3& v) : │ │ │ │ -54 uL_(v(0)), uR_(v(1)), v_(v(2)) {} │ │ │ │ +20// \callgraph │ │ │ │ +21 │ │ │ │ +22#pragma once │ │ │ │ +23 │ │ │ │ +24#include │ │ │ │ +25#include │ │ │ │ +26#include <_g_t_s_a_m_/_b_a_s_e_/_V_e_c_t_o_r_._h> │ │ │ │ +27#include │ │ │ │ +28#include <_g_t_s_a_m_/_b_a_s_e_/_V_e_c_t_o_r_S_e_r_i_a_l_i_z_a_t_i_o_n_._h> │ │ │ │ +29#include │ │ │ │ +30#include │ │ │ │ +31 │ │ │ │ +32namespace _g_t_s_a_m { │ │ │ │ +33 │ │ │ │ +_3_6typedef Vector3 _P_o_i_n_t_3; │ │ │ │ +37typedef std::vector > Point3Vector; │ │ │ │ +38 │ │ │ │ +39// Convenience typedef │ │ │ │ +40using Point3Pair = std::pair; │ │ │ │ +41GTSAM_EXPORT std::ostream &operator<<(std::ostream &os, const gtsam:: │ │ │ │ +Point3Pair &p); │ │ │ │ +42 │ │ │ │ +43using Point3Pairs = std::vector; │ │ │ │ +44 │ │ │ │ +46GTSAM_EXPORT double _d_i_s_t_a_n_c_e_3(const _P_o_i_n_t_3& p1, const _P_o_i_n_t_3& q, │ │ │ │ +47 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> H1 = boost::none, │ │ │ │ +48 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> H2 = boost::none); │ │ │ │ +49 │ │ │ │ +51GTSAM_EXPORT double _n_o_r_m_3(const _P_o_i_n_t_3& p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> H = boost:: │ │ │ │ +none); │ │ │ │ +52 │ │ │ │ +54GTSAM_EXPORT _P_o_i_n_t_3 _n_o_r_m_a_l_i_z_e(const _P_o_i_n_t_3& p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H = │ │ │ │ +boost::none); │ │ │ │ 55 │ │ │ │ -59 │ │ │ │ -61 void _p_r_i_n_t(const std::string& s = "") const; │ │ │ │ -62 │ │ │ │ -_6_4 bool _e_q_u_a_l_s(const _S_t_e_r_e_o_P_o_i_n_t_2& q, double tol = 1e-9) const { │ │ │ │ -65 return (std::abs(uL_ - q.uL_) < tol && std::abs(uR_ - q.uR_) < tol │ │ │ │ -66 && std::abs(v_ - q.v_) < tol); │ │ │ │ -67 } │ │ │ │ -68 │ │ │ │ -72 │ │ │ │ -_7_4 inline static _S_t_e_r_e_o_P_o_i_n_t_2 _I_d_e_n_t_i_t_y() { │ │ │ │ -75 return _S_t_e_r_e_o_P_o_i_n_t_2(); │ │ │ │ -76 } │ │ │ │ +57GTSAM_EXPORT _P_o_i_n_t_3 _c_r_o_s_s(const _P_o_i_n_t_3& p, const _P_o_i_n_t_3& q, │ │ │ │ +58 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H_p = boost::none, │ │ │ │ +59 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H_q = boost::none); │ │ │ │ +60 │ │ │ │ +62GTSAM_EXPORT double _d_o_t(const _P_o_i_n_t_3& p, const _P_o_i_n_t_3& q, │ │ │ │ +63 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> H_p = boost::none, │ │ │ │ +64 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> H_q = boost::none); │ │ │ │ +65 │ │ │ │ +67template │ │ │ │ +_6_8_P_o_i_n_t_3 _m_e_a_n(const CONTAINER& points) { │ │ │ │ +69 if (points.size() == 0) throw std::invalid_argument("Point3::mean input │ │ │ │ +container is empty"); │ │ │ │ +70 _P_o_i_n_t_3 sum(0, 0, 0); │ │ │ │ +71 sum = std::accumulate(points.begin(), points.end(), sum); │ │ │ │ +72 return sum / points.size(); │ │ │ │ +73} │ │ │ │ +74 │ │ │ │ +76GTSAM_EXPORT Point3Pair _m_e_a_n_s(const std::vector &abPointPairs); │ │ │ │ 77 │ │ │ │ -_7_9 _S_t_e_r_e_o_P_o_i_n_t_2 _o_p_e_r_a_t_o_r_-() const { │ │ │ │ -80 return _S_t_e_r_e_o_P_o_i_n_t_2(-uL_, -uR_, -v_); │ │ │ │ -81 } │ │ │ │ -82 │ │ │ │ -_8_4 inline _S_t_e_r_e_o_P_o_i_n_t_2 operator +(const Vector3& v) const { │ │ │ │ -85 return _S_t_e_r_e_o_P_o_i_n_t_2(uL_ + v[0], uR_ + v[1], v_ + v[2]); │ │ │ │ -86 } │ │ │ │ -87 │ │ │ │ -_8_9 inline _S_t_e_r_e_o_P_o_i_n_t_2 operator +(const _S_t_e_r_e_o_P_o_i_n_t_2& b) const { │ │ │ │ -90 return _S_t_e_r_e_o_P_o_i_n_t_2(uL_ + b.uL_, uR_ + b.uR_, v_ + b.v_); │ │ │ │ -91 } │ │ │ │ +78template │ │ │ │ +79struct Range; │ │ │ │ +80 │ │ │ │ +81template <> │ │ │ │ +_8_2struct _R_a_n_g_e<_P_o_i_n_t_3, _P_o_i_n_t_3> { │ │ │ │ +83 typedef double result_type; │ │ │ │ +84 double operator()(const _P_o_i_n_t_3& p, const _P_o_i_n_t_3& q, │ │ │ │ +85 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> H1 = boost::none, │ │ │ │ +86 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> H2 = boost::none) { │ │ │ │ +87 return _d_i_s_t_a_n_c_e_3(p, q, H1, H2); │ │ │ │ +88 } │ │ │ │ +89}; │ │ │ │ +90 │ │ │ │ +91} // namespace gtsam │ │ │ │ 92 │ │ │ │ -_9_4 inline _S_t_e_r_e_o_P_o_i_n_t_2 operator -(const _S_t_e_r_e_o_P_o_i_n_t_2& b) const { │ │ │ │ -95 return _S_t_e_r_e_o_P_o_i_n_t_2(uL_ - b.uL_, uR_ - b.uR_, v_ - b.v_); │ │ │ │ -96 } │ │ │ │ -97 │ │ │ │ -101 │ │ │ │ -_1_0_3 inline bool operator ==(const _S_t_e_r_e_o_P_o_i_n_t_2& q) const {return uL_== q.uL_ && │ │ │ │ -uR_==q.uR_ && v_ == q.v_;} │ │ │ │ -104 │ │ │ │ -_1_0_6 inline double _u_L() const {return uL_;} │ │ │ │ -107 │ │ │ │ -_1_0_9 inline double _u_R() const {return uR_;} │ │ │ │ -110 │ │ │ │ -_1_1_2 inline double _v() const {return v_;} │ │ │ │ -113 │ │ │ │ -_1_1_5 Vector3 _v_e_c_t_o_r() const { │ │ │ │ -116 return Vector3(uL_, uR_, v_); │ │ │ │ -117 } │ │ │ │ -118 │ │ │ │ -_1_2_0 _P_o_i_n_t_2 _p_o_i_n_t_2() const { │ │ │ │ -121 return _P_o_i_n_t_2(uL_, v_); │ │ │ │ -122 } │ │ │ │ -123 │ │ │ │ -_1_2_5 _P_o_i_n_t_2 _r_i_g_h_t() const { │ │ │ │ -126 return _P_o_i_n_t_2(uR_, v_); │ │ │ │ -127 } │ │ │ │ -128 │ │ │ │ -131 inline _S_t_e_r_e_o_P_o_i_n_t_2 inverse() const { return _S_t_e_r_e_o_P_o_i_n_t_2()- (*this);} │ │ │ │ -132 inline StereoPoint2 compose(const StereoPoint2& p1) const { return *this + │ │ │ │ -p1;} │ │ │ │ -133 inline StereoPoint2 _b_e_t_w_e_e_n(const StereoPoint2& p2) const { return p2 - │ │ │ │ -*this; } │ │ │ │ -134 inline Vector localCoordinates(const StereoPoint2& t2) const { return │ │ │ │ -Logmap(_b_e_t_w_e_e_n(t2)); } │ │ │ │ -135 inline StereoPoint2 retract(const Vector& v) const { return compose(Expmap │ │ │ │ -(v)); } │ │ │ │ -136 static inline Vector Logmap(const StereoPoint2& p) { return p.vector(); } │ │ │ │ -137 static inline StereoPoint2 Expmap(const Vector& d) { return StereoPoint2(d │ │ │ │ -(0), d(1), d(2)); } │ │ │ │ -139 │ │ │ │ -141 GTSAM_EXPORT friend std::ostream &operator<<(std::ostream &os, const │ │ │ │ -StereoPoint2& p); │ │ │ │ -142 │ │ │ │ -143private: │ │ │ │ -144 │ │ │ │ -148 │ │ │ │ -_1_5_0 friend class boost::serialization::access; │ │ │ │ -151 template │ │ │ │ -152 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ -153 ar & BOOST_SERIALIZATION_NVP(uL_); │ │ │ │ -154 ar & BOOST_SERIALIZATION_NVP(uR_); │ │ │ │ -155 ar & BOOST_SERIALIZATION_NVP(v_); │ │ │ │ -156 } │ │ │ │ -157 │ │ │ │ -159 │ │ │ │ -160}; │ │ │ │ -161 │ │ │ │ -162typedef std::vector StereoPoint2Vector; │ │ │ │ -163 │ │ │ │ -164template<> │ │ │ │ -_1_6_5struct _t_r_a_i_t_s<_S_t_e_r_e_o_P_o_i_n_t_2> : public _i_n_t_e_r_n_a_l_:_:_V_e_c_t_o_r_S_p_a_c_e {}; │ │ │ │ -166 │ │ │ │ -167template<> │ │ │ │ -_1_6_8struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_: │ │ │ │ -_V_e_c_t_o_r_S_p_a_c_e {}; │ │ │ │ -169} │ │ │ │ -_g_t_s_a_m_:_:_t_e_s_t_i_n_g_:_:_b_e_t_w_e_e_n │ │ │ │ -T between(const T &t1, const T &t2) │ │ │ │ -binary functions │ │ │ │ -DDeeffiinniittiioonn lieProxies.h:36 │ │ │ │ -_P_o_i_n_t_2_._h │ │ │ │ -2D Point │ │ │ │ +_V_e_c_t_o_r_S_e_r_i_a_l_i_z_a_t_i_o_n_._h │ │ │ │ +serialization for Vectors │ │ │ │ +_V_e_c_t_o_r_._h │ │ │ │ +typedef and functions to augment Eigen's VectorXd │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_p_r_i_n_t │ │ │ │ -void print(const Matrix &A, const string &s, ostream &stream) │ │ │ │ -print without optional string, must specify cout yourself │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:156 │ │ │ │ -_g_t_s_a_m_:_:_P_o_i_n_t_2 │ │ │ │ -Vector2 Point2 │ │ │ │ +_g_t_s_a_m_:_:_m_e_a_n │ │ │ │ +Point3 mean(const CONTAINER &points) │ │ │ │ +mean │ │ │ │ +DDeeffiinniittiioonn Point3.h:68 │ │ │ │ +_g_t_s_a_m_:_:_c_r_o_s_s │ │ │ │ +Point3 cross(const Point3 &p, const Point3 &q, OptionalJacobian< 3, 3 > H1, │ │ │ │ +OptionalJacobian< 3, 3 > H2) │ │ │ │ +cross product │ │ │ │ +DDeeffiinniittiioonn Point3.cpp:64 │ │ │ │ +_g_t_s_a_m_:_:_m_e_a_n_s │ │ │ │ +Point2Pair means(const std::vector< Point2Pair > &abPointPairs) │ │ │ │ +Calculate the two means of a set of Point2 pairs. │ │ │ │ +DDeeffiinniittiioonn Point2.cpp:116 │ │ │ │ +_g_t_s_a_m_:_:_d_i_s_t_a_n_c_e_3 │ │ │ │ +double distance3(const Point3 &p1, const Point3 &q, OptionalJacobian< 1, 3 > │ │ │ │ +H1, OptionalJacobian< 1, 3 > H2) │ │ │ │ +distance between two points │ │ │ │ +DDeeffiinniittiioonn Point3.cpp:27 │ │ │ │ +_g_t_s_a_m_:_:_P_o_i_n_t_3 │ │ │ │ +Vector3 Point3 │ │ │ │ As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just │ │ │ │ -typedef Point2 to Vector2... │ │ │ │ -DDeeffiinniittiioonn Point2.h:27 │ │ │ │ -_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ -A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ -that can be centered ... │ │ │ │ -DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_V_e_c_t_o_r_S_p_a_c_e │ │ │ │ -VectorSpace provides both Testable and VectorSpaceTraits. │ │ │ │ -DDeeffiinniittiioonn VectorSpace.h:207 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2 │ │ │ │ -A 2D stereo point, v will be same for rectified images. │ │ │ │ -DDeeffiinniittiioonn StereoPoint2.h:32 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_u_R │ │ │ │ -double uR() const │ │ │ │ -get uR │ │ │ │ -DDeeffiinniittiioonn StereoPoint2.h:109 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_S_t_e_r_e_o_P_o_i_n_t_2 │ │ │ │ -StereoPoint2(const Vector3 &v) │ │ │ │ -construct from 3D vector │ │ │ │ -DDeeffiinniittiioonn StereoPoint2.h:53 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_r_i_g_h_t │ │ │ │ -Point2 right() const │ │ │ │ -convenient function to get a Point2 from the right image │ │ │ │ -DDeeffiinniittiioonn StereoPoint2.h:125 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_v_e_c_t_o_r │ │ │ │ -Vector3 vector() const │ │ │ │ -convert to vector │ │ │ │ -DDeeffiinniittiioonn StereoPoint2.h:115 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_u_L │ │ │ │ -double uL() const │ │ │ │ -get uL │ │ │ │ -DDeeffiinniittiioonn StereoPoint2.h:106 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_S_t_e_r_e_o_P_o_i_n_t_2 │ │ │ │ -StereoPoint2(double uL, double uR, double v) │ │ │ │ -constructor │ │ │ │ -DDeeffiinniittiioonn StereoPoint2.h:48 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const StereoPoint2 &q, double tol=1e-9) const │ │ │ │ -equals │ │ │ │ -DDeeffiinniittiioonn StereoPoint2.h:64 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_o_p_e_r_a_t_o_r_- │ │ │ │ -StereoPoint2 operator-() const │ │ │ │ -inverse │ │ │ │ -DDeeffiinniittiioonn StereoPoint2.h:79 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_v │ │ │ │ -double v() const │ │ │ │ -get v │ │ │ │ -DDeeffiinniittiioonn StereoPoint2.h:112 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_p_o_i_n_t_2 │ │ │ │ -Point2 point2() const │ │ │ │ -convenient function to get a Point2 from the left image │ │ │ │ -DDeeffiinniittiioonn StereoPoint2.h:120 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_I_d_e_n_t_i_t_y │ │ │ │ -static StereoPoint2 Identity() │ │ │ │ -identity │ │ │ │ -DDeeffiinniittiioonn StereoPoint2.h:74 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_S_t_e_r_e_o_P_o_i_n_t_2 │ │ │ │ -StereoPoint2() │ │ │ │ -default constructor │ │ │ │ -DDeeffiinniittiioonn StereoPoint2.h:43 │ │ │ │ +typedef Point3 to Vector3... │ │ │ │ +DDeeffiinniittiioonn Point3.h:36 │ │ │ │ +_g_t_s_a_m_:_:_n_o_r_m_a_l_i_z_e │ │ │ │ +Point3 normalize(const Point3 &p, OptionalJacobian< 3, 3 > H) │ │ │ │ +normalize, with optional Jacobian │ │ │ │ +DDeeffiinniittiioonn Point3.cpp:52 │ │ │ │ +_g_t_s_a_m_:_:_n_o_r_m_3 │ │ │ │ +double norm3(const Point3 &p, OptionalJacobian< 1, 3 > H) │ │ │ │ +Distance of the point from the origin, with Jacobian. │ │ │ │ +DDeeffiinniittiioonn Point3.cpp:41 │ │ │ │ +_g_t_s_a_m_:_:_d_o_t │ │ │ │ +double dot(const V1 &a, const V2 &b) │ │ │ │ +Dot product. │ │ │ │ +DDeeffiinniittiioonn Vector.h:195 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ +either a fixed size o... │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ +_g_t_s_a_m_:_:_R_a_n_g_e │ │ │ │ +DDeeffiinniittiioonn BearingRange.h:40 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_t_e_r_e_o_P_o_i_n_t_2_._h │ │ │ │ + * _P_o_i_n_t_3_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00290.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/StereoPoint2.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3_S2.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,39 +94,48 @@ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Namespaces | │ │ │ -Functions
    │ │ │ -
    StereoPoint2.cpp File Reference
    │ │ │ +Classes | │ │ │ +Namespaces
    │ │ │ +
    Cal3_S2.h File Reference
    │ │ │ │ │ │
    │ │ │ + │ │ │ +

    The most common 5DOF 3D->2D calibration. │ │ │ +More...

    │ │ │ + │ │ │ +

    Go to the source code of this file.

    │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Classes

    class  gtsam::Cal3_S2
     The most common 5DOF 3D->2D calibration. More...
     
    struct  gtsam::traits< Cal3_S2 >
     
    struct  gtsam::traits< const Cal3_S2 >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │

    │ │ │ -Functions

    │ │ │ -ostream & gtsam::operator<< (ostream &os, const StereoPoint2 &p)
     
    │ │ │

    Detailed Description

    │ │ │ -
    Date
    Jan 26, 2010
    │ │ │ -
    Author
    dellaert
    │ │ │ +

    The most common 5DOF 3D->2D calibration.

    │ │ │ +
    Author
    Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,29 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -StereoPoint2.cpp File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +Cal3_S2.h File Reference │ │ │ │ +The most common 5DOF 3D->2D calibration. _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ + class   _g_t_s_a_m_:_:_C_a_l_3___S_2 │ │ │ │ +  The most common 5DOF 3D->2D calibration. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _C_a_l_3___S_2_ _> │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _C_a_l_3___S_2_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -ostream &  ggttssaamm::::ooppeerraattoorr<<<< (ostream &os, const _S_t_e_r_e_o_P_o_i_n_t_2 &p) │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ - Date │ │ │ │ - Jan 26, 2010 │ │ │ │ +The most common 5DOF 3D->2D calibration. │ │ │ │ Author │ │ │ │ - dellaert │ │ │ │ + Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_t_e_r_e_o_P_o_i_n_t_2_._c_p_p │ │ │ │ + * _C_a_l_3___S_2_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00293.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/StereoCamera.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/triangulation.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,50 +95,192 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Classes | │ │ │ -Namespaces
    │ │ │ -
    StereoCamera.h File Reference
    │ │ │ +Namespaces | │ │ │ +Typedefs | │ │ │ +Functions
    │ │ │ +
    triangulation.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    A Stereo Camera based on two Simple Cameras. │ │ │ +

    Functions for triangulation. │ │ │ More...

    │ │ │ │ │ │

    Go to the source code of this file.

    │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │

    │ │ │ Classes

    class  gtsam::StereoCheiralityException
    class  gtsam::TriangulationUnderconstrainedException
     Exception thrown by triangulateDLT when SVD returns rank < 3. More...
     
    class  gtsam::StereoCamera
     A stereo camera class, parameterize by left camera pose and stereo calibration. More...
    class  gtsam::TriangulationCheiralityException
     Exception thrown by triangulateDLT when landmark is behind one or more of the cameras. More...
     
    struct  gtsam::traits< StereoCamera >
    struct  gtsam::TriangulationParameters
     
    struct  gtsam::traits< const StereoCamera >
    class  gtsam::TriangulationResult
     TriangulationResult is an optional point, along with the reasons why it is invalid. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Typedefs

    │ │ │ +using gtsam::CameraSetCal3Bundler = CameraSet< PinholeCamera< Cal3Bundler > >
     
    │ │ │ +using gtsam::CameraSetCal3_S2 = CameraSet< PinholeCamera< Cal3_S2 > >
     
    │ │ │ +using gtsam::CameraSetCal3DS2 = CameraSet< PinholeCamera< Cal3DS2 > >
     
    │ │ │ +using gtsam::CameraSetCal3Fisheye = CameraSet< PinholeCamera< Cal3Fisheye > >
     
    │ │ │ +using gtsam::CameraSetCal3Unified = CameraSet< PinholeCamera< Cal3Unified > >
     
    │ │ │ +using gtsam::CameraSetSpherical = CameraSet< SphericalCamera >
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ +Functions

    Vector4 gtsam::triangulateHomogeneousDLT (const std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > &projection_matrices, const Point2Vector &measurements, double rank_tol=1e-9)
     DLT triangulation: See Hartley and Zisserman, 2nd Ed., page 312.
     
    Vector4 gtsam::triangulateHomogeneousDLT (const std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > &projection_matrices, const std::vector< Unit3 > &measurements, double rank_tol=1e-9)
     Same math as Hartley and Zisserman, 2nd Ed., page 312, but with unit-norm bearing vectors (contrarily to pinhole projection, the z entry is not assumed to be 1 as in Hartley and Zisserman)
     
    Point3 gtsam::triangulateDLT (const std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > &projection_matrices, const Point2Vector &measurements, double rank_tol=1e-9)
     DLT triangulation: See Hartley and Zisserman, 2nd Ed., page 312.
     
    │ │ │ +Point3 gtsam::triangulateDLT (const std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > &projection_matrices, const std::vector< Unit3 > &measurements, double rank_tol=1e-9)
     overload of previous function to work with Unit3 (projected to canonical camera)
     
    Point3 gtsam::triangulateLOST (const std::vector< Pose3 > &poses, const Point3Vector &calibratedMeasurements, const SharedIsotropic &measurementNoise)
     Triangulation using the LOST (Linear Optimal Sine Triangulation) algorithm proposed in https://arxiv.org/pdf/2205.12197.pdf by Sebastien Henry and John Christian.
     
    template<class CALIBRATION >
    std::pair< NonlinearFactorGraph, Valuesgtsam::triangulationGraph (const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal, const Point2Vector &measurements, Key landmarkKey, const Point3 &initialEstimate, const SharedNoiseModel &model=noiseModel::Unit::Create(2))
     Create a factor graph with projection factors from poses and one calibration.
     
    template<class CAMERA >
    std::pair< NonlinearFactorGraph, Valuesgtsam::triangulationGraph (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measurements, Key landmarkKey, const Point3 &initialEstimate, const SharedNoiseModel &model=nullptr)
     Create a factor graph with projection factors from pinhole cameras (each camera has a pose and calibration)
     
    Point3 gtsam::optimize (const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
     Optimize for triangulation.
     
    template<class CALIBRATION >
    Point3 gtsam::triangulateNonlinear (const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal, const Point2Vector &measurements, const Point3 &initialEstimate, const SharedNoiseModel &model=nullptr)
     Given an initial estimate , refine a point using measurements in several cameras.
     
    template<class CAMERA >
    Point3 gtsam::triangulateNonlinear (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measurements, const Point3 &initialEstimate, const SharedNoiseModel &model=nullptr)
     Given an initial estimate , refine a point using measurements in several cameras.
     
    │ │ │ +template<class CAMERA >
    std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > gtsam::projectionMatricesFromCameras (const CameraSet< CAMERA > &cameras)
     
    │ │ │ +template<class CALIBRATION >
    std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > gtsam::projectionMatricesFromPoses (const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal)
     
    template<class CALIBRATION >
    Cal3_S2 gtsam::createPinholeCalibration (const CALIBRATION &cal)
     Create a pinhole calibration from a different Cal3 object, removing distortion.
     
    │ │ │ +template<class CALIBRATION , class MEASUREMENT >
    MEASUREMENT gtsam::undistortMeasurementInternal (const CALIBRATION &cal, const MEASUREMENT &measurement, boost::optional< Cal3_S2 > pinholeCal=boost::none)
     Internal undistortMeasurement to be used by undistortMeasurement and undistortMeasurements.
     
    template<class CALIBRATION >
    Point2Vector gtsam::undistortMeasurements (const CALIBRATION &cal, const Point2Vector &measurements)
     Remove distortion for measurements so as if the measurements came from a pinhole camera.
     
    │ │ │ +template<>
    Point2Vector gtsam::undistortMeasurements (const Cal3_S2 &cal, const Point2Vector &measurements)
     Specialization for Cal3_S2 as it doesn't need to be undistorted.
     
    template<class CAMERA >
    CAMERA::MeasurementVector gtsam::undistortMeasurements (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measurements)
     Remove distortion for measurements so as if the measurements came from a pinhole camera.
     
    │ │ │ +template<class CAMERA = PinholeCamera<Cal3_S2>>
    PinholeCamera< Cal3_S2 >::MeasurementVector gtsam::undistortMeasurements (const CameraSet< PinholeCamera< Cal3_S2 > > &cameras, const PinholeCamera< Cal3_S2 >::MeasurementVector &measurements)
     Specialize for Cal3_S2 to do nothing.
     
    │ │ │ +template<class CAMERA = SphericalCamera>
    SphericalCamera::MeasurementVector gtsam::undistortMeasurements (const CameraSet< SphericalCamera > &cameras, const SphericalCamera::MeasurementVector &measurements)
     Specialize for SphericalCamera to do nothing.
     
    template<class CALIBRATION >
    Point3Vector gtsam::calibrateMeasurementsShared (const CALIBRATION &cal, const Point2Vector &measurements)
     Convert pixel measurements in image to homogeneous measurements in the image plane using shared camera intrinsics.
     
    template<class CAMERA >
    Point3Vector gtsam::calibrateMeasurements (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measurements)
     Convert pixel measurements in image to homogeneous measurements in the image plane using camera intrinsics of each measurement.
     
    │ │ │ +template<class CAMERA = SphericalCamera>
    Point3Vector gtsam::calibrateMeasurements (const CameraSet< SphericalCamera > &cameras, const SphericalCamera::MeasurementVector &measurements)
     Specialize for SphericalCamera to do nothing.
     
    template<class CALIBRATION >
    Point3 gtsam::triangulatePoint3 (const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal, const Point2Vector &measurements, double rank_tol=1e-9, bool optimize=false, const SharedNoiseModel &model=nullptr, const bool useLOST=false)
     Function to triangulate 3D landmark point from an arbitrary number of poses (at least 2) using the DLT.
     
    template<class CAMERA >
    Point3 gtsam::triangulatePoint3 (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measurements, double rank_tol=1e-9, bool optimize=false, const SharedNoiseModel &model=nullptr, const bool useLOST=false)
     Function to triangulate 3D landmark point from an arbitrary number of poses (at least 2) using the DLT.
     
    │ │ │ +template<class CALIBRATION >
    Point3 gtsam::triangulatePoint3 (const CameraSet< PinholeCamera< CALIBRATION > > &cameras, const Point2Vector &measurements, double rank_tol=1e-9, bool optimize=false, const SharedNoiseModel &model=nullptr, const bool useLOST=false)
     Pinhole-specific version.
     
    │ │ │ +template<class CAMERA >
    TriangulationResult gtsam::triangulateSafe (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measured, const TriangulationParameters &params)
     triangulateSafe: extensive checking of the outcome
     
    │ │ │

    Detailed Description

    │ │ │ -

    A Stereo Camera based on two Simple Cameras.

    │ │ │ -

    A Rectified Stereo Camera.

    │ │ │ -
    Author
    Chris Beall
    │ │ │ +

    Functions for triangulation.

    │ │ │ +
    Date
    July 31, 2013
    │ │ │ +
    Author
    Chris Beall
    │ │ │ +
    │ │ │ +Akshay Krishnan
    │ │ │ +
    Date
    July 31, 2013
    │ │ │ +
    Author
    Chris Beall
    │ │ │ +
    │ │ │ +Luca Carlone
    │ │ │ +
    │ │ │ +Akshay Krishnan
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,33 +1,295 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -StereoCamera.h File Reference │ │ │ │ -A Stereo Camera based on two Simple Cameras. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +triangulation.h File Reference │ │ │ │ +Functions for triangulation. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_S_t_e_r_e_o_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n │ │ │ │ + class   _g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_U_n_d_e_r_c_o_n_s_t_r_a_i_n_e_d_E_x_c_e_p_t_i_o_n │ │ │ │ +  Exception thrown by triangulateDLT when SVD returns rank < 3. _M_o_r_e_._._. │ │ │ │   │ │ │ │ - class   _g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a │ │ │ │ -  A stereo camera class, parameterize by left camera pose and stereo │ │ │ │ - calibration. _M_o_r_e_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n │ │ │ │ +  Exception thrown by triangulateDLT when landmark is behind one or more │ │ │ │ + of the cameras. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _S_t_e_r_e_o_C_a_m_e_r_a_ _> │ │ │ │ +struct   _g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _S_t_e_r_e_o_C_a_m_e_r_a_ _> │ │ │ │ + class   _g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t │ │ │ │ +  _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t is an optional point, along with the reasons why │ │ │ │ + it is invalid. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +using  ggttssaamm::::CCaammeerraaSSeettCCaall33BBuunnddlleerr = _C_a_m_e_r_a_S_e_t< _P_i_n_h_o_l_e_C_a_m_e_r_a< _C_a_l_3_B_u_n_d_l_e_r > > │ │ │ │ +  │ │ │ │ +using  ggttssaamm::::CCaammeerraaSSeettCCaall33__SS22 = _C_a_m_e_r_a_S_e_t< _P_i_n_h_o_l_e_C_a_m_e_r_a< _C_a_l_3___S_2 > > │ │ │ │ +  │ │ │ │ +using  ggttssaamm::::CCaammeerraaSSeettCCaall33DDSS22 = _C_a_m_e_r_a_S_e_t< _P_i_n_h_o_l_e_C_a_m_e_r_a< _C_a_l_3_D_S_2 > > │ │ │ │ +  │ │ │ │ +using  ggttssaamm::::CCaammeerraaSSeettCCaall33FFiisshheeyyee = _C_a_m_e_r_a_S_e_t< _P_i_n_h_o_l_e_C_a_m_e_r_a< _C_a_l_3_F_i_s_h_e_y_e > > │ │ │ │ +  │ │ │ │ +using  ggttssaamm::::CCaammeerraaSSeettCCaall33UUnniiffiieedd = _C_a_m_e_r_a_S_e_t< _P_i_n_h_o_l_e_C_a_m_e_r_a< _C_a_l_3_U_n_i_f_i_e_d > > │ │ │ │ +  │ │ │ │ +using  ggttssaamm::::CCaammeerraaSSeettSSpphheerriiccaall = _C_a_m_e_r_a_S_e_t< _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a > │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ + Vector4  _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_H_o_m_o_g_e_n_e_o_u_s_D_L_T (const │ │ │ │ + std::vector< Matrix34, Eigen:: │ │ │ │ + aligned_allocator< Matrix34 > > │ │ │ │ + &projection_matrices, const │ │ │ │ + Point2Vector &measurements, double │ │ │ │ + rank_tol=1e-9) │ │ │ │ +  DLT triangulation: See Hartley and │ │ │ │ + Zisserman, 2nd Ed., page 312. │ │ │ │ +  │ │ │ │ + Vector4  _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_H_o_m_o_g_e_n_e_o_u_s_D_L_T (const │ │ │ │ + std::vector< Matrix34, Eigen:: │ │ │ │ + aligned_allocator< Matrix34 > > │ │ │ │ + &projection_matrices, const std:: │ │ │ │ + vector< _U_n_i_t_3 > &measurements, double │ │ │ │ + rank_tol=1e-9) │ │ │ │ + Same math as Hartley and Zisserman, 2nd │ │ │ │ + Ed., page 312, but with unit-norm │ │ │ │ +  bearing vectors (contrarily to pinhole │ │ │ │ + projection, the z entry is not assumed │ │ │ │ + to be 1 as in Hartley and Zisserman) │ │ │ │ +  │ │ │ │ + _P_o_i_n_t_3  _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_D_L_T (const std:: │ │ │ │ + vector< Matrix34, Eigen:: │ │ │ │ + aligned_allocator< Matrix34 > > │ │ │ │ + &projection_matrices, const │ │ │ │ + Point2Vector &measurements, double │ │ │ │ + rank_tol=1e-9) │ │ │ │ +  DLT triangulation: See Hartley and │ │ │ │ + Zisserman, 2nd Ed., page 312. │ │ │ │ +  │ │ │ │ + _P_o_i_n_t_3  ggttssaamm::::ttrriiaanngguullaatteeDDLLTT (const std:: │ │ │ │ + vector< Matrix34, Eigen:: │ │ │ │ + aligned_allocator< Matrix34 > > │ │ │ │ + &projection_matrices, const std:: │ │ │ │ + vector< _U_n_i_t_3 > &measurements, double │ │ │ │ + rank_tol=1e-9) │ │ │ │ + overload of previous function to work │ │ │ │ +  with _U_n_i_t_3 (projected to canonical │ │ │ │ + camera) │ │ │ │ +  │ │ │ │ + _P_o_i_n_t_3  _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_L_O_S_T (const std:: │ │ │ │ + vector< _P_o_s_e_3 > &poses, const │ │ │ │ + Point3Vector &calibratedMeasurements, │ │ │ │ + const SharedIsotropic │ │ │ │ + &measurementNoise) │ │ │ │ + Triangulation using the LOST (Linear │ │ │ │ + Optimal Sine Triangulation) algorithm │ │ │ │ +  proposed in _h_t_t_p_s_:_/_/_a_r_x_i_v_._o_r_g_/_p_d_f_/ │ │ │ │ + _2_2_0_5_._1_2_1_9_7_._p_d_f by Sebastien Henry and │ │ │ │ + John Christian. │ │ │ │ +  │ │ │ │ +template │ │ │ │ +std::pair< _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h, _V_a_l_u_e_s _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_i_o_n_G_r_a_p_h (const std:: │ │ │ │ + >  vector< _P_o_s_e_3 > &poses, boost:: │ │ │ │ + shared_ptr< CALIBRATION > sharedCal, │ │ │ │ + const Point2Vector &measurements, _K_e_y │ │ │ │ + landmarkKey, const _P_o_i_n_t_3 │ │ │ │ + &initialEstimate, const │ │ │ │ + _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model=_n_o_i_s_e_M_o_d_e_l_:_: │ │ │ │ + _U_n_i_t_:_:_C_r_e_a_t_e(2)) │ │ │ │ +  Create a factor graph with projection │ │ │ │ + factors from poses and one calibration. │ │ │ │ +  │ │ │ │ +template │ │ │ │ +std::pair< _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h, _V_a_l_u_e_s _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_i_o_n_G_r_a_p_h (const │ │ │ │ + >  _C_a_m_e_r_a_S_e_t< CAMERA > &cameras, const │ │ │ │ + typename CAMERA::MeasurementVector │ │ │ │ + &measurements, _K_e_y landmarkKey, const │ │ │ │ + _P_o_i_n_t_3 &initialEstimate, const │ │ │ │ + _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model=nullptr) │ │ │ │ + Create a factor graph with projection │ │ │ │ +  factors from pinhole cameras (each │ │ │ │ + camera has a pose and calibration) │ │ │ │ +  │ │ │ │ + _P_o_i_n_t_3  _g_t_s_a_m_:_:_o_p_t_i_m_i_z_e (const │ │ │ │ + _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h &graph, const │ │ │ │ + _V_a_l_u_e_s &values, _K_e_y landmarkKey) │ │ │ │ +  Optimize for triangulation. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _P_o_i_n_t_3  _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_N_o_n_l_i_n_e_a_r (const │ │ │ │ + std::vector< _P_o_s_e_3 > &poses, boost:: │ │ │ │ + shared_ptr< CALIBRATION > sharedCal, │ │ │ │ + const Point2Vector &measurements, const │ │ │ │ + _P_o_i_n_t_3 &initialEstimate, const │ │ │ │ + _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model=nullptr) │ │ │ │ + Given an initial estimate , refine a │ │ │ │ +  point using measurements in several │ │ │ │ + cameras. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _P_o_i_n_t_3  _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_N_o_n_l_i_n_e_a_r (const │ │ │ │ + _C_a_m_e_r_a_S_e_t< CAMERA > &cameras, const │ │ │ │ + typename CAMERA::MeasurementVector │ │ │ │ + &measurements, const _P_o_i_n_t_3 │ │ │ │ + &initialEstimate, const │ │ │ │ + _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model=nullptr) │ │ │ │ + Given an initial estimate , refine a │ │ │ │ +  point using measurements in several │ │ │ │ + cameras. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + std::vector< Matrix34, Eigen:: ggttssaamm::::pprroojjeeccttiioonnMMaattrriicceessFFrroommCCaammeerraass │ │ │ │ + aligned_allocator< Matrix34 > >  (const _C_a_m_e_r_a_S_e_t< CAMERA > &cameras) │ │ │ │ +  │ │ │ │ +template │ │ │ │ + std::vector< Matrix34, Eigen:: ggttssaamm::::pprroojjeeccttiioonnMMaattrriicceessFFrroommPPoosseess │ │ │ │ + aligned_allocator< Matrix34 > >  (const std::vector< _P_o_s_e_3 > &poses, │ │ │ │ + boost::shared_ptr< CALIBRATION > │ │ │ │ + sharedCal) │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _C_a_l_3___S_2  _g_t_s_a_m_:_:_c_r_e_a_t_e_P_i_n_h_o_l_e_C_a_l_i_b_r_a_t_i_o_n (const │ │ │ │ + CALIBRATION &cal) │ │ │ │ + Create a pinhole calibration from a │ │ │ │ +  different _C_a_l_3 object, removing │ │ │ │ + distortion. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + MEASUREMENT  ggttssaamm::::uunnddiissttoorrttMMeeaassuurreemmeennttIInntteerrnnaall │ │ │ │ + (const CALIBRATION &cal, const │ │ │ │ + MEASUREMENT &measurement, boost:: │ │ │ │ + optional< _C_a_l_3___S_2 > pinholeCal=boost:: │ │ │ │ + none) │ │ │ │ + Internal undistortMeasurement to be │ │ │ │ +  used by undistortMeasurement and │ │ │ │ + undistortMeasurements. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + Point2Vector  _g_t_s_a_m_:_:_u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_s (const │ │ │ │ + CALIBRATION &cal, const Point2Vector │ │ │ │ + &measurements) │ │ │ │ + Remove distortion for measurements so │ │ │ │ +  as if the measurements came from a │ │ │ │ + pinhole camera. │ │ │ │ +  │ │ │ │ + template<> │ │ │ │ + Point2Vector  ggttssaamm::::uunnddiissttoorrttMMeeaassuurreemmeennttss (const │ │ │ │ + _C_a_l_3___S_2 &cal, const Point2Vector │ │ │ │ + &measurements) │ │ │ │ +  Specialization for _C_a_l_3___S_2 as it │ │ │ │ + doesn't need to be undistorted. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + CAMERA::MeasurementVector  _g_t_s_a_m_:_:_u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_s (const │ │ │ │ + _C_a_m_e_r_a_S_e_t< CAMERA > &cameras, const │ │ │ │ + typename CAMERA::MeasurementVector │ │ │ │ + &measurements) │ │ │ │ + Remove distortion for measurements so │ │ │ │ +  as if the measurements came from a │ │ │ │ + pinhole camera. │ │ │ │ +  │ │ │ │ +template> │ │ │ │ + _P_i_n_h_o_l_e_C_a_m_e_r_a< _C_a_l_3___S_2 >:: ggttssaamm::::uunnddiissttoorrttMMeeaassuurreemmeennttss (const │ │ │ │ + MeasurementVector  _C_a_m_e_r_a_S_e_t< _P_i_n_h_o_l_e_C_a_m_e_r_a< _C_a_l_3___S_2 > > │ │ │ │ + &cameras, const _P_i_n_h_o_l_e_C_a_m_e_r_a< _C_a_l_3___S_2 │ │ │ │ + >::MeasurementVector &measurements) │ │ │ │ +  Specialize for _C_a_l_3___S_2 to do nothing. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + SphericalCamera::MeasurementVector  ggttssaamm::::uunnddiissttoorrttMMeeaassuurreemmeennttss (const │ │ │ │ + _C_a_m_e_r_a_S_e_t< _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a > &cameras, │ │ │ │ + const SphericalCamera:: │ │ │ │ + MeasurementVector &measurements) │ │ │ │ +  Specialize for _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a to do │ │ │ │ + nothing. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + Point3Vector  _g_t_s_a_m_:_:_c_a_l_i_b_r_a_t_e_M_e_a_s_u_r_e_m_e_n_t_s_S_h_a_r_e_d │ │ │ │ + (const CALIBRATION &cal, const │ │ │ │ + Point2Vector &measurements) │ │ │ │ + Convert pixel measurements in image to │ │ │ │ +  homogeneous measurements in the image │ │ │ │ + plane using shared camera intrinsics. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + Point3Vector  _g_t_s_a_m_:_:_c_a_l_i_b_r_a_t_e_M_e_a_s_u_r_e_m_e_n_t_s (const │ │ │ │ + _C_a_m_e_r_a_S_e_t< CAMERA > &cameras, const │ │ │ │ + typename CAMERA::MeasurementVector │ │ │ │ + &measurements) │ │ │ │ + Convert pixel measurements in image to │ │ │ │ +  homogeneous measurements in the image │ │ │ │ + plane using camera intrinsics of each │ │ │ │ + measurement. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + Point3Vector  ggttssaamm::::ccaalliibbrraatteeMMeeaassuurreemmeennttss (const │ │ │ │ + _C_a_m_e_r_a_S_e_t< _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a > &cameras, │ │ │ │ + const SphericalCamera:: │ │ │ │ + MeasurementVector &measurements) │ │ │ │ +  Specialize for _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a to do │ │ │ │ + nothing. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _P_o_i_n_t_3  _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_P_o_i_n_t_3 (const std:: │ │ │ │ + vector< _P_o_s_e_3 > &poses, boost:: │ │ │ │ + shared_ptr< CALIBRATION > sharedCal, │ │ │ │ + const Point2Vector &measurements, │ │ │ │ + double rank_tol=1e-9, bool │ │ │ │ + _o_p_t_i_m_i_z_e=false, const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l │ │ │ │ + &model=nullptr, const bool │ │ │ │ + useLOST=false) │ │ │ │ + Function to triangulate 3D landmark │ │ │ │ +  point from an arbitrary number of poses │ │ │ │ + (at least 2) using the DLT. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _P_o_i_n_t_3  _g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_P_o_i_n_t_3 (const │ │ │ │ + _C_a_m_e_r_a_S_e_t< CAMERA > &cameras, const │ │ │ │ + typename CAMERA::MeasurementVector │ │ │ │ + &measurements, double rank_tol=1e-9, │ │ │ │ + bool _o_p_t_i_m_i_z_e=false, const │ │ │ │ + _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model=nullptr, const │ │ │ │ + bool useLOST=false) │ │ │ │ + Function to triangulate 3D landmark │ │ │ │ +  point from an arbitrary number of poses │ │ │ │ + (at least 2) using the DLT. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _P_o_i_n_t_3  ggttssaamm::::ttrriiaanngguullaatteePPooiinntt33 (const │ │ │ │ + _C_a_m_e_r_a_S_e_t< _P_i_n_h_o_l_e_C_a_m_e_r_a< CALIBRATION > │ │ │ │ + > &cameras, const Point2Vector │ │ │ │ + &measurements, double rank_tol=1e-9, │ │ │ │ + bool _o_p_t_i_m_i_z_e=false, const │ │ │ │ + _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model=nullptr, const │ │ │ │ + bool useLOST=false) │ │ │ │ +  Pinhole-specific version. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t  ggttssaamm::::ttrriiaanngguullaatteeSSaaffee (const │ │ │ │ + _C_a_m_e_r_a_S_e_t< CAMERA > &cameras, const │ │ │ │ + typename CAMERA::MeasurementVector │ │ │ │ + &measured, const │ │ │ │ + _T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s ¶ms) │ │ │ │ +  triangulateSafe: extensive checking of │ │ │ │ + the outcome │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A Stereo Camera based on two Simple Cameras. │ │ │ │ -A Rectified Stereo Camera. │ │ │ │ +Functions for triangulation. │ │ │ │ + Date │ │ │ │ + July 31, 2013 │ │ │ │ + Author │ │ │ │ + Chris Beall │ │ │ │ + Akshay Krishnan │ │ │ │ + Date │ │ │ │ + July 31, 2013 │ │ │ │ Author │ │ │ │ Chris Beall │ │ │ │ + Luca Carlone │ │ │ │ + Akshay Krishnan │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_t_e_r_e_o_C_a_m_e_r_a_._h │ │ │ │ + * _t_r_i_a_n_g_u_l_a_t_i_o_n_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00293.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,5 +1,30 @@ │ │ │ │ var a00293 = [ │ │ │ │ - ["gtsam::StereoCheiralityException", "a03336.html", null], │ │ │ │ - ["gtsam::traits< StereoCamera >", "a03344.html", null], │ │ │ │ - ["gtsam::traits< const StereoCamera >", "a03348.html", null] │ │ │ │ + ["gtsam::TriangulationUnderconstrainedException", "a03364.html", null], │ │ │ │ + ["gtsam::TriangulationCheiralityException", "a03368.html", null], │ │ │ │ + ["gtsam::TriangulationParameters", "a03372.html", "a03372"], │ │ │ │ + ["gtsam::TriangulationResult", "a03376.html", "a03376"], │ │ │ │ + ["calibrateMeasurements", "a00293.html#aebe53b43e5151ce9c355b4aa4ba57c13", null], │ │ │ │ + ["calibrateMeasurements", "a00293.html#a48ad2c1085fcae3881fa956f4cd81890", null], │ │ │ │ + ["calibrateMeasurementsShared", "a00293.html#a0a386184e9ed9cc4ec844d48d91ba759", null], │ │ │ │ + ["createPinholeCalibration", "a00293.html#a3d070e707c4b2d69d0f024a30501f06c", null], │ │ │ │ + ["optimize", "a00293.html#a4b0057879b0c5f323185452b0d1a4232", null], │ │ │ │ + ["triangulateDLT", "a00293.html#aed2918ac0049316bf09f96879efca3b6", null], │ │ │ │ + ["triangulateDLT", "a00293.html#a523a0528f883f1c569a8a4c9a0e514a0", null], │ │ │ │ + ["triangulateHomogeneousDLT", "a00293.html#af378e231b519e8bb1f09f4aa13a38dca", null], │ │ │ │ + ["triangulateHomogeneousDLT", "a00293.html#a8d16887f8890aaf7ceb5e3cbb181a191", null], │ │ │ │ + ["triangulateLOST", "a00293.html#a0f9e5111ffc481b34f0123418b0ecd13", null], │ │ │ │ + ["triangulateNonlinear", "a00293.html#a13ac0858b6f6600f5a4242aeb797692f", null], │ │ │ │ + ["triangulateNonlinear", "a00293.html#a9dab6b5829b51511735b6b841bb36a36", null], │ │ │ │ + ["triangulatePoint3", "a00293.html#a58f4009e3a8872d0ac6780d654cccc2e", null], │ │ │ │ + ["triangulatePoint3", "a00293.html#aac6df5bbfb7131cbb05e2a9691e59ba3", null], │ │ │ │ + ["triangulatePoint3", "a00293.html#ab79854d3cb3bcc4f562fc88a0731a447", null], │ │ │ │ + ["triangulateSafe", "a00293.html#a8d52d7d8a5e5c8d7318ce95ee57e9cfa", null], │ │ │ │ + ["triangulationGraph", "a00293.html#a2b96bc32f3c5c436db3fe60e5139319e", null], │ │ │ │ + ["triangulationGraph", "a00293.html#ad167fac94fa72c0d3b8db36e5fa2becb", null], │ │ │ │ + ["undistortMeasurementInternal", "a00293.html#a46a14c34d729a626825e4eff8a7de8dd", null], │ │ │ │ + ["undistortMeasurements", "a00293.html#af01b2988c1bb89268ad572ea7d7ba293", null], │ │ │ │ + ["undistortMeasurements", "a00293.html#a31e52d463db397f0dda1a13352ab217c", null], │ │ │ │ + ["undistortMeasurements", "a00293.html#a1a0e4ac1b773cc295daae7849c833876", null], │ │ │ │ + ["undistortMeasurements", "a00293.html#a7f3d15de99fffcc537089fa1440d8ca2", null], │ │ │ │ + ["undistortMeasurements", "a00293.html#a6a1849035b3acd163d6de715e7683ebf", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00293_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/StereoCamera.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/triangulation.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,222 +98,675 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    StereoCamera.h
    │ │ │ +
    triangulation.h
    │ │ │
    │ │ │
    │ │ │ Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │
    4 * Atlanta, Georgia 30332-0415
    │ │ │
    5 * All Rights Reserved
    │ │ │
    6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
    │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │ -
    18#pragma once
    │ │ │ -
    19
    │ │ │ - │ │ │ - │ │ │ - │ │ │ -
    23
    │ │ │ -
    24namespace gtsam {
    │ │ │ -
    25
    │ │ │ -
    │ │ │ -
    26class GTSAM_EXPORT StereoCheiralityException: public std::runtime_error {
    │ │ │ -
    27public:
    │ │ │ - │ │ │ -
    29 : StereoCheiralityException(std::numeric_limits<Key>::max()) {}
    │ │ │ -
    30
    │ │ │ - │ │ │ -
    32 : std::runtime_error("Stereo Cheirality Exception"),
    │ │ │ -
    33 j_(j) {}
    │ │ │ -
    34
    │ │ │ -
    35 Key nearbyVariable() const {
    │ │ │ -
    36 return j_;
    │ │ │ -
    37 }
    │ │ │ -
    38
    │ │ │ -
    39private:
    │ │ │ -
    40 Key j_;
    │ │ │ -
    41};
    │ │ │ +
    21#pragma once
    │ │ │ +
    22
    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
    34#include <gtsam/slam/TriangulationFactor.h>
    │ │ │ +
    35
    │ │ │ +
    36namespace gtsam {
    │ │ │ +
    37
    │ │ │ +
    │ │ │ +
    39class GTSAM_EXPORT TriangulationUnderconstrainedException: public std::runtime_error {
    │ │ │ +
    40public:
    │ │ │ + │ │ │ +
    42 std::runtime_error("Triangulation Underconstrained Exception.") {
    │ │ │ +
    43 }
    │ │ │ +
    44};
    │ │ │
    │ │ │ -
    42
    │ │ │ +
    45
    │ │ │
    │ │ │ -
    47class GTSAM_EXPORT StereoCamera {
    │ │ │ -
    48
    │ │ │ -
    49public:
    │ │ │ -
    50
    │ │ │ - │ │ │ -
    56 typedef StereoPoint2Vector MeasurementVector;
    │ │ │ -
    57
    │ │ │ -
    58private:
    │ │ │ -
    59 Pose3 leftCamPose_;
    │ │ │ -
    60 Cal3_S2Stereo::shared_ptr K_;
    │ │ │ -
    61
    │ │ │ -
    62public:
    │ │ │ -
    63
    │ │ │ -
    64 enum {
    │ │ │ -
    65 dimension = 6
    │ │ │ -
    66 };
    │ │ │ -
    67
    │ │ │ -
    70
    │ │ │ -
    │ │ │ - │ │ │ -
    73 K_(new Cal3_S2Stereo()) {
    │ │ │ -
    74 }
    │ │ │ -
    │ │ │ -
    75
    │ │ │ -
    77 StereoCamera(const Pose3& leftCamPose, const Cal3_S2Stereo::shared_ptr K);
    │ │ │ -
    78
    │ │ │ -
    │ │ │ -
    80 const Cal3_S2Stereo& calibration() const {
    │ │ │ -
    81 return *K_;
    │ │ │ -
    82 }
    │ │ │ -
    │ │ │ -
    83
    │ │ │ -
    87
    │ │ │ -
    │ │ │ -
    89 void print(const std::string& s = "") const {
    │ │ │ -
    90 leftCamPose_.print(s + ".camera.");
    │ │ │ -
    91 K_->print(s + ".calibration.");
    │ │ │ -
    92 }
    │ │ │ -
    │ │ │ -
    93
    │ │ │ -
    │ │ │ -
    95 bool equals(const StereoCamera &camera, double tol = 1e-9) const {
    │ │ │ -
    96 return leftCamPose_.equals(camera.leftCamPose_, tol)
    │ │ │ -
    97 && K_->equals(*camera.K_, tol);
    │ │ │ -
    98 }
    │ │ │ -
    │ │ │ -
    99
    │ │ │ -
    103
    │ │ │ -
    │ │ │ -
    105 inline size_t dim() const {
    │ │ │ -
    106 return 6;
    │ │ │ -
    107 }
    │ │ │ -
    │ │ │ -
    108
    │ │ │ -
    │ │ │ -
    110 static inline size_t Dim() {
    │ │ │ -
    111 return 6;
    │ │ │ -
    112 }
    │ │ │ -
    │ │ │ -
    113
    │ │ │ -
    │ │ │ -
    115 inline StereoCamera retract(const Vector& v) const {
    │ │ │ -
    116 return StereoCamera(pose().retract(v), K_);
    │ │ │ -
    117 }
    │ │ │ -
    │ │ │ -
    118
    │ │ │ -
    │ │ │ -
    120 inline Vector6 localCoordinates(const StereoCamera& t2) const {
    │ │ │ -
    121 return leftCamPose_.localCoordinates(t2.leftCamPose_);
    │ │ │ -
    122 }
    │ │ │ -
    │ │ │ -
    123
    │ │ │ -
    127
    │ │ │ -
    │ │ │ -
    129 const Pose3& pose() const {
    │ │ │ -
    130 return leftCamPose_;
    │ │ │ -
    131 }
    │ │ │ -
    │ │ │ -
    132
    │ │ │ -
    │ │ │ -
    134 double baseline() const {
    │ │ │ -
    135 return K_->baseline();
    │ │ │ +
    47class GTSAM_EXPORT TriangulationCheiralityException: public std::runtime_error {
    │ │ │ +
    48public:
    │ │ │ + │ │ │ +
    50 std::runtime_error(
    │ │ │ +
    51 "Triangulation Cheirality Exception: The resulting landmark is behind one or more cameras.") {
    │ │ │ +
    52 }
    │ │ │ +
    53};
    │ │ │ +
    │ │ │ +
    54
    │ │ │ +
    62GTSAM_EXPORT Vector4 triangulateHomogeneousDLT(
    │ │ │ +
    63 const std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>>& projection_matrices,
    │ │ │ +
    64 const Point2Vector& measurements, double rank_tol = 1e-9);
    │ │ │ +
    65
    │ │ │ +
    74GTSAM_EXPORT Vector4 triangulateHomogeneousDLT(
    │ │ │ +
    75 const std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>>& projection_matrices,
    │ │ │ +
    76 const std::vector<Unit3>& measurements, double rank_tol = 1e-9);
    │ │ │ +
    77
    │ │ │ +
    85GTSAM_EXPORT Point3 triangulateDLT(
    │ │ │ +
    86 const std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>>& projection_matrices,
    │ │ │ +
    87 const Point2Vector& measurements,
    │ │ │ +
    88 double rank_tol = 1e-9);
    │ │ │ +
    89
    │ │ │ +
    93GTSAM_EXPORT Point3 triangulateDLT(
    │ │ │ +
    94 const std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>>& projection_matrices,
    │ │ │ +
    95 const std::vector<Unit3>& measurements,
    │ │ │ +
    96 double rank_tol = 1e-9);
    │ │ │ +
    97
    │ │ │ +
    108GTSAM_EXPORT Point3 triangulateLOST(const std::vector<Pose3>& poses,
    │ │ │ +
    109 const Point3Vector& calibratedMeasurements,
    │ │ │ +
    110 const SharedIsotropic& measurementNoise);
    │ │ │ +
    111
    │ │ │ +
    121template<class CALIBRATION>
    │ │ │ +
    │ │ │ +
    122std::pair<NonlinearFactorGraph, Values> triangulationGraph(
    │ │ │ +
    123 const std::vector<Pose3>& poses, boost::shared_ptr<CALIBRATION> sharedCal,
    │ │ │ +
    124 const Point2Vector& measurements, Key landmarkKey,
    │ │ │ +
    125 const Point3& initialEstimate,
    │ │ │ +
    126 const SharedNoiseModel& model = noiseModel::Unit::Create(2)) {
    │ │ │ +
    127 Values values;
    │ │ │ +
    128 values.insert(landmarkKey, initialEstimate); // Initial landmark value
    │ │ │ + │ │ │ +
    130 for (size_t i = 0; i < measurements.size(); i++) {
    │ │ │ +
    131 const Pose3& pose_i = poses[i];
    │ │ │ +
    132 typedef PinholePose<CALIBRATION> Camera;
    │ │ │ +
    133 Camera camera_i(pose_i, sharedCal);
    │ │ │ +
    134 graph.emplace_shared<TriangulationFactor<Camera> > //
    │ │ │ +
    135 (camera_i, measurements[i], model, landmarkKey);
    │ │ │
    136 }
    │ │ │ +
    137 return std::make_pair(graph, values);
    │ │ │ +
    138}
    │ │ │
    │ │ │ -
    137
    │ │ │ -
    139 StereoPoint2 project(const Point3& point) const;
    │ │ │ -
    140
    │ │ │ -
    145 StereoPoint2 project2(const Point3& point, OptionalJacobian<3, 6> H1 =
    │ │ │ -
    146 boost::none, OptionalJacobian<3, 3> H2 = boost::none) const;
    │ │ │ -
    147
    │ │ │ -
    149 Point3 backproject(const StereoPoint2& z) const;
    │ │ │ -
    150
    │ │ │ -
    155 Point3 backproject2(const StereoPoint2& z,
    │ │ │ -
    156 OptionalJacobian<3, 6> H1 = boost::none,
    │ │ │ -
    157 OptionalJacobian<3, 3> H2 = boost::none) const;
    │ │ │ -
    158
    │ │ │ -
    162
    │ │ │ - │ │ │ - │ │ │ -
    171 boost::none) const;
    │ │ │ -
    172
    │ │ │ -
    │ │ │ - │ │ │ -
    175 return Eigen::Matrix<double,traits<Measurement>::dimension,1>::Constant(2.0 * K_->fx());;
    │ │ │ -
    176 }
    │ │ │ -
    │ │ │ +
    139
    │ │ │ +
    149template<class CAMERA>
    │ │ │ +
    │ │ │ +
    150std::pair<NonlinearFactorGraph, Values> triangulationGraph(
    │ │ │ +
    151 const CameraSet<CAMERA>& cameras,
    │ │ │ +
    152 const typename CAMERA::MeasurementVector& measurements, Key landmarkKey,
    │ │ │ +
    153 const Point3& initialEstimate,
    │ │ │ +
    154 const SharedNoiseModel& model = nullptr) {
    │ │ │ +
    155 Values values;
    │ │ │ +
    156 values.insert(landmarkKey, initialEstimate); // Initial landmark value
    │ │ │ + │ │ │ + │ │ │ + │ │ │ +
    160 for (size_t i = 0; i < measurements.size(); i++) {
    │ │ │ +
    161 const CAMERA& camera_i = cameras[i];
    │ │ │ +
    162 graph.emplace_shared<TriangulationFactor<CAMERA> > //
    │ │ │ +
    163 (camera_i, measurements[i], model? model : unit, landmarkKey);
    │ │ │ +
    164 }
    │ │ │ +
    165 return std::make_pair(graph, values);
    │ │ │ +
    166}
    │ │ │ +
    │ │ │ +
    167
    │ │ │ +
    175GTSAM_EXPORT Point3 optimize(const NonlinearFactorGraph& graph,
    │ │ │ +
    176 const Values& values, Key landmarkKey);
    │ │ │
    177
    │ │ │ -
    179
    │ │ │ -
    180private:
    │ │ │ -
    181
    │ │ │ -
    182 friend class boost::serialization::access;
    │ │ │ -
    183 template<class Archive>
    │ │ │ -
    184 void serialize(Archive & ar, const unsigned int /*version*/) {
    │ │ │ -
    185 ar & BOOST_SERIALIZATION_NVP(leftCamPose_);
    │ │ │ -
    186 ar & BOOST_SERIALIZATION_NVP(K_);
    │ │ │ -
    187 }
    │ │ │ -
    188
    │ │ │ -
    189};
    │ │ │ -
    │ │ │ -
    190
    │ │ │ -
    191template<>
    │ │ │ -
    │ │ │ -
    192struct traits<StereoCamera> : public internal::Manifold<StereoCamera> {
    │ │ │ -
    193};
    │ │ │ -
    │ │ │ -
    194
    │ │ │ -
    195template<>
    │ │ │ -
    │ │ │ -
    196struct traits<const StereoCamera> : public internal::Manifold<StereoCamera> {
    │ │ │ -
    197};
    │ │ │ -
    │ │ │ -
    198}
    │ │ │ -
    A 2D stereo point (uL,uR,v)
    │ │ │ -
    3D Pose
    │ │ │ -
    The most common 5DOF 3D->2D calibration + Stereo baseline.
    │ │ │ +
    186template<class CALIBRATION>
    │ │ │ +
    │ │ │ +
    187Point3 triangulateNonlinear(const std::vector<Pose3>& poses,
    │ │ │ +
    188 boost::shared_ptr<CALIBRATION> sharedCal,
    │ │ │ +
    189 const Point2Vector& measurements, const Point3& initialEstimate,
    │ │ │ +
    190 const SharedNoiseModel& model = nullptr) {
    │ │ │ +
    191
    │ │ │ +
    192 // Create a factor graph and initial values
    │ │ │ +
    193 Values values;
    │ │ │ + │ │ │ +
    195 boost::tie(graph, values) = triangulationGraph<CALIBRATION> //
    │ │ │ +
    196 (poses, sharedCal, measurements, Symbol('p', 0), initialEstimate, model);
    │ │ │ +
    197
    │ │ │ +
    198 return optimize(graph, values, Symbol('p', 0));
    │ │ │ +
    199}
    │ │ │ +
    │ │ │ +
    200
    │ │ │ +
    208template<class CAMERA>
    │ │ │ +
    │ │ │ + │ │ │ +
    210 const CameraSet<CAMERA>& cameras,
    │ │ │ +
    211 const typename CAMERA::MeasurementVector& measurements, const Point3& initialEstimate,
    │ │ │ +
    212 const SharedNoiseModel& model = nullptr) {
    │ │ │ +
    213
    │ │ │ +
    214 // Create a factor graph and initial values
    │ │ │ +
    215 Values values;
    │ │ │ + │ │ │ +
    217 boost::tie(graph, values) = triangulationGraph<CAMERA> //
    │ │ │ +
    218 (cameras, measurements, Symbol('p', 0), initialEstimate, model);
    │ │ │ +
    219
    │ │ │ +
    220 return optimize(graph, values, Symbol('p', 0));
    │ │ │ +
    221}
    │ │ │ +
    │ │ │ +
    222
    │ │ │ +
    223template<class CAMERA>
    │ │ │ +
    224std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>>
    │ │ │ +
    225projectionMatricesFromCameras(const CameraSet<CAMERA> &cameras) {
    │ │ │ +
    226 std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>> projection_matrices;
    │ │ │ +
    227 for (const CAMERA &camera: cameras) {
    │ │ │ +
    228 projection_matrices.push_back(camera.cameraProjectionMatrix());
    │ │ │ +
    229 }
    │ │ │ +
    230 return projection_matrices;
    │ │ │ +
    231}
    │ │ │ +
    232
    │ │ │ +
    233// overload, assuming pinholePose
    │ │ │ +
    234template<class CALIBRATION>
    │ │ │ +
    235std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>> projectionMatricesFromPoses(
    │ │ │ +
    236 const std::vector<Pose3> &poses, boost::shared_ptr<CALIBRATION> sharedCal) {
    │ │ │ +
    237 std::vector<Matrix34, Eigen::aligned_allocator<Matrix34>> projection_matrices;
    │ │ │ +
    238 for (size_t i = 0; i < poses.size(); i++) {
    │ │ │ +
    239 PinholePose<CALIBRATION> camera(poses.at(i), sharedCal);
    │ │ │ +
    240 projection_matrices.push_back(camera.cameraProjectionMatrix());
    │ │ │ +
    241 }
    │ │ │ +
    242 return projection_matrices;
    │ │ │ +
    243}
    │ │ │ +
    244
    │ │ │ +
    252template <class CALIBRATION>
    │ │ │ +
    │ │ │ +
    253Cal3_S2 createPinholeCalibration(const CALIBRATION& cal) {
    │ │ │ +
    254 const auto& K = cal.K();
    │ │ │ +
    255 return Cal3_S2(K(0, 0), K(1, 1), K(0, 1), K(0, 2), K(1, 2));
    │ │ │ +
    256}
    │ │ │ +
    │ │ │ +
    257
    │ │ │ +
    260template <class CALIBRATION, class MEASUREMENT>
    │ │ │ +
    │ │ │ + │ │ │ +
    262 const CALIBRATION& cal, const MEASUREMENT& measurement,
    │ │ │ +
    263 boost::optional<Cal3_S2> pinholeCal = boost::none) {
    │ │ │ +
    264 if (!pinholeCal) {
    │ │ │ +
    265 pinholeCal = createPinholeCalibration(cal);
    │ │ │ +
    266 }
    │ │ │ +
    267 return pinholeCal->uncalibrate(cal.calibrate(measurement));
    │ │ │ +
    268}
    │ │ │ +
    │ │ │ +
    269
    │ │ │ +
    281template <class CALIBRATION>
    │ │ │ +
    │ │ │ +
    282Point2Vector undistortMeasurements(const CALIBRATION& cal,
    │ │ │ +
    283 const Point2Vector& measurements) {
    │ │ │ +
    284 Cal3_S2 pinholeCalibration = createPinholeCalibration(cal);
    │ │ │ +
    285 Point2Vector undistortedMeasurements;
    │ │ │ +
    286 // Calibrate with cal and uncalibrate with pinhole version of cal so that
    │ │ │ +
    287 // measurements are undistorted.
    │ │ │ +
    288 std::transform(measurements.begin(), measurements.end(),
    │ │ │ +
    289 std::back_inserter(undistortedMeasurements),
    │ │ │ +
    290 [&cal, &pinholeCalibration](const Point2& measurement) {
    │ │ │ +
    291 return undistortMeasurementInternal<CALIBRATION>(
    │ │ │ +
    292 cal, measurement, pinholeCalibration);
    │ │ │ +
    293 });
    │ │ │ +
    294 return undistortedMeasurements;
    │ │ │ +
    295}
    │ │ │ +
    │ │ │ +
    296
    │ │ │ +
    298template <>
    │ │ │ +
    │ │ │ +
    299inline Point2Vector undistortMeasurements(const Cal3_S2& cal,
    │ │ │ +
    300 const Point2Vector& measurements) {
    │ │ │ +
    301 return measurements;
    │ │ │ +
    302}
    │ │ │ +
    │ │ │ +
    303
    │ │ │ +
    315template <class CAMERA>
    │ │ │ +
    │ │ │ +
    316typename CAMERA::MeasurementVector undistortMeasurements(
    │ │ │ +
    317 const CameraSet<CAMERA>& cameras,
    │ │ │ +
    318 const typename CAMERA::MeasurementVector& measurements) {
    │ │ │ +
    319 const size_t nrMeasurements = measurements.size();
    │ │ │ +
    320 assert(nrMeasurements == cameras.size());
    │ │ │ +
    321 typename CAMERA::MeasurementVector undistortedMeasurements(nrMeasurements);
    │ │ │ +
    322 for (size_t ii = 0; ii < nrMeasurements; ++ii) {
    │ │ │ +
    323 // Calibrate with cal and uncalibrate with pinhole version of cal so that
    │ │ │ +
    324 // measurements are undistorted.
    │ │ │ +
    325 undistortedMeasurements[ii] =
    │ │ │ +
    326 undistortMeasurementInternal<typename CAMERA::CalibrationType>(
    │ │ │ +
    327 cameras[ii].calibration(), measurements[ii]);
    │ │ │ +
    328 }
    │ │ │ +
    329 return undistortedMeasurements;
    │ │ │ +
    330}
    │ │ │ +
    │ │ │ +
    331
    │ │ │ +
    333template <class CAMERA = PinholeCamera<Cal3_S2>>
    │ │ │ +
    │ │ │ +
    334inline PinholeCamera<Cal3_S2>::MeasurementVector undistortMeasurements(
    │ │ │ +
    335 const CameraSet<PinholeCamera<Cal3_S2>>& cameras,
    │ │ │ +
    336 const PinholeCamera<Cal3_S2>::MeasurementVector& measurements) {
    │ │ │ +
    337 return measurements;
    │ │ │ +
    338}
    │ │ │ +
    │ │ │ +
    339
    │ │ │ +
    341template <class CAMERA = SphericalCamera>
    │ │ │ +
    │ │ │ +
    342inline SphericalCamera::MeasurementVector undistortMeasurements(
    │ │ │ +
    343 const CameraSet<SphericalCamera>& cameras,
    │ │ │ +
    344 const SphericalCamera::MeasurementVector& measurements) {
    │ │ │ +
    345 return measurements;
    │ │ │ +
    346}
    │ │ │ +
    │ │ │ +
    347
    │ │ │ +
    356template <class CALIBRATION>
    │ │ │ +
    │ │ │ +
    357inline Point3Vector calibrateMeasurementsShared(
    │ │ │ +
    358 const CALIBRATION& cal, const Point2Vector& measurements) {
    │ │ │ +
    359 Point3Vector calibratedMeasurements;
    │ │ │ +
    360 // Calibrate with cal and uncalibrate with pinhole version of cal so that
    │ │ │ +
    361 // measurements are undistorted.
    │ │ │ +
    362 std::transform(measurements.begin(), measurements.end(),
    │ │ │ +
    363 std::back_inserter(calibratedMeasurements),
    │ │ │ +
    364 [&cal](const Point2& measurement) {
    │ │ │ +
    365 Point3 p;
    │ │ │ +
    366 p << cal.calibrate(measurement), 1.0;
    │ │ │ +
    367 return p;
    │ │ │ +
    368 });
    │ │ │ +
    369 return calibratedMeasurements;
    │ │ │ +
    370}
    │ │ │ +
    │ │ │ +
    371
    │ │ │ +
    380template <class CAMERA>
    │ │ │ +
    │ │ │ +
    381inline Point3Vector calibrateMeasurements(
    │ │ │ +
    382 const CameraSet<CAMERA>& cameras,
    │ │ │ +
    383 const typename CAMERA::MeasurementVector& measurements) {
    │ │ │ +
    384 const size_t nrMeasurements = measurements.size();
    │ │ │ +
    385 assert(nrMeasurements == cameras.size());
    │ │ │ +
    386 Point3Vector calibratedMeasurements(nrMeasurements);
    │ │ │ +
    387 for (size_t ii = 0; ii < nrMeasurements; ++ii) {
    │ │ │ +
    388 calibratedMeasurements[ii]
    │ │ │ +
    389 << cameras[ii].calibration().calibrate(measurements[ii]),
    │ │ │ +
    390 1.0;
    │ │ │ +
    391 }
    │ │ │ +
    392 return calibratedMeasurements;
    │ │ │ +
    393}
    │ │ │ +
    │ │ │ +
    394
    │ │ │ +
    396template <class CAMERA = SphericalCamera>
    │ │ │ +
    │ │ │ +
    397inline Point3Vector calibrateMeasurements(
    │ │ │ +
    398 const CameraSet<SphericalCamera>& cameras,
    │ │ │ +
    399 const SphericalCamera::MeasurementVector& measurements) {
    │ │ │ +
    400 Point3Vector calibratedMeasurements(measurements.size());
    │ │ │ +
    401 for (size_t ii = 0; ii < measurements.size(); ++ii) {
    │ │ │ +
    402 calibratedMeasurements[ii] << measurements[ii].point3();
    │ │ │ +
    403 }
    │ │ │ +
    404 return calibratedMeasurements;
    │ │ │ +
    405}
    │ │ │ +
    │ │ │ +
    406
    │ │ │ +
    420template <class CALIBRATION>
    │ │ │ +
    │ │ │ +
    421Point3 triangulatePoint3(const std::vector<Pose3>& poses,
    │ │ │ +
    422 boost::shared_ptr<CALIBRATION> sharedCal,
    │ │ │ +
    423 const Point2Vector& measurements,
    │ │ │ +
    424 double rank_tol = 1e-9, bool optimize = false,
    │ │ │ +
    425 const SharedNoiseModel& model = nullptr,
    │ │ │ +
    426 const bool useLOST = false) {
    │ │ │ +
    427 assert(poses.size() == measurements.size());
    │ │ │ +
    428 if (poses.size() < 2) throw(TriangulationUnderconstrainedException());
    │ │ │ +
    429
    │ │ │ +
    430 // Triangulate linearly
    │ │ │ +
    431 Point3 point;
    │ │ │ +
    432 if (useLOST) {
    │ │ │ +
    433 // Reduce input noise model to an isotropic noise model using the mean of
    │ │ │ +
    434 // the diagonal.
    │ │ │ +
    435 const double measurementSigma = model ? model->sigmas().mean() : 1e-4;
    │ │ │ +
    436 SharedIsotropic measurementNoise =
    │ │ │ +
    437 noiseModel::Isotropic::Sigma(2, measurementSigma);
    │ │ │ +
    438 // calibrate the measurements to obtain homogenous coordinates in image
    │ │ │ +
    439 // plane.
    │ │ │ +
    440 auto calibratedMeasurements =
    │ │ │ +
    441 calibrateMeasurementsShared<CALIBRATION>(*sharedCal, measurements);
    │ │ │ +
    442
    │ │ │ +
    443 point = triangulateLOST(poses, calibratedMeasurements, measurementNoise);
    │ │ │ +
    444 } else {
    │ │ │ +
    445 // construct projection matrices from poses & calibration
    │ │ │ +
    446 auto projection_matrices = projectionMatricesFromPoses(poses, sharedCal);
    │ │ │ +
    447
    │ │ │ +
    448 // Undistort the measurements, leaving only the pinhole elements in effect.
    │ │ │ +
    449 auto undistortedMeasurements =
    │ │ │ +
    450 undistortMeasurements<CALIBRATION>(*sharedCal, measurements);
    │ │ │ +
    451
    │ │ │ +
    452 point =
    │ │ │ +
    453 triangulateDLT(projection_matrices, undistortedMeasurements, rank_tol);
    │ │ │ +
    454 }
    │ │ │ +
    455
    │ │ │ +
    456 // Then refine using non-linear optimization
    │ │ │ +
    457 if (optimize)
    │ │ │ +
    458 point = triangulateNonlinear<CALIBRATION> //
    │ │ │ +
    459 (poses, sharedCal, measurements, point, model);
    │ │ │ +
    460
    │ │ │ +
    461#ifdef GTSAM_THROW_CHEIRALITY_EXCEPTION
    │ │ │ +
    462 // verify that the triangulated point lies in front of all cameras
    │ │ │ +
    463 for (const Pose3& pose : poses) {
    │ │ │ +
    464 const Point3& p_local = pose.transformTo(point);
    │ │ │ +
    465 if (p_local.z() <= 0) throw(TriangulationCheiralityException());
    │ │ │ +
    466 }
    │ │ │ +
    467#endif
    │ │ │ +
    468
    │ │ │ +
    469 return point;
    │ │ │ +
    470}
    │ │ │ +
    │ │ │ +
    471
    │ │ │ +
    486template <class CAMERA>
    │ │ │ +
    │ │ │ + │ │ │ +
    488 const typename CAMERA::MeasurementVector& measurements,
    │ │ │ +
    489 double rank_tol = 1e-9, bool optimize = false,
    │ │ │ +
    490 const SharedNoiseModel& model = nullptr,
    │ │ │ +
    491 const bool useLOST = false) {
    │ │ │ +
    492 size_t m = cameras.size();
    │ │ │ +
    493 assert(measurements.size() == m);
    │ │ │ +
    494
    │ │ │ +
    495 if (m < 2) throw(TriangulationUnderconstrainedException());
    │ │ │ +
    496
    │ │ │ +
    497 // Triangulate linearly
    │ │ │ +
    498 Point3 point;
    │ │ │ +
    499 if (useLOST) {
    │ │ │ +
    500 // Reduce input noise model to an isotropic noise model using the mean of
    │ │ │ +
    501 // the diagonal.
    │ │ │ +
    502 const double measurementSigma = model ? model->sigmas().mean() : 1e-4;
    │ │ │ +
    503 SharedIsotropic measurementNoise =
    │ │ │ +
    504 noiseModel::Isotropic::Sigma(2, measurementSigma);
    │ │ │ +
    505
    │ │ │ +
    506 // construct poses from cameras.
    │ │ │ +
    507 std::vector<Pose3> poses;
    │ │ │ +
    508 poses.reserve(cameras.size());
    │ │ │ +
    509 for (const auto& camera : cameras) poses.push_back(camera.pose());
    │ │ │ +
    510
    │ │ │ +
    511 // calibrate the measurements to obtain homogenous coordinates in image
    │ │ │ +
    512 // plane.
    │ │ │ +
    513 auto calibratedMeasurements =
    │ │ │ +
    514 calibrateMeasurements<CAMERA>(cameras, measurements);
    │ │ │ +
    515
    │ │ │ +
    516 point = triangulateLOST(poses, calibratedMeasurements, measurementNoise);
    │ │ │ +
    517 } else {
    │ │ │ +
    518 // construct projection matrices from poses & calibration
    │ │ │ +
    519 auto projection_matrices = projectionMatricesFromCameras(cameras);
    │ │ │ +
    520
    │ │ │ +
    521 // Undistort the measurements, leaving only the pinhole elements in effect.
    │ │ │ +
    522 auto undistortedMeasurements =
    │ │ │ +
    523 undistortMeasurements<CAMERA>(cameras, measurements);
    │ │ │ +
    524
    │ │ │ +
    525 point =
    │ │ │ +
    526 triangulateDLT(projection_matrices, undistortedMeasurements, rank_tol);
    │ │ │ +
    527 }
    │ │ │ +
    528
    │ │ │ +
    529 // Then refine using non-linear optimization
    │ │ │ +
    530 if (optimize) {
    │ │ │ +
    531 point = triangulateNonlinear<CAMERA>(cameras, measurements, point, model);
    │ │ │ +
    532 }
    │ │ │ +
    533
    │ │ │ +
    534#ifdef GTSAM_THROW_CHEIRALITY_EXCEPTION
    │ │ │ +
    535 // verify that the triangulated point lies in front of all cameras
    │ │ │ +
    536 for (const CAMERA& camera : cameras) {
    │ │ │ +
    537 const Point3& p_local = camera.pose().transformTo(point);
    │ │ │ +
    538 if (p_local.z() <= 0) throw(TriangulationCheiralityException());
    │ │ │ +
    539 }
    │ │ │ +
    540#endif
    │ │ │ +
    541
    │ │ │ +
    542 return point;
    │ │ │ +
    543}
    │ │ │ +
    │ │ │ +
    544
    │ │ │ +
    546template <class CALIBRATION>
    │ │ │ +
    │ │ │ + │ │ │ +
    548 const Point2Vector& measurements,
    │ │ │ +
    549 double rank_tol = 1e-9, bool optimize = false,
    │ │ │ +
    550 const SharedNoiseModel& model = nullptr,
    │ │ │ +
    551 const bool useLOST = false) {
    │ │ │ +
    552 return triangulatePoint3<PinholeCamera<CALIBRATION>> //
    │ │ │ +
    553 (cameras, measurements, rank_tol, optimize, model, useLOST);
    │ │ │ +
    554}
    │ │ │ +
    │ │ │ +
    555
    │ │ │ +
    │ │ │ +
    556struct GTSAM_EXPORT TriangulationParameters {
    │ │ │ +
    557
    │ │ │ + │ │ │ + │ │ │ +
    561
    │ │ │ + │ │ │ +
    567
    │ │ │ + │ │ │ +
    574
    │ │ │ + │ │ │ +
    576
    │ │ │ +
    │ │ │ +
    586 TriangulationParameters(const double _rankTolerance = 1.0,
    │ │ │ +
    587 const bool _enableEPI = false, double _landmarkDistanceThreshold = -1,
    │ │ │ +
    588 double _dynamicOutlierRejectionThreshold = -1,
    │ │ │ +
    589 const SharedNoiseModel& _noiseModel = nullptr) :
    │ │ │ +
    590 rankTolerance(_rankTolerance), enableEPI(_enableEPI), //
    │ │ │ +
    591 landmarkDistanceThreshold(_landmarkDistanceThreshold), //
    │ │ │ +
    592 dynamicOutlierRejectionThreshold(_dynamicOutlierRejectionThreshold),
    │ │ │ +
    593 noiseModel(_noiseModel){
    │ │ │ +
    594 }
    │ │ │ +
    │ │ │ +
    595
    │ │ │ +
    596 // stream to output
    │ │ │ +
    597 friend std::ostream &operator<<(std::ostream &os,
    │ │ │ +
    598 const TriangulationParameters& p) {
    │ │ │ +
    599 os << "rankTolerance = " << p.rankTolerance << std::endl;
    │ │ │ +
    600 os << "enableEPI = " << p.enableEPI << std::endl;
    │ │ │ +
    601 os << "landmarkDistanceThreshold = " << p.landmarkDistanceThreshold
    │ │ │ +
    602 << std::endl;
    │ │ │ +
    603 os << "dynamicOutlierRejectionThreshold = "
    │ │ │ +
    604 << p.dynamicOutlierRejectionThreshold << std::endl;
    │ │ │ +
    605 os << "noise model" << std::endl;
    │ │ │ +
    606 return os;
    │ │ │ +
    607 }
    │ │ │ +
    608
    │ │ │ +
    609private:
    │ │ │ +
    610
    │ │ │ +
    612 friend class boost::serialization::access;
    │ │ │ +
    613 template<class ARCHIVE>
    │ │ │ +
    614 void serialize(ARCHIVE & ar, const unsigned int version) {
    │ │ │ +
    615 ar & BOOST_SERIALIZATION_NVP(rankTolerance);
    │ │ │ +
    616 ar & BOOST_SERIALIZATION_NVP(enableEPI);
    │ │ │ +
    617 ar & BOOST_SERIALIZATION_NVP(landmarkDistanceThreshold);
    │ │ │ +
    618 ar & BOOST_SERIALIZATION_NVP(dynamicOutlierRejectionThreshold);
    │ │ │ +
    619 }
    │ │ │ +
    620};
    │ │ │ +
    │ │ │ +
    621
    │ │ │ +
    │ │ │ +
    626class TriangulationResult : public boost::optional<Point3> {
    │ │ │ +
    627 public:
    │ │ │ +
    628 enum Status { VALID, DEGENERATE, BEHIND_CAMERA, OUTLIER, FAR_POINT };
    │ │ │ +
    629 Status status;
    │ │ │ +
    630
    │ │ │ +
    631 private:
    │ │ │ +
    632 TriangulationResult(Status s) : status(s) {}
    │ │ │ +
    633
    │ │ │ +
    634 public:
    │ │ │ + │ │ │ +
    639
    │ │ │ +
    643 TriangulationResult(const Point3& p) : status(VALID) { reset(p); }
    │ │ │ +
    644 static TriangulationResult Degenerate() {
    │ │ │ +
    645 return TriangulationResult(DEGENERATE);
    │ │ │ +
    646 }
    │ │ │ +
    647 static TriangulationResult Outlier() { return TriangulationResult(OUTLIER); }
    │ │ │ +
    648 static TriangulationResult FarPoint() {
    │ │ │ +
    649 return TriangulationResult(FAR_POINT);
    │ │ │ +
    650 }
    │ │ │ +
    651 static TriangulationResult BehindCamera() {
    │ │ │ +
    652 return TriangulationResult(BEHIND_CAMERA);
    │ │ │ +
    653 }
    │ │ │ +
    654 bool valid() const { return status == VALID; }
    │ │ │ +
    655 bool degenerate() const { return status == DEGENERATE; }
    │ │ │ +
    656 bool outlier() const { return status == OUTLIER; }
    │ │ │ +
    657 bool farPoint() const { return status == FAR_POINT; }
    │ │ │ +
    658 bool behindCamera() const { return status == BEHIND_CAMERA; }
    │ │ │ +
    659 // stream to output
    │ │ │ +
    660 friend std::ostream& operator<<(std::ostream& os,
    │ │ │ +
    661 const TriangulationResult& result) {
    │ │ │ +
    662 if (result)
    │ │ │ +
    663 os << "point = " << *result << std::endl;
    │ │ │ +
    664 else
    │ │ │ +
    665 os << "no point, status = " << result.status << std::endl;
    │ │ │ +
    666 return os;
    │ │ │ +
    667 }
    │ │ │ +
    668
    │ │ │ +
    669 private:
    │ │ │ + │ │ │ +
    672 template <class ARCHIVE>
    │ │ │ +
    673 void serialize(ARCHIVE& ar, const unsigned int version) {
    │ │ │ +
    674 ar& BOOST_SERIALIZATION_NVP(status);
    │ │ │ +
    675 }
    │ │ │ +
    676};
    │ │ │ +
    │ │ │ +
    677
    │ │ │ +
    679template<class CAMERA>
    │ │ │ +
    │ │ │ + │ │ │ +
    681 const typename CAMERA::MeasurementVector& measured,
    │ │ │ +
    682 const TriangulationParameters& params) {
    │ │ │ +
    683
    │ │ │ +
    684 size_t m = cameras.size();
    │ │ │ +
    685
    │ │ │ +
    686 // if we have a single pose the corresponding factor is uninformative
    │ │ │ +
    687 if (m < 2)
    │ │ │ +
    688 return TriangulationResult::Degenerate();
    │ │ │ +
    689 else
    │ │ │ +
    690 // We triangulate the 3D position of the landmark
    │ │ │ +
    691 try {
    │ │ │ +
    692 Point3 point =
    │ │ │ +
    693 triangulatePoint3<CAMERA>(cameras, measured, params.rankTolerance,
    │ │ │ +
    694 params.enableEPI, params.noiseModel);
    │ │ │ +
    695
    │ │ │ +
    696 // Check landmark distance and re-projection errors to avoid outliers
    │ │ │ +
    697 size_t i = 0;
    │ │ │ +
    698 double maxReprojError = 0.0;
    │ │ │ +
    699 for(const CAMERA& camera: cameras) {
    │ │ │ +
    700 const Pose3& pose = camera.pose();
    │ │ │ +
    701 if (params.landmarkDistanceThreshold > 0
    │ │ │ +
    702 && distance3(pose.translation(), point)
    │ │ │ + │ │ │ +
    704 return TriangulationResult::FarPoint();
    │ │ │ +
    705#ifdef GTSAM_THROW_CHEIRALITY_EXCEPTION
    │ │ │ +
    706 // verify that the triangulated point lies in front of all cameras
    │ │ │ +
    707 // Only needed if this was not yet handled by exception
    │ │ │ +
    708 const Point3& p_local = pose.transformTo(point);
    │ │ │ +
    709 if (p_local.z() <= 0)
    │ │ │ +
    710 return TriangulationResult::BehindCamera();
    │ │ │ +
    711#endif
    │ │ │ +
    712 // Check reprojection error
    │ │ │ +
    713 if (params.dynamicOutlierRejectionThreshold > 0) {
    │ │ │ +
    714 const typename CAMERA::Measurement& zi = measured.at(i);
    │ │ │ +
    715 Point2 reprojectionError = camera.reprojectionError(point, zi);
    │ │ │ +
    716 maxReprojError = std::max(maxReprojError, reprojectionError.norm());
    │ │ │ +
    717 }
    │ │ │ +
    718 i += 1;
    │ │ │ +
    719 }
    │ │ │ +
    720 // Flag as degenerate if average reprojection error is too large
    │ │ │ + │ │ │ +
    722 && maxReprojError > params.dynamicOutlierRejectionThreshold)
    │ │ │ +
    723 return TriangulationResult::Outlier();
    │ │ │ +
    724
    │ │ │ +
    725 // all good!
    │ │ │ +
    726 return TriangulationResult(point);
    │ │ │ + │ │ │ +
    728 // This exception is thrown if
    │ │ │ +
    729 // 1) There is a single pose for triangulation - this should not happen because we checked the number of poses before
    │ │ │ +
    730 // 2) The rank of the matrix used for triangulation is < 3: rotation-only, parallel cameras (or motion towards the landmark)
    │ │ │ +
    731 return TriangulationResult::Degenerate();
    │ │ │ + │ │ │ +
    733 // point is behind one of the cameras: can be the case of close-to-parallel cameras or may depend on outliers
    │ │ │ +
    734 return TriangulationResult::BehindCamera();
    │ │ │ +
    735 }
    │ │ │ +
    736}
    │ │ │ +
    │ │ │ +
    737
    │ │ │ +
    738// Vector of Cameras - used by the Python/MATLAB wrapper
    │ │ │ +
    739using CameraSetCal3Bundler = CameraSet<PinholeCamera<Cal3Bundler>>;
    │ │ │ +
    740using CameraSetCal3_S2 = CameraSet<PinholeCamera<Cal3_S2>>;
    │ │ │ +
    741using CameraSetCal3DS2 = CameraSet<PinholeCamera<Cal3DS2>>;
    │ │ │ +
    742using CameraSetCal3Fisheye = CameraSet<PinholeCamera<Cal3Fisheye>>;
    │ │ │ +
    743using CameraSetCal3Unified = CameraSet<PinholeCamera<Cal3Unified>>;
    │ │ │ +
    744using CameraSetSpherical = CameraSet<SphericalCamera>;
    │ │ │ +
    745} // \namespace gtsam
    │ │ │ +
    746
    │ │ │ +
    Unified Calibration Model, see Mei07icra for details.
    │ │ │ +
    The most common 5DOF 3D->2D calibration.
    │ │ │ +
    Calibration of a camera with radial distortion, calculations in base class Cal3DS2_Base.
    │ │ │ +
    Calibrated camera with spherical projection.
    │ │ │ +
    Base class for all pinhole cameras.
    │ │ │ +
    2D Pose
    │ │ │ +
    Calibration of a fisheye camera.
    │ │ │ +
    Calibration used by Bundler.
    │ │ │ +
    Base class to create smart factors on poses or cameras.
    │ │ │ +
    Factor Graph consisting of non-linear factors.
    │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │ +
    Point3Vector calibrateMeasurementsShared(const CALIBRATION &cal, const Point2Vector &measurements)
    Convert pixel measurements in image to homogeneous measurements in the image plane using shared camer...
    Definition triangulation.h:357
    │ │ │ +
    Point3 triangulateLOST(const std::vector< Pose3 > &poses, const Point3Vector &calibratedMeasurements, const SharedIsotropic &measurementNoise)
    Triangulation using the LOST (Linear Optimal Sine Triangulation) algorithm proposed in https://arxiv....
    Definition triangulation.cpp:92
    │ │ │ +
    Point2Vector undistortMeasurements(const CALIBRATION &cal, const Point2Vector &measurements)
    Remove distortion for measurements so as if the measurements came from a pinhole camera.
    Definition triangulation.h:282
    │ │ │ +
    Cal3_S2 createPinholeCalibration(const CALIBRATION &cal)
    Create a pinhole calibration from a different Cal3 object, removing distortion.
    Definition triangulation.h:253
    │ │ │ +
    MEASUREMENT undistortMeasurementInternal(const CALIBRATION &cal, const MEASUREMENT &measurement, boost::optional< Cal3_S2 > pinholeCal=boost::none)
    Internal undistortMeasurement to be used by undistortMeasurement and undistortMeasurements.
    Definition triangulation.h:261
    │ │ │ +
    Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
    Optimize for triangulation.
    Definition triangulation.cpp:155
    │ │ │ +
    Vector2 Point2
    As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point2 to Vector2...
    Definition Point2.h:27
    │ │ │ +
    TriangulationResult triangulateSafe(const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measured, const TriangulationParameters &params)
    triangulateSafe: extensive checking of the outcome
    Definition triangulation.h:680
    │ │ │ +
    Point3 triangulateNonlinear(const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal, const Point2Vector &measurements, const Point3 &initialEstimate, const SharedNoiseModel &model=nullptr)
    Given an initial estimate , refine a point using measurements in several cameras.
    Definition triangulation.h:187
    │ │ │ +
    double distance3(const Point3 &p1, const Point3 &q, OptionalJacobian< 1, 3 > H1, OptionalJacobian< 1, 3 > H2)
    distance between two points
    Definition Point3.cpp:27
    │ │ │
    Vector3 Point3
    As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point3 to Vector3...
    Definition Point3.h:36
    │ │ │ -
    Point2_ project(const Point3_ &p_cam)
    Expression version of PinholeBase::Project.
    Definition expressions.h:131
    │ │ │ +
    noiseModel::Base::shared_ptr SharedNoiseModel
    Aliases.
    Definition NoiseModel.h:724
    │ │ │ +
    Point3 triangulatePoint3(const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal, const Point2Vector &measurements, double rank_tol=1e-9, bool optimize=false, const SharedNoiseModel &model=nullptr, const bool useLOST=false)
    Function to triangulate 3D landmark point from an arbitrary number of poses (at least 2) using the DL...
    Definition triangulation.h:421
    │ │ │ +
    std::pair< NonlinearFactorGraph, Values > triangulationGraph(const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal, const Point2Vector &measurements, Key landmarkKey, const Point3 &initialEstimate, const SharedNoiseModel &model=noiseModel::Unit::Create(2))
    Create a factor graph with projection factors from poses and one calibration.
    Definition triangulation.h:122
    │ │ │
    std::uint64_t Key
    Integer nonlinear key type.
    Definition types.h:100
    │ │ │ +
    Point3Vector calibrateMeasurements(const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measurements)
    Convert pixel measurements in image to homogeneous measurements in the image plane using camera intri...
    Definition triangulation.h:381
    │ │ │ +
    Point3 triangulateDLT(const std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > &projection_matrices, const Point2Vector &measurements, double rank_tol)
    DLT triangulation: See Hartley and Zisserman, 2nd Ed., page 312.
    Definition triangulation.cpp:127
    │ │ │ +
    Vector4 triangulateHomogeneousDLT(const std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > &projection_matrices, const Point2Vector &measurements, double rank_tol)
    DLT triangulation: See Hartley and Zisserman, 2nd Ed., page 312.
    Definition triangulation.cpp:27
    │ │ │
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │ -
    TangentVector localCoordinates(const Class &g) const
    localCoordinates as required by manifold concept: finds tangent vector between *this and g
    Definition Lie.h:136
    │ │ │ -
    Both ManifoldTraits and Testable.
    Definition Manifold.h:120
    │ │ │ -
    OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
    Definition OptionalJacobian.h:41
    │ │ │ -
    The most common 5DOF 3D->2D calibration, stereo version.
    Definition Cal3_S2Stereo.h:30
    │ │ │ +
    The most common 5DOF 3D->2D calibration.
    Definition Cal3_S2.h:34
    │ │ │ +
    A set of cameras, all with their own calibration.
    Definition CameraSet.h:36
    │ │ │ +
    A pinhole camera class that has a Pose3 and a Calibration.
    Definition PinholeCamera.h:33
    │ │ │ +
    A pinhole camera class that has a Pose3 and a fixed Calibration.
    Definition PinholePose.h:243
    │ │ │
    A 3D pose (R,t) : (Rot3,Point3)
    Definition Pose3.h:37
    │ │ │ -
    bool equals(const Pose3 &pose, double tol=1e-9) const
    assert equality up to a tolerance
    Definition Pose3.cpp:157
    │ │ │ -
    void print(const std::string &s="") const
    print with optional string
    Definition Pose3.cpp:152
    │ │ │ -
    Definition StereoCamera.h:26
    │ │ │ -
    A stereo camera class, parameterize by left camera pose and stereo calibration.
    Definition StereoCamera.h:47
    │ │ │ -
    StereoCamera()
    Default constructor allocates a calibration!
    Definition StereoCamera.h:72
    │ │ │ -
    static size_t Dim()
    Dimensionality of the tangent space.
    Definition StereoCamera.h:110
    │ │ │ -
    void print(const std::string &s="") const
    print
    Definition StereoCamera.h:89
    │ │ │ -
    Vector6 localCoordinates(const StereoCamera &t2) const
    Local coordinates of manifold neighborhood around current value.
    Definition StereoCamera.h:120
    │ │ │ -
    bool equals(const StereoCamera &camera, double tol=1e-9) const
    equals
    Definition StereoCamera.h:95
    │ │ │ -
    size_t dim() const
    Dimensionality of the tangent space.
    Definition StereoCamera.h:105
    │ │ │ -
    StereoCamera retract(const Vector &v) const
    Updates a with tangent space delta.
    Definition StereoCamera.h:115
    │ │ │ -
    StereoPoint2 Measurement
    Some classes template on either PinholeCamera or StereoCamera, and this typedef informs those classes...
    Definition StereoCamera.h:55
    │ │ │ -
    const Cal3_S2Stereo & calibration() const
    Return shared pointer to calibration.
    Definition StereoCamera.h:80
    │ │ │ -
    double baseline() const
    baseline
    Definition StereoCamera.h:134
    │ │ │ -
    const Pose3 & pose() const
    pose
    Definition StereoCamera.h:129
    │ │ │ -
    Vector defaultErrorWhenTriangulatingBehindCamera() const
    for Nonlinear Triangulation
    Definition StereoCamera.h:174
    │ │ │ -
    A 2D stereo point, v will be same for rectified images.
    Definition StereoPoint2.h:32
    │ │ │ +
    Point3 transformTo(const Point3 &point, OptionalJacobian< 3, 6 > Hself=boost::none, OptionalJacobian< 3, 3 > Hpoint=boost::none) const
    takes point in world coordinates and transforms it to Pose coordinates
    Definition Pose3.cpp:371
    │ │ │ +
    const Point3 & translation(OptionalJacobian< 3, 6 > Hself=boost::none) const
    get translation
    Definition Pose3.cpp:308
    │ │ │ +
    Exception thrown by triangulateDLT when SVD returns rank < 3.
    Definition triangulation.h:39
    │ │ │ +
    Exception thrown by triangulateDLT when landmark is behind one or more of the cameras.
    Definition triangulation.h:47
    │ │ │ +
    Definition triangulation.h:556
    │ │ │ +
    TriangulationParameters(const double _rankTolerance=1.0, const bool _enableEPI=false, double _landmarkDistanceThreshold=-1, double _dynamicOutlierRejectionThreshold=-1, const SharedNoiseModel &_noiseModel=nullptr)
    Constructor.
    Definition triangulation.h:586
    │ │ │ +
    double dynamicOutlierRejectionThreshold
    If this is nonnegative the we will check if the average reprojection error is smaller than this thres...
    Definition triangulation.h:573
    │ │ │ +
    double rankTolerance
    threshold to decide whether triangulation is result.degenerate
    Definition triangulation.h:558
    │ │ │ +
    double landmarkDistanceThreshold
    if the landmark is triangulated at distance larger than this, result is flagged as degenerate.
    Definition triangulation.h:566
    │ │ │ +
    bool enableEPI
    if set to true, will refine triangulation using LM
    Definition triangulation.h:560
    │ │ │ +
    SharedNoiseModel noiseModel
    used in the nonlinear triangulation
    Definition triangulation.h:575
    │ │ │ +
    TriangulationResult is an optional point, along with the reasons why it is invalid.
    Definition triangulation.h:626
    │ │ │ +
    TriangulationResult()
    Default constructor, only for serialization.
    Definition triangulation.h:638
    │ │ │ +
    TriangulationResult(const Point3 &p)
    Constructor.
    Definition triangulation.h:643
    │ │ │ +
    friend class boost::serialization::access
    Serialization function.
    Definition triangulation.h:671
    │ │ │ +
    Character and index key used to refer to variables.
    Definition Symbol.h:35
    │ │ │ +
    static shared_ptr Sigma(size_t dim, double sigma, bool smart=true)
    An isotropic noise model created by specifying a standard devation sigma.
    Definition NoiseModel.cpp:597
    │ │ │ +
    static shared_ptr Create(size_t dim)
    Create a unit covariance noise model.
    Definition NoiseModel.h:597
    │ │ │ +
    Definition NonlinearFactorGraph.h:55
    │ │ │ +
    A non-templated config holding any types of Manifold-group elements.
    Definition Values.h:65
    │ │ │ +
    void insert(Key j, const Value &val)
    Add a variable with the given j, throws KeyAlreadyExists<J> if j is already present.
    Definition Values.cpp:157
    │ │ │ +
    Non-linear factor for a constraint derived from a 2D measurement.
    Definition TriangulationFactor.h:33
    │ │ │ +
    In nonlinear factors, the error function returns the negative log-likelihood as a non-linear function...
    │ │ │ + │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,265 +1,815 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -StereoCamera.h │ │ │ │ +triangulation.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -18#pragma once │ │ │ │ -19 │ │ │ │ -20#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3___S_2_S_t_e_r_e_o_._h> │ │ │ │ -21#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_s_e_3_._h> │ │ │ │ -22#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_S_t_e_r_e_o_P_o_i_n_t_2_._h> │ │ │ │ -23 │ │ │ │ -24namespace _g_t_s_a_m { │ │ │ │ -25 │ │ │ │ -_2_6class GTSAM_EXPORT _S_t_e_r_e_o_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n: public std::runtime_error { │ │ │ │ -27public: │ │ │ │ -28 _S_t_e_r_e_o_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n() │ │ │ │ -29 : _S_t_e_r_e_o_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n(std::numeric_limits::max()) {} │ │ │ │ -30 │ │ │ │ -31 _S_t_e_r_e_o_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n(_K_e_y j) │ │ │ │ -32 : std::runtime_error("Stereo Cheirality Exception"), │ │ │ │ -33 j_(j) {} │ │ │ │ -34 │ │ │ │ -35 _K_e_y nearbyVariable() const { │ │ │ │ -36 return j_; │ │ │ │ -37 } │ │ │ │ -38 │ │ │ │ -39private: │ │ │ │ -40 _K_e_y j_; │ │ │ │ -41}; │ │ │ │ -42 │ │ │ │ -_4_7class GTSAM_EXPORT _S_t_e_r_e_o_C_a_m_e_r_a { │ │ │ │ -48 │ │ │ │ -49public: │ │ │ │ -50 │ │ │ │ -_5_5 typedef _S_t_e_r_e_o_P_o_i_n_t_2 _M_e_a_s_u_r_e_m_e_n_t; │ │ │ │ -56 typedef StereoPoint2Vector MeasurementVector; │ │ │ │ -57 │ │ │ │ -58private: │ │ │ │ -59 _P_o_s_e_3 leftCamPose_; │ │ │ │ -60 Cal3_S2Stereo::shared_ptr K_; │ │ │ │ -61 │ │ │ │ -62public: │ │ │ │ -63 │ │ │ │ -64 enum { │ │ │ │ -65 dimension = 6 │ │ │ │ -66 }; │ │ │ │ -67 │ │ │ │ -70 │ │ │ │ -_7_2 _S_t_e_r_e_o_C_a_m_e_r_a() : │ │ │ │ -73 K_(new _C_a_l_3___S_2_S_t_e_r_e_o()) { │ │ │ │ -74 } │ │ │ │ -75 │ │ │ │ -77 _S_t_e_r_e_o_C_a_m_e_r_a(const _P_o_s_e_3& leftCamPose, const Cal3_S2Stereo::shared_ptr K); │ │ │ │ -78 │ │ │ │ -_8_0 const _C_a_l_3___S_2_S_t_e_r_e_o& _c_a_l_i_b_r_a_t_i_o_n() const { │ │ │ │ -81 return *K_; │ │ │ │ -82 } │ │ │ │ -83 │ │ │ │ -87 │ │ │ │ -_8_9 void _p_r_i_n_t(const std::string& s = "") const { │ │ │ │ -90 leftCamPose_._p_r_i_n_t(s + ".camera."); │ │ │ │ -91 K_->print(s + ".calibration."); │ │ │ │ -92 } │ │ │ │ -93 │ │ │ │ -_9_5 bool _e_q_u_a_l_s(const _S_t_e_r_e_o_C_a_m_e_r_a &camera, double tol = 1e-9) const { │ │ │ │ -96 return leftCamPose_._e_q_u_a_l_s(camera.leftCamPose_, tol) │ │ │ │ -97 && K_->equals(*camera.K_, tol); │ │ │ │ -98 } │ │ │ │ -99 │ │ │ │ -103 │ │ │ │ -_1_0_5 inline size_t _d_i_m() const { │ │ │ │ -106 return 6; │ │ │ │ -107 } │ │ │ │ -108 │ │ │ │ -_1_1_0 static inline size_t _D_i_m() { │ │ │ │ -111 return 6; │ │ │ │ -112 } │ │ │ │ -113 │ │ │ │ -_1_1_5 inline _S_t_e_r_e_o_C_a_m_e_r_a _r_e_t_r_a_c_t(const Vector& v) const { │ │ │ │ -116 return _S_t_e_r_e_o_C_a_m_e_r_a(pose().retract(v), K_); │ │ │ │ -117 } │ │ │ │ -118 │ │ │ │ -_1_2_0 inline Vector6 _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const _S_t_e_r_e_o_C_a_m_e_r_a& t2) const { │ │ │ │ -121 return leftCamPose_._l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(t2.leftCamPose_); │ │ │ │ -122 } │ │ │ │ -123 │ │ │ │ -127 │ │ │ │ -_1_2_9 const _P_o_s_e_3& _p_o_s_e() const { │ │ │ │ -130 return leftCamPose_; │ │ │ │ -131 } │ │ │ │ -132 │ │ │ │ -_1_3_4 double _b_a_s_e_l_i_n_e() const { │ │ │ │ -135 return K_->baseline(); │ │ │ │ +21#pragma once │ │ │ │ +22 │ │ │ │ +23#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3_B_u_n_d_l_e_r_._h> │ │ │ │ +24#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3_F_i_s_h_e_y_e_._h> │ │ │ │ +25#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3_U_n_i_f_i_e_d_._h> │ │ │ │ +26#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3___S_2_._h> │ │ │ │ +27#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3_D_S_2_._h> │ │ │ │ +28#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_m_e_r_a_S_e_t_._h> │ │ │ │ +29#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_i_n_h_o_l_e_C_a_m_e_r_a_._h> │ │ │ │ +30#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_._h> │ │ │ │ +31#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_s_e_2_._h> │ │ │ │ +32#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_S_y_m_b_o_l_._h> │ │ │ │ +33#include <_g_t_s_a_m_/_n_o_n_l_i_n_e_a_r_/_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ +34#include │ │ │ │ +35 │ │ │ │ +36namespace _g_t_s_a_m { │ │ │ │ +37 │ │ │ │ +_3_9class GTSAM_EXPORT _T_r_i_a_n_g_u_l_a_t_i_o_n_U_n_d_e_r_c_o_n_s_t_r_a_i_n_e_d_E_x_c_e_p_t_i_o_n: public std:: │ │ │ │ +runtime_error { │ │ │ │ +40public: │ │ │ │ +41 _T_r_i_a_n_g_u_l_a_t_i_o_n_U_n_d_e_r_c_o_n_s_t_r_a_i_n_e_d_E_x_c_e_p_t_i_o_n() : │ │ │ │ +42 std::runtime_error("Triangulation Underconstrained Exception.") { │ │ │ │ +43 } │ │ │ │ +44}; │ │ │ │ +45 │ │ │ │ +_4_7class GTSAM_EXPORT _T_r_i_a_n_g_u_l_a_t_i_o_n_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n: public std:: │ │ │ │ +runtime_error { │ │ │ │ +48public: │ │ │ │ +49 _T_r_i_a_n_g_u_l_a_t_i_o_n_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n() : │ │ │ │ +50 std::runtime_error( │ │ │ │ +51 "Triangulation Cheirality Exception: The resulting landmark is behind one or │ │ │ │ +more cameras.") { │ │ │ │ +52 } │ │ │ │ +53}; │ │ │ │ +54 │ │ │ │ +62GTSAM_EXPORT Vector4 _t_r_i_a_n_g_u_l_a_t_e_H_o_m_o_g_e_n_e_o_u_s_D_L_T( │ │ │ │ +63 const std::vector>& │ │ │ │ +projection_matrices, │ │ │ │ +64 const Point2Vector& measurements, double rank_tol = 1e-9); │ │ │ │ +65 │ │ │ │ +74GTSAM_EXPORT Vector4 _t_r_i_a_n_g_u_l_a_t_e_H_o_m_o_g_e_n_e_o_u_s_D_L_T( │ │ │ │ +75 const std::vector>& │ │ │ │ +projection_matrices, │ │ │ │ +76 const std::vector& measurements, double rank_tol = 1e-9); │ │ │ │ +77 │ │ │ │ +85GTSAM_EXPORT _P_o_i_n_t_3 _t_r_i_a_n_g_u_l_a_t_e_D_L_T( │ │ │ │ +86 const std::vector>& │ │ │ │ +projection_matrices, │ │ │ │ +87 const Point2Vector& measurements, │ │ │ │ +88 double rank_tol = 1e-9); │ │ │ │ +89 │ │ │ │ +93GTSAM_EXPORT _P_o_i_n_t_3 _t_r_i_a_n_g_u_l_a_t_e_D_L_T( │ │ │ │ +94 const std::vector>& │ │ │ │ +projection_matrices, │ │ │ │ +95 const std::vector& measurements, │ │ │ │ +96 double rank_tol = 1e-9); │ │ │ │ +97 │ │ │ │ +108GTSAM_EXPORT _P_o_i_n_t_3 _t_r_i_a_n_g_u_l_a_t_e_L_O_S_T(const std::vector& poses, │ │ │ │ +109 const Point3Vector& calibratedMeasurements, │ │ │ │ +110 const SharedIsotropic& measurementNoise); │ │ │ │ +111 │ │ │ │ +121template │ │ │ │ +_1_2_2std::pair _t_r_i_a_n_g_u_l_a_t_i_o_n_G_r_a_p_h( │ │ │ │ +123 const std::vector& poses, boost::shared_ptr sharedCal, │ │ │ │ +124 const Point2Vector& measurements, _K_e_y landmarkKey, │ │ │ │ +125 const _P_o_i_n_t_3& initialEstimate, │ │ │ │ +126 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model = _n_o_i_s_e_M_o_d_e_l_:_:_U_n_i_t_:_:_C_r_e_a_t_e(2)) { │ │ │ │ +127 _V_a_l_u_e_s values; │ │ │ │ +128 values._i_n_s_e_r_t(landmarkKey, initialEstimate); // Initial landmark value │ │ │ │ +129 _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h graph; │ │ │ │ +130 for (size_t i = 0; i < measurements.size(); i++) { │ │ │ │ +131 const _P_o_s_e_3& pose_i = poses[i]; │ │ │ │ +132 typedef _P_i_n_h_o_l_e_P_o_s_e_<_C_A_L_I_B_R_A_T_I_O_N_> Camera; │ │ │ │ +133 Camera camera_i(pose_i, sharedCal); │ │ │ │ +134 graph.emplace_shared<_T_r_i_a_n_g_u_l_a_t_i_o_n_F_a_c_t_o_r_<_C_a_m_e_r_a_> > // │ │ │ │ +135 (camera_i, measurements[i], model, landmarkKey); │ │ │ │ 136 } │ │ │ │ -137 │ │ │ │ -139 _S_t_e_r_e_o_P_o_i_n_t_2 _p_r_o_j_e_c_t(const _P_o_i_n_t_3& point) const; │ │ │ │ -140 │ │ │ │ -145 _S_t_e_r_e_o_P_o_i_n_t_2 project2(const _P_o_i_n_t_3& point, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _6_> H1 = │ │ │ │ -146 boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H2 = boost::none) const; │ │ │ │ -147 │ │ │ │ -149 _P_o_i_n_t_3 backproject(const _S_t_e_r_e_o_P_o_i_n_t_2& z) const; │ │ │ │ -150 │ │ │ │ -155 _P_o_i_n_t_3 backproject2(const _S_t_e_r_e_o_P_o_i_n_t_2& z, │ │ │ │ -156 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _6_> H1 = boost::none, │ │ │ │ -157 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H2 = boost::none) const; │ │ │ │ -158 │ │ │ │ -162 │ │ │ │ -169 _S_t_e_r_e_o_P_o_i_n_t_2 _p_r_o_j_e_c_t(const _P_o_i_n_t_3& point, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _6_> H1, │ │ │ │ -170 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H2 = boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _0_> H3 = │ │ │ │ -171 boost::none) const; │ │ │ │ -172 │ │ │ │ -_1_7_4 Vector _d_e_f_a_u_l_t_E_r_r_o_r_W_h_e_n_T_r_i_a_n_g_u_l_a_t_i_n_g_B_e_h_i_n_d_C_a_m_e_r_a() const { │ │ │ │ -175 return Eigen::Matrix::dimension,1>::Constant(2.0 │ │ │ │ -* K_->fx());; │ │ │ │ -176 } │ │ │ │ +137 return std::make_pair(graph, values); │ │ │ │ +138} │ │ │ │ +139 │ │ │ │ +149template │ │ │ │ +_1_5_0std::pair _t_r_i_a_n_g_u_l_a_t_i_o_n_G_r_a_p_h( │ │ │ │ +151 const _C_a_m_e_r_a_S_e_t_<_C_A_M_E_R_A_>& cameras, │ │ │ │ +152 const typename CAMERA::MeasurementVector& measurements, _K_e_y landmarkKey, │ │ │ │ +153 const _P_o_i_n_t_3& initialEstimate, │ │ │ │ +154 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model = nullptr) { │ │ │ │ +155 _V_a_l_u_e_s values; │ │ │ │ +156 values._i_n_s_e_r_t(landmarkKey, initialEstimate); // Initial landmark value │ │ │ │ +157 _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h graph; │ │ │ │ +158 static _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l unit(_n_o_i_s_e_M_o_d_e_l_:_:_U_n_i_t_:_:_C_r_e_a_t_e( │ │ │ │ +159 _t_r_a_i_t_s_<_t_y_p_e_n_a_m_e_ _C_A_M_E_R_A_:_:_M_e_a_s_u_r_e_m_e_n_t_>_:_:_d_i_m_e_n_s_i_o_n)); │ │ │ │ +160 for (size_t i = 0; i < measurements.size(); i++) { │ │ │ │ +161 const CAMERA& camera_i = cameras[i]; │ │ │ │ +162 graph.emplace_shared<_T_r_i_a_n_g_u_l_a_t_i_o_n_F_a_c_t_o_r_<_C_A_M_E_R_A_> > // │ │ │ │ +163 (camera_i, measurements[i], model? model : unit, landmarkKey); │ │ │ │ +164 } │ │ │ │ +165 return std::make_pair(graph, values); │ │ │ │ +166} │ │ │ │ +167 │ │ │ │ +175GTSAM_EXPORT _P_o_i_n_t_3 _o_p_t_i_m_i_z_e(const NonlinearFactorGraph& graph, │ │ │ │ +176 const _V_a_l_u_e_s& values, _K_e_y landmarkKey); │ │ │ │ 177 │ │ │ │ -179 │ │ │ │ -180private: │ │ │ │ -181 │ │ │ │ -182 friend class boost::serialization::access; │ │ │ │ -183 template │ │ │ │ -184 void serialize(Archive & ar, const unsigned int /*version*/) { │ │ │ │ -185 ar & BOOST_SERIALIZATION_NVP(leftCamPose_); │ │ │ │ -186 ar & BOOST_SERIALIZATION_NVP(K_); │ │ │ │ -187 } │ │ │ │ -188 │ │ │ │ -189}; │ │ │ │ -190 │ │ │ │ -191template<> │ │ │ │ -_1_9_2struct _t_r_a_i_t_s<_S_t_e_r_e_o_C_a_m_e_r_a> : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d { │ │ │ │ -193}; │ │ │ │ -194 │ │ │ │ -195template<> │ │ │ │ -_1_9_6struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d │ │ │ │ +186template │ │ │ │ +_1_8_7_P_o_i_n_t_3 _t_r_i_a_n_g_u_l_a_t_e_N_o_n_l_i_n_e_a_r(const std::vector& poses, │ │ │ │ +188 boost::shared_ptr sharedCal, │ │ │ │ +189 const Point2Vector& measurements, const _P_o_i_n_t_3& initialEstimate, │ │ │ │ +190 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model = nullptr) { │ │ │ │ +191 │ │ │ │ +192 // Create a factor graph and initial values │ │ │ │ +193 _V_a_l_u_e_s values; │ │ │ │ +194 _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h graph; │ │ │ │ +195 boost::tie(graph, values) = triangulationGraph // │ │ │ │ +196 (poses, sharedCal, measurements, _S_y_m_b_o_l('p', 0), initialEstimate, model); │ │ │ │ +197 │ │ │ │ +198 return _o_p_t_i_m_i_z_e(graph, values, _S_y_m_b_o_l('p', 0)); │ │ │ │ +199} │ │ │ │ +200 │ │ │ │ +208template │ │ │ │ +_2_0_9_P_o_i_n_t_3 _t_r_i_a_n_g_u_l_a_t_e_N_o_n_l_i_n_e_a_r( │ │ │ │ +210 const _C_a_m_e_r_a_S_e_t_<_C_A_M_E_R_A_>& cameras, │ │ │ │ +211 const typename CAMERA::MeasurementVector& measurements, const _P_o_i_n_t_3& │ │ │ │ +initialEstimate, │ │ │ │ +212 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model = nullptr) { │ │ │ │ +213 │ │ │ │ +214 // Create a factor graph and initial values │ │ │ │ +215 _V_a_l_u_e_s values; │ │ │ │ +216 _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h graph; │ │ │ │ +217 boost::tie(graph, values) = triangulationGraph // │ │ │ │ +218 (cameras, measurements, _S_y_m_b_o_l('p', 0), initialEstimate, model); │ │ │ │ +219 │ │ │ │ +220 return _o_p_t_i_m_i_z_e(graph, values, _S_y_m_b_o_l('p', 0)); │ │ │ │ +221} │ │ │ │ +222 │ │ │ │ +223template │ │ │ │ +224std::vector> │ │ │ │ +225projectionMatricesFromCameras(const CameraSet &cameras) { │ │ │ │ +226 std::vector> │ │ │ │ +projection_matrices; │ │ │ │ +227 for (const CAMERA &camera: cameras) { │ │ │ │ +228 projection_matrices.push_back(camera.cameraProjectionMatrix()); │ │ │ │ +229 } │ │ │ │ +230 return projection_matrices; │ │ │ │ +231} │ │ │ │ +232 │ │ │ │ +233// overload, assuming pinholePose │ │ │ │ +234template │ │ │ │ +235std::vector> │ │ │ │ +projectionMatricesFromPoses( │ │ │ │ +236 const std::vector &poses, boost::shared_ptr sharedCal) │ │ │ │ { │ │ │ │ -197}; │ │ │ │ -198} │ │ │ │ -_S_t_e_r_e_o_P_o_i_n_t_2_._h │ │ │ │ -A 2D stereo point (uL,uR,v) │ │ │ │ -_P_o_s_e_3_._h │ │ │ │ -3D Pose │ │ │ │ -_C_a_l_3___S_2_S_t_e_r_e_o_._h │ │ │ │ -The most common 5DOF 3D->2D calibration + Stereo baseline. │ │ │ │ +237 std::vector> │ │ │ │ +projection_matrices; │ │ │ │ +238 for (size_t i = 0; i < poses.size(); i++) { │ │ │ │ +239 PinholePose camera(poses.at(i), sharedCal); │ │ │ │ +240 projection_matrices.push_back(camera.cameraProjectionMatrix()); │ │ │ │ +241 } │ │ │ │ +242 return projection_matrices; │ │ │ │ +243} │ │ │ │ +244 │ │ │ │ +252template │ │ │ │ +_2_5_3_C_a_l_3___S_2 _c_r_e_a_t_e_P_i_n_h_o_l_e_C_a_l_i_b_r_a_t_i_o_n(const CALIBRATION& cal) { │ │ │ │ +254 const auto& K = cal.K(); │ │ │ │ +255 return _C_a_l_3___S_2(K(0, 0), K(1, 1), K(0, 1), K(0, 2), K(1, 2)); │ │ │ │ +256} │ │ │ │ +257 │ │ │ │ +260template │ │ │ │ +_2_6_1MEASUREMENT _u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_I_n_t_e_r_n_a_l( │ │ │ │ +262 const CALIBRATION& cal, const MEASUREMENT& measurement, │ │ │ │ +263 boost::optional pinholeCal = boost::none) { │ │ │ │ +264 if (!pinholeCal) { │ │ │ │ +265 pinholeCal = _c_r_e_a_t_e_P_i_n_h_o_l_e_C_a_l_i_b_r_a_t_i_o_n(cal); │ │ │ │ +266 } │ │ │ │ +267 return pinholeCal->uncalibrate(cal.calibrate(measurement)); │ │ │ │ +268} │ │ │ │ +269 │ │ │ │ +281template │ │ │ │ +_2_8_2Point2Vector _u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_s(const CALIBRATION& cal, │ │ │ │ +283 const Point2Vector& measurements) { │ │ │ │ +284 _C_a_l_3___S_2 pinholeCalibration = _c_r_e_a_t_e_P_i_n_h_o_l_e_C_a_l_i_b_r_a_t_i_o_n(cal); │ │ │ │ +285 Point2Vector undistortedMeasurements; │ │ │ │ +286 // Calibrate with cal and uncalibrate with pinhole version of cal so that │ │ │ │ +287 // measurements are undistorted. │ │ │ │ +288 std::transform(measurements.begin(), measurements.end(), │ │ │ │ +289 std::back_inserter(undistortedMeasurements), │ │ │ │ +290 [&cal, &pinholeCalibration](const _P_o_i_n_t_2& measurement) { │ │ │ │ +291 return undistortMeasurementInternal( │ │ │ │ +292 cal, measurement, pinholeCalibration); │ │ │ │ +293 }); │ │ │ │ +294 return undistortedMeasurements; │ │ │ │ +295} │ │ │ │ +296 │ │ │ │ +298template <> │ │ │ │ +_2_9_9inline Point2Vector _u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_s(const _C_a_l_3___S_2& cal, │ │ │ │ +300 const Point2Vector& measurements) { │ │ │ │ +301 return measurements; │ │ │ │ +302} │ │ │ │ +303 │ │ │ │ +315template │ │ │ │ +_3_1_6typename CAMERA::MeasurementVector _u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_s( │ │ │ │ +317 const _C_a_m_e_r_a_S_e_t_<_C_A_M_E_R_A_>& cameras, │ │ │ │ +318 const typename CAMERA::MeasurementVector& measurements) { │ │ │ │ +319 const size_t nrMeasurements = measurements.size(); │ │ │ │ +320 assert(nrMeasurements == cameras.size()); │ │ │ │ +321 typename CAMERA::MeasurementVector undistortedMeasurements(nrMeasurements); │ │ │ │ +322 for (size_t ii = 0; ii < nrMeasurements; ++ii) { │ │ │ │ +323 // Calibrate with cal and uncalibrate with pinhole version of cal so that │ │ │ │ +324 // measurements are undistorted. │ │ │ │ +325 undistortedMeasurements[ii] = │ │ │ │ +326 undistortMeasurementInternal( │ │ │ │ +327 cameras[ii].calibration(), measurements[ii]); │ │ │ │ +328 } │ │ │ │ +329 return undistortedMeasurements; │ │ │ │ +330} │ │ │ │ +331 │ │ │ │ +333template > │ │ │ │ +_3_3_4inline PinholeCamera::MeasurementVector _u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_s( │ │ │ │ +335 const _C_a_m_e_r_a_S_e_t<_P_i_n_h_o_l_e_C_a_m_e_r_a_<_C_a_l_3___S_2_>>& cameras, │ │ │ │ +336 const PinholeCamera::MeasurementVector& measurements) { │ │ │ │ +337 return measurements; │ │ │ │ +338} │ │ │ │ +339 │ │ │ │ +341template │ │ │ │ +_3_4_2inline SphericalCamera::MeasurementVector _u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_s( │ │ │ │ +343 const _C_a_m_e_r_a_S_e_t_<_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_>& cameras, │ │ │ │ +344 const SphericalCamera::MeasurementVector& measurements) { │ │ │ │ +345 return measurements; │ │ │ │ +346} │ │ │ │ +347 │ │ │ │ +356template │ │ │ │ +_3_5_7inline Point3Vector _c_a_l_i_b_r_a_t_e_M_e_a_s_u_r_e_m_e_n_t_s_S_h_a_r_e_d( │ │ │ │ +358 const CALIBRATION& cal, const Point2Vector& measurements) { │ │ │ │ +359 Point3Vector calibratedMeasurements; │ │ │ │ +360 // Calibrate with cal and uncalibrate with pinhole version of cal so that │ │ │ │ +361 // measurements are undistorted. │ │ │ │ +362 std::transform(measurements.begin(), measurements.end(), │ │ │ │ +363 std::back_inserter(calibratedMeasurements), │ │ │ │ +364 [&cal](const _P_o_i_n_t_2& measurement) { │ │ │ │ +365 Point3 p; │ │ │ │ +366 p << cal.calibrate(measurement), 1.0; │ │ │ │ +367 return p; │ │ │ │ +368 }); │ │ │ │ +369 return calibratedMeasurements; │ │ │ │ +370} │ │ │ │ +371 │ │ │ │ +380template │ │ │ │ +_3_8_1inline Point3Vector _c_a_l_i_b_r_a_t_e_M_e_a_s_u_r_e_m_e_n_t_s( │ │ │ │ +382 const _C_a_m_e_r_a_S_e_t_<_C_A_M_E_R_A_>& cameras, │ │ │ │ +383 const typename CAMERA::MeasurementVector& measurements) { │ │ │ │ +384 const size_t nrMeasurements = measurements.size(); │ │ │ │ +385 assert(nrMeasurements == cameras.size()); │ │ │ │ +386 Point3Vector calibratedMeasurements(nrMeasurements); │ │ │ │ +387 for (size_t ii = 0; ii < nrMeasurements; ++ii) { │ │ │ │ +388 calibratedMeasurements[ii] │ │ │ │ +389 << cameras[ii].calibration().calibrate(measurements[ii]), │ │ │ │ +390 1.0; │ │ │ │ +391 } │ │ │ │ +392 return calibratedMeasurements; │ │ │ │ +393} │ │ │ │ +394 │ │ │ │ +396template │ │ │ │ +_3_9_7inline Point3Vector _c_a_l_i_b_r_a_t_e_M_e_a_s_u_r_e_m_e_n_t_s( │ │ │ │ +398 const _C_a_m_e_r_a_S_e_t_<_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_>& cameras, │ │ │ │ +399 const SphericalCamera::MeasurementVector& measurements) { │ │ │ │ +400 Point3Vector calibratedMeasurements(measurements.size()); │ │ │ │ +401 for (size_t ii = 0; ii < measurements.size(); ++ii) { │ │ │ │ +402 calibratedMeasurements[ii] << measurements[ii].point3(); │ │ │ │ +403 } │ │ │ │ +404 return calibratedMeasurements; │ │ │ │ +405} │ │ │ │ +406 │ │ │ │ +420template │ │ │ │ +_4_2_1_P_o_i_n_t_3 _t_r_i_a_n_g_u_l_a_t_e_P_o_i_n_t_3(const std::vector& poses, │ │ │ │ +422 boost::shared_ptr sharedCal, │ │ │ │ +423 const Point2Vector& measurements, │ │ │ │ +424 double rank_tol = 1e-9, bool _o_p_t_i_m_i_z_e = false, │ │ │ │ +425 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model = nullptr, │ │ │ │ +426 const bool useLOST = false) { │ │ │ │ +427 assert(poses.size() == measurements.size()); │ │ │ │ +428 if (poses.size() < 2) throw(_T_r_i_a_n_g_u_l_a_t_i_o_n_U_n_d_e_r_c_o_n_s_t_r_a_i_n_e_d_E_x_c_e_p_t_i_o_n()); │ │ │ │ +429 │ │ │ │ +430 // Triangulate linearly │ │ │ │ +431 _P_o_i_n_t_3 point; │ │ │ │ +432 if (useLOST) { │ │ │ │ +433 // Reduce input noise model to an isotropic noise model using the mean of │ │ │ │ +434 // the diagonal. │ │ │ │ +435 const double measurementSigma = model ? model->sigmas().mean() : 1e-4; │ │ │ │ +436 SharedIsotropic measurementNoise = │ │ │ │ +437 _n_o_i_s_e_M_o_d_e_l_:_:_I_s_o_t_r_o_p_i_c_:_:_S_i_g_m_a(2, measurementSigma); │ │ │ │ +438 // calibrate the measurements to obtain homogenous coordinates in image │ │ │ │ +439 // plane. │ │ │ │ +440 auto calibratedMeasurements = │ │ │ │ +441 calibrateMeasurementsShared(*sharedCal, measurements); │ │ │ │ +442 │ │ │ │ +443 point = _t_r_i_a_n_g_u_l_a_t_e_L_O_S_T(poses, calibratedMeasurements, measurementNoise); │ │ │ │ +444 } else { │ │ │ │ +445 // construct projection matrices from poses & calibration │ │ │ │ +446 auto projection_matrices = projectionMatricesFromPoses(poses, sharedCal); │ │ │ │ +447 │ │ │ │ +448 // Undistort the measurements, leaving only the pinhole elements in effect. │ │ │ │ +449 auto undistortedMeasurements = │ │ │ │ +450 undistortMeasurements(*sharedCal, measurements); │ │ │ │ +451 │ │ │ │ +452 point = │ │ │ │ +453 _t_r_i_a_n_g_u_l_a_t_e_D_L_T(projection_matrices, undistortedMeasurements, rank_tol); │ │ │ │ +454 } │ │ │ │ +455 │ │ │ │ +456 // Then refine using non-linear optimization │ │ │ │ +457 if (_o_p_t_i_m_i_z_e) │ │ │ │ +458 point = triangulateNonlinear // │ │ │ │ +459 (poses, sharedCal, measurements, point, model); │ │ │ │ +460 │ │ │ │ +461#ifdef GTSAM_THROW_CHEIRALITY_EXCEPTION │ │ │ │ +462 // verify that the triangulated point lies in front of all cameras │ │ │ │ +463 for (const _P_o_s_e_3& pose : poses) { │ │ │ │ +464 const _P_o_i_n_t_3& p_local = pose.transformTo(point); │ │ │ │ +465 if (p_local.z() <= 0) throw(_T_r_i_a_n_g_u_l_a_t_i_o_n_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n()); │ │ │ │ +466 } │ │ │ │ +467#endif │ │ │ │ +468 │ │ │ │ +469 return point; │ │ │ │ +470} │ │ │ │ +471 │ │ │ │ +486template │ │ │ │ +_4_8_7_P_o_i_n_t_3 _t_r_i_a_n_g_u_l_a_t_e_P_o_i_n_t_3(const _C_a_m_e_r_a_S_e_t_<_C_A_M_E_R_A_>& cameras, │ │ │ │ +488 const typename CAMERA::MeasurementVector& measurements, │ │ │ │ +489 double rank_tol = 1e-9, bool _o_p_t_i_m_i_z_e = false, │ │ │ │ +490 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model = nullptr, │ │ │ │ +491 const bool useLOST = false) { │ │ │ │ +492 size_t m = cameras.size(); │ │ │ │ +493 assert(measurements.size() == m); │ │ │ │ +494 │ │ │ │ +495 if (m < 2) throw(_T_r_i_a_n_g_u_l_a_t_i_o_n_U_n_d_e_r_c_o_n_s_t_r_a_i_n_e_d_E_x_c_e_p_t_i_o_n()); │ │ │ │ +496 │ │ │ │ +497 // Triangulate linearly │ │ │ │ +498 _P_o_i_n_t_3 point; │ │ │ │ +499 if (useLOST) { │ │ │ │ +500 // Reduce input noise model to an isotropic noise model using the mean of │ │ │ │ +501 // the diagonal. │ │ │ │ +502 const double measurementSigma = model ? model->sigmas().mean() : 1e-4; │ │ │ │ +503 SharedIsotropic measurementNoise = │ │ │ │ +504 _n_o_i_s_e_M_o_d_e_l_:_:_I_s_o_t_r_o_p_i_c_:_:_S_i_g_m_a(2, measurementSigma); │ │ │ │ +505 │ │ │ │ +506 // construct poses from cameras. │ │ │ │ +507 std::vector poses; │ │ │ │ +508 poses.reserve(cameras.size()); │ │ │ │ +509 for (const auto& camera : cameras) poses.push_back(camera.pose()); │ │ │ │ +510 │ │ │ │ +511 // calibrate the measurements to obtain homogenous coordinates in image │ │ │ │ +512 // plane. │ │ │ │ +513 auto calibratedMeasurements = │ │ │ │ +514 calibrateMeasurements(cameras, measurements); │ │ │ │ +515 │ │ │ │ +516 point = _t_r_i_a_n_g_u_l_a_t_e_L_O_S_T(poses, calibratedMeasurements, measurementNoise); │ │ │ │ +517 } else { │ │ │ │ +518 // construct projection matrices from poses & calibration │ │ │ │ +519 auto projection_matrices = projectionMatricesFromCameras(cameras); │ │ │ │ +520 │ │ │ │ +521 // Undistort the measurements, leaving only the pinhole elements in effect. │ │ │ │ +522 auto undistortedMeasurements = │ │ │ │ +523 undistortMeasurements(cameras, measurements); │ │ │ │ +524 │ │ │ │ +525 point = │ │ │ │ +526 _t_r_i_a_n_g_u_l_a_t_e_D_L_T(projection_matrices, undistortedMeasurements, rank_tol); │ │ │ │ +527 } │ │ │ │ +528 │ │ │ │ +529 // Then refine using non-linear optimization │ │ │ │ +530 if (_o_p_t_i_m_i_z_e) { │ │ │ │ +531 point = triangulateNonlinear(cameras, measurements, point, model); │ │ │ │ +532 } │ │ │ │ +533 │ │ │ │ +534#ifdef GTSAM_THROW_CHEIRALITY_EXCEPTION │ │ │ │ +535 // verify that the triangulated point lies in front of all cameras │ │ │ │ +536 for (const CAMERA& camera : cameras) { │ │ │ │ +537 const _P_o_i_n_t_3& p_local = camera.pose().transformTo(point); │ │ │ │ +538 if (p_local.z() <= 0) throw(_T_r_i_a_n_g_u_l_a_t_i_o_n_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n()); │ │ │ │ +539 } │ │ │ │ +540#endif │ │ │ │ +541 │ │ │ │ +542 return point; │ │ │ │ +543} │ │ │ │ +544 │ │ │ │ +546template │ │ │ │ +_5_4_7_P_o_i_n_t_3 _t_r_i_a_n_g_u_l_a_t_e_P_o_i_n_t_3(const _C_a_m_e_r_a_S_e_t<_P_i_n_h_o_l_e_C_a_m_e_r_a_<_C_A_L_I_B_R_A_T_I_O_N_>>& │ │ │ │ +cameras, │ │ │ │ +548 const Point2Vector& measurements, │ │ │ │ +549 double rank_tol = 1e-9, bool _o_p_t_i_m_i_z_e = false, │ │ │ │ +550 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model = nullptr, │ │ │ │ +551 const bool useLOST = false) { │ │ │ │ +552 return triangulatePoint3> // │ │ │ │ +553 (cameras, measurements, rank_tol, _o_p_t_i_m_i_z_e, model, useLOST); │ │ │ │ +554} │ │ │ │ +555 │ │ │ │ +_5_5_6struct GTSAM_EXPORT _T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s { │ │ │ │ +557 │ │ │ │ +_5_5_8 double _r_a_n_k_T_o_l_e_r_a_n_c_e; │ │ │ │ +_5_6_0 bool _e_n_a_b_l_e_E_P_I; │ │ │ │ +561 │ │ │ │ +_5_6_6 double _l_a_n_d_m_a_r_k_D_i_s_t_a_n_c_e_T_h_r_e_s_h_o_l_d; // │ │ │ │ +567 │ │ │ │ +_5_7_3 double _d_y_n_a_m_i_c_O_u_t_l_i_e_r_R_e_j_e_c_t_i_o_n_T_h_r_e_s_h_o_l_d; │ │ │ │ +574 │ │ │ │ +_5_7_5 _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l _n_o_i_s_e_M_o_d_e_l; │ │ │ │ +576 │ │ │ │ +_5_8_6 _T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s(const double _rankTolerance = 1.0, │ │ │ │ +587 const bool _enableEPI = false, double _landmarkDistanceThreshold = -1, │ │ │ │ +588 double _dynamicOutlierRejectionThreshold = -1, │ │ │ │ +589 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& _noiseModel = nullptr) : │ │ │ │ +590 rankTolerance(_rankTolerance), enableEPI(_enableEPI), // │ │ │ │ +591 landmarkDistanceThreshold(_landmarkDistanceThreshold), // │ │ │ │ +592 dynamicOutlierRejectionThreshold(_dynamicOutlierRejectionThreshold), │ │ │ │ +593 noiseModel(_noiseModel){ │ │ │ │ +594 } │ │ │ │ +595 │ │ │ │ +596 // stream to output │ │ │ │ +597 friend std::ostream &operator<<(std::ostream &os, │ │ │ │ +598 const _T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s& p) { │ │ │ │ +599 os << "rankTolerance = " << p._r_a_n_k_T_o_l_e_r_a_n_c_e << std::endl; │ │ │ │ +600 os << "enableEPI = " << p._e_n_a_b_l_e_E_P_I << std::endl; │ │ │ │ +601 os << "landmarkDistanceThreshold = " << p._l_a_n_d_m_a_r_k_D_i_s_t_a_n_c_e_T_h_r_e_s_h_o_l_d │ │ │ │ +602 << std::endl; │ │ │ │ +603 os << "dynamicOutlierRejectionThreshold = " │ │ │ │ +604 << p._d_y_n_a_m_i_c_O_u_t_l_i_e_r_R_e_j_e_c_t_i_o_n_T_h_r_e_s_h_o_l_d << std::endl; │ │ │ │ +605 os << "noise model" << std::endl; │ │ │ │ +606 return os; │ │ │ │ +607 } │ │ │ │ +608 │ │ │ │ +609private: │ │ │ │ +610 │ │ │ │ +_6_1_2 friend class boost::serialization::access; │ │ │ │ +613 template │ │ │ │ +614 void serialize(ARCHIVE & ar, const unsigned int version) { │ │ │ │ +615 ar & BOOST_SERIALIZATION_NVP(rankTolerance); │ │ │ │ +616 ar & BOOST_SERIALIZATION_NVP(enableEPI); │ │ │ │ +617 ar & BOOST_SERIALIZATION_NVP(landmarkDistanceThreshold); │ │ │ │ +618 ar & BOOST_SERIALIZATION_NVP(dynamicOutlierRejectionThreshold); │ │ │ │ +619 } │ │ │ │ +620}; │ │ │ │ +621 │ │ │ │ +_6_2_6class _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t : public boost::optional { │ │ │ │ +627 public: │ │ │ │ +628 enum Status { VALID, DEGENERATE, BEHIND_CAMERA, OUTLIER, FAR_POINT }; │ │ │ │ +629 Status status; │ │ │ │ +630 │ │ │ │ +631 private: │ │ │ │ +632 _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t(Status s) : status(s) {} │ │ │ │ +633 │ │ │ │ +634 public: │ │ │ │ +_6_3_8 _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t() {} │ │ │ │ +639 │ │ │ │ +_6_4_3 _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t(const _P_o_i_n_t_3& p) : status(VALID) { reset(p); } │ │ │ │ +644 static _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t Degenerate() { │ │ │ │ +645 return _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t(DEGENERATE); │ │ │ │ +646 } │ │ │ │ +647 static _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t Outlier() { return _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t(OUTLIER); │ │ │ │ +} │ │ │ │ +648 static _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t FarPoint() { │ │ │ │ +649 return _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t(FAR_POINT); │ │ │ │ +650 } │ │ │ │ +651 static _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t BehindCamera() { │ │ │ │ +652 return _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t(BEHIND_CAMERA); │ │ │ │ +653 } │ │ │ │ +654 bool valid() const { return status == VALID; } │ │ │ │ +655 bool degenerate() const { return status == DEGENERATE; } │ │ │ │ +656 bool outlier() const { return status == OUTLIER; } │ │ │ │ +657 bool farPoint() const { return status == FAR_POINT; } │ │ │ │ +658 bool behindCamera() const { return status == BEHIND_CAMERA; } │ │ │ │ +659 // stream to output │ │ │ │ +660 friend std::ostream& operator<<(std::ostream& os, │ │ │ │ +661 const _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t& result) { │ │ │ │ +662 if (result) │ │ │ │ +663 os << "point = " << *result << std::endl; │ │ │ │ +664 else │ │ │ │ +665 os << "no point, status = " << result.status << std::endl; │ │ │ │ +666 return os; │ │ │ │ +667 } │ │ │ │ +668 │ │ │ │ +669 private: │ │ │ │ +_6_7_1 friend class _b_o_o_s_t_:_:_s_e_r_i_a_l_i_z_a_t_i_o_n_:_:_a_c_c_e_s_s; │ │ │ │ +672 template │ │ │ │ +673 void serialize(ARCHIVE& ar, const unsigned int version) { │ │ │ │ +674 ar& BOOST_SERIALIZATION_NVP(status); │ │ │ │ +675 } │ │ │ │ +676}; │ │ │ │ +677 │ │ │ │ +679template │ │ │ │ +_6_8_0_T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t _t_r_i_a_n_g_u_l_a_t_e_S_a_f_e(const _C_a_m_e_r_a_S_e_t_<_C_A_M_E_R_A_>& cameras, │ │ │ │ +681 const typename CAMERA::MeasurementVector& measured, │ │ │ │ +682 const _T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s& params) { │ │ │ │ +683 │ │ │ │ +684 size_t m = cameras.size(); │ │ │ │ +685 │ │ │ │ +686 // if we have a single pose the corresponding factor is uninformative │ │ │ │ +687 if (m < 2) │ │ │ │ +688 return TriangulationResult::Degenerate(); │ │ │ │ +689 else │ │ │ │ +690 // We triangulate the 3D position of the landmark │ │ │ │ +691 try { │ │ │ │ +692 _P_o_i_n_t_3 point = │ │ │ │ +693 triangulatePoint3(cameras, measured, params._r_a_n_k_T_o_l_e_r_a_n_c_e, │ │ │ │ +694 params._e_n_a_b_l_e_E_P_I, params._n_o_i_s_e_M_o_d_e_l); │ │ │ │ +695 │ │ │ │ +696 // Check landmark distance and re-projection errors to avoid outliers │ │ │ │ +697 size_t i = 0; │ │ │ │ +698 double maxReprojError = 0.0; │ │ │ │ +699 for(const CAMERA& camera: cameras) { │ │ │ │ +700 const _P_o_s_e_3& pose = camera.pose(); │ │ │ │ +701 if (params._l_a_n_d_m_a_r_k_D_i_s_t_a_n_c_e_T_h_r_e_s_h_o_l_d > 0 │ │ │ │ +702 && _d_i_s_t_a_n_c_e_3(pose._t_r_a_n_s_l_a_t_i_o_n(), point) │ │ │ │ +703 > params._l_a_n_d_m_a_r_k_D_i_s_t_a_n_c_e_T_h_r_e_s_h_o_l_d) │ │ │ │ +704 return TriangulationResult::FarPoint(); │ │ │ │ +705#ifdef GTSAM_THROW_CHEIRALITY_EXCEPTION │ │ │ │ +706 // verify that the triangulated point lies in front of all cameras │ │ │ │ +707 // Only needed if this was not yet handled by exception │ │ │ │ +708 const _P_o_i_n_t_3& p_local = pose._t_r_a_n_s_f_o_r_m_T_o(point); │ │ │ │ +709 if (p_local.z() <= 0) │ │ │ │ +710 return TriangulationResult::BehindCamera(); │ │ │ │ +711#endif │ │ │ │ +712 // Check reprojection error │ │ │ │ +713 if (params._d_y_n_a_m_i_c_O_u_t_l_i_e_r_R_e_j_e_c_t_i_o_n_T_h_r_e_s_h_o_l_d > 0) { │ │ │ │ +714 const typename CAMERA::Measurement& zi = measured.at(i); │ │ │ │ +715 _P_o_i_n_t_2 reprojectionError = camera.reprojectionError(point, zi); │ │ │ │ +716 maxReprojError = std::max(maxReprojError, reprojectionError.norm()); │ │ │ │ +717 } │ │ │ │ +718 i += 1; │ │ │ │ +719 } │ │ │ │ +720 // Flag as degenerate if average reprojection error is too large │ │ │ │ +721 if (params._d_y_n_a_m_i_c_O_u_t_l_i_e_r_R_e_j_e_c_t_i_o_n_T_h_r_e_s_h_o_l_d > 0 │ │ │ │ +722 && maxReprojError > params._d_y_n_a_m_i_c_O_u_t_l_i_e_r_R_e_j_e_c_t_i_o_n_T_h_r_e_s_h_o_l_d) │ │ │ │ +723 return TriangulationResult::Outlier(); │ │ │ │ +724 │ │ │ │ +725 // all good! │ │ │ │ +726 return _T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t(point); │ │ │ │ +727 } catch (_T_r_i_a_n_g_u_l_a_t_i_o_n_U_n_d_e_r_c_o_n_s_t_r_a_i_n_e_d_E_x_c_e_p_t_i_o_n&) { │ │ │ │ +728 // This exception is thrown if │ │ │ │ +729 // 1) There is a single pose for triangulation - this should not happen │ │ │ │ +because we checked the number of poses before │ │ │ │ +730 // 2) The rank of the matrix used for triangulation is < 3: rotation-only, │ │ │ │ +parallel cameras (or motion towards the landmark) │ │ │ │ +731 return TriangulationResult::Degenerate(); │ │ │ │ +732 } catch (_T_r_i_a_n_g_u_l_a_t_i_o_n_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n&) { │ │ │ │ +733 // point is behind one of the cameras: can be the case of close-to-parallel │ │ │ │ +cameras or may depend on outliers │ │ │ │ +734 return TriangulationResult::BehindCamera(); │ │ │ │ +735 } │ │ │ │ +736} │ │ │ │ +737 │ │ │ │ +738// Vector of Cameras - used by the Python/MATLAB wrapper │ │ │ │ +739using CameraSetCal3Bundler = CameraSet>; │ │ │ │ +740using CameraSetCal3_S2 = CameraSet>; │ │ │ │ +741using CameraSetCal3DS2 = CameraSet>; │ │ │ │ +742using CameraSetCal3Fisheye = CameraSet>; │ │ │ │ +743using CameraSetCal3Unified = CameraSet>; │ │ │ │ +744using CameraSetSpherical = CameraSet; │ │ │ │ +745} // \namespace gtsam │ │ │ │ +746 │ │ │ │ +_C_a_l_3_U_n_i_f_i_e_d_._h │ │ │ │ +Unified Calibration Model, see Mei07icra for details. │ │ │ │ +_C_a_l_3___S_2_._h │ │ │ │ +The most common 5DOF 3D->2D calibration. │ │ │ │ +_C_a_l_3_D_S_2_._h │ │ │ │ +Calibration of a camera with radial distortion, calculations in base class │ │ │ │ +Cal3DS2_Base. │ │ │ │ +_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_._h │ │ │ │ +Calibrated camera with spherical projection. │ │ │ │ +_P_i_n_h_o_l_e_C_a_m_e_r_a_._h │ │ │ │ +Base class for all pinhole cameras. │ │ │ │ +_P_o_s_e_2_._h │ │ │ │ +2D Pose │ │ │ │ +_C_a_l_3_F_i_s_h_e_y_e_._h │ │ │ │ +Calibration of a fisheye camera. │ │ │ │ +_C_a_l_3_B_u_n_d_l_e_r_._h │ │ │ │ +Calibration used by Bundler. │ │ │ │ +_C_a_m_e_r_a_S_e_t_._h │ │ │ │ +Base class to create smart factors on poses or cameras. │ │ │ │ +_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +Factor Graph consisting of non-linear factors. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ +_g_t_s_a_m_:_:_c_a_l_i_b_r_a_t_e_M_e_a_s_u_r_e_m_e_n_t_s_S_h_a_r_e_d │ │ │ │ +Point3Vector calibrateMeasurementsShared(const CALIBRATION &cal, const │ │ │ │ +Point2Vector &measurements) │ │ │ │ +Convert pixel measurements in image to homogeneous measurements in the image │ │ │ │ +plane using shared camer... │ │ │ │ +DDeeffiinniittiioonn triangulation.h:357 │ │ │ │ +_g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_L_O_S_T │ │ │ │ +Point3 triangulateLOST(const std::vector< Pose3 > &poses, const Point3Vector │ │ │ │ +&calibratedMeasurements, const SharedIsotropic &measurementNoise) │ │ │ │ +Triangulation using the LOST (Linear Optimal Sine Triangulation) algorithm │ │ │ │ +proposed in https://arxiv.... │ │ │ │ +DDeeffiinniittiioonn triangulation.cpp:92 │ │ │ │ +_g_t_s_a_m_:_:_u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_s │ │ │ │ +Point2Vector undistortMeasurements(const CALIBRATION &cal, const Point2Vector │ │ │ │ +&measurements) │ │ │ │ +Remove distortion for measurements so as if the measurements came from a │ │ │ │ +pinhole camera. │ │ │ │ +DDeeffiinniittiioonn triangulation.h:282 │ │ │ │ +_g_t_s_a_m_:_:_c_r_e_a_t_e_P_i_n_h_o_l_e_C_a_l_i_b_r_a_t_i_o_n │ │ │ │ +Cal3_S2 createPinholeCalibration(const CALIBRATION &cal) │ │ │ │ +Create a pinhole calibration from a different Cal3 object, removing distortion. │ │ │ │ +DDeeffiinniittiioonn triangulation.h:253 │ │ │ │ +_g_t_s_a_m_:_:_u_n_d_i_s_t_o_r_t_M_e_a_s_u_r_e_m_e_n_t_I_n_t_e_r_n_a_l │ │ │ │ +MEASUREMENT undistortMeasurementInternal(const CALIBRATION &cal, const │ │ │ │ +MEASUREMENT &measurement, boost::optional< Cal3_S2 > pinholeCal=boost::none) │ │ │ │ +Internal undistortMeasurement to be used by undistortMeasurement and │ │ │ │ +undistortMeasurements. │ │ │ │ +DDeeffiinniittiioonn triangulation.h:261 │ │ │ │ +_g_t_s_a_m_:_:_o_p_t_i_m_i_z_e │ │ │ │ +Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key │ │ │ │ +landmarkKey) │ │ │ │ +Optimize for triangulation. │ │ │ │ +DDeeffiinniittiioonn triangulation.cpp:155 │ │ │ │ +_g_t_s_a_m_:_:_P_o_i_n_t_2 │ │ │ │ +Vector2 Point2 │ │ │ │ +As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just │ │ │ │ +typedef Point2 to Vector2... │ │ │ │ +DDeeffiinniittiioonn Point2.h:27 │ │ │ │ +_g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_S_a_f_e │ │ │ │ +TriangulationResult triangulateSafe(const CameraSet< CAMERA > &cameras, const │ │ │ │ +typename CAMERA::MeasurementVector &measured, const TriangulationParameters │ │ │ │ +¶ms) │ │ │ │ +triangulateSafe: extensive checking of the outcome │ │ │ │ +DDeeffiinniittiioonn triangulation.h:680 │ │ │ │ +_g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_N_o_n_l_i_n_e_a_r │ │ │ │ +Point3 triangulateNonlinear(const std::vector< Pose3 > &poses, boost:: │ │ │ │ +shared_ptr< CALIBRATION > sharedCal, const Point2Vector &measurements, const │ │ │ │ +Point3 &initialEstimate, const SharedNoiseModel &model=nullptr) │ │ │ │ +Given an initial estimate , refine a point using measurements in several │ │ │ │ +cameras. │ │ │ │ +DDeeffiinniittiioonn triangulation.h:187 │ │ │ │ +_g_t_s_a_m_:_:_d_i_s_t_a_n_c_e_3 │ │ │ │ +double distance3(const Point3 &p1, const Point3 &q, OptionalJacobian< 1, 3 > │ │ │ │ +H1, OptionalJacobian< 1, 3 > H2) │ │ │ │ +distance between two points │ │ │ │ +DDeeffiinniittiioonn Point3.cpp:27 │ │ │ │ _g_t_s_a_m_:_:_P_o_i_n_t_3 │ │ │ │ Vector3 Point3 │ │ │ │ As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just │ │ │ │ typedef Point3 to Vector3... │ │ │ │ DDeeffiinniittiioonn Point3.h:36 │ │ │ │ -_g_t_s_a_m_:_:_p_r_o_j_e_c_t │ │ │ │ -Point2_ project(const Point3_ &p_cam) │ │ │ │ -Expression version of PinholeBase::Project. │ │ │ │ -DDeeffiinniittiioonn expressions.h:131 │ │ │ │ +_g_t_s_a_m_:_:_S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l │ │ │ │ +noiseModel::Base::shared_ptr SharedNoiseModel │ │ │ │ +Aliases. │ │ │ │ +DDeeffiinniittiioonn NoiseModel.h:724 │ │ │ │ +_g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_P_o_i_n_t_3 │ │ │ │ +Point3 triangulatePoint3(const std::vector< Pose3 > &poses, boost::shared_ptr< │ │ │ │ +CALIBRATION > sharedCal, const Point2Vector &measurements, double rank_tol=1e- │ │ │ │ +9, bool optimize=false, const SharedNoiseModel &model=nullptr, const bool │ │ │ │ +useLOST=false) │ │ │ │ +Function to triangulate 3D landmark point from an arbitrary number of poses (at │ │ │ │ +least 2) using the DL... │ │ │ │ +DDeeffiinniittiioonn triangulation.h:421 │ │ │ │ +_g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_i_o_n_G_r_a_p_h │ │ │ │ +std::pair< NonlinearFactorGraph, Values > triangulationGraph(const std::vector< │ │ │ │ +Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal, const Point2Vector │ │ │ │ +&measurements, Key landmarkKey, const Point3 &initialEstimate, const │ │ │ │ +SharedNoiseModel &model=noiseModel::Unit::Create(2)) │ │ │ │ +Create a factor graph with projection factors from poses and one calibration. │ │ │ │ +DDeeffiinniittiioonn triangulation.h:122 │ │ │ │ _g_t_s_a_m_:_:_K_e_y │ │ │ │ std::uint64_t Key │ │ │ │ Integer nonlinear key type. │ │ │ │ DDeeffiinniittiioonn types.h:100 │ │ │ │ +_g_t_s_a_m_:_:_c_a_l_i_b_r_a_t_e_M_e_a_s_u_r_e_m_e_n_t_s │ │ │ │ +Point3Vector calibrateMeasurements(const CameraSet< CAMERA > &cameras, const │ │ │ │ +typename CAMERA::MeasurementVector &measurements) │ │ │ │ +Convert pixel measurements in image to homogeneous measurements in the image │ │ │ │ +plane using camera intri... │ │ │ │ +DDeeffiinniittiioonn triangulation.h:381 │ │ │ │ +_g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_D_L_T │ │ │ │ +Point3 triangulateDLT(const std::vector< Matrix34, Eigen::aligned_allocator< │ │ │ │ +Matrix34 > > &projection_matrices, const Point2Vector &measurements, double │ │ │ │ +rank_tol) │ │ │ │ +DLT triangulation: See Hartley and Zisserman, 2nd Ed., page 312. │ │ │ │ +DDeeffiinniittiioonn triangulation.cpp:127 │ │ │ │ +_g_t_s_a_m_:_:_t_r_i_a_n_g_u_l_a_t_e_H_o_m_o_g_e_n_e_o_u_s_D_L_T │ │ │ │ +Vector4 triangulateHomogeneousDLT(const std::vector< Matrix34, Eigen:: │ │ │ │ +aligned_allocator< Matrix34 > > &projection_matrices, const Point2Vector │ │ │ │ +&measurements, double rank_tol) │ │ │ │ +DLT triangulation: See Hartley and Zisserman, 2nd Ed., page 312. │ │ │ │ +DDeeffiinniittiioonn triangulation.cpp:27 │ │ │ │ _g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ that can be centered ... │ │ │ │ DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ -TangentVector localCoordinates(const Class &g) const │ │ │ │ -localCoordinates as required by manifold concept: finds tangent vector between │ │ │ │ -*this and g │ │ │ │ -DDeeffiinniittiioonn Lie.h:136 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d │ │ │ │ -Both ManifoldTraits and Testable. │ │ │ │ -DDeeffiinniittiioonn Manifold.h:120 │ │ │ │ -_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ -OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ -either a fixed size o... │ │ │ │ -DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o │ │ │ │ -The most common 5DOF 3D->2D calibration, stereo version. │ │ │ │ -DDeeffiinniittiioonn Cal3_S2Stereo.h:30 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2 │ │ │ │ +The most common 5DOF 3D->2D calibration. │ │ │ │ +DDeeffiinniittiioonn Cal3_S2.h:34 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t │ │ │ │ +A set of cameras, all with their own calibration. │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:36 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a │ │ │ │ +A pinhole camera class that has a Pose3 and a Calibration. │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:33 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_P_o_s_e │ │ │ │ +A pinhole camera class that has a Pose3 and a fixed Calibration. │ │ │ │ +DDeeffiinniittiioonn PinholePose.h:243 │ │ │ │ _g_t_s_a_m_:_:_P_o_s_e_3 │ │ │ │ A 3D pose (R,t) : (Rot3,Point3) │ │ │ │ DDeeffiinniittiioonn Pose3.h:37 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_3_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const Pose3 &pose, double tol=1e-9) const │ │ │ │ -assert equality up to a tolerance │ │ │ │ -DDeeffiinniittiioonn Pose3.cpp:157 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_3_:_:_p_r_i_n_t │ │ │ │ -void print(const std::string &s="") const │ │ │ │ -print with optional string │ │ │ │ -DDeeffiinniittiioonn Pose3.cpp:152 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n │ │ │ │ -DDeeffiinniittiioonn StereoCamera.h:26 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a │ │ │ │ -A stereo camera class, parameterize by left camera pose and stereo calibration. │ │ │ │ -DDeeffiinniittiioonn StereoCamera.h:47 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_S_t_e_r_e_o_C_a_m_e_r_a │ │ │ │ -StereoCamera() │ │ │ │ -Default constructor allocates a calibration! │ │ │ │ -DDeeffiinniittiioonn StereoCamera.h:72 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_D_i_m │ │ │ │ -static size_t Dim() │ │ │ │ -Dimensionality of the tangent space. │ │ │ │ -DDeeffiinniittiioonn StereoCamera.h:110 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_p_r_i_n_t │ │ │ │ -void print(const std::string &s="") const │ │ │ │ -print │ │ │ │ -DDeeffiinniittiioonn StereoCamera.h:89 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ -Vector6 localCoordinates(const StereoCamera &t2) const │ │ │ │ -Local coordinates of manifold neighborhood around current value. │ │ │ │ -DDeeffiinniittiioonn StereoCamera.h:120 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const StereoCamera &camera, double tol=1e-9) const │ │ │ │ -equals │ │ │ │ -DDeeffiinniittiioonn StereoCamera.h:95 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_d_i_m │ │ │ │ -size_t dim() const │ │ │ │ -Dimensionality of the tangent space. │ │ │ │ -DDeeffiinniittiioonn StereoCamera.h:105 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_r_e_t_r_a_c_t │ │ │ │ -StereoCamera retract(const Vector &v) const │ │ │ │ -Updates a with tangent space delta. │ │ │ │ -DDeeffiinniittiioonn StereoCamera.h:115 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_M_e_a_s_u_r_e_m_e_n_t │ │ │ │ -StereoPoint2 Measurement │ │ │ │ -Some classes template on either PinholeCamera or StereoCamera, and this typedef │ │ │ │ -informs those classes... │ │ │ │ -DDeeffiinniittiioonn StereoCamera.h:55 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_c_a_l_i_b_r_a_t_i_o_n │ │ │ │ -const Cal3_S2Stereo & calibration() const │ │ │ │ -Return shared pointer to calibration. │ │ │ │ -DDeeffiinniittiioonn StereoCamera.h:80 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_b_a_s_e_l_i_n_e │ │ │ │ -double baseline() const │ │ │ │ -baseline │ │ │ │ -DDeeffiinniittiioonn StereoCamera.h:134 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_p_o_s_e │ │ │ │ -const Pose3 & pose() const │ │ │ │ -pose │ │ │ │ -DDeeffiinniittiioonn StereoCamera.h:129 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_d_e_f_a_u_l_t_E_r_r_o_r_W_h_e_n_T_r_i_a_n_g_u_l_a_t_i_n_g_B_e_h_i_n_d_C_a_m_e_r_a │ │ │ │ -Vector defaultErrorWhenTriangulatingBehindCamera() const │ │ │ │ -for Nonlinear Triangulation │ │ │ │ -DDeeffiinniittiioonn StereoCamera.h:174 │ │ │ │ -_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2 │ │ │ │ -A 2D stereo point, v will be same for rectified images. │ │ │ │ -DDeeffiinniittiioonn StereoPoint2.h:32 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_t_r_a_n_s_f_o_r_m_T_o │ │ │ │ +Point3 transformTo(const Point3 &point, OptionalJacobian< 3, 6 > Hself=boost:: │ │ │ │ +none, OptionalJacobian< 3, 3 > Hpoint=boost::none) const │ │ │ │ +takes point in world coordinates and transforms it to Pose coordinates │ │ │ │ +DDeeffiinniittiioonn Pose3.cpp:371 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_t_r_a_n_s_l_a_t_i_o_n │ │ │ │ +const Point3 & translation(OptionalJacobian< 3, 6 > Hself=boost::none) const │ │ │ │ +get translation │ │ │ │ +DDeeffiinniittiioonn Pose3.cpp:308 │ │ │ │ +_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_U_n_d_e_r_c_o_n_s_t_r_a_i_n_e_d_E_x_c_e_p_t_i_o_n │ │ │ │ +Exception thrown by triangulateDLT when SVD returns rank < 3. │ │ │ │ +DDeeffiinniittiioonn triangulation.h:39 │ │ │ │ +_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n │ │ │ │ +Exception thrown by triangulateDLT when landmark is behind one or more of the │ │ │ │ +cameras. │ │ │ │ +DDeeffiinniittiioonn triangulation.h:47 │ │ │ │ +_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s │ │ │ │ +DDeeffiinniittiioonn triangulation.h:556 │ │ │ │ +_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s │ │ │ │ +TriangulationParameters(const double _rankTolerance=1.0, const bool │ │ │ │ +_enableEPI=false, double _landmarkDistanceThreshold=-1, double │ │ │ │ +_dynamicOutlierRejectionThreshold=-1, const SharedNoiseModel │ │ │ │ +&_noiseModel=nullptr) │ │ │ │ +Constructor. │ │ │ │ +DDeeffiinniittiioonn triangulation.h:586 │ │ │ │ +_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s_:_:_d_y_n_a_m_i_c_O_u_t_l_i_e_r_R_e_j_e_c_t_i_o_n_T_h_r_e_s_h_o_l_d │ │ │ │ +double dynamicOutlierRejectionThreshold │ │ │ │ +If this is nonnegative the we will check if the average reprojection error is │ │ │ │ +smaller than this thres... │ │ │ │ +DDeeffiinniittiioonn triangulation.h:573 │ │ │ │ +_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s_:_:_r_a_n_k_T_o_l_e_r_a_n_c_e │ │ │ │ +double rankTolerance │ │ │ │ +threshold to decide whether triangulation is result.degenerate │ │ │ │ +DDeeffiinniittiioonn triangulation.h:558 │ │ │ │ +_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s_:_:_l_a_n_d_m_a_r_k_D_i_s_t_a_n_c_e_T_h_r_e_s_h_o_l_d │ │ │ │ +double landmarkDistanceThreshold │ │ │ │ +if the landmark is triangulated at distance larger than this, result is flagged │ │ │ │ +as degenerate. │ │ │ │ +DDeeffiinniittiioonn triangulation.h:566 │ │ │ │ +_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s_:_:_e_n_a_b_l_e_E_P_I │ │ │ │ +bool enableEPI │ │ │ │ +if set to true, will refine triangulation using LM │ │ │ │ +DDeeffiinniittiioonn triangulation.h:560 │ │ │ │ +_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_P_a_r_a_m_e_t_e_r_s_:_:_n_o_i_s_e_M_o_d_e_l │ │ │ │ +SharedNoiseModel noiseModel │ │ │ │ +used in the nonlinear triangulation │ │ │ │ +DDeeffiinniittiioonn triangulation.h:575 │ │ │ │ +_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t │ │ │ │ +TriangulationResult is an optional point, along with the reasons why it is │ │ │ │ +invalid. │ │ │ │ +DDeeffiinniittiioonn triangulation.h:626 │ │ │ │ +_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t │ │ │ │ +TriangulationResult() │ │ │ │ +Default constructor, only for serialization. │ │ │ │ +DDeeffiinniittiioonn triangulation.h:638 │ │ │ │ +_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t │ │ │ │ +TriangulationResult(const Point3 &p) │ │ │ │ +Constructor. │ │ │ │ +DDeeffiinniittiioonn triangulation.h:643 │ │ │ │ +_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_R_e_s_u_l_t_:_:_a_c_c_e_s_s │ │ │ │ +friend class boost::serialization::access │ │ │ │ +Serialization function. │ │ │ │ +DDeeffiinniittiioonn triangulation.h:671 │ │ │ │ +_g_t_s_a_m_:_:_S_y_m_b_o_l │ │ │ │ +Character and index key used to refer to variables. │ │ │ │ +DDeeffiinniittiioonn Symbol.h:35 │ │ │ │ +_g_t_s_a_m_:_:_n_o_i_s_e_M_o_d_e_l_:_:_I_s_o_t_r_o_p_i_c_:_:_S_i_g_m_a │ │ │ │ +static shared_ptr Sigma(size_t dim, double sigma, bool smart=true) │ │ │ │ +An isotropic noise model created by specifying a standard devation sigma. │ │ │ │ +DDeeffiinniittiioonn NoiseModel.cpp:597 │ │ │ │ +_g_t_s_a_m_:_:_n_o_i_s_e_M_o_d_e_l_:_:_U_n_i_t_:_:_C_r_e_a_t_e │ │ │ │ +static shared_ptr Create(size_t dim) │ │ │ │ +Create a unit covariance noise model. │ │ │ │ +DDeeffiinniittiioonn NoiseModel.h:597 │ │ │ │ +_g_t_s_a_m_:_:_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +DDeeffiinniittiioonn NonlinearFactorGraph.h:55 │ │ │ │ +_g_t_s_a_m_:_:_V_a_l_u_e_s │ │ │ │ +A non-templated config holding any types of Manifold-group elements. │ │ │ │ +DDeeffiinniittiioonn Values.h:65 │ │ │ │ +_g_t_s_a_m_:_:_V_a_l_u_e_s_:_:_i_n_s_e_r_t │ │ │ │ +void insert(Key j, const Value &val) │ │ │ │ +Add a variable with the given j, throws KeyAlreadyExists if j is already │ │ │ │ +present. │ │ │ │ +DDeeffiinniittiioonn Values.cpp:157 │ │ │ │ +_g_t_s_a_m_:_:_T_r_i_a_n_g_u_l_a_t_i_o_n_F_a_c_t_o_r │ │ │ │ +Non-linear factor for a constraint derived from a 2D measurement. │ │ │ │ +DDeeffiinniittiioonn TriangulationFactor.h:33 │ │ │ │ +_V_a_l_u_e_s │ │ │ │ +In nonlinear factors, the error function returns the negative log-likelihood as │ │ │ │ +a non-linear function... │ │ │ │ +_S_y_m_b_o_l_._h │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_t_e_r_e_o_C_a_m_e_r_a_._h │ │ │ │ + * _t_r_i_a_n_g_u_l_a_t_i_o_n_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00305.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SimpleCamera.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Similarity2.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,57 +94,51 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Namespaces | │ │ │ -Typedefs
    │ │ │ -
    SimpleCamera.h File Reference
    │ │ │ +Classes | │ │ │ +Namespaces
    │ │ │ +
    Similarity2.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    A simple camera class with a Cal3_S2 calibration. │ │ │ +

    Implementation of Similarity2 transform. │ │ │ More...

    │ │ │ │ │ │

    Go to the source code of this file.

    │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Classes

    class  gtsam::Similarity2
     2D similarity transform More...
     
    struct  gtsam::Similarity2::ChartAtOrigin
     Chart at the origin. More...
     
    struct  gtsam::traits< Similarity2 >
     
    struct  gtsam::traits< const Similarity2 >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

    │ │ │ -Typedefs

    using gtsam::PinholeCameraCal3_S2 = gtsam::PinholeCamera< gtsam::Cal3_S2 >
     Convenient aliases for Pinhole camera classes with different calibrations.
     
    │ │ │ -using gtsam::PinholeCameraCal3Bundler = gtsam::PinholeCamera< gtsam::Cal3Bundler >
     
    │ │ │ -using gtsam::PinholeCameraCal3DS2 = gtsam::PinholeCamera< gtsam::Cal3DS2 >
     
    │ │ │ -using gtsam::PinholeCameraCal3Unified = gtsam::PinholeCamera< gtsam::Cal3Unified >
     
    │ │ │ -using gtsam::PinholeCameraCal3Fisheye = gtsam::PinholeCamera< gtsam::Cal3Fisheye >
     
    │ │ │

    Detailed Description

    │ │ │ -

    A simple camera class with a Cal3_S2 calibration.

    │ │ │ -
    Date
    Aug 16, 2009
    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ +

    Implementation of Similarity2 transform.

    │ │ │ +
    Author
    John Lambert, Varun Agrawal
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,39 +1,32 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ -SimpleCamera.h File Reference │ │ │ │ -A simple camera class with a Cal3_S2 calibration. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +Similarity2.h File Reference │ │ │ │ +Implementation of Similarity2 transform. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -NNaammeessppaacceess │ │ │ │ -namespace   _g_t_s_a_m │ │ │ │ -  Global functions in a separate testing namespace. │ │ │ │ -  │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -using  _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_C_a_l_3___S_2 = _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a< _g_t_s_a_m_:_:_C_a_l_3___S_2 > │ │ │ │ -  Convenient aliases for Pinhole camera classes with different │ │ │ │ - calibrations. │ │ │ │ +CCllaasssseess │ │ │ │ + class   _g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_2 │ │ │ │ +  2D similarity transform _M_o_r_e_._._. │ │ │ │   │ │ │ │ -using  ggttssaamm::::PPiinnhhoolleeCCaammeerraaCCaall33BBuunnddlleerr = _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a< _g_t_s_a_m_:_: │ │ │ │ - _C_a_l_3_B_u_n_d_l_e_r > │ │ │ │ +struct   _g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_2_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ +  Chart at the origin. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -using  ggttssaamm::::PPiinnhhoolleeCCaammeerraaCCaall33DDSS22 = _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a< _g_t_s_a_m_:_:_C_a_l_3_D_S_2 > │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _S_i_m_i_l_a_r_i_t_y_2_ _> │ │ │ │   │ │ │ │ -using  ggttssaamm::::PPiinnhhoolleeCCaammeerraaCCaall33UUnniiffiieedd = _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a< _g_t_s_a_m_:_: │ │ │ │ - _C_a_l_3_U_n_i_f_i_e_d > │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _S_i_m_i_l_a_r_i_t_y_2_ _> │ │ │ │   │ │ │ │ -using  ggttssaamm::::PPiinnhhoolleeCCaammeerraaCCaall33FFiisshheeyyee = _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a< _g_t_s_a_m_:_: │ │ │ │ - _C_a_l_3_F_i_s_h_e_y_e > │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _g_t_s_a_m │ │ │ │ +  Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A simple camera class with a Cal3_S2 calibration. │ │ │ │ - Date │ │ │ │ - Aug 16, 2009 │ │ │ │ +Implementation of Similarity2 transform. │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + John Lambert, Varun Agrawal │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_i_m_p_l_e_C_a_m_e_r_a_._h │ │ │ │ + * _S_i_m_i_l_a_r_i_t_y_2_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00305.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,6 @@ │ │ │ │ var a00305 = [ │ │ │ │ - ["PinholeCameraCal3_S2", "a00305.html#a3a2e8c622e65623a6853c84073bdb4f2", null] │ │ │ │ + ["gtsam::Similarity2", "a03248.html", "a03248"], │ │ │ │ + ["gtsam::Similarity2::ChartAtOrigin", "a03252.html", null], │ │ │ │ + ["gtsam::traits< Similarity2 >", "a03256.html", null], │ │ │ │ + ["gtsam::traits< const Similarity2 >", "a03260.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00305_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SimpleCamera.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Similarity2.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,141 +98,167 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    SimpleCamera.h
    │ │ │ +
    Similarity2.h
    │ │ │
    │ │ │
    │ │ │ Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │
    4 * Atlanta, Georgia 30332-0415
    │ │ │
    5 * All Rights Reserved
    │ │ │
    6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
    │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │ -
    19#pragma once
    │ │ │ -
    20
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
    29
    │ │ │ -
    30namespace gtsam {
    │ │ │ +
    18#pragma once
    │ │ │ +
    19
    │ │ │ +
    20#include <gtsam/base/Lie.h>
    │ │ │ +
    21#include <gtsam/base/Manifold.h>
    │ │ │ +
    22#include <gtsam/dllexport.h>
    │ │ │ + │ │ │ + │ │ │ +
    25#include <gtsam/geometry/Rot2.h>
    │ │ │ +
    26
    │ │ │ +
    27namespace gtsam {
    │ │ │ +
    28
    │ │ │ +
    29// Forward declarations
    │ │ │ +
    30class Pose2;
    │ │ │
    31
    │ │ │ - │ │ │ -
    35 using PinholeCameraCal3Bundler = gtsam::PinholeCamera<gtsam::Cal3Bundler>;
    │ │ │ -
    36 using PinholeCameraCal3DS2 = gtsam::PinholeCamera<gtsam::Cal3DS2>;
    │ │ │ -
    37 using PinholeCameraCal3Unified = gtsam::PinholeCamera<gtsam::Cal3Unified>;
    │ │ │ -
    38 using PinholeCameraCal3Fisheye = gtsam::PinholeCamera<gtsam::Cal3Fisheye>;
    │ │ │ -
    39
    │ │ │ -
    40#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
    │ │ │ -
    45class GTSAM_EXPORT SimpleCamera : public PinholeCameraCal3_S2 {
    │ │ │ +
    │ │ │ +
    35class GTSAM_EXPORT Similarity2 : public LieGroup<Similarity2, 4> {
    │ │ │ +
    38 typedef Rot2 Rotation;
    │ │ │ +
    39 typedef Point2 Translation;
    │ │ │ +
    41
    │ │ │ +
    42 private:
    │ │ │ +
    43 Rot2 R_;
    │ │ │ +
    44 Point2 t_;
    │ │ │ +
    45 double s_;
    │ │ │
    46
    │ │ │ -
    47 typedef PinholeCamera<Cal3_S2> Base;
    │ │ │ -
    48 typedef boost::shared_ptr<SimpleCamera> shared_ptr;
    │ │ │ -
    49
    │ │ │ -
    50public:
    │ │ │ -
    51
    │ │ │ -
    54
    │ │ │ -
    56 SimpleCamera() :
    │ │ │ -
    57 Base() {
    │ │ │ -
    58 }
    │ │ │ +
    47 public:
    │ │ │ +
    50
    │ │ │ + │ │ │ +
    53
    │ │ │ +
    55 Similarity2(double s);
    │ │ │ +
    56
    │ │ │ +
    58 Similarity2(const Rot2& R, const Point2& t, double s);
    │ │ │
    59
    │ │ │ -
    61 explicit SimpleCamera(const Pose3& pose) :
    │ │ │ -
    62 Base(pose) {
    │ │ │ -
    63 }
    │ │ │ -
    64
    │ │ │ -
    66 SimpleCamera(const Pose3& pose, const Cal3_S2& K) :
    │ │ │ -
    67 Base(pose, K) {
    │ │ │ -
    68 }
    │ │ │ +
    61 Similarity2(const Matrix2& R, const Vector2& t, double s);
    │ │ │ +
    62
    │ │ │ +
    64 Similarity2(const Matrix3& T);
    │ │ │ +
    65
    │ │ │
    69
    │ │ │ -
    73
    │ │ │ -
    81 static SimpleCamera Level(const Cal3_S2 &K, const Pose2& pose2,
    │ │ │ -
    82 double height) {
    │ │ │ -
    83 return SimpleCamera(Base::LevelPose(pose2, height), K);
    │ │ │ -
    84 }
    │ │ │ -
    85
    │ │ │ -
    87 static SimpleCamera Level(const Pose2& pose2, double height) {
    │ │ │ -
    88 return SimpleCamera::Level(Cal3_S2(), pose2, height);
    │ │ │ -
    89 }
    │ │ │ +
    71 bool equals(const Similarity2& sim, double tol) const;
    │ │ │ +
    72
    │ │ │ +
    74 bool operator==(const Similarity2& other) const;
    │ │ │ +
    75
    │ │ │ +
    77 void print(const std::string& s) const;
    │ │ │ +
    78
    │ │ │ +
    79 friend std::ostream& operator<<(std::ostream& os, const Similarity2& p);
    │ │ │ +
    80
    │ │ │ +
    84
    │ │ │ +
    86 static Similarity2 Identity();
    │ │ │ +
    87
    │ │ │ +
    89 Similarity2 operator*(const Similarity2& S) const;
    │ │ │
    90
    │ │ │ -
    100 static SimpleCamera Lookat(const Point3& eye, const Point3& target,
    │ │ │ -
    101 const Point3& upVector, const Cal3_S2& K = Cal3_S2()) {
    │ │ │ -
    102 return SimpleCamera(Base::LookatPose(eye, target, upVector), K);
    │ │ │ -
    103 }
    │ │ │ -
    104
    │ │ │ -
    108
    │ │ │ -
    110 explicit SimpleCamera(const Vector &v) :
    │ │ │ -
    111 Base(v) {
    │ │ │ -
    112 }
    │ │ │ +
    92 Similarity2 inverse() const;
    │ │ │ +
    93
    │ │ │ +
    97
    │ │ │ +
    99 Point2 transformFrom(const Point2& p) const;
    │ │ │ +
    100
    │ │ │ +
    112 Pose2 transformFrom(const Pose2& T) const;
    │ │ │
    113
    │ │ │ -
    115 SimpleCamera(const Vector &v, const Vector &K) :
    │ │ │ -
    116 Base(v, K) {
    │ │ │ -
    117 }
    │ │ │ -
    118
    │ │ │ -
    120 SimpleCamera::shared_ptr clone() const { return boost::make_shared<SimpleCamera>(*this); }
    │ │ │ +
    114 /* syntactic sugar for transformFrom */
    │ │ │ +
    115 Point2 operator*(const Point2& p) const;
    │ │ │ +
    116
    │ │ │ +
    120 static Similarity2 Align(const Point2Pairs& abPointPairs);
    │ │ │
    121
    │ │ │ -
    122
    │ │ │ -
    126
    │ │ │ -
    128 SimpleCamera retract(const Vector& d) const {
    │ │ │ -
    129 if ((size_t) d.size() == 6)
    │ │ │ -
    130 return SimpleCamera(this->pose().retract(d), calibration());
    │ │ │ -
    131 else
    │ │ │ -
    132 return SimpleCamera(this->pose().retract(d.head(6)),
    │ │ │ -
    133 calibration().retract(d.tail(calibration().dim())));
    │ │ │ -
    134 }
    │ │ │ -
    135
    │ │ │ -
    137
    │ │ │ -
    138};
    │ │ │ -
    139
    │ │ │ -
    141GTSAM_EXPORT SimpleCamera simpleCamera(const Matrix34& P);
    │ │ │ -
    142
    │ │ │ -
    143// manifold traits
    │ │ │ -
    144template <>
    │ │ │ -
    145struct traits<SimpleCamera> : public internal::Manifold<SimpleCamera> {};
    │ │ │ -
    146
    │ │ │ -
    147template <>
    │ │ │ -
    148struct traits<const SimpleCamera> : public internal::Manifold<SimpleCamera> {};
    │ │ │ -
    149
    │ │ │ -
    150// range traits, used in RangeFactor
    │ │ │ -
    151template <typename T>
    │ │ │ -
    152struct Range<SimpleCamera, T> : HasRange<SimpleCamera, T, double> {};
    │ │ │ -
    153
    │ │ │ -
    154#endif
    │ │ │ -
    155
    │ │ │ -
    156} // namespace gtsam
    │ │ │ -
    Base class for all pinhole cameras.
    │ │ │ -
    The most common 5DOF 3D->2D calibration.
    │ │ │ -
    Unified Calibration Model, see Mei07icra for details.
    │ │ │ -
    Calibration of a fisheye camera.
    │ │ │ -
    Calibration of a camera with radial distortion, calculations in base class Cal3DS2_Base.
    │ │ │ -
    Calibration used by Bundler.
    │ │ │ -
    Bearing-Range product.
    │ │ │ +
    135 static Similarity2 Align(const Pose2Pairs& abPosePairs);
    │ │ │ +
    136
    │ │ │ +
    140
    │ │ │ +
    145 static Vector4 Logmap(const Similarity2& S, //
    │ │ │ +
    146 OptionalJacobian<4, 4> Hm = boost::none);
    │ │ │ +
    147
    │ │ │ +
    149 static Similarity2 Expmap(const Vector4& v, //
    │ │ │ +
    150 OptionalJacobian<4, 4> Hm = boost::none);
    │ │ │ +
    151
    │ │ │ +
    │ │ │ + │ │ │ +
    154 static Similarity2 Retract(const Vector4& v,
    │ │ │ +
    155 ChartJacobian H = boost::none) {
    │ │ │ +
    156 return Similarity2::Expmap(v, H);
    │ │ │ +
    157 }
    │ │ │ +
    158 static Vector4 Local(const Similarity2& other,
    │ │ │ +
    159 ChartJacobian H = boost::none) {
    │ │ │ +
    160 return Similarity2::Logmap(other, H);
    │ │ │ +
    161 }
    │ │ │ +
    162 };
    │ │ │ +
    │ │ │ +
    163
    │ │ │ +
    165 Matrix4 AdjointMap() const;
    │ │ │ +
    166
    │ │ │ +
    167 using LieGroup<Similarity2, 4>::inverse;
    │ │ │ +
    168
    │ │ │ +
    172
    │ │ │ +
    174 Matrix3 matrix() const;
    │ │ │ +
    175
    │ │ │ +
    177 Rot2 rotation() const { return R_; }
    │ │ │ +
    178
    │ │ │ +
    180 Point2 translation() const { return t_; }
    │ │ │ +
    181
    │ │ │ +
    183 double scale() const { return s_; }
    │ │ │ +
    184
    │ │ │ +
    186 inline static size_t Dim() { return 4; }
    │ │ │ +
    187
    │ │ │ +
    189 inline size_t dim() const { return 4; }
    │ │ │ +
    190
    │ │ │ +
    192};
    │ │ │ +
    │ │ │ +
    193
    │ │ │ +
    194template <>
    │ │ │ +
    195struct traits<Similarity2> : public internal::LieGroup<Similarity2> {};
    │ │ │ +
    196
    │ │ │ +
    197template <>
    │ │ │ +
    198struct traits<const Similarity2> : public internal::LieGroup<Similarity2> {};
    │ │ │ +
    199
    │ │ │ +
    200} // namespace gtsam
    │ │ │ +
    Base class and basic functions for Lie types.
    │ │ │ +
    Base class and basic functions for Manifold types.
    │ │ │ +
    2D rotation
    │ │ │ +
    2D Pose
    │ │ │ +
    2D Point
    │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │ -
    gtsam::PinholeCamera< gtsam::Cal3_S2 > PinholeCameraCal3_S2
    Convenient aliases for Pinhole camera classes with different calibrations.
    Definition SimpleCamera.h:34
    │ │ │ -
    Vector3 Point3
    As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point3 to Vector3...
    Definition Point3.h:36
    │ │ │ -
    The most common 5DOF 3D->2D calibration.
    Definition Cal3_S2.h:34
    │ │ │ -
    A pinhole camera class that has a Pose3 and a Calibration.
    Definition PinholeCamera.h:33
    │ │ │ +
    void print(const Matrix &A, const string &s, ostream &stream)
    print without optional string, must specify cout yourself
    Definition Matrix.cpp:156
    │ │ │ +
    Point2 operator*(double s, const Point2 &p)
    multiply with scalar
    Definition Point2.h:47
    │ │ │ +
    Vector2 Point2
    As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point2 to Vector2...
    Definition Point2.h:27
    │ │ │ +
    bool operator==(const Matrix &A, const Matrix &B)
    equality is just equal_with_abs_tol 1e-9
    Definition Matrix.h:100
    │ │ │ +
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │ +
    A CRTP helper class that implements Lie group methods Prerequisites: methods operator*,...
    Definition Lie.h:37
    │ │ │ +
    Both LieGroupTraits and Testable.
    Definition Lie.h:229
    │ │ │ +
    OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
    Definition OptionalJacobian.h:41
    │ │ │ +
    Template to create a binary predicate.
    Definition Testable.h:111
    │ │ │
    A 2D pose (Point2,Rot2)
    Definition Pose2.h:36
    │ │ │ -
    A 3D pose (R,t) : (Rot3,Point3)
    Definition Pose3.h:37
    │ │ │ +
    Rotation matrix NOTE: the angle theta is in radians unless explicitly stated.
    Definition Rot2.h:36
    │ │ │ +
    2D similarity transform
    Definition Similarity2.h:35
    │ │ │ +
    Point2 translation() const
    Return a GTSAM translation.
    Definition Similarity2.h:180
    │ │ │ +
    double scale() const
    Return the scale.
    Definition Similarity2.h:183
    │ │ │ +
    static size_t Dim()
    Dimensionality of tangent space = 4 DOF - used to autodetect sizes.
    Definition Similarity2.h:186
    │ │ │ +
    Rot2 rotation() const
    Return a GTSAM rotation.
    Definition Similarity2.h:177
    │ │ │ +
    size_t dim() const
    Dimensionality of tangent space = 4 DOF.
    Definition Similarity2.h:189
    │ │ │ +
    Chart at the origin.
    Definition Similarity2.h:153
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,160 +1,212 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -SimpleCamera.h │ │ │ │ +Similarity2.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -19#pragma once │ │ │ │ -20 │ │ │ │ -21#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_B_e_a_r_i_n_g_R_a_n_g_e_._h> │ │ │ │ -22#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3_B_u_n_d_l_e_r_._h> │ │ │ │ -23#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3_D_S_2_._h> │ │ │ │ -24#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3_F_i_s_h_e_y_e_._h> │ │ │ │ -25#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3_U_n_i_f_i_e_d_._h> │ │ │ │ -26#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3_F_i_s_h_e_y_e_._h> │ │ │ │ -27#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3___S_2_._h> │ │ │ │ -28#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_i_n_h_o_l_e_C_a_m_e_r_a_._h> │ │ │ │ -29 │ │ │ │ -30namespace _g_t_s_a_m { │ │ │ │ +18#pragma once │ │ │ │ +19 │ │ │ │ +20#include <_g_t_s_a_m_/_b_a_s_e_/_L_i_e_._h> │ │ │ │ +21#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_n_i_f_o_l_d_._h> │ │ │ │ +22#include │ │ │ │ +23#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_i_n_t_2_._h> │ │ │ │ +24#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_s_e_2_._h> │ │ │ │ +25#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_R_o_t_2_._h> │ │ │ │ +26 │ │ │ │ +27namespace _g_t_s_a_m { │ │ │ │ +28 │ │ │ │ +29// Forward declarations │ │ │ │ +30class Pose2; │ │ │ │ 31 │ │ │ │ -_3_4 using _P_i_n_h_o_l_e_C_a_m_e_r_a_C_a_l_3___S_2 = _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_<_g_t_s_a_m_:_:_C_a_l_3___S_2_>; │ │ │ │ -35 using PinholeCameraCal3Bundler = _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_<_g_t_s_a_m_:_:_C_a_l_3_B_u_n_d_l_e_r_>; │ │ │ │ -36 using PinholeCameraCal3DS2 = _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_<_g_t_s_a_m_:_:_C_a_l_3_D_S_2_>; │ │ │ │ -37 using PinholeCameraCal3Unified = _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_<_g_t_s_a_m_:_:_C_a_l_3_U_n_i_f_i_e_d_>; │ │ │ │ -38 using PinholeCameraCal3Fisheye = _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_<_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_>; │ │ │ │ -39 │ │ │ │ -40#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42 │ │ │ │ -45class GTSAM_EXPORT SimpleCamera : public _P_i_n_h_o_l_e_C_a_m_e_r_a_C_a_l_3___S_2 { │ │ │ │ +_3_5class GTSAM_EXPORT _S_i_m_i_l_a_r_i_t_y_2 : public _L_i_e_G_r_o_u_p { │ │ │ │ +38 typedef _R_o_t_2 _R_o_t_a_t_i_o_n; │ │ │ │ +39 typedef _P_o_i_n_t_2 Translation; │ │ │ │ +41 │ │ │ │ +42 private: │ │ │ │ +43 _R_o_t_2 R_; │ │ │ │ +44 _P_o_i_n_t_2 t_; │ │ │ │ +45 double s_; │ │ │ │ 46 │ │ │ │ -47 typedef _P_i_n_h_o_l_e_C_a_m_e_r_a_<_C_a_l_3___S_2_> Base; │ │ │ │ -48 typedef boost::shared_ptr shared_ptr; │ │ │ │ -49 │ │ │ │ -50public: │ │ │ │ -51 │ │ │ │ -54 │ │ │ │ -56 SimpleCamera() : │ │ │ │ -57 Base() { │ │ │ │ -58 } │ │ │ │ +47 public: │ │ │ │ +50 │ │ │ │ +52 _S_i_m_i_l_a_r_i_t_y_2(); │ │ │ │ +53 │ │ │ │ +55 _S_i_m_i_l_a_r_i_t_y_2(double s); │ │ │ │ +56 │ │ │ │ +58 _S_i_m_i_l_a_r_i_t_y_2(const _R_o_t_2& R, const _P_o_i_n_t_2& t, double s); │ │ │ │ 59 │ │ │ │ -61 explicit SimpleCamera(const _P_o_s_e_3& pose) : │ │ │ │ -62 Base(pose) { │ │ │ │ -63 } │ │ │ │ -64 │ │ │ │ -66 SimpleCamera(const _P_o_s_e_3& pose, const _C_a_l_3___S_2& K) : │ │ │ │ -67 Base(pose, K) { │ │ │ │ -68 } │ │ │ │ +61 _S_i_m_i_l_a_r_i_t_y_2(const Matrix2& R, const Vector2& t, double s); │ │ │ │ +62 │ │ │ │ +64 _S_i_m_i_l_a_r_i_t_y_2(const Matrix3& T); │ │ │ │ +65 │ │ │ │ 69 │ │ │ │ -73 │ │ │ │ -81 static SimpleCamera Level(const _C_a_l_3___S_2 &K, const _P_o_s_e_2& pose2, │ │ │ │ -82 double height) { │ │ │ │ -83 return SimpleCamera(Base::LevelPose(pose2, height), K); │ │ │ │ -84 } │ │ │ │ -85 │ │ │ │ -87 static SimpleCamera Level(const _P_o_s_e_2& pose2, double height) { │ │ │ │ -88 return SimpleCamera::Level(_C_a_l_3___S_2(), pose2, height); │ │ │ │ -89 } │ │ │ │ +71 bool _e_q_u_a_l_s(const _S_i_m_i_l_a_r_i_t_y_2& sim, double tol) const; │ │ │ │ +72 │ │ │ │ +74 bool _o_p_e_r_a_t_o_r_=_=(const _S_i_m_i_l_a_r_i_t_y_2& other) const; │ │ │ │ +75 │ │ │ │ +77 void _p_r_i_n_t(const std::string& s) const; │ │ │ │ +78 │ │ │ │ +79 friend std::ostream& operator<<(std::ostream& os, const _S_i_m_i_l_a_r_i_t_y_2& p); │ │ │ │ +80 │ │ │ │ +84 │ │ │ │ +86 static _S_i_m_i_l_a_r_i_t_y_2 Identity(); │ │ │ │ +87 │ │ │ │ +89 _S_i_m_i_l_a_r_i_t_y_2 _o_p_e_r_a_t_o_r_*(const _S_i_m_i_l_a_r_i_t_y_2& S) const; │ │ │ │ 90 │ │ │ │ -100 static SimpleCamera Lookat(const _P_o_i_n_t_3& eye, const _P_o_i_n_t_3& target, │ │ │ │ -101 const _P_o_i_n_t_3& upVector, const _C_a_l_3___S_2& K = _C_a_l_3___S_2()) { │ │ │ │ -102 return SimpleCamera(Base::LookatPose(eye, target, upVector), K); │ │ │ │ -103 } │ │ │ │ -104 │ │ │ │ -108 │ │ │ │ -110 explicit SimpleCamera(const Vector &v) : │ │ │ │ -111 Base(v) { │ │ │ │ -112 } │ │ │ │ +92 _S_i_m_i_l_a_r_i_t_y_2 inverse() const; │ │ │ │ +93 │ │ │ │ +97 │ │ │ │ +99 _P_o_i_n_t_2 transformFrom(const _P_o_i_n_t_2& p) const; │ │ │ │ +100 │ │ │ │ +112 _P_o_s_e_2 transformFrom(const _P_o_s_e_2& T) const; │ │ │ │ 113 │ │ │ │ -115 SimpleCamera(const Vector &v, const Vector &K) : │ │ │ │ -116 Base(v, K) { │ │ │ │ -117 } │ │ │ │ -118 │ │ │ │ -120 SimpleCamera::shared_ptr clone() const { return boost:: │ │ │ │ -make_shared(*this); } │ │ │ │ +114 /* syntactic sugar for transformFrom */ │ │ │ │ +115 _P_o_i_n_t_2 _o_p_e_r_a_t_o_r_*(const _P_o_i_n_t_2& p) const; │ │ │ │ +116 │ │ │ │ +120 static _S_i_m_i_l_a_r_i_t_y_2 Align(const Point2Pairs& abPointPairs); │ │ │ │ 121 │ │ │ │ -122 │ │ │ │ -126 │ │ │ │ -128 SimpleCamera retract(const Vector& d) const { │ │ │ │ -129 if ((size_t) d.size() == 6) │ │ │ │ -130 return SimpleCamera(this->pose().retract(d), calibration()); │ │ │ │ -131 else │ │ │ │ -132 return SimpleCamera(this->pose().retract(d.head(6)), │ │ │ │ -133 calibration().retract(d.tail(calibration().dim()))); │ │ │ │ -134 } │ │ │ │ -135 │ │ │ │ -137 │ │ │ │ -138}; │ │ │ │ -139 │ │ │ │ -141GTSAM_EXPORT SimpleCamera simpleCamera(const Matrix34& P); │ │ │ │ -142 │ │ │ │ -143// manifold traits │ │ │ │ -144template <> │ │ │ │ -145struct traits : public internal::Manifold {}; │ │ │ │ -146 │ │ │ │ -147template <> │ │ │ │ -148struct traits : public internal::Manifold │ │ │ │ +135 static _S_i_m_i_l_a_r_i_t_y_2 Align(const Pose2Pairs& abPosePairs); │ │ │ │ +136 │ │ │ │ +140 │ │ │ │ +145 static Vector4 Logmap(const _S_i_m_i_l_a_r_i_t_y_2& S, // │ │ │ │ +146 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_4_,_ _4_> Hm = boost::none); │ │ │ │ +147 │ │ │ │ +149 static _S_i_m_i_l_a_r_i_t_y_2 Expmap(const Vector4& v, // │ │ │ │ +150 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_4_,_ _4_> Hm = boost::none); │ │ │ │ +151 │ │ │ │ +_1_5_3 struct _C_h_a_r_t_A_t_O_r_i_g_i_n { │ │ │ │ +154 static _S_i_m_i_l_a_r_i_t_y_2 Retract(const Vector4& v, │ │ │ │ +155 ChartJacobian H = boost::none) { │ │ │ │ +156 return Similarity2::Expmap(v, H); │ │ │ │ +157 } │ │ │ │ +158 static Vector4 Local(const _S_i_m_i_l_a_r_i_t_y_2& other, │ │ │ │ +159 ChartJacobian H = boost::none) { │ │ │ │ +160 return Similarity2::Logmap(other, H); │ │ │ │ +161 } │ │ │ │ +162 }; │ │ │ │ +163 │ │ │ │ +165 Matrix4 AdjointMap() const; │ │ │ │ +166 │ │ │ │ +167 using _L_i_e_G_r_o_u_p<_S_i_m_i_l_a_r_i_t_y_2, 4>::inverse; │ │ │ │ +168 │ │ │ │ +172 │ │ │ │ +174 Matrix3 matrix() const; │ │ │ │ +175 │ │ │ │ +_1_7_7 _R_o_t_2 _r_o_t_a_t_i_o_n() const { return R_; } │ │ │ │ +178 │ │ │ │ +_1_8_0 _P_o_i_n_t_2 _t_r_a_n_s_l_a_t_i_o_n() const { return t_; } │ │ │ │ +181 │ │ │ │ +_1_8_3 double _s_c_a_l_e() const { return s_; } │ │ │ │ +184 │ │ │ │ +_1_8_6 inline static size_t _D_i_m() { return 4; } │ │ │ │ +187 │ │ │ │ +_1_8_9 inline size_t _d_i_m() const { return 4; } │ │ │ │ +190 │ │ │ │ +192}; │ │ │ │ +193 │ │ │ │ +194template <> │ │ │ │ +_1_9_5struct _t_r_a_i_t_s<_S_i_m_i_l_a_r_i_t_y_2> : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p {}; │ │ │ │ +196 │ │ │ │ +197template <> │ │ │ │ +_1_9_8struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p │ │ │ │ {}; │ │ │ │ -149 │ │ │ │ -150// range traits, used in RangeFactor │ │ │ │ -151template │ │ │ │ -152struct Range : HasRange {}; │ │ │ │ -153 │ │ │ │ -154#endif │ │ │ │ -155 │ │ │ │ -156} // namespace gtsam │ │ │ │ -_P_i_n_h_o_l_e_C_a_m_e_r_a_._h │ │ │ │ -Base class for all pinhole cameras. │ │ │ │ -_C_a_l_3___S_2_._h │ │ │ │ -The most common 5DOF 3D->2D calibration. │ │ │ │ -_C_a_l_3_U_n_i_f_i_e_d_._h │ │ │ │ -Unified Calibration Model, see Mei07icra for details. │ │ │ │ -_C_a_l_3_F_i_s_h_e_y_e_._h │ │ │ │ -Calibration of a fisheye camera. │ │ │ │ -_C_a_l_3_D_S_2_._h │ │ │ │ -Calibration of a camera with radial distortion, calculations in base class │ │ │ │ -Cal3DS2_Base. │ │ │ │ -_C_a_l_3_B_u_n_d_l_e_r_._h │ │ │ │ -Calibration used by Bundler. │ │ │ │ -_B_e_a_r_i_n_g_R_a_n_g_e_._h │ │ │ │ -Bearing-Range product. │ │ │ │ +199 │ │ │ │ +200} // namespace gtsam │ │ │ │ +_L_i_e_._h │ │ │ │ +Base class and basic functions for Lie types. │ │ │ │ +_M_a_n_i_f_o_l_d_._h │ │ │ │ +Base class and basic functions for Manifold types. │ │ │ │ +_R_o_t_2_._h │ │ │ │ +2D rotation │ │ │ │ +_P_o_s_e_2_._h │ │ │ │ +2D Pose │ │ │ │ +_P_o_i_n_t_2_._h │ │ │ │ +2D Point │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_C_a_l_3___S_2 │ │ │ │ -gtsam::PinholeCamera< gtsam::Cal3_S2 > PinholeCameraCal3_S2 │ │ │ │ -Convenient aliases for Pinhole camera classes with different calibrations. │ │ │ │ -DDeeffiinniittiioonn SimpleCamera.h:34 │ │ │ │ -_g_t_s_a_m_:_:_P_o_i_n_t_3 │ │ │ │ -Vector3 Point3 │ │ │ │ +_g_t_s_a_m_:_:_p_r_i_n_t │ │ │ │ +void print(const Matrix &A, const string &s, ostream &stream) │ │ │ │ +print without optional string, must specify cout yourself │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:156 │ │ │ │ +_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ +Point2 operator*(double s, const Point2 &p) │ │ │ │ +multiply with scalar │ │ │ │ +DDeeffiinniittiioonn Point2.h:47 │ │ │ │ +_g_t_s_a_m_:_:_P_o_i_n_t_2 │ │ │ │ +Vector2 Point2 │ │ │ │ As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just │ │ │ │ -typedef Point3 to Vector3... │ │ │ │ -DDeeffiinniittiioonn Point3.h:36 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3___S_2 │ │ │ │ -The most common 5DOF 3D->2D calibration. │ │ │ │ -DDeeffiinniittiioonn Cal3_S2.h:34 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a │ │ │ │ -A pinhole camera class that has a Pose3 and a Calibration. │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:33 │ │ │ │ +typedef Point2 to Vector2... │ │ │ │ +DDeeffiinniittiioonn Point2.h:27 │ │ │ │ +_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ +bool operator==(const Matrix &A, const Matrix &B) │ │ │ │ +equality is just equal_with_abs_tol 1e-9 │ │ │ │ +DDeeffiinniittiioonn Matrix.h:100 │ │ │ │ +_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ +A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ +that can be centered ... │ │ │ │ +DDeeffiinniittiioonn concepts.h:30 │ │ │ │ +_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p │ │ │ │ +A CRTP helper class that implements Lie group methods Prerequisites: methods │ │ │ │ +operator*,... │ │ │ │ +DDeeffiinniittiioonn Lie.h:37 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p │ │ │ │ +Both LieGroupTraits and Testable. │ │ │ │ +DDeeffiinniittiioonn Lie.h:229 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ +either a fixed size o... │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ +_g_t_s_a_m_:_:_e_q_u_a_l_s │ │ │ │ +Template to create a binary predicate. │ │ │ │ +DDeeffiinniittiioonn Testable.h:111 │ │ │ │ _g_t_s_a_m_:_:_P_o_s_e_2 │ │ │ │ A 2D pose (Point2,Rot2) │ │ │ │ DDeeffiinniittiioonn Pose2.h:36 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_3 │ │ │ │ -A 3D pose (R,t) : (Rot3,Point3) │ │ │ │ -DDeeffiinniittiioonn Pose3.h:37 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2 │ │ │ │ +Rotation matrix NOTE: the angle theta is in radians unless explicitly stated. │ │ │ │ +DDeeffiinniittiioonn Rot2.h:36 │ │ │ │ +_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_2 │ │ │ │ +2D similarity transform │ │ │ │ +DDeeffiinniittiioonn Similarity2.h:35 │ │ │ │ +_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_2_:_:_t_r_a_n_s_l_a_t_i_o_n │ │ │ │ +Point2 translation() const │ │ │ │ +Return a GTSAM translation. │ │ │ │ +DDeeffiinniittiioonn Similarity2.h:180 │ │ │ │ +_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_2_:_:_s_c_a_l_e │ │ │ │ +double scale() const │ │ │ │ +Return the scale. │ │ │ │ +DDeeffiinniittiioonn Similarity2.h:183 │ │ │ │ +_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_2_:_:_D_i_m │ │ │ │ +static size_t Dim() │ │ │ │ +Dimensionality of tangent space = 4 DOF - used to autodetect sizes. │ │ │ │ +DDeeffiinniittiioonn Similarity2.h:186 │ │ │ │ +_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_2_:_:_r_o_t_a_t_i_o_n │ │ │ │ +Rot2 rotation() const │ │ │ │ +Return a GTSAM rotation. │ │ │ │ +DDeeffiinniittiioonn Similarity2.h:177 │ │ │ │ +_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_2_:_:_d_i_m │ │ │ │ +size_t dim() const │ │ │ │ +Dimensionality of tangent space = 4 DOF. │ │ │ │ +DDeeffiinniittiioonn Similarity2.h:189 │ │ │ │ +_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_2_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ +Chart at the origin. │ │ │ │ +DDeeffiinniittiioonn Similarity2.h:153 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_i_m_p_l_e_C_a_m_e_r_a_._h │ │ │ │ + * _S_i_m_i_l_a_r_i_t_y_2_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00311.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Similarity3.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3DS2.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,60 +95,53 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Functions
    │ │ │ -
    Similarity3.h File Reference
    │ │ │ +Namespaces
    │ │ │ +
    Cal3DS2.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    Implementation of Similarity3 transform. │ │ │ +

    Calibration of a camera with radial distortion, calculations in base class Cal3DS2_Base. │ │ │ More...

    │ │ │ │ │ │

    Go to the source code of this file.

    │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ │ │ │

    │ │ │ Classes

    class  gtsam::Similarity3
     3D similarity transform More...
    class  gtsam::Cal3DS2
     Calibration of a camera with radial distortion that also supports Lie-group behaviors for optimization. More...
     
    struct  gtsam::Similarity3::ChartAtOrigin
     Chart at the origin. More...
    struct  gtsam::traits< Cal3DS2 >
     
    struct  gtsam::traits< Similarity3 >
     
    struct  gtsam::traits< const Similarity3 >
    struct  gtsam::traits< const Cal3DS2 >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

    │ │ │ -Functions

    │ │ │ -template<>
    Matrix gtsam::wedge< Similarity3 > (const Vector &xi)
     
    │ │ │

    Detailed Description

    │ │ │ -

    Implementation of Similarity3 transform.

    │ │ │ -
    Author
    Paul Drews
    │ │ │ +

    Calibration of a camera with radial distortion, calculations in base class Cal3DS2_Base.

    │ │ │ +

    Calibration of a camera with radial distortion.

    │ │ │ +
    Date
    Feb 28, 2010
    │ │ │ +
    Author
    ydjian @autho Varun Agrawal
    │ │ │ +
    Date
    Feb 28, 2010
    │ │ │ +
    Author
    ydjian
    │ │ │
    │ │ │ -John Lambert
    │ │ │ +Varun Agrawal
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,37 +1,40 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Similarity3.h File Reference │ │ │ │ -Implementation of Similarity3 transform. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +Cal3DS2.h File Reference │ │ │ │ +Calibration of a camera with radial distortion, calculations in base class │ │ │ │ +Cal3DS2_Base. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_3 │ │ │ │ -  3D similarity transform _M_o_r_e_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_C_a_l_3_D_S_2 │ │ │ │ +  Calibration of a camera with radial distortion that also supports Lie- │ │ │ │ + group behaviors for optimization. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_3_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ -  Chart at the origin. _M_o_r_e_._._. │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _C_a_l_3_D_S_2_ _> │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _S_i_m_i_l_a_r_i_t_y_3_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _S_i_m_i_l_a_r_i_t_y_3_ _> │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _C_a_l_3_D_S_2_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template<> │ │ │ │ - Matrix  ggttssaamm::::wweeddggee<< SSiimmiillaarriittyy33 >> (const Vector &xi) │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Implementation of Similarity3 transform. │ │ │ │ +Calibration of a camera with radial distortion, calculations in base class │ │ │ │ +Cal3DS2_Base. │ │ │ │ +Calibration of a camera with radial distortion. │ │ │ │ + Date │ │ │ │ + Feb 28, 2010 │ │ │ │ + Author │ │ │ │ + ydjian @autho Varun Agrawal │ │ │ │ + Date │ │ │ │ + Feb 28, 2010 │ │ │ │ Author │ │ │ │ - Paul Drews │ │ │ │ - John Lambert │ │ │ │ + ydjian │ │ │ │ + Varun Agrawal │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_i_m_i_l_a_r_i_t_y_3_._h │ │ │ │ + * _C_a_l_3_D_S_2_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00311.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,6 +1,4 @@ │ │ │ │ var a00311 = [ │ │ │ │ - ["gtsam::Similarity3", "a03264.html", "a03264"], │ │ │ │ - ["gtsam::Similarity3::ChartAtOrigin", "a03268.html", null], │ │ │ │ - ["gtsam::traits< Similarity3 >", "a03272.html", null], │ │ │ │ - ["gtsam::traits< const Similarity3 >", "a03276.html", null] │ │ │ │ + ["gtsam::traits< Cal3DS2 >", "a02984.html", null], │ │ │ │ + ["gtsam::traits< const Cal3DS2 >", "a02988.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00311_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Similarity3.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3DS2.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,181 +98,113 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    Similarity3.h
    │ │ │ +
    Cal3DS2.h
    │ │ │
    │ │ │
    │ │ │ Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │
    4 * Atlanta, Georgia 30332-0415
    │ │ │
    5 * All Rights Reserved
    │ │ │
    6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
    │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │ -
    19#pragma once
    │ │ │ -
    20
    │ │ │ -
    21#include <gtsam/base/Lie.h>
    │ │ │ -
    22#include <gtsam/base/Manifold.h>
    │ │ │ -
    23#include <gtsam/dllexport.h>
    │ │ │ - │ │ │ - │ │ │ -
    26#include <gtsam/geometry/Rot3.h>
    │ │ │ +
    21#pragma once
    │ │ │ +
    22
    │ │ │ +
    23#include <gtsam/geometry/Cal3DS2_Base.h>
    │ │ │ +
    24#include <boost/shared_ptr.hpp>
    │ │ │ +
    25
    │ │ │ +
    26namespace gtsam {
    │ │ │
    27
    │ │ │ -
    28namespace gtsam {
    │ │ │ -
    29
    │ │ │ -
    30// Forward declarations
    │ │ │ -
    31class Pose3;
    │ │ │ -
    32
    │ │ │ -
    │ │ │ -
    36class GTSAM_EXPORT Similarity3 : public LieGroup<Similarity3, 7> {
    │ │ │ -
    39 typedef Rot3 Rotation;
    │ │ │ -
    40 typedef Point3 Translation;
    │ │ │ -
    42
    │ │ │ -
    43 private:
    │ │ │ -
    44 Rot3 R_;
    │ │ │ -
    45 Point3 t_;
    │ │ │ -
    46 double s_;
    │ │ │ -
    47
    │ │ │ -
    48 public:
    │ │ │ -
    51
    │ │ │ - │ │ │ -
    54
    │ │ │ -
    56 Similarity3(double s);
    │ │ │ -
    57
    │ │ │ -
    59 Similarity3(const Rot3& R, const Point3& t, double s);
    │ │ │ -
    60
    │ │ │ -
    62 Similarity3(const Matrix3& R, const Vector3& t, double s);
    │ │ │ -
    63
    │ │ │ -
    65 Similarity3(const Matrix4& T);
    │ │ │ -
    66
    │ │ │ -
    70
    │ │ │ -
    72 bool equals(const Similarity3& sim, double tol) const;
    │ │ │ -
    73
    │ │ │ -
    75 bool operator==(const Similarity3& other) const;
    │ │ │ -
    76
    │ │ │ -
    78 void print(const std::string& s) const;
    │ │ │ +
    │ │ │ +
    35class GTSAM_EXPORT Cal3DS2 : public Cal3DS2_Base {
    │ │ │ +
    36 using Base = Cal3DS2_Base;
    │ │ │ +
    37
    │ │ │ +
    38 public:
    │ │ │ +
    39 enum { dimension = 9 };
    │ │ │ +
    40
    │ │ │ +
    42 using shared_ptr = boost::shared_ptr<Cal3DS2>;
    │ │ │ +
    43
    │ │ │ +
    46
    │ │ │ +
    48 Cal3DS2() = default;
    │ │ │ +
    49
    │ │ │ +
    50 Cal3DS2(double fx, double fy, double s, double u0, double v0, double k1,
    │ │ │ +
    51 double k2, double p1 = 0.0, double p2 = 0.0, double tol = 1e-5)
    │ │ │ +
    52 : Base(fx, fy, s, u0, v0, k1, k2, p1, p2, tol) {}
    │ │ │ +
    53
    │ │ │ +
    54 ~Cal3DS2() override {}
    │ │ │ +
    55
    │ │ │ +
    59
    │ │ │ +
    60 Cal3DS2(const Vector9& v) : Base(v) {}
    │ │ │ +
    61
    │ │ │ +
    65
    │ │ │ +
    67 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os,
    │ │ │ +
    68 const Cal3DS2& cal);
    │ │ │ +
    69
    │ │ │ +
    71 void print(const std::string& s = "") const override;
    │ │ │ +
    72
    │ │ │ +
    74 bool equals(const Cal3DS2& K, double tol = 10e-9) const;
    │ │ │ +
    75
    │ │ │
    79
    │ │ │ -
    80 friend std::ostream& operator<<(std::ostream& os, const Similarity3& p);
    │ │ │ -
    81
    │ │ │ +
    81 Cal3DS2 retract(const Vector& d) const;
    │ │ │ +
    82
    │ │ │ +
    84 Vector localCoordinates(const Cal3DS2& T2) const;
    │ │ │
    85
    │ │ │ -
    87 static Similarity3 Identity();
    │ │ │ +
    87 size_t dim() const override { return Dim(); }
    │ │ │
    88
    │ │ │ -
    90 Similarity3 operator*(const Similarity3& S) const;
    │ │ │ +
    90 inline static size_t Dim() { return dimension; }
    │ │ │
    91
    │ │ │ -
    93 Similarity3 inverse() const;
    │ │ │ -
    94
    │ │ │ -
    98
    │ │ │ -
    100 Point3 transformFrom(const Point3& p, //
    │ │ │ -
    101 OptionalJacobian<3, 7> H1 = boost::none, //
    │ │ │ -
    102 OptionalJacobian<3, 3> H2 = boost::none) const;
    │ │ │ -
    103
    │ │ │ -
    115 Pose3 transformFrom(const Pose3& T) const;
    │ │ │ -
    116
    │ │ │ -
    118 Point3 operator*(const Point3& p) const;
    │ │ │ -
    119
    │ │ │ -
    123 static Similarity3 Align(const Point3Pairs& abPointPairs);
    │ │ │ -
    124
    │ │ │ -
    135 static Similarity3 Align(const std::vector<Pose3Pair>& abPosePairs);
    │ │ │ -
    136
    │ │ │ -
    140
    │ │ │ -
    144 static Vector7 Logmap(const Similarity3& s, //
    │ │ │ -
    145 OptionalJacobian<7, 7> Hm = boost::none);
    │ │ │ -
    146
    │ │ │ -
    149 static Similarity3 Expmap(const Vector7& v, //
    │ │ │ -
    150 OptionalJacobian<7, 7> Hm = boost::none);
    │ │ │ -
    151
    │ │ │ -
    │ │ │ - │ │ │ -
    154 static Similarity3 Retract(const Vector7& v,
    │ │ │ -
    155 ChartJacobian H = boost::none) {
    │ │ │ -
    156 return Similarity3::Expmap(v, H);
    │ │ │ -
    157 }
    │ │ │ -
    158 static Vector7 Local(const Similarity3& other,
    │ │ │ -
    159 ChartJacobian H = boost::none) {
    │ │ │ -
    160 return Similarity3::Logmap(other, H);
    │ │ │ -
    161 }
    │ │ │ -
    162 };
    │ │ │ -
    │ │ │ -
    163
    │ │ │ -
    164 using LieGroup<Similarity3, 7>::inverse;
    │ │ │ -
    165
    │ │ │ -
    172 static Matrix4 wedge(const Vector7& xi);
    │ │ │ -
    173
    │ │ │ -
    175 Matrix7 AdjointMap() const;
    │ │ │ -
    176
    │ │ │ -
    180
    │ │ │ -
    182 Matrix4 matrix() const;
    │ │ │ -
    183
    │ │ │ -
    185 Rot3 rotation() const { return R_; }
    │ │ │ -
    186
    │ │ │ -
    188 Point3 translation() const { return t_; }
    │ │ │ -
    189
    │ │ │ -
    191 double scale() const { return s_; }
    │ │ │ -
    192
    │ │ │ -
    194 inline static size_t Dim() { return 7; }
    │ │ │ -
    195
    │ │ │ -
    197 inline size_t dim() const { return 7; }
    │ │ │ -
    198
    │ │ │ -
    202
    │ │ │ -
    203 private:
    │ │ │ -
    205 static Matrix3 GetV(Vector3 w, double lambda);
    │ │ │ -
    206
    │ │ │ -
    208};
    │ │ │ -
    │ │ │ -
    209
    │ │ │ -
    210template <>
    │ │ │ -
    211inline Matrix wedge<Similarity3>(const Vector& xi) {
    │ │ │ -
    212 return Similarity3::wedge(xi);
    │ │ │ -
    213}
    │ │ │ -
    214
    │ │ │ -
    215template <>
    │ │ │ -
    216struct traits<Similarity3> : public internal::LieGroup<Similarity3> {};
    │ │ │ -
    217
    │ │ │ -
    218template <>
    │ │ │ -
    219struct traits<const Similarity3> : public internal::LieGroup<Similarity3> {};
    │ │ │ -
    220
    │ │ │ -
    221} // namespace gtsam
    │ │ │ -
    Base class and basic functions for Manifold types.
    │ │ │ -
    Base class and basic functions for Lie types.
    │ │ │ -
    3D rotation represented as a rotation matrix or quaternion
    │ │ │ -
    3D Pose
    │ │ │ -
    3D Point
    │ │ │ +
    95
    │ │ │ +
    │ │ │ +
    97 boost::shared_ptr<Base> clone() const override {
    │ │ │ +
    98 return boost::shared_ptr<Base>(new Cal3DS2(*this));
    │ │ │ +
    99 }
    │ │ │ +
    │ │ │ +
    100
    │ │ │ +
    102
    │ │ │ +
    103 private:
    │ │ │ +
    106
    │ │ │ +
    108 friend class boost::serialization::access;
    │ │ │ +
    109 template <class Archive>
    │ │ │ +
    110 void serialize(Archive& ar, const unsigned int /*version*/) {
    │ │ │ +
    111 ar& boost::serialization::make_nvp(
    │ │ │ +
    112 "Cal3DS2", boost::serialization::base_object<Cal3DS2_Base>(*this));
    │ │ │ +
    113 }
    │ │ │ +
    114
    │ │ │ +
    116};
    │ │ │ +
    │ │ │ +
    117
    │ │ │ +
    118template <>
    │ │ │ +
    119struct traits<Cal3DS2> : public internal::Manifold<Cal3DS2> {};
    │ │ │ +
    120
    │ │ │ +
    121template <>
    │ │ │ +
    122struct traits<const Cal3DS2> : public internal::Manifold<Cal3DS2> {};
    │ │ │ +
    123}
    │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │
    void print(const Matrix &A, const string &s, ostream &stream)
    print without optional string, must specify cout yourself
    Definition Matrix.cpp:156
    │ │ │ -
    Point2 operator*(double s, const Point2 &p)
    multiply with scalar
    Definition Point2.h:47
    │ │ │ -
    Vector3 Point3
    As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point3 to Vector3...
    Definition Point3.h:36
    │ │ │ -
    bool operator==(const Matrix &A, const Matrix &B)
    equality is just equal_with_abs_tol 1e-9
    Definition Matrix.h:100
    │ │ │ -
    Matrix wedge(const Vector &x)
    Declaration of wedge (see Murray94book) used to convert from n exponential coordinates to n*n element...
    │ │ │
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │ -
    A CRTP helper class that implements Lie group methods Prerequisites: methods operator*,...
    Definition Lie.h:37
    │ │ │ -
    Both LieGroupTraits and Testable.
    Definition Lie.h:229
    │ │ │ -
    OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
    Definition OptionalJacobian.h:41
    │ │ │ -
    Template to create a binary predicate.
    Definition Testable.h:111
    │ │ │ -
    A 3D pose (R,t) : (Rot3,Point3)
    Definition Pose3.h:37
    │ │ │ -
    Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
    Definition Rot3.h:58
    │ │ │ -
    3D similarity transform
    Definition Similarity3.h:36
    │ │ │ -
    static size_t Dim()
    Dimensionality of tangent space = 7 DOF - used to autodetect sizes.
    Definition Similarity3.h:194
    │ │ │ -
    Point3 translation() const
    Return a GTSAM translation.
    Definition Similarity3.h:188
    │ │ │ -
    Rot3 rotation() const
    Return a GTSAM rotation.
    Definition Similarity3.h:185
    │ │ │ -
    size_t dim() const
    Dimensionality of tangent space = 7 DOF.
    Definition Similarity3.h:197
    │ │ │ -
    static Matrix4 wedge(const Vector7 &xi)
    wedge for Similarity3:
    Definition Similarity3.cpp:198
    │ │ │ -
    double scale() const
    Return the scale.
    Definition Similarity3.h:191
    │ │ │ -
    Chart at the origin.
    Definition Similarity3.h:153
    │ │ │ +
    Both ManifoldTraits and Testable.
    Definition Manifold.h:120
    │ │ │ +
    Calibration of a camera with radial distortion that also supports Lie-group behaviors for optimizatio...
    Definition Cal3DS2.h:35
    │ │ │ +
    size_t dim() const override
    Return dimensions of calibration manifold object.
    Definition Cal3DS2.h:87
    │ │ │ +
    boost::shared_ptr< Base > clone() const override
    Definition Cal3DS2.h:97
    │ │ │ +
    static size_t Dim()
    Return dimensions of calibration manifold object.
    Definition Cal3DS2.h:90
    │ │ │ +
    Cal3DS2()=default
    Default Constructor with only unit focal length.
    │ │ │ +
    Calibration of a camera with radial distortion.
    Definition Cal3DS2_Base.h:42
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,233 +1,126 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Similarity3.h │ │ │ │ +Cal3DS2.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -19#pragma once │ │ │ │ -20 │ │ │ │ -21#include <_g_t_s_a_m_/_b_a_s_e_/_L_i_e_._h> │ │ │ │ -22#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_n_i_f_o_l_d_._h> │ │ │ │ -23#include │ │ │ │ -24#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_i_n_t_3_._h> │ │ │ │ -25#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_s_e_3_._h> │ │ │ │ -26#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_R_o_t_3_._h> │ │ │ │ +21#pragma once │ │ │ │ +22 │ │ │ │ +23#include │ │ │ │ +24#include │ │ │ │ +25 │ │ │ │ +26namespace _g_t_s_a_m { │ │ │ │ 27 │ │ │ │ -28namespace _g_t_s_a_m { │ │ │ │ -29 │ │ │ │ -30// Forward declarations │ │ │ │ -31class Pose3; │ │ │ │ -32 │ │ │ │ -_3_6class GTSAM_EXPORT _S_i_m_i_l_a_r_i_t_y_3 : public _L_i_e_G_r_o_u_p { │ │ │ │ -39 typedef _R_o_t_3 _R_o_t_a_t_i_o_n; │ │ │ │ -40 typedef _P_o_i_n_t_3 Translation; │ │ │ │ -42 │ │ │ │ -43 private: │ │ │ │ -44 _R_o_t_3 R_; │ │ │ │ -45 _P_o_i_n_t_3 t_; │ │ │ │ -46 double s_; │ │ │ │ -47 │ │ │ │ -48 public: │ │ │ │ -51 │ │ │ │ -53 _S_i_m_i_l_a_r_i_t_y_3(); │ │ │ │ -54 │ │ │ │ -56 _S_i_m_i_l_a_r_i_t_y_3(double s); │ │ │ │ -57 │ │ │ │ -59 _S_i_m_i_l_a_r_i_t_y_3(const _R_o_t_3& R, const _P_o_i_n_t_3& t, double s); │ │ │ │ -60 │ │ │ │ -62 _S_i_m_i_l_a_r_i_t_y_3(const Matrix3& R, const Vector3& t, double s); │ │ │ │ -63 │ │ │ │ -65 _S_i_m_i_l_a_r_i_t_y_3(const Matrix4& T); │ │ │ │ -66 │ │ │ │ -70 │ │ │ │ -72 bool _e_q_u_a_l_s(const _S_i_m_i_l_a_r_i_t_y_3& sim, double tol) const; │ │ │ │ -73 │ │ │ │ -75 bool _o_p_e_r_a_t_o_r_=_=(const _S_i_m_i_l_a_r_i_t_y_3& other) const; │ │ │ │ -76 │ │ │ │ -78 void _p_r_i_n_t(const std::string& s) const; │ │ │ │ +_3_5class GTSAM_EXPORT _C_a_l_3_D_S_2 : public _C_a_l_3_D_S_2___B_a_s_e { │ │ │ │ +36 using _B_a_s_e = _C_a_l_3_D_S_2___B_a_s_e; │ │ │ │ +37 │ │ │ │ +38 public: │ │ │ │ +39 enum { dimension = 9 }; │ │ │ │ +40 │ │ │ │ +42 using shared_ptr = boost::shared_ptr; │ │ │ │ +43 │ │ │ │ +46 │ │ │ │ +_4_8 _C_a_l_3_D_S_2() = default; │ │ │ │ +49 │ │ │ │ +50 _C_a_l_3_D_S_2(double fx, double fy, double s, double u0, double v0, double k1, │ │ │ │ +51 double k2, double p1 = 0.0, double p2 = 0.0, double tol = 1e-5) │ │ │ │ +52 : _B_a_s_e(fx, fy, s, u0, v0, k1, k2, p1, p2, tol) {} │ │ │ │ +53 │ │ │ │ +54 _~_C_a_l_3_D_S_2() override {} │ │ │ │ +55 │ │ │ │ +59 │ │ │ │ +60 Cal3DS2(const Vector9& v) : Base(v) {} │ │ │ │ +61 │ │ │ │ +65 │ │ │ │ +67 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os, │ │ │ │ +68 const Cal3DS2& cal); │ │ │ │ +69 │ │ │ │ +71 void _p_r_i_n_t(const std::string& s = "") const override; │ │ │ │ +72 │ │ │ │ +74 bool equals(const Cal3DS2& K, double tol = 10e-9) const; │ │ │ │ +75 │ │ │ │ 79 │ │ │ │ -80 friend std::ostream& operator<<(std::ostream& os, const _S_i_m_i_l_a_r_i_t_y_3& p); │ │ │ │ -81 │ │ │ │ +81 Cal3DS2 retract(const Vector& d) const; │ │ │ │ +82 │ │ │ │ +84 Vector localCoordinates(const Cal3DS2& T2) const; │ │ │ │ 85 │ │ │ │ -87 static _S_i_m_i_l_a_r_i_t_y_3 Identity(); │ │ │ │ +_8_7 size_t _d_i_m() const override { return Dim(); } │ │ │ │ 88 │ │ │ │ -90 _S_i_m_i_l_a_r_i_t_y_3 _o_p_e_r_a_t_o_r_*(const _S_i_m_i_l_a_r_i_t_y_3& S) const; │ │ │ │ +_9_0 inline static size_t _D_i_m() { return dimension; } │ │ │ │ 91 │ │ │ │ -93 _S_i_m_i_l_a_r_i_t_y_3 inverse() const; │ │ │ │ -94 │ │ │ │ -98 │ │ │ │ -100 _P_o_i_n_t_3 transformFrom(const _P_o_i_n_t_3& p, // │ │ │ │ -101 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _7_> H1 = boost::none, // │ │ │ │ -102 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H2 = boost::none) const; │ │ │ │ -103 │ │ │ │ -115 _P_o_s_e_3 transformFrom(const _P_o_s_e_3& T) const; │ │ │ │ -116 │ │ │ │ -118 _P_o_i_n_t_3 _o_p_e_r_a_t_o_r_*(const _P_o_i_n_t_3& p) const; │ │ │ │ -119 │ │ │ │ -123 static _S_i_m_i_l_a_r_i_t_y_3 Align(const Point3Pairs& abPointPairs); │ │ │ │ -124 │ │ │ │ -135 static _S_i_m_i_l_a_r_i_t_y_3 Align(const std::vector& abPosePairs); │ │ │ │ -136 │ │ │ │ -140 │ │ │ │ -144 static Vector7 Logmap(const _S_i_m_i_l_a_r_i_t_y_3& s, // │ │ │ │ -145 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_7_,_ _7_> Hm = boost::none); │ │ │ │ -146 │ │ │ │ -149 static _S_i_m_i_l_a_r_i_t_y_3 Expmap(const Vector7& v, // │ │ │ │ -150 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_7_,_ _7_> Hm = boost::none); │ │ │ │ -151 │ │ │ │ -_1_5_3 struct _C_h_a_r_t_A_t_O_r_i_g_i_n { │ │ │ │ -154 static _S_i_m_i_l_a_r_i_t_y_3 Retract(const Vector7& v, │ │ │ │ -155 ChartJacobian H = boost::none) { │ │ │ │ -156 return Similarity3::Expmap(v, H); │ │ │ │ -157 } │ │ │ │ -158 static Vector7 Local(const _S_i_m_i_l_a_r_i_t_y_3& other, │ │ │ │ -159 ChartJacobian H = boost::none) { │ │ │ │ -160 return Similarity3::Logmap(other, H); │ │ │ │ -161 } │ │ │ │ -162 }; │ │ │ │ -163 │ │ │ │ -164 using _L_i_e_G_r_o_u_p<_S_i_m_i_l_a_r_i_t_y_3, 7>::inverse; │ │ │ │ -165 │ │ │ │ -172 static Matrix4 _w_e_d_g_e(const Vector7& xi); │ │ │ │ -173 │ │ │ │ -175 Matrix7 AdjointMap() const; │ │ │ │ -176 │ │ │ │ -180 │ │ │ │ -182 Matrix4 matrix() const; │ │ │ │ -183 │ │ │ │ -_1_8_5 _R_o_t_3 _r_o_t_a_t_i_o_n() const { return R_; } │ │ │ │ -186 │ │ │ │ -_1_8_8 _P_o_i_n_t_3 _t_r_a_n_s_l_a_t_i_o_n() const { return t_; } │ │ │ │ -189 │ │ │ │ -_1_9_1 double _s_c_a_l_e() const { return s_; } │ │ │ │ -192 │ │ │ │ -_1_9_4 inline static size_t _D_i_m() { return 7; } │ │ │ │ -195 │ │ │ │ -_1_9_7 inline size_t _d_i_m() const { return 7; } │ │ │ │ -198 │ │ │ │ -202 │ │ │ │ -203 private: │ │ │ │ -205 static Matrix3 GetV(Vector3 w, double lambda); │ │ │ │ -206 │ │ │ │ -208}; │ │ │ │ -209 │ │ │ │ -210template <> │ │ │ │ -211inline Matrix wedge(const Vector& xi) { │ │ │ │ -212 return _S_i_m_i_l_a_r_i_t_y_3_:_:_w_e_d_g_e(xi); │ │ │ │ -213} │ │ │ │ -214 │ │ │ │ -215template <> │ │ │ │ -_2_1_6struct _t_r_a_i_t_s<_S_i_m_i_l_a_r_i_t_y_3> : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p {}; │ │ │ │ -217 │ │ │ │ -218template <> │ │ │ │ -_2_1_9struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p │ │ │ │ -{}; │ │ │ │ -220 │ │ │ │ -221} // namespace gtsam │ │ │ │ -_M_a_n_i_f_o_l_d_._h │ │ │ │ -Base class and basic functions for Manifold types. │ │ │ │ -_L_i_e_._h │ │ │ │ -Base class and basic functions for Lie types. │ │ │ │ -_R_o_t_3_._h │ │ │ │ -3D rotation represented as a rotation matrix or quaternion │ │ │ │ -_P_o_s_e_3_._h │ │ │ │ -3D Pose │ │ │ │ -_P_o_i_n_t_3_._h │ │ │ │ -3D Point │ │ │ │ +95 │ │ │ │ +_9_7 boost::shared_ptr _c_l_o_n_e() const override { │ │ │ │ +98 return boost::shared_ptr(new _C_a_l_3_D_S_2(*this)); │ │ │ │ +99 } │ │ │ │ +100 │ │ │ │ +102 │ │ │ │ +103 private: │ │ │ │ +106 │ │ │ │ +_1_0_8 friend class boost::serialization::access; │ │ │ │ +109 template │ │ │ │ +110 void serialize(Archive& ar, const unsigned int /*version*/) { │ │ │ │ +111 ar& boost::serialization::make_nvp( │ │ │ │ +112 "Cal3DS2", boost::serialization::base_object(*this)); │ │ │ │ +113 } │ │ │ │ +114 │ │ │ │ +116}; │ │ │ │ +117 │ │ │ │ +118template <> │ │ │ │ +_1_1_9struct _t_r_a_i_t_s<_C_a_l_3_D_S_2> : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d {}; │ │ │ │ +120 │ │ │ │ +121template <> │ │ │ │ +_1_2_2struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d {}; │ │ │ │ +123} │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ _g_t_s_a_m_:_:_p_r_i_n_t │ │ │ │ void print(const Matrix &A, const string &s, ostream &stream) │ │ │ │ print without optional string, must specify cout yourself │ │ │ │ DDeeffiinniittiioonn Matrix.cpp:156 │ │ │ │ -_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -Point2 operator*(double s, const Point2 &p) │ │ │ │ -multiply with scalar │ │ │ │ -DDeeffiinniittiioonn Point2.h:47 │ │ │ │ -_g_t_s_a_m_:_:_P_o_i_n_t_3 │ │ │ │ -Vector3 Point3 │ │ │ │ -As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just │ │ │ │ -typedef Point3 to Vector3... │ │ │ │ -DDeeffiinniittiioonn Point3.h:36 │ │ │ │ -_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ -bool operator==(const Matrix &A, const Matrix &B) │ │ │ │ -equality is just equal_with_abs_tol 1e-9 │ │ │ │ -DDeeffiinniittiioonn Matrix.h:100 │ │ │ │ -_g_t_s_a_m_:_:_w_e_d_g_e │ │ │ │ -Matrix wedge(const Vector &x) │ │ │ │ -Declaration of wedge (see Murray94book) used to convert from n exponential │ │ │ │ -coordinates to n*n element... │ │ │ │ _g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ that can be centered ... │ │ │ │ DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p │ │ │ │ -A CRTP helper class that implements Lie group methods Prerequisites: methods │ │ │ │ -operator*,... │ │ │ │ -DDeeffiinniittiioonn Lie.h:37 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p │ │ │ │ -Both LieGroupTraits and Testable. │ │ │ │ -DDeeffiinniittiioonn Lie.h:229 │ │ │ │ -_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ -OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ -either a fixed size o... │ │ │ │ -DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ -_g_t_s_a_m_:_:_e_q_u_a_l_s │ │ │ │ -Template to create a binary predicate. │ │ │ │ -DDeeffiinniittiioonn Testable.h:111 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_3 │ │ │ │ -A 3D pose (R,t) : (Rot3,Point3) │ │ │ │ -DDeeffiinniittiioonn Pose3.h:37 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3 │ │ │ │ -Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor │ │ │ │ -symbol GTSAM_USE_QUATERNIO... │ │ │ │ -DDeeffiinniittiioonn Rot3.h:58 │ │ │ │ -_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_3 │ │ │ │ -3D similarity transform │ │ │ │ -DDeeffiinniittiioonn Similarity3.h:36 │ │ │ │ -_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_3_:_:_D_i_m │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d │ │ │ │ +Both ManifoldTraits and Testable. │ │ │ │ +DDeeffiinniittiioonn Manifold.h:120 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_D_S_2 │ │ │ │ +Calibration of a camera with radial distortion that also supports Lie-group │ │ │ │ +behaviors for optimizatio... │ │ │ │ +DDeeffiinniittiioonn Cal3DS2.h:35 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_D_S_2_:_:_d_i_m │ │ │ │ +size_t dim() const override │ │ │ │ +Return dimensions of calibration manifold object. │ │ │ │ +DDeeffiinniittiioonn Cal3DS2.h:87 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_D_S_2_:_:_c_l_o_n_e │ │ │ │ +boost::shared_ptr< Base > clone() const override │ │ │ │ +DDeeffiinniittiioonn Cal3DS2.h:97 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_D_S_2_:_:_D_i_m │ │ │ │ static size_t Dim() │ │ │ │ -Dimensionality of tangent space = 7 DOF - used to autodetect sizes. │ │ │ │ -DDeeffiinniittiioonn Similarity3.h:194 │ │ │ │ -_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_3_:_:_t_r_a_n_s_l_a_t_i_o_n │ │ │ │ -Point3 translation() const │ │ │ │ -Return a GTSAM translation. │ │ │ │ -DDeeffiinniittiioonn Similarity3.h:188 │ │ │ │ -_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_3_:_:_r_o_t_a_t_i_o_n │ │ │ │ -Rot3 rotation() const │ │ │ │ -Return a GTSAM rotation. │ │ │ │ -DDeeffiinniittiioonn Similarity3.h:185 │ │ │ │ -_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_3_:_:_d_i_m │ │ │ │ -size_t dim() const │ │ │ │ -Dimensionality of tangent space = 7 DOF. │ │ │ │ -DDeeffiinniittiioonn Similarity3.h:197 │ │ │ │ -_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_3_:_:_w_e_d_g_e │ │ │ │ -static Matrix4 wedge(const Vector7 &xi) │ │ │ │ -wedge for Similarity3: │ │ │ │ -DDeeffiinniittiioonn Similarity3.cpp:198 │ │ │ │ -_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_3_:_:_s_c_a_l_e │ │ │ │ -double scale() const │ │ │ │ -Return the scale. │ │ │ │ -DDeeffiinniittiioonn Similarity3.h:191 │ │ │ │ -_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_3_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ -Chart at the origin. │ │ │ │ -DDeeffiinniittiioonn Similarity3.h:153 │ │ │ │ +Return dimensions of calibration manifold object. │ │ │ │ +DDeeffiinniittiioonn Cal3DS2.h:90 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_D_S_2_:_:_C_a_l_3_D_S_2 │ │ │ │ +Cal3DS2()=default │ │ │ │ +Default Constructor with only unit focal length. │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_D_S_2___B_a_s_e │ │ │ │ +Calibration of a camera with radial distortion. │ │ │ │ +DDeeffiinniittiioonn Cal3DS2_Base.h:42 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_i_m_i_l_a_r_i_t_y_3_._h │ │ │ │ + * _C_a_l_3_D_S_2_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00314.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Similarity3.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SphericalCamera.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,44 +94,52 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Namespaces | │ │ │ -Functions
    │ │ │ -
    Similarity3.cpp File Reference
    │ │ │ +Classes | │ │ │ +Namespaces
    │ │ │ +
    SphericalCamera.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    Implementation of Similarity3 transform. │ │ │ +

    Calibrated camera with spherical projection. │ │ │ More...

    │ │ │ + │ │ │ +

    Go to the source code of this file.

    │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Classes

    class  gtsam::EmptyCal
     Empty calibration. More...
     
    class  gtsam::SphericalCamera
     A spherical camera class that has a Pose3 and measures bearing vectors. More...
     
    struct  gtsam::traits< SphericalCamera >
     
    struct  gtsam::traits< const SphericalCamera >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │

    │ │ │ -Functions

    │ │ │ -std::ostream & gtsam::operator<< (std::ostream &os, const Similarity3 &p)
     
    │ │ │

    Detailed Description

    │ │ │ -

    Implementation of Similarity3 transform.

    │ │ │ -
    Author
    Paul Drews
    │ │ │ -
    │ │ │ -John Lambert
    │ │ │ +

    Calibrated camera with spherical projection.

    │ │ │ +
    Date
    Aug 26, 2021
    │ │ │ +
    Author
    Luca Carlone
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,24 +1,35 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Similarity3.cpp File Reference │ │ │ │ -Implementation of Similarity3 transform. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +SphericalCamera.h File Reference │ │ │ │ +Calibrated camera with spherical projection. _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ + class   _g_t_s_a_m_:_:_E_m_p_t_y_C_a_l │ │ │ │ +  Empty calibration. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ + class   _g_t_s_a_m_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a │ │ │ │ +  A spherical camera class that has a _P_o_s_e_3 and measures bearing │ │ │ │ + vectors. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_ _> │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _S_i_m_i_l_a_r_i_t_y_3 &p) │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Implementation of Similarity3 transform. │ │ │ │ +Calibrated camera with spherical projection. │ │ │ │ + Date │ │ │ │ + Aug 26, 2021 │ │ │ │ Author │ │ │ │ - Paul Drews │ │ │ │ - John Lambert │ │ │ │ + Luca Carlone │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_i_m_i_l_a_r_i_t_y_3_._c_p_p │ │ │ │ + * _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00317_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Similarity2.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3DS2_Base.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,167 +98,151 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    Similarity2.h
    │ │ │ +
    Cal3DS2_Base.h
    │ │ │
    │ │ │
    │ │ │ -Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │ +
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │
    4 * Atlanta, Georgia 30332-0415
    │ │ │
    5 * All Rights Reserved
    │ │ │
    6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
    │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │ -
    18#pragma once
    │ │ │ -
    19
    │ │ │ -
    20#include <gtsam/base/Lie.h>
    │ │ │ -
    21#include <gtsam/base/Manifold.h>
    │ │ │ -
    22#include <gtsam/dllexport.h>
    │ │ │ - │ │ │ - │ │ │ -
    25#include <gtsam/geometry/Rot2.h>
    │ │ │ -
    26
    │ │ │ -
    27namespace gtsam {
    │ │ │ -
    28
    │ │ │ -
    29// Forward declarations
    │ │ │ -
    30class Pose2;
    │ │ │ -
    31
    │ │ │ -
    │ │ │ -
    35class GTSAM_EXPORT Similarity2 : public LieGroup<Similarity2, 4> {
    │ │ │ -
    38 typedef Rot2 Rotation;
    │ │ │ -
    39 typedef Point2 Translation;
    │ │ │ -
    41
    │ │ │ -
    42 private:
    │ │ │ -
    43 Rot2 R_;
    │ │ │ -
    44 Point2 t_;
    │ │ │ -
    45 double s_;
    │ │ │ -
    46
    │ │ │ -
    47 public:
    │ │ │ +
    20#pragma once
    │ │ │ +
    21
    │ │ │ +
    22#include <gtsam/geometry/Cal3.h>
    │ │ │ + │ │ │ +
    24#include <boost/shared_ptr.hpp>
    │ │ │ +
    25
    │ │ │ +
    26namespace gtsam {
    │ │ │ +
    27
    │ │ │ +
    │ │ │ +
    42class GTSAM_EXPORT Cal3DS2_Base : public Cal3 {
    │ │ │ +
    43 protected:
    │ │ │ +
    44 double k1_ = 0.0f, k2_ = 0.0f;
    │ │ │ +
    45 double p1_ = 0.0f, p2_ = 0.0f;
    │ │ │ +
    46 double tol_ = 1e-5;
    │ │ │ +
    47
    │ │ │ +
    48 public:
    │ │ │ +
    49 enum { dimension = 9 };
    │ │ │
    50
    │ │ │ - │ │ │ +
    52 using shared_ptr = boost::shared_ptr<Cal3DS2_Base>;
    │ │ │
    53
    │ │ │ -
    55 Similarity2(double s);
    │ │ │
    56
    │ │ │ -
    58 Similarity2(const Rot2& R, const Point2& t, double s);
    │ │ │ +
    58 Cal3DS2_Base() = default;
    │ │ │
    59
    │ │ │ -
    61 Similarity2(const Matrix2& R, const Vector2& t, double s);
    │ │ │ -
    62
    │ │ │ -
    64 Similarity2(const Matrix3& T);
    │ │ │ -
    65
    │ │ │ -
    69
    │ │ │ -
    71 bool equals(const Similarity2& sim, double tol) const;
    │ │ │ -
    72
    │ │ │ -
    74 bool operator==(const Similarity2& other) const;
    │ │ │ -
    75
    │ │ │ -
    77 void print(const std::string& s) const;
    │ │ │ -
    78
    │ │ │ -
    79 friend std::ostream& operator<<(std::ostream& os, const Similarity2& p);
    │ │ │ -
    80
    │ │ │ -
    84
    │ │ │ -
    86 static Similarity2 Identity();
    │ │ │ -
    87
    │ │ │ -
    89 Similarity2 operator*(const Similarity2& S) const;
    │ │ │ -
    90
    │ │ │ -
    92 Similarity2 inverse() const;
    │ │ │ -
    93
    │ │ │ -
    97
    │ │ │ -
    99 Point2 transformFrom(const Point2& p) const;
    │ │ │ -
    100
    │ │ │ -
    112 Pose2 transformFrom(const Pose2& T) const;
    │ │ │ -
    113
    │ │ │ -
    114 /* syntactic sugar for transformFrom */
    │ │ │ -
    115 Point2 operator*(const Point2& p) const;
    │ │ │ -
    116
    │ │ │ -
    120 static Similarity2 Align(const Point2Pairs& abPointPairs);
    │ │ │ -
    121
    │ │ │ -
    135 static Similarity2 Align(const Pose2Pairs& abPosePairs);
    │ │ │ -
    136
    │ │ │ +
    60 Cal3DS2_Base(double fx, double fy, double s, double u0, double v0, double k1,
    │ │ │ +
    61 double k2, double p1 = 0.0, double p2 = 0.0, double tol = 1e-5)
    │ │ │ +
    62 : Cal3(fx, fy, s, u0, v0),
    │ │ │ +
    63 k1_(k1),
    │ │ │ +
    64 k2_(k2),
    │ │ │ +
    65 p1_(p1),
    │ │ │ +
    66 p2_(p2),
    │ │ │ +
    67 tol_(tol) {}
    │ │ │ +
    68
    │ │ │ +
    69 ~Cal3DS2_Base() override {}
    │ │ │ +
    70
    │ │ │ +
    74
    │ │ │ +
    75 Cal3DS2_Base(const Vector9& v)
    │ │ │ +
    76 : Cal3(v(0), v(1), v(2), v(3), v(4)),
    │ │ │ +
    77 k1_(v(5)),
    │ │ │ +
    78 k2_(v(6)),
    │ │ │ +
    79 p1_(v(7)),
    │ │ │ +
    80 p2_(v(8)) {}
    │ │ │ +
    81
    │ │ │ +
    85
    │ │ │ +
    87 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os,
    │ │ │ +
    88 const Cal3DS2_Base& cal);
    │ │ │ +
    89
    │ │ │ +
    91 void print(const std::string& s = "") const override;
    │ │ │ +
    92
    │ │ │ +
    94 bool equals(const Cal3DS2_Base& K, double tol = 1e-8) const;
    │ │ │ +
    95
    │ │ │ +
    99
    │ │ │ +
    101 inline double k1() const { return k1_; }
    │ │ │ +
    102
    │ │ │ +
    104 inline double k2() const { return k2_; }
    │ │ │ +
    105
    │ │ │ +
    107 inline double p1() const { return p1_; }
    │ │ │ +
    108
    │ │ │ +
    110 inline double p2() const { return p2_; }
    │ │ │ +
    111
    │ │ │ +
    113 Vector4 k() const { return Vector4(k1_, k2_, p1_, p2_); }
    │ │ │ +
    114
    │ │ │ +
    116 Vector9 vector() const;
    │ │ │ +
    117
    │ │ │ +
    125 Point2 uncalibrate(const Point2& p, OptionalJacobian<2, 9> Dcal = boost::none,
    │ │ │ +
    126 OptionalJacobian<2, 2> Dp = boost::none) const;
    │ │ │ +
    127
    │ │ │ +
    129 Point2 calibrate(const Point2& p, OptionalJacobian<2, 9> Dcal = boost::none,
    │ │ │ +
    130 OptionalJacobian<2, 2> Dp = boost::none) const;
    │ │ │ +
    131
    │ │ │ +
    133 Matrix2 D2d_intrinsic(const Point2& p) const;
    │ │ │ +
    134
    │ │ │ +
    136 Matrix29 D2d_calibration(const Point2& p) const;
    │ │ │ +
    137
    │ │ │ +
    139 size_t dim() const override { return Dim(); }
    │ │ │
    140
    │ │ │ -
    145 static Vector4 Logmap(const Similarity2& S, //
    │ │ │ -
    146 OptionalJacobian<4, 4> Hm = boost::none);
    │ │ │ +
    142 inline static size_t Dim() { return dimension; }
    │ │ │ +
    143
    │ │ │
    147
    │ │ │ -
    149 static Similarity2 Expmap(const Vector4& v, //
    │ │ │ -
    150 OptionalJacobian<4, 4> Hm = boost::none);
    │ │ │ -
    151
    │ │ │ -
    │ │ │ - │ │ │ -
    154 static Similarity2 Retract(const Vector4& v,
    │ │ │ -
    155 ChartJacobian H = boost::none) {
    │ │ │ -
    156 return Similarity2::Expmap(v, H);
    │ │ │ -
    157 }
    │ │ │ -
    158 static Vector4 Local(const Similarity2& other,
    │ │ │ -
    159 ChartJacobian H = boost::none) {
    │ │ │ -
    160 return Similarity2::Logmap(other, H);
    │ │ │ -
    161 }
    │ │ │ -
    162 };
    │ │ │ -
    │ │ │ -
    163
    │ │ │ -
    165 Matrix4 AdjointMap() const;
    │ │ │ -
    166
    │ │ │ -
    167 using LieGroup<Similarity2, 4>::inverse;
    │ │ │ -
    168
    │ │ │ -
    172
    │ │ │ -
    174 Matrix3 matrix() const;
    │ │ │ -
    175
    │ │ │ -
    177 Rot2 rotation() const { return R_; }
    │ │ │ -
    178
    │ │ │ -
    180 Point2 translation() const { return t_; }
    │ │ │ -
    181
    │ │ │ -
    183 double scale() const { return s_; }
    │ │ │ -
    184
    │ │ │ -
    186 inline static size_t Dim() { return 4; }
    │ │ │ -
    187
    │ │ │ -
    189 inline size_t dim() const { return 4; }
    │ │ │ -
    190
    │ │ │ -
    192};
    │ │ │ -
    │ │ │ -
    193
    │ │ │ -
    194template <>
    │ │ │ -
    195struct traits<Similarity2> : public internal::LieGroup<Similarity2> {};
    │ │ │ -
    196
    │ │ │ -
    197template <>
    │ │ │ -
    198struct traits<const Similarity2> : public internal::LieGroup<Similarity2> {};
    │ │ │ -
    199
    │ │ │ -
    200} // namespace gtsam
    │ │ │ -
    Base class and basic functions for Manifold types.
    │ │ │ -
    Base class and basic functions for Lie types.
    │ │ │ -
    2D rotation
    │ │ │ -
    2D Pose
    │ │ │ -
    2D Point
    │ │ │ +
    │ │ │ +
    149 virtual boost::shared_ptr<Cal3DS2_Base> clone() const {
    │ │ │ +
    150 return boost::shared_ptr<Cal3DS2_Base>(new Cal3DS2_Base(*this));
    │ │ │ +
    151 }
    │ │ │ +
    │ │ │ +
    152
    │ │ │ +
    154
    │ │ │ +
    155 private:
    │ │ │ +
    158
    │ │ │ +
    160 friend class boost::serialization::access;
    │ │ │ +
    161 template <class Archive>
    │ │ │ +
    162 void serialize(Archive& ar, const unsigned int /*version*/) {
    │ │ │ +
    163 ar& boost::serialization::make_nvp(
    │ │ │ +
    164 "Cal3DS2_Base", boost::serialization::base_object<Cal3>(*this));
    │ │ │ +
    165 ar& BOOST_SERIALIZATION_NVP(k1_);
    │ │ │ +
    166 ar& BOOST_SERIALIZATION_NVP(k2_);
    │ │ │ +
    167 ar& BOOST_SERIALIZATION_NVP(p1_);
    │ │ │ +
    168 ar& BOOST_SERIALIZATION_NVP(p2_);
    │ │ │ +
    169 ar& BOOST_SERIALIZATION_NVP(tol_);
    │ │ │ +
    170 }
    │ │ │ +
    171
    │ │ │ +
    173};
    │ │ │ +
    │ │ │ +
    174}
    │ │ │ +
    Common code for all Calibration models.
    │ │ │ +
    2D Point
    │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │
    void print(const Matrix &A, const string &s, ostream &stream)
    print without optional string, must specify cout yourself
    Definition Matrix.cpp:156
    │ │ │ -
    Point2 operator*(double s, const Point2 &p)
    multiply with scalar
    Definition Point2.h:47
    │ │ │
    Vector2 Point2
    As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point2 to Vector2...
    Definition Point2.h:27
    │ │ │ -
    bool operator==(const Matrix &A, const Matrix &B)
    equality is just equal_with_abs_tol 1e-9
    Definition Matrix.h:100
    │ │ │ -
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │ -
    A CRTP helper class that implements Lie group methods Prerequisites: methods operator*,...
    Definition Lie.h:37
    │ │ │ -
    Both LieGroupTraits and Testable.
    Definition Lie.h:229
    │ │ │
    OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
    Definition OptionalJacobian.h:41
    │ │ │ -
    Template to create a binary predicate.
    Definition Testable.h:111
    │ │ │ -
    A 2D pose (Point2,Rot2)
    Definition Pose2.h:36
    │ │ │ -
    Rotation matrix NOTE: the angle theta is in radians unless explicitly stated.
    Definition Rot2.h:36
    │ │ │ -
    2D similarity transform
    Definition Similarity2.h:35
    │ │ │ -
    Point2 translation() const
    Return a GTSAM translation.
    Definition Similarity2.h:180
    │ │ │ -
    double scale() const
    Return the scale.
    Definition Similarity2.h:183
    │ │ │ -
    static size_t Dim()
    Dimensionality of tangent space = 4 DOF - used to autodetect sizes.
    Definition Similarity2.h:186
    │ │ │ -
    Rot2 rotation() const
    Return a GTSAM rotation.
    Definition Similarity2.h:177
    │ │ │ -
    size_t dim() const
    Dimensionality of tangent space = 4 DOF.
    Definition Similarity2.h:189
    │ │ │ -
    Chart at the origin.
    Definition Similarity2.h:153
    │ │ │ +
    Common base class for all calibration models.
    Definition Cal3.h:69
    │ │ │ +
    Calibration of a camera with radial distortion.
    Definition Cal3DS2_Base.h:42
    │ │ │ +
    Cal3DS2_Base()=default
    Default Constructor with only unit focal length.
    │ │ │ +
    double p2() const
    Second tangential distortion coefficient.
    Definition Cal3DS2_Base.h:110
    │ │ │ +
    static size_t Dim()
    return DOF, dimensionality of tangent space
    Definition Cal3DS2_Base.h:142
    │ │ │ +
    virtual boost::shared_ptr< Cal3DS2_Base > clone() const
    Definition Cal3DS2_Base.h:149
    │ │ │ +
    double k2() const
    Second distortion coefficient.
    Definition Cal3DS2_Base.h:104
    │ │ │ +
    double k1() const
    First distortion coefficient.
    Definition Cal3DS2_Base.h:101
    │ │ │ +
    size_t dim() const override
    return DOF, dimensionality of tangent space
    Definition Cal3DS2_Base.h:139
    │ │ │ +
    double p1() const
    First tangential distortion coefficient.
    Definition Cal3DS2_Base.h:107
    │ │ │ +
    Vector4 k() const
    return distortion parameter vector
    Definition Cal3DS2_Base.h:113
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,212 +1,184 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Similarity2.h │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +Cal3DS2_Base.h │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -18#pragma once │ │ │ │ -19 │ │ │ │ -20#include <_g_t_s_a_m_/_b_a_s_e_/_L_i_e_._h> │ │ │ │ -21#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_n_i_f_o_l_d_._h> │ │ │ │ -22#include │ │ │ │ +20#pragma once │ │ │ │ +21 │ │ │ │ +22#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3_._h> │ │ │ │ 23#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_i_n_t_2_._h> │ │ │ │ -24#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_s_e_2_._h> │ │ │ │ -25#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_R_o_t_2_._h> │ │ │ │ -26 │ │ │ │ -27namespace _g_t_s_a_m { │ │ │ │ -28 │ │ │ │ -29// Forward declarations │ │ │ │ -30class Pose2; │ │ │ │ -31 │ │ │ │ -_3_5class GTSAM_EXPORT _S_i_m_i_l_a_r_i_t_y_2 : public _L_i_e_G_r_o_u_p { │ │ │ │ -38 typedef _R_o_t_2 _R_o_t_a_t_i_o_n; │ │ │ │ -39 typedef _P_o_i_n_t_2 Translation; │ │ │ │ -41 │ │ │ │ -42 private: │ │ │ │ -43 _R_o_t_2 R_; │ │ │ │ -44 _P_o_i_n_t_2 t_; │ │ │ │ -45 double s_; │ │ │ │ -46 │ │ │ │ -47 public: │ │ │ │ +24#include │ │ │ │ +25 │ │ │ │ +26namespace _g_t_s_a_m { │ │ │ │ +27 │ │ │ │ +_4_2class GTSAM_EXPORT _C_a_l_3_D_S_2___B_a_s_e : public _C_a_l_3 { │ │ │ │ +43 protected: │ │ │ │ +_4_4 double k1_ = 0.0f, k2_ = 0.0f; │ │ │ │ +_4_5 double p1_ = 0.0f, p2_ = 0.0f; │ │ │ │ +_4_6 double tol_ = 1e-5; │ │ │ │ +47 │ │ │ │ +48 public: │ │ │ │ +49 enum { dimension = 9 }; │ │ │ │ 50 │ │ │ │ -52 _S_i_m_i_l_a_r_i_t_y_2(); │ │ │ │ +52 using shared_ptr = boost::shared_ptr; │ │ │ │ 53 │ │ │ │ -55 _S_i_m_i_l_a_r_i_t_y_2(double s); │ │ │ │ 56 │ │ │ │ -58 _S_i_m_i_l_a_r_i_t_y_2(const _R_o_t_2& R, const _P_o_i_n_t_2& t, double s); │ │ │ │ +_5_8 _C_a_l_3_D_S_2___B_a_s_e() = default; │ │ │ │ 59 │ │ │ │ -61 _S_i_m_i_l_a_r_i_t_y_2(const Matrix2& R, const Vector2& t, double s); │ │ │ │ -62 │ │ │ │ -64 _S_i_m_i_l_a_r_i_t_y_2(const Matrix3& T); │ │ │ │ -65 │ │ │ │ -69 │ │ │ │ -71 bool _e_q_u_a_l_s(const _S_i_m_i_l_a_r_i_t_y_2& sim, double tol) const; │ │ │ │ -72 │ │ │ │ -74 bool _o_p_e_r_a_t_o_r_=_=(const _S_i_m_i_l_a_r_i_t_y_2& other) const; │ │ │ │ -75 │ │ │ │ -77 void _p_r_i_n_t(const std::string& s) const; │ │ │ │ -78 │ │ │ │ -79 friend std::ostream& operator<<(std::ostream& os, const _S_i_m_i_l_a_r_i_t_y_2& p); │ │ │ │ -80 │ │ │ │ -84 │ │ │ │ -86 static _S_i_m_i_l_a_r_i_t_y_2 Identity(); │ │ │ │ -87 │ │ │ │ -89 _S_i_m_i_l_a_r_i_t_y_2 _o_p_e_r_a_t_o_r_*(const _S_i_m_i_l_a_r_i_t_y_2& S) const; │ │ │ │ -90 │ │ │ │ -92 _S_i_m_i_l_a_r_i_t_y_2 inverse() const; │ │ │ │ -93 │ │ │ │ -97 │ │ │ │ -99 _P_o_i_n_t_2 transformFrom(const _P_o_i_n_t_2& p) const; │ │ │ │ -100 │ │ │ │ -112 _P_o_s_e_2 transformFrom(const _P_o_s_e_2& T) const; │ │ │ │ -113 │ │ │ │ -114 /* syntactic sugar for transformFrom */ │ │ │ │ -115 _P_o_i_n_t_2 _o_p_e_r_a_t_o_r_*(const _P_o_i_n_t_2& p) const; │ │ │ │ -116 │ │ │ │ -120 static _S_i_m_i_l_a_r_i_t_y_2 Align(const Point2Pairs& abPointPairs); │ │ │ │ -121 │ │ │ │ -135 static _S_i_m_i_l_a_r_i_t_y_2 Align(const Pose2Pairs& abPosePairs); │ │ │ │ -136 │ │ │ │ +60 _C_a_l_3_D_S_2___B_a_s_e(double fx, double fy, double s, double u0, double v0, double │ │ │ │ +k1, │ │ │ │ +61 double k2, double p1 = 0.0, double p2 = 0.0, double tol = 1e-5) │ │ │ │ +62 : _C_a_l_3(fx, fy, s, u0, v0), │ │ │ │ +63 k1_(k1), │ │ │ │ +64 k2_(k2), │ │ │ │ +65 p1_(p1), │ │ │ │ +66 p2_(p2), │ │ │ │ +67 tol_(tol) {} │ │ │ │ +68 │ │ │ │ +69 _~_C_a_l_3_D_S_2___B_a_s_e() override {} │ │ │ │ +70 │ │ │ │ +74 │ │ │ │ +75 Cal3DS2_Base(const Vector9& v) │ │ │ │ +76 : Cal3(v(0), v(1), v(2), v(3), v(4)), │ │ │ │ +77 k1_(v(5)), │ │ │ │ +78 k2_(v(6)), │ │ │ │ +79 p1_(v(7)), │ │ │ │ +80 p2_(v(8)) {} │ │ │ │ +81 │ │ │ │ +85 │ │ │ │ +87 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os, │ │ │ │ +88 const Cal3DS2_Base& cal); │ │ │ │ +89 │ │ │ │ +91 void _p_r_i_n_t(const std::string& s = "") const override; │ │ │ │ +92 │ │ │ │ +94 bool equals(const Cal3DS2_Base& K, double tol = 1e-8) const; │ │ │ │ +95 │ │ │ │ +99 │ │ │ │ +_1_0_1 inline double _k_1() const { return k1_; } │ │ │ │ +102 │ │ │ │ +_1_0_4 inline double _k_2() const { return k2_; } │ │ │ │ +105 │ │ │ │ +_1_0_7 inline double _p_1() const { return p1_; } │ │ │ │ +108 │ │ │ │ +_1_1_0 inline double _p_2() const { return p2_; } │ │ │ │ +111 │ │ │ │ +_1_1_3 Vector4 _k() const { return Vector4(k1_, k2_, p1_, p2_); } │ │ │ │ +114 │ │ │ │ +116 Vector9 vector() const; │ │ │ │ +117 │ │ │ │ +125 _P_o_i_n_t_2 uncalibrate(const _P_o_i_n_t_2& p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _9_> Dcal = boost:: │ │ │ │ +none, │ │ │ │ +126 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dp = boost::none) const; │ │ │ │ +127 │ │ │ │ +129 _P_o_i_n_t_2 calibrate(const _P_o_i_n_t_2& p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _9_> Dcal = boost:: │ │ │ │ +none, │ │ │ │ +130 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dp = boost::none) const; │ │ │ │ +131 │ │ │ │ +133 Matrix2 D2d_intrinsic(const _P_o_i_n_t_2& p) const; │ │ │ │ +134 │ │ │ │ +136 Matrix29 D2d_calibration(const _P_o_i_n_t_2& p) const; │ │ │ │ +137 │ │ │ │ +_1_3_9 size_t _d_i_m() const override { return Dim(); } │ │ │ │ 140 │ │ │ │ -145 static Vector4 Logmap(const _S_i_m_i_l_a_r_i_t_y_2& S, // │ │ │ │ -146 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_4_,_ _4_> Hm = boost::none); │ │ │ │ +_1_4_2 inline static size_t _D_i_m() { return dimension; } │ │ │ │ +143 │ │ │ │ 147 │ │ │ │ -149 static _S_i_m_i_l_a_r_i_t_y_2 Expmap(const Vector4& v, // │ │ │ │ -150 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_4_,_ _4_> Hm = boost::none); │ │ │ │ -151 │ │ │ │ -_1_5_3 struct _C_h_a_r_t_A_t_O_r_i_g_i_n { │ │ │ │ -154 static _S_i_m_i_l_a_r_i_t_y_2 Retract(const Vector4& v, │ │ │ │ -155 ChartJacobian H = boost::none) { │ │ │ │ -156 return Similarity2::Expmap(v, H); │ │ │ │ -157 } │ │ │ │ -158 static Vector4 Local(const _S_i_m_i_l_a_r_i_t_y_2& other, │ │ │ │ -159 ChartJacobian H = boost::none) { │ │ │ │ -160 return Similarity2::Logmap(other, H); │ │ │ │ -161 } │ │ │ │ -162 }; │ │ │ │ -163 │ │ │ │ -165 Matrix4 AdjointMap() const; │ │ │ │ -166 │ │ │ │ -167 using _L_i_e_G_r_o_u_p<_S_i_m_i_l_a_r_i_t_y_2, 4>::inverse; │ │ │ │ -168 │ │ │ │ -172 │ │ │ │ -174 Matrix3 matrix() const; │ │ │ │ -175 │ │ │ │ -_1_7_7 _R_o_t_2 _r_o_t_a_t_i_o_n() const { return R_; } │ │ │ │ -178 │ │ │ │ -_1_8_0 _P_o_i_n_t_2 _t_r_a_n_s_l_a_t_i_o_n() const { return t_; } │ │ │ │ -181 │ │ │ │ -_1_8_3 double _s_c_a_l_e() const { return s_; } │ │ │ │ -184 │ │ │ │ -_1_8_6 inline static size_t _D_i_m() { return 4; } │ │ │ │ -187 │ │ │ │ -_1_8_9 inline size_t _d_i_m() const { return 4; } │ │ │ │ -190 │ │ │ │ -192}; │ │ │ │ -193 │ │ │ │ -194template <> │ │ │ │ -_1_9_5struct _t_r_a_i_t_s<_S_i_m_i_l_a_r_i_t_y_2> : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p {}; │ │ │ │ -196 │ │ │ │ -197template <> │ │ │ │ -_1_9_8struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p │ │ │ │ -{}; │ │ │ │ -199 │ │ │ │ -200} // namespace gtsam │ │ │ │ -_M_a_n_i_f_o_l_d_._h │ │ │ │ -Base class and basic functions for Manifold types. │ │ │ │ -_L_i_e_._h │ │ │ │ -Base class and basic functions for Lie types. │ │ │ │ -_R_o_t_2_._h │ │ │ │ -2D rotation │ │ │ │ -_P_o_s_e_2_._h │ │ │ │ -2D Pose │ │ │ │ +_1_4_9 virtual boost::shared_ptr _c_l_o_n_e() const { │ │ │ │ +150 return boost::shared_ptr(new _C_a_l_3_D_S_2___B_a_s_e(*this)); │ │ │ │ +151 } │ │ │ │ +152 │ │ │ │ +154 │ │ │ │ +155 private: │ │ │ │ +158 │ │ │ │ +_1_6_0 friend class boost::serialization::access; │ │ │ │ +161 template │ │ │ │ +162 void serialize(Archive& ar, const unsigned int /*version*/) { │ │ │ │ +163 ar& boost::serialization::make_nvp( │ │ │ │ +164 "Cal3DS2_Base", boost::serialization::base_object(*this)); │ │ │ │ +165 ar& BOOST_SERIALIZATION_NVP(k1_); │ │ │ │ +166 ar& BOOST_SERIALIZATION_NVP(k2_); │ │ │ │ +167 ar& BOOST_SERIALIZATION_NVP(p1_); │ │ │ │ +168 ar& BOOST_SERIALIZATION_NVP(p2_); │ │ │ │ +169 ar& BOOST_SERIALIZATION_NVP(tol_); │ │ │ │ +170 } │ │ │ │ +171 │ │ │ │ +173}; │ │ │ │ +174} │ │ │ │ +_C_a_l_3_._h │ │ │ │ +Common code for all Calibration models. │ │ │ │ _P_o_i_n_t_2_._h │ │ │ │ 2D Point │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ _g_t_s_a_m_:_:_p_r_i_n_t │ │ │ │ void print(const Matrix &A, const string &s, ostream &stream) │ │ │ │ print without optional string, must specify cout yourself │ │ │ │ DDeeffiinniittiioonn Matrix.cpp:156 │ │ │ │ -_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -Point2 operator*(double s, const Point2 &p) │ │ │ │ -multiply with scalar │ │ │ │ -DDeeffiinniittiioonn Point2.h:47 │ │ │ │ _g_t_s_a_m_:_:_P_o_i_n_t_2 │ │ │ │ Vector2 Point2 │ │ │ │ As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just │ │ │ │ typedef Point2 to Vector2... │ │ │ │ DDeeffiinniittiioonn Point2.h:27 │ │ │ │ -_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ -bool operator==(const Matrix &A, const Matrix &B) │ │ │ │ -equality is just equal_with_abs_tol 1e-9 │ │ │ │ -DDeeffiinniittiioonn Matrix.h:100 │ │ │ │ -_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ -A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ -that can be centered ... │ │ │ │ -DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p │ │ │ │ -A CRTP helper class that implements Lie group methods Prerequisites: methods │ │ │ │ -operator*,... │ │ │ │ -DDeeffiinniittiioonn Lie.h:37 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p │ │ │ │ -Both LieGroupTraits and Testable. │ │ │ │ -DDeeffiinniittiioonn Lie.h:229 │ │ │ │ _g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ either a fixed size o... │ │ │ │ DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ -_g_t_s_a_m_:_:_e_q_u_a_l_s │ │ │ │ -Template to create a binary predicate. │ │ │ │ -DDeeffiinniittiioonn Testable.h:111 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2 │ │ │ │ -A 2D pose (Point2,Rot2) │ │ │ │ -DDeeffiinniittiioonn Pose2.h:36 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_2 │ │ │ │ -Rotation matrix NOTE: the angle theta is in radians unless explicitly stated. │ │ │ │ -DDeeffiinniittiioonn Rot2.h:36 │ │ │ │ -_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_2 │ │ │ │ -2D similarity transform │ │ │ │ -DDeeffiinniittiioonn Similarity2.h:35 │ │ │ │ -_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_2_:_:_t_r_a_n_s_l_a_t_i_o_n │ │ │ │ -Point2 translation() const │ │ │ │ -Return a GTSAM translation. │ │ │ │ -DDeeffiinniittiioonn Similarity2.h:180 │ │ │ │ -_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_2_:_:_s_c_a_l_e │ │ │ │ -double scale() const │ │ │ │ -Return the scale. │ │ │ │ -DDeeffiinniittiioonn Similarity2.h:183 │ │ │ │ -_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_2_:_:_D_i_m │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3 │ │ │ │ +Common base class for all calibration models. │ │ │ │ +DDeeffiinniittiioonn Cal3.h:69 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_D_S_2___B_a_s_e │ │ │ │ +Calibration of a camera with radial distortion. │ │ │ │ +DDeeffiinniittiioonn Cal3DS2_Base.h:42 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_D_S_2___B_a_s_e_:_:_C_a_l_3_D_S_2___B_a_s_e │ │ │ │ +Cal3DS2_Base()=default │ │ │ │ +Default Constructor with only unit focal length. │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_D_S_2___B_a_s_e_:_:_p_2 │ │ │ │ +double p2() const │ │ │ │ +Second tangential distortion coefficient. │ │ │ │ +DDeeffiinniittiioonn Cal3DS2_Base.h:110 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_D_S_2___B_a_s_e_:_:_D_i_m │ │ │ │ static size_t Dim() │ │ │ │ -Dimensionality of tangent space = 4 DOF - used to autodetect sizes. │ │ │ │ -DDeeffiinniittiioonn Similarity2.h:186 │ │ │ │ -_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_2_:_:_r_o_t_a_t_i_o_n │ │ │ │ -Rot2 rotation() const │ │ │ │ -Return a GTSAM rotation. │ │ │ │ -DDeeffiinniittiioonn Similarity2.h:177 │ │ │ │ -_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_2_:_:_d_i_m │ │ │ │ -size_t dim() const │ │ │ │ -Dimensionality of tangent space = 4 DOF. │ │ │ │ -DDeeffiinniittiioonn Similarity2.h:189 │ │ │ │ -_g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_2_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ -Chart at the origin. │ │ │ │ -DDeeffiinniittiioonn Similarity2.h:153 │ │ │ │ +return DOF, dimensionality of tangent space │ │ │ │ +DDeeffiinniittiioonn Cal3DS2_Base.h:142 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_D_S_2___B_a_s_e_:_:_c_l_o_n_e │ │ │ │ +virtual boost::shared_ptr< Cal3DS2_Base > clone() const │ │ │ │ +DDeeffiinniittiioonn Cal3DS2_Base.h:149 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_D_S_2___B_a_s_e_:_:_k_2 │ │ │ │ +double k2() const │ │ │ │ +Second distortion coefficient. │ │ │ │ +DDeeffiinniittiioonn Cal3DS2_Base.h:104 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_D_S_2___B_a_s_e_:_:_k_1 │ │ │ │ +double k1() const │ │ │ │ +First distortion coefficient. │ │ │ │ +DDeeffiinniittiioonn Cal3DS2_Base.h:101 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_D_S_2___B_a_s_e_:_:_d_i_m │ │ │ │ +size_t dim() const override │ │ │ │ +return DOF, dimensionality of tangent space │ │ │ │ +DDeeffiinniittiioonn Cal3DS2_Base.h:139 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_D_S_2___B_a_s_e_:_:_p_1 │ │ │ │ +double p1() const │ │ │ │ +First tangential distortion coefficient. │ │ │ │ +DDeeffiinniittiioonn Cal3DS2_Base.h:107 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_D_S_2___B_a_s_e_:_:_k │ │ │ │ +Vector4 k() const │ │ │ │ +return distortion parameter vector │ │ │ │ +DDeeffiinniittiioonn Cal3DS2_Base.h:113 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_i_m_i_l_a_r_i_t_y_2_._h │ │ │ │ + * CCaall33DDSS22__BBaassee..hh │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00320.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Similarity2.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/PinholeCamera.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,42 +94,51 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Namespaces | │ │ │ -Functions
    │ │ │ -
    Similarity2.cpp File Reference
    │ │ │ +Classes | │ │ │ +Namespaces
    │ │ │ +
    PinholeCamera.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    Implementation of Similarity2 transform. │ │ │ +

    Base class for all pinhole cameras. │ │ │ More...

    │ │ │ + │ │ │ +

    Go to the source code of this file.

    │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Classes

    class  gtsam::PinholeCamera< Calibration >
     A pinhole camera class that has a Pose3 and a Calibration. More...
     
    struct  gtsam::traits< PinholeCamera< Calibration > >
     
    struct  gtsam::traits< const PinholeCamera< Calibration > >
     
    struct  gtsam::Range< PinholeCamera< Calibration >, T >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │

    │ │ │ -Functions

    │ │ │ -std::ostream & gtsam::operator<< (std::ostream &os, const Similarity2 &p)
     
    │ │ │

    Detailed Description

    │ │ │ -

    Implementation of Similarity2 transform.

    │ │ │ -
    Author
    John Lambert, Varun Agrawal
    │ │ │ +

    Base class for all pinhole cameras.

    │ │ │ +
    Author
    Yong-Dian Jian
    │ │ │ +
    Date
    Jan 27, 2012
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,33 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Similarity2.cpp File Reference │ │ │ │ -Implementation of Similarity2 transform. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +PinholeCamera.h File Reference │ │ │ │ +Base class for all pinhole cameras. _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ + class   _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_<_ _C_a_l_i_b_r_a_t_i_o_n_ _> │ │ │ │ +  A pinhole camera class that has a _P_o_s_e_3 and a Calibration. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _P_i_n_h_o_l_e_C_a_m_e_r_a_<_ _C_a_l_i_b_r_a_t_i_o_n_ _>_ _> │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _P_i_n_h_o_l_e_C_a_m_e_r_a_<_ _C_a_l_i_b_r_a_t_i_o_n_ _>_ _> │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_R_a_n_g_e_<_ _P_i_n_h_o_l_e_C_a_m_e_r_a_<_ _C_a_l_i_b_r_a_t_i_o_n_ _>_,_ _T_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _S_i_m_i_l_a_r_i_t_y_2 &p) │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Implementation of Similarity2 transform. │ │ │ │ +Base class for all pinhole cameras. │ │ │ │ Author │ │ │ │ - John Lambert, Varun Agrawal │ │ │ │ + Yong-Dian Jian │ │ │ │ + Date │ │ │ │ + Jan 27, 2012 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_i_m_i_l_a_r_i_t_y_2_._c_p_p │ │ │ │ + * _P_i_n_h_o_l_e_C_a_m_e_r_a_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00323.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SOn.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SO3.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,73 +98,113 @@ │ │ │ │ │ │
    │ │ │
    │ │ │ Classes | │ │ │ Namespaces | │ │ │ Typedefs | │ │ │ Functions
    │ │ │ -
    SOn.h File Reference
    │ │ │ +
    SO3.h File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    N*N matrix representation of SO(N). │ │ │ +

    3*3 matrix representation of SO(3) │ │ │ More...

    │ │ │ │ │ │

    Go to the source code of this file.

    │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │

    │ │ │ Classes

    class  gtsam::SO< N >
     Manifold of special orthogonal rotation matrices SO<N>. More...
    class  gtsam::so3::ExpmapFunctor
     Functor implementing Exponential map. More...
     
    struct  gtsam::SO< N >::ChartAtOrigin
    class  gtsam::so3::DexpFunctor
     Functor that implements Exponential map and its derivatives. More...
     
    struct  gtsam::traits< SO< N > >
    struct  gtsam::traits< SO3 >
     
    struct  gtsam::traits< const SO< N > >
    struct  gtsam::traits< const SO3 >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │

    │ │ │ Typedefs

    │ │ │ -using gtsam::SOn = SO< Eigen::Dynamic >
     
    │ │ │ -using gtsam::DynamicJacobian = OptionalJacobian< Eigen::Dynamic, Eigen::Dynamic >
     
    │ │ │ +using gtsam::SO3 = SO< 3 >
     
    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ Functions

    │ │ │ -constexpr int gtsam::internal::DimensionSO (int N)
     Calculate dimensionality of SO<N> manifold, or return Dynamic if so.
     
    │ │ │ -constexpr int gtsam::internal::NSquaredSO (int N)
     
    │ │ │ +
    │ │ │ template<class Archive >
    void gtsam::serialize (Archive &ar, SOn &Q, const unsigned int file_version)
     Serialization function.
     
    void gtsam::serialize (Archive &ar, SO3 &R, const unsigned int)
     Serialization function.
     
    GTSAM_EXPORT Matrix3 gtsam::so3::compose (const Matrix3 &M, const SO3 &R, OptionalJacobian< 9, 9 > H=boost::none)
     Compose general matrix with an SO(3) element.
     
    │ │ │ +GTSAM_EXPORT Matrix99 gtsam::so3::Dcompose (const SO3 &R)
     (constant) Jacobian of compose wrpt M
     
    │ │ │

    Detailed Description

    │ │ │ -

    N*N matrix representation of SO(N).

    │ │ │ -

    N can be Eigen::Dynamic

    Author
    Frank Dellaert
    │ │ │ -
    Date
    March 2019
    │ │ │ -
    │ │ │ +

    3*3 matrix representation of SO(3)

    │ │ │ +
    Author
    Frank Dellaert
    │ │ │ +
    │ │ │ +Luca Carlone
    │ │ │ +
    │ │ │ +Duy Nguyen Ta
    │ │ │ +
    Date
    December 2014
    │ │ │ +

    Function Documentation

    │ │ │ + │ │ │ +

    ◆ compose()

    │ │ │ + │ │ │ +
    │ │ │ +
    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
    GTSAM_EXPORT Matrix3 gtsam::so3::compose (const Matrix3 & M,
    const SO3R,
    OptionalJacobian< 9, 9 > H = boost::none 
    )
    │ │ │ +
    │ │ │ + │ │ │ +

    Compose general matrix with an SO(3) element.

    │ │ │ +

    We only provide the 9*9 derivative in the first argument M.

    │ │ │ + │ │ │ +
    │ │ │ +
    │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,52 +1,61 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -SOn.h File Reference │ │ │ │ -N*N matrix representation of SO(N). _M_o_r_e_._._. │ │ │ │ +SO3.h File Reference │ │ │ │ +3*3 matrix representation of SO(3) _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_S_O_<_ _N_ _> │ │ │ │ -  Manifold of special orthogonal rotation matrices SO. _M_o_r_e_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_s_o_3_:_:_E_x_p_m_a_p_F_u_n_c_t_o_r │ │ │ │ +  Functor implementing Exponential map. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_S_O_<_ _N_ _>_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ + class   _g_t_s_a_m_:_:_s_o_3_:_:_D_e_x_p_F_u_n_c_t_o_r │ │ │ │ +  Functor that implements Exponential map aanndd its derivatives. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _S_O_<_ _N_ _>_ _> │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _S_O_3_ _> │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _S_O_<_ _N_ _>_ _> │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _S_O_3_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ TTyyppeeddeeffss │ │ │ │ -using  ggttssaamm::::SSOOnn = _S_O< Eigen::Dynamic > │ │ │ │ -  │ │ │ │ -using  ggttssaamm::::DDyynnaammiiccJJaaccoobbiiaann = _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< Eigen::Dynamic, Eigen:: │ │ │ │ - Dynamic > │ │ │ │ +using  ggttssaamm::::SSOO33 = _S_O< 3 > │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -constexpr int  ggttssaamm::::iinntteerrnnaall::::DDiimmeennssiioonnSSOO (int N) │ │ │ │ -  Calculate dimensionality of SO manifold, or return Dynamic if │ │ │ │ - so. │ │ │ │ -  │ │ │ │ -constexpr int  ggttssaamm::::iinntteerrnnaall::::NNSSqquuaarreeddSSOO (int N) │ │ │ │ -  │ │ │ │ template │ │ │ │ - void  ggttssaamm::::sseerriiaalliizzee (Archive &ar, _S_O_n &Q, const unsigned int │ │ │ │ - file_version) │ │ │ │ -  Serialization function. │ │ │ │ + void  ggttssaamm::::sseerriiaalliizzee (Archive &ar, _S_O_3 &R, const unsigned │ │ │ │ + int) │ │ │ │ +  Serialization function. │ │ │ │ +  │ │ │ │ + GTSAM_EXPORT Matrix3  _g_t_s_a_m_:_:_s_o_3_:_:_c_o_m_p_o_s_e (const Matrix3 &M, const _S_O_3 &R, │ │ │ │ + _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 9, 9 > H=boost::none) │ │ │ │ +  Compose general matrix with an SO(3) element. │ │ │ │ +  │ │ │ │ +GTSAM_EXPORT Matrix99  ggttssaamm::::ssoo33::::DDccoommppoossee (const _S_O_3 &R) │ │ │ │ +  (constant) Jacobian of compose wrpt M │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -N*N matrix representation of SO(N). │ │ │ │ -N can be Eigen::Dynamic │ │ │ │ +3*3 matrix representation of SO(3) │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ + Luca Carlone │ │ │ │ + Duy Nguyen Ta │ │ │ │ Date │ │ │ │ - March 2019 │ │ │ │ + December 2014 │ │ │ │ +********** FFuunnccttiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? ccoommppoossee(()) ********** │ │ │ │ +GTSAM_EXPORT Matrix3 gtsam::so3:: ( const Matrix3 &  MM, │ │ │ │ +compose │ │ │ │ + const _S_O_3 &  RR, │ │ │ │ + _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 9, 9 >  HH = boost::none  │ │ │ │ + ) │ │ │ │ +Compose general matrix with an SO(3) element. │ │ │ │ +We only provide the 9*9 derivative in the first argument M. │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_O_n_._h │ │ │ │ + * _S_O_3_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00323.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,8 +1,9 @@ │ │ │ │ var a00323 = [ │ │ │ │ - ["gtsam::SO< N >", "a03304.html", "a03304"], │ │ │ │ - ["gtsam::SO< N >::ChartAtOrigin", "a03308.html", null], │ │ │ │ - ["gtsam::traits< SO< N > >", "a03312.html", null], │ │ │ │ - ["gtsam::traits< const SO< N > >", "a03316.html", null], │ │ │ │ - ["DimensionSO", "a00323.html#afdaebcf25a03a9a9986d35d2831605dd", null], │ │ │ │ - ["serialize", "a00323.html#ac1829b506847127f406c0d6182fc0cdd", null] │ │ │ │ + ["gtsam::so3::ExpmapFunctor", "a03280.html", "a03280"], │ │ │ │ + ["gtsam::so3::DexpFunctor", "a03284.html", "a03284"], │ │ │ │ + ["gtsam::traits< SO3 >", "a03288.html", null], │ │ │ │ + ["gtsam::traits< const SO3 >", "a03292.html", null], │ │ │ │ + ["compose", "a00323.html#a72fc8b10f24d82aa8a4c99f99403fe5e", null], │ │ │ │ + ["Dcompose", "a00323.html#a7c7e26b6d07ec0f16363c196247b294d", null], │ │ │ │ + ["serialize", "a00323.html#a2e0b14126ed42ee95ca5f5f092c5bc84", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00323_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SOn.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SO3.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,400 +98,211 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    SOn.h
    │ │ │ +
    SO3.h
    │ │ │
    │ │ │
    │ │ │ Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │ -
    3 * GTSAM Copyright 2010-2019, Georgia Tech Research Corporation,
    │ │ │ +
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │
    4 * Atlanta, Georgia 30332-0415
    │ │ │
    5 * All Rights Reserved
    │ │ │
    6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
    │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │ -
    19#pragma once
    │ │ │ -
    20
    │ │ │ -
    21#include <gtsam/base/Lie.h>
    │ │ │ -
    22#include <gtsam/base/Manifold.h>
    │ │ │ - │ │ │ -
    24#include <gtsam/dllexport.h>
    │ │ │ -
    25#include <Eigen/Core>
    │ │ │ -
    26
    │ │ │ -
    27#include <boost/serialization/nvp.hpp>
    │ │ │ +
    21#pragma once
    │ │ │ +
    22
    │ │ │ +
    23#include <gtsam/geometry/SOn.h>
    │ │ │ +
    24
    │ │ │ +
    25#include <gtsam/base/Lie.h>
    │ │ │ +
    26#include <gtsam/base/Matrix.h>
    │ │ │ +
    27#include <gtsam/dllexport.h>
    │ │ │
    28
    │ │ │ -
    29#include <iostream> // TODO(frank): how to avoid?
    │ │ │ -
    30#include <string>
    │ │ │ -
    31#include <type_traits>
    │ │ │ -
    32#include <vector>
    │ │ │ -
    33#include <random>
    │ │ │ -
    34
    │ │ │ -
    35namespace gtsam {
    │ │ │ -
    36
    │ │ │ -
    37namespace internal {
    │ │ │ -
    │ │ │ -
    39constexpr int DimensionSO(int N) {
    │ │ │ -
    40 return (N < 0) ? Eigen::Dynamic : N * (N - 1) / 2;
    │ │ │ -
    41}
    │ │ │ -
    │ │ │ +
    29#include <cmath>
    │ │ │ +
    30#include <vector>
    │ │ │ +
    31
    │ │ │ +
    32namespace gtsam {
    │ │ │ +
    33
    │ │ │ +
    34using SO3 = SO<3>;
    │ │ │ +
    35
    │ │ │ +
    36// Below are all declarations of SO<3> specializations.
    │ │ │ +
    37// They are *defined* in SO3.cpp.
    │ │ │ +
    38
    │ │ │ +
    39template <>
    │ │ │ +
    40GTSAM_EXPORT
    │ │ │ +
    41SO3 SO3::AxisAngle(const Vector3& axis, double theta);
    │ │ │
    42
    │ │ │ -
    43// Calculate N^2 at compile time, or return Dynamic if so
    │ │ │ -
    44constexpr int NSquaredSO(int N) { return (N < 0) ? Eigen::Dynamic : N * N; }
    │ │ │ -
    45} // namespace internal
    │ │ │ +
    43template <>
    │ │ │ +
    44GTSAM_EXPORT
    │ │ │ +
    45SO3 SO3::ClosestTo(const Matrix3& M);
    │ │ │
    46
    │ │ │ -
    51template <int N>
    │ │ │ -
    │ │ │ -
    52class SO : public LieGroup<SO<N>, internal::DimensionSO(N)> {
    │ │ │ -
    53 public:
    │ │ │ -
    54 enum { dimension = internal::DimensionSO(N) };
    │ │ │ -
    55 using MatrixNN = Eigen::Matrix<double, N, N>;
    │ │ │ -
    56 using VectorN2 = Eigen::Matrix<double, internal::NSquaredSO(N), 1>;
    │ │ │ -
    57 using MatrixDD = Eigen::Matrix<double, dimension, dimension>;
    │ │ │ +
    47template <>
    │ │ │ +
    48GTSAM_EXPORT
    │ │ │ +
    49SO3 SO3::ChordalMean(const std::vector<SO3>& rotations);
    │ │ │ +
    50
    │ │ │ +
    51template <>
    │ │ │ +
    52GTSAM_EXPORT
    │ │ │ +
    53Matrix3 SO3::Hat(const Vector3& xi);
    │ │ │ +
    54
    │ │ │ +
    55template <>
    │ │ │ +
    56GTSAM_EXPORT
    │ │ │ +
    57Vector3 SO3::Vee(const Matrix3& X);
    │ │ │
    58
    │ │ │ - │ │ │ -
    60
    │ │ │ -
    61 protected:
    │ │ │ -
    62 MatrixNN matrix_;
    │ │ │ -
    63
    │ │ │ -
    64 // enable_if_t aliases, used to specialize constructors/methods, see
    │ │ │ -
    65 // https://www.fluentcpp.com/2018/05/18/make-sfinae-pretty-2-hidden-beauty-sfinae/
    │ │ │ -
    66 template <int N_>
    │ │ │ -
    67 using IsDynamic = typename std::enable_if<N_ == Eigen::Dynamic, void>::type;
    │ │ │ -
    68 template <int N_>
    │ │ │ -
    69 using IsFixed = typename std::enable_if<N_ >= 2, void>::type;
    │ │ │ -
    70 template <int N_>
    │ │ │ -
    71 using IsSO3 = typename std::enable_if<N_ == 3, void>::type;
    │ │ │ -
    72
    │ │ │ -
    73 public:
    │ │ │ -
    76
    │ │ │ -
    78 template <int N_ = N, typename = IsFixed<N_>>
    │ │ │ -
    79 SO() : matrix_(MatrixNN::Identity()) {}
    │ │ │ -
    80
    │ │ │ -
    82 template <int N_ = N, typename = IsDynamic<N_>>
    │ │ │ -
    │ │ │ -
    83 explicit SO(size_t n = 0) {
    │ │ │ -
    84 // We allow for n=0 as the default constructor, needed for serialization,
    │ │ │ -
    85 // wrappers etc.
    │ │ │ -
    86 matrix_ = Eigen::MatrixXd::Identity(n, n);
    │ │ │ -
    87 }
    │ │ │ -
    │ │ │ +
    60template <>
    │ │ │ +
    61Matrix3 SO3::AdjointMap() const;
    │ │ │ +
    62
    │ │ │ +
    67template <>
    │ │ │ +
    68GTSAM_EXPORT
    │ │ │ +
    69SO3 SO3::Expmap(const Vector3& omega, ChartJacobian H);
    │ │ │ +
    70
    │ │ │ +
    72template <>
    │ │ │ +
    73GTSAM_EXPORT
    │ │ │ +
    74Matrix3 SO3::ExpmapDerivative(const Vector3& omega);
    │ │ │ +
    75
    │ │ │ +
    80template <>
    │ │ │ +
    81GTSAM_EXPORT
    │ │ │ +
    82Vector3 SO3::Logmap(const SO3& R, ChartJacobian H);
    │ │ │ +
    83
    │ │ │ +
    85template <>
    │ │ │ +
    86GTSAM_EXPORT
    │ │ │ +
    87Matrix3 SO3::LogmapDerivative(const Vector3& omega);
    │ │ │
    88
    │ │ │ -
    90 template <typename Derived>
    │ │ │ -
    91 explicit SO(const Eigen::MatrixBase<Derived>& R) : matrix_(R.eval()) {}
    │ │ │ -
    92
    │ │ │ -
    94 template <typename Derived>
    │ │ │ -
    │ │ │ -
    95 static SO FromMatrix(const Eigen::MatrixBase<Derived>& R) {
    │ │ │ -
    96 return SO(R);
    │ │ │ -
    97 }
    │ │ │ -
    │ │ │ -
    98
    │ │ │ -
    100 template <typename Derived, int N_ = N, typename = IsDynamic<N_>>
    │ │ │ -
    │ │ │ -
    101 static SO Lift(size_t n, const Eigen::MatrixBase<Derived> &R) {
    │ │ │ -
    102 Matrix Q = Matrix::Identity(n, n);
    │ │ │ -
    103 const int p = R.rows();
    │ │ │ -
    104 assert(p >= 0 && p <= static_cast<int>(n) && R.cols() == p);
    │ │ │ -
    105 Q.topLeftCorner(p, p) = R;
    │ │ │ -
    106 return SO(Q);
    │ │ │ -
    107 }
    │ │ │ -
    │ │ │ -
    108
    │ │ │ -
    110 template <int M, int N_ = N, typename = IsDynamic<N_>>
    │ │ │ -
    111 explicit SO(const SO<M>& R) : matrix_(R.matrix()) {}
    │ │ │ -
    112
    │ │ │ -
    114 template <int N_ = N, typename = IsSO3<N_>>
    │ │ │ -
    115 explicit SO(const Eigen::AngleAxisd& angleAxis) : matrix_(angleAxis) {}
    │ │ │ +
    89// Chart at origin for SO3 is *not* Cayley but actual Expmap/Logmap
    │ │ │ +
    90template <>
    │ │ │ +
    91GTSAM_EXPORT
    │ │ │ +
    92SO3 SO3::ChartAtOrigin::Retract(const Vector3& omega, ChartJacobian H);
    │ │ │ +
    93
    │ │ │ +
    94template <>
    │ │ │ +
    95GTSAM_EXPORT
    │ │ │ +
    96Vector3 SO3::ChartAtOrigin::Local(const SO3& R, ChartJacobian H);
    │ │ │ +
    97
    │ │ │ +
    98template <>
    │ │ │ +
    99GTSAM_EXPORT
    │ │ │ +
    100Vector9 SO3::vec(OptionalJacobian<9, 3> H) const;
    │ │ │ +
    101
    │ │ │ +
    103template <class Archive>
    │ │ │ +
    │ │ │ +
    104void serialize(Archive& ar, SO3& R, const unsigned int /*version*/) {
    │ │ │ +
    105 Matrix3& M = R.matrix_;
    │ │ │ +
    106 ar& boost::serialization::make_nvp("R11", M(0, 0));
    │ │ │ +
    107 ar& boost::serialization::make_nvp("R12", M(0, 1));
    │ │ │ +
    108 ar& boost::serialization::make_nvp("R13", M(0, 2));
    │ │ │ +
    109 ar& boost::serialization::make_nvp("R21", M(1, 0));
    │ │ │ +
    110 ar& boost::serialization::make_nvp("R22", M(1, 1));
    │ │ │ +
    111 ar& boost::serialization::make_nvp("R23", M(1, 2));
    │ │ │ +
    112 ar& boost::serialization::make_nvp("R31", M(2, 0));
    │ │ │ +
    113 ar& boost::serialization::make_nvp("R32", M(2, 1));
    │ │ │ +
    114 ar& boost::serialization::make_nvp("R33", M(2, 2));
    │ │ │ +
    115}
    │ │ │ +
    │ │ │
    116
    │ │ │ -
    118 static SO AxisAngle(const Vector3& axis, double theta);
    │ │ │ -
    119
    │ │ │ -
    122 static SO ClosestTo(const MatrixNN& M);
    │ │ │ -
    123
    │ │ │ -
    127 static SO ChordalMean(const std::vector<SO>& rotations);
    │ │ │ +
    117namespace so3 {
    │ │ │ +
    118
    │ │ │ +
    123GTSAM_EXPORT Matrix3 compose(const Matrix3& M, const SO3& R,
    │ │ │ +
    124 OptionalJacobian<9, 9> H = boost::none);
    │ │ │ +
    125
    │ │ │ +
    127GTSAM_EXPORT Matrix99 Dcompose(const SO3& R);
    │ │ │
    128
    │ │ │ -
    130 template <int N_ = N, typename = IsDynamic<N_>>
    │ │ │ -
    │ │ │ -
    131 static SO Random(std::mt19937& rng, size_t n = 0) {
    │ │ │ -
    132 if (n == 0) throw std::runtime_error("SO: Dimensionality not known.");
    │ │ │ -
    133 // TODO(frank): this might need to be re-thought
    │ │ │ -
    134 static std::uniform_real_distribution<double> randomAngle(-M_PI, M_PI);
    │ │ │ -
    135 const size_t d = SO::Dimension(n);
    │ │ │ -
    136 Vector xi(d);
    │ │ │ -
    137 for (size_t j = 0; j < d; j++) {
    │ │ │ -
    138 xi(j) = randomAngle(rng);
    │ │ │ -
    139 }
    │ │ │ -
    140 return SO::Retract(xi);
    │ │ │ -
    141 }
    │ │ │ -
    │ │ │ +
    129// Below are two functors that allow for saving computation when exponential map
    │ │ │ +
    130// and its derivatives are needed at the same location in so<3>. The second
    │ │ │ +
    131// functor also implements dedicated methods to apply dexp and/or inv(dexp).
    │ │ │ +
    132
    │ │ │ +
    │ │ │ +
    134class GTSAM_EXPORT ExpmapFunctor {
    │ │ │ +
    135 protected:
    │ │ │ +
    136 const double theta2;
    │ │ │ +
    137 Matrix3 W, K, KK;
    │ │ │ +
    138 bool nearZero;
    │ │ │ +
    139 double theta, sin_theta, one_minus_cos; // only defined if !nearZero
    │ │ │ +
    140
    │ │ │ +
    141 void init(bool nearZeroApprox = false);
    │ │ │
    142
    │ │ │ -
    144 template <int N_ = N, typename = IsFixed<N_>>
    │ │ │ -
    │ │ │ -
    145 static SO Random(std::mt19937& rng) {
    │ │ │ -
    146 // By default, use dynamic implementation above. Specialized for SO(3).
    │ │ │ -
    147 return SO(SO<Eigen::Dynamic>::Random(rng, N).matrix());
    │ │ │ -
    148 }
    │ │ │ -
    │ │ │ +
    143 public:
    │ │ │ +
    145 explicit ExpmapFunctor(const Vector3& omega, bool nearZeroApprox = false);
    │ │ │ +
    146
    │ │ │ +
    148 ExpmapFunctor(const Vector3& axis, double angle, bool nearZeroApprox = false);
    │ │ │
    149
    │ │ │ +
    151 SO3 expmap() const;
    │ │ │ +
    152};
    │ │ │ +
    │ │ │
    153
    │ │ │ -
    155 const MatrixNN& matrix() const { return matrix_; }
    │ │ │ -
    156
    │ │ │ -
    157 size_t rows() const { return matrix_.rows(); }
    │ │ │ -
    158 size_t cols() const { return matrix_.cols(); }
    │ │ │ +
    │ │ │ + │ │ │ +
    156 const Vector3 omega;
    │ │ │ +
    157 double a, b;
    │ │ │ +
    158 Matrix3 dexp_;
    │ │ │
    159
    │ │ │ +
    160 public:
    │ │ │ +
    162 GTSAM_EXPORT explicit DexpFunctor(const Vector3& omega, bool nearZeroApprox = false);
    │ │ │
    163
    │ │ │ -
    164 void print(const std::string& s = std::string()) const;
    │ │ │ -
    165
    │ │ │ -
    166 bool equals(const SO& other, double tol) const {
    │ │ │ -
    167 return equal_with_abs_tol(matrix_, other.matrix_, tol);
    │ │ │ -
    168 }
    │ │ │ -
    169
    │ │ │ -
    173
    │ │ │ -
    │ │ │ -
    175 SO operator*(const SO& other) const {
    │ │ │ -
    176 assert(dim() == other.dim());
    │ │ │ -
    177 return SO(matrix_ * other.matrix_);
    │ │ │ -
    178 }
    │ │ │ -
    │ │ │ -
    179
    │ │ │ -
    181 template <int N_ = N, typename = IsFixed<N_>>
    │ │ │ -
    │ │ │ -
    182 static SO Identity() {
    │ │ │ -
    183 return SO();
    │ │ │ -
    184 }
    │ │ │ -
    │ │ │ -
    185
    │ │ │ -
    187 template <int N_ = N, typename = IsDynamic<N_>>
    │ │ │ -
    │ │ │ -
    188 static SO Identity(size_t n = 0) {
    │ │ │ -
    189 return SO(n);
    │ │ │ -
    190 }
    │ │ │ -
    │ │ │ -
    191
    │ │ │ -
    193 SO inverse() const { return SO(matrix_.transpose()); }
    │ │ │ -
    194
    │ │ │ -
    198
    │ │ │ -
    199 using TangentVector = Eigen::Matrix<double, dimension, 1>;
    │ │ │ -
    200 using ChartJacobian = OptionalJacobian<dimension, dimension>;
    │ │ │ -
    201
    │ │ │ -
    203 static int Dim() { return dimension; }
    │ │ │ -
    204
    │ │ │ -
    205 // Calculate manifold dimensionality for SO(n).
    │ │ │ -
    206 // Available as dimension or Dim() for fixed N.
    │ │ │ -
    207 static size_t Dimension(size_t n) { return n * (n - 1) / 2; }
    │ │ │ -
    208
    │ │ │ -
    209 // Calculate ambient dimension n from manifold dimensionality d.
    │ │ │ -
    210 static size_t AmbientDim(size_t d) { return (1 + std::sqrt(1 + 8 * d)) / 2; }
    │ │ │ -
    211
    │ │ │ -
    212 // Calculate run-time dimensionality of manifold.
    │ │ │ -
    213 // Available as dimension or Dim() for fixed N.
    │ │ │ -
    214 size_t dim() const { return Dimension(static_cast<size_t>(matrix_.rows())); }
    │ │ │ -
    215
    │ │ │ -
    231 static MatrixNN Hat(const TangentVector& xi);
    │ │ │ -
    232
    │ │ │ -
    234 static void Hat(const Vector &xi, Eigen::Ref<MatrixNN> X);
    │ │ │ -
    235
    │ │ │ -
    237 static TangentVector Vee(const MatrixNN& X);
    │ │ │ -
    238
    │ │ │ -
    239 // Chart at origin
    │ │ │ -
    │ │ │ - │ │ │ -
    245 static SO Retract(const TangentVector& xi, ChartJacobian H = boost::none);
    │ │ │ -
    246
    │ │ │ -
    250 static TangentVector Local(const SO& R, ChartJacobian H = boost::none);
    │ │ │ -
    251 };
    │ │ │ -
    │ │ │ -
    252
    │ │ │ -
    253 // Return dynamic identity DxD Jacobian for given SO(n)
    │ │ │ -
    254 template <int N_ = N, typename = IsDynamic<N_>>
    │ │ │ -
    255 static MatrixDD IdentityJacobian(size_t n) {
    │ │ │ -
    256 const size_t d = Dimension(n);
    │ │ │ -
    257 return MatrixDD::Identity(d, d);
    │ │ │ -
    258 }
    │ │ │ -
    259
    │ │ │ -
    263
    │ │ │ -
    265 MatrixDD AdjointMap() const;
    │ │ │ -
    266
    │ │ │ -
    270 static SO Expmap(const TangentVector& omega, ChartJacobian H = boost::none);
    │ │ │ -
    271
    │ │ │ -
    273 static MatrixDD ExpmapDerivative(const TangentVector& omega);
    │ │ │ -
    274
    │ │ │ -
    278 static TangentVector Logmap(const SO& R, ChartJacobian H = boost::none);
    │ │ │ -
    279
    │ │ │ -
    281 static MatrixDD LogmapDerivative(const TangentVector& omega);
    │ │ │ -
    282
    │ │ │ -
    283 // inverse with optional derivative
    │ │ │ -
    284 using LieGroup<SO<N>, internal::DimensionSO(N)>::inverse;
    │ │ │ -
    285
    │ │ │ -
    289
    │ │ │ -
    295 VectorN2 vec(OptionalJacobian<internal::NSquaredSO(N), dimension> H =
    │ │ │ -
    296 boost::none) const;
    │ │ │ -
    297
    │ │ │ -
    299 template <int N_ = N, typename = IsFixed<N_>>
    │ │ │ -
    │ │ │ -
    300 static Matrix VectorizedGenerators() {
    │ │ │ -
    301 constexpr size_t N2 = static_cast<size_t>(N * N);
    │ │ │ -
    302 Eigen::Matrix<double, N2, dimension> G;
    │ │ │ -
    303 for (size_t j = 0; j < dimension; j++) {
    │ │ │ -
    304 const auto X = Hat(Vector::Unit(dimension, j));
    │ │ │ -
    305 G.col(j) = Eigen::Map<const VectorN2>(X.data());
    │ │ │ -
    306 }
    │ │ │ -
    307 return G;
    │ │ │ -
    308 }
    │ │ │ -
    │ │ │ -
    309
    │ │ │ -
    311 template <int N_ = N, typename = IsDynamic<N_>>
    │ │ │ -
    │ │ │ -
    312 static Matrix VectorizedGenerators(size_t n = 0) {
    │ │ │ -
    313 const size_t n2 = n * n, dim = Dimension(n);
    │ │ │ -
    314 Matrix G(n2, dim);
    │ │ │ -
    315 for (size_t j = 0; j < dim; j++) {
    │ │ │ -
    316 const auto X = Hat(Vector::Unit(dim, j));
    │ │ │ -
    317 G.col(j) = Eigen::Map<const Matrix>(X.data(), n2, 1);
    │ │ │ -
    318 }
    │ │ │ -
    319 return G;
    │ │ │ -
    320 }
    │ │ │ -
    │ │ │ -
    321
    │ │ │ -
    325
    │ │ │ -
    326 template <class Archive>
    │ │ │ -
    327 friend void save(Archive&, SO&, const unsigned int);
    │ │ │ -
    328 template <class Archive>
    │ │ │ -
    329 friend void load(Archive&, SO&, const unsigned int);
    │ │ │ -
    330 template <class Archive>
    │ │ │ -
    331 friend void serialize(Archive&, SO&, const unsigned int);
    │ │ │ -
    332 friend class boost::serialization::access;
    │ │ │ -
    333 friend class Rot3; // for serialize
    │ │ │ -
    334
    │ │ │ -
    336};
    │ │ │ -
    │ │ │ -
    337
    │ │ │ -
    338using SOn = SO<Eigen::Dynamic>;
    │ │ │ -
    339
    │ │ │ -
    340/*
    │ │ │ -
    341 * Specialize dynamic Hat and Vee, because recursion depends on dynamic nature.
    │ │ │ -
    342 * The definition is in SOn.cpp. Fixed-size SO3 and SO4 have their own version,
    │ │ │ -
    343 * and implementation for other fixed N is in SOn-inl.h.
    │ │ │ -
    344 */
    │ │ │ -
    345
    │ │ │ -
    346template <>
    │ │ │ -
    347GTSAM_EXPORT
    │ │ │ -
    348Matrix SOn::Hat(const Vector& xi);
    │ │ │ -
    349
    │ │ │ -
    350template <>
    │ │ │ -
    351GTSAM_EXPORT
    │ │ │ -
    352Vector SOn::Vee(const Matrix& X);
    │ │ │ -
    353
    │ │ │ -
    354/*
    │ │ │ -
    355 * Specialize dynamic compose and between, because the derivative is unknowable
    │ │ │ -
    356 * by the LieGroup implementations, who return a fixed-size matrix for H2.
    │ │ │ -
    357 */
    │ │ │ -
    358
    │ │ │ -
    359using DynamicJacobian = OptionalJacobian<Eigen::Dynamic, Eigen::Dynamic>;
    │ │ │ -
    360
    │ │ │ -
    361template <>
    │ │ │ -
    362GTSAM_EXPORT
    │ │ │ -
    363SOn LieGroup<SOn, Eigen::Dynamic>::compose(const SOn& g, DynamicJacobian H1,
    │ │ │ -
    364 DynamicJacobian H2) const;
    │ │ │ -
    365
    │ │ │ -
    366template <>
    │ │ │ -
    367GTSAM_EXPORT
    │ │ │ -
    368SOn LieGroup<SOn, Eigen::Dynamic>::between(const SOn& g, DynamicJacobian H1,
    │ │ │ -
    369 DynamicJacobian H2) const;
    │ │ │ -
    370
    │ │ │ -
    371/*
    │ │ │ -
    372 * Specialize dynamic vec.
    │ │ │ -
    373 */
    │ │ │ -
    374template <>
    │ │ │ -
    375GTSAM_EXPORT
    │ │ │ -
    376typename SOn::VectorN2 SOn::vec(DynamicJacobian H) const;
    │ │ │ -
    377
    │ │ │ -
    379template<class Archive>
    │ │ │ -
    │ │ │ - │ │ │ -
    381 Archive& ar, SOn& Q,
    │ │ │ -
    382 const unsigned int file_version
    │ │ │ -
    383) {
    │ │ │ -
    384 Matrix& M = Q.matrix_;
    │ │ │ -
    385 ar& BOOST_SERIALIZATION_NVP(M);
    │ │ │ -
    386}
    │ │ │ -
    │ │ │ -
    387
    │ │ │ -
    388/*
    │ │ │ -
    389 * Define the traits. internal::LieGroup provides both Lie group and Testable
    │ │ │ -
    390 */
    │ │ │ -
    391
    │ │ │ -
    392template <int N>
    │ │ │ -
    393struct traits<SO<N>> : public internal::LieGroup<SO<N>> {};
    │ │ │ -
    394
    │ │ │ -
    395template <int N>
    │ │ │ -
    396struct traits<const SO<N>> : public internal::LieGroup<SO<N>> {};
    │ │ │ -
    397
    │ │ │ -
    398} // namespace gtsam
    │ │ │ -
    399
    │ │ │ -
    400#include "SOn-inl.h"
    │ │ │ -
    #define GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
    This marks a GTSAM object to require alignment.
    Definition types.h:317
    │ │ │ -
    make_shared trampoline function to ensure proper alignment
    │ │ │ -
    Base class and basic functions for Manifold types.
    │ │ │ -
    Base class and basic functions for Lie types.
    │ │ │ -
    constexpr int DimensionSO(int N)
    Calculate dimensionality of SO<N> manifold, or return Dynamic if so.
    Definition SOn.h:39
    │ │ │ -
    Template implementations for SO(n)
    │ │ │ +
    164 // NOTE(luca): Right Jacobian for Exponential map in SO(3) - equation
    │ │ │ +
    165 // (10.86) and following equations in G.S. Chirikjian, "Stochastic Models,
    │ │ │ +
    166 // Information Theory, and Lie Groups", Volume 2, 2008.
    │ │ │ +
    167 // expmap(omega + v) \approx expmap(omega) * expmap(dexp * v)
    │ │ │ +
    168 // This maps a perturbation v in the tangent space to
    │ │ │ +
    169 // a perturbation on the manifold Expmap(dexp * v) */
    │ │ │ +
    170 const Matrix3& dexp() const { return dexp_; }
    │ │ │ +
    171
    │ │ │ +
    173 GTSAM_EXPORT Vector3 applyDexp(const Vector3& v, OptionalJacobian<3, 3> H1 = boost::none,
    │ │ │ +
    174 OptionalJacobian<3, 3> H2 = boost::none) const;
    │ │ │ +
    175
    │ │ │ +
    177 GTSAM_EXPORT Vector3 applyInvDexp(const Vector3& v,
    │ │ │ +
    178 OptionalJacobian<3, 3> H1 = boost::none,
    │ │ │ +
    179 OptionalJacobian<3, 3> H2 = boost::none) const;
    │ │ │ +
    180};
    │ │ │ +
    │ │ │ +
    181} // namespace so3
    │ │ │ +
    182
    │ │ │ +
    183/*
    │ │ │ +
    184 * Define the traits. internal::LieGroup provides both Lie group and Testable
    │ │ │ +
    185 */
    │ │ │ +
    186
    │ │ │ +
    187template <>
    │ │ │ +
    188struct traits<SO3> : public internal::LieGroup<SO3> {};
    │ │ │ +
    189
    │ │ │ +
    190template <>
    │ │ │ +
    191struct traits<const SO3> : public internal::LieGroup<SO3> {};
    │ │ │ +
    192
    │ │ │ +
    193} // end namespace gtsam
    │ │ │ +
    typedef and functions to augment Eigen's MatrixXd
    │ │ │ +
    Base class and basic functions for Lie types.
    │ │ │ +
    N*N matrix representation of SO(N).
    │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │
    std::string serialize(const T &input)
    serializes to a string
    Definition serialization.h:113
    │ │ │ -
    bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen::DenseBase< MATRIX > &B, double tol=1e-9)
    equals with a tolerance
    Definition Matrix.h:81
    │ │ │
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │ -
    A CRTP helper class that implements Lie group methods Prerequisites: methods operator*,...
    Definition Lie.h:37
    │ │ │
    static SO< N > Retract(const TangentVector &v)
    Retract at origin: possible in Lie group because it has an identity.
    Definition Lie.h:111
    │ │ │
    Both LieGroupTraits and Testable.
    Definition Lie.h:229
    │ │ │
    OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
    Definition OptionalJacobian.h:41
    │ │ │ -
    Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
    Definition Rot3.h:58
    │ │ │ -
    Manifold of special orthogonal rotation matrices SO<N>.
    Definition SOn.h:52
    │ │ │ -
    static SO FromMatrix(const Eigen::MatrixBase< Derived > &R)
    Named constructor from Eigen Matrix.
    Definition SOn.h:95
    │ │ │ -
    static SO Expmap(const TangentVector &omega, ChartJacobian H=boost::none)
    Exponential map at identity - create a rotation from canonical coordinates.
    Definition SOn-inl.h:67
    │ │ │ -
    static Matrix VectorizedGenerators()
    Calculate N^2 x dim matrix of vectorized Lie algebra generators for SO(N)
    Definition SOn.h:300
    │ │ │ -
    SO inverse() const
    inverse of a rotation = transpose
    Definition SOn.h:193
    │ │ │ -
    VectorN2 vec(OptionalJacobian< internal::NSquaredSO(N), dimension > H=boost::none) const
    Return vectorized rotation matrix in column order.
    Definition SOn-inl.h:88
    │ │ │ -
    static SO ChordalMean(const std::vector< SO > &rotations)
    Named constructor that finds chordal mean , currently only defined for SO3.
    │ │ │ -
    SO operator*(const SO &other) const
    Multiplication.
    Definition SOn.h:175
    │ │ │ -
    static TangentVector Vee(const MatrixNN &X)
    Inverse of Hat. See note about xi element order in Hat.
    Definition SOn-inl.h:35
    │ │ │ -
    MatrixNN matrix_
    Rotation matrix.
    Definition SOn.h:62
    │ │ │ -
    static TangentVector Logmap(const SO &R, ChartJacobian H=boost::none)
    Log map at identity - returns the canonical coordinates of this rotation.
    Definition SOn-inl.h:77
    │ │ │ -
    static SO AxisAngle(const Vector3 &axis, double theta)
    Constructor from axis and angle. Only defined for SO3.
    │ │ │ -
    MatrixDD AdjointMap() const
    Adjoint map.
    Definition SO4.cpp:159
    │ │ │ -
    static void Hat(const Vector &xi, Eigen::Ref< MatrixNN > X)
    In-place version of Hat (see details there), implements recursion.
    │ │ │ -
    static SO Identity()
    SO<N> identity for N >= 2.
    Definition SOn.h:182
    │ │ │ -
    static int Dim()
    Return compile-time dimensionality: fixed size N or Eigen::Dynamic.
    Definition SOn.h:203
    │ │ │ -
    static MatrixNN Hat(const TangentVector &xi)
    Hat operator creates Lie algebra element corresponding to d-vector, where d is the dimensionality of ...
    Definition SOn-inl.h:29
    │ │ │ -
    static MatrixDD ExpmapDerivative(const TangentVector &omega)
    Derivative of Expmap, currently only defined for SO3.
    Definition SOn-inl.h:72
    │ │ │ -
    static MatrixDD LogmapDerivative(const TangentVector &omega)
    Derivative of Logmap, currently only defined for SO3.
    Definition SOn-inl.h:82
    │ │ │ -
    SO(const SO< M > &R)
    Construct dynamic SO(n) from Fixed SO<M>
    Definition SOn.h:111
    │ │ │ -
    SO(size_t n=0)
    Construct SO<N> identity for N == Eigen::Dynamic.
    Definition SOn.h:83
    │ │ │ -
    SO()
    Construct SO<N> identity for N >= 2.
    Definition SOn.h:79
    │ │ │ -
    static SO Lift(size_t n, const Eigen::MatrixBase< Derived > &R)
    Named constructor from lower dimensional matrix.
    Definition SOn.h:101
    │ │ │ -
    static SO Random(std::mt19937 &rng, size_t n=0)
    Random SO(n) element (no big claims about uniformity). SO(3) is specialized in SO3....
    Definition SOn.h:131
    │ │ │ -
    static SO Identity(size_t n=0)
    SO<N> identity for N == Eigen::Dynamic.
    Definition SOn.h:188
    │ │ │ -
    const MatrixNN & matrix() const
    Return matrix.
    Definition SOn.h:155
    │ │ │ -
    static SO Random(std::mt19937 &rng)
    Random SO(N) element (no big claims about uniformity)
    Definition SOn.h:145
    │ │ │ -
    static SO ClosestTo(const MatrixNN &M)
    Named constructor that finds SO(n) matrix closest to M in Frobenius norm, currently only defined for ...
    │ │ │ -
    SO(const Eigen::AngleAxisd &angleAxis)
    Constructor from AngleAxisd.
    Definition SOn.h:115
    │ │ │ -
    static Matrix VectorizedGenerators(size_t n=0)
    Calculate n^2 x dim matrix of vectorized Lie algebra generators for SO(n)
    Definition SOn.h:312
    │ │ │ -
    SO(const Eigen::MatrixBase< Derived > &R)
    Constructor from Eigen Matrix, dynamic version.
    Definition SOn.h:91
    │ │ │ -
    Definition SOn.h:240
    │ │ │ -
    static TangentVector Local(const SO &R, ChartJacobian H=boost::none)
    Inverse of Retract.
    Definition SOn-inl.h:50
    │ │ │ -
    static SO Retract(const TangentVector &xi, ChartJacobian H=boost::none)
    Retract uses Cayley map.
    Definition SOn-inl.h:40
    │ │ │ +
    Functor implementing Exponential map.
    Definition SO3.h:134
    │ │ │ +
    Functor that implements Exponential map and its derivatives.
    Definition SO3.h:155
    │ │ │ +
    GTSAM_EXPORT Vector3 applyDexp(const Vector3 &v, OptionalJacobian< 3, 3 > H1=boost::none, OptionalJacobian< 3, 3 > H2=boost::none) const
    Multiplies with dexp(), with optional derivatives.
    Definition SO3.cpp:101
    │ │ │ +
    GTSAM_EXPORT Vector3 applyInvDexp(const Vector3 &v, OptionalJacobian< 3, 3 > H1=boost::none, OptionalJacobian< 3, 3 > H2=boost::none) const
    Multiplies with dexp().inverse(), with optional derivatives.
    Definition SO3.cpp:120
    │ │ │ + │ │ │ +
    static SO Expmap(const TangentVector &omega, ChartJacobian H=boost::none)
    Exponential map at identity - create a rotation from canonical coordinates.
    Definition SOn-inl.h:67
    │ │ │ +
    VectorN2 vec(OptionalJacobian< internal::NSquaredSO(N), dimension > H=boost::none) const
    Return vectorized rotation matrix in column order.
    Definition SOn-inl.h:88
    │ │ │ +
    static SO ChordalMean(const std::vector< SO > &rotations)
    Named constructor that finds chordal mean , currently only defined for SO3.
    │ │ │ +
    static TangentVector Vee(const MatrixNN &X)
    Inverse of Hat. See note about xi element order in Hat.
    Definition SOn-inl.h:35
    │ │ │ +
    static TangentVector Logmap(const SO &R, ChartJacobian H=boost::none)
    Log map at identity - returns the canonical coordinates of this rotation.
    Definition SOn-inl.h:77
    │ │ │ +
    static SO AxisAngle(const Vector3 &axis, double theta)
    Constructor from axis and angle. Only defined for SO3.
    │ │ │ +
    MatrixDD AdjointMap() const
    Adjoint map.
    Definition SO4.cpp:159
    │ │ │ +
    static MatrixNN Hat(const TangentVector &xi)
    Hat operator creates Lie algebra element corresponding to d-vector, where d is the dimensionality of ...
    Definition SOn-inl.h:29
    │ │ │ +
    static MatrixDD ExpmapDerivative(const TangentVector &omega)
    Derivative of Expmap, currently only defined for SO3.
    Definition SOn-inl.h:72
    │ │ │ +
    static MatrixDD LogmapDerivative(const TangentVector &omega)
    Derivative of Logmap, currently only defined for SO3.
    Definition SOn-inl.h:82
    │ │ │ +
    static SO ClosestTo(const MatrixNN &M)
    Named constructor that finds SO(n) matrix closest to M in Frobenius norm, currently only defined for ...
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,507 +1,266 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -SOn.h │ │ │ │ +SO3.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ -3 * GTSAM Copyright 2010-2019, Georgia Tech Research Corporation, │ │ │ │ +3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -19#pragma once │ │ │ │ -20 │ │ │ │ -21#include <_g_t_s_a_m_/_b_a_s_e_/_L_i_e_._h> │ │ │ │ -22#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_n_i_f_o_l_d_._h> │ │ │ │ -23#include <_g_t_s_a_m_/_b_a_s_e_/_m_a_k_e___s_h_a_r_e_d_._h> │ │ │ │ -24#include │ │ │ │ -25#include │ │ │ │ -26 │ │ │ │ -27#include │ │ │ │ +21#pragma once │ │ │ │ +22 │ │ │ │ +23#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_S_O_n_._h> │ │ │ │ +24 │ │ │ │ +25#include <_g_t_s_a_m_/_b_a_s_e_/_L_i_e_._h> │ │ │ │ +26#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_._h> │ │ │ │ +27#include │ │ │ │ 28 │ │ │ │ -29#include // TODO(frank): how to avoid? │ │ │ │ -30#include │ │ │ │ -31#include │ │ │ │ -32#include │ │ │ │ -33#include │ │ │ │ -34 │ │ │ │ -35namespace _g_t_s_a_m { │ │ │ │ -36 │ │ │ │ -37namespace internal { │ │ │ │ -_3_9constexpr int _D_i_m_e_n_s_i_o_n_S_O(int N) { │ │ │ │ -40 return (N < 0) ? Eigen::Dynamic : N * (N - 1) / 2; │ │ │ │ -41} │ │ │ │ +29#include │ │ │ │ +30#include │ │ │ │ +31 │ │ │ │ +32namespace _g_t_s_a_m { │ │ │ │ +33 │ │ │ │ +34using SO3 = SO<3>; │ │ │ │ +35 │ │ │ │ +36// Below are all declarations of SO<3> specializations. │ │ │ │ +37// They are *defined* in SO3.cpp. │ │ │ │ +38 │ │ │ │ +39template <> │ │ │ │ +40GTSAM_EXPORT │ │ │ │ +41SO3 _S_O_3_:_:_A_x_i_s_A_n_g_l_e(const Vector3& axis, double theta); │ │ │ │ 42 │ │ │ │ -43// Calculate N^2 at compile time, or return Dynamic if so │ │ │ │ -44constexpr int NSquaredSO(int N) { return (N < 0) ? Eigen::Dynamic : N * N; } │ │ │ │ -45} // namespace internal │ │ │ │ +43template <> │ │ │ │ +44GTSAM_EXPORT │ │ │ │ +45SO3 _S_O_3_:_:_C_l_o_s_e_s_t_T_o(const Matrix3& M); │ │ │ │ 46 │ │ │ │ -51template │ │ │ │ -_5_2class _S_O : public _L_i_e_G_r_o_u_p, internal::DimensionSO(N)> { │ │ │ │ -53 public: │ │ │ │ -54 enum { dimension = internal::DimensionSO(N) }; │ │ │ │ -55 using MatrixNN = Eigen::Matrix; │ │ │ │ -56 using VectorN2 = Eigen::Matrix; │ │ │ │ -57 using MatrixDD = Eigen::Matrix; │ │ │ │ +47template <> │ │ │ │ +48GTSAM_EXPORT │ │ │ │ +49SO3 _S_O_3_:_:_C_h_o_r_d_a_l_M_e_a_n(const std::vector& rotations); │ │ │ │ +50 │ │ │ │ +51template <> │ │ │ │ +52GTSAM_EXPORT │ │ │ │ +53Matrix3 _S_O_3_:_:_H_a_t(const Vector3& xi); │ │ │ │ +54 │ │ │ │ +55template <> │ │ │ │ +56GTSAM_EXPORT │ │ │ │ +57Vector3 _S_O_3_:_:_V_e_e(const Matrix3& X); │ │ │ │ 58 │ │ │ │ -59 _G_T_S_A_M___M_A_K_E___A_L_I_G_N_E_D___O_P_E_R_A_T_O_R___N_E_W___I_F(true) │ │ │ │ -60 │ │ │ │ -61 protected: │ │ │ │ -_6_2 MatrixNN _m_a_t_r_i_x__; │ │ │ │ -63 │ │ │ │ -64 // enable_if_t aliases, used to specialize constructors/methods, see │ │ │ │ -65 // https://www.fluentcpp.com/2018/05/18/make-sfinae-pretty-2-hidden-beauty- │ │ │ │ -sfinae/ │ │ │ │ -66 template │ │ │ │ -67 using IsDynamic = typename std::enable_if::type; │ │ │ │ -68 template │ │ │ │ -69 using IsFixed = typename std::enable_if= 2, void>::type; │ │ │ │ -70 template │ │ │ │ -71 using IsSO3 = typename std::enable_if::type; │ │ │ │ -72 │ │ │ │ -73 public: │ │ │ │ -76 │ │ │ │ -78 template > │ │ │ │ -_7_9 _S_O() : _m_a_t_r_i_x__(MatrixNN::_I_d_e_n_t_i_t_y()) {} │ │ │ │ -80 │ │ │ │ -82 template > │ │ │ │ -_8_3 explicit _S_O(size_t n = 0) { │ │ │ │ -84 // We allow for n=0 as the default constructor, needed for serialization, │ │ │ │ -85 // wrappers etc. │ │ │ │ -86 _m_a_t_r_i_x__ = Eigen::MatrixXd::Identity(n, n); │ │ │ │ -87 } │ │ │ │ +60template <> │ │ │ │ +61Matrix3 _S_O_3_:_:_A_d_j_o_i_n_t_M_a_p() const; │ │ │ │ +62 │ │ │ │ +67template <> │ │ │ │ +68GTSAM_EXPORT │ │ │ │ +69SO3 _S_O_3_:_:_E_x_p_m_a_p(const Vector3& omega, ChartJacobian H); │ │ │ │ +70 │ │ │ │ +72template <> │ │ │ │ +73GTSAM_EXPORT │ │ │ │ +74Matrix3 _S_O_3_:_:_E_x_p_m_a_p_D_e_r_i_v_a_t_i_v_e(const Vector3& omega); │ │ │ │ +75 │ │ │ │ +80template <> │ │ │ │ +81GTSAM_EXPORT │ │ │ │ +82Vector3 _S_O_3_:_:_L_o_g_m_a_p(const SO3& R, ChartJacobian H); │ │ │ │ +83 │ │ │ │ +85template <> │ │ │ │ +86GTSAM_EXPORT │ │ │ │ +87Matrix3 _S_O_3_:_:_L_o_g_m_a_p_D_e_r_i_v_a_t_i_v_e(const Vector3& omega); │ │ │ │ 88 │ │ │ │ -90 template │ │ │ │ -_9_1 explicit _S_O(const Eigen::MatrixBase& R) : _m_a_t_r_i_x__(R.eval()) {} │ │ │ │ -92 │ │ │ │ -94 template │ │ │ │ -_9_5 static _S_O _F_r_o_m_M_a_t_r_i_x(const Eigen::MatrixBase& R) { │ │ │ │ -96 return _S_O(R); │ │ │ │ -97 } │ │ │ │ -98 │ │ │ │ -100 template > │ │ │ │ -_1_0_1 static _S_O _L_i_f_t(size_t n, const Eigen::MatrixBase &R) { │ │ │ │ -102 Matrix Q = Matrix::Identity(n, n); │ │ │ │ -103 const int p = R.rows(); │ │ │ │ -104 assert(p >= 0 && p <= static_cast(n) && R.cols() == p); │ │ │ │ -105 Q.topLeftCorner(p, p) = R; │ │ │ │ -106 return _S_O(Q); │ │ │ │ -107 } │ │ │ │ -108 │ │ │ │ -110 template > │ │ │ │ -_1_1_1 explicit _S_O(const _S_O_<_M_>& R) : _m_a_t_r_i_x__(R._m_a_t_r_i_x()) {} │ │ │ │ -112 │ │ │ │ -114 template > │ │ │ │ -_1_1_5 explicit _S_O(const Eigen::AngleAxisd& angleAxis) : _m_a_t_r_i_x__(angleAxis) {} │ │ │ │ +89// Chart at origin for SO3 is *not* Cayley but actual Expmap/Logmap │ │ │ │ +90template <> │ │ │ │ +91GTSAM_EXPORT │ │ │ │ +92SO3 _S_O_3_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n_:_:_R_e_t_r_a_c_t(const Vector3& omega, ChartJacobian H); │ │ │ │ +93 │ │ │ │ +94template <> │ │ │ │ +95GTSAM_EXPORT │ │ │ │ +96Vector3 SO3::ChartAtOrigin::Local(const SO3& R, ChartJacobian H); │ │ │ │ +97 │ │ │ │ +98template <> │ │ │ │ +99GTSAM_EXPORT │ │ │ │ +100Vector9 _S_O_3_:_:_v_e_c(OptionalJacobian<9, 3> H) const; │ │ │ │ +101 │ │ │ │ +103template │ │ │ │ +_1_0_4void _s_e_r_i_a_l_i_z_e(Archive& ar, _S_O_3& R, const unsigned int /*version*/) { │ │ │ │ +105 Matrix3& M = R.matrix_; │ │ │ │ +106 ar& boost::serialization::make_nvp("R11", M(0, 0)); │ │ │ │ +107 ar& boost::serialization::make_nvp("R12", M(0, 1)); │ │ │ │ +108 ar& boost::serialization::make_nvp("R13", M(0, 2)); │ │ │ │ +109 ar& boost::serialization::make_nvp("R21", M(1, 0)); │ │ │ │ +110 ar& boost::serialization::make_nvp("R22", M(1, 1)); │ │ │ │ +111 ar& boost::serialization::make_nvp("R23", M(1, 2)); │ │ │ │ +112 ar& boost::serialization::make_nvp("R31", M(2, 0)); │ │ │ │ +113 ar& boost::serialization::make_nvp("R32", M(2, 1)); │ │ │ │ +114 ar& boost::serialization::make_nvp("R33", M(2, 2)); │ │ │ │ +115} │ │ │ │ 116 │ │ │ │ -_1_1_8 static _S_O _A_x_i_s_A_n_g_l_e(const Vector3& axis, double theta); │ │ │ │ -119 │ │ │ │ -_1_2_2 static _S_O _C_l_o_s_e_s_t_T_o(const MatrixNN& M); │ │ │ │ -123 │ │ │ │ -_1_2_7 static _S_O _C_h_o_r_d_a_l_M_e_a_n(const std::vector& rotations); │ │ │ │ +117namespace so3 { │ │ │ │ +118 │ │ │ │ +123GTSAM_EXPORT Matrix3 compose(const Matrix3& M, const SO3& R, │ │ │ │ +124 OptionalJacobian<9, 9> H = boost::none); │ │ │ │ +125 │ │ │ │ +127GTSAM_EXPORT Matrix99 Dcompose(const SO3& R); │ │ │ │ 128 │ │ │ │ -130 template > │ │ │ │ -_1_3_1 static _S_O _R_a_n_d_o_m(std::mt19937& rng, size_t n = 0) { │ │ │ │ -132 if (n == 0) throw std::runtime_error("SO: Dimensionality not known."); │ │ │ │ -133 // TODO(frank): this might need to be re-thought │ │ │ │ -134 static std::uniform_real_distribution randomAngle(-M_PI, M_PI); │ │ │ │ -135 const size_t d = SO::Dimension(n); │ │ │ │ -136 Vector xi(d); │ │ │ │ -137 for (size_t j = 0; j < d; j++) { │ │ │ │ -138 xi(j) = randomAngle(rng); │ │ │ │ -139 } │ │ │ │ -140 return _S_O_:_:_R_e_t_r_a_c_t(xi); │ │ │ │ -141 } │ │ │ │ +129// Below are two functors that allow for saving computation when exponential │ │ │ │ +map │ │ │ │ +130// and its derivatives are needed at the same location in so<3>. The second │ │ │ │ +131// functor also implements dedicated methods to apply dexp and/or inv(dexp). │ │ │ │ +132 │ │ │ │ +_1_3_4class GTSAM_EXPORT _E_x_p_m_a_p_F_u_n_c_t_o_r { │ │ │ │ +135 protected: │ │ │ │ +136 const double theta2; │ │ │ │ +137 Matrix3 W, K, KK; │ │ │ │ +138 bool nearZero; │ │ │ │ +139 double theta, sin_theta, one_minus_cos; // only defined if !nearZero │ │ │ │ +140 │ │ │ │ +141 void init(bool nearZeroApprox = false); │ │ │ │ 142 │ │ │ │ -144 template > │ │ │ │ -_1_4_5 static _S_O _R_a_n_d_o_m(std::mt19937& rng) { │ │ │ │ -146 // By default, use dynamic implementation above. Specialized for SO(3). │ │ │ │ -147 return _S_O(_S_O_<_E_i_g_e_n_:_:_D_y_n_a_m_i_c_>_:_:_R_a_n_d_o_m(rng, N)._m_a_t_r_i_x()); │ │ │ │ -148 } │ │ │ │ +143 public: │ │ │ │ +145 explicit _E_x_p_m_a_p_F_u_n_c_t_o_r(const Vector3& omega, bool nearZeroApprox = false); │ │ │ │ +146 │ │ │ │ +148 _E_x_p_m_a_p_F_u_n_c_t_o_r(const Vector3& axis, double angle, bool nearZeroApprox = │ │ │ │ +false); │ │ │ │ 149 │ │ │ │ +151 _S_O_3 expmap() const; │ │ │ │ +152}; │ │ │ │ 153 │ │ │ │ -_1_5_5 const MatrixNN& _m_a_t_r_i_x() const { return _m_a_t_r_i_x__; } │ │ │ │ -156 │ │ │ │ -157 size_t rows() const { return _m_a_t_r_i_x__.rows(); } │ │ │ │ -158 size_t cols() const { return _m_a_t_r_i_x__.cols(); } │ │ │ │ +_1_5_5class _D_e_x_p_F_u_n_c_t_o_r : public _E_x_p_m_a_p_F_u_n_c_t_o_r { │ │ │ │ +156 const Vector3 omega; │ │ │ │ +157 double a, b; │ │ │ │ +158 Matrix3 dexp_; │ │ │ │ 159 │ │ │ │ +160 public: │ │ │ │ +162 GTSAM_EXPORT explicit _D_e_x_p_F_u_n_c_t_o_r(const Vector3& omega, bool nearZeroApprox │ │ │ │ += false); │ │ │ │ 163 │ │ │ │ -164 void print(const std::string& s = std::string()) const; │ │ │ │ -165 │ │ │ │ -166 bool equals(const _S_O& other, double tol) const { │ │ │ │ -167 return _e_q_u_a_l___w_i_t_h___a_b_s___t_o_l(_m_a_t_r_i_x__, other.matrix_, tol); │ │ │ │ -168 } │ │ │ │ -169 │ │ │ │ -173 │ │ │ │ -_1_7_5 _S_O _o_p_e_r_a_t_o_r_*(const _S_O& other) const { │ │ │ │ -176 assert(dim() == other.dim()); │ │ │ │ -177 return _S_O(_m_a_t_r_i_x__ * other._m_a_t_r_i_x__); │ │ │ │ -178 } │ │ │ │ -179 │ │ │ │ -181 template > │ │ │ │ -_1_8_2 static _S_O _I_d_e_n_t_i_t_y() { │ │ │ │ -183 return _S_O(); │ │ │ │ -184 } │ │ │ │ -185 │ │ │ │ -187 template > │ │ │ │ -_1_8_8 static _S_O _I_d_e_n_t_i_t_y(size_t n = 0) { │ │ │ │ -189 return _S_O(n); │ │ │ │ -190 } │ │ │ │ -191 │ │ │ │ -_1_9_3 _S_O _i_n_v_e_r_s_e() const { return _S_O(_m_a_t_r_i_x__.transpose()); } │ │ │ │ -194 │ │ │ │ -198 │ │ │ │ -199 using TangentVector = Eigen::Matrix; │ │ │ │ -200 using ChartJacobian = _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_d_i_m_e_n_s_i_o_n_,_ _d_i_m_e_n_s_i_o_n_>; │ │ │ │ -201 │ │ │ │ -_2_0_3 static int _D_i_m() { return dimension; } │ │ │ │ -204 │ │ │ │ -205 // Calculate manifold dimensionality for SO(n). │ │ │ │ -206 // Available as dimension or Dim() for fixed N. │ │ │ │ -207 static size_t Dimension(size_t n) { return n * (n - 1) / 2; } │ │ │ │ -208 │ │ │ │ -209 // Calculate ambient dimension n from manifold dimensionality d. │ │ │ │ -210 static size_t AmbientDim(size_t d) { return (1 + std::sqrt(1 + 8 * d)) / 2; │ │ │ │ -} │ │ │ │ -211 │ │ │ │ -212 // Calculate run-time dimensionality of manifold. │ │ │ │ -213 // Available as dimension or Dim() for fixed N. │ │ │ │ -214 size_t dim() const { return Dimension(static_cast(_m_a_t_r_i_x__.rows())); │ │ │ │ -} │ │ │ │ -215 │ │ │ │ -231 static MatrixNN _H_a_t(const TangentVector& xi); │ │ │ │ -232 │ │ │ │ -_2_3_4 static void _H_a_t(const Vector &xi, Eigen::Ref X); │ │ │ │ -235 │ │ │ │ -237 static TangentVector _V_e_e(const MatrixNN& X); │ │ │ │ -238 │ │ │ │ -239 // Chart at origin │ │ │ │ -_2_4_0 struct _C_h_a_r_t_A_t_O_r_i_g_i_n { │ │ │ │ -245 static _S_O _R_e_t_r_a_c_t(const TangentVector& xi, _C_h_a_r_t_J_a_c_o_b_i_a_n H = boost::none); │ │ │ │ -246 │ │ │ │ -250 static TangentVector _L_o_c_a_l(const _S_O& R, _C_h_a_r_t_J_a_c_o_b_i_a_n H = boost::none); │ │ │ │ -251 }; │ │ │ │ -252 │ │ │ │ -253 // Return dynamic identity DxD Jacobian for given SO(n) │ │ │ │ -254 template > │ │ │ │ -255 static MatrixDD IdentityJacobian(size_t n) { │ │ │ │ -256 const size_t d = Dimension(n); │ │ │ │ -257 return MatrixDD::Identity(d, d); │ │ │ │ -258 } │ │ │ │ -259 │ │ │ │ -263 │ │ │ │ -265 MatrixDD _A_d_j_o_i_n_t_M_a_p() const; │ │ │ │ -266 │ │ │ │ -270 static _S_O _E_x_p_m_a_p(const TangentVector& omega, ChartJacobian H = boost:: │ │ │ │ -none); │ │ │ │ -271 │ │ │ │ -273 static MatrixDD _E_x_p_m_a_p_D_e_r_i_v_a_t_i_v_e(const TangentVector& omega); │ │ │ │ -274 │ │ │ │ -278 static TangentVector _L_o_g_m_a_p(const _S_O& R, ChartJacobian H = boost::none); │ │ │ │ -279 │ │ │ │ -281 static MatrixDD _L_o_g_m_a_p_D_e_r_i_v_a_t_i_v_e(const TangentVector& omega); │ │ │ │ -282 │ │ │ │ -283 // inverse with optional derivative │ │ │ │ -284 using _L_i_e_G_r_o_u_p<_S_O_<_N_>, internal::DimensionSO(N)>_:_:_i_n_v_e_r_s_e; │ │ │ │ -285 │ │ │ │ -289 │ │ │ │ -295 VectorN2 _v_e_c(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n H = │ │ │ │ -296 boost::none) const; │ │ │ │ -297 │ │ │ │ -299 template > │ │ │ │ -_3_0_0 static Matrix _V_e_c_t_o_r_i_z_e_d_G_e_n_e_r_a_t_o_r_s() { │ │ │ │ -301 constexpr size_t N2 = static_cast(N * N); │ │ │ │ -302 Eigen::Matrix G; │ │ │ │ -303 for (size_t j = 0; j < dimension; j++) { │ │ │ │ -304 const auto X = _H_a_t(Vector::Unit(dimension, j)); │ │ │ │ -305 G.col(j) = Eigen::Map(X.data()); │ │ │ │ -306 } │ │ │ │ -307 return G; │ │ │ │ -308 } │ │ │ │ -309 │ │ │ │ -311 template > │ │ │ │ -_3_1_2 static Matrix _V_e_c_t_o_r_i_z_e_d_G_e_n_e_r_a_t_o_r_s(size_t n = 0) { │ │ │ │ -313 const size_t n2 = n * n, dim = Dimension(n); │ │ │ │ -314 Matrix G(n2, dim); │ │ │ │ -315 for (size_t j = 0; j < dim; j++) { │ │ │ │ -316 const auto X = _H_a_t(Vector::Unit(dim, j)); │ │ │ │ -317 G.col(j) = Eigen::Map(X.data(), n2, 1); │ │ │ │ -318 } │ │ │ │ -319 return G; │ │ │ │ -320 } │ │ │ │ -321 │ │ │ │ -325 │ │ │ │ -326 template │ │ │ │ -327 friend void save(Archive&, _S_O&, const unsigned int); │ │ │ │ -328 template │ │ │ │ -329 friend void load(Archive&, _S_O&, const unsigned int); │ │ │ │ -330 template │ │ │ │ -331 friend void serialize(Archive&, _S_O&, const unsigned int); │ │ │ │ -332 friend class boost::serialization::access; │ │ │ │ -333 friend class _R_o_t_3; // for serialize │ │ │ │ -334 │ │ │ │ -336}; │ │ │ │ -337 │ │ │ │ -338using SOn = SO; │ │ │ │ -339 │ │ │ │ -340/* │ │ │ │ -341 * Specialize dynamic Hat and Vee, because recursion depends on dynamic │ │ │ │ -nature. │ │ │ │ -342 * The definition is in SOn.cpp. Fixed-size SO3 and SO4 have their own │ │ │ │ -version, │ │ │ │ -343 * and implementation for other fixed N is in SOn-inl.h. │ │ │ │ -344 */ │ │ │ │ -345 │ │ │ │ -346template <> │ │ │ │ -347GTSAM_EXPORT │ │ │ │ -348Matrix _S_O_n_:_:_H_a_t(const Vector& xi); │ │ │ │ -349 │ │ │ │ -350template <> │ │ │ │ -351GTSAM_EXPORT │ │ │ │ -352Vector _S_O_n_:_:_V_e_e(const Matrix& X); │ │ │ │ -353 │ │ │ │ -354/* │ │ │ │ -355 * Specialize dynamic compose and between, because the derivative is │ │ │ │ -unknowable │ │ │ │ -356 * by the LieGroup implementations, who return a fixed-size matrix for H2. │ │ │ │ -357 */ │ │ │ │ -358 │ │ │ │ -359using DynamicJacobian = OptionalJacobian; │ │ │ │ -360 │ │ │ │ -361template <> │ │ │ │ -362GTSAM_EXPORT │ │ │ │ -363SOn LieGroup::compose(const SOn& g, DynamicJacobian H1, │ │ │ │ -364 DynamicJacobian H2) const; │ │ │ │ -365 │ │ │ │ -366template <> │ │ │ │ -367GTSAM_EXPORT │ │ │ │ -368SOn LieGroup::between(const SOn& g, DynamicJacobian H1, │ │ │ │ -369 DynamicJacobian H2) const; │ │ │ │ -370 │ │ │ │ -371/* │ │ │ │ -372 * Specialize dynamic vec. │ │ │ │ -373 */ │ │ │ │ -374template <> │ │ │ │ -375GTSAM_EXPORT │ │ │ │ -376typename SOn::VectorN2 _S_O_n_:_:_v_e_c(DynamicJacobian H) const; │ │ │ │ -377 │ │ │ │ -379template │ │ │ │ -_3_8_0void _s_e_r_i_a_l_i_z_e( │ │ │ │ -381 Archive& ar, _S_O_n& Q, │ │ │ │ -382 const unsigned int file_version │ │ │ │ -383) { │ │ │ │ -384 Matrix& M = Q.matrix_; │ │ │ │ -385 ar& BOOST_SERIALIZATION_NVP(M); │ │ │ │ -386} │ │ │ │ -387 │ │ │ │ -388/* │ │ │ │ -389 * Define the traits. internal::LieGroup provides both Lie group and │ │ │ │ +164 // NOTE(luca): Right Jacobian for Exponential map in SO(3) - equation │ │ │ │ +165 // (10.86) and following equations in G.S. Chirikjian, "Stochastic Models, │ │ │ │ +166 // Information Theory, and Lie Groups", Volume 2, 2008. │ │ │ │ +167 // expmap(omega + v) \approx expmap(omega) * expmap(dexp * v) │ │ │ │ +168 // This maps a perturbation v in the tangent space to │ │ │ │ +169 // a perturbation on the manifold Expmap(dexp * v) */ │ │ │ │ +170 const Matrix3& dexp() const { return dexp_; } │ │ │ │ +171 │ │ │ │ +173 GTSAM_EXPORT Vector3 _a_p_p_l_y_D_e_x_p(const Vector3& v, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H1 │ │ │ │ += boost::none, │ │ │ │ +174 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H2 = boost::none) const; │ │ │ │ +175 │ │ │ │ +177 GTSAM_EXPORT Vector3 _a_p_p_l_y_I_n_v_D_e_x_p(const Vector3& v, │ │ │ │ +178 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H1 = boost::none, │ │ │ │ +179 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H2 = boost::none) const; │ │ │ │ +180}; │ │ │ │ +181} // namespace so3 │ │ │ │ +182 │ │ │ │ +183/* │ │ │ │ +184 * Define the traits. internal::LieGroup provides both Lie group and │ │ │ │ Testable │ │ │ │ -390 */ │ │ │ │ -391 │ │ │ │ -392template │ │ │ │ -_3_9_3struct _t_r_a_i_t_s<_S_O> : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p> {}; │ │ │ │ -394 │ │ │ │ -395template │ │ │ │ -_3_9_6struct _t_r_a_i_t_s> : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p> {}; │ │ │ │ -397 │ │ │ │ -398} // namespace gtsam │ │ │ │ -399 │ │ │ │ -400#include "_S_O_n_-_i_n_l_._h" │ │ │ │ -_G_T_S_A_M___M_A_K_E___A_L_I_G_N_E_D___O_P_E_R_A_T_O_R___N_E_W___I_F │ │ │ │ -#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) │ │ │ │ -This marks a GTSAM object to require alignment. │ │ │ │ -DDeeffiinniittiioonn types.h:317 │ │ │ │ -_m_a_k_e___s_h_a_r_e_d_._h │ │ │ │ -make_shared trampoline function to ensure proper alignment │ │ │ │ -_M_a_n_i_f_o_l_d_._h │ │ │ │ -Base class and basic functions for Manifold types. │ │ │ │ +185 */ │ │ │ │ +186 │ │ │ │ +187template <> │ │ │ │ +_1_8_8struct _t_r_a_i_t_s<_S_O_3> : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p {}; │ │ │ │ +189 │ │ │ │ +190template <> │ │ │ │ +_1_9_1struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p {}; │ │ │ │ +192 │ │ │ │ +193} // end namespace gtsam │ │ │ │ +_M_a_t_r_i_x_._h │ │ │ │ +typedef and functions to augment Eigen's MatrixXd │ │ │ │ _L_i_e_._h │ │ │ │ Base class and basic functions for Lie types. │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_D_i_m_e_n_s_i_o_n_S_O │ │ │ │ -constexpr int DimensionSO(int N) │ │ │ │ -Calculate dimensionality of SO manifold, or return Dynamic if so. │ │ │ │ -DDeeffiinniittiioonn SOn.h:39 │ │ │ │ -_S_O_n_-_i_n_l_._h │ │ │ │ -Template implementations for SO(n) │ │ │ │ +_S_O_n_._h │ │ │ │ +N*N matrix representation of SO(N). │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ _g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e │ │ │ │ std::string serialize(const T &input) │ │ │ │ serializes to a string │ │ │ │ DDeeffiinniittiioonn serialization.h:113 │ │ │ │ -_g_t_s_a_m_:_:_e_q_u_a_l___w_i_t_h___a_b_s___t_o_l │ │ │ │ -bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen:: │ │ │ │ -DenseBase< MATRIX > &B, double tol=1e-9) │ │ │ │ -equals with a tolerance │ │ │ │ -DDeeffiinniittiioonn Matrix.h:81 │ │ │ │ _g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ that can be centered ... │ │ │ │ DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p │ │ │ │ -A CRTP helper class that implements Lie group methods Prerequisites: methods │ │ │ │ -operator*,... │ │ │ │ -DDeeffiinniittiioonn Lie.h:37 │ │ │ │ _g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_<_ _S_O_<_ _N_ _>_,_ _i_n_t_e_r_n_a_l_:_:_D_i_m_e_n_s_i_o_n_S_O_(_N_)_>_:_:_R_e_t_r_a_c_t │ │ │ │ static SO< N > Retract(const TangentVector &v) │ │ │ │ Retract at origin: possible in Lie group because it has an identity. │ │ │ │ DDeeffiinniittiioonn Lie.h:111 │ │ │ │ _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p │ │ │ │ Both LieGroupTraits and Testable. │ │ │ │ DDeeffiinniittiioonn Lie.h:229 │ │ │ │ _g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ either a fixed size o... │ │ │ │ DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3 │ │ │ │ -Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor │ │ │ │ -symbol GTSAM_USE_QUATERNIO... │ │ │ │ -DDeeffiinniittiioonn Rot3.h:58 │ │ │ │ -_g_t_s_a_m_:_:_S_O │ │ │ │ -Manifold of special orthogonal rotation matrices SO. │ │ │ │ -DDeeffiinniittiioonn SOn.h:52 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_F_r_o_m_M_a_t_r_i_x │ │ │ │ -static SO FromMatrix(const Eigen::MatrixBase< Derived > &R) │ │ │ │ -Named constructor from Eigen Matrix. │ │ │ │ -DDeeffiinniittiioonn SOn.h:95 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_E_x_p_m_a_p │ │ │ │ +_g_t_s_a_m_:_:_s_o_3_:_:_E_x_p_m_a_p_F_u_n_c_t_o_r │ │ │ │ +Functor implementing Exponential map. │ │ │ │ +DDeeffiinniittiioonn SO3.h:134 │ │ │ │ +_g_t_s_a_m_:_:_s_o_3_:_:_D_e_x_p_F_u_n_c_t_o_r │ │ │ │ +Functor that implements Exponential map and its derivatives. │ │ │ │ +DDeeffiinniittiioonn SO3.h:155 │ │ │ │ +_g_t_s_a_m_:_:_s_o_3_:_:_D_e_x_p_F_u_n_c_t_o_r_:_:_a_p_p_l_y_D_e_x_p │ │ │ │ +GTSAM_EXPORT Vector3 applyDexp(const Vector3 &v, OptionalJacobian< 3, 3 > │ │ │ │ +H1=boost::none, OptionalJacobian< 3, 3 > H2=boost::none) const │ │ │ │ +Multiplies with dexp(), with optional derivatives. │ │ │ │ +DDeeffiinniittiioonn SO3.cpp:101 │ │ │ │ +_g_t_s_a_m_:_:_s_o_3_:_:_D_e_x_p_F_u_n_c_t_o_r_:_:_a_p_p_l_y_I_n_v_D_e_x_p │ │ │ │ +GTSAM_EXPORT Vector3 applyInvDexp(const Vector3 &v, OptionalJacobian< 3, 3 > │ │ │ │ +H1=boost::none, OptionalJacobian< 3, 3 > H2=boost::none) const │ │ │ │ +Multiplies with dexp().inverse(), with optional derivatives. │ │ │ │ +DDeeffiinniittiioonn SO3.cpp:120 │ │ │ │ +_g_t_s_a_m_:_:_S_O_<_ _3_ _> │ │ │ │ +_g_t_s_a_m_:_:_S_O_<_ _3_ _>_:_:_E_x_p_m_a_p │ │ │ │ static SO Expmap(const TangentVector &omega, ChartJacobian H=boost::none) │ │ │ │ Exponential map at identity - create a rotation from canonical coordinates. │ │ │ │ DDeeffiinniittiioonn SOn-inl.h:67 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_V_e_c_t_o_r_i_z_e_d_G_e_n_e_r_a_t_o_r_s │ │ │ │ -static Matrix VectorizedGenerators() │ │ │ │ -Calculate N^2 x dim matrix of vectorized Lie algebra generators for SO(N) │ │ │ │ -DDeeffiinniittiioonn SOn.h:300 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_i_n_v_e_r_s_e │ │ │ │ -SO inverse() const │ │ │ │ -inverse of a rotation = transpose │ │ │ │ -DDeeffiinniittiioonn SOn.h:193 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_v_e_c │ │ │ │ +_g_t_s_a_m_:_:_S_O_<_ _3_ _>_:_:_v_e_c │ │ │ │ VectorN2 vec(OptionalJacobian< internal::NSquaredSO(N), dimension > H=boost:: │ │ │ │ none) const │ │ │ │ Return vectorized rotation matrix in column order. │ │ │ │ DDeeffiinniittiioonn SOn-inl.h:88 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_C_h_o_r_d_a_l_M_e_a_n │ │ │ │ +_g_t_s_a_m_:_:_S_O_<_ _3_ _>_:_:_C_h_o_r_d_a_l_M_e_a_n │ │ │ │ static SO ChordalMean(const std::vector< SO > &rotations) │ │ │ │ Named constructor that finds chordal mean , currently only defined for SO3. │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -SO operator*(const SO &other) const │ │ │ │ -Multiplication. │ │ │ │ -DDeeffiinniittiioonn SOn.h:175 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_V_e_e │ │ │ │ +_g_t_s_a_m_:_:_S_O_<_ _3_ _>_:_:_V_e_e │ │ │ │ static TangentVector Vee(const MatrixNN &X) │ │ │ │ Inverse of Hat. See note about xi element order in Hat. │ │ │ │ DDeeffiinniittiioonn SOn-inl.h:35 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_m_a_t_r_i_x__ │ │ │ │ -MatrixNN matrix_ │ │ │ │ -Rotation matrix. │ │ │ │ -DDeeffiinniittiioonn SOn.h:62 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_L_o_g_m_a_p │ │ │ │ +_g_t_s_a_m_:_:_S_O_<_ _3_ _>_:_:_L_o_g_m_a_p │ │ │ │ static TangentVector Logmap(const SO &R, ChartJacobian H=boost::none) │ │ │ │ Log map at identity - returns the canonical coordinates of this rotation. │ │ │ │ DDeeffiinniittiioonn SOn-inl.h:77 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_A_x_i_s_A_n_g_l_e │ │ │ │ +_g_t_s_a_m_:_:_S_O_<_ _3_ _>_:_:_A_x_i_s_A_n_g_l_e │ │ │ │ static SO AxisAngle(const Vector3 &axis, double theta) │ │ │ │ Constructor from axis and angle. Only defined for SO3. │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_A_d_j_o_i_n_t_M_a_p │ │ │ │ +_g_t_s_a_m_:_:_S_O_<_ _3_ _>_:_:_A_d_j_o_i_n_t_M_a_p │ │ │ │ MatrixDD AdjointMap() const │ │ │ │ Adjoint map. │ │ │ │ DDeeffiinniittiioonn SO4.cpp:159 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_H_a_t │ │ │ │ -static void Hat(const Vector &xi, Eigen::Ref< MatrixNN > X) │ │ │ │ -In-place version of Hat (see details there), implements recursion. │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_I_d_e_n_t_i_t_y │ │ │ │ -static SO Identity() │ │ │ │ -SO identity for N >= 2. │ │ │ │ -DDeeffiinniittiioonn SOn.h:182 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_D_i_m │ │ │ │ -static int Dim() │ │ │ │ -Return compile-time dimensionality: fixed size N or Eigen::Dynamic. │ │ │ │ -DDeeffiinniittiioonn SOn.h:203 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_H_a_t │ │ │ │ +_g_t_s_a_m_:_:_S_O_<_ _3_ _>_:_:_H_a_t │ │ │ │ static MatrixNN Hat(const TangentVector &xi) │ │ │ │ Hat operator creates Lie algebra element corresponding to d-vector, where d is │ │ │ │ the dimensionality of ... │ │ │ │ DDeeffiinniittiioonn SOn-inl.h:29 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_E_x_p_m_a_p_D_e_r_i_v_a_t_i_v_e │ │ │ │ +_g_t_s_a_m_:_:_S_O_<_ _3_ _>_:_:_E_x_p_m_a_p_D_e_r_i_v_a_t_i_v_e │ │ │ │ static MatrixDD ExpmapDerivative(const TangentVector &omega) │ │ │ │ Derivative of Expmap, currently only defined for SO3. │ │ │ │ DDeeffiinniittiioonn SOn-inl.h:72 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_L_o_g_m_a_p_D_e_r_i_v_a_t_i_v_e │ │ │ │ +_g_t_s_a_m_:_:_S_O_<_ _3_ _>_:_:_L_o_g_m_a_p_D_e_r_i_v_a_t_i_v_e │ │ │ │ static MatrixDD LogmapDerivative(const TangentVector &omega) │ │ │ │ Derivative of Logmap, currently only defined for SO3. │ │ │ │ DDeeffiinniittiioonn SOn-inl.h:82 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_S_O │ │ │ │ -SO(const SO< M > &R) │ │ │ │ -Construct dynamic SO(n) from Fixed SO │ │ │ │ -DDeeffiinniittiioonn SOn.h:111 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_S_O │ │ │ │ -SO(size_t n=0) │ │ │ │ -Construct SO identity for N == Eigen::Dynamic. │ │ │ │ -DDeeffiinniittiioonn SOn.h:83 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_S_O │ │ │ │ -SO() │ │ │ │ -Construct SO identity for N >= 2. │ │ │ │ -DDeeffiinniittiioonn SOn.h:79 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_L_i_f_t │ │ │ │ -static SO Lift(size_t n, const Eigen::MatrixBase< Derived > &R) │ │ │ │ -Named constructor from lower dimensional matrix. │ │ │ │ -DDeeffiinniittiioonn SOn.h:101 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_R_a_n_d_o_m │ │ │ │ -static SO Random(std::mt19937 &rng, size_t n=0) │ │ │ │ -Random SO(n) element (no big claims about uniformity). SO(3) is specialized in │ │ │ │ -SO3.... │ │ │ │ -DDeeffiinniittiioonn SOn.h:131 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_I_d_e_n_t_i_t_y │ │ │ │ -static SO Identity(size_t n=0) │ │ │ │ -SO identity for N == Eigen::Dynamic. │ │ │ │ -DDeeffiinniittiioonn SOn.h:188 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_m_a_t_r_i_x │ │ │ │ -const MatrixNN & matrix() const │ │ │ │ -Return matrix. │ │ │ │ -DDeeffiinniittiioonn SOn.h:155 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_R_a_n_d_o_m │ │ │ │ -static SO Random(std::mt19937 &rng) │ │ │ │ -Random SO(N) element (no big claims about uniformity) │ │ │ │ -DDeeffiinniittiioonn SOn.h:145 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_C_l_o_s_e_s_t_T_o │ │ │ │ +_g_t_s_a_m_:_:_S_O_<_ _3_ _>_:_:_C_l_o_s_e_s_t_T_o │ │ │ │ static SO ClosestTo(const MatrixNN &M) │ │ │ │ Named constructor that finds SO(n) matrix closest to M in Frobenius norm, │ │ │ │ currently only defined for ... │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_S_O │ │ │ │ -SO(const Eigen::AngleAxisd &angleAxis) │ │ │ │ -Constructor from AngleAxisd. │ │ │ │ -DDeeffiinniittiioonn SOn.h:115 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_V_e_c_t_o_r_i_z_e_d_G_e_n_e_r_a_t_o_r_s │ │ │ │ -static Matrix VectorizedGenerators(size_t n=0) │ │ │ │ -Calculate n^2 x dim matrix of vectorized Lie algebra generators for SO(n) │ │ │ │ -DDeeffiinniittiioonn SOn.h:312 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_S_O │ │ │ │ -SO(const Eigen::MatrixBase< Derived > &R) │ │ │ │ -Constructor from Eigen Matrix, dynamic version. │ │ │ │ -DDeeffiinniittiioonn SOn.h:91 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ -DDeeffiinniittiioonn SOn.h:240 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n_:_:_L_o_c_a_l │ │ │ │ -static TangentVector Local(const SO &R, ChartJacobian H=boost::none) │ │ │ │ -Inverse of Retract. │ │ │ │ -DDeeffiinniittiioonn SOn-inl.h:50 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n_:_:_R_e_t_r_a_c_t │ │ │ │ -static SO Retract(const TangentVector &xi, ChartJacobian H=boost::none) │ │ │ │ -Retract uses Cayley map. │ │ │ │ -DDeeffiinniittiioonn SOn-inl.h:40 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_O_n_._h │ │ │ │ + * _S_O_3_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00329.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SOn-inl.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Quaternion.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,38 +94,57 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Namespaces
    │ │ │ -
    SOn-inl.h File Reference
    │ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Typedefs
    │ │ │ +
    Quaternion.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    Template implementations for SO(n) │ │ │ +

    Lie Group wrapper for Eigen Quaternions. │ │ │ More...

    │ │ │ │ │ │

    Go to the source code of this file.

    │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Classes

    struct  gtsam::traits< QUATERNION_TYPE >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Macros

    │ │ │ +#define QUATERNION_TYPE   Eigen::Quaternion<_Scalar,_Options>
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ +Typedefs

    │ │ │ +typedef Eigen::Quaternion< double, Eigen::DontAlign > gtsam::Quaternion
     
    │ │ │

    Detailed Description

    │ │ │ -

    Template implementations for SO(n)

    │ │ │ +

    Lie Group wrapper for Eigen Quaternions.

    │ │ │
    Author
    Frank Dellaert
    │ │ │ -
    Date
    March 2019
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,30 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -SOn-inl.h File Reference │ │ │ │ -Template implementations for SO(n) _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s │ │ │ │ +Quaternion.h File Reference │ │ │ │ +Lie Group wrapper for Eigen Quaternions. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _Q_U_A_T_E_R_N_I_O_N___T_Y_P_E_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  QQUUAATTEERRNNIIOONN__TTYYPPEE   Eigen::Quaternion<_Scalar,_Options> │ │ │ │ +  │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +typedef Eigen::Quaternion< double, Eigen::DontAlign >  ggttssaamm::::QQuuaatteerrnniioonn │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Template implementations for SO(n) │ │ │ │ +Lie Group wrapper for Eigen Quaternions. │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - Date │ │ │ │ - March 2019 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_O_n_-_i_n_l_._h │ │ │ │ + * _Q_u_a_t_e_r_n_i_o_n_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00329_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SOn-inl.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Quaternion.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,162 +98,200 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    SOn-inl.h
    │ │ │ +
    Quaternion.h
    │ │ │
    │ │ │
    │ │ │ Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │ -
    3 * GTSAM Copyright 2010-2019, Georgia Tech Research Corporation,
    │ │ │ +
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │
    4 * Atlanta, Georgia 30332-0415
    │ │ │
    5 * All Rights Reserved
    │ │ │
    6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
    │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │ -
    12#pragma once
    │ │ │ -
    13
    │ │ │ -
    21#include <gtsam/base/Matrix.h>
    │ │ │ -
    22
    │ │ │ -
    23#include <iostream>
    │ │ │ -
    24
    │ │ │ -
    25namespace gtsam {
    │ │ │ -
    26
    │ │ │ -
    27// Implementation for N>=5 just uses dynamic version
    │ │ │ -
    28template <int N>
    │ │ │ -
    │ │ │ -
    29typename SO<N>::MatrixNN SO<N>::Hat(const TangentVector& xi) {
    │ │ │ -
    30 return SOn::Hat(xi);
    │ │ │ -
    31}
    │ │ │ -
    │ │ │ -
    32
    │ │ │ -
    33// Implementation for N>=5 just uses dynamic version
    │ │ │ -
    34template <int N>
    │ │ │ -
    │ │ │ -
    35typename SO<N>::TangentVector SO<N>::Vee(const MatrixNN& X) {
    │ │ │ -
    36 return SOn::Vee(X);
    │ │ │ -
    37}
    │ │ │ -
    │ │ │ +
    18#pragma once
    │ │ │ +
    19
    │ │ │ +
    20#include <gtsam/base/Lie.h>
    │ │ │ +
    21#include <gtsam/base/concepts.h>
    │ │ │ +
    22#include <gtsam/geometry/SO3.h> // Logmap/Expmap derivatives
    │ │ │ +
    23#include <limits>
    │ │ │ +
    24#include <iostream>
    │ │ │ +
    25
    │ │ │ +
    26#define QUATERNION_TYPE Eigen::Quaternion<_Scalar,_Options>
    │ │ │ +
    27
    │ │ │ +
    28namespace gtsam {
    │ │ │ +
    29
    │ │ │ +
    30// Define traits
    │ │ │ +
    31template<typename _Scalar, int _Options>
    │ │ │ +
    │ │ │ +
    32struct traits<QUATERNION_TYPE> {
    │ │ │ +
    33 typedef QUATERNION_TYPE ManifoldType;
    │ │ │ +
    34 typedef QUATERNION_TYPE Q;
    │ │ │ +
    35
    │ │ │ + │ │ │ + │ │ │
    38
    │ │ │ -
    39template <int N>
    │ │ │ -
    │ │ │ - │ │ │ -
    41 if (H) throw std::runtime_error("SO<N>::Retract jacobian not implemented.");
    │ │ │ -
    42 const Matrix X = Hat(xi / 2.0);
    │ │ │ -
    43 size_t n = AmbientDim(xi.size());
    │ │ │ -
    44 const auto I = Eigen::MatrixXd::Identity(n, n);
    │ │ │ -
    45 // https://pdfs.semanticscholar.org/6165/0347b2ccac34b5f423081d1ce4dbc4d09475.pdf
    │ │ │ -
    46 return SO((I + X) * (I - X).inverse());
    │ │ │ -
    47}
    │ │ │ -
    │ │ │ -
    48
    │ │ │ -
    49template <int N>
    │ │ │ -
    │ │ │ -
    50typename SO<N>::TangentVector SO<N>::ChartAtOrigin::Local(const SO& R,
    │ │ │ -
    51 ChartJacobian H) {
    │ │ │ -
    52 if (H) throw std::runtime_error("SO<N>::Local jacobian not implemented.");
    │ │ │ -
    53 const size_t n = R.rows();
    │ │ │ -
    54 const auto I = Eigen::MatrixXd::Identity(n, n);
    │ │ │ -
    55 const Matrix X = (I - R.matrix_) * (I + R.matrix_).inverse();
    │ │ │ -
    56 return -2 * Vee(X);
    │ │ │ -
    57}
    │ │ │ -
    │ │ │ -
    58
    │ │ │ -
    59template <int N>
    │ │ │ -
    60typename SO<N>::MatrixDD SO<N>::AdjointMap() const {
    │ │ │ -
    61 if (N==2) return I_1x1; // SO(2) case
    │ │ │ -
    62 throw std::runtime_error(
    │ │ │ -
    63 "SO<N>::AdjointMap only implemented for SO2, SO3 and SO4.");
    │ │ │ -
    64}
    │ │ │ -
    65
    │ │ │ -
    66template <int N>
    │ │ │ -
    │ │ │ -
    67SO<N> SO<N>::Expmap(const TangentVector& omega, ChartJacobian H) {
    │ │ │ -
    68 throw std::runtime_error("SO<N>::Expmap only implemented for SO3 and SO4.");
    │ │ │ -
    69}
    │ │ │ -
    │ │ │ -
    70
    │ │ │ -
    71template <int N>
    │ │ │ -
    │ │ │ -
    72typename SO<N>::MatrixDD SO<N>::ExpmapDerivative(const TangentVector& omega) {
    │ │ │ -
    73 throw std::runtime_error("SO<N>::ExpmapDerivative only implemented for SO3.");
    │ │ │ -
    74}
    │ │ │ -
    │ │ │ -
    75
    │ │ │ -
    76template <int N>
    │ │ │ -
    │ │ │ -
    77typename SO<N>::TangentVector SO<N>::Logmap(const SO& R, ChartJacobian H) {
    │ │ │ -
    78 throw std::runtime_error("SO<N>::Logmap only implemented for SO3.");
    │ │ │ -
    79}
    │ │ │ -
    │ │ │ -
    80
    │ │ │ -
    81template <int N>
    │ │ │ -
    │ │ │ -
    82typename SO<N>::MatrixDD SO<N>::LogmapDerivative(const TangentVector& omega) {
    │ │ │ -
    83 throw std::runtime_error("O<N>::LogmapDerivative only implemented for SO3.");
    │ │ │ -
    84}
    │ │ │ -
    │ │ │ -
    85
    │ │ │ -
    86// Default fixed size version (but specialized elsewehere for N=2,3,4)
    │ │ │ -
    87template <int N>
    │ │ │ -
    │ │ │ -
    88typename SO<N>::VectorN2 SO<N>::vec(
    │ │ │ -
    89 OptionalJacobian<internal::NSquaredSO(N), dimension> H) const {
    │ │ │ -
    90 // Vectorize
    │ │ │ -
    91 VectorN2 X = Eigen::Map<const VectorN2>(matrix_.data());
    │ │ │ -
    92
    │ │ │ -
    93 // If requested, calculate H as (I \oplus Q) * P,
    │ │ │ -
    94 // where Q is the N*N rotation matrix, and P is calculated below.
    │ │ │ -
    95 if (H) {
    │ │ │ -
    96 // Calculate P matrix of vectorized generators
    │ │ │ -
    97 // TODO(duy): Should we refactor this as the jacobian of Hat?
    │ │ │ -
    98 Matrix P = SO<N>::VectorizedGenerators();
    │ │ │ -
    99 for (size_t i = 0; i < N; i++) {
    │ │ │ -
    100 H->block(i * N, 0, N, dimension) =
    │ │ │ -
    101 matrix_ * P.block(i * N, 0, N, dimension);
    │ │ │ -
    102 }
    │ │ │ -
    103 }
    │ │ │ -
    104 return X;
    │ │ │ -
    105}
    │ │ │ -
    │ │ │ -
    106
    │ │ │ -
    107template <int N>
    │ │ │ -
    108void SO<N>::print(const std::string& s) const {
    │ │ │ -
    109 std::cout << s << matrix_ << std::endl;
    │ │ │ -
    110}
    │ │ │ -
    111
    │ │ │ -
    112} // namespace gtsam
    │ │ │ -
    typedef and functions to augment Eigen's MatrixXd
    │ │ │ +
    41 static Q Identity() {
    │ │ │ +
    42 return Q::Identity();
    │ │ │ +
    43 }
    │ │ │ +
    44
    │ │ │ +
    48 enum {
    │ │ │ +
    49 dimension = 3
    │ │ │ +
    50 };
    │ │ │ +
    51 typedef OptionalJacobian<3, 3> ChartJacobian;
    │ │ │ +
    52 typedef Eigen::Matrix<_Scalar, 3, 1, _Options, 3, 1> TangentVector;
    │ │ │ +
    53
    │ │ │ +
    57 static Q Compose(const Q &g, const Q & h,
    │ │ │ +
    58 ChartJacobian Hg = boost::none, ChartJacobian Hh = boost::none) {
    │ │ │ +
    59 if (Hg) *Hg = h.toRotationMatrix().transpose();
    │ │ │ +
    60 if (Hh) *Hh = I_3x3;
    │ │ │ +
    61 return g * h;
    │ │ │ +
    62 }
    │ │ │ +
    63
    │ │ │ +
    64 static Q Between(const Q &g, const Q & h,
    │ │ │ +
    65 ChartJacobian Hg = boost::none, ChartJacobian Hh = boost::none) {
    │ │ │ +
    66 Q d = g.inverse() * h;
    │ │ │ +
    67 if (Hg) *Hg = -d.toRotationMatrix().transpose();
    │ │ │ +
    68 if (Hh) *Hh = I_3x3;
    │ │ │ +
    69 return d;
    │ │ │ +
    70 }
    │ │ │ +
    71
    │ │ │ +
    72 static Q Inverse(const Q &g,
    │ │ │ +
    73 ChartJacobian H = boost::none) {
    │ │ │ +
    74 if (H) *H = -g.toRotationMatrix();
    │ │ │ +
    75 return g.inverse();
    │ │ │ +
    76 }
    │ │ │ +
    77
    │ │ │ +
    │ │ │ +
    79 static Q Expmap(const Eigen::Ref<const TangentVector>& omega,
    │ │ │ +
    80 ChartJacobian H = boost::none) {
    │ │ │ +
    81 using std::cos;
    │ │ │ +
    82 using std::sin;
    │ │ │ +
    83 if (H) *H = SO3::ExpmapDerivative(omega.template cast<double>());
    │ │ │ +
    84 _Scalar theta2 = omega.dot(omega);
    │ │ │ +
    85 if (theta2 > std::numeric_limits<_Scalar>::epsilon()) {
    │ │ │ +
    86 _Scalar theta = std::sqrt(theta2);
    │ │ │ +
    87 _Scalar ha = _Scalar(0.5) * theta;
    │ │ │ +
    88 Vector3 vec = (sin(ha) / theta) * omega;
    │ │ │ +
    89 return Q(cos(ha), vec.x(), vec.y(), vec.z());
    │ │ │ +
    90 } else {
    │ │ │ +
    91 // first order approximation sin(theta/2)/theta = 0.5
    │ │ │ +
    92 Vector3 vec = _Scalar(0.5) * omega;
    │ │ │ +
    93 return Q(1.0, vec.x(), vec.y(), vec.z());
    │ │ │ +
    94 }
    │ │ │ +
    95 }
    │ │ │ +
    │ │ │ +
    96
    │ │ │ +
    │ │ │ +
    98 static TangentVector Logmap(const Q& q, ChartJacobian H = boost::none) {
    │ │ │ +
    99 using std::acos;
    │ │ │ +
    100 using std::sqrt;
    │ │ │ +
    101
    │ │ │ +
    102 // define these compile time constants to avoid std::abs:
    │ │ │ +
    103 static const double twoPi = 2.0 * M_PI, NearlyOne = 1.0 - 1e-10,
    │ │ │ +
    104 NearlyNegativeOne = -1.0 + 1e-10;
    │ │ │ +
    105
    │ │ │ +
    106 TangentVector omega;
    │ │ │ +
    107
    │ │ │ +
    108 const _Scalar qw = q.w();
    │ │ │ +
    109 // See Quaternion-Logmap.nb in doc for Taylor expansions
    │ │ │ +
    110 if (qw > NearlyOne) {
    │ │ │ +
    111 // Taylor expansion of (angle / s) at 1
    │ │ │ +
    112 // (2 + 2 * (1-qw) / 3) * q.vec();
    │ │ │ +
    113 omega = ( 8. / 3. - 2. / 3. * qw) * q.vec();
    │ │ │ +
    114 } else if (qw < NearlyNegativeOne) {
    │ │ │ +
    115 // Taylor expansion of (angle / s) at -1
    │ │ │ +
    116 // (-2 - 2 * (1 + qw) / 3) * q.vec();
    │ │ │ +
    117 omega = (-8. / 3. - 2. / 3. * qw) * q.vec();
    │ │ │ +
    118 } else {
    │ │ │ +
    119 // Normal, away from zero case
    │ │ │ +
    120 if (qw > 0) {
    │ │ │ +
    121 _Scalar angle = 2 * acos(qw), s = sqrt(1 - qw * qw);
    │ │ │ +
    122 // Important: convert to [-pi,pi] to keep error continuous
    │ │ │ +
    123 if (angle > M_PI)
    │ │ │ +
    124 angle -= twoPi;
    │ │ │ +
    125 else if (angle < -M_PI)
    │ │ │ +
    126 angle += twoPi;
    │ │ │ +
    127 omega = (angle / s) * q.vec();
    │ │ │ +
    128 } else {
    │ │ │ +
    129 // Make sure that we are using a canonical quaternion with w > 0
    │ │ │ +
    130 _Scalar angle = 2 * acos(-qw), s = sqrt(1 - qw * qw);
    │ │ │ +
    131 if (angle > M_PI)
    │ │ │ +
    132 angle -= twoPi;
    │ │ │ +
    133 else if (angle < -M_PI)
    │ │ │ +
    134 angle += twoPi;
    │ │ │ +
    135 omega = (angle / s) * -q.vec();
    │ │ │ +
    136 }
    │ │ │ +
    137 }
    │ │ │ +
    138
    │ │ │ +
    139 if(H) *H = SO3::LogmapDerivative(omega.template cast<double>());
    │ │ │ +
    140 return omega;
    │ │ │ +
    141 }
    │ │ │ +
    │ │ │ +
    142
    │ │ │ +
    146
    │ │ │ +
    147 static TangentVector Local(const Q& g, const Q& h,
    │ │ │ +
    148 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
    │ │ │ +
    149 Q b = Between(g, h, H1, H2);
    │ │ │ +
    150 Matrix3 D_v_b;
    │ │ │ +
    151 TangentVector v = Logmap(b, (H1 || H2) ? &D_v_b : 0);
    │ │ │ +
    152 if (H1) *H1 = D_v_b * (*H1);
    │ │ │ +
    153 if (H2) *H2 = D_v_b * (*H2);
    │ │ │ +
    154 return v;
    │ │ │ +
    155 }
    │ │ │ +
    156
    │ │ │ +
    157 static Q Retract(const Q& g, const TangentVector& v,
    │ │ │ +
    158 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
    │ │ │ +
    159 Matrix3 D_h_v;
    │ │ │ +
    160 Q b = Expmap(v,H2 ? &D_h_v : 0);
    │ │ │ +
    161 Q h = Compose(g, b, H1, H2);
    │ │ │ +
    162 if (H2) *H2 = (*H2) * D_h_v;
    │ │ │ +
    163 return h;
    │ │ │ +
    164 }
    │ │ │ +
    165
    │ │ │ +
    169 static void Print(const Q& q, const std::string& str = "") {
    │ │ │ +
    170 if (str.size() == 0)
    │ │ │ +
    171 std::cout << "Eigen::Quaternion: ";
    │ │ │ +
    172 else
    │ │ │ +
    173 std::cout << str << " ";
    │ │ │ +
    174 std::cout << q.vec().transpose() << std::endl;
    │ │ │ +
    175 }
    │ │ │ +
    176 static bool Equals(const Q& q1, const Q& q2, double tol = 1e-8) {
    │ │ │ +
    177 return Between(q1, q2).vec().array().abs().maxCoeff() < tol;
    │ │ │ +
    178 }
    │ │ │ +
    180};
    │ │ │ +
    │ │ │ +
    181
    │ │ │ +
    182typedef Eigen::Quaternion<double, Eigen::DontAlign> Quaternion;
    │ │ │ +
    183
    │ │ │ +
    184} // \namespace gtsam
    │ │ │ +
    185
    │ │ │ +
    Base class and basic functions for Lie types.
    │ │ │ +
    3*3 matrix representation of SO(3)
    │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │ +
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │ +
    Group operator syntax flavors.
    Definition Group.h:37
    │ │ │ +
    tag to assert a type is a Lie group
    Definition Lie.h:164
    │ │ │
    OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
    Definition OptionalJacobian.h:41
    │ │ │ -
    Manifold of special orthogonal rotation matrices SO<N>.
    Definition SOn.h:52
    │ │ │ -
    static SO Expmap(const TangentVector &omega, ChartJacobian H=boost::none)
    Exponential map at identity - create a rotation from canonical coordinates.
    Definition SOn-inl.h:67
    │ │ │ -
    static Matrix VectorizedGenerators()
    Calculate N^2 x dim matrix of vectorized Lie algebra generators for SO(N)
    Definition SOn.h:300
    │ │ │ -
    SO inverse() const
    inverse of a rotation = transpose
    Definition SOn.h:193
    │ │ │ -
    VectorN2 vec(OptionalJacobian< internal::NSquaredSO(N), dimension > H=boost::none) const
    Return vectorized rotation matrix in column order.
    Definition SOn-inl.h:88
    │ │ │ -
    static TangentVector Vee(const MatrixNN &X)
    Inverse of Hat. See note about xi element order in Hat.
    Definition SOn-inl.h:35
    │ │ │ -
    MatrixNN matrix_
    Rotation matrix.
    Definition SOn.h:62
    │ │ │ -
    static TangentVector Logmap(const SO &R, ChartJacobian H=boost::none)
    Log map at identity - returns the canonical coordinates of this rotation.
    Definition SOn-inl.h:77
    │ │ │ -
    MatrixDD AdjointMap() const
    Adjoint map.
    Definition SO4.cpp:159
    │ │ │ -
    static MatrixNN Hat(const TangentVector &xi)
    Hat operator creates Lie algebra element corresponding to d-vector, where d is the dimensionality of ...
    Definition SOn-inl.h:29
    │ │ │ -
    static MatrixDD ExpmapDerivative(const TangentVector &omega)
    Derivative of Expmap, currently only defined for SO3.
    Definition SOn-inl.h:72
    │ │ │ -
    static MatrixDD LogmapDerivative(const TangentVector &omega)
    Derivative of Logmap, currently only defined for SO3.
    Definition SOn-inl.h:82
    │ │ │ -
    SO()
    Construct SO<N> identity for N >= 2.
    Definition SOn.h:79
    │ │ │ -
    static TangentVector Local(const SO &R, ChartJacobian H=boost::none)
    Inverse of Retract.
    Definition SOn-inl.h:50
    │ │ │ -
    static SO Retract(const TangentVector &xi, ChartJacobian H=boost::none)
    Retract uses Cayley map.
    Definition SOn-inl.h:40
    │ │ │ +
    static Q Expmap(const Eigen::Ref< const TangentVector > &omega, ChartJacobian H=boost::none)
    Exponential map, using the inlined code from Eigen's conversion from axis/angle.
    Definition Quaternion.h:79
    │ │ │ +
    static TangentVector Logmap(const Q &q, ChartJacobian H=boost::none)
    We use our own Logmap, as there is a slight bug in Eigen.
    Definition Quaternion.h:98
    │ │ │ +
    static MatrixDD ExpmapDerivative(const TangentVector &omega)
    Derivative of Expmap, currently only defined for SO3.
    Definition SOn-inl.h:72
    │ │ │ +
    static MatrixDD LogmapDerivative(const TangentVector &omega)
    Derivative of Logmap, currently only defined for SO3.
    Definition SOn-inl.h:82
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,194 +1,214 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -SOn-inl.h │ │ │ │ +Quaternion.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ -3 * GTSAM Copyright 2010-2019, Georgia Tech Research Corporation, │ │ │ │ +3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -12#pragma once │ │ │ │ -13 │ │ │ │ -21#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_._h> │ │ │ │ -22 │ │ │ │ -23#include │ │ │ │ -24 │ │ │ │ -25namespace _g_t_s_a_m { │ │ │ │ -26 │ │ │ │ -27// Implementation for N>=5 just uses dynamic version │ │ │ │ -28template │ │ │ │ -_2_9typename SO::MatrixNN _S_O_<_N_>_:_:_H_a_t(const TangentVector& xi) { │ │ │ │ -30 return _S_O_n_:_:_H_a_t(xi); │ │ │ │ -31} │ │ │ │ -32 │ │ │ │ -33// Implementation for N>=5 just uses dynamic version │ │ │ │ -34template │ │ │ │ -_3_5typename SO::TangentVector _S_O_<_N_>_:_:_V_e_e(const MatrixNN& X) { │ │ │ │ -36 return _S_O_n_:_:_V_e_e(X); │ │ │ │ -37} │ │ │ │ +18#pragma once │ │ │ │ +19 │ │ │ │ +20#include <_g_t_s_a_m_/_b_a_s_e_/_L_i_e_._h> │ │ │ │ +21#include │ │ │ │ +22#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_S_O_3_._h> // Logmap/Expmap derivatives │ │ │ │ +23#include │ │ │ │ +24#include │ │ │ │ +25 │ │ │ │ +26#define QUATERNION_TYPE Eigen::Quaternion<_Scalar,_Options> │ │ │ │ +27 │ │ │ │ +28namespace _g_t_s_a_m { │ │ │ │ +29 │ │ │ │ +30// Define traits │ │ │ │ +31template │ │ │ │ +_3_2struct _t_r_a_i_t_s { │ │ │ │ +33 typedef QUATERNION_TYPE ManifoldType; │ │ │ │ +34 typedef QUATERNION_TYPE Q; │ │ │ │ +35 │ │ │ │ +36 typedef _l_i_e___g_r_o_u_p___t_a_g _s_t_r_u_c_t_u_r_e___c_a_t_e_g_o_r_y; │ │ │ │ +37 typedef _m_u_l_t_i_p_l_i_c_a_t_i_v_e___g_r_o_u_p___t_a_g _g_r_o_u_p___f_l_a_v_o_r; │ │ │ │ 38 │ │ │ │ -39template │ │ │ │ -_4_0_S_O_<_N_> _S_O_<_N_>_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n_:_:_R_e_t_r_a_c_t(const TangentVector& xi, _C_h_a_r_t_J_a_c_o_b_i_a_n H) │ │ │ │ -{ │ │ │ │ -41 if (H) throw std::runtime_error("SO::Retract jacobian not implemented."); │ │ │ │ -42 const Matrix X = _H_a_t(xi / 2.0); │ │ │ │ -43 size_t n = AmbientDim(xi.size()); │ │ │ │ -44 const auto I = Eigen::MatrixXd::Identity(n, n); │ │ │ │ -45 // https://pdfs.semanticscholar.org/6165/ │ │ │ │ -0347b2ccac34b5f423081d1ce4dbc4d09475.pdf │ │ │ │ -46 return _S_O((I + X) * (I - X)._i_n_v_e_r_s_e()); │ │ │ │ -47} │ │ │ │ -48 │ │ │ │ -49template │ │ │ │ -_5_0typename SO::TangentVector _S_O_<_N_>_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n_:_:_L_o_c_a_l(const _S_O& R, │ │ │ │ -51 _C_h_a_r_t_J_a_c_o_b_i_a_n H) { │ │ │ │ -52 if (H) throw std::runtime_error("SO::Local jacobian not implemented."); │ │ │ │ -53 const size_t n = R.rows(); │ │ │ │ -54 const auto I = Eigen::MatrixXd::Identity(n, n); │ │ │ │ -55 const Matrix X = (I - R.matrix_) * (I + R.matrix_).inverse(); │ │ │ │ -56 return -2 * _V_e_e(X); │ │ │ │ -57} │ │ │ │ -58 │ │ │ │ -59template │ │ │ │ -60typename SO::MatrixDD _S_O_<_N_>_:_:_A_d_j_o_i_n_t_M_a_p() const { │ │ │ │ -61 if (N==2) return I_1x1; // SO(2) case │ │ │ │ -62 throw std::runtime_error( │ │ │ │ -63 "SO::AdjointMap only implemented for SO2, SO3 and SO4."); │ │ │ │ -64} │ │ │ │ -65 │ │ │ │ -66template │ │ │ │ -_6_7_S_O_<_N_> _S_O_<_N_>_:_:_E_x_p_m_a_p(const TangentVector& omega, _C_h_a_r_t_J_a_c_o_b_i_a_n H) { │ │ │ │ -68 throw std::runtime_error("SO::Expmap only implemented for SO3 and SO4."); │ │ │ │ -69} │ │ │ │ -70 │ │ │ │ -71template │ │ │ │ -_7_2typename SO::MatrixDD _S_O_<_N_>_:_:_E_x_p_m_a_p_D_e_r_i_v_a_t_i_v_e(const TangentVector& omega) │ │ │ │ -{ │ │ │ │ -73 throw std::runtime_error("SO::ExpmapDerivative only implemented for │ │ │ │ -SO3."); │ │ │ │ -74} │ │ │ │ -75 │ │ │ │ -76template │ │ │ │ -_7_7typename SO::TangentVector _S_O_<_N_>_:_:_L_o_g_m_a_p(const _S_O& R, _C_h_a_r_t_J_a_c_o_b_i_a_n H) { │ │ │ │ -78 throw std::runtime_error("SO::Logmap only implemented for SO3."); │ │ │ │ -79} │ │ │ │ -80 │ │ │ │ -81template │ │ │ │ -_8_2typename SO::MatrixDD _S_O_<_N_>_:_:_L_o_g_m_a_p_D_e_r_i_v_a_t_i_v_e(const TangentVector& omega) │ │ │ │ -{ │ │ │ │ -83 throw std::runtime_error("O::LogmapDerivative only implemented for │ │ │ │ -SO3."); │ │ │ │ -84} │ │ │ │ -85 │ │ │ │ -86// Default fixed size version (but specialized elsewehere for N=2,3,4) │ │ │ │ -87template │ │ │ │ -_8_8typename SO::VectorN2 _S_O_<_N_>_:_:_v_e_c( │ │ │ │ -89 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n H) const { │ │ │ │ -90 // Vectorize │ │ │ │ -91 VectorN2 X = Eigen::Map(_m_a_t_r_i_x__.data()); │ │ │ │ -92 │ │ │ │ -93 // If requested, calculate H as (I \oplus Q) * P, │ │ │ │ -94 // where Q is the N*N rotation matrix, and P is calculated below. │ │ │ │ -95 if (H) { │ │ │ │ -96 // Calculate P matrix of vectorized generators │ │ │ │ -97 // TODO(duy): Should we refactor this as the jacobian of Hat? │ │ │ │ -98 Matrix P = _S_O_<_N_>_:_:_V_e_c_t_o_r_i_z_e_d_G_e_n_e_r_a_t_o_r_s(); │ │ │ │ -99 for (size_t i = 0; i < N; i++) { │ │ │ │ -100 H->block(i * N, 0, N, dimension) = │ │ │ │ -101 _m_a_t_r_i_x__ * P.block(i * N, 0, N, dimension); │ │ │ │ -102 } │ │ │ │ -103 } │ │ │ │ -104 return X; │ │ │ │ -105} │ │ │ │ -106 │ │ │ │ -107template │ │ │ │ -108void _S_O_<_N_>_:_:_p_r_i_n_t(const std::string& s) const { │ │ │ │ -109 std::cout << s << _m_a_t_r_i_x__ << std::endl; │ │ │ │ -110} │ │ │ │ -111 │ │ │ │ -112} // namespace gtsam │ │ │ │ -_M_a_t_r_i_x_._h │ │ │ │ -typedef and functions to augment Eigen's MatrixXd │ │ │ │ +41 static Q Identity() { │ │ │ │ +42 return Q::Identity(); │ │ │ │ +43 } │ │ │ │ +44 │ │ │ │ +48 enum { │ │ │ │ +49 dimension = 3 │ │ │ │ +50 }; │ │ │ │ +51 typedef _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> ChartJacobian; │ │ │ │ +52 typedef Eigen::Matrix<_Scalar, 3, 1, _Options, 3, 1> TangentVector; │ │ │ │ +53 │ │ │ │ +57 static Q Compose(const Q &g, const Q & h, │ │ │ │ +58 ChartJacobian Hg = boost::none, ChartJacobian Hh = boost::none) { │ │ │ │ +59 if (Hg) *Hg = h.toRotationMatrix().transpose(); │ │ │ │ +60 if (Hh) *Hh = I_3x3; │ │ │ │ +61 return g * h; │ │ │ │ +62 } │ │ │ │ +63 │ │ │ │ +64 static Q Between(const Q &g, const Q & h, │ │ │ │ +65 ChartJacobian Hg = boost::none, ChartJacobian Hh = boost::none) { │ │ │ │ +66 Q d = g.inverse() * h; │ │ │ │ +67 if (Hg) *Hg = -d.toRotationMatrix().transpose(); │ │ │ │ +68 if (Hh) *Hh = I_3x3; │ │ │ │ +69 return d; │ │ │ │ +70 } │ │ │ │ +71 │ │ │ │ +72 static Q Inverse(const Q &g, │ │ │ │ +73 ChartJacobian H = boost::none) { │ │ │ │ +74 if (H) *H = -g.toRotationMatrix(); │ │ │ │ +75 return g.inverse(); │ │ │ │ +76 } │ │ │ │ +77 │ │ │ │ +_7_9 static Q _E_x_p_m_a_p(const Eigen::Ref& omega, │ │ │ │ +80 ChartJacobian H = boost::none) { │ │ │ │ +81 using std::cos; │ │ │ │ +82 using std::sin; │ │ │ │ +83 if (H) *H = _S_O_3_:_:_E_x_p_m_a_p_D_e_r_i_v_a_t_i_v_e(omega.template cast()); │ │ │ │ +84 _Scalar theta2 = omega.dot(omega); │ │ │ │ +85 if (theta2 > std::numeric_limits<_Scalar>::epsilon()) { │ │ │ │ +86 _Scalar theta = std::sqrt(theta2); │ │ │ │ +87 _Scalar ha = _Scalar(0.5) * theta; │ │ │ │ +88 Vector3 vec = (sin(ha) / theta) * omega; │ │ │ │ +89 return Q(cos(ha), vec.x(), vec.y(), vec.z()); │ │ │ │ +90 } else { │ │ │ │ +91 // first order approximation sin(theta/2)/theta = 0.5 │ │ │ │ +92 Vector3 vec = _Scalar(0.5) * omega; │ │ │ │ +93 return Q(1.0, vec.x(), vec.y(), vec.z()); │ │ │ │ +94 } │ │ │ │ +95 } │ │ │ │ +96 │ │ │ │ +_9_8 static TangentVector _L_o_g_m_a_p(const Q& q, ChartJacobian H = boost::none) { │ │ │ │ +99 using std::acos; │ │ │ │ +100 using std::sqrt; │ │ │ │ +101 │ │ │ │ +102 // define these compile time constants to avoid std::abs: │ │ │ │ +103 static const double twoPi = 2.0 * M_PI, NearlyOne = 1.0 - 1e-10, │ │ │ │ +104 NearlyNegativeOne = -1.0 + 1e-10; │ │ │ │ +105 │ │ │ │ +106 TangentVector omega; │ │ │ │ +107 │ │ │ │ +108 const _Scalar qw = q.w(); │ │ │ │ +109 // See Quaternion-Logmap.nb in doc for Taylor expansions │ │ │ │ +110 if (qw > NearlyOne) { │ │ │ │ +111 // Taylor expansion of (angle / s) at 1 │ │ │ │ +112 // (2 + 2 * (1-qw) / 3) * q.vec(); │ │ │ │ +113 omega = ( 8. / 3. - 2. / 3. * qw) * q.vec(); │ │ │ │ +114 } else if (qw < NearlyNegativeOne) { │ │ │ │ +115 // Taylor expansion of (angle / s) at -1 │ │ │ │ +116 // (-2 - 2 * (1 + qw) / 3) * q.vec(); │ │ │ │ +117 omega = (-8. / 3. - 2. / 3. * qw) * q.vec(); │ │ │ │ +118 } else { │ │ │ │ +119 // Normal, away from zero case │ │ │ │ +120 if (qw > 0) { │ │ │ │ +121 _Scalar angle = 2 * acos(qw), s = sqrt(1 - qw * qw); │ │ │ │ +122 // Important: convert to [-pi,pi] to keep error continuous │ │ │ │ +123 if (angle > M_PI) │ │ │ │ +124 angle -= twoPi; │ │ │ │ +125 else if (angle < -M_PI) │ │ │ │ +126 angle += twoPi; │ │ │ │ +127 omega = (angle / s) * q.vec(); │ │ │ │ +128 } else { │ │ │ │ +129 // Make sure that we are using a canonical quaternion with w > 0 │ │ │ │ +130 _Scalar angle = 2 * acos(-qw), s = sqrt(1 - qw * qw); │ │ │ │ +131 if (angle > M_PI) │ │ │ │ +132 angle -= twoPi; │ │ │ │ +133 else if (angle < -M_PI) │ │ │ │ +134 angle += twoPi; │ │ │ │ +135 omega = (angle / s) * -q.vec(); │ │ │ │ +136 } │ │ │ │ +137 } │ │ │ │ +138 │ │ │ │ +139 if(H) *H = _S_O_3_:_:_L_o_g_m_a_p_D_e_r_i_v_a_t_i_v_e(omega.template cast()); │ │ │ │ +140 return omega; │ │ │ │ +141 } │ │ │ │ +142 │ │ │ │ +146 │ │ │ │ +147 static TangentVector Local(const Q& g, const Q& h, │ │ │ │ +148 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) { │ │ │ │ +149 Q b = Between(g, h, H1, H2); │ │ │ │ +150 Matrix3 D_v_b; │ │ │ │ +151 TangentVector v = Logmap(b, (H1 || H2) ? &D_v_b : 0); │ │ │ │ +152 if (H1) *H1 = D_v_b * (*H1); │ │ │ │ +153 if (H2) *H2 = D_v_b * (*H2); │ │ │ │ +154 return v; │ │ │ │ +155 } │ │ │ │ +156 │ │ │ │ +157 static Q Retract(const Q& g, const TangentVector& v, │ │ │ │ +158 ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) { │ │ │ │ +159 Matrix3 D_h_v; │ │ │ │ +160 Q b = Expmap(v,H2 ? &D_h_v : 0); │ │ │ │ +161 Q h = Compose(g, b, H1, H2); │ │ │ │ +162 if (H2) *H2 = (*H2) * D_h_v; │ │ │ │ +163 return h; │ │ │ │ +164 } │ │ │ │ +165 │ │ │ │ +169 static void Print(const Q& q, const std::string& str = "") { │ │ │ │ +170 if (str.size() == 0) │ │ │ │ +171 std::cout << "Eigen::Quaternion: "; │ │ │ │ +172 else │ │ │ │ +173 std::cout << str << " "; │ │ │ │ +174 std::cout << q.vec().transpose() << std::endl; │ │ │ │ +175 } │ │ │ │ +176 static bool Equals(const Q& q1, const Q& q2, double tol = 1e-8) { │ │ │ │ +177 return Between(q1, q2).vec().array().abs().maxCoeff() < tol; │ │ │ │ +178 } │ │ │ │ +180}; │ │ │ │ +181 │ │ │ │ +182typedef Eigen::Quaternion Quaternion; │ │ │ │ +183 │ │ │ │ +184} // \namespace gtsam │ │ │ │ +185 │ │ │ │ +_L_i_e_._h │ │ │ │ +Base class and basic functions for Lie types. │ │ │ │ +_S_O_3_._h │ │ │ │ +3*3 matrix representation of SO(3) │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ +_g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ +A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ +that can be centered ... │ │ │ │ +DDeeffiinniittiioonn concepts.h:30 │ │ │ │ +_g_t_s_a_m_:_:_m_u_l_t_i_p_l_i_c_a_t_i_v_e___g_r_o_u_p___t_a_g │ │ │ │ +Group operator syntax flavors. │ │ │ │ +DDeeffiinniittiioonn Group.h:37 │ │ │ │ +_g_t_s_a_m_:_:_l_i_e___g_r_o_u_p___t_a_g │ │ │ │ +tag to assert a type is a Lie group │ │ │ │ +DDeeffiinniittiioonn Lie.h:164 │ │ │ │ _g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ either a fixed size o... │ │ │ │ DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ -_g_t_s_a_m_:_:_S_O │ │ │ │ -Manifold of special orthogonal rotation matrices SO. │ │ │ │ -DDeeffiinniittiioonn SOn.h:52 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_E_x_p_m_a_p │ │ │ │ -static SO Expmap(const TangentVector &omega, ChartJacobian H=boost::none) │ │ │ │ -Exponential map at identity - create a rotation from canonical coordinates. │ │ │ │ -DDeeffiinniittiioonn SOn-inl.h:67 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_V_e_c_t_o_r_i_z_e_d_G_e_n_e_r_a_t_o_r_s │ │ │ │ -static Matrix VectorizedGenerators() │ │ │ │ -Calculate N^2 x dim matrix of vectorized Lie algebra generators for SO(N) │ │ │ │ -DDeeffiinniittiioonn SOn.h:300 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_i_n_v_e_r_s_e │ │ │ │ -SO inverse() const │ │ │ │ -inverse of a rotation = transpose │ │ │ │ -DDeeffiinniittiioonn SOn.h:193 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_v_e_c │ │ │ │ -VectorN2 vec(OptionalJacobian< internal::NSquaredSO(N), dimension > H=boost:: │ │ │ │ -none) const │ │ │ │ -Return vectorized rotation matrix in column order. │ │ │ │ -DDeeffiinniittiioonn SOn-inl.h:88 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_V_e_e │ │ │ │ -static TangentVector Vee(const MatrixNN &X) │ │ │ │ -Inverse of Hat. See note about xi element order in Hat. │ │ │ │ -DDeeffiinniittiioonn SOn-inl.h:35 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_m_a_t_r_i_x__ │ │ │ │ -MatrixNN matrix_ │ │ │ │ -Rotation matrix. │ │ │ │ -DDeeffiinniittiioonn SOn.h:62 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_L_o_g_m_a_p │ │ │ │ -static TangentVector Logmap(const SO &R, ChartJacobian H=boost::none) │ │ │ │ -Log map at identity - returns the canonical coordinates of this rotation. │ │ │ │ -DDeeffiinniittiioonn SOn-inl.h:77 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_A_d_j_o_i_n_t_M_a_p │ │ │ │ -MatrixDD AdjointMap() const │ │ │ │ -Adjoint map. │ │ │ │ -DDeeffiinniittiioonn SO4.cpp:159 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_H_a_t │ │ │ │ -static MatrixNN Hat(const TangentVector &xi) │ │ │ │ -Hat operator creates Lie algebra element corresponding to d-vector, where d is │ │ │ │ -the dimensionality of ... │ │ │ │ -DDeeffiinniittiioonn SOn-inl.h:29 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_E_x_p_m_a_p_D_e_r_i_v_a_t_i_v_e │ │ │ │ +_g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _Q_U_A_T_E_R_N_I_O_N___T_Y_P_E_ _>_:_:_E_x_p_m_a_p │ │ │ │ +static Q Expmap(const Eigen::Ref< const TangentVector > &omega, ChartJacobian │ │ │ │ +H=boost::none) │ │ │ │ +Exponential map, using the inlined code from Eigen's conversion from axis/ │ │ │ │ +angle. │ │ │ │ +DDeeffiinniittiioonn Quaternion.h:79 │ │ │ │ +_g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _Q_U_A_T_E_R_N_I_O_N___T_Y_P_E_ _>_:_:_L_o_g_m_a_p │ │ │ │ +static TangentVector Logmap(const Q &q, ChartJacobian H=boost::none) │ │ │ │ +We use our own Logmap, as there is a slight bug in Eigen. │ │ │ │ +DDeeffiinniittiioonn Quaternion.h:98 │ │ │ │ +_g_t_s_a_m_:_:_S_O_<_ _3_ _>_:_:_E_x_p_m_a_p_D_e_r_i_v_a_t_i_v_e │ │ │ │ static MatrixDD ExpmapDerivative(const TangentVector &omega) │ │ │ │ Derivative of Expmap, currently only defined for SO3. │ │ │ │ DDeeffiinniittiioonn SOn-inl.h:72 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_L_o_g_m_a_p_D_e_r_i_v_a_t_i_v_e │ │ │ │ +_g_t_s_a_m_:_:_S_O_<_ _3_ _>_:_:_L_o_g_m_a_p_D_e_r_i_v_a_t_i_v_e │ │ │ │ static MatrixDD LogmapDerivative(const TangentVector &omega) │ │ │ │ Derivative of Logmap, currently only defined for SO3. │ │ │ │ DDeeffiinniittiioonn SOn-inl.h:82 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_S_O │ │ │ │ -SO() │ │ │ │ -Construct SO identity for N >= 2. │ │ │ │ -DDeeffiinniittiioonn SOn.h:79 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n_:_:_L_o_c_a_l │ │ │ │ -static TangentVector Local(const SO &R, ChartJacobian H=boost::none) │ │ │ │ -Inverse of Retract. │ │ │ │ -DDeeffiinniittiioonn SOn-inl.h:50 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n_:_:_R_e_t_r_a_c_t │ │ │ │ -static SO Retract(const TangentVector &xi, ChartJacobian H=boost::none) │ │ │ │ -Retract uses Cayley map. │ │ │ │ -DDeeffiinniittiioonn SOn-inl.h:40 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_O_n_-_i_n_l_._h │ │ │ │ + * _Q_u_a_t_e_r_n_i_o_n_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00332.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SO4.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Rot2.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,70 +95,52 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Typedefs | │ │ │ -Functions
    │ │ │ -
    SO4.h File Reference
    │ │ │ +Namespaces
    │ │ │ +
    Rot2.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    4*4 matrix representation of SO(4) │ │ │ +

    2D rotation │ │ │ More...

    │ │ │ │ │ │

    Go to the source code of this file.

    │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │

    │ │ │ Classes

    struct  gtsam::traits< SO4 >
    class  gtsam::Rot2
     Rotation matrix NOTE: the angle theta is in radians unless explicitly stated. More...
     
    struct  gtsam::traits< const SO4 >
    struct  gtsam::Rot2::ChartAtOrigin
     
    struct  gtsam::traits< Rot2 >
     
    struct  gtsam::traits< const Rot2 >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Typedefs

    │ │ │ -using gtsam::SO4 = SO< 4 >
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

    │ │ │ -Functions

    GTSAM_EXPORT Matrix3 gtsam::topLeft (const SO4 &Q, OptionalJacobian< 9, 6 > H=boost::none)
     Project to top-left 3*3 matrix.
     
    │ │ │ -GTSAM_EXPORT Matrix43 gtsam::stiefel (const SO4 &Q, OptionalJacobian< 12, 6 > H=boost::none)
     Project to Stiefel manifold of 4*3 orthonormal 3-frames in R^4, i.e., pi(Q) -> \( S \in St(3,4) \).
     
    │ │ │ -template<class Archive >
    void gtsam::serialize (Archive &ar, SO4 &Q, const unsigned int)
     Serialization function.
     
    │ │ │

    Detailed Description

    │ │ │ -

    4*4 matrix representation of SO(4)

    │ │ │ +

    2D rotation

    │ │ │ +
    Date
    Dec 9, 2009
    │ │ │
    Author
    Frank Dellaert
    │ │ │
    │ │ │ -Luca Carlone
    │ │ │ -
    Date
    March 2019
    │ │ │ +John Lambert │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,47 +1,35 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -SO4.h File Reference │ │ │ │ -4*4 matrix representation of SO(4) _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +Rot2.h File Reference │ │ │ │ +2D rotation _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _S_O_4_ _> │ │ │ │ + class   _g_t_s_a_m_:_:_R_o_t_2 │ │ │ │ +  Rotation matrix NOTE: the angle theta is in radians unless explicitly │ │ │ │ + stated. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _S_O_4_ _> │ │ │ │ +struct   _g_t_s_a_m_:_:_R_o_t_2_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _R_o_t_2_ _> │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _R_o_t_2_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -using  ggttssaamm::::SSOO44 = _S_O< 4 > │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ - GTSAM_EXPORT Matrix3  _g_t_s_a_m_:_:_t_o_p_L_e_f_t (const _S_O_4 &Q, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 9, 6 > │ │ │ │ - H=boost::none) │ │ │ │ -  Project to top-left 3*3 matrix. │ │ │ │ -  │ │ │ │ -GTSAM_EXPORT Matrix43  ggttssaamm::::ssttiieeffeell (const _S_O_4 &Q, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 12, 6 > │ │ │ │ - H=boost::none) │ │ │ │ -  Project to Stiefel manifold of 4*3 orthonormal 3-frames │ │ │ │ - in R^4, i.e., pi(Q) -> \( S \in St(3,4) \). │ │ │ │ -  │ │ │ │ -template │ │ │ │ - void  ggttssaamm::::sseerriiaalliizzee (Archive &ar, _S_O_4 &Q, const unsigned │ │ │ │ - int) │ │ │ │ -  Serialization function. │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -4*4 matrix representation of SO(4) │ │ │ │ +2D rotation │ │ │ │ + Date │ │ │ │ + Dec 9, 2009 │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - Luca Carlone │ │ │ │ - Date │ │ │ │ - March 2019 │ │ │ │ + John Lambert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_O_4_._h │ │ │ │ + * _R_o_t_2_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00332.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,7 +1,5 @@ │ │ │ │ var a00332 = [ │ │ │ │ - ["gtsam::traits< SO4 >", "a03296.html", null], │ │ │ │ - ["gtsam::traits< const SO4 >", "a03300.html", null], │ │ │ │ - ["serialize", "a00332.html#a76855a1214bf05a8704ee3deaece6339", null], │ │ │ │ - ["stiefel", "a00332.html#a3e57e4771f13855a495ec2c6454c9121", null], │ │ │ │ - ["topLeft", "a00332.html#a8d21728e3da4cf1a96e1b6f87a97da47", null] │ │ │ │ + ["gtsam::Rot2::ChartAtOrigin", "a03216.html", null], │ │ │ │ + ["gtsam::traits< Rot2 >", "a03220.html", null], │ │ │ │ + ["gtsam::traits< const Rot2 >", "a03224.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00332_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SO4.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Rot2.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,141 +98,230 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    SO4.h
    │ │ │ +
    Rot2.h
    │ │ │
    │ │ │
    │ │ │ Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │ -
    3 * GTSAM Copyright 2010-2019, Georgia Tech Research Corporation,
    │ │ │ +
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │
    4 * Atlanta, Georgia 30332-0415
    │ │ │
    5 * All Rights Reserved
    │ │ │
    6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
    │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │
    20#pragma once
    │ │ │
    21
    │ │ │ -
    22#include <gtsam/geometry/SOn.h>
    │ │ │ -
    23
    │ │ │ -
    24#include <gtsam/base/Group.h>
    │ │ │ -
    25#include <gtsam/base/Lie.h>
    │ │ │ -
    26#include <gtsam/base/Manifold.h>
    │ │ │ -
    27#include <gtsam/base/Matrix.h>
    │ │ │ -
    28#include <gtsam/dllexport.h>
    │ │ │ + │ │ │ +
    23#include <gtsam/base/Lie.h>
    │ │ │ +
    24#include <boost/optional.hpp>
    │ │ │ +
    25
    │ │ │ +
    26#include <random>
    │ │ │ +
    27
    │ │ │ +
    28namespace gtsam {
    │ │ │
    29
    │ │ │ -
    30#include <string>
    │ │ │ -
    31
    │ │ │ -
    32namespace gtsam {
    │ │ │ -
    33
    │ │ │ -
    34using SO4 = SO<4>;
    │ │ │ -
    35
    │ │ │ -
    36// /// Random SO(4) element (no big claims about uniformity)
    │ │ │ -
    37// static SO4 Random(std::mt19937 &rng);
    │ │ │ -
    38
    │ │ │ -
    39// Below are all declarations of SO<4> specializations.
    │ │ │ -
    40// They are *defined* in SO4.cpp.
    │ │ │ -
    41
    │ │ │ -
    42template <>
    │ │ │ -
    43GTSAM_EXPORT
    │ │ │ -
    44Matrix4 SO4::Hat(const TangentVector &xi);
    │ │ │ -
    45
    │ │ │ -
    46template <>
    │ │ │ -
    47GTSAM_EXPORT
    │ │ │ -
    48Vector6 SO4::Vee(const Matrix4 &X);
    │ │ │ -
    49
    │ │ │ -
    50template <>
    │ │ │ -
    51GTSAM_EXPORT
    │ │ │ -
    52SO4 SO4::Expmap(const Vector6 &xi, ChartJacobian H);
    │ │ │ -
    53
    │ │ │ -
    54template <>
    │ │ │ -
    55GTSAM_EXPORT
    │ │ │ -
    56Matrix6 SO4::AdjointMap() const;
    │ │ │ +
    │ │ │ +
    36 class GTSAM_EXPORT Rot2 : public LieGroup<Rot2, 1> {
    │ │ │ +
    37
    │ │ │ +
    39 double c_, s_;
    │ │ │ +
    40
    │ │ │ +
    42 Rot2& normalize();
    │ │ │ +
    43
    │ │ │ +
    45 inline Rot2(double c, double s) : c_(c), s_(s) {}
    │ │ │ +
    46
    │ │ │ +
    47 public:
    │ │ │ +
    48
    │ │ │ +
    51
    │ │ │ +
    53 Rot2() : c_(1.0), s_(0.0) {}
    │ │ │ +
    54
    │ │ │ +
    56 Rot2(const Rot2& r) : Rot2(r.c_, r.s_) {}
    │ │ │
    57
    │ │ │ -
    58template <>
    │ │ │ -
    59GTSAM_EXPORT
    │ │ │ -
    60SO4::VectorN2 SO4::vec(OptionalJacobian<16, 6> H) const;
    │ │ │ -
    61
    │ │ │ -
    62template <>
    │ │ │ -
    63GTSAM_EXPORT
    │ │ │ -
    64SO4 SO4::ChartAtOrigin::Retract(const Vector6 &omega, ChartJacobian H);
    │ │ │ +
    59 Rot2(double theta) : c_(cos(theta)), s_(sin(theta)) {}
    │ │ │ +
    60
    │ │ │ +
    │ │ │ +
    62 static Rot2 fromAngle(double theta) {
    │ │ │ +
    63 return Rot2(theta);
    │ │ │ +
    64 }
    │ │ │ +
    │ │ │
    65
    │ │ │ -
    66template <>
    │ │ │ -
    67GTSAM_EXPORT
    │ │ │ -
    68Vector6 SO4::ChartAtOrigin::Local(const SO4 &Q, ChartJacobian H);
    │ │ │ -
    69
    │ │ │ -
    73GTSAM_EXPORT Matrix3 topLeft(const SO4 &Q, OptionalJacobian<9, 6> H = boost::none);
    │ │ │ +
    │ │ │ +
    67 static Rot2 fromDegrees(double theta) {
    │ │ │ +
    68 static const double degree = M_PI / 180;
    │ │ │ +
    69 return fromAngle(theta * degree);
    │ │ │ +
    70 }
    │ │ │ +
    │ │ │ +
    71
    │ │ │ +
    73 static Rot2 fromCosSin(double c, double s);
    │ │ │
    74
    │ │ │ -
    79GTSAM_EXPORT Matrix43 stiefel(const SO4 &Q, OptionalJacobian<12, 6> H = boost::none);
    │ │ │ -
    80
    │ │ │ -
    82template <class Archive>
    │ │ │ -
    │ │ │ -
    83void serialize(Archive &ar, SO4 &Q, const unsigned int /*version*/) {
    │ │ │ -
    84 Matrix4 &M = Q.matrix_;
    │ │ │ -
    85 ar &boost::serialization::make_nvp("Q11", M(0, 0));
    │ │ │ -
    86 ar &boost::serialization::make_nvp("Q12", M(0, 1));
    │ │ │ -
    87 ar &boost::serialization::make_nvp("Q13", M(0, 2));
    │ │ │ -
    88 ar &boost::serialization::make_nvp("Q14", M(0, 3));
    │ │ │ -
    89
    │ │ │ -
    90 ar &boost::serialization::make_nvp("Q21", M(1, 0));
    │ │ │ -
    91 ar &boost::serialization::make_nvp("Q22", M(1, 1));
    │ │ │ -
    92 ar &boost::serialization::make_nvp("Q23", M(1, 2));
    │ │ │ -
    93 ar &boost::serialization::make_nvp("Q24", M(1, 3));
    │ │ │ -
    94
    │ │ │ -
    95 ar &boost::serialization::make_nvp("Q31", M(2, 0));
    │ │ │ -
    96 ar &boost::serialization::make_nvp("Q32", M(2, 1));
    │ │ │ -
    97 ar &boost::serialization::make_nvp("Q33", M(2, 2));
    │ │ │ -
    98 ar &boost::serialization::make_nvp("Q34", M(2, 3));
    │ │ │ +
    82 static Rot2 relativeBearing(const Point2& d, OptionalJacobian<1,2> H =
    │ │ │ +
    83 boost::none);
    │ │ │ +
    84
    │ │ │ +
    86 static Rot2 atan2(double y, double x);
    │ │ │ +
    87
    │ │ │ +
    94 static Rot2 Random(std::mt19937 & rng);
    │ │ │ +
    95
    │ │ │
    99
    │ │ │ -
    100 ar &boost::serialization::make_nvp("Q41", M(3, 0));
    │ │ │ -
    101 ar &boost::serialization::make_nvp("Q42", M(3, 1));
    │ │ │ -
    102 ar &boost::serialization::make_nvp("Q43", M(3, 2));
    │ │ │ -
    103 ar &boost::serialization::make_nvp("Q44", M(3, 3));
    │ │ │ -
    104}
    │ │ │ -
    │ │ │ +
    101 void print(const std::string& s = "theta") const;
    │ │ │ +
    102
    │ │ │ +
    104 bool equals(const Rot2& R, double tol = 1e-9) const;
    │ │ │
    105
    │ │ │ -
    106/*
    │ │ │ -
    107 * Define the traits. internal::LieGroup provides both Lie group and Testable
    │ │ │ -
    108 */
    │ │ │
    109
    │ │ │ -
    110template <>
    │ │ │ -
    111struct traits<SO4> : public internal::LieGroup<SO4> {};
    │ │ │ +
    111 inline static Rot2 Identity() { return Rot2(); }
    │ │ │
    112
    │ │ │ -
    113template <>
    │ │ │ -
    114struct traits<const SO4> : public internal::LieGroup<SO4> {};
    │ │ │ +
    114 Rot2 inverse() const { return Rot2(c_, -s_);}
    │ │ │
    115
    │ │ │ -
    116} // end namespace gtsam
    │ │ │ -
    typedef and functions to augment Eigen's MatrixXd
    │ │ │ -
    Base class and basic functions for Manifold types.
    │ │ │ -
    Base class and basic functions for Lie types.
    │ │ │ -
    Concept check class for variable types with Group properties.
    │ │ │ -
    N*N matrix representation of SO(N).
    │ │ │ +
    │ │ │ +
    117 Rot2 operator*(const Rot2& R) const {
    │ │ │ +
    118 return fromCosSin(c_ * R.c_ - s_ * R.s_, s_ * R.c_ + c_ * R.s_);
    │ │ │ +
    119 }
    │ │ │ +
    │ │ │ +
    120
    │ │ │ +
    124
    │ │ │ +
    126 static Rot2 Expmap(const Vector1& v, ChartJacobian H = boost::none);
    │ │ │ +
    127
    │ │ │ +
    129 static Vector1 Logmap(const Rot2& r, ChartJacobian H = boost::none);
    │ │ │ +
    130
    │ │ │ +
    132 Matrix1 AdjointMap() const { return I_1x1; }
    │ │ │ +
    133
    │ │ │ +
    │ │ │ +
    135 static Matrix ExpmapDerivative(const Vector& /*v*/) {
    │ │ │ +
    136 return I_1x1;
    │ │ │ +
    137 }
    │ │ │ +
    │ │ │ +
    138
    │ │ │ +
    │ │ │ +
    140 static Matrix LogmapDerivative(const Vector& /*v*/) {
    │ │ │ +
    141 return I_1x1;
    │ │ │ +
    142 }
    │ │ │ +
    │ │ │ +
    143
    │ │ │ +
    144 // Chart at origin simply uses exponential map and its inverse
    │ │ │ +
    │ │ │ + │ │ │ +
    146 static Rot2 Retract(const Vector1& v, ChartJacobian H = boost::none) {
    │ │ │ +
    147 return Expmap(v, H);
    │ │ │ +
    148 }
    │ │ │ +
    149 static Vector1 Local(const Rot2& r, ChartJacobian H = boost::none) {
    │ │ │ +
    150 return Logmap(r, H);
    │ │ │ +
    151 }
    │ │ │ +
    152 };
    │ │ │ +
    │ │ │ +
    153
    │ │ │ +
    154 using LieGroup<Rot2, 1>::inverse; // version with derivative
    │ │ │ +
    155
    │ │ │ +
    159
    │ │ │ +
    163 Point2 rotate(const Point2& p, OptionalJacobian<2, 1> H1 = boost::none,
    │ │ │ +
    164 OptionalJacobian<2, 2> H2 = boost::none) const;
    │ │ │ +
    165
    │ │ │ +
    │ │ │ +
    167 inline Point2 operator*(const Point2& p) const {
    │ │ │ +
    168 return rotate(p);
    │ │ │ +
    169 }
    │ │ │ +
    │ │ │ +
    170
    │ │ │ +
    174 Point2 unrotate(const Point2& p, OptionalJacobian<2, 1> H1 = boost::none,
    │ │ │ +
    175 OptionalJacobian<2, 2> H2 = boost::none) const;
    │ │ │ +
    176
    │ │ │ +
    180
    │ │ │ +
    │ │ │ +
    182 inline Point2 unit() const {
    │ │ │ +
    183 return Point2(c_, s_);
    │ │ │ +
    184 }
    │ │ │ +
    │ │ │ +
    185
    │ │ │ +
    │ │ │ +
    187 double theta() const {
    │ │ │ +
    188 return ::atan2(s_, c_);
    │ │ │ +
    189 }
    │ │ │ +
    │ │ │ +
    190
    │ │ │ +
    │ │ │ +
    192 double degrees() const {
    │ │ │ +
    193 const double degree = M_PI / 180;
    │ │ │ +
    194 return theta() / degree;
    │ │ │ +
    195 }
    │ │ │ +
    │ │ │ +
    196
    │ │ │ +
    │ │ │ +
    198 inline double c() const {
    │ │ │ +
    199 return c_;
    │ │ │ +
    200 }
    │ │ │ +
    │ │ │ +
    201
    │ │ │ +
    │ │ │ +
    203 inline double s() const {
    │ │ │ +
    204 return s_;
    │ │ │ +
    205 }
    │ │ │ +
    │ │ │ +
    206
    │ │ │ +
    208 Matrix2 matrix() const;
    │ │ │ +
    209
    │ │ │ +
    211 Matrix2 transpose() const;
    │ │ │ +
    212
    │ │ │ +
    214 static Rot2 ClosestTo(const Matrix2& M);
    │ │ │ +
    215
    │ │ │ +
    216 private:
    │ │ │ +
    218 friend class boost::serialization::access;
    │ │ │ +
    219 template<class ARCHIVE>
    │ │ │ +
    220 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
    │ │ │ +
    221 ar & BOOST_SERIALIZATION_NVP(c_);
    │ │ │ +
    222 ar & BOOST_SERIALIZATION_NVP(s_);
    │ │ │ +
    223 }
    │ │ │ +
    224
    │ │ │ +
    225 };
    │ │ │ +
    │ │ │ +
    226
    │ │ │ +
    227 template<>
    │ │ │ +
    228 struct traits<Rot2> : public internal::LieGroup<Rot2> {};
    │ │ │ +
    229
    │ │ │ +
    230 template<>
    │ │ │ +
    231 struct traits<const Rot2> : public internal::LieGroup<Rot2> {};
    │ │ │ +
    232
    │ │ │ +
    233} // gtsam
    │ │ │ +
    Base class and basic functions for Lie types.
    │ │ │ +
    2D Point
    │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │ -
    std::string serialize(const T &input)
    serializes to a string
    Definition serialization.h:113
    │ │ │ -
    GTSAM_EXPORT Matrix43 stiefel(const SO4 &Q, OptionalJacobian< 12, 6 > H)
    Project to Stiefel manifold of 4*3 orthonormal 3-frames in R^4, i.e., pi(Q) -> .
    Definition SO4.cpp:220
    │ │ │ -
    GTSAM_EXPORT Matrix3 topLeft(const SO4 &Q, OptionalJacobian< 9, 6 > H)
    Project to top-left 3*3 matrix.
    Definition SO4.cpp:206
    │ │ │ +
    void print(const Matrix &A, const string &s, ostream &stream)
    print without optional string, must specify cout yourself
    Definition Matrix.cpp:156
    │ │ │ +
    Vector2 Point2
    As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point2 to Vector2...
    Definition Point2.h:27
    │ │ │ +
    Point3 normalize(const Point3 &p, OptionalJacobian< 3, 3 > H)
    normalize, with optional Jacobian
    Definition Point3.cpp:52
    │ │ │
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │ -
    static SO< N > Retract(const TangentVector &v)
    Retract at origin: possible in Lie group because it has an identity.
    Definition Lie.h:111
    │ │ │ +
    A CRTP helper class that implements Lie group methods Prerequisites: methods operator*,...
    Definition Lie.h:37
    │ │ │
    Both LieGroupTraits and Testable.
    Definition Lie.h:229
    │ │ │ -
    Manifold of special orthogonal rotation matrices SO<N>.
    Definition SOn.h:52
    │ │ │ -
    static SO Expmap(const TangentVector &omega, ChartJacobian H=boost::none)
    Exponential map at identity - create a rotation from canonical coordinates.
    Definition SOn-inl.h:67
    │ │ │ -
    VectorN2 vec(OptionalJacobian< internal::NSquaredSO(N), dimension > H=boost::none) const
    Return vectorized rotation matrix in column order.
    Definition SOn-inl.h:88
    │ │ │ -
    static TangentVector Vee(const MatrixNN &X)
    Inverse of Hat. See note about xi element order in Hat.
    Definition SOn-inl.h:35
    │ │ │ -
    MatrixDD AdjointMap() const
    Adjoint map.
    Definition SO4.cpp:159
    │ │ │ -
    static MatrixNN Hat(const TangentVector &xi)
    Hat operator creates Lie algebra element corresponding to d-vector, where d is the dimensionality of ...
    Definition SOn-inl.h:29
    │ │ │ +
    OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
    Definition OptionalJacobian.h:41
    │ │ │ +
    Template to create a binary predicate.
    Definition Testable.h:111
    │ │ │ +
    Rotation matrix NOTE: the angle theta is in radians unless explicitly stated.
    Definition Rot2.h:36
    │ │ │ +
    Rot2 operator*(const Rot2 &R) const
    Compose - make a new rotation by adding angles.
    Definition Rot2.h:117
    │ │ │ +
    double c() const
    return cos
    Definition Rot2.h:198
    │ │ │ +
    static Matrix ExpmapDerivative(const Vector &)
    Left-trivialized derivative of the exponential map.
    Definition Rot2.h:135
    │ │ │ +
    Point2 unit() const
    Creates a unit vector as a Point2.
    Definition Rot2.h:182
    │ │ │ +
    double theta() const
    return angle (RADIANS)
    Definition Rot2.h:187
    │ │ │ +
    Rot2 inverse() const
    The inverse rotation - negative angle.
    Definition Rot2.h:114
    │ │ │ +
    Point2 operator*(const Point2 &p) const
    syntactic sugar for rotate
    Definition Rot2.h:167
    │ │ │ +
    double s() const
    return sin
    Definition Rot2.h:203
    │ │ │ +
    static Rot2 Identity()
    Identity.
    Definition Rot2.h:111
    │ │ │ +
    double degrees() const
    return angle (DEGREES)
    Definition Rot2.h:192
    │ │ │ +
    static Matrix LogmapDerivative(const Vector &)
    Left-trivialized derivative inverse of the exponential map.
    Definition Rot2.h:140
    │ │ │ +
    Matrix1 AdjointMap() const
    Calculate Adjoint map.
    Definition Rot2.h:132
    │ │ │ +
    Rot2(double theta)
    Constructor from angle in radians == exponential map at identity.
    Definition Rot2.h:59
    │ │ │ +
    static Rot2 fromDegrees(double theta)
    Named constructor from angle in degrees.
    Definition Rot2.h:67
    │ │ │ +
    Rot2()
    default constructor, zero rotation
    Definition Rot2.h:53
    │ │ │ +
    Rot2(const Rot2 &r)
    copy constructor
    Definition Rot2.h:56
    │ │ │ +
    static Rot2 fromAngle(double theta)
    Named constructor from angle in radians.
    Definition Rot2.h:62
    │ │ │ +
    Definition Rot2.h:145
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,178 +1,277 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -SO4.h │ │ │ │ +Rot2.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ -3 * GTSAM Copyright 2010-2019, Georgia Tech Research Corporation, │ │ │ │ +3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ 20#pragma once │ │ │ │ 21 │ │ │ │ -22#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_S_O_n_._h> │ │ │ │ -23 │ │ │ │ -24#include <_g_t_s_a_m_/_b_a_s_e_/_G_r_o_u_p_._h> │ │ │ │ -25#include <_g_t_s_a_m_/_b_a_s_e_/_L_i_e_._h> │ │ │ │ -26#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_n_i_f_o_l_d_._h> │ │ │ │ -27#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_t_r_i_x_._h> │ │ │ │ -28#include │ │ │ │ +22#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_i_n_t_2_._h> │ │ │ │ +23#include <_g_t_s_a_m_/_b_a_s_e_/_L_i_e_._h> │ │ │ │ +24#include │ │ │ │ +25 │ │ │ │ +26#include │ │ │ │ +27 │ │ │ │ +28namespace _g_t_s_a_m { │ │ │ │ 29 │ │ │ │ -30#include │ │ │ │ -31 │ │ │ │ -32namespace _g_t_s_a_m { │ │ │ │ -33 │ │ │ │ -34using SO4 = SO<4>; │ │ │ │ -35 │ │ │ │ -36// /// Random SO(4) element (no big claims about uniformity) │ │ │ │ -37// static SO4 Random(std::mt19937 &rng); │ │ │ │ -38 │ │ │ │ -39// Below are all declarations of SO<4> specializations. │ │ │ │ -40// They are *defined* in SO4.cpp. │ │ │ │ -41 │ │ │ │ -42template <> │ │ │ │ -43GTSAM_EXPORT │ │ │ │ -44Matrix4 _S_O_4_:_:_H_a_t(const TangentVector &xi); │ │ │ │ -45 │ │ │ │ -46template <> │ │ │ │ -47GTSAM_EXPORT │ │ │ │ -48Vector6 _S_O_4_:_:_V_e_e(const Matrix4 &X); │ │ │ │ -49 │ │ │ │ -50template <> │ │ │ │ -51GTSAM_EXPORT │ │ │ │ -52SO4 _S_O_4_:_:_E_x_p_m_a_p(const Vector6 &xi, ChartJacobian H); │ │ │ │ -53 │ │ │ │ -54template <> │ │ │ │ -55GTSAM_EXPORT │ │ │ │ -56Matrix6 _S_O_4_:_:_A_d_j_o_i_n_t_M_a_p() const; │ │ │ │ +_3_6 class GTSAM_EXPORT _R_o_t_2 : public _L_i_e_G_r_o_u_p { │ │ │ │ +37 │ │ │ │ +39 double c_, s_; │ │ │ │ +40 │ │ │ │ +42 _R_o_t_2& _n_o_r_m_a_l_i_z_e(); │ │ │ │ +43 │ │ │ │ +45 inline _R_o_t_2(double c, double s) : c_(c), s_(s) {} │ │ │ │ +46 │ │ │ │ +47 public: │ │ │ │ +48 │ │ │ │ +51 │ │ │ │ +_5_3 _R_o_t_2() : c_(1.0), s_(0.0) {} │ │ │ │ +54 │ │ │ │ +_5_6 _R_o_t_2(const _R_o_t_2& r) : _R_o_t_2(r.c_, r.s_) {} │ │ │ │ 57 │ │ │ │ -58template <> │ │ │ │ -59GTSAM_EXPORT │ │ │ │ -60SO4::VectorN2 _S_O_4_:_:_v_e_c(OptionalJacobian<16, 6> H) const; │ │ │ │ -61 │ │ │ │ -62template <> │ │ │ │ -63GTSAM_EXPORT │ │ │ │ -64SO4 _S_O_4_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n_:_:_R_e_t_r_a_c_t(const Vector6 &omega, ChartJacobian H); │ │ │ │ +_5_9 _R_o_t_2(double theta) : c_(cos(theta)), s_(sin(theta)) {} │ │ │ │ +60 │ │ │ │ +_6_2 static _R_o_t_2 _f_r_o_m_A_n_g_l_e(double theta) { │ │ │ │ +63 return _R_o_t_2(theta); │ │ │ │ +64 } │ │ │ │ 65 │ │ │ │ -66template <> │ │ │ │ -67GTSAM_EXPORT │ │ │ │ -68Vector6 SO4::ChartAtOrigin::Local(const SO4 &Q, ChartJacobian H); │ │ │ │ -69 │ │ │ │ -73GTSAM_EXPORT Matrix3 _t_o_p_L_e_f_t(const SO4 &Q, OptionalJacobian<9, 6> H = boost:: │ │ │ │ -none); │ │ │ │ +_6_7 static _R_o_t_2 _f_r_o_m_D_e_g_r_e_e_s(double theta) { │ │ │ │ +68 static const double degree = M_PI / 180; │ │ │ │ +69 return fromAngle(theta * degree); │ │ │ │ +70 } │ │ │ │ +71 │ │ │ │ +73 static _R_o_t_2 fromCosSin(double c, double s); │ │ │ │ 74 │ │ │ │ -79GTSAM_EXPORT Matrix43 _s_t_i_e_f_e_l(const SO4 &Q, OptionalJacobian<12, 6> H = │ │ │ │ -boost::none); │ │ │ │ -80 │ │ │ │ -82template │ │ │ │ -_8_3void _s_e_r_i_a_l_i_z_e(Archive &ar, _S_O_4 &Q, const unsigned int /*version*/) { │ │ │ │ -84 Matrix4 &M = Q.matrix_; │ │ │ │ -85 ar &boost::serialization::make_nvp("Q11", M(0, 0)); │ │ │ │ -86 ar &boost::serialization::make_nvp("Q12", M(0, 1)); │ │ │ │ -87 ar &boost::serialization::make_nvp("Q13", M(0, 2)); │ │ │ │ -88 ar &boost::serialization::make_nvp("Q14", M(0, 3)); │ │ │ │ -89 │ │ │ │ -90 ar &boost::serialization::make_nvp("Q21", M(1, 0)); │ │ │ │ -91 ar &boost::serialization::make_nvp("Q22", M(1, 1)); │ │ │ │ -92 ar &boost::serialization::make_nvp("Q23", M(1, 2)); │ │ │ │ -93 ar &boost::serialization::make_nvp("Q24", M(1, 3)); │ │ │ │ -94 │ │ │ │ -95 ar &boost::serialization::make_nvp("Q31", M(2, 0)); │ │ │ │ -96 ar &boost::serialization::make_nvp("Q32", M(2, 1)); │ │ │ │ -97 ar &boost::serialization::make_nvp("Q33", M(2, 2)); │ │ │ │ -98 ar &boost::serialization::make_nvp("Q34", M(2, 3)); │ │ │ │ +82 static _R_o_t_2 relativeBearing(const _P_o_i_n_t_2& d, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_2_> H = │ │ │ │ +83 boost::none); │ │ │ │ +84 │ │ │ │ +86 static _R_o_t_2 atan2(double y, double x); │ │ │ │ +87 │ │ │ │ +94 static _R_o_t_2 Random(std::mt19937 & rng); │ │ │ │ +95 │ │ │ │ 99 │ │ │ │ -100 ar &boost::serialization::make_nvp("Q41", M(3, 0)); │ │ │ │ -101 ar &boost::serialization::make_nvp("Q42", M(3, 1)); │ │ │ │ -102 ar &boost::serialization::make_nvp("Q43", M(3, 2)); │ │ │ │ -103 ar &boost::serialization::make_nvp("Q44", M(3, 3)); │ │ │ │ -104} │ │ │ │ +101 void _p_r_i_n_t(const std::string& s = "theta") const; │ │ │ │ +102 │ │ │ │ +104 bool _e_q_u_a_l_s(const _R_o_t_2& R, double tol = 1e-9) const; │ │ │ │ 105 │ │ │ │ -106/* │ │ │ │ -107 * Define the traits. internal::LieGroup provides both Lie group and │ │ │ │ -Testable │ │ │ │ -108 */ │ │ │ │ 109 │ │ │ │ -110template <> │ │ │ │ -_1_1_1struct _t_r_a_i_t_s<_S_O_4> : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p {}; │ │ │ │ +_1_1_1 inline static _R_o_t_2 _I_d_e_n_t_i_t_y() { return _R_o_t_2(); } │ │ │ │ 112 │ │ │ │ -113template <> │ │ │ │ -_1_1_4struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p {}; │ │ │ │ +_1_1_4 _R_o_t_2 _i_n_v_e_r_s_e() const { return _R_o_t_2(c_, -s_);} │ │ │ │ 115 │ │ │ │ -116} // end namespace gtsam │ │ │ │ -_M_a_t_r_i_x_._h │ │ │ │ -typedef and functions to augment Eigen's MatrixXd │ │ │ │ -_M_a_n_i_f_o_l_d_._h │ │ │ │ -Base class and basic functions for Manifold types. │ │ │ │ +_1_1_7 _R_o_t_2 _o_p_e_r_a_t_o_r_*(const _R_o_t_2& R) const { │ │ │ │ +118 return fromCosSin(c_ * R.c_ - s_ * R.s_, s_ * R.c_ + c_ * R.s_); │ │ │ │ +119 } │ │ │ │ +120 │ │ │ │ +124 │ │ │ │ +126 static _R_o_t_2 Expmap(const Vector1& v, ChartJacobian H = boost::none); │ │ │ │ +127 │ │ │ │ +129 static Vector1 Logmap(const _R_o_t_2& r, ChartJacobian H = boost::none); │ │ │ │ +130 │ │ │ │ +_1_3_2 Matrix1 _A_d_j_o_i_n_t_M_a_p() const { return I_1x1; } │ │ │ │ +133 │ │ │ │ +_1_3_5 static Matrix _E_x_p_m_a_p_D_e_r_i_v_a_t_i_v_e(const Vector& /*v*/) { │ │ │ │ +136 return I_1x1; │ │ │ │ +137 } │ │ │ │ +138 │ │ │ │ +_1_4_0 static Matrix _L_o_g_m_a_p_D_e_r_i_v_a_t_i_v_e(const Vector& /*v*/) { │ │ │ │ +141 return I_1x1; │ │ │ │ +142 } │ │ │ │ +143 │ │ │ │ +144 // Chart at origin simply uses exponential map and its inverse │ │ │ │ +_1_4_5 struct _C_h_a_r_t_A_t_O_r_i_g_i_n { │ │ │ │ +146 static _R_o_t_2 Retract(const Vector1& v, ChartJacobian H = boost::none) { │ │ │ │ +147 return Expmap(v, H); │ │ │ │ +148 } │ │ │ │ +149 static Vector1 Local(const _R_o_t_2& r, ChartJacobian H = boost::none) { │ │ │ │ +150 return Logmap(r, H); │ │ │ │ +151 } │ │ │ │ +152 }; │ │ │ │ +153 │ │ │ │ +154 using _L_i_e_G_r_o_u_p<_R_o_t_2, 1>::inverse; // version with derivative │ │ │ │ +155 │ │ │ │ +159 │ │ │ │ +163 _P_o_i_n_t_2 rotate(const _P_o_i_n_t_2& p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _1_> H1 = boost::none, │ │ │ │ +164 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> H2 = boost::none) const; │ │ │ │ +165 │ │ │ │ +_1_6_7 inline _P_o_i_n_t_2 _o_p_e_r_a_t_o_r_*(const _P_o_i_n_t_2& p) const { │ │ │ │ +168 return rotate(p); │ │ │ │ +169 } │ │ │ │ +170 │ │ │ │ +174 _P_o_i_n_t_2 unrotate(const _P_o_i_n_t_2& p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _1_> H1 = boost::none, │ │ │ │ +175 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> H2 = boost::none) const; │ │ │ │ +176 │ │ │ │ +180 │ │ │ │ +_1_8_2 inline _P_o_i_n_t_2 _u_n_i_t() const { │ │ │ │ +183 return _P_o_i_n_t_2(c_, s_); │ │ │ │ +184 } │ │ │ │ +185 │ │ │ │ +_1_8_7 double _t_h_e_t_a() const { │ │ │ │ +188 return ::atan2(s_, c_); │ │ │ │ +189 } │ │ │ │ +190 │ │ │ │ +_1_9_2 double _d_e_g_r_e_e_s() const { │ │ │ │ +193 const double degree = M_PI / 180; │ │ │ │ +194 return theta() / degree; │ │ │ │ +195 } │ │ │ │ +196 │ │ │ │ +_1_9_8 inline double _c() const { │ │ │ │ +199 return c_; │ │ │ │ +200 } │ │ │ │ +201 │ │ │ │ +_2_0_3 inline double _s() const { │ │ │ │ +204 return s_; │ │ │ │ +205 } │ │ │ │ +206 │ │ │ │ +208 Matrix2 matrix() const; │ │ │ │ +209 │ │ │ │ +211 Matrix2 transpose() const; │ │ │ │ +212 │ │ │ │ +214 static _R_o_t_2 ClosestTo(const Matrix2& M); │ │ │ │ +215 │ │ │ │ +216 private: │ │ │ │ +_2_1_8 friend class boost::serialization::access; │ │ │ │ +219 template │ │ │ │ +220 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ +221 ar & BOOST_SERIALIZATION_NVP(c_); │ │ │ │ +222 ar & BOOST_SERIALIZATION_NVP(s_); │ │ │ │ +223 } │ │ │ │ +224 │ │ │ │ +225 }; │ │ │ │ +226 │ │ │ │ +227 template<> │ │ │ │ +_2_2_8 struct _t_r_a_i_t_s<_R_o_t_2> : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p {}; │ │ │ │ +229 │ │ │ │ +230 template<> │ │ │ │ +_2_3_1 struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p {}; │ │ │ │ +232 │ │ │ │ +233} // gtsam │ │ │ │ _L_i_e_._h │ │ │ │ Base class and basic functions for Lie types. │ │ │ │ -_G_r_o_u_p_._h │ │ │ │ -Concept check class for variable types with Group properties. │ │ │ │ -_S_O_n_._h │ │ │ │ -N*N matrix representation of SO(N). │ │ │ │ +_P_o_i_n_t_2_._h │ │ │ │ +2D Point │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_s_e_r_i_a_l_i_z_e │ │ │ │ -std::string serialize(const T &input) │ │ │ │ -serializes to a string │ │ │ │ -DDeeffiinniittiioonn serialization.h:113 │ │ │ │ -_g_t_s_a_m_:_:_s_t_i_e_f_e_l │ │ │ │ -GTSAM_EXPORT Matrix43 stiefel(const SO4 &Q, OptionalJacobian< 12, 6 > H) │ │ │ │ -Project to Stiefel manifold of 4*3 orthonormal 3-frames in R^4, i.e., pi(Q) - │ │ │ │ -> . │ │ │ │ -DDeeffiinniittiioonn SO4.cpp:220 │ │ │ │ -_g_t_s_a_m_:_:_t_o_p_L_e_f_t │ │ │ │ -GTSAM_EXPORT Matrix3 topLeft(const SO4 &Q, OptionalJacobian< 9, 6 > H) │ │ │ │ -Project to top-left 3*3 matrix. │ │ │ │ -DDeeffiinniittiioonn SO4.cpp:206 │ │ │ │ +_g_t_s_a_m_:_:_p_r_i_n_t │ │ │ │ +void print(const Matrix &A, const string &s, ostream &stream) │ │ │ │ +print without optional string, must specify cout yourself │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:156 │ │ │ │ +_g_t_s_a_m_:_:_P_o_i_n_t_2 │ │ │ │ +Vector2 Point2 │ │ │ │ +As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just │ │ │ │ +typedef Point2 to Vector2... │ │ │ │ +DDeeffiinniittiioonn Point2.h:27 │ │ │ │ +_g_t_s_a_m_:_:_n_o_r_m_a_l_i_z_e │ │ │ │ +Point3 normalize(const Point3 &p, OptionalJacobian< 3, 3 > H) │ │ │ │ +normalize, with optional Jacobian │ │ │ │ +DDeeffiinniittiioonn Point3.cpp:52 │ │ │ │ _g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ that can be centered ... │ │ │ │ DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_<_ _S_O_<_ _N_ _>_,_ _i_n_t_e_r_n_a_l_:_:_D_i_m_e_n_s_i_o_n_S_O_(_N_)_>_:_:_R_e_t_r_a_c_t │ │ │ │ -static SO< N > Retract(const TangentVector &v) │ │ │ │ -Retract at origin: possible in Lie group because it has an identity. │ │ │ │ -DDeeffiinniittiioonn Lie.h:111 │ │ │ │ +_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p │ │ │ │ +A CRTP helper class that implements Lie group methods Prerequisites: methods │ │ │ │ +operator*,... │ │ │ │ +DDeeffiinniittiioonn Lie.h:37 │ │ │ │ _g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p │ │ │ │ Both LieGroupTraits and Testable. │ │ │ │ DDeeffiinniittiioonn Lie.h:229 │ │ │ │ -_g_t_s_a_m_:_:_S_O │ │ │ │ -Manifold of special orthogonal rotation matrices SO. │ │ │ │ -DDeeffiinniittiioonn SOn.h:52 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_E_x_p_m_a_p │ │ │ │ -static SO Expmap(const TangentVector &omega, ChartJacobian H=boost::none) │ │ │ │ -Exponential map at identity - create a rotation from canonical coordinates. │ │ │ │ -DDeeffiinniittiioonn SOn-inl.h:67 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_v_e_c │ │ │ │ -VectorN2 vec(OptionalJacobian< internal::NSquaredSO(N), dimension > H=boost:: │ │ │ │ -none) const │ │ │ │ -Return vectorized rotation matrix in column order. │ │ │ │ -DDeeffiinniittiioonn SOn-inl.h:88 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_V_e_e │ │ │ │ -static TangentVector Vee(const MatrixNN &X) │ │ │ │ -Inverse of Hat. See note about xi element order in Hat. │ │ │ │ -DDeeffiinniittiioonn SOn-inl.h:35 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_A_d_j_o_i_n_t_M_a_p │ │ │ │ -MatrixDD AdjointMap() const │ │ │ │ -Adjoint map. │ │ │ │ -DDeeffiinniittiioonn SO4.cpp:159 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_H_a_t │ │ │ │ -static MatrixNN Hat(const TangentVector &xi) │ │ │ │ -Hat operator creates Lie algebra element corresponding to d-vector, where d is │ │ │ │ -the dimensionality of ... │ │ │ │ -DDeeffiinniittiioonn SOn-inl.h:29 │ │ │ │ +_g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ +OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ +either a fixed size o... │ │ │ │ +DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ +_g_t_s_a_m_:_:_e_q_u_a_l_s │ │ │ │ +Template to create a binary predicate. │ │ │ │ +DDeeffiinniittiioonn Testable.h:111 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2 │ │ │ │ +Rotation matrix NOTE: the angle theta is in radians unless explicitly stated. │ │ │ │ +DDeeffiinniittiioonn Rot2.h:36 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ +Rot2 operator*(const Rot2 &R) const │ │ │ │ +Compose - make a new rotation by adding angles. │ │ │ │ +DDeeffiinniittiioonn Rot2.h:117 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_c │ │ │ │ +double c() const │ │ │ │ +return cos │ │ │ │ +DDeeffiinniittiioonn Rot2.h:198 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_E_x_p_m_a_p_D_e_r_i_v_a_t_i_v_e │ │ │ │ +static Matrix ExpmapDerivative(const Vector &) │ │ │ │ +Left-trivialized derivative of the exponential map. │ │ │ │ +DDeeffiinniittiioonn Rot2.h:135 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_u_n_i_t │ │ │ │ +Point2 unit() const │ │ │ │ +Creates a unit vector as a Point2. │ │ │ │ +DDeeffiinniittiioonn Rot2.h:182 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_t_h_e_t_a │ │ │ │ +double theta() const │ │ │ │ +return angle (RADIANS) │ │ │ │ +DDeeffiinniittiioonn Rot2.h:187 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_i_n_v_e_r_s_e │ │ │ │ +Rot2 inverse() const │ │ │ │ +The inverse rotation - negative angle. │ │ │ │ +DDeeffiinniittiioonn Rot2.h:114 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ +Point2 operator*(const Point2 &p) const │ │ │ │ +syntactic sugar for rotate │ │ │ │ +DDeeffiinniittiioonn Rot2.h:167 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_s │ │ │ │ +double s() const │ │ │ │ +return sin │ │ │ │ +DDeeffiinniittiioonn Rot2.h:203 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_I_d_e_n_t_i_t_y │ │ │ │ +static Rot2 Identity() │ │ │ │ +Identity. │ │ │ │ +DDeeffiinniittiioonn Rot2.h:111 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_d_e_g_r_e_e_s │ │ │ │ +double degrees() const │ │ │ │ +return angle (DEGREES) │ │ │ │ +DDeeffiinniittiioonn Rot2.h:192 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_L_o_g_m_a_p_D_e_r_i_v_a_t_i_v_e │ │ │ │ +static Matrix LogmapDerivative(const Vector &) │ │ │ │ +Left-trivialized derivative inverse of the exponential map. │ │ │ │ +DDeeffiinniittiioonn Rot2.h:140 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_A_d_j_o_i_n_t_M_a_p │ │ │ │ +Matrix1 AdjointMap() const │ │ │ │ +Calculate Adjoint map. │ │ │ │ +DDeeffiinniittiioonn Rot2.h:132 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_R_o_t_2 │ │ │ │ +Rot2(double theta) │ │ │ │ +Constructor from angle in radians == exponential map at identity. │ │ │ │ +DDeeffiinniittiioonn Rot2.h:59 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_f_r_o_m_D_e_g_r_e_e_s │ │ │ │ +static Rot2 fromDegrees(double theta) │ │ │ │ +Named constructor from angle in degrees. │ │ │ │ +DDeeffiinniittiioonn Rot2.h:67 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_R_o_t_2 │ │ │ │ +Rot2() │ │ │ │ +default constructor, zero rotation │ │ │ │ +DDeeffiinniittiioonn Rot2.h:53 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_R_o_t_2 │ │ │ │ +Rot2(const Rot2 &r) │ │ │ │ +copy constructor │ │ │ │ +DDeeffiinniittiioonn Rot2.h:56 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_f_r_o_m_A_n_g_l_e │ │ │ │ +static Rot2 fromAngle(double theta) │ │ │ │ +Named constructor from angle in radians. │ │ │ │ +DDeeffiinniittiioonn Rot2.h:62 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_2_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ +DDeeffiinniittiioonn Rot2.h:145 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_O_4_._h │ │ │ │ + * _R_o_t_2_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00335.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SO4.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3_S2.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,46 +96,40 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Namespaces | │ │ │ Functions
    │ │ │ -
    SO4.cpp File Reference
    │ │ │ +
    Cal3_S2.cpp File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    4*4 matrix representation of SO(4) │ │ │ +

    The most common 5DOF 3D->2D calibration. │ │ │ More...

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │

    │ │ │ Functions

    GTSAM_EXPORT Matrix3 gtsam::topLeft (const SO4 &Q, OptionalJacobian< 9, 6 > H=boost::none)
     Project to top-left 3*3 matrix.
     
    │ │ │ -GTSAM_EXPORT Matrix43 gtsam::stiefel (const SO4 &Q, OptionalJacobian< 12, 6 > H=boost::none)
     Project to Stiefel manifold of 4*3 orthonormal 3-frames in R^4, i.e., pi(Q) -> \( S \in St(3,4) \).
     
    │ │ │ +std::ostream & gtsam::operator<< (std::ostream &os, const Cal3_S2 &cal)
     
    │ │ │

    Detailed Description

    │ │ │ -

    4*4 matrix representation of SO(4)

    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ -
    │ │ │ -Luca Carlone
    │ │ │ +

    The most common 5DOF 3D->2D calibration.

    │ │ │ +
    Author
    Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,31 +1,23 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -SO4.cpp File Reference │ │ │ │ -4*4 matrix representation of SO(4) _M_o_r_e_._._. │ │ │ │ +Cal3_S2.cpp File Reference │ │ │ │ +The most common 5DOF 3D->2D calibration. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ - GTSAM_EXPORT Matrix3  _g_t_s_a_m_:_:_t_o_p_L_e_f_t (const _S_O_4 &Q, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 9, 6 > │ │ │ │ - H=boost::none) │ │ │ │ -  Project to top-left 3*3 matrix. │ │ │ │ -  │ │ │ │ -GTSAM_EXPORT Matrix43  ggttssaamm::::ssttiieeffeell (const _S_O_4 &Q, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 12, 6 > │ │ │ │ - H=boost::none) │ │ │ │ -  Project to Stiefel manifold of 4*3 orthonormal 3-frames │ │ │ │ - in R^4, i.e., pi(Q) -> \( S \in St(3,4) \). │ │ │ │ +std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _C_a_l_3___S_2 &cal) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -4*4 matrix representation of SO(4) │ │ │ │ +The most common 5DOF 3D->2D calibration. │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - Luca Carlone │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_O_4_._c_p_p │ │ │ │ + * _C_a_l_3___S_2_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00338.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SO3.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Similarity3.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,117 +94,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Typedefs | │ │ │ Functions
    │ │ │ -
    SO3.h File Reference
    │ │ │ +
    Similarity3.cpp File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    3*3 matrix representation of SO(3) │ │ │ +

    Implementation of Similarity3 transform. │ │ │ More...

    │ │ │ - │ │ │ -

    Go to the source code of this file.

    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Classes

    class  gtsam::so3::ExpmapFunctor
     Functor implementing Exponential map. More...
     
    class  gtsam::so3::DexpFunctor
     Functor that implements Exponential map and its derivatives. More...
     
    struct  gtsam::traits< SO3 >
     
    struct  gtsam::traits< const SO3 >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Typedefs

    │ │ │ -using gtsam::SO3 = SO< 3 >
     
    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │

    │ │ │ Functions

    │ │ │ -template<class Archive >
    void gtsam::serialize (Archive &ar, SO3 &R, const unsigned int)
     Serialization function.
     
    GTSAM_EXPORT Matrix3 gtsam::so3::compose (const Matrix3 &M, const SO3 &R, OptionalJacobian< 9, 9 > H=boost::none)
     Compose general matrix with an SO(3) element.
     
    │ │ │ -GTSAM_EXPORT Matrix99 gtsam::so3::Dcompose (const SO3 &R)
     (constant) Jacobian of compose wrpt M
     
    │ │ │ +std::ostream & gtsam::operator<< (std::ostream &os, const Similarity3 &p)
     
    │ │ │

    Detailed Description

    │ │ │ -

    3*3 matrix representation of SO(3)

    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ +

    Implementation of Similarity3 transform.

    │ │ │ +
    Author
    Paul Drews
    │ │ │
    │ │ │ -Luca Carlone
    │ │ │ -
    │ │ │ -Duy Nguyen Ta
    │ │ │ -
    Date
    December 2014
    │ │ │ -

    Function Documentation

    │ │ │ - │ │ │ -

    ◆ compose()

    │ │ │ - │ │ │ -
    │ │ │ -
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
    GTSAM_EXPORT Matrix3 gtsam::so3::compose (const Matrix3 & M,
    const SO3R,
    OptionalJacobian< 9, 9 > H = boost::none 
    )
    │ │ │ -
    │ │ │ - │ │ │ -

    Compose general matrix with an SO(3) element.

    │ │ │ -

    We only provide the 9*9 derivative in the first argument M.

    │ │ │ - │ │ │ -
    │ │ │ -
    │ │ │ -
    │ │ │ +John Lambert │ │ │ +
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,61 +1,24 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -SO3.h File Reference │ │ │ │ -3*3 matrix representation of SO(3) _M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_s_o_3_:_:_E_x_p_m_a_p_F_u_n_c_t_o_r │ │ │ │ -  Functor implementing Exponential map. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ - class   _g_t_s_a_m_:_:_s_o_3_:_:_D_e_x_p_F_u_n_c_t_o_r │ │ │ │ -  Functor that implements Exponential map aanndd its derivatives. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _S_O_3_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _S_O_3_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Similarity3.cpp File Reference │ │ │ │ +Implementation of Similarity3 transform. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -using  ggttssaamm::::SSOO33 = _S_O< 3 > │ │ │ │ -  │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ - void  ggttssaamm::::sseerriiaalliizzee (Archive &ar, _S_O_3 &R, const unsigned │ │ │ │ - int) │ │ │ │ -  Serialization function. │ │ │ │ -  │ │ │ │ - GTSAM_EXPORT Matrix3  _g_t_s_a_m_:_:_s_o_3_:_:_c_o_m_p_o_s_e (const Matrix3 &M, const _S_O_3 &R, │ │ │ │ - _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 9, 9 > H=boost::none) │ │ │ │ -  Compose general matrix with an SO(3) element. │ │ │ │ -  │ │ │ │ -GTSAM_EXPORT Matrix99  ggttssaamm::::ssoo33::::DDccoommppoossee (const _S_O_3 &R) │ │ │ │ -  (constant) Jacobian of compose wrpt M │ │ │ │ +std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _S_i_m_i_l_a_r_i_t_y_3 &p) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -3*3 matrix representation of SO(3) │ │ │ │ +Implementation of Similarity3 transform. │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ - Luca Carlone │ │ │ │ - Duy Nguyen Ta │ │ │ │ - Date │ │ │ │ - December 2014 │ │ │ │ -********** FFuunnccttiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? ccoommppoossee(()) ********** │ │ │ │ -GTSAM_EXPORT Matrix3 gtsam::so3:: ( const Matrix3 &  MM, │ │ │ │ -compose │ │ │ │ - const _S_O_3 &  RR, │ │ │ │ - _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 9, 9 >  HH = boost::none  │ │ │ │ - ) │ │ │ │ -Compose general matrix with an SO(3) element. │ │ │ │ -We only provide the 9*9 derivative in the first argument M. │ │ │ │ + Paul Drews │ │ │ │ + John Lambert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_O_3_._h │ │ │ │ + * _S_i_m_i_l_a_r_i_t_y_3_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00341.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SO3.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Point3.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,87 +96,62 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Namespaces | │ │ │ Functions
    │ │ │ -
    SO3.cpp File Reference
    │ │ │ +
    Point3.cpp File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    3*3 matrix representation of SO(3) │ │ │ +

    3D Point │ │ │ More...

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ Functions

    │ │ │ -GTSAM_EXPORT Matrix99 gtsam::so3::Dcompose (const SO3 &R)
     (constant) Jacobian of compose wrpt M
     
    GTSAM_EXPORT Matrix3 gtsam::so3::compose (const Matrix3 &M, const SO3 &R, OptionalJacobian< 9, 9 > H=boost::none)
     Compose general matrix with an SO(3) element.
     
    │ │ │ +double gtsam::distance3 (const Point3 &p1, const Point3 &q, OptionalJacobian< 1, 3 > H1=boost::none, OptionalJacobian< 1, 3 > H2=boost::none)
     distance between two points
     
    │ │ │ +double gtsam::norm3 (const Point3 &p, OptionalJacobian< 1, 3 > H=boost::none)
     Distance of the point from the origin, with Jacobian.
     
    │ │ │ +Point3 gtsam::normalize (const Point3 &p, OptionalJacobian< 3, 3 > H=boost::none)
     normalize, with optional Jacobian
     
    Point3 gtsam::cross (const Point3 &p, const Point3 &q, OptionalJacobian< 3, 3 > H_p=boost::none, OptionalJacobian< 3, 3 > H_q=boost::none)
     cross product
     
    │ │ │ +double gtsam::dot (const Point3 &p, const Point3 &q, OptionalJacobian< 1, 3 > H_p=boost::none, OptionalJacobian< 1, 3 > H_q=boost::none)
     dot product
     
    │ │ │ +Point3Pair gtsam::means (const std::vector< Point3Pair > &abPointPairs)
     Calculate the two means of a set of Point3 pairs.
     
    │ │ │ +ostream & gtsam::operator<< (ostream &os, const gtsam::Point3Pair &p)
     
    │ │ │

    Detailed Description

    │ │ │ -

    3*3 matrix representation of SO(3)

    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ -
    │ │ │ -Luca Carlone
    │ │ │ -
    │ │ │ -Duy Nguyen Ta
    │ │ │ -
    Date
    December 2014
    │ │ │ -

    Function Documentation

    │ │ │ - │ │ │ -

    ◆ compose()

    │ │ │ - │ │ │ -
    │ │ │ -
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
    GTSAM_EXPORT Matrix3 gtsam::so3::compose (const Matrix3 & M,
    const SO3R,
    OptionalJacobian< 9, 9 > H = boost::none 
    )
    │ │ │ -
    │ │ │ - │ │ │ -

    Compose general matrix with an SO(3) element.

    │ │ │ -

    We only provide the 9*9 derivative in the first argument M.

    │ │ │ - │ │ │ -
    │ │ │ -
    │ │ │ -
    │ │ │ +

    3D Point

    │ │ │ +
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,41 +1,45 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -SO3.cpp File Reference │ │ │ │ -3*3 matrix representation of SO(3) _M_o_r_e_._._. │ │ │ │ +Point3.cpp File Reference │ │ │ │ +3D Point _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -GTSAM_EXPORT Matrix99  ggttssaamm::::ssoo33::::DDccoommppoossee (const _S_O_3 &R) │ │ │ │ -  (constant) Jacobian of compose wrpt M │ │ │ │ + double  ggttssaamm::::ddiissttaannccee33 (const _P_o_i_n_t_3 &p1, const _P_o_i_n_t_3 &q, │ │ │ │ + _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 3 > H1=boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 3 > │ │ │ │ + H2=boost::none) │ │ │ │ +  distance between two points │ │ │ │   │ │ │ │ - GTSAM_EXPORT Matrix3  _g_t_s_a_m_:_:_s_o_3_:_:_c_o_m_p_o_s_e (const Matrix3 &M, const _S_O_3 &R, │ │ │ │ - _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 9, 9 > H=boost::none) │ │ │ │ -  Compose general matrix with an SO(3) element. │ │ │ │ + double  ggttssaamm::::nnoorrmm33 (const _P_o_i_n_t_3 &p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 3 > H=boost:: │ │ │ │ + none) │ │ │ │ +  Distance of the point from the origin, with Jacobian. │ │ │ │ +  │ │ │ │ + _P_o_i_n_t_3  ggttssaamm::::nnoorrmmaalliizzee (const _P_o_i_n_t_3 &p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 3, 3 > │ │ │ │ + H=boost::none) │ │ │ │ +  normalize, with optional Jacobian │ │ │ │ +  │ │ │ │ + _P_o_i_n_t_3  _g_t_s_a_m_:_:_c_r_o_s_s (const _P_o_i_n_t_3 &p, const _P_o_i_n_t_3 &q, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< │ │ │ │ + 3, 3 > H_p=boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 3, 3 > H_q=boost::none) │ │ │ │ +  cross product │ │ │ │ +  │ │ │ │ + double  ggttssaamm::::ddoott (const _P_o_i_n_t_3 &p, const _P_o_i_n_t_3 &q, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, │ │ │ │ + 3 > H_p=boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 3 > H_q=boost::none) │ │ │ │ +  dot product │ │ │ │ +  │ │ │ │ +Point3Pair  ggttssaamm::::mmeeaannss (const std::vector< Point3Pair > &abPointPairs) │ │ │ │ +  Calculate the two means of a set of Point3 pairs. │ │ │ │ +  │ │ │ │ + ostream &  ggttssaamm::::ooppeerraattoorr<<<< (ostream &os, const gtsam::Point3Pair &p) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -3*3 matrix representation of SO(3) │ │ │ │ - Author │ │ │ │ - Frank Dellaert │ │ │ │ - Luca Carlone │ │ │ │ - Duy Nguyen Ta │ │ │ │ - Date │ │ │ │ - December 2014 │ │ │ │ -********** FFuunnccttiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? ccoommppoossee(()) ********** │ │ │ │ -GTSAM_EXPORT Matrix3 gtsam::so3:: ( const Matrix3 &  MM, │ │ │ │ -compose │ │ │ │ - const _S_O_3 &  RR, │ │ │ │ - _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 9, 9 >  HH = boost::none  │ │ │ │ - ) │ │ │ │ -Compose general matrix with an SO(3) element. │ │ │ │ -We only provide the 9*9 derivative in the first argument M. │ │ │ │ +3D Point │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_O_3_._c_p_p │ │ │ │ + * _P_o_i_n_t_3_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00341.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,8 @@ │ │ │ │ var a00341 = [ │ │ │ │ - ["compose", "a00341.html#a72fc8b10f24d82aa8a4c99f99403fe5e", null], │ │ │ │ - ["Dcompose", "a00341.html#a7c7e26b6d07ec0f16363c196247b294d", null] │ │ │ │ + ["cross", "a00341.html#a86bf6ed2ffb0ecc42a7deb8922f4ca4f", null], │ │ │ │ + ["distance3", "a00341.html#aa42f7ec660b7353de39f9c86a26711cc", null], │ │ │ │ + ["dot", "a00341.html#a7dc820e4e47218768f104b43a184a1bd", null], │ │ │ │ + ["means", "a00341.html#a57f778b84bc6106471006421d289b832", null], │ │ │ │ + ["norm3", "a00341.html#ac37b6f807985ffd25217e33f6136fe58", null], │ │ │ │ + ["normalize", "a00341.html#abb52bb00c68909fc1147e5d112e8c2ae", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00344.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Rot3Q.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3DS2.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -93,27 +93,42 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    Rot3Q.cpp File Reference
    │ │ │ +
    │ │ │ +Namespaces | │ │ │ +Functions
    │ │ │ +
    Cal3DS2.cpp File Reference
    │ │ │
    │ │ │
    │ │ │ - │ │ │ -

    Rotation (internal: quaternion representation*) │ │ │ -More...

    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Functions

    │ │ │ +std::ostream & gtsam::operator<< (std::ostream &os, const Cal3DS2 &cal)
     
    │ │ │

    Detailed Description

    │ │ │ -

    Rotation (internal: quaternion representation*)

    │ │ │ -
    Author
    Richard Roberts
    │ │ │ +
    Date
    Feb 28, 2010
    │ │ │ +
    Author
    ydjian
    │ │ │ +
    │ │ │ +Varun Agrawal
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,15 +1,24 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Rot3Q.cpp File Reference │ │ │ │ -Rotation (internal: quaternion representation*) _M_o_r_e_._._. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Cal3DS2.cpp File Reference │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _g_t_s_a_m │ │ │ │ +  Global functions in a separate testing namespace. │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _C_a_l_3_D_S_2 &cal) │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Rotation (internal: quaternion representation*) │ │ │ │ + Date │ │ │ │ + Feb 28, 2010 │ │ │ │ Author │ │ │ │ - Richard Roberts │ │ │ │ + ydjian │ │ │ │ + Varun Agrawal │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _R_o_t_3_Q_._c_p_p │ │ │ │ + * _C_a_l_3_D_S_2_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00347.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Rot3M.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3Bundler.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,41 +94,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Namespaces
    │ │ │ -
    Rot3M.cpp File Reference
    │ │ │ +Namespaces | │ │ │ +Functions
    │ │ │ +
    Cal3Bundler.cpp File Reference
    │ │ │ │ │ │
    │ │ │ - │ │ │ -

    Rotation (internal: 3*3 matrix representation*) │ │ │ -More...

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ +Functions

    │ │ │ +std::ostream & gtsam::operator<< (std::ostream &os, const Cal3Bundler &cal)
     
    │ │ │

    Detailed Description

    │ │ │ -

    Rotation (internal: 3*3 matrix representation*)

    │ │ │ -
    Author
    Alireza Fathi
    │ │ │ -
    │ │ │ -Christian Potthast
    │ │ │ -
    │ │ │ -Frank Dellaert
    │ │ │ -
    │ │ │ -Richard Roberts
    │ │ │ +
    Date
    Sep 25, 2010
    │ │ │ +
    Author
    ydjian
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,23 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -Rot3M.cpp File Reference │ │ │ │ -Rotation (internal: 3*3 matrix representation*) _M_o_r_e_._._. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Cal3Bundler.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _C_a_l_3_B_u_n_d_l_e_r &cal) │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Rotation (internal: 3*3 matrix representation*) │ │ │ │ + Date │ │ │ │ + Sep 25, 2010 │ │ │ │ Author │ │ │ │ - Alireza Fathi │ │ │ │ - Christian Potthast │ │ │ │ - Frank Dellaert │ │ │ │ - Richard Roberts │ │ │ │ + ydjian │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _R_o_t_3_M_._c_p_p │ │ │ │ + * _C_a_l_3_B_u_n_d_l_e_r_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00350.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Rot3.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/BearingRange.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,83 +95,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Macros | │ │ │ -Typedefs | │ │ │ -Functions
    │ │ │ -
    Rot3.h File Reference
    │ │ │ +Namespaces
    │ │ │ +
    BearingRange.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    3D rotation represented as a rotation matrix or quaternion │ │ │ +

    Bearing-Range product. │ │ │ More...

    │ │ │ │ │ │

    Go to the source code of this file.

    │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ │ │ │

    │ │ │ Classes

    class  gtsam::Rot3
     Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIONS is not defined, or as a quaternion if it is defined. More...
    struct  gtsam::BearingRange< A1, A2, B, R >
     Bearing-Range product for a particular A1,A2 combination will use the functors above to create a similar functor of type A1*A2 -> pair<Bearing::return_type,Range::return_type> For example BearingRange<Pose2,Point2>(pose,point) will return pair<Rot2,double> and BearingRange<Pose3,Point3>(pose,point) will return pair<Unit3,double> More...
     
    struct  gtsam::Rot3::CayleyChart
    struct  gtsam::traits< BearingRange< A1, A2 > >
     
    struct  gtsam::Rot3::ChartAtOrigin
    struct  gtsam::HasBearing< A1, A2, RT >
     
    struct  gtsam::traits< Rot3 >
     
    struct  gtsam::traits< const Rot3 >
    struct  gtsam::HasRange< A1, A2, RT >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Macros

    │ │ │ -#define ROT3_DEFAULT_COORDINATES_MODE   Rot3::CAYLEY
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Typedefs

    │ │ │ -using gtsam::Rot3Vector = std::vector< Rot3, Eigen::aligned_allocator< Rot3 > >
     std::vector of Rot3s, mainly for wrapper
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

    │ │ │ -Functions

    pair< Matrix3, Vector3 > gtsam::RQ (const Matrix3 &A, OptionalJacobian< 3, 9 > H=boost::none)
     [RQ] receives a 3 by 3 matrix and returns an upper triangular matrix R and 3 rotation angles corresponding to the rotation matrix Q=Qz'*Qy'*Qx' such that A = R*Q = R*Qz'*Qy'*Qx'.
     
    │ │ │

    Detailed Description

    │ │ │ -

    3D rotation represented as a rotation matrix or quaternion

    │ │ │ -
    Author
    Alireza Fathi
    │ │ │ -
    │ │ │ -Christian Potthast
    │ │ │ -
    │ │ │ -Frank Dellaert
    │ │ │ -
    │ │ │ -Richard Roberts
    │ │ │ -
    │ │ │ -Luca Carlone
    │ │ │ -
    │ │ │ -Varun Agrawal
    │ │ │ +

    Bearing-Range product.

    │ │ │ +
    Date
    July, 2015
    │ │ │ +
    Author
    Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,56 +1,38 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Rot3.h File Reference │ │ │ │ -3D rotation represented as a rotation matrix or quaternion _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +BearingRange.h File Reference │ │ │ │ +Bearing-Range product. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_R_o_t_3 │ │ │ │ - _R_o_t_3 is a 3D rotation represented as a rotation matrix if the │ │ │ │ -  preprocessor symbol GTSAM_USE_QUATERNIONS is not defined, or as a │ │ │ │ - quaternion if it is defined. _M_o_r_e_._._. │ │ │ │ +struct   _g_t_s_a_m_:_:_B_e_a_r_i_n_g_R_a_n_g_e_<_ _A_1_,_ _A_2_,_ _B_,_ _R_ _> │ │ │ │ + Bearing-Range product for a particular A1,A2 combination will use the │ │ │ │ + functors above to create a similar functor of type A1*A2 - │ │ │ │ +  > pair For example │ │ │ │ + BearingRange(pose,point) will return pair │ │ │ │ + and BearingRange(pose,point) will return │ │ │ │ + pair _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_R_o_t_3_:_:_C_a_y_l_e_y_C_h_a_r_t │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _B_e_a_r_i_n_g_R_a_n_g_e_<_ _A_1_,_ _A_2_ _>_ _> │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_R_o_t_3_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ +struct   _g_t_s_a_m_:_:_H_a_s_B_e_a_r_i_n_g_<_ _A_1_,_ _A_2_,_ _R_T_ _> │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _R_o_t_3_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _R_o_t_3_ _> │ │ │ │ +struct   _g_t_s_a_m_:_:_H_a_s_R_a_n_g_e_<_ _A_1_,_ _A_2_,_ _R_T_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  RROOTT33__DDEEFFAAUULLTT__CCOOOORRDDIINNAATTEESS__MMOODDEE   Rot3::CAYLEY │ │ │ │ -  │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -using  ggttssaamm::::RRoott33VVeeccttoorr = std::vector< _R_o_t_3, Eigen::aligned_allocator< _R_o_t_3 > │ │ │ │ - > │ │ │ │ -  std::vector of Rot3s, mainly for wrapper │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -pair< Matrix3, Vector3 >  _g_t_s_a_m_:_:_R_Q (const Matrix3 &A, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 3, 9 > │ │ │ │ - H=boost::none) │ │ │ │ - [RQ] receives a 3 by 3 matrix and returns an upper │ │ │ │ -  triangular matrix R and 3 rotation angles │ │ │ │ - corresponding to the rotation matrix Q=Qz'*Qy'*Qx' │ │ │ │ - such that A = R*Q = R*Qz'*Qy'*Qx'. │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -3D rotation represented as a rotation matrix or quaternion │ │ │ │ +Bearing-Range product. │ │ │ │ + Date │ │ │ │ + July, 2015 │ │ │ │ Author │ │ │ │ - Alireza Fathi │ │ │ │ - Christian Potthast │ │ │ │ Frank Dellaert │ │ │ │ - Richard Roberts │ │ │ │ - Luca Carlone │ │ │ │ - Varun Agrawal │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _R_o_t_3_._h │ │ │ │ + * _B_e_a_r_i_n_g_R_a_n_g_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00350.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,8 +1,6 @@ │ │ │ │ var a00350 = [ │ │ │ │ - ["gtsam::Rot3::CayleyChart", "a03232.html", null], │ │ │ │ - ["gtsam::Rot3::ChartAtOrigin", "a03236.html", null], │ │ │ │ - ["gtsam::traits< Rot3 >", "a03240.html", null], │ │ │ │ - ["gtsam::traits< const Rot3 >", "a03244.html", null], │ │ │ │ - ["Rot3Vector", "a00350.html#a52e26554234edf7de94a5e43dd0bcbf9", null], │ │ │ │ - ["RQ", "a00350.html#a5172b5b6d51bd5348c7e551e1376f60a", null] │ │ │ │ + ["gtsam::BearingRange< A1, A2, B, R >", "a02924.html", "a02924"], │ │ │ │ + ["gtsam::traits< BearingRange< A1, A2 > >", "a02928.html", null], │ │ │ │ + ["gtsam::HasBearing< A1, A2, RT >", "a02932.html", null], │ │ │ │ + ["gtsam::HasRange< A1, A2, RT >", "a02936.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00350_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Rot3.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/BearingRange.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,443 +98,228 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    Rot3.h
    │ │ │ +
    BearingRange.h
    │ │ │
    │ │ │
    │ │ │ Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │
    4 * Atlanta, Georgia 30332-0415
    │ │ │
    5 * All Rights Reserved
    │ │ │
    6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
    │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │ -
    22// \callgraph
    │ │ │ -
    23
    │ │ │ -
    24#pragma once
    │ │ │ -
    25
    │ │ │ -
    26#include <gtsam/geometry/Unit3.h>
    │ │ │ - │ │ │ -
    28#include <gtsam/geometry/SO3.h>
    │ │ │ -
    29#include <gtsam/base/concepts.h>
    │ │ │ -
    30#include <gtsam/config.h> // Get GTSAM_USE_QUATERNIONS macro
    │ │ │ -
    31
    │ │ │ -
    32#include <random>
    │ │ │ -
    33
    │ │ │ -
    34// You can override the default coordinate mode using this flag
    │ │ │ -
    35#ifndef ROT3_DEFAULT_COORDINATES_MODE
    │ │ │ -
    36 #ifdef GTSAM_USE_QUATERNIONS
    │ │ │ -
    37 // Exponential map is very cheap for quaternions
    │ │ │ -
    38 #define ROT3_DEFAULT_COORDINATES_MODE Rot3::EXPMAP
    │ │ │ -
    39 #else
    │ │ │ -
    40 // If user doesn't require GTSAM_ROT3_EXPMAP in cmake when building
    │ │ │ -
    41 #ifndef GTSAM_ROT3_EXPMAP
    │ │ │ -
    42 // For rotation matrices, the Cayley transform is a fast retract alternative
    │ │ │ -
    43 #define ROT3_DEFAULT_COORDINATES_MODE Rot3::CAYLEY
    │ │ │ -
    44 #else
    │ │ │ -
    45 #define ROT3_DEFAULT_COORDINATES_MODE Rot3::EXPMAP
    │ │ │ -
    46 #endif
    │ │ │ -
    47 #endif
    │ │ │ -
    48#endif
    │ │ │ -
    49
    │ │ │ -
    50namespace gtsam {
    │ │ │ -
    51
    │ │ │ -
    │ │ │ -
    58class GTSAM_EXPORT Rot3 : public LieGroup<Rot3, 3> {
    │ │ │ -
    59 private:
    │ │ │ +
    19#pragma once
    │ │ │ +
    20
    │ │ │ +
    21#include <gtsam/base/Manifold.h>
    │ │ │ +
    22#include <gtsam/base/Testable.h>
    │ │ │ + │ │ │ +
    24#include <boost/concept/assert.hpp>
    │ │ │ +
    25#include <boost/serialization/nvp.hpp>
    │ │ │ +
    26#include <iostream>
    │ │ │ +
    27
    │ │ │ +
    28namespace gtsam {
    │ │ │ +
    29
    │ │ │ +
    30// Forward declaration of Bearing functor which should be of A1*A2 -> return_type
    │ │ │ +
    31// For example Bearing<Pose3,Point3>(pose,point), defined in Pose3.h will return Unit3
    │ │ │ +
    32// At time of writing only Pose2 and Pose3 specialize this functor.
    │ │ │ +
    33template <typename A1, typename A2>
    │ │ │ +
    34struct Bearing;
    │ │ │ +
    35
    │ │ │ +
    36// Forward declaration of Range functor which should be of A1*A2 -> return_type
    │ │ │ +
    37// For example Range<Pose2,Pose2>(T1,T2), defined in Pose2.h will return double
    │ │ │ +
    38// At time of writing Pose2, Pose3, and several Camera variants specialize this for several types
    │ │ │ +
    39template <typename A1, typename A2>
    │ │ │ +
    40struct Range;
    │ │ │ +
    41
    │ │ │ +
    48template <typename A1, typename A2,
    │ │ │ +
    49 typename B = typename Bearing<A1, A2>::result_type,
    │ │ │ +
    50 typename R = typename Range<A1, A2>::result_type>
    │ │ │ +
    │ │ │ + │ │ │ +
    52private:
    │ │ │ +
    53 B bearing_;
    │ │ │ +
    54 R range_;
    │ │ │ +
    55
    │ │ │ +
    56public:
    │ │ │ +
    57 enum { dimB = traits<B>::dimension };
    │ │ │ +
    58 enum { dimR = traits<R>::dimension };
    │ │ │ +
    59 enum { dimension = dimB + dimR };
    │ │ │
    60
    │ │ │ -
    61#ifdef GTSAM_USE_QUATERNIONS
    │ │ │ -
    63 gtsam::Quaternion quaternion_;
    │ │ │ -
    64#else
    │ │ │ -
    65 SO3 rot_;
    │ │ │ -
    66#endif
    │ │ │ -
    67
    │ │ │ -
    68 public:
    │ │ │ -
    71
    │ │ │ -
    73 Rot3();
    │ │ │ -
    74
    │ │ │ -
    81 Rot3(const Point3& col1, const Point3& col2, const Point3& col3);
    │ │ │ -
    82
    │ │ │ -
    84 Rot3(double R11, double R12, double R13,
    │ │ │ -
    85 double R21, double R22, double R23,
    │ │ │ -
    86 double R31, double R32, double R33);
    │ │ │ -
    87
    │ │ │ -
    95 template <typename Derived>
    │ │ │ -
    96#ifdef GTSAM_USE_QUATERNIONS
    │ │ │ -
    97 explicit Rot3(const Eigen::MatrixBase<Derived>& R) {
    │ │ │ -
    98 quaternion_ = Matrix3(R);
    │ │ │ -
    99 }
    │ │ │ -
    100#else
    │ │ │ +
    63
    │ │ │ +
    64 BearingRange() {}
    │ │ │ +
    65 BearingRange(const B& b, const R& r) : bearing_(b), range_(r) {}
    │ │ │ +
    66
    │ │ │ +
    70
    │ │ │ +
    72 const B& bearing() const { return bearing_; }
    │ │ │ +
    73
    │ │ │ +
    75 const R& range() const { return range_; }
    │ │ │ +
    76
    │ │ │ +
    │ │ │ + │ │ │ +
    79 const A1& a1, const A2& a2,
    │ │ │ +
    80 OptionalJacobian<dimension, traits<A1>::dimension> H1 = boost::none,
    │ │ │ +
    81 OptionalJacobian<dimension, traits<A2>::dimension> H2 = boost::none) {
    │ │ │ +
    82 typename MakeJacobian<B, A1>::type HB1;
    │ │ │ +
    83 typename MakeJacobian<B, A2>::type HB2;
    │ │ │ +
    84 typename MakeJacobian<R, A1>::type HR1;
    │ │ │ +
    85 typename MakeJacobian<R, A2>::type HR2;
    │ │ │ +
    86
    │ │ │ +
    87 B b = Bearing<A1, A2>()(a1, a2, H1 ? &HB1 : 0, H2 ? &HB2 : 0);
    │ │ │ +
    88 R r = Range<A1, A2>()(a1, a2, H1 ? &HR1 : 0, H2 ? &HR2 : 0);
    │ │ │ +
    89
    │ │ │ +
    90 if (H1) *H1 << HB1, HR1;
    │ │ │ +
    91 if (H2) *H2 << HB2, HR2;
    │ │ │ +
    92 return BearingRange(b, r);
    │ │ │ +
    93 }
    │ │ │ +
    │ │ │ +
    94
    │ │ │ +
    │ │ │ +
    96 static B MeasureBearing(const A1& a1, const A2& a2) {
    │ │ │ +
    97 return Bearing<A1, A2>()(a1, a2);
    │ │ │ +
    98 }
    │ │ │ +
    │ │ │ +
    99
    │ │ │
    │ │ │ -
    101 explicit Rot3(const Eigen::MatrixBase<Derived>& R) : rot_(R) {
    │ │ │ -
    102 }
    │ │ │ +
    101 static R MeasureRange(const A1& a1, const A2& a2) {
    │ │ │ +
    102 return Range<A1, A2>()(a1, a2);
    │ │ │ +
    103 }
    │ │ │
    │ │ │ -
    103#endif
    │ │ │
    104
    │ │ │ -
    109#ifdef GTSAM_USE_QUATERNIONS
    │ │ │ -
    110 explicit Rot3(const Matrix3& R) : quaternion_(R) {}
    │ │ │ -
    111#else
    │ │ │ -
    112 explicit Rot3(const Matrix3& R) : rot_(R) {}
    │ │ │ -
    113#endif
    │ │ │ -
    114
    │ │ │ -
    118#ifdef GTSAM_USE_QUATERNIONS
    │ │ │ -
    119 explicit Rot3(const SO3& R) : quaternion_(R.matrix()) {}
    │ │ │ -
    120#else
    │ │ │ -
    121 explicit Rot3(const SO3& R) : rot_(R) {}
    │ │ │ -
    122#endif
    │ │ │ -
    123
    │ │ │ -
    128 Rot3(const Quaternion& q);
    │ │ │ -
    129 Rot3(double w, double x, double y, double z) : Rot3(Quaternion(w, x, y, z)) {}
    │ │ │ -
    130
    │ │ │ -
    137 static Rot3 Random(std::mt19937 & rng);
    │ │ │ -
    138
    │ │ │ -
    140 virtual ~Rot3() {}
    │ │ │ -
    141
    │ │ │ -
    142 /* Static member function to generate some well known rotations */
    │ │ │ -
    143
    │ │ │ -
    145 static Rot3 Rx(double t);
    │ │ │ -
    146
    │ │ │ -
    148 static Rot3 Ry(double t);
    │ │ │ -
    149
    │ │ │ -
    151 static Rot3 Rz(double t);
    │ │ │ -
    152
    │ │ │ -
    154 static Rot3 RzRyRx(double x, double y, double z,
    │ │ │ -
    155 OptionalJacobian<3, 1> Hx = boost::none,
    │ │ │ -
    156 OptionalJacobian<3, 1> Hy = boost::none,
    │ │ │ -
    157 OptionalJacobian<3, 1> Hz = boost::none);
    │ │ │ +
    108
    │ │ │ +
    109 void print(const std::string& str = "") const {
    │ │ │ +
    110 std::cout << str;
    │ │ │ +
    111 traits<B>::Print(bearing_, "bearing ");
    │ │ │ +
    112 traits<R>::Print(range_, "range ");
    │ │ │ +
    113 }
    │ │ │ +
    114 bool equals(const BearingRange<A1, A2>& m2, double tol = 1e-8) const {
    │ │ │ +
    115 return traits<B>::Equals(bearing_, m2.bearing_, tol) &&
    │ │ │ +
    116 traits<R>::Equals(range_, m2.range_, tol);
    │ │ │ +
    117 }
    │ │ │ +
    118
    │ │ │ +
    122
    │ │ │ +
    123 inline static size_t Dim() { return dimension; }
    │ │ │ +
    124 inline size_t dim() const { return dimension; }
    │ │ │ +
    125
    │ │ │ +
    126 typedef Eigen::Matrix<double, dimension, 1> TangentVector;
    │ │ │ +
    127 typedef OptionalJacobian<dimension, dimension> ChartJacobian;
    │ │ │ +
    128
    │ │ │ +
    │ │ │ +
    130 BearingRange retract(const TangentVector& xi) const {
    │ │ │ +
    131 B m1 = traits<B>::Retract(bearing_, xi.template head<dimB>());
    │ │ │ +
    132 R m2 = traits<R>::Retract(range_, xi.template tail<dimR>());
    │ │ │ +
    133 return BearingRange(m1, m2);
    │ │ │ +
    134 }
    │ │ │ +
    │ │ │ +
    135
    │ │ │ +
    │ │ │ +
    137 TangentVector localCoordinates(const BearingRange& other) const {
    │ │ │ +
    138 typename traits<B>::TangentVector v1 = traits<B>::Local(bearing_, other.bearing_);
    │ │ │ +
    139 typename traits<R>::TangentVector v2 = traits<R>::Local(range_, other.range_);
    │ │ │ +
    140 TangentVector v;
    │ │ │ +
    141 v << v1, v2;
    │ │ │ +
    142 return v;
    │ │ │ +
    143 }
    │ │ │ +
    │ │ │ +
    144
    │ │ │ +
    148
    │ │ │ +
    149private:
    │ │ │ +
    151 template <class ARCHIVE>
    │ │ │ +
    152 void serialize(ARCHIVE& ar, const unsigned int /*version*/) {
    │ │ │ +
    153 ar& boost::serialization::make_nvp("bearing", bearing_);
    │ │ │ +
    154 ar& boost::serialization::make_nvp("range", range_);
    │ │ │ +
    155 }
    │ │ │ +
    156
    │ │ │ +
    157 friend class boost::serialization::access;
    │ │ │
    158
    │ │ │ -
    │ │ │ -
    160 inline static Rot3 RzRyRx(const Vector& xyz,
    │ │ │ -
    161 OptionalJacobian<3, 3> H = boost::none) {
    │ │ │ -
    162 assert(xyz.size() == 3);
    │ │ │ -
    163 Rot3 out;
    │ │ │ -
    164 if (H) {
    │ │ │ -
    165 Vector3 Hx, Hy, Hz;
    │ │ │ -
    166 out = RzRyRx(xyz(0), xyz(1), xyz(2), Hx, Hy, Hz);
    │ │ │ -
    167 (*H) << Hx, Hy, Hz;
    │ │ │ -
    168 } else
    │ │ │ -
    169 out = RzRyRx(xyz(0), xyz(1), xyz(2));
    │ │ │ -
    170 return out;
    │ │ │ -
    171 }
    │ │ │ -
    │ │ │ -
    172
    │ │ │ -
    174 static Rot3 Yaw (double t) { return Rz(t); }
    │ │ │ -
    175
    │ │ │ -
    177 static Rot3 Pitch(double t) { return Ry(t); }
    │ │ │ -
    178
    │ │ │ -
    180 static Rot3 Roll (double t) { return Rx(t); }
    │ │ │ -
    181
    │ │ │ -
    │ │ │ -
    196 static Rot3 Ypr(double y, double p, double r,
    │ │ │ -
    197 OptionalJacobian<3, 1> Hy = boost::none,
    │ │ │ -
    198 OptionalJacobian<3, 1> Hp = boost::none,
    │ │ │ -
    199 OptionalJacobian<3, 1> Hr = boost::none) {
    │ │ │ -
    200 return RzRyRx(r, p, y, Hr, Hp, Hy);
    │ │ │ -
    201 }
    │ │ │ -
    │ │ │ -
    202
    │ │ │ -
    │ │ │ -
    204 static Rot3 Quaternion(double w, double x, double y, double z) {
    │ │ │ -
    205 gtsam::Quaternion q(w, x, y, z);
    │ │ │ -
    206 return Rot3(q);
    │ │ │ -
    207 }
    │ │ │ -
    │ │ │ -
    208
    │ │ │ -
    │ │ │ -
    215 static Rot3 AxisAngle(const Point3& axis, double angle) {
    │ │ │ -
    216 // Convert to unit vector.
    │ │ │ -
    217 Vector3 unitAxis = Unit3(axis).unitVector();
    │ │ │ -
    218#ifdef GTSAM_USE_QUATERNIONS
    │ │ │ -
    219 return gtsam::Quaternion(Eigen::AngleAxis<double>(angle, unitAxis));
    │ │ │ -
    220#else
    │ │ │ -
    221 return Rot3(SO3::AxisAngle(unitAxis,angle));
    │ │ │ -
    222#endif
    │ │ │ -
    223 }
    │ │ │ -
    │ │ │ -
    224
    │ │ │ -
    │ │ │ -
    231 static Rot3 AxisAngle(const Unit3& axis, double angle) {
    │ │ │ -
    232 return AxisAngle(axis.unitVector(),angle);
    │ │ │ -
    233 }
    │ │ │ -
    │ │ │ -
    234
    │ │ │ -
    │ │ │ -
    240 static Rot3 Rodrigues(const Vector3& w) {
    │ │ │ -
    241 return Rot3::Expmap(w);
    │ │ │ -
    242 }
    │ │ │ -
    │ │ │ -
    243
    │ │ │ -
    │ │ │ -
    251 static Rot3 Rodrigues(double wx, double wy, double wz) {
    │ │ │ -
    252 return Rodrigues(Vector3(wx, wy, wz));
    │ │ │ -
    253 }
    │ │ │ -
    │ │ │ -
    254
    │ │ │ -
    256 static Rot3 AlignPair(const Unit3& axis, const Unit3& a_p, const Unit3& b_p);
    │ │ │ -
    257
    │ │ │ -
    259 static Rot3 AlignTwoPairs(const Unit3& a_p, const Unit3& b_p, //
    │ │ │ -
    260 const Unit3& a_q, const Unit3& b_q);
    │ │ │ -
    261
    │ │ │ -
    271 static Rot3 ClosestTo(const Matrix3& M) { return Rot3(SO3::ClosestTo(M)); }
    │ │ │ -
    272
    │ │ │ -
    283 Rot3 normalized() const;
    │ │ │ -
    284
    │ │ │ -
    288
    │ │ │ -
    290 void print(const std::string& s="") const;
    │ │ │ -
    291
    │ │ │ -
    293 bool equals(const Rot3& p, double tol = 1e-9) const;
    │ │ │ -
    294
    │ │ │ -
    298
    │ │ │ -
    │ │ │ -
    300 inline static Rot3 Identity() {
    │ │ │ -
    301 return Rot3();
    │ │ │ -
    302 }
    │ │ │ -
    │ │ │ -
    303
    │ │ │ -
    305 Rot3 operator*(const Rot3& R2) const;
    │ │ │ -
    306
    │ │ │ -
    │ │ │ -
    308 Rot3 inverse() const {
    │ │ │ -
    309#ifdef GTSAM_USE_QUATERNIONS
    │ │ │ -
    310 return Rot3(quaternion_.inverse());
    │ │ │ -
    311#else
    │ │ │ -
    312 return Rot3(rot_.matrix().transpose());
    │ │ │ -
    313#endif
    │ │ │ -
    314 }
    │ │ │ -
    │ │ │ -
    315
    │ │ │ -
    │ │ │ -
    321 Rot3 conjugate(const Rot3& cRb) const {
    │ │ │ -
    322 // TODO: do more efficiently by using Eigen or quaternion properties
    │ │ │ -
    323 return cRb * (*this) * cRb.inverse();
    │ │ │ -
    324 }
    │ │ │ -
    │ │ │ -
    325
    │ │ │ -
    329
    │ │ │ -
    │ │ │ - │ │ │ - │ │ │ -
    341#ifndef GTSAM_USE_QUATERNIONS
    │ │ │ - │ │ │ -
    343#endif
    │ │ │ -
    344 };
    │ │ │ -
    │ │ │ -
    345
    │ │ │ -
    346#ifndef GTSAM_USE_QUATERNIONS
    │ │ │ -
    347
    │ │ │ -
    348 // Cayley chart around origin
    │ │ │ -
    │ │ │ -
    349 struct CayleyChart {
    │ │ │ -
    350 static Rot3 Retract(const Vector3& v, OptionalJacobian<3, 3> H = boost::none);
    │ │ │ -
    351 static Vector3 Local(const Rot3& r, OptionalJacobian<3, 3> H = boost::none);
    │ │ │ -
    352 };
    │ │ │ -
    │ │ │ -
    353
    │ │ │ -
    │ │ │ -
    355 Rot3 retractCayley(const Vector& omega) const {
    │ │ │ -
    356 return compose(CayleyChart::Retract(omega));
    │ │ │ -
    357 }
    │ │ │ -
    │ │ │ -
    358
    │ │ │ -
    │ │ │ -
    360 Vector3 localCayley(const Rot3& other) const {
    │ │ │ -
    361 return CayleyChart::Local(between(other));
    │ │ │ -
    362 }
    │ │ │ -
    │ │ │ -
    363
    │ │ │ -
    364#endif
    │ │ │ -
    365
    │ │ │ -
    369
    │ │ │ -
    │ │ │ -
    374 static Rot3 Expmap(const Vector3& v, OptionalJacobian<3,3> H = boost::none) {
    │ │ │ -
    375 if(H) *H = Rot3::ExpmapDerivative(v);
    │ │ │ -
    376#ifdef GTSAM_USE_QUATERNIONS
    │ │ │ - │ │ │ -
    378#else
    │ │ │ -
    379 return Rot3(traits<SO3>::Expmap(v));
    │ │ │ -
    380#endif
    │ │ │ -
    381 }
    │ │ │ -
    │ │ │ -
    382
    │ │ │ -
    387 static Vector3 Logmap(const Rot3& R, OptionalJacobian<3,3> H = boost::none);
    │ │ │ -
    388
    │ │ │ -
    390 static Matrix3 ExpmapDerivative(const Vector3& x);
    │ │ │ -
    391
    │ │ │ -
    393 static Matrix3 LogmapDerivative(const Vector3& x);
    │ │ │ -
    394
    │ │ │ -
    396 Matrix3 AdjointMap() const { return matrix(); }
    │ │ │ -
    397
    │ │ │ -
    398 // Chart at origin, depends on compile-time flag ROT3_DEFAULT_COORDINATES_MODE
    │ │ │ -
    │ │ │ - │ │ │ -
    400 static Rot3 Retract(const Vector3& v, ChartJacobian H = boost::none);
    │ │ │ -
    401 static Vector3 Local(const Rot3& r, ChartJacobian H = boost::none);
    │ │ │ -
    402 };
    │ │ │ -
    │ │ │ -
    403
    │ │ │ -
    404 using LieGroup<Rot3, 3>::inverse; // version with derivative
    │ │ │ -
    405
    │ │ │ -
    409
    │ │ │ -
    413 Point3 rotate(const Point3& p, OptionalJacobian<3,3> H1 = boost::none,
    │ │ │ -
    414 OptionalJacobian<3,3> H2 = boost::none) const;
    │ │ │ -
    415
    │ │ │ -
    417 Point3 operator*(const Point3& p) const;
    │ │ │ -
    418
    │ │ │ -
    420 Point3 unrotate(const Point3& p, OptionalJacobian<3,3> H1 = boost::none,
    │ │ │ -
    421 OptionalJacobian<3,3> H2=boost::none) const;
    │ │ │ -
    422
    │ │ │ -
    426
    │ │ │ -
    428 Unit3 rotate(const Unit3& p, OptionalJacobian<2,3> HR = boost::none,
    │ │ │ -
    429 OptionalJacobian<2,2> Hp = boost::none) const;
    │ │ │ -
    430
    │ │ │ -
    432 Unit3 unrotate(const Unit3& p, OptionalJacobian<2,3> HR = boost::none,
    │ │ │ -
    433 OptionalJacobian<2,2> Hp = boost::none) const;
    │ │ │ -
    434
    │ │ │ -
    436 Unit3 operator*(const Unit3& p) const;
    │ │ │ -
    437
    │ │ │ -
    441
    │ │ │ -
    443 Matrix3 matrix() const;
    │ │ │ -
    444
    │ │ │ -
    448 Matrix3 transpose() const;
    │ │ │ -
    449
    │ │ │ -
    451 Point3 column(int index) const;
    │ │ │ -
    452
    │ │ │ -
    453 Point3 r1() const;
    │ │ │ -
    454 Point3 r2() const;
    │ │ │ -
    455 Point3 r3() const;
    │ │ │ -
    456
    │ │ │ -
    461 Vector3 xyz(OptionalJacobian<3, 3> H = boost::none) const;
    │ │ │ -
    462
    │ │ │ -
    467 Vector3 ypr(OptionalJacobian<3, 3> H = boost::none) const;
    │ │ │ -
    468
    │ │ │ -
    473 Vector3 rpy(OptionalJacobian<3, 3> H = boost::none) const;
    │ │ │ -
    474
    │ │ │ -
    481 double roll(OptionalJacobian<1, 3> H = boost::none) const;
    │ │ │ -
    482
    │ │ │ -
    489 double pitch(OptionalJacobian<1, 3> H = boost::none) const;
    │ │ │ -
    490
    │ │ │ -
    497 double yaw(OptionalJacobian<1, 3> H = boost::none) const;
    │ │ │ -
    498
    │ │ │ -
    502
    │ │ │ -
    511 std::pair<Unit3, double> axisAngle() const;
    │ │ │ -
    512
    │ │ │ -
    516 gtsam::Quaternion toQuaternion() const;
    │ │ │ -
    517
    │ │ │ -
    518#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
    │ │ │ -
    526 Vector GTSAM_DEPRECATED quaternion() const;
    │ │ │ -
    527#endif
    │ │ │ -
    528
    │ │ │ -
    534 Rot3 slerp(double t, const Rot3& other) const;
    │ │ │ -
    535
    │ │ │ -
    537 GTSAM_EXPORT friend std::ostream &operator<<(std::ostream &os, const Rot3& p);
    │ │ │ -
    538
    │ │ │ -
    540
    │ │ │ -
    541 private:
    │ │ │ -
    543 friend class boost::serialization::access;
    │ │ │ -
    544 template <class ARCHIVE>
    │ │ │ -
    545 void serialize(ARCHIVE& ar, const unsigned int /*version*/) {
    │ │ │ -
    546#ifndef GTSAM_USE_QUATERNIONS
    │ │ │ -
    547 Matrix3& M = rot_.matrix_;
    │ │ │ -
    548 ar& boost::serialization::make_nvp("rot11", M(0, 0));
    │ │ │ -
    549 ar& boost::serialization::make_nvp("rot12", M(0, 1));
    │ │ │ -
    550 ar& boost::serialization::make_nvp("rot13", M(0, 2));
    │ │ │ -
    551 ar& boost::serialization::make_nvp("rot21", M(1, 0));
    │ │ │ -
    552 ar& boost::serialization::make_nvp("rot22", M(1, 1));
    │ │ │ -
    553 ar& boost::serialization::make_nvp("rot23", M(1, 2));
    │ │ │ -
    554 ar& boost::serialization::make_nvp("rot31", M(2, 0));
    │ │ │ -
    555 ar& boost::serialization::make_nvp("rot32", M(2, 1));
    │ │ │ -
    556 ar& boost::serialization::make_nvp("rot33", M(2, 2));
    │ │ │ -
    557#else
    │ │ │ -
    558 ar& boost::serialization::make_nvp("w", quaternion_.w());
    │ │ │ -
    559 ar& boost::serialization::make_nvp("x", quaternion_.x());
    │ │ │ -
    560 ar& boost::serialization::make_nvp("y", quaternion_.y());
    │ │ │ -
    561 ar& boost::serialization::make_nvp("z", quaternion_.z());
    │ │ │ -
    562#endif
    │ │ │ -
    563 }
    │ │ │ -
    564
    │ │ │ -
    565#ifdef GTSAM_USE_QUATERNIONS
    │ │ │ -
    566 // only align if quaternion, Matrix3 has no alignment requirements
    │ │ │ -
    567 public:
    │ │ │ - │ │ │ -
    569#endif
    │ │ │ -
    570 };
    │ │ │ -
    │ │ │ -
    571
    │ │ │ -
    573 using Rot3Vector = std::vector<Rot3, Eigen::aligned_allocator<Rot3> >;
    │ │ │ -
    574
    │ │ │ -
    585 GTSAM_EXPORT std::pair<Matrix3, Vector3> RQ(
    │ │ │ -
    586 const Matrix3& A, OptionalJacobian<3, 9> H = boost::none);
    │ │ │ -
    587
    │ │ │ -
    588 template<>
    │ │ │ -
    589 struct traits<Rot3> : public internal::LieGroup<Rot3> {};
    │ │ │ -
    590
    │ │ │ -
    591 template<>
    │ │ │ -
    592 struct traits<const Rot3> : public internal::LieGroup<Rot3> {};
    │ │ │ -
    593
    │ │ │ -
    594} // namespace gtsam
    │ │ │ -
    595
    │ │ │ -
    #define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
    This marks a GTSAM object to require alignment.
    Definition types.h:308
    │ │ │ -
    3*3 matrix representation of SO(3)
    │ │ │ -
    Lie Group wrapper for Eigen Quaternions.
    │ │ │ +
    160
    │ │ │ +
    161 // Alignment, see https://eigen.tuxfamily.org/dox/group__TopicStructHavingEigenMembers.html
    │ │ │ +
    162 enum {
    │ │ │ +
    163 NeedsToAlign = (sizeof(B) % 16) == 0 || (sizeof(R) % 16) == 0
    │ │ │ +
    164 };
    │ │ │ +
    165public:
    │ │ │ + │ │ │ +
    167};
    │ │ │ +
    │ │ │ +
    168
    │ │ │ +
    169// Declare this to be both Testable and a Manifold
    │ │ │ +
    170template <typename A1, typename A2>
    │ │ │ +
    │ │ │ +
    171struct traits<BearingRange<A1, A2> >
    │ │ │ +
    172 : Testable<BearingRange<A1, A2> >,
    │ │ │ +
    173 internal::ManifoldTraits<BearingRange<A1, A2> > {};
    │ │ │ +
    │ │ │ +
    174
    │ │ │ +
    175// Helper class for to implement Range traits for classes with a bearing method
    │ │ │ +
    176// For example, to specialize Bearing to Pose3 and Point3, using Pose3::bearing, it suffices to say
    │ │ │ +
    177// template <> struct Bearing<Pose3, Point3> : HasBearing<Pose3, Point3, Unit3> {};
    │ │ │ +
    178// where the third argument is used to indicate the return type
    │ │ │ +
    179template <class A1, typename A2, class RT>
    │ │ │ +
    │ │ │ + │ │ │ +
    181 typedef RT result_type;
    │ │ │ +
    182 RT operator()(
    │ │ │ +
    183 const A1& a1, const A2& a2,
    │ │ │ + │ │ │ + │ │ │ +
    186 return a1.bearing(a2, H1, H2);
    │ │ │ +
    187 }
    │ │ │ +
    188};
    │ │ │ +
    │ │ │ +
    189
    │ │ │ +
    190// Similar helper class for to implement Range traits for classes with a range method
    │ │ │ +
    191// For classes with overloaded range methods, such as PinholeCamera, this can even be templated:
    │ │ │ +
    192// template <typename T> struct Range<PinholeCamera, T> : HasRange<PinholeCamera, T, double> {};
    │ │ │ +
    193template <class A1, typename A2, class RT>
    │ │ │ +
    │ │ │ +
    194struct HasRange {
    │ │ │ +
    195 typedef RT result_type;
    │ │ │ +
    196 RT operator()(
    │ │ │ +
    197 const A1& a1, const A2& a2,
    │ │ │ + │ │ │ + │ │ │ +
    200 return a1.range(a2, H1, H2);
    │ │ │ +
    201 }
    │ │ │ +
    202};
    │ │ │ +
    │ │ │ +
    203
    │ │ │ +
    204} // namespace gtsam
    │ │ │ +
    Special class for optional Jacobian arguments.
    │ │ │ +
    #define GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
    This marks a GTSAM object to require alignment.
    Definition types.h:317
    │ │ │ +
    Concept check for values that can be used in unit tests.
    │ │ │ +
    Base class and basic functions for Manifold types.
    │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │ -
    pair< Matrix3, Vector3 > RQ(const Matrix3 &A, OptionalJacobian< 3, 9 > H)
    [RQ] receives a 3 by 3 matrix and returns an upper triangular matrix R and 3 rotation angles correspo...
    Definition Rot3.cpp:260
    │ │ │ -
    std::vector< Rot3, Eigen::aligned_allocator< Rot3 > > Rot3Vector
    std::vector of Rot3s, mainly for wrapper
    Definition Rot3.h:573
    │ │ │ -
    void print(const Matrix &A, const string &s, ostream &stream)
    print without optional string, must specify cout yourself
    Definition Matrix.cpp:156
    │ │ │ -
    const MATRIX::ConstColXpr column(const MATRIX &A, size_t j)
    Extracts a column view from a matrix that avoids a copy.
    Definition Matrix.h:211
    │ │ │ -
    Point2 operator*(double s, const Point2 &p)
    multiply with scalar
    Definition Point2.h:47
    │ │ │ -
    Vector3 Point3
    As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point3 to Vector3...
    Definition Point3.h:36
    │ │ │
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │ -
    A CRTP helper class that implements Lie group methods Prerequisites: methods operator*,...
    Definition Lie.h:37
    │ │ │ -
    Both LieGroupTraits and Testable.
    Definition Lie.h:229
    │ │ │ +
    A helper that implements the traits interface for GTSAM manifolds.
    Definition Manifold.h:95
    │ │ │
    OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
    Definition OptionalJacobian.h:41
    │ │ │ -
    Template to create a binary predicate.
    Definition Testable.h:111
    │ │ │ -
    Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
    Definition Rot3.h:58
    │ │ │ -
    static Rot3 Identity()
    identity rotation for group operation
    Definition Rot3.h:300
    │ │ │ -
    Rot3 retractCayley(const Vector &omega) const
    Retraction from R^3 to Rot3 manifold using the Cayley transform.
    Definition Rot3.h:355
    │ │ │ -
    Matrix3 AdjointMap() const
    Calculate Adjoint map.
    Definition Rot3.h:396
    │ │ │ -
    static Rot3 ClosestTo(const Matrix3 &M)
    Static, named constructor that finds Rot3 element closest to M in Frobenius norm.
    Definition Rot3.h:271
    │ │ │ -
    virtual ~Rot3()
    Virtual destructor.
    Definition Rot3.h:140
    │ │ │ -
    static Rot3 Yaw(double t)
    Positive yaw is to right (as in aircraft heading). See ypr.
    Definition Rot3.h:174
    │ │ │ -
    static Rot3 AxisAngle(const Unit3 &axis, double angle)
    Convert from axis/angle representation.
    Definition Rot3.h:231
    │ │ │ -
    Rot3(const Matrix3 &R)
    Constructor from a rotation matrix Overload version for Matrix3 to avoid casting in quaternion mode.
    Definition Rot3.h:112
    │ │ │ -
    static Rot3 Rodrigues(const Vector3 &w)
    Rodrigues' formula to compute an incremental rotation.
    Definition Rot3.h:240
    │ │ │ -
    static Rot3 AxisAngle(const Point3 &axis, double angle)
    Convert from axis/angle representation.
    Definition Rot3.h:215
    │ │ │ -
    static Rot3 Pitch(double t)
    Positive pitch is up (increasing aircraft altitude).See ypr.
    Definition Rot3.h:177
    │ │ │ -
    static Rot3 RzRyRx(const Vector &xyz, OptionalJacobian< 3, 3 > H=boost::none)
    Rotations around Z, Y, then X axes as in http://en.wikipedia.org/wiki/Rotation_matrix,...
    Definition Rot3.h:160
    │ │ │ -
    Vector3 localCayley(const Rot3 &other) const
    Inverse of retractCayley.
    Definition Rot3.h:360
    │ │ │ -
    static Rot3 Quaternion(double w, double x, double y, double z)
    Create from Quaternion coefficients.
    Definition Rot3.h:204
    │ │ │ -
    Rot3 conjugate(const Rot3 &cRb) const
    Conjugation: given a rotation acting in frame B, compute rotation c1Rc2 acting in a frame C.
    Definition Rot3.h:321
    │ │ │ -
    static Rot3 Rodrigues(double wx, double wy, double wz)
    Rodrigues' formula to compute an incremental rotation.
    Definition Rot3.h:251
    │ │ │ -
    Rot3 inverse() const
    inverse of a rotation
    Definition Rot3.h:308
    │ │ │ -
    Rot3(const SO3 &R)
    Constructor from an SO3 instance.
    Definition Rot3.h:121
    │ │ │ -
    static Rot3 Expmap(const Vector3 &v, OptionalJacobian< 3, 3 > H=boost::none)
    Exponential map at identity - create a rotation from canonical coordinates using Rodrigues' formula.
    Definition Rot3.h:374
    │ │ │ -
    static Rot3 Ypr(double y, double p, double r, OptionalJacobian< 3, 1 > Hy=boost::none, OptionalJacobian< 3, 1 > Hp=boost::none, OptionalJacobian< 3, 1 > Hr=boost::none)
    Returns rotation nRb from body to nav frame.
    Definition Rot3.h:196
    │ │ │ -
    CoordinatesMode
    The method retract() is used to map from the tangent space back to the manifold.
    Definition Rot3.h:339
    │ │ │ -
    @ CAYLEY
    Retract and localCoordinates using the Cayley transform.
    Definition Rot3.h:342
    │ │ │ -
    @ EXPMAP
    Use the Lie group exponential map to retract.
    Definition Rot3.h:340
    │ │ │ -
    Rot3(const Eigen::MatrixBase< Derived > &R)
    Constructor from a rotation matrix Version for generic matrices.
    Definition Rot3.h:101
    │ │ │ -
    Definition Rot3.h:349
    │ │ │ -
    Definition Rot3.h:399
    │ │ │ - │ │ │ -
    MatrixNN matrix_
    Rotation matrix.
    Definition SOn.h:62
    │ │ │ -
    const MatrixNN & matrix() const
    Return matrix.
    Definition SOn.h:155
    │ │ │ -
    Represents a 3D point on a unit sphere.
    Definition Unit3.h:43
    │ │ │ -
    Vector3 unitVector(OptionalJacobian< 3, 2 > H=boost::none) const
    Return unit-norm Vector.
    Definition Unit3.cpp:151
    │ │ │ +
    A helper that implements the traits interface for GTSAM types.
    Definition Testable.h:151
    │ │ │ +
    Definition BearingRange.h:34
    │ │ │ +
    Definition BearingRange.h:40
    │ │ │ +
    Bearing-Range product for a particular A1,A2 combination will use the functors above to create a simi...
    Definition BearingRange.h:51
    │ │ │ +
    static R MeasureRange(const A1 &a1, const A2 &a2)
    Predict range.
    Definition BearingRange.h:101
    │ │ │ +
    static BearingRange Measure(const A1 &a1, const A2 &a2, OptionalJacobian< dimension, traits< A1 >::dimension > H1=boost::none, OptionalJacobian< dimension, traits< A2 >::dimension > H2=boost::none)
    Prediction function that stacks measurements.
    Definition BearingRange.h:78
    │ │ │ +
    BearingRange retract(const TangentVector &xi) const
    Retract delta to manifold.
    Definition BearingRange.h:130
    │ │ │ +
    const B & bearing() const
    Return bearing measurement.
    Definition BearingRange.h:72
    │ │ │ +
    TangentVector localCoordinates(const BearingRange &other) const
    Compute the coordinates in the tangent space.
    Definition BearingRange.h:137
    │ │ │ +
    const R & range() const
    Return range measurement.
    Definition BearingRange.h:75
    │ │ │ +
    static B MeasureBearing(const A1 &a1, const A2 &a2)
    Predict bearing.
    Definition BearingRange.h:96
    │ │ │ +
    Definition BearingRange.h:180
    │ │ │ +
    Definition BearingRange.h:194
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,543 +1,268 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Rot3.h │ │ │ │ +BearingRange.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -22// \callgraph │ │ │ │ -23 │ │ │ │ -24#pragma once │ │ │ │ -25 │ │ │ │ -26#include │ │ │ │ -27#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_Q_u_a_t_e_r_n_i_o_n_._h> │ │ │ │ -28#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_S_O_3_._h> │ │ │ │ -29#include │ │ │ │ -30#include // Get GTSAM_USE_QUATERNIONS macro │ │ │ │ -31 │ │ │ │ -32#include │ │ │ │ -33 │ │ │ │ -34// You can override the default coordinate mode using this flag │ │ │ │ -35#ifndef ROT3_DEFAULT_COORDINATES_MODE │ │ │ │ -36 #ifdef GTSAM_USE_QUATERNIONS │ │ │ │ -37 // Exponential map is very cheap for quaternions │ │ │ │ -38 #define ROT3_DEFAULT_COORDINATES_MODE Rot3::EXPMAP │ │ │ │ -39 #else │ │ │ │ -40 // If user doesn't require GTSAM_ROT3_EXPMAP in cmake when building │ │ │ │ -41 #ifndef GTSAM_ROT3_EXPMAP │ │ │ │ -42 // For rotation matrices, the Cayley transform is a fast retract alternative │ │ │ │ -43 #define ROT3_DEFAULT_COORDINATES_MODE Rot3::CAYLEY │ │ │ │ -44 #else │ │ │ │ -45 #define ROT3_DEFAULT_COORDINATES_MODE Rot3::EXPMAP │ │ │ │ -46 #endif │ │ │ │ -47 #endif │ │ │ │ -48#endif │ │ │ │ -49 │ │ │ │ -50namespace _g_t_s_a_m { │ │ │ │ -51 │ │ │ │ -_5_8class GTSAM_EXPORT _R_o_t_3 : public _L_i_e_G_r_o_u_p { │ │ │ │ -59 private: │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +21#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_n_i_f_o_l_d_._h> │ │ │ │ +22#include <_g_t_s_a_m_/_b_a_s_e_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ +23#include <_g_t_s_a_m_/_b_a_s_e_/_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h> │ │ │ │ +24#include │ │ │ │ +25#include │ │ │ │ +26#include │ │ │ │ +27 │ │ │ │ +28namespace _g_t_s_a_m { │ │ │ │ +29 │ │ │ │ +30// Forward declaration of Bearing functor which should be of A1*A2 - │ │ │ │ +> return_type │ │ │ │ +31// For example Bearing(pose,point), defined in Pose3.h will │ │ │ │ +return Unit3 │ │ │ │ +32// At time of writing only Pose2 and Pose3 specialize this functor. │ │ │ │ +33template │ │ │ │ +_3_4struct _B_e_a_r_i_n_g; │ │ │ │ +35 │ │ │ │ +36// Forward declaration of Range functor which should be of A1*A2 - │ │ │ │ +> return_type │ │ │ │ +37// For example Range(T1,T2), defined in Pose2.h will return │ │ │ │ +double │ │ │ │ +38// At time of writing Pose2, Pose3, and several Camera variants specialize │ │ │ │ +this for several types │ │ │ │ +39template │ │ │ │ +_4_0struct _R_a_n_g_e; │ │ │ │ +41 │ │ │ │ +48template _:_:_r_e_s_u_l_t___t_y_p_e, │ │ │ │ +50 typename R = typename _R_a_n_g_e_<_A_1_,_ _A_2_>_:_:_r_e_s_u_l_t___t_y_p_e> │ │ │ │ +_5_1struct _B_e_a_r_i_n_g_R_a_n_g_e { │ │ │ │ +52private: │ │ │ │ +53 B bearing_; │ │ │ │ +54 R range_; │ │ │ │ +55 │ │ │ │ +56public: │ │ │ │ +57 enum { dimB = _t_r_a_i_t_s_<_B_>_:_:_d_i_m_e_n_s_i_o_n }; │ │ │ │ +58 enum { dimR = _t_r_a_i_t_s_<_R_>_:_:_d_i_m_e_n_s_i_o_n }; │ │ │ │ +59 enum { dimension = dimB + dimR }; │ │ │ │ 60 │ │ │ │ -61#ifdef GTSAM_USE_QUATERNIONS │ │ │ │ -63 gtsam::Quaternion quaternion_; │ │ │ │ -64#else │ │ │ │ -65 _S_O_3 rot_; │ │ │ │ -66#endif │ │ │ │ -67 │ │ │ │ -68 public: │ │ │ │ -71 │ │ │ │ -73 _R_o_t_3(); │ │ │ │ -74 │ │ │ │ -81 _R_o_t_3(const _P_o_i_n_t_3& col1, const _P_o_i_n_t_3& col2, const _P_o_i_n_t_3& col3); │ │ │ │ -82 │ │ │ │ -84 _R_o_t_3(double R11, double R12, double R13, │ │ │ │ -85 double R21, double R22, double R23, │ │ │ │ -86 double R31, double R32, double R33); │ │ │ │ -87 │ │ │ │ -95 template │ │ │ │ -96#ifdef GTSAM_USE_QUATERNIONS │ │ │ │ -97 explicit _R_o_t_3(const Eigen::MatrixBase& R) { │ │ │ │ -98 quaternion_ = Matrix3(R); │ │ │ │ -99 } │ │ │ │ -100#else │ │ │ │ -_1_0_1 explicit _R_o_t_3(const Eigen::MatrixBase& R) : rot_(R) { │ │ │ │ -102 } │ │ │ │ -103#endif │ │ │ │ +63 │ │ │ │ +64 _B_e_a_r_i_n_g_R_a_n_g_e() {} │ │ │ │ +65 _B_e_a_r_i_n_g_R_a_n_g_e(const B& b, const R& r) : bearing_(b), range_(r) {} │ │ │ │ +66 │ │ │ │ +70 │ │ │ │ +_7_2 const B& _b_e_a_r_i_n_g() const { return bearing_; } │ │ │ │ +73 │ │ │ │ +_7_5 const R& _r_a_n_g_e() const { return range_; } │ │ │ │ +76 │ │ │ │ +_7_8 static _B_e_a_r_i_n_g_R_a_n_g_e _M_e_a_s_u_r_e( │ │ │ │ +79 const A1& a1, const A2& a2, │ │ │ │ +80 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_:_:_d_i_m_e_n_s_i_o_n> H1 = boost::none, │ │ │ │ +81 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_:_:_d_i_m_e_n_s_i_o_n> H2 = boost::none) { │ │ │ │ +82 typename MakeJacobian::type HB1; │ │ │ │ +83 typename MakeJacobian::type HB2; │ │ │ │ +84 typename MakeJacobian::type HR1; │ │ │ │ +85 typename MakeJacobian::type HR2; │ │ │ │ +86 │ │ │ │ +87 B b = _B_e_a_r_i_n_g_<_A_1_,_ _A_2_>()(a1, a2, H1 ? &HB1 : 0, H2 ? &HB2 : 0); │ │ │ │ +88 R r = _R_a_n_g_e_<_A_1_,_ _A_2_>()(a1, a2, H1 ? &HR1 : 0, H2 ? &HR2 : 0); │ │ │ │ +89 │ │ │ │ +90 if (H1) *H1 << HB1, HR1; │ │ │ │ +91 if (H2) *H2 << HB2, HR2; │ │ │ │ +92 return _B_e_a_r_i_n_g_R_a_n_g_e(b, r); │ │ │ │ +93 } │ │ │ │ +94 │ │ │ │ +_9_6 static B _M_e_a_s_u_r_e_B_e_a_r_i_n_g(const A1& a1, const A2& a2) { │ │ │ │ +97 return _B_e_a_r_i_n_g_<_A_1_,_ _A_2_>()(a1, a2); │ │ │ │ +98 } │ │ │ │ +99 │ │ │ │ +_1_0_1 static R _M_e_a_s_u_r_e_R_a_n_g_e(const A1& a1, const A2& a2) { │ │ │ │ +102 return _R_a_n_g_e_<_A_1_,_ _A_2_>()(a1, a2); │ │ │ │ +103 } │ │ │ │ 104 │ │ │ │ -109#ifdef GTSAM_USE_QUATERNIONS │ │ │ │ -110 explicit _R_o_t_3(const Matrix3& R) : quaternion_(R) {} │ │ │ │ -111#else │ │ │ │ -_1_1_2 explicit _R_o_t_3(const Matrix3& R) : rot_(R) {} │ │ │ │ -113#endif │ │ │ │ -114 │ │ │ │ -118#ifdef GTSAM_USE_QUATERNIONS │ │ │ │ -119 explicit _R_o_t_3(const _S_O_3& R) : quaternion_(R.matrix()) {} │ │ │ │ -120#else │ │ │ │ -_1_2_1 explicit _R_o_t_3(const _S_O_3& R) : rot_(R) {} │ │ │ │ -122#endif │ │ │ │ -123 │ │ │ │ -128 _R_o_t_3(const Quaternion& q); │ │ │ │ -129 _R_o_t_3(double w, double x, double y, double z) : _R_o_t_3(Quaternion(w, x, y, z)) │ │ │ │ -{} │ │ │ │ -130 │ │ │ │ -137 static Rot3 Random(std::mt19937 & rng); │ │ │ │ -138 │ │ │ │ -_1_4_0 virtual _~_R_o_t_3() {} │ │ │ │ -141 │ │ │ │ -142 /* Static member function to generate some well known rotations */ │ │ │ │ -143 │ │ │ │ -145 static _R_o_t_3 Rx(double t); │ │ │ │ -146 │ │ │ │ -148 static _R_o_t_3 Ry(double t); │ │ │ │ -149 │ │ │ │ -151 static _R_o_t_3 Rz(double t); │ │ │ │ -152 │ │ │ │ -154 static _R_o_t_3 RzRyRx(double x, double y, double z, │ │ │ │ -155 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _1_> Hx = boost::none, │ │ │ │ -156 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _1_> Hy = boost::none, │ │ │ │ -157 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _1_> Hz = boost::none); │ │ │ │ +108 │ │ │ │ +109 void print(const std::string& str = "") const { │ │ │ │ +110 std::cout << str; │ │ │ │ +111 _t_r_a_i_t_s_<_B_>_:_:_P_r_i_n_t(bearing_, "bearing "); │ │ │ │ +112 _t_r_a_i_t_s_<_R_>_:_:_P_r_i_n_t(range_, "range "); │ │ │ │ +113 } │ │ │ │ +114 bool equals(const BearingRange& m2, double tol = 1e-8) const { │ │ │ │ +115 return traits::Equals(bearing_, m2.bearing_, tol) && │ │ │ │ +116 traits::Equals(range_, m2.range_, tol); │ │ │ │ +117 } │ │ │ │ +118 │ │ │ │ +122 │ │ │ │ +123 inline static size_t Dim() { return dimension; } │ │ │ │ +124 inline size_t dim() const { return dimension; } │ │ │ │ +125 │ │ │ │ +126 typedef Eigen::Matrix TangentVector; │ │ │ │ +127 typedef OptionalJacobian ChartJacobian; │ │ │ │ +128 │ │ │ │ +_1_3_0 _B_e_a_r_i_n_g_R_a_n_g_e _r_e_t_r_a_c_t(const TangentVector& xi) const { │ │ │ │ +131 B m1 = _t_r_a_i_t_s_<_B_>_:_:_R_e_t_r_a_c_t(bearing_, xi.template head()); │ │ │ │ +132 R m2 = _t_r_a_i_t_s_<_R_>_:_:_R_e_t_r_a_c_t(range_, xi.template tail()); │ │ │ │ +133 return _B_e_a_r_i_n_g_R_a_n_g_e(m1, m2); │ │ │ │ +134 } │ │ │ │ +135 │ │ │ │ +_1_3_7 TangentVector _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const _B_e_a_r_i_n_g_R_a_n_g_e& other) const { │ │ │ │ +138 typename _t_r_a_i_t_s_<_B_>_:_:_T_a_n_g_e_n_t_V_e_c_t_o_r v1 = _t_r_a_i_t_s_<_B_>_:_:_L_o_c_a_l(bearing_, │ │ │ │ +other.bearing_); │ │ │ │ +139 typename _t_r_a_i_t_s_<_R_>_:_:_T_a_n_g_e_n_t_V_e_c_t_o_r v2 = _t_r_a_i_t_s_<_R_>_:_:_L_o_c_a_l(range_, │ │ │ │ +other.range_); │ │ │ │ +140 TangentVector v; │ │ │ │ +141 v << v1, v2; │ │ │ │ +142 return v; │ │ │ │ +143 } │ │ │ │ +144 │ │ │ │ +148 │ │ │ │ +149private: │ │ │ │ +151 template │ │ │ │ +152 void serialize(ARCHIVE& ar, const unsigned int /*version*/) { │ │ │ │ +153 ar& boost::serialization::make_nvp("bearing", bearing_); │ │ │ │ +154 ar& boost::serialization::make_nvp("range", range_); │ │ │ │ +155 } │ │ │ │ +156 │ │ │ │ +157 friend class boost::serialization::access; │ │ │ │ 158 │ │ │ │ -_1_6_0 inline static _R_o_t_3 _R_z_R_y_R_x(const Vector& xyz, │ │ │ │ -161 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H = boost::none) { │ │ │ │ -162 assert(xyz.size() == 3); │ │ │ │ -163 _R_o_t_3 out; │ │ │ │ -164 if (H) { │ │ │ │ -165 Vector3 Hx, Hy, Hz; │ │ │ │ -166 out = RzRyRx(xyz(0), xyz(1), xyz(2), Hx, Hy, Hz); │ │ │ │ -167 (*H) << Hx, Hy, Hz; │ │ │ │ -168 } else │ │ │ │ -169 out = RzRyRx(xyz(0), xyz(1), xyz(2)); │ │ │ │ -170 return out; │ │ │ │ -171 } │ │ │ │ -172 │ │ │ │ -_1_7_4 static _R_o_t_3 _Y_a_w (double t) { return Rz(t); } │ │ │ │ -175 │ │ │ │ -_1_7_7 static _R_o_t_3 _P_i_t_c_h(double t) { return Ry(t); } │ │ │ │ -178 │ │ │ │ -180 static _R_o_t_3 Roll (double t) { return Rx(t); } │ │ │ │ -181 │ │ │ │ -_1_9_6 static _R_o_t_3 _Y_p_r(double y, double p, double r, │ │ │ │ -197 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _1_> Hy = boost::none, │ │ │ │ -198 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _1_> Hp = boost::none, │ │ │ │ -199 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _1_> Hr = boost::none) { │ │ │ │ -200 return RzRyRx(r, p, y, Hr, Hp, Hy); │ │ │ │ +160 │ │ │ │ +161 // Alignment, see https://eigen.tuxfamily.org/dox/ │ │ │ │ +group__TopicStructHavingEigenMembers.html │ │ │ │ +162 enum { │ │ │ │ +163 NeedsToAlign = (sizeof(B) % 16) == 0 || (sizeof(R) % 16) == 0 │ │ │ │ +164 }; │ │ │ │ +165public: │ │ │ │ +166 _G_T_S_A_M___M_A_K_E___A_L_I_G_N_E_D___O_P_E_R_A_T_O_R___N_E_W___I_F(NeedsToAlign) │ │ │ │ +167}; │ │ │ │ +168 │ │ │ │ +169// Declare this to be both Testable and a Manifold │ │ │ │ +170template │ │ │ │ +_1_7_1struct _t_r_a_i_t_s<_B_e_a_r_i_n_g_R_a_n_g_e > │ │ │ │ +172 : _T_e_s_t_a_b_l_e >, │ │ │ │ +173 _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d_T_r_a_i_t_s > {}; │ │ │ │ +174 │ │ │ │ +175// Helper class for to implement Range traits for classes with a bearing │ │ │ │ +method │ │ │ │ +176// For example, to specialize Bearing to Pose3 and Point3, using Pose3:: │ │ │ │ +bearing, it suffices to say │ │ │ │ +177// template <> struct Bearing : HasBearing {}; │ │ │ │ +178// where the third argument is used to indicate the return type │ │ │ │ +179template │ │ │ │ +_1_8_0struct _H_a_s_B_e_a_r_i_n_g { │ │ │ │ +181 typedef RT result_type; │ │ │ │ +182 RT operator()( │ │ │ │ +183 const A1& a1, const A2& a2, │ │ │ │ +184 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n<_t_r_a_i_t_s_<_R_T_>_:_:_d_i_m_e_n_s_i_o_n, _t_r_a_i_t_s_<_A_1_>_:_:_d_i_m_e_n_s_i_o_n> H1=boost:: │ │ │ │ +none, │ │ │ │ +185 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n<_t_r_a_i_t_s_<_R_T_>_:_:_d_i_m_e_n_s_i_o_n, _t_r_a_i_t_s_<_A_2_>_:_:_d_i_m_e_n_s_i_o_n> H2=boost:: │ │ │ │ +none) { │ │ │ │ +186 return a1.bearing(a2, H1, H2); │ │ │ │ +187 } │ │ │ │ +188}; │ │ │ │ +189 │ │ │ │ +190// Similar helper class for to implement Range traits for classes with a │ │ │ │ +range method │ │ │ │ +191// For classes with overloaded range methods, such as PinholeCamera, this │ │ │ │ +can even be templated: │ │ │ │ +192// template struct Range : │ │ │ │ +HasRange {}; │ │ │ │ +193template │ │ │ │ +_1_9_4struct _H_a_s_R_a_n_g_e { │ │ │ │ +195 typedef RT result_type; │ │ │ │ +196 RT operator()( │ │ │ │ +197 const A1& a1, const A2& a2, │ │ │ │ +198 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n<_t_r_a_i_t_s_<_R_T_>_:_:_d_i_m_e_n_s_i_o_n, _t_r_a_i_t_s_<_A_1_>_:_:_d_i_m_e_n_s_i_o_n> H1=boost:: │ │ │ │ +none, │ │ │ │ +199 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n<_t_r_a_i_t_s_<_R_T_>_:_:_d_i_m_e_n_s_i_o_n, _t_r_a_i_t_s_<_A_2_>_:_:_d_i_m_e_n_s_i_o_n> H2=boost:: │ │ │ │ +none) { │ │ │ │ +200 return a1.range(a2, H1, H2); │ │ │ │ 201 } │ │ │ │ -202 │ │ │ │ -_2_0_4 static _R_o_t_3 _Q_u_a_t_e_r_n_i_o_n(double w, double x, double y, double z) { │ │ │ │ -205 gtsam::Quaternion q(w, x, y, z); │ │ │ │ -206 return _R_o_t_3(q); │ │ │ │ -207 } │ │ │ │ -208 │ │ │ │ -_2_1_5 static _R_o_t_3 _A_x_i_s_A_n_g_l_e(const _P_o_i_n_t_3& axis, double angle) { │ │ │ │ -216 // Convert to unit vector. │ │ │ │ -217 Vector3 unitAxis = _U_n_i_t_3(axis)._u_n_i_t_V_e_c_t_o_r(); │ │ │ │ -218#ifdef GTSAM_USE_QUATERNIONS │ │ │ │ -219 return gtsam::Quaternion(Eigen::AngleAxis(angle, unitAxis)); │ │ │ │ -220#else │ │ │ │ -221 return _R_o_t_3(SO3::AxisAngle(unitAxis,angle)); │ │ │ │ -222#endif │ │ │ │ -223 } │ │ │ │ -224 │ │ │ │ -_2_3_1 static _R_o_t_3 _A_x_i_s_A_n_g_l_e(const _U_n_i_t_3& axis, double angle) { │ │ │ │ -232 return AxisAngle(axis._u_n_i_t_V_e_c_t_o_r(),angle); │ │ │ │ -233 } │ │ │ │ -234 │ │ │ │ -_2_4_0 static _R_o_t_3 _R_o_d_r_i_g_u_e_s(const Vector3& w) { │ │ │ │ -241 return Rot3::Expmap(w); │ │ │ │ -242 } │ │ │ │ -243 │ │ │ │ -_2_5_1 static _R_o_t_3 _R_o_d_r_i_g_u_e_s(double wx, double wy, double wz) { │ │ │ │ -252 return Rodrigues(Vector3(wx, wy, wz)); │ │ │ │ -253 } │ │ │ │ -254 │ │ │ │ -256 static _R_o_t_3 AlignPair(const _U_n_i_t_3& axis, const _U_n_i_t_3& a_p, const _U_n_i_t_3& │ │ │ │ -b_p); │ │ │ │ -257 │ │ │ │ -259 static _R_o_t_3 AlignTwoPairs(const _U_n_i_t_3& a_p, const _U_n_i_t_3& b_p, // │ │ │ │ -260 const _U_n_i_t_3& a_q, const _U_n_i_t_3& b_q); │ │ │ │ -261 │ │ │ │ -_2_7_1 static _R_o_t_3 _C_l_o_s_e_s_t_T_o(const Matrix3& M) { return _R_o_t_3(SO3::ClosestTo(M)); } │ │ │ │ -272 │ │ │ │ -283 _R_o_t_3 normalized() const; │ │ │ │ -284 │ │ │ │ -288 │ │ │ │ -290 void _p_r_i_n_t(const std::string& s="") const; │ │ │ │ -291 │ │ │ │ -293 bool _e_q_u_a_l_s(const _R_o_t_3& p, double tol = 1e-9) const; │ │ │ │ -294 │ │ │ │ -298 │ │ │ │ -_3_0_0 inline static _R_o_t_3 _I_d_e_n_t_i_t_y() { │ │ │ │ -301 return _R_o_t_3(); │ │ │ │ -302 } │ │ │ │ -303 │ │ │ │ -305 _R_o_t_3 _o_p_e_r_a_t_o_r_*(const _R_o_t_3& R2) const; │ │ │ │ -306 │ │ │ │ -_3_0_8 _R_o_t_3 _i_n_v_e_r_s_e() const { │ │ │ │ -309#ifdef GTSAM_USE_QUATERNIONS │ │ │ │ -310 return _R_o_t_3(quaternion_.inverse()); │ │ │ │ -311#else │ │ │ │ -312 return _R_o_t_3(rot_._m_a_t_r_i_x().transpose()); │ │ │ │ -313#endif │ │ │ │ -314 } │ │ │ │ -315 │ │ │ │ -_3_2_1 _R_o_t_3 _c_o_n_j_u_g_a_t_e(const _R_o_t_3& cRb) const { │ │ │ │ -322 // TODO: do more efficiently by using Eigen or quaternion properties │ │ │ │ -323 return cRb * (*this) * cRb._i_n_v_e_r_s_e(); │ │ │ │ -324 } │ │ │ │ -325 │ │ │ │ -329 │ │ │ │ -_3_3_9 enum _C_o_o_r_d_i_n_a_t_e_s_M_o_d_e { │ │ │ │ -_3_4_0 _E_X_P_M_A_P, │ │ │ │ -341#ifndef GTSAM_USE_QUATERNIONS │ │ │ │ -_3_4_2 _C_A_Y_L_E_Y, │ │ │ │ -343#endif │ │ │ │ -344 }; │ │ │ │ -345 │ │ │ │ -346#ifndef GTSAM_USE_QUATERNIONS │ │ │ │ -347 │ │ │ │ -348 // Cayley chart around origin │ │ │ │ -_3_4_9 struct _C_a_y_l_e_y_C_h_a_r_t { │ │ │ │ -350 static _R_o_t_3 Retract(const Vector3& v, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H = boost:: │ │ │ │ -none); │ │ │ │ -351 static Vector3 Local(const _R_o_t_3& r, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H = boost:: │ │ │ │ -none); │ │ │ │ -352 }; │ │ │ │ -353 │ │ │ │ -_3_5_5 _R_o_t_3 _r_e_t_r_a_c_t_C_a_y_l_e_y(const Vector& omega) const { │ │ │ │ -356 return compose(CayleyChart::Retract(omega)); │ │ │ │ -357 } │ │ │ │ -358 │ │ │ │ -_3_6_0 Vector3 _l_o_c_a_l_C_a_y_l_e_y(const _R_o_t_3& other) const { │ │ │ │ -361 return CayleyChart::Local(between(other)); │ │ │ │ -362 } │ │ │ │ -363 │ │ │ │ -364#endif │ │ │ │ -365 │ │ │ │ -369 │ │ │ │ -_3_7_4 static _R_o_t_3 _E_x_p_m_a_p(const Vector3& v, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_3_> H = boost::none) │ │ │ │ -{ │ │ │ │ -375 if(H) *H = Rot3::ExpmapDerivative(v); │ │ │ │ -376#ifdef GTSAM_USE_QUATERNIONS │ │ │ │ -377 return _t_r_a_i_t_s_<_g_t_s_a_m_:_:_Q_u_a_t_e_r_n_i_o_n_>_:_:_E_x_p_m_a_p(v); │ │ │ │ -378#else │ │ │ │ -379 return _R_o_t_3(_t_r_a_i_t_s_<_S_O_3_>_:_:_E_x_p_m_a_p(v)); │ │ │ │ -380#endif │ │ │ │ -381 } │ │ │ │ -382 │ │ │ │ -387 static Vector3 Logmap(const _R_o_t_3& R, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_3_> H = boost:: │ │ │ │ -none); │ │ │ │ -388 │ │ │ │ -390 static Matrix3 ExpmapDerivative(const Vector3& x); │ │ │ │ -391 │ │ │ │ -393 static Matrix3 LogmapDerivative(const Vector3& x); │ │ │ │ -394 │ │ │ │ -_3_9_6 Matrix3 _A_d_j_o_i_n_t_M_a_p() const { return matrix(); } │ │ │ │ -397 │ │ │ │ -398 // Chart at origin, depends on compile-time flag │ │ │ │ -ROT3_DEFAULT_COORDINATES_MODE │ │ │ │ -_3_9_9 struct _C_h_a_r_t_A_t_O_r_i_g_i_n { │ │ │ │ -400 static _R_o_t_3 Retract(const Vector3& v, ChartJacobian H = boost::none); │ │ │ │ -401 static Vector3 Local(const _R_o_t_3& r, ChartJacobian H = boost::none); │ │ │ │ -402 }; │ │ │ │ -403 │ │ │ │ -404 using _L_i_e_G_r_o_u_p<_R_o_t_3, 3>::inverse; // version with derivative │ │ │ │ -405 │ │ │ │ -409 │ │ │ │ -413 _P_o_i_n_t_3 rotate(const _P_o_i_n_t_3& p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_3_> H1 = boost::none, │ │ │ │ -414 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_3_> H2 = boost::none) const; │ │ │ │ -415 │ │ │ │ -417 _P_o_i_n_t_3 _o_p_e_r_a_t_o_r_*(const _P_o_i_n_t_3& p) const; │ │ │ │ -418 │ │ │ │ -420 _P_o_i_n_t_3 unrotate(const _P_o_i_n_t_3& p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_3_> H1 = boost::none, │ │ │ │ -421 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_3_> H2=boost::none) const; │ │ │ │ -422 │ │ │ │ -426 │ │ │ │ -428 _U_n_i_t_3 rotate(const _U_n_i_t_3& p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_3_> HR = boost::none, │ │ │ │ -429 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_2_> Hp = boost::none) const; │ │ │ │ -430 │ │ │ │ -432 _U_n_i_t_3 unrotate(const _U_n_i_t_3& p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_3_> HR = boost::none, │ │ │ │ -433 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_2_> Hp = boost::none) const; │ │ │ │ -434 │ │ │ │ -436 _U_n_i_t_3 _o_p_e_r_a_t_o_r_*(const _U_n_i_t_3& p) const; │ │ │ │ -437 │ │ │ │ -441 │ │ │ │ -443 Matrix3 matrix() const; │ │ │ │ -444 │ │ │ │ -448 Matrix3 transpose() const; │ │ │ │ -449 │ │ │ │ -451 _P_o_i_n_t_3 _c_o_l_u_m_n(int index) const; │ │ │ │ -452 │ │ │ │ -453 _P_o_i_n_t_3 r1() const; │ │ │ │ -454 _P_o_i_n_t_3 r2() const; │ │ │ │ -455 _P_o_i_n_t_3 r3() const; │ │ │ │ -456 │ │ │ │ -461 Vector3 xyz(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H = boost::none) const; │ │ │ │ -462 │ │ │ │ -467 Vector3 ypr(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H = boost::none) const; │ │ │ │ -468 │ │ │ │ -473 Vector3 rpy(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H = boost::none) const; │ │ │ │ -474 │ │ │ │ -481 double roll(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> H = boost::none) const; │ │ │ │ -482 │ │ │ │ -489 double pitch(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> H = boost::none) const; │ │ │ │ -490 │ │ │ │ -497 double yaw(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> H = boost::none) const; │ │ │ │ -498 │ │ │ │ -502 │ │ │ │ -511 std::pair axisAngle() const; │ │ │ │ -512 │ │ │ │ -516 gtsam::Quaternion toQuaternion() const; │ │ │ │ -517 │ │ │ │ -518#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42 │ │ │ │ -526 Vector GTSAM_DEPRECATED quaternion() const; │ │ │ │ -527#endif │ │ │ │ -528 │ │ │ │ -534 _R_o_t_3 slerp(double t, const _R_o_t_3& other) const; │ │ │ │ -535 │ │ │ │ -537 GTSAM_EXPORT friend std::ostream &operator<<(std::ostream &os, const _R_o_t_3& │ │ │ │ -p); │ │ │ │ -538 │ │ │ │ -540 │ │ │ │ -541 private: │ │ │ │ -_5_4_3 friend class boost::serialization::access; │ │ │ │ -544 template │ │ │ │ -545 void serialize(ARCHIVE& ar, const unsigned int /*version*/) { │ │ │ │ -546#ifndef GTSAM_USE_QUATERNIONS │ │ │ │ -547 Matrix3& M = rot_._m_a_t_r_i_x__; │ │ │ │ -548 ar& boost::serialization::make_nvp("rot11", M(0, 0)); │ │ │ │ -549 ar& boost::serialization::make_nvp("rot12", M(0, 1)); │ │ │ │ -550 ar& boost::serialization::make_nvp("rot13", M(0, 2)); │ │ │ │ -551 ar& boost::serialization::make_nvp("rot21", M(1, 0)); │ │ │ │ -552 ar& boost::serialization::make_nvp("rot22", M(1, 1)); │ │ │ │ -553 ar& boost::serialization::make_nvp("rot23", M(1, 2)); │ │ │ │ -554 ar& boost::serialization::make_nvp("rot31", M(2, 0)); │ │ │ │ -555 ar& boost::serialization::make_nvp("rot32", M(2, 1)); │ │ │ │ -556 ar& boost::serialization::make_nvp("rot33", M(2, 2)); │ │ │ │ -557#else │ │ │ │ -558 ar& boost::serialization::make_nvp("w", quaternion_.w()); │ │ │ │ -559 ar& boost::serialization::make_nvp("x", quaternion_.x()); │ │ │ │ -560 ar& boost::serialization::make_nvp("y", quaternion_.y()); │ │ │ │ -561 ar& boost::serialization::make_nvp("z", quaternion_.z()); │ │ │ │ -562#endif │ │ │ │ -563 } │ │ │ │ -564 │ │ │ │ -565#ifdef GTSAM_USE_QUATERNIONS │ │ │ │ -566 // only align if quaternion, Matrix3 has no alignment requirements │ │ │ │ -567 public: │ │ │ │ -568 _G_T_S_A_M___M_A_K_E___A_L_I_G_N_E_D___O_P_E_R_A_T_O_R___N_E_W │ │ │ │ -569#endif │ │ │ │ -570 }; │ │ │ │ -571 │ │ │ │ -_5_7_3 using _R_o_t_3_V_e_c_t_o_r = std::vector >; │ │ │ │ -574 │ │ │ │ -585 GTSAM_EXPORT std::pair _R_Q( │ │ │ │ -586 const Matrix3& A, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _9_> H = boost::none); │ │ │ │ -587 │ │ │ │ -588 template<> │ │ │ │ -_5_8_9 struct _t_r_a_i_t_s<_R_o_t_3> : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p {}; │ │ │ │ -590 │ │ │ │ -591 template<> │ │ │ │ -_5_9_2 struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p {}; │ │ │ │ -593 │ │ │ │ -594} // namespace gtsam │ │ │ │ -595 │ │ │ │ -_G_T_S_A_M___M_A_K_E___A_L_I_G_N_E_D___O_P_E_R_A_T_O_R___N_E_W │ │ │ │ -#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW │ │ │ │ +202}; │ │ │ │ +203 │ │ │ │ +204} // namespace gtsam │ │ │ │ +_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h │ │ │ │ +Special class for optional Jacobian arguments. │ │ │ │ +_G_T_S_A_M___M_A_K_E___A_L_I_G_N_E_D___O_P_E_R_A_T_O_R___N_E_W___I_F │ │ │ │ +#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) │ │ │ │ This marks a GTSAM object to require alignment. │ │ │ │ -DDeeffiinniittiioonn types.h:308 │ │ │ │ -_S_O_3_._h │ │ │ │ -3*3 matrix representation of SO(3) │ │ │ │ -_Q_u_a_t_e_r_n_i_o_n_._h │ │ │ │ -Lie Group wrapper for Eigen Quaternions. │ │ │ │ +DDeeffiinniittiioonn types.h:317 │ │ │ │ +_T_e_s_t_a_b_l_e_._h │ │ │ │ +Concept check for values that can be used in unit tests. │ │ │ │ +_M_a_n_i_f_o_l_d_._h │ │ │ │ +Base class and basic functions for Manifold types. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_R_Q │ │ │ │ -pair< Matrix3, Vector3 > RQ(const Matrix3 &A, OptionalJacobian< 3, 9 > H) │ │ │ │ -[RQ] receives a 3 by 3 matrix and returns an upper triangular matrix R and 3 │ │ │ │ -rotation angles correspo... │ │ │ │ -DDeeffiinniittiioonn Rot3.cpp:260 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_V_e_c_t_o_r │ │ │ │ -std::vector< Rot3, Eigen::aligned_allocator< Rot3 > > Rot3Vector │ │ │ │ -std::vector of Rot3s, mainly for wrapper │ │ │ │ -DDeeffiinniittiioonn Rot3.h:573 │ │ │ │ -_g_t_s_a_m_:_:_p_r_i_n_t │ │ │ │ -void print(const Matrix &A, const string &s, ostream &stream) │ │ │ │ -print without optional string, must specify cout yourself │ │ │ │ -DDeeffiinniittiioonn Matrix.cpp:156 │ │ │ │ -_g_t_s_a_m_:_:_c_o_l_u_m_n │ │ │ │ -const MATRIX::ConstColXpr column(const MATRIX &A, size_t j) │ │ │ │ -Extracts a column view from a matrix that avoids a copy. │ │ │ │ -DDeeffiinniittiioonn Matrix.h:211 │ │ │ │ -_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -Point2 operator*(double s, const Point2 &p) │ │ │ │ -multiply with scalar │ │ │ │ -DDeeffiinniittiioonn Point2.h:47 │ │ │ │ -_g_t_s_a_m_:_:_P_o_i_n_t_3 │ │ │ │ -Vector3 Point3 │ │ │ │ -As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just │ │ │ │ -typedef Point3 to Vector3... │ │ │ │ -DDeeffiinniittiioonn Point3.h:36 │ │ │ │ _g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ that can be centered ... │ │ │ │ DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p │ │ │ │ -A CRTP helper class that implements Lie group methods Prerequisites: methods │ │ │ │ -operator*,... │ │ │ │ -DDeeffiinniittiioonn Lie.h:37 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p │ │ │ │ -Both LieGroupTraits and Testable. │ │ │ │ -DDeeffiinniittiioonn Lie.h:229 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d_T_r_a_i_t_s │ │ │ │ +A helper that implements the traits interface for GTSAM manifolds. │ │ │ │ +DDeeffiinniittiioonn Manifold.h:95 │ │ │ │ _g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ either a fixed size o... │ │ │ │ DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ -_g_t_s_a_m_:_:_e_q_u_a_l_s │ │ │ │ -Template to create a binary predicate. │ │ │ │ -DDeeffiinniittiioonn Testable.h:111 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3 │ │ │ │ -Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor │ │ │ │ -symbol GTSAM_USE_QUATERNIO... │ │ │ │ -DDeeffiinniittiioonn Rot3.h:58 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_I_d_e_n_t_i_t_y │ │ │ │ -static Rot3 Identity() │ │ │ │ -identity rotation for group operation │ │ │ │ -DDeeffiinniittiioonn Rot3.h:300 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_r_e_t_r_a_c_t_C_a_y_l_e_y │ │ │ │ -Rot3 retractCayley(const Vector &omega) const │ │ │ │ -Retraction from R^3 to Rot3 manifold using the Cayley transform. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:355 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_A_d_j_o_i_n_t_M_a_p │ │ │ │ -Matrix3 AdjointMap() const │ │ │ │ -Calculate Adjoint map. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:396 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_C_l_o_s_e_s_t_T_o │ │ │ │ -static Rot3 ClosestTo(const Matrix3 &M) │ │ │ │ -Static, named constructor that finds Rot3 element closest to M in Frobenius │ │ │ │ -norm. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:271 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_~_R_o_t_3 │ │ │ │ -virtual ~Rot3() │ │ │ │ -Virtual destructor. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:140 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_Y_a_w │ │ │ │ -static Rot3 Yaw(double t) │ │ │ │ -Positive yaw is to right (as in aircraft heading). See ypr. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:174 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_A_x_i_s_A_n_g_l_e │ │ │ │ -static Rot3 AxisAngle(const Unit3 &axis, double angle) │ │ │ │ -Convert from axis/angle representation. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:231 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_R_o_t_3 │ │ │ │ -Rot3(const Matrix3 &R) │ │ │ │ -Constructor from a rotation matrix Overload version for Matrix3 to avoid │ │ │ │ -casting in quaternion mode. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:112 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_R_o_d_r_i_g_u_e_s │ │ │ │ -static Rot3 Rodrigues(const Vector3 &w) │ │ │ │ -Rodrigues' formula to compute an incremental rotation. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:240 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_A_x_i_s_A_n_g_l_e │ │ │ │ -static Rot3 AxisAngle(const Point3 &axis, double angle) │ │ │ │ -Convert from axis/angle representation. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:215 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_P_i_t_c_h │ │ │ │ -static Rot3 Pitch(double t) │ │ │ │ -Positive pitch is up (increasing aircraft altitude).See ypr. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:177 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_R_z_R_y_R_x │ │ │ │ -static Rot3 RzRyRx(const Vector &xyz, OptionalJacobian< 3, 3 > H=boost::none) │ │ │ │ -Rotations around Z, Y, then X axes as in http://en.wikipedia.org/wiki/ │ │ │ │ -Rotation_matrix,... │ │ │ │ -DDeeffiinniittiioonn Rot3.h:160 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_l_o_c_a_l_C_a_y_l_e_y │ │ │ │ -Vector3 localCayley(const Rot3 &other) const │ │ │ │ -Inverse of retractCayley. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:360 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_Q_u_a_t_e_r_n_i_o_n │ │ │ │ -static Rot3 Quaternion(double w, double x, double y, double z) │ │ │ │ -Create from Quaternion coefficients. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:204 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_c_o_n_j_u_g_a_t_e │ │ │ │ -Rot3 conjugate(const Rot3 &cRb) const │ │ │ │ -Conjugation: given a rotation acting in frame B, compute rotation c1Rc2 acting │ │ │ │ -in a frame C. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:321 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_R_o_d_r_i_g_u_e_s │ │ │ │ -static Rot3 Rodrigues(double wx, double wy, double wz) │ │ │ │ -Rodrigues' formula to compute an incremental rotation. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:251 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_i_n_v_e_r_s_e │ │ │ │ -Rot3 inverse() const │ │ │ │ -inverse of a rotation │ │ │ │ -DDeeffiinniittiioonn Rot3.h:308 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_R_o_t_3 │ │ │ │ -Rot3(const SO3 &R) │ │ │ │ -Constructor from an SO3 instance. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:121 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_E_x_p_m_a_p │ │ │ │ -static Rot3 Expmap(const Vector3 &v, OptionalJacobian< 3, 3 > H=boost::none) │ │ │ │ -Exponential map at identity - create a rotation from canonical coordinates │ │ │ │ -using Rodrigues' formula. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:374 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_Y_p_r │ │ │ │ -static Rot3 Ypr(double y, double p, double r, OptionalJacobian< 3, 1 > │ │ │ │ -Hy=boost::none, OptionalJacobian< 3, 1 > Hp=boost::none, OptionalJacobian< 3, 1 │ │ │ │ -> Hr=boost::none) │ │ │ │ -Returns rotation nRb from body to nav frame. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:196 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_C_o_o_r_d_i_n_a_t_e_s_M_o_d_e │ │ │ │ -CoordinatesMode │ │ │ │ -The method retract() is used to map from the tangent space back to the │ │ │ │ -manifold. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:339 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_C_A_Y_L_E_Y │ │ │ │ -@ CAYLEY │ │ │ │ -Retract and localCoordinates using the Cayley transform. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:342 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_E_X_P_M_A_P │ │ │ │ -@ EXPMAP │ │ │ │ -Use the Lie group exponential map to retract. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:340 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_R_o_t_3 │ │ │ │ -Rot3(const Eigen::MatrixBase< Derived > &R) │ │ │ │ -Constructor from a rotation matrix Version for generic matrices. │ │ │ │ -DDeeffiinniittiioonn Rot3.h:101 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_C_a_y_l_e_y_C_h_a_r_t │ │ │ │ -DDeeffiinniittiioonn Rot3.h:349 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ -DDeeffiinniittiioonn Rot3.h:399 │ │ │ │ -_g_t_s_a_m_:_:_S_O_<_ _3_ _> │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_m_a_t_r_i_x__ │ │ │ │ -MatrixNN matrix_ │ │ │ │ -Rotation matrix. │ │ │ │ -DDeeffiinniittiioonn SOn.h:62 │ │ │ │ -_g_t_s_a_m_:_:_S_O_:_:_m_a_t_r_i_x │ │ │ │ -const MatrixNN & matrix() const │ │ │ │ -Return matrix. │ │ │ │ -DDeeffiinniittiioonn SOn.h:155 │ │ │ │ -_g_t_s_a_m_:_:_U_n_i_t_3 │ │ │ │ -Represents a 3D point on a unit sphere. │ │ │ │ -DDeeffiinniittiioonn Unit3.h:43 │ │ │ │ -_g_t_s_a_m_:_:_U_n_i_t_3_:_:_u_n_i_t_V_e_c_t_o_r │ │ │ │ -Vector3 unitVector(OptionalJacobian< 3, 2 > H=boost::none) const │ │ │ │ -Return unit-norm Vector. │ │ │ │ -DDeeffiinniittiioonn Unit3.cpp:151 │ │ │ │ +_g_t_s_a_m_:_:_T_e_s_t_a_b_l_e │ │ │ │ +A helper that implements the traits interface for GTSAM types. │ │ │ │ +DDeeffiinniittiioonn Testable.h:151 │ │ │ │ +_g_t_s_a_m_:_:_B_e_a_r_i_n_g │ │ │ │ +DDeeffiinniittiioonn BearingRange.h:34 │ │ │ │ +_g_t_s_a_m_:_:_R_a_n_g_e │ │ │ │ +DDeeffiinniittiioonn BearingRange.h:40 │ │ │ │ +_g_t_s_a_m_:_:_B_e_a_r_i_n_g_R_a_n_g_e │ │ │ │ +Bearing-Range product for a particular A1,A2 combination will use the functors │ │ │ │ +above to create a simi... │ │ │ │ +DDeeffiinniittiioonn BearingRange.h:51 │ │ │ │ +_g_t_s_a_m_:_:_B_e_a_r_i_n_g_R_a_n_g_e_:_:_M_e_a_s_u_r_e_R_a_n_g_e │ │ │ │ +static R MeasureRange(const A1 &a1, const A2 &a2) │ │ │ │ +Predict range. │ │ │ │ +DDeeffiinniittiioonn BearingRange.h:101 │ │ │ │ +_g_t_s_a_m_:_:_B_e_a_r_i_n_g_R_a_n_g_e_:_:_M_e_a_s_u_r_e │ │ │ │ +static BearingRange Measure(const A1 &a1, const A2 &a2, OptionalJacobian< │ │ │ │ +dimension, traits< A1 >::dimension > H1=boost::none, OptionalJacobian< │ │ │ │ +dimension, traits< A2 >::dimension > H2=boost::none) │ │ │ │ +Prediction function that stacks measurements. │ │ │ │ +DDeeffiinniittiioonn BearingRange.h:78 │ │ │ │ +_g_t_s_a_m_:_:_B_e_a_r_i_n_g_R_a_n_g_e_:_:_r_e_t_r_a_c_t │ │ │ │ +BearingRange retract(const TangentVector &xi) const │ │ │ │ +Retract delta to manifold. │ │ │ │ +DDeeffiinniittiioonn BearingRange.h:130 │ │ │ │ +_g_t_s_a_m_:_:_B_e_a_r_i_n_g_R_a_n_g_e_:_:_b_e_a_r_i_n_g │ │ │ │ +const B & bearing() const │ │ │ │ +Return bearing measurement. │ │ │ │ +DDeeffiinniittiioonn BearingRange.h:72 │ │ │ │ +_g_t_s_a_m_:_:_B_e_a_r_i_n_g_R_a_n_g_e_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ +TangentVector localCoordinates(const BearingRange &other) const │ │ │ │ +Compute the coordinates in the tangent space. │ │ │ │ +DDeeffiinniittiioonn BearingRange.h:137 │ │ │ │ +_g_t_s_a_m_:_:_B_e_a_r_i_n_g_R_a_n_g_e_:_:_r_a_n_g_e │ │ │ │ +const R & range() const │ │ │ │ +Return range measurement. │ │ │ │ +DDeeffiinniittiioonn BearingRange.h:75 │ │ │ │ +_g_t_s_a_m_:_:_B_e_a_r_i_n_g_R_a_n_g_e_:_:_M_e_a_s_u_r_e_B_e_a_r_i_n_g │ │ │ │ +static B MeasureBearing(const A1 &a1, const A2 &a2) │ │ │ │ +Predict bearing. │ │ │ │ +DDeeffiinniittiioonn BearingRange.h:96 │ │ │ │ +_g_t_s_a_m_:_:_H_a_s_B_e_a_r_i_n_g │ │ │ │ +DDeeffiinniittiioonn BearingRange.h:180 │ │ │ │ +_g_t_s_a_m_:_:_H_a_s_R_a_n_g_e │ │ │ │ +DDeeffiinniittiioonn BearingRange.h:194 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _R_o_t_3_._h │ │ │ │ + * _B_e_a_r_i_n_g_R_a_n_g_e_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00353.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Rot3.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SOn-inl.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,53 +94,38 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Namespaces | │ │ │ -Functions
    │ │ │ -
    Rot3.cpp File Reference
    │ │ │ +Namespaces
    │ │ │ +
    SOn-inl.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    Rotation, common code between Rotation matrix and Quaternion. │ │ │ +

    Template implementations for SO(n) │ │ │ More...

    │ │ │ + │ │ │ +

    Go to the source code of this file.

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

    │ │ │ -Functions

    pair< Matrix3, Vector3 > gtsam::RQ (const Matrix3 &A, OptionalJacobian< 3, 9 > H=boost::none)
     [RQ] receives a 3 by 3 matrix and returns an upper triangular matrix R and 3 rotation angles corresponding to the rotation matrix Q=Qz'*Qy'*Qx' such that A = R*Q = R*Qz'*Qy'*Qx'.
     
    │ │ │ -ostream & gtsam::operator<< (ostream &os, const Rot3 &R)
     
    │ │ │

    Detailed Description

    │ │ │ -

    Rotation, common code between Rotation matrix and Quaternion.

    │ │ │ -
    Author
    Alireza Fathi
    │ │ │ -
    │ │ │ -Christian Potthast
    │ │ │ -
    │ │ │ -Frank Dellaert
    │ │ │ -
    │ │ │ -Richard Roberts
    │ │ │ -
    │ │ │ -Varun Agrawal
    │ │ │ +

    Template implementations for SO(n)

    │ │ │ +
    Author
    Frank Dellaert
    │ │ │ +
    Date
    March 2019
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,34 +1,23 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Rot3.cpp File Reference │ │ │ │ -Rotation, common code between Rotation matrix and Quaternion. _M_o_r_e_._._. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +SOn-inl.h File Reference │ │ │ │ +Template implementations for SO(n) _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -pair< Matrix3, Vector3 >  _g_t_s_a_m_:_:_R_Q (const Matrix3 &A, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 3, 9 > │ │ │ │ - H=boost::none) │ │ │ │ - [RQ] receives a 3 by 3 matrix and returns an upper │ │ │ │ -  triangular matrix R and 3 rotation angles │ │ │ │ - corresponding to the rotation matrix Q=Qz'*Qy'*Qx' │ │ │ │ - such that A = R*Q = R*Qz'*Qy'*Qx'. │ │ │ │ -  │ │ │ │ - ostream &  ggttssaamm::::ooppeerraattoorr<<<< (ostream &os, const _R_o_t_3 &R) │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Rotation, common code between Rotation matrix and Quaternion. │ │ │ │ +Template implementations for SO(n) │ │ │ │ Author │ │ │ │ - Alireza Fathi │ │ │ │ - Christian Potthast │ │ │ │ Frank Dellaert │ │ │ │ - Richard Roberts │ │ │ │ - Varun Agrawal │ │ │ │ + Date │ │ │ │ + March 2019 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _R_o_t_3_._c_p_p │ │ │ │ + * _S_O_n_-_i_n_l_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00356.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Rot2.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cyclic.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,53 +94,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Classes | │ │ │ Namespaces
    │ │ │ -
    Rot2.h File Reference
    │ │ │ +
    Cyclic.cpp File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    2D rotation │ │ │ +

    Cyclic group implementation. │ │ │ More...

    │ │ │ - │ │ │ -

    Go to the source code of this file.

    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Classes

    class  gtsam::Rot2
     Rotation matrix NOTE: the angle theta is in radians unless explicitly stated. More...
     
    struct  gtsam::Rot2::ChartAtOrigin
     
    struct  gtsam::traits< Rot2 >
     
    struct  gtsam::traits< const Rot2 >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │

    Detailed Description

    │ │ │ -

    2D rotation

    │ │ │ -
    Date
    Dec 9, 2009
    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ -
    │ │ │ -John Lambert
    │ │ │ +

    Cyclic group implementation.

    │ │ │ +
    Author
    Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,35 +1,20 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -Rot2.h File Reference │ │ │ │ -2D rotation _M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_R_o_t_2 │ │ │ │ -  Rotation matrix NOTE: the angle theta is in radians unless explicitly │ │ │ │ - stated. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_R_o_t_2_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _R_o_t_2_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _R_o_t_2_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +Cyclic.cpp File Reference │ │ │ │ +Cyclic group implementation. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -2D rotation │ │ │ │ - Date │ │ │ │ - Dec 9, 2009 │ │ │ │ +Cyclic group implementation. │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - John Lambert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _R_o_t_2_._h │ │ │ │ + * _C_y_c_l_i_c_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00359.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Rot2.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,36 +94,52 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Namespaces
    │ │ │ -
    Rot2.cpp File Reference
    │ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Functions
    │ │ │ +
    Cal3.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    2D Rotations │ │ │ +

    Common code for all Calibration models. │ │ │ More...

    │ │ │ + │ │ │ +

    Go to the source code of this file.

    │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Classes

    class  gtsam::Cal3
     Common base class for all calibration models. More...
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ +Functions

    template<typename Cal , size_t Dim>
    void gtsam::calibrateJacobians (const Cal &calibration, const Point2 &pn, OptionalJacobian< 2, Dim > Dcal=boost::none, OptionalJacobian< 2, 2 > Dp=boost::none)
     Function which makes use of the Implicit Function Theorem to compute the Jacobians of calibrate using uncalibrate.
     
    │ │ │

    Detailed Description

    │ │ │ -

    2D Rotations

    │ │ │ -
    Date
    Dec 9, 2009
    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ +

    Common code for all Calibration models.

    │ │ │ +
    Author
    Varun Agrawal
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,22 +1,33 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -Rot2.cpp File Reference │ │ │ │ -2D Rotations _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Cal3.h File Reference │ │ │ │ +Common code for all Calibration models. _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +class   _g_t_s_a_m_:_:_C_a_l_3 │ │ │ │ +  Common base class for all calibration models. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ +void  _g_t_s_a_m_:_:_c_a_l_i_b_r_a_t_e_J_a_c_o_b_i_a_n_s (const Cal &calibration, const _P_o_i_n_t_2 &pn, │ │ │ │ + _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 2, Dim > Dcal=boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 2, 2 > │ │ │ │ + Dp=boost::none) │ │ │ │ +  Function which makes use of the Implicit Function Theorem to compute the │ │ │ │ + Jacobians of calibrate using uncalibrate. │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -2D Rotations │ │ │ │ - Date │ │ │ │ - Dec 9, 2009 │ │ │ │ +Common code for all Calibration models. │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + Varun Agrawal │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _R_o_t_2_._c_p_p │ │ │ │ + * _C_a_l_3_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00362.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Quaternion.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3DS2_Base.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,57 +94,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Macros | │ │ │ -Typedefs
    │ │ │ -
    Quaternion.h File Reference
    │ │ │ +Functions
    │ │ │ +
    Cal3DS2_Base.cpp File Reference
    │ │ │ │ │ │
    │ │ │ - │ │ │ -

    Lie Group wrapper for Eigen Quaternions. │ │ │ -More...

    │ │ │ - │ │ │ -

    Go to the source code of this file.

    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Classes

    struct  gtsam::traits< QUATERNION_TYPE >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Macros

    │ │ │ -#define QUATERNION_TYPE   Eigen::Quaternion<_Scalar,_Options>
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ -Typedefs

    │ │ │ -typedef Eigen::Quaternion< double, Eigen::DontAlign > gtsam::Quaternion
     

    │ │ │ +Functions

    │ │ │ +std::ostream & gtsam::operator<< (std::ostream &os, const Cal3DS2_Base &cal)
     
    │ │ │

    Detailed Description

    │ │ │ -

    Lie Group wrapper for Eigen Quaternions.

    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ +
    Date
    Feb 28, 2010
    │ │ │ +
    Author
    ydjian
    │ │ │ +
    │ │ │ +Varun Agrawal
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,30 +1,24 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s │ │ │ │ -Quaternion.h File Reference │ │ │ │ -Lie Group wrapper for Eigen Quaternions. _M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _Q_U_A_T_E_R_N_I_O_N___T_Y_P_E_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Cal3DS2_Base.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  QQUUAATTEERRNNIIOONN__TTYYPPEE   Eigen::Quaternion<_Scalar,_Options> │ │ │ │ -  │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -typedef Eigen::Quaternion< double, Eigen::DontAlign >  ggttssaamm::::QQuuaatteerrnniioonn │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _C_a_l_3_D_S_2___B_a_s_e &cal) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Lie Group wrapper for Eigen Quaternions. │ │ │ │ + Date │ │ │ │ + Feb 28, 2010 │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + ydjian │ │ │ │ + Varun Agrawal │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _Q_u_a_t_e_r_n_i_o_n_._h │ │ │ │ + * _C_a_l_3_D_S_2___B_a_s_e_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00365.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Pose3.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/StereoPoint2.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,76 +94,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Typedefs | │ │ │ Functions
    │ │ │ -
    Pose3.h File Reference
    │ │ │ +
    StereoPoint2.cpp File Reference
    │ │ │
    │ │ │
    │ │ │ - │ │ │ -

    3D Pose │ │ │ -More...

    │ │ │ - │ │ │ -

    Go to the source code of this file.

    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Classes

    class  gtsam::Pose3
     A 3D pose (R,t) : (Rot3,Point3) More...
     
    struct  gtsam::Pose3::ChartAtOrigin
     
    struct  gtsam::traits< Pose3 >
     
    struct  gtsam::traits< const Pose3 >
     
    struct  gtsam::Bearing< Pose3, Point3 >
     
    struct  gtsam::Bearing< Pose3, Pose3 >
     
    struct  gtsam::Range< Pose3, T >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Typedefs

    │ │ │ -using gtsam::Pose3Pair = std::pair< Pose3, Pose3 >
     
    │ │ │ -using gtsam::Pose3Pairs = std::vector< std::pair< Pose3, Pose3 > >
     
    │ │ │ -typedef std::vector< Pose3gtsam::Pose3Vector
     
    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │

    │ │ │ Functions

    template<>
    Matrix gtsam::wedge< Pose3 > (const Vector &xi)
     wedge for Pose3:
     
    │ │ │ +ostream & gtsam::operator<< (ostream &os, const StereoPoint2 &p)
     
    │ │ │

    Detailed Description

    │ │ │ -

    3D Pose

    │ │ │ +
    Date
    Jan 26, 2010
    │ │ │ +
    Author
    dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,48 +1,23 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Pose3.h File Reference │ │ │ │ -3D Pose _M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_P_o_s_e_3 │ │ │ │ -  A 3D pose (R,t) : (_R_o_t_3,Point3) _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_P_o_s_e_3_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _P_o_s_e_3_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _P_o_s_e_3_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_B_e_a_r_i_n_g_<_ _P_o_s_e_3_,_ _P_o_i_n_t_3_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_B_e_a_r_i_n_g_<_ _P_o_s_e_3_,_ _P_o_s_e_3_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_R_a_n_g_e_<_ _P_o_s_e_3_,_ _T_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +StereoPoint2.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ - using  ggttssaamm::::PPoossee33PPaaiirr = std::pair< _P_o_s_e_3, _P_o_s_e_3 > │ │ │ │ -  │ │ │ │ - using  ggttssaamm::::PPoossee33PPaaiirrss = std::vector< std::pair< │ │ │ │ - _P_o_s_e_3, _P_o_s_e_3 > > │ │ │ │ -  │ │ │ │ -typedef std::vector< _P_o_s_e_3 >  ggttssaamm::::PPoossee33VVeeccttoorr │ │ │ │ -  │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template<> │ │ │ │ - Matrix  _g_t_s_a_m_:_:_w_e_d_g_e_<_ _P_o_s_e_3_ _> (const Vector &xi) │ │ │ │ -  wedge for _P_o_s_e_3: │ │ │ │ +ostream &  ggttssaamm::::ooppeerraattoorr<<<< (ostream &os, const _S_t_e_r_e_o_P_o_i_n_t_2 &p) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -3D Pose │ │ │ │ + Date │ │ │ │ + Jan 26, 2010 │ │ │ │ + Author │ │ │ │ + dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_o_s_e_3_._h │ │ │ │ + * _S_t_e_r_e_o_P_o_i_n_t_2_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00368.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Pose3.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SimpleCamera.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,40 +95,56 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Namespaces | │ │ │ -Functions
    │ │ │ -
    Pose3.cpp File Reference
    │ │ │ +Typedefs
    │ │ │ +
    SimpleCamera.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    3D Pose │ │ │ +

    A simple camera class with a Cal3_S2 calibration. │ │ │ More...

    │ │ │ + │ │ │ +

    Go to the source code of this file.

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ -Functions

    │ │ │ -std::ostream & gtsam::operator<< (std::ostream &os, const Pose3 &pose)
     

    │ │ │ +Typedefs

    using gtsam::PinholeCameraCal3_S2 = gtsam::PinholeCamera< gtsam::Cal3_S2 >
     Convenient aliases for Pinhole camera classes with different calibrations.
     
    │ │ │ +using gtsam::PinholeCameraCal3Bundler = gtsam::PinholeCamera< gtsam::Cal3Bundler >
     
    │ │ │ +using gtsam::PinholeCameraCal3DS2 = gtsam::PinholeCamera< gtsam::Cal3DS2 >
     
    │ │ │ +using gtsam::PinholeCameraCal3Unified = gtsam::PinholeCamera< gtsam::Cal3Unified >
     
    │ │ │ +using gtsam::PinholeCameraCal3Fisheye = gtsam::PinholeCamera< gtsam::Cal3Fisheye >
     
    │ │ │

    Detailed Description

    │ │ │ -

    3D Pose

    │ │ │ +

    A simple camera class with a Cal3_S2 calibration.

    │ │ │ +
    Date
    Aug 16, 2009
    │ │ │ +
    Author
    Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,21 +1,39 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Pose3.cpp File Reference │ │ │ │ -3D Pose _M_o_r_e_._._. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ +SimpleCamera.h File Reference │ │ │ │ +A simple camera class with a Cal3_S2 calibration. _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _P_o_s_e_3 &pose) │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +using  _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_C_a_l_3___S_2 = _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a< _g_t_s_a_m_:_:_C_a_l_3___S_2 > │ │ │ │ +  Convenient aliases for Pinhole camera classes with different │ │ │ │ + calibrations. │ │ │ │ +  │ │ │ │ +using  ggttssaamm::::PPiinnhhoolleeCCaammeerraaCCaall33BBuunnddlleerr = _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a< _g_t_s_a_m_:_: │ │ │ │ + _C_a_l_3_B_u_n_d_l_e_r > │ │ │ │ +  │ │ │ │ +using  ggttssaamm::::PPiinnhhoolleeCCaammeerraaCCaall33DDSS22 = _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a< _g_t_s_a_m_:_:_C_a_l_3_D_S_2 > │ │ │ │ +  │ │ │ │ +using  ggttssaamm::::PPiinnhhoolleeCCaammeerraaCCaall33UUnniiffiieedd = _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a< _g_t_s_a_m_:_: │ │ │ │ + _C_a_l_3_U_n_i_f_i_e_d > │ │ │ │ +  │ │ │ │ +using  ggttssaamm::::PPiinnhhoolleeCCaammeerraaCCaall33FFiisshheeyyee = _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a< _g_t_s_a_m_:_: │ │ │ │ + _C_a_l_3_F_i_s_h_e_y_e > │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -3D Pose │ │ │ │ +A simple camera class with a Cal3_S2 calibration. │ │ │ │ + Date │ │ │ │ + Aug 16, 2009 │ │ │ │ + Author │ │ │ │ + Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_o_s_e_3_._c_p_p │ │ │ │ + * _S_i_m_p_l_e_C_a_m_e_r_a_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00371.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Pose2.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/StereoCamera.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,74 +95,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Typedefs | │ │ │ -Functions
    │ │ │ -
    Pose2.h File Reference
    │ │ │ +Namespaces
    │ │ │ +
    StereoCamera.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    2D Pose │ │ │ +

    A Stereo Camera based on two Simple Cameras. │ │ │ More...

    │ │ │ │ │ │

    Go to the source code of this file.

    │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ │ │ │

    │ │ │ Classes

    class  gtsam::Pose2
     A 2D pose (Point2,Rot2) More...
    class  gtsam::StereoCheiralityException
     
    struct  gtsam::Pose2::ChartAtOrigin
    class  gtsam::StereoCamera
     A stereo camera class, parameterize by left camera pose and stereo calibration. More...
     
    struct  gtsam::traits< Pose2 >
    struct  gtsam::traits< StereoCamera >
     
    struct  gtsam::traits< const Pose2 >
     
    struct  gtsam::Bearing< Pose2, T >
     
    struct  gtsam::Range< Pose2, T >
    struct  gtsam::traits< const StereoCamera >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Typedefs

    │ │ │ -using gtsam::Pose2Pair = std::pair< Pose2, Pose2 >
     
    │ │ │ -using gtsam::Pose2Pairs = std::vector< Pose2Pair >
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

    │ │ │ -Functions

    │ │ │ -template<>
    Matrix gtsam::wedge< Pose2 > (const Vector &xi)
     specialization for pose2 wedge function (generic template in Lie.h)
     
    │ │ │

    Detailed Description

    │ │ │ -

    2D Pose

    │ │ │ -
    Author
    : Frank Dellaert
    │ │ │ -
    │ │ │ -: Richard Roberts
    │ │ │ +

    A Stereo Camera based on two Simple Cameras.

    │ │ │ +

    A Rectified Stereo Camera.

    │ │ │ +
    Author
    Chris Beall
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,46 +1,33 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Pose2.h File Reference │ │ │ │ -2D Pose _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +StereoCamera.h File Reference │ │ │ │ +A Stereo Camera based on two Simple Cameras. _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_P_o_s_e_2 │ │ │ │ -  A 2D pose (Point2,_R_o_t_2) _M_o_r_e_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_S_t_e_r_e_o_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_P_o_s_e_2_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ + class   _g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a │ │ │ │ +  A stereo camera class, parameterize by left camera pose and stereo │ │ │ │ + calibration. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _P_o_s_e_2_ _> │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _S_t_e_r_e_o_C_a_m_e_r_a_ _> │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _P_o_s_e_2_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_B_e_a_r_i_n_g_<_ _P_o_s_e_2_,_ _T_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_R_a_n_g_e_<_ _P_o_s_e_2_,_ _T_ _> │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _S_t_e_r_e_o_C_a_m_e_r_a_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -using  ggttssaamm::::PPoossee22PPaaiirr = std::pair< _P_o_s_e_2, _P_o_s_e_2 > │ │ │ │ -  │ │ │ │ -using  ggttssaamm::::PPoossee22PPaaiirrss = std::vector< Pose2Pair > │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template<> │ │ │ │ - Matrix  ggttssaamm::::wweeddggee<< PPoossee22 >> (const Vector &xi) │ │ │ │ -  specialization for pose2 wedge function (generic template in _L_i_e_._h) │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -2D Pose │ │ │ │ +A Stereo Camera based on two Simple Cameras. │ │ │ │ +A Rectified Stereo Camera. │ │ │ │ Author │ │ │ │ - : Frank Dellaert │ │ │ │ - : Richard Roberts │ │ │ │ + Chris Beall │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_o_s_e_2_._h │ │ │ │ + * _S_t_e_r_e_o_C_a_m_e_r_a_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00371.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,8 +1,5 @@ │ │ │ │ var a00371 = [ │ │ │ │ - ["gtsam::Pose2::ChartAtOrigin", "a03160.html", null], │ │ │ │ - ["gtsam::traits< Pose2 >", "a03164.html", null], │ │ │ │ - ["gtsam::traits< const Pose2 >", "a03168.html", null], │ │ │ │ - ["gtsam::Bearing< Pose2, T >", "a03172.html", null], │ │ │ │ - ["gtsam::Range< Pose2, T >", "a03176.html", null], │ │ │ │ - ["wedge< Pose2 >", "a00371.html#a4b78f4db0e05f3ca838ee4da6187710e", null] │ │ │ │ + ["gtsam::StereoCheiralityException", "a03336.html", null], │ │ │ │ + ["gtsam::traits< StereoCamera >", "a03344.html", null], │ │ │ │ + ["gtsam::traits< const StereoCamera >", "a03348.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00371_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Pose2.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/StereoCamera.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,337 +98,222 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    Pose2.h
    │ │ │ +
    StereoCamera.h
    │ │ │
    │ │ │
    │ │ │ Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │
    4 * Atlanta, Georgia 30332-0415
    │ │ │
    5 * All Rights Reserved
    │ │ │
    6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
    │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │ -
    19// \callgraph
    │ │ │ -
    20
    │ │ │ -
    21#pragma once
    │ │ │ -
    22
    │ │ │ - │ │ │ - │ │ │ -
    25#include <gtsam/geometry/Rot2.h>
    │ │ │ -
    26#include <gtsam/base/Lie.h>
    │ │ │ -
    27#include <gtsam/dllexport.h>
    │ │ │ -
    28
    │ │ │ -
    29namespace gtsam {
    │ │ │ +
    18#pragma once
    │ │ │ +
    19
    │ │ │ + │ │ │ + │ │ │ + │ │ │ +
    23
    │ │ │ +
    24namespace gtsam {
    │ │ │ +
    25
    │ │ │ +
    │ │ │ +
    26class GTSAM_EXPORT StereoCheiralityException: public std::runtime_error {
    │ │ │ +
    27public:
    │ │ │ + │ │ │ +
    29 : StereoCheiralityException(std::numeric_limits<Key>::max()) {}
    │ │ │
    30
    │ │ │ -
    │ │ │ -
    36class Pose2: public LieGroup<Pose2, 3> {
    │ │ │ -
    37
    │ │ │ -
    38public:
    │ │ │ -
    39
    │ │ │ -
    41 typedef Rot2 Rotation;
    │ │ │ -
    42 typedef Point2 Translation;
    │ │ │ -
    43
    │ │ │ -
    44private:
    │ │ │ -
    45
    │ │ │ -
    46 Rot2 r_;
    │ │ │ -
    47 Point2 t_;
    │ │ │ + │ │ │ +
    32 : std::runtime_error("Stereo Cheirality Exception"),
    │ │ │ +
    33 j_(j) {}
    │ │ │ +
    34
    │ │ │ +
    35 Key nearbyVariable() const {
    │ │ │ +
    36 return j_;
    │ │ │ +
    37 }
    │ │ │ +
    38
    │ │ │ +
    39private:
    │ │ │ +
    40 Key j_;
    │ │ │ +
    41};
    │ │ │ +
    │ │ │ +
    42
    │ │ │ +
    │ │ │ +
    47class GTSAM_EXPORT StereoCamera {
    │ │ │
    48
    │ │ │
    49public:
    │ │ │
    50
    │ │ │ -
    53
    │ │ │ -
    │ │ │ - │ │ │ -
    56 r_(traits<Rot2>::Identity()), t_(traits<Point2>::Identity()) {
    │ │ │ -
    57 }
    │ │ │ -
    │ │ │ -
    58
    │ │ │ -
    60 Pose2(const Pose2& pose) : r_(pose.r_), t_(pose.t_) {}
    │ │ │ + │ │ │ +
    56 typedef StereoPoint2Vector MeasurementVector;
    │ │ │ +
    57
    │ │ │ +
    58private:
    │ │ │ +
    59 Pose3 leftCamPose_;
    │ │ │ +
    60 Cal3_S2Stereo::shared_ptr K_;
    │ │ │
    61
    │ │ │ -
    │ │ │ -
    68 Pose2(double x, double y, double theta) :
    │ │ │ -
    69 r_(Rot2::fromAngle(theta)), t_(x, y) {
    │ │ │ -
    70 }
    │ │ │ -
    │ │ │ -
    71
    │ │ │ -
    │ │ │ -
    73 Pose2(double theta, const Point2& t) :
    │ │ │ -
    74 r_(Rot2::fromAngle(theta)), t_(t) {
    │ │ │ -
    75 }
    │ │ │ -
    │ │ │ -
    76
    │ │ │ -
    78 Pose2(const Rot2& r, const Point2& t) : r_(r), t_(t) {}
    │ │ │ -
    79
    │ │ │ -
    │ │ │ -
    81 Pose2(const Matrix &T) :
    │ │ │ -
    82 r_(Rot2::atan2(T(1, 0), T(0, 0))), t_(T(0, 2), T(1, 2)) {
    │ │ │ -
    83 assert(T.rows() == 3 && T.cols() == 3);
    │ │ │ -
    84 }
    │ │ │ -
    │ │ │ -
    85
    │ │ │ -
    89
    │ │ │ -
    │ │ │ -
    91 Pose2(const Vector& v) : Pose2() {
    │ │ │ -
    92 *this = Expmap(v);
    │ │ │ -
    93 }
    │ │ │ +
    62public:
    │ │ │ +
    63
    │ │ │ +
    64 enum {
    │ │ │ +
    65 dimension = 6
    │ │ │ +
    66 };
    │ │ │ +
    67
    │ │ │ +
    70
    │ │ │ +
    │ │ │ + │ │ │ +
    73 K_(new Cal3_S2Stereo()) {
    │ │ │ +
    74 }
    │ │ │ +
    │ │ │ +
    75
    │ │ │ +
    77 StereoCamera(const Pose3& leftCamPose, const Cal3_S2Stereo::shared_ptr K);
    │ │ │ +
    78
    │ │ │ +
    │ │ │ +
    80 const Cal3_S2Stereo& calibration() const {
    │ │ │ +
    81 return *K_;
    │ │ │ +
    82 }
    │ │ │ +
    │ │ │ +
    83
    │ │ │ +
    87
    │ │ │ +
    │ │ │ +
    89 void print(const std::string& s = "") const {
    │ │ │ +
    90 leftCamPose_.print(s + ".camera.");
    │ │ │ +
    91 K_->print(s + ".calibration.");
    │ │ │ +
    92 }
    │ │ │ +
    │ │ │ +
    93
    │ │ │ +
    │ │ │ +
    95 bool equals(const StereoCamera &camera, double tol = 1e-9) const {
    │ │ │ +
    96 return leftCamPose_.equals(camera.leftCamPose_, tol)
    │ │ │ +
    97 && K_->equals(*camera.K_, tol);
    │ │ │ +
    98 }
    │ │ │
    │ │ │ -
    94
    │ │ │ -
    102 static boost::optional<Pose2> Align(const Point2Pairs& abPointPairs);
    │ │ │ +
    99
    │ │ │
    103
    │ │ │ -
    104 // Version of Pose2::Align that takes 2 matrices.
    │ │ │ -
    105 static boost::optional<Pose2> Align(const Matrix& a, const Matrix& b);
    │ │ │ -
    106
    │ │ │ -
    110
    │ │ │ -
    112 GTSAM_EXPORT void print(const std::string& s = "") const;
    │ │ │ +
    │ │ │ +
    105 inline size_t dim() const {
    │ │ │ +
    106 return 6;
    │ │ │ +
    107 }
    │ │ │ +
    │ │ │ +
    108
    │ │ │ +
    │ │ │ +
    110 static inline size_t Dim() {
    │ │ │ +
    111 return 6;
    │ │ │ +
    112 }
    │ │ │ +
    │ │ │
    113
    │ │ │ -
    115 GTSAM_EXPORT bool equals(const Pose2& pose, double tol = 1e-9) const;
    │ │ │ -
    116
    │ │ │ -
    120
    │ │ │ -
    122 inline static Pose2 Identity() { return Pose2(); }
    │ │ │ +
    │ │ │ +
    115 inline StereoCamera retract(const Vector& v) const {
    │ │ │ +
    116 return StereoCamera(pose().retract(v), K_);
    │ │ │ +
    117 }
    │ │ │ +
    │ │ │ +
    118
    │ │ │ +
    │ │ │ +
    120 inline Vector6 localCoordinates(const StereoCamera& t2) const {
    │ │ │ +
    121 return leftCamPose_.localCoordinates(t2.leftCamPose_);
    │ │ │ +
    122 }
    │ │ │ +
    │ │ │
    123
    │ │ │ -
    125 GTSAM_EXPORT Pose2 inverse() const;
    │ │ │ -
    126
    │ │ │ -
    │ │ │ -
    128 inline Pose2 operator*(const Pose2& p2) const {
    │ │ │ -
    129 return Pose2(r_*p2.r(), t_ + r_*p2.t());
    │ │ │ -
    130 }
    │ │ │ -
    │ │ │ -
    131
    │ │ │ -
    135
    │ │ │ -
    137 GTSAM_EXPORT static Pose2 Expmap(const Vector3& xi, ChartJacobian H = boost::none);
    │ │ │ -
    138
    │ │ │ -
    140 GTSAM_EXPORT static Vector3 Logmap(const Pose2& p, ChartJacobian H = boost::none);
    │ │ │ -
    141
    │ │ │ -
    146 GTSAM_EXPORT Matrix3 AdjointMap() const;
    │ │ │ +
    127
    │ │ │ +
    │ │ │ +
    129 const Pose3& pose() const {
    │ │ │ +
    130 return leftCamPose_;
    │ │ │ +
    131 }
    │ │ │ +
    │ │ │ +
    132
    │ │ │ +
    │ │ │ +
    134 double baseline() const {
    │ │ │ +
    135 return K_->baseline();
    │ │ │ +
    136 }
    │ │ │ +
    │ │ │ +
    137
    │ │ │ +
    139 StereoPoint2 project(const Point3& point) const;
    │ │ │ +
    140
    │ │ │ +
    145 StereoPoint2 project2(const Point3& point, OptionalJacobian<3, 6> H1 =
    │ │ │ +
    146 boost::none, OptionalJacobian<3, 3> H2 = boost::none) const;
    │ │ │
    147
    │ │ │ -
    │ │ │ -
    149 inline Vector3 Adjoint(const Vector3& xi) const {
    │ │ │ -
    150 return AdjointMap()*xi;
    │ │ │ -
    151 }
    │ │ │ -
    │ │ │ -
    152
    │ │ │ -
    156 GTSAM_EXPORT static Matrix3 adjointMap(const Vector3& v);
    │ │ │ -
    157
    │ │ │ -
    │ │ │ -
    161 static Vector3 adjoint(const Vector3& xi, const Vector3& y) {
    │ │ │ -
    162 return adjointMap(xi) * y;
    │ │ │ -
    163 }
    │ │ │ -
    │ │ │ -
    164
    │ │ │ -
    │ │ │ -
    168 static Vector3 adjointTranspose(const Vector3& xi, const Vector3& y) {
    │ │ │ -
    169 return adjointMap(xi).transpose() * y;
    │ │ │ -
    170 }
    │ │ │ -
    │ │ │ -
    171
    │ │ │ -
    172 // temporary fix for wrappers until case issue is resolved
    │ │ │ -
    173 static Matrix3 adjointMap_(const Vector3 &xi) { return adjointMap(xi);}
    │ │ │ -
    174 static Vector3 adjoint_(const Vector3 &xi, const Vector3 &y) { return adjoint(xi, y);}
    │ │ │ -
    175
    │ │ │ -
    │ │ │ -
    183 static inline Matrix3 wedge(double vx, double vy, double w) {
    │ │ │ -
    184 Matrix3 m;
    │ │ │ -
    185 m << 0.,-w, vx,
    │ │ │ -
    186 w, 0., vy,
    │ │ │ -
    187 0., 0., 0.;
    │ │ │ -
    188 return m;
    │ │ │ -
    189 }
    │ │ │ +
    149 Point3 backproject(const StereoPoint2& z) const;
    │ │ │ +
    150
    │ │ │ +
    155 Point3 backproject2(const StereoPoint2& z,
    │ │ │ +
    156 OptionalJacobian<3, 6> H1 = boost::none,
    │ │ │ +
    157 OptionalJacobian<3, 3> H2 = boost::none) const;
    │ │ │ +
    158
    │ │ │ +
    162
    │ │ │ + │ │ │ + │ │ │ +
    171 boost::none) const;
    │ │ │ +
    172
    │ │ │ +
    │ │ │ + │ │ │ +
    175 return Eigen::Matrix<double,traits<Measurement>::dimension,1>::Constant(2.0 * K_->fx());;
    │ │ │ +
    176 }
    │ │ │ +
    │ │ │ +
    177
    │ │ │ +
    179
    │ │ │ +
    180private:
    │ │ │ +
    181
    │ │ │ +
    182 friend class boost::serialization::access;
    │ │ │ +
    183 template<class Archive>
    │ │ │ +
    184 void serialize(Archive & ar, const unsigned int /*version*/) {
    │ │ │ +
    185 ar & BOOST_SERIALIZATION_NVP(leftCamPose_);
    │ │ │ +
    186 ar & BOOST_SERIALIZATION_NVP(K_);
    │ │ │ +
    187 }
    │ │ │ +
    188
    │ │ │ +
    189};
    │ │ │
    │ │ │
    190
    │ │ │ -
    192 GTSAM_EXPORT static Matrix3 ExpmapDerivative(const Vector3& v);
    │ │ │ -
    193
    │ │ │ -
    195 GTSAM_EXPORT static Matrix3 LogmapDerivative(const Pose2& v);
    │ │ │ -
    196
    │ │ │ -
    197 // Chart at origin, depends on compile-time flag SLOW_BUT_CORRECT_EXPMAP
    │ │ │ -
    │ │ │ - │ │ │ -
    199 GTSAM_EXPORT static Pose2 Retract(const Vector3& v, ChartJacobian H = boost::none);
    │ │ │ -
    200 GTSAM_EXPORT static Vector3 Local(const Pose2& r, ChartJacobian H = boost::none);
    │ │ │ -
    201 };
    │ │ │ -
    │ │ │ -
    202
    │ │ │ -
    203 using LieGroup<Pose2, 3>::inverse; // version with derivative
    │ │ │ -
    204
    │ │ │ -
    208
    │ │ │ -
    210 GTSAM_EXPORT Point2 transformTo(const Point2& point,
    │ │ │ -
    211 OptionalJacobian<2, 3> Dpose = boost::none,
    │ │ │ -
    212 OptionalJacobian<2, 2> Dpoint = boost::none) const;
    │ │ │ -
    213
    │ │ │ -
    219 Matrix transformTo(const Matrix& points) const;
    │ │ │ -
    220
    │ │ │ -
    222 GTSAM_EXPORT Point2 transformFrom(const Point2& point,
    │ │ │ -
    223 OptionalJacobian<2, 3> Dpose = boost::none,
    │ │ │ -
    224 OptionalJacobian<2, 2> Dpoint = boost::none) const;
    │ │ │ -
    225
    │ │ │ -
    231 Matrix transformFrom(const Matrix& points) const;
    │ │ │ -
    232
    │ │ │ -
    │ │ │ -
    234 inline Point2 operator*(const Point2& point) const {
    │ │ │ -
    235 return transformFrom(point);
    │ │ │ -
    236 }
    │ │ │ -
    │ │ │ -
    237
    │ │ │ -
    241
    │ │ │ -
    243 inline double x() const { return t_.x(); }
    │ │ │ -
    244
    │ │ │ -
    246 inline double y() const { return t_.y(); }
    │ │ │ -
    247
    │ │ │ -
    249 inline double theta() const { return r_.theta(); }
    │ │ │ -
    250
    │ │ │ -
    252 inline const Point2& t() const { return t_; }
    │ │ │ -
    253
    │ │ │ -
    255 inline const Rot2& r() const { return r_; }
    │ │ │ -
    256
    │ │ │ -
    258 inline const Point2& translation() const { return t_; }
    │ │ │ -
    259
    │ │ │ -
    261 inline const Rot2& rotation() const { return r_; }
    │ │ │ -
    262
    │ │ │ -
    264 GTSAM_EXPORT Matrix3 matrix() const;
    │ │ │ -
    265
    │ │ │ -
    271 GTSAM_EXPORT Rot2 bearing(const Point2& point,
    │ │ │ -
    272 OptionalJacobian<1, 3> H1=boost::none, OptionalJacobian<1, 2> H2=boost::none) const;
    │ │ │ -
    273
    │ │ │ -
    279 GTSAM_EXPORT Rot2 bearing(const Pose2& pose,
    │ │ │ -
    280 OptionalJacobian<1, 3> H1=boost::none, OptionalJacobian<1, 3> H2=boost::none) const;
    │ │ │ -
    281
    │ │ │ -
    287 GTSAM_EXPORT double range(const Point2& point,
    │ │ │ -
    288 OptionalJacobian<1, 3> H1=boost::none,
    │ │ │ -
    289 OptionalJacobian<1, 2> H2=boost::none) const;
    │ │ │ -
    290
    │ │ │ -
    296 GTSAM_EXPORT double range(const Pose2& point,
    │ │ │ -
    297 OptionalJacobian<1, 3> H1=boost::none,
    │ │ │ -
    298 OptionalJacobian<1, 3> H2=boost::none) const;
    │ │ │ -
    299
    │ │ │ -
    303
    │ │ │ -
    309 inline static std::pair<size_t, size_t> translationInterval() { return std::make_pair(0, 1); }
    │ │ │ -
    310
    │ │ │ -
    316 static std::pair<size_t, size_t> rotationInterval() { return std::make_pair(2, 2); }
    │ │ │ -
    317
    │ │ │ -
    319 GTSAM_EXPORT
    │ │ │ -
    320 friend std::ostream &operator<<(std::ostream &os, const Pose2& p);
    │ │ │ -
    321
    │ │ │ -
    323
    │ │ │ -
    324 private:
    │ │ │ -
    325
    │ │ │ -
    326 // Serialization function
    │ │ │ -
    327 friend class boost::serialization::access;
    │ │ │ -
    328 template<class Archive>
    │ │ │ -
    329 void serialize(Archive & ar, const unsigned int /*version*/) {
    │ │ │ -
    330 ar & BOOST_SERIALIZATION_NVP(t_);
    │ │ │ -
    331 ar & BOOST_SERIALIZATION_NVP(r_);
    │ │ │ -
    332 }
    │ │ │ -
    333
    │ │ │ -
    334public:
    │ │ │ -
    335 // Align for Point2, which is either derived from, or is typedef, of Vector2
    │ │ │ - │ │ │ -
    337}; // Pose2
    │ │ │ -
    │ │ │ -
    338
    │ │ │ -
    340template <>
    │ │ │ -
    │ │ │ -
    341inline Matrix wedge<Pose2>(const Vector& xi) {
    │ │ │ -
    342 // NOTE(chris): Need eval() as workaround for Apple clang + avx2.
    │ │ │ -
    343 return Matrix(Pose2::wedge(xi(0),xi(1),xi(2))).eval();
    │ │ │ -
    344}
    │ │ │ -
    │ │ │ -
    345
    │ │ │ -
    346#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
    │ │ │ -
    352GTSAM_EXPORT boost::optional<Pose2>
    │ │ │ -
    353GTSAM_DEPRECATED align(const Point2Pairs& pairs);
    │ │ │ -
    354#endif
    │ │ │ -
    355
    │ │ │ -
    356// Convenience typedef
    │ │ │ -
    357using Pose2Pair = std::pair<Pose2, Pose2>;
    │ │ │ -
    358using Pose2Pairs = std::vector<Pose2Pair>;
    │ │ │ -
    359
    │ │ │ -
    360template <>
    │ │ │ -
    361struct traits<Pose2> : public internal::LieGroup<Pose2> {};
    │ │ │ -
    362
    │ │ │ -
    363template <>
    │ │ │ -
    364struct traits<const Pose2> : public internal::LieGroup<Pose2> {};
    │ │ │ -
    365
    │ │ │ -
    366// bearing and range traits, used in RangeFactor
    │ │ │ -
    367template <typename T>
    │ │ │ -
    368struct Bearing<Pose2, T> : HasBearing<Pose2, T, Rot2> {};
    │ │ │ -
    369
    │ │ │ -
    370template <typename T>
    │ │ │ -
    371struct Range<Pose2, T> : HasRange<Pose2, T, double> {};
    │ │ │ -
    372
    │ │ │ -
    373} // namespace gtsam
    │ │ │ -
    374
    │ │ │ -
    #define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
    This marks a GTSAM object to require alignment.
    Definition types.h:308
    │ │ │ -
    Base class and basic functions for Lie types.
    │ │ │ -
    2D rotation
    │ │ │ -
    2D Point
    │ │ │ -
    Bearing-Range product.
    │ │ │ +
    191template<>
    │ │ │ +
    │ │ │ +
    192struct traits<StereoCamera> : public internal::Manifold<StereoCamera> {
    │ │ │ +
    193};
    │ │ │ +
    │ │ │ +
    194
    │ │ │ +
    195template<>
    │ │ │ +
    │ │ │ +
    196struct traits<const StereoCamera> : public internal::Manifold<StereoCamera> {
    │ │ │ +
    197};
    │ │ │ +
    │ │ │ +
    198}
    │ │ │ +
    A 2D stereo point (uL,uR,v)
    │ │ │ +
    The most common 5DOF 3D->2D calibration + Stereo baseline.
    │ │ │ +
    3D Pose
    │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │ -
    Matrix wedge< Pose2 >(const Vector &xi)
    specialization for pose2 wedge function (generic template in Lie.h)
    Definition Pose2.h:341
    │ │ │ -
    Vector2 Point2
    As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point2 to Vector2...
    Definition Point2.h:27
    │ │ │ +
    Vector3 Point3
    As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point3 to Vector3...
    Definition Point3.h:36
    │ │ │ +
    Point2_ project(const Point3_ &p_cam)
    Expression version of PinholeBase::Project.
    Definition expressions.h:131
    │ │ │ +
    std::uint64_t Key
    Integer nonlinear key type.
    Definition types.h:100
    │ │ │
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │ -
    A CRTP helper class that implements Lie group methods Prerequisites: methods operator*,...
    Definition Lie.h:37
    │ │ │ -
    Both LieGroupTraits and Testable.
    Definition Lie.h:229
    │ │ │ +
    TangentVector localCoordinates(const Class &g) const
    localCoordinates as required by manifold concept: finds tangent vector between *this and g
    Definition Lie.h:136
    │ │ │ +
    Both ManifoldTraits and Testable.
    Definition Manifold.h:120
    │ │ │
    OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
    Definition OptionalJacobian.h:41
    │ │ │ -
    Template to create a binary predicate.
    Definition Testable.h:111
    │ │ │ -
    Definition BearingRange.h:34
    │ │ │ -
    Definition BearingRange.h:40
    │ │ │ -
    Definition BearingRange.h:180
    │ │ │ -
    Definition BearingRange.h:194
    │ │ │ -
    A 2D pose (Point2,Rot2)
    Definition Pose2.h:36
    │ │ │ -
    GTSAM_EXPORT Rot2 bearing(const Point2 &point, OptionalJacobian< 1, 3 > H1=boost::none, OptionalJacobian< 1, 2 > H2=boost::none) const
    Calculate bearing to a landmark.
    Definition Pose2.cpp:245
    │ │ │ -
    Pose2 operator*(const Pose2 &p2) const
    compose syntactic sugar
    Definition Pose2.h:128
    │ │ │ -
    GTSAM_EXPORT void print(const std::string &s="") const
    print with optional string
    Definition Pose2.cpp:50
    │ │ │ -
    const Rot2 & rotation() const
    rotation
    Definition Pose2.h:261
    │ │ │ -
    GTSAM_EXPORT Matrix3 AdjointMap() const
    Calculate Adjoint map Ad_pose is 3*3 matrix that when applied to twist xi , returns Ad_pose(xi)
    Definition Pose2.cpp:126
    │ │ │ -
    static GTSAM_EXPORT Matrix3 LogmapDerivative(const Pose2 &v)
    Derivative of Logmap.
    Definition Pose2.cpp:179
    │ │ │ -
    double y() const
    get y
    Definition Pose2.h:246
    │ │ │ -
    static GTSAM_EXPORT Vector3 Logmap(const Pose2 &p, ChartJacobian H=boost::none)
    Log map at identity - return the canonical coordinates of this rotation.
    Definition Pose2.cpp:82
    │ │ │ -
    GTSAM_EXPORT Pose2 inverse() const
    inverse
    Definition Pose2.cpp:201
    │ │ │ -
    GTSAM_EXPORT friend std::ostream & operator<<(std::ostream &os, const Pose2 &p)
    Output stream operator.
    Definition Pose2.cpp:55
    │ │ │ -
    Point2 operator*(const Point2 &point) const
    syntactic sugar for transformFrom
    Definition Pose2.h:234
    │ │ │ -
    Pose2(double x, double y, double theta)
    construct from (x,y,theta)
    Definition Pose2.h:68
    │ │ │ -
    const Point2 & t() const
    translation
    Definition Pose2.h:252
    │ │ │ -
    static std::pair< size_t, size_t > translationInterval()
    Return the start and end indices (inclusive) of the translation component of the exponential map para...
    Definition Pose2.h:309
    │ │ │ -
    Pose2(double theta, const Point2 &t)
    construct from rotation and translation
    Definition Pose2.h:73
    │ │ │ -
    double x() const
    get x
    Definition Pose2.h:243
    │ │ │ -
    const Rot2 & r() const
    rotation
    Definition Pose2.h:255
    │ │ │ -
    Pose2(const Vector &v)
    Construct from canonical coordinates (Lie algebra)
    Definition Pose2.h:91
    │ │ │ -
    Vector3 Adjoint(const Vector3 &xi) const
    Apply AdjointMap to twist xi.
    Definition Pose2.h:149
    │ │ │ -
    static Matrix3 wedge(double vx, double vy, double w)
    wedge for SE(2):
    Definition Pose2.h:183
    │ │ │ -
    static std::pair< size_t, size_t > rotationInterval()
    Return the start and end indices (inclusive) of the rotation component of the exponential map paramet...
    Definition Pose2.h:316
    │ │ │ -
    static GTSAM_EXPORT Matrix3 adjointMap(const Vector3 &v)
    Compute the [ad(w,v)] operator for SE2 as in [Kobilarov09siggraph], pg 19.
    Definition Pose2.cpp:137
    │ │ │ -
    GTSAM_EXPORT Point2 transformTo(const Point2 &point, OptionalJacobian< 2, 3 > Dpose=boost::none, OptionalJacobian< 2, 2 > Dpoint=boost::none) const
    Return point coordinates in pose coordinate frame.
    Definition Pose2.cpp:207
    │ │ │ -
    double theta() const
    get theta
    Definition Pose2.h:249
    │ │ │ -
    static GTSAM_EXPORT Matrix3 ExpmapDerivative(const Vector3 &v)
    Derivative of Expmap.
    Definition Pose2.cpp:148
    │ │ │ -
    Rot2 Rotation
    Pose Concept requirements.
    Definition Pose2.h:41
    │ │ │ -
    Pose2()
    default constructor = origin
    Definition Pose2.h:55
    │ │ │ -
    GTSAM_EXPORT Point2 transformFrom(const Point2 &point, OptionalJacobian< 2, 3 > Dpose=boost::none, OptionalJacobian< 2, 2 > Dpoint=boost::none) const
    Return point coordinates in global frame.
    Definition Pose2.cpp:226
    │ │ │ -
    static Vector3 adjointTranspose(const Vector3 &xi, const Vector3 &y)
    The dual version of adjoint action, acting on the dual space of the Lie-algebra vector space.
    Definition Pose2.h:168
    │ │ │ -
    static GTSAM_EXPORT Pose2 Expmap(const Vector3 &xi, ChartJacobian H=boost::none)
    Exponential map at identity - create a rotation from canonical coordinates .
    Definition Pose2.cpp:66
    │ │ │ -
    static Pose2 Identity()
    identity for group operation
    Definition Pose2.h:122
    │ │ │ -
    static boost::optional< Pose2 > Align(const Point2Pairs &abPointPairs)
    Create Pose2 by aligning two point pairs A pose aTb is estimated between pairs (a_point,...
    Definition Pose2.cpp:330
    │ │ │ -
    Pose2(const Rot2 &r, const Point2 &t)
    construct from r,t
    Definition Pose2.h:78
    │ │ │ -
    static Vector3 adjoint(const Vector3 &xi, const Vector3 &y)
    Action of the adjointMap on a Lie-algebra vector y, with optional derivatives.
    Definition Pose2.h:161
    │ │ │ -
    Pose2(const Pose2 &pose)
    copy constructor
    Definition Pose2.h:60
    │ │ │ -
    const Point2 & translation() const
    translation
    Definition Pose2.h:258
    │ │ │ -
    Pose2(const Matrix &T)
    Constructor from 3*3 matrix.
    Definition Pose2.h:81
    │ │ │ -
    Definition Pose2.h:198
    │ │ │ -
    Rotation matrix NOTE: the angle theta is in radians unless explicitly stated.
    Definition Rot2.h:36
    │ │ │ -
    double theta() const
    return angle (RADIANS)
    Definition Rot2.h:187
    │ │ │ +
    The most common 5DOF 3D->2D calibration, stereo version.
    Definition Cal3_S2Stereo.h:30
    │ │ │ +
    A 3D pose (R,t) : (Rot3,Point3)
    Definition Pose3.h:37
    │ │ │ +
    bool equals(const Pose3 &pose, double tol=1e-9) const
    assert equality up to a tolerance
    Definition Pose3.cpp:157
    │ │ │ +
    void print(const std::string &s="") const
    print with optional string
    Definition Pose3.cpp:152
    │ │ │ +
    Definition StereoCamera.h:26
    │ │ │ +
    A stereo camera class, parameterize by left camera pose and stereo calibration.
    Definition StereoCamera.h:47
    │ │ │ +
    StereoCamera()
    Default constructor allocates a calibration!
    Definition StereoCamera.h:72
    │ │ │ +
    static size_t Dim()
    Dimensionality of the tangent space.
    Definition StereoCamera.h:110
    │ │ │ +
    void print(const std::string &s="") const
    print
    Definition StereoCamera.h:89
    │ │ │ +
    Vector6 localCoordinates(const StereoCamera &t2) const
    Local coordinates of manifold neighborhood around current value.
    Definition StereoCamera.h:120
    │ │ │ +
    bool equals(const StereoCamera &camera, double tol=1e-9) const
    equals
    Definition StereoCamera.h:95
    │ │ │ +
    size_t dim() const
    Dimensionality of the tangent space.
    Definition StereoCamera.h:105
    │ │ │ +
    StereoCamera retract(const Vector &v) const
    Updates a with tangent space delta.
    Definition StereoCamera.h:115
    │ │ │ +
    StereoPoint2 Measurement
    Some classes template on either PinholeCamera or StereoCamera, and this typedef informs those classes...
    Definition StereoCamera.h:55
    │ │ │ +
    const Cal3_S2Stereo & calibration() const
    Return shared pointer to calibration.
    Definition StereoCamera.h:80
    │ │ │ +
    double baseline() const
    baseline
    Definition StereoCamera.h:134
    │ │ │ +
    const Pose3 & pose() const
    pose
    Definition StereoCamera.h:129
    │ │ │ +
    Vector defaultErrorWhenTriangulatingBehindCamera() const
    for Nonlinear Triangulation
    Definition StereoCamera.h:174
    │ │ │ +
    A 2D stereo point, v will be same for rectified images.
    Definition StereoPoint2.h:32
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,472 +1,265 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Pose2.h │ │ │ │ +StereoCamera.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -19// \callgraph │ │ │ │ -20 │ │ │ │ -21#pragma once │ │ │ │ -22 │ │ │ │ -23#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_B_e_a_r_i_n_g_R_a_n_g_e_._h> │ │ │ │ -24#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_i_n_t_2_._h> │ │ │ │ -25#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_R_o_t_2_._h> │ │ │ │ -26#include <_g_t_s_a_m_/_b_a_s_e_/_L_i_e_._h> │ │ │ │ -27#include │ │ │ │ -28 │ │ │ │ -29namespace _g_t_s_a_m { │ │ │ │ +18#pragma once │ │ │ │ +19 │ │ │ │ +20#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3___S_2_S_t_e_r_e_o_._h> │ │ │ │ +21#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_s_e_3_._h> │ │ │ │ +22#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_S_t_e_r_e_o_P_o_i_n_t_2_._h> │ │ │ │ +23 │ │ │ │ +24namespace _g_t_s_a_m { │ │ │ │ +25 │ │ │ │ +_2_6class GTSAM_EXPORT _S_t_e_r_e_o_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n: public std::runtime_error { │ │ │ │ +27public: │ │ │ │ +28 _S_t_e_r_e_o_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n() │ │ │ │ +29 : _S_t_e_r_e_o_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n(std::numeric_limits::max()) {} │ │ │ │ 30 │ │ │ │ -_3_6class _P_o_s_e_2: public _L_i_e_G_r_o_u_p { │ │ │ │ -37 │ │ │ │ -38public: │ │ │ │ -39 │ │ │ │ -_4_1 typedef _R_o_t_2 _R_o_t_a_t_i_o_n; │ │ │ │ -42 typedef _P_o_i_n_t_2 Translation; │ │ │ │ -43 │ │ │ │ -44private: │ │ │ │ -45 │ │ │ │ -46 _R_o_t_2 r_; │ │ │ │ -47 _P_o_i_n_t_2 t_; │ │ │ │ +31 _S_t_e_r_e_o_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n(_K_e_y j) │ │ │ │ +32 : std::runtime_error("Stereo Cheirality Exception"), │ │ │ │ +33 j_(j) {} │ │ │ │ +34 │ │ │ │ +35 _K_e_y nearbyVariable() const { │ │ │ │ +36 return j_; │ │ │ │ +37 } │ │ │ │ +38 │ │ │ │ +39private: │ │ │ │ +40 _K_e_y j_; │ │ │ │ +41}; │ │ │ │ +42 │ │ │ │ +_4_7class GTSAM_EXPORT _S_t_e_r_e_o_C_a_m_e_r_a { │ │ │ │ 48 │ │ │ │ 49public: │ │ │ │ 50 │ │ │ │ -53 │ │ │ │ -_5_5 _P_o_s_e_2() : │ │ │ │ -56 r_(_t_r_a_i_t_s<_R_o_t_2>::_I_d_e_n_t_i_t_y()), t_(_t_r_a_i_t_s<_P_o_i_n_t_2>::_I_d_e_n_t_i_t_y()) { │ │ │ │ -57 } │ │ │ │ -58 │ │ │ │ -_6_0 _P_o_s_e_2(const _P_o_s_e_2& pose) : r_(pose.r_), t_(pose.t_) {} │ │ │ │ +_5_5 typedef _S_t_e_r_e_o_P_o_i_n_t_2 _M_e_a_s_u_r_e_m_e_n_t; │ │ │ │ +56 typedef StereoPoint2Vector MeasurementVector; │ │ │ │ +57 │ │ │ │ +58private: │ │ │ │ +59 _P_o_s_e_3 leftCamPose_; │ │ │ │ +60 Cal3_S2Stereo::shared_ptr K_; │ │ │ │ 61 │ │ │ │ -_6_8 _P_o_s_e_2(double _x, double _y, double _t_h_e_t_a) : │ │ │ │ -69 r_(_R_o_t_2::fromAngle(_t_h_e_t_a)), t_(_x, _y) { │ │ │ │ -70 } │ │ │ │ -71 │ │ │ │ -_7_3 _P_o_s_e_2(double _t_h_e_t_a, const _P_o_i_n_t_2& _t) : │ │ │ │ -74 r_(_R_o_t_2::fromAngle(_t_h_e_t_a)), t_(_t) { │ │ │ │ -75 } │ │ │ │ -76 │ │ │ │ -_7_8 _P_o_s_e_2(const _R_o_t_2& _r, const _P_o_i_n_t_2& _t) : r_(_r), t_(_t) {} │ │ │ │ -79 │ │ │ │ -_8_1 _P_o_s_e_2(const Matrix &T) : │ │ │ │ -82 r_(_R_o_t_2::atan2(T(1, 0), T(0, 0))), t_(T(0, 2), T(1, 2)) { │ │ │ │ -83 assert(T.rows() == 3 && T.cols() == 3); │ │ │ │ -84 } │ │ │ │ -85 │ │ │ │ -89 │ │ │ │ -_9_1 _P_o_s_e_2(const Vector& v) : _P_o_s_e_2() { │ │ │ │ -92 *this = _E_x_p_m_a_p(v); │ │ │ │ -93 } │ │ │ │ -94 │ │ │ │ -102 static boost::optional _A_l_i_g_n(const Point2Pairs& abPointPairs); │ │ │ │ +62public: │ │ │ │ +63 │ │ │ │ +64 enum { │ │ │ │ +65 dimension = 6 │ │ │ │ +66 }; │ │ │ │ +67 │ │ │ │ +70 │ │ │ │ +_7_2 _S_t_e_r_e_o_C_a_m_e_r_a() : │ │ │ │ +73 K_(new _C_a_l_3___S_2_S_t_e_r_e_o()) { │ │ │ │ +74 } │ │ │ │ +75 │ │ │ │ +77 _S_t_e_r_e_o_C_a_m_e_r_a(const _P_o_s_e_3& leftCamPose, const Cal3_S2Stereo::shared_ptr K); │ │ │ │ +78 │ │ │ │ +_8_0 const _C_a_l_3___S_2_S_t_e_r_e_o& _c_a_l_i_b_r_a_t_i_o_n() const { │ │ │ │ +81 return *K_; │ │ │ │ +82 } │ │ │ │ +83 │ │ │ │ +87 │ │ │ │ +_8_9 void _p_r_i_n_t(const std::string& s = "") const { │ │ │ │ +90 leftCamPose_._p_r_i_n_t(s + ".camera."); │ │ │ │ +91 K_->print(s + ".calibration."); │ │ │ │ +92 } │ │ │ │ +93 │ │ │ │ +_9_5 bool _e_q_u_a_l_s(const _S_t_e_r_e_o_C_a_m_e_r_a &camera, double tol = 1e-9) const { │ │ │ │ +96 return leftCamPose_._e_q_u_a_l_s(camera.leftCamPose_, tol) │ │ │ │ +97 && K_->equals(*camera.K_, tol); │ │ │ │ +98 } │ │ │ │ +99 │ │ │ │ 103 │ │ │ │ -104 // Version of Pose2::Align that takes 2 matrices. │ │ │ │ -105 static boost::optional _A_l_i_g_n(const Matrix& a, const Matrix& b); │ │ │ │ -106 │ │ │ │ -110 │ │ │ │ -112 GTSAM_EXPORT void _p_r_i_n_t(const std::string& s = "") const; │ │ │ │ +_1_0_5 inline size_t _d_i_m() const { │ │ │ │ +106 return 6; │ │ │ │ +107 } │ │ │ │ +108 │ │ │ │ +_1_1_0 static inline size_t _D_i_m() { │ │ │ │ +111 return 6; │ │ │ │ +112 } │ │ │ │ 113 │ │ │ │ -115 GTSAM_EXPORT bool _e_q_u_a_l_s(const _P_o_s_e_2& pose, double tol = 1e-9) const; │ │ │ │ -116 │ │ │ │ -120 │ │ │ │ -_1_2_2 inline static _P_o_s_e_2 _I_d_e_n_t_i_t_y() { return _P_o_s_e_2(); } │ │ │ │ +_1_1_5 inline _S_t_e_r_e_o_C_a_m_e_r_a _r_e_t_r_a_c_t(const Vector& v) const { │ │ │ │ +116 return _S_t_e_r_e_o_C_a_m_e_r_a(pose().retract(v), K_); │ │ │ │ +117 } │ │ │ │ +118 │ │ │ │ +_1_2_0 inline Vector6 _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const _S_t_e_r_e_o_C_a_m_e_r_a& t2) const { │ │ │ │ +121 return leftCamPose_._l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(t2.leftCamPose_); │ │ │ │ +122 } │ │ │ │ 123 │ │ │ │ -125 GTSAM_EXPORT _P_o_s_e_2 _i_n_v_e_r_s_e() const; │ │ │ │ -126 │ │ │ │ -_1_2_8 inline _P_o_s_e_2 _o_p_e_r_a_t_o_r_*(const _P_o_s_e_2& p2) const { │ │ │ │ -129 return _P_o_s_e_2(r_*p2._r(), t_ + r_*p2._t()); │ │ │ │ -130 } │ │ │ │ -131 │ │ │ │ -135 │ │ │ │ -137 GTSAM_EXPORT static _P_o_s_e_2 _E_x_p_m_a_p(const Vector3& xi, ChartJacobian H = │ │ │ │ -boost::none); │ │ │ │ -138 │ │ │ │ -140 GTSAM_EXPORT static Vector3 _L_o_g_m_a_p(const _P_o_s_e_2& p, ChartJacobian H = │ │ │ │ -boost::none); │ │ │ │ -141 │ │ │ │ -146 GTSAM_EXPORT Matrix3 _A_d_j_o_i_n_t_M_a_p() const; │ │ │ │ +127 │ │ │ │ +_1_2_9 const _P_o_s_e_3& _p_o_s_e() const { │ │ │ │ +130 return leftCamPose_; │ │ │ │ +131 } │ │ │ │ +132 │ │ │ │ +_1_3_4 double _b_a_s_e_l_i_n_e() const { │ │ │ │ +135 return K_->baseline(); │ │ │ │ +136 } │ │ │ │ +137 │ │ │ │ +139 _S_t_e_r_e_o_P_o_i_n_t_2 _p_r_o_j_e_c_t(const _P_o_i_n_t_3& point) const; │ │ │ │ +140 │ │ │ │ +145 _S_t_e_r_e_o_P_o_i_n_t_2 project2(const _P_o_i_n_t_3& point, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _6_> H1 = │ │ │ │ +146 boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H2 = boost::none) const; │ │ │ │ 147 │ │ │ │ -_1_4_9 inline Vector3 _A_d_j_o_i_n_t(const Vector3& xi) const { │ │ │ │ -150 return _A_d_j_o_i_n_t_M_a_p()*xi; │ │ │ │ -151 } │ │ │ │ -152 │ │ │ │ -156 GTSAM_EXPORT static Matrix3 _a_d_j_o_i_n_t_M_a_p(const Vector3& v); │ │ │ │ -157 │ │ │ │ -_1_6_1 static Vector3 _a_d_j_o_i_n_t(const Vector3& xi, const Vector3& _y) { │ │ │ │ -162 return _a_d_j_o_i_n_t_M_a_p(xi) * _y; │ │ │ │ -163 } │ │ │ │ -164 │ │ │ │ -_1_6_8 static Vector3 _a_d_j_o_i_n_t_T_r_a_n_s_p_o_s_e(const Vector3& xi, const Vector3& _y) { │ │ │ │ -169 return _a_d_j_o_i_n_t_M_a_p(xi).transpose() * _y; │ │ │ │ -170 } │ │ │ │ -171 │ │ │ │ -172 // temporary fix for wrappers until case issue is resolved │ │ │ │ -173 static Matrix3 adjointMap_(const Vector3 &xi) { return _a_d_j_o_i_n_t_M_a_p(xi);} │ │ │ │ -174 static Vector3 adjoint_(const Vector3 &xi, const Vector3 &_y) { return │ │ │ │ -_a_d_j_o_i_n_t(xi, _y);} │ │ │ │ -175 │ │ │ │ -_1_8_3 static inline Matrix3 _w_e_d_g_e(double vx, double vy, double w) { │ │ │ │ -184 Matrix3 m; │ │ │ │ -185 m << 0.,-w, vx, │ │ │ │ -186 w, 0., vy, │ │ │ │ -187 0., 0., 0.; │ │ │ │ -188 return m; │ │ │ │ -189 } │ │ │ │ +149 _P_o_i_n_t_3 backproject(const _S_t_e_r_e_o_P_o_i_n_t_2& z) const; │ │ │ │ +150 │ │ │ │ +155 _P_o_i_n_t_3 backproject2(const _S_t_e_r_e_o_P_o_i_n_t_2& z, │ │ │ │ +156 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _6_> H1 = boost::none, │ │ │ │ +157 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H2 = boost::none) const; │ │ │ │ +158 │ │ │ │ +162 │ │ │ │ +169 _S_t_e_r_e_o_P_o_i_n_t_2 _p_r_o_j_e_c_t(const _P_o_i_n_t_3& point, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _6_> H1, │ │ │ │ +170 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H2 = boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _0_> H3 = │ │ │ │ +171 boost::none) const; │ │ │ │ +172 │ │ │ │ +_1_7_4 Vector _d_e_f_a_u_l_t_E_r_r_o_r_W_h_e_n_T_r_i_a_n_g_u_l_a_t_i_n_g_B_e_h_i_n_d_C_a_m_e_r_a() const { │ │ │ │ +175 return Eigen::Matrix::dimension,1>::Constant(2.0 │ │ │ │ +* K_->fx());; │ │ │ │ +176 } │ │ │ │ +177 │ │ │ │ +179 │ │ │ │ +180private: │ │ │ │ +181 │ │ │ │ +182 friend class boost::serialization::access; │ │ │ │ +183 template │ │ │ │ +184 void serialize(Archive & ar, const unsigned int /*version*/) { │ │ │ │ +185 ar & BOOST_SERIALIZATION_NVP(leftCamPose_); │ │ │ │ +186 ar & BOOST_SERIALIZATION_NVP(K_); │ │ │ │ +187 } │ │ │ │ +188 │ │ │ │ +189}; │ │ │ │ 190 │ │ │ │ -192 GTSAM_EXPORT static Matrix3 _E_x_p_m_a_p_D_e_r_i_v_a_t_i_v_e(const Vector3& v); │ │ │ │ -193 │ │ │ │ -195 GTSAM_EXPORT static Matrix3 _L_o_g_m_a_p_D_e_r_i_v_a_t_i_v_e(const _P_o_s_e_2& v); │ │ │ │ -196 │ │ │ │ -197 // Chart at origin, depends on compile-time flag SLOW_BUT_CORRECT_EXPMAP │ │ │ │ -_1_9_8 struct _C_h_a_r_t_A_t_O_r_i_g_i_n { │ │ │ │ -199 GTSAM_EXPORT static _P_o_s_e_2 Retract(const Vector3& v, ChartJacobian H = │ │ │ │ -boost::none); │ │ │ │ -200 GTSAM_EXPORT static Vector3 Local(const _P_o_s_e_2& _r, ChartJacobian H = boost:: │ │ │ │ -none); │ │ │ │ -201 }; │ │ │ │ -202 │ │ │ │ -203 using _L_i_e_G_r_o_u_p<_P_o_s_e_2, 3>_:_:_i_n_v_e_r_s_e; // version with derivative │ │ │ │ -204 │ │ │ │ -208 │ │ │ │ -210 GTSAM_EXPORT _P_o_i_n_t_2 _t_r_a_n_s_f_o_r_m_T_o(const _P_o_i_n_t_2& point, │ │ │ │ -211 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _3_> Dpose = boost::none, │ │ │ │ -212 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dpoint = boost::none) const; │ │ │ │ -213 │ │ │ │ -219 Matrix _t_r_a_n_s_f_o_r_m_T_o(const Matrix& points) const; │ │ │ │ -220 │ │ │ │ -222 GTSAM_EXPORT _P_o_i_n_t_2 _t_r_a_n_s_f_o_r_m_F_r_o_m(const _P_o_i_n_t_2& point, │ │ │ │ -223 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _3_> Dpose = boost::none, │ │ │ │ -224 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dpoint = boost::none) const; │ │ │ │ -225 │ │ │ │ -231 Matrix _t_r_a_n_s_f_o_r_m_F_r_o_m(const Matrix& points) const; │ │ │ │ -232 │ │ │ │ -_2_3_4 inline _P_o_i_n_t_2 _o_p_e_r_a_t_o_r_*(const _P_o_i_n_t_2& point) const { │ │ │ │ -235 return _t_r_a_n_s_f_o_r_m_F_r_o_m(point); │ │ │ │ -236 } │ │ │ │ -237 │ │ │ │ -241 │ │ │ │ -_2_4_3 inline double _x() const { return t_.x(); } │ │ │ │ -244 │ │ │ │ -_2_4_6 inline double _y() const { return t_.y(); } │ │ │ │ -247 │ │ │ │ -_2_4_9 inline double _t_h_e_t_a() const { return r_._t_h_e_t_a(); } │ │ │ │ -250 │ │ │ │ -_2_5_2 inline const _P_o_i_n_t_2& _t() const { return t_; } │ │ │ │ -253 │ │ │ │ -_2_5_5 inline const _R_o_t_2& _r() const { return r_; } │ │ │ │ -256 │ │ │ │ -_2_5_8 inline const _P_o_i_n_t_2& _t_r_a_n_s_l_a_t_i_o_n() const { return t_; } │ │ │ │ -259 │ │ │ │ -_2_6_1 inline const _R_o_t_2& _r_o_t_a_t_i_o_n() const { return r_; } │ │ │ │ -262 │ │ │ │ -264 GTSAM_EXPORT Matrix3 matrix() const; │ │ │ │ -265 │ │ │ │ -271 GTSAM_EXPORT _R_o_t_2 _b_e_a_r_i_n_g(const _P_o_i_n_t_2& point, │ │ │ │ -272 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> H1=boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _2_> H2=boost:: │ │ │ │ -none) const; │ │ │ │ -273 │ │ │ │ -279 GTSAM_EXPORT _R_o_t_2 _b_e_a_r_i_n_g(const _P_o_s_e_2& pose, │ │ │ │ -280 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> H1=boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> H2=boost:: │ │ │ │ -none) const; │ │ │ │ -281 │ │ │ │ -287 GTSAM_EXPORT double range(const _P_o_i_n_t_2& point, │ │ │ │ -288 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> H1=boost::none, │ │ │ │ -289 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _2_> H2=boost::none) const; │ │ │ │ -290 │ │ │ │ -296 GTSAM_EXPORT double range(const _P_o_s_e_2& point, │ │ │ │ -297 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> H1=boost::none, │ │ │ │ -298 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> H2=boost::none) const; │ │ │ │ -299 │ │ │ │ -303 │ │ │ │ -_3_0_9 inline static std::pair _t_r_a_n_s_l_a_t_i_o_n_I_n_t_e_r_v_a_l() { return │ │ │ │ -std::make_pair(0, 1); } │ │ │ │ -310 │ │ │ │ -_3_1_6 static std::pair _r_o_t_a_t_i_o_n_I_n_t_e_r_v_a_l() { return std::make_pair │ │ │ │ -(2, 2); } │ │ │ │ -317 │ │ │ │ -319 GTSAM_EXPORT │ │ │ │ -320 friend std::ostream &_o_p_e_r_a_t_o_r_<_<(std::ostream &os, const _P_o_s_e_2& p); │ │ │ │ -321 │ │ │ │ -323 │ │ │ │ -324 private: │ │ │ │ -325 │ │ │ │ -326 // Serialization function │ │ │ │ -327 friend class boost::serialization::access; │ │ │ │ -328 template │ │ │ │ -329 void serialize(Archive & ar, const unsigned int /*version*/) { │ │ │ │ -330 ar & BOOST_SERIALIZATION_NVP(t_); │ │ │ │ -331 ar & BOOST_SERIALIZATION_NVP(r_); │ │ │ │ -332 } │ │ │ │ -333 │ │ │ │ -334public: │ │ │ │ -335 // Align for Point2, which is either derived from, or is typedef, of │ │ │ │ -Vector2 │ │ │ │ -336 _G_T_S_A_M___M_A_K_E___A_L_I_G_N_E_D___O_P_E_R_A_T_O_R___N_E_W │ │ │ │ -337}; // Pose2 │ │ │ │ -338 │ │ │ │ -340template <> │ │ │ │ -_3_4_1inline Matrix _w_e_d_g_e_<_P_o_s_e_2_>(const Vector& xi) { │ │ │ │ -342 // NOTE(chris): Need eval() as workaround for Apple clang + avx2. │ │ │ │ -343 return Matrix(_P_o_s_e_2_:_:_w_e_d_g_e(xi(0),xi(1),xi(2))).eval(); │ │ │ │ -344} │ │ │ │ -345 │ │ │ │ -346#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42 │ │ │ │ -352GTSAM_EXPORT boost::optional │ │ │ │ -353GTSAM_DEPRECATED align(const Point2Pairs& pairs); │ │ │ │ -354#endif │ │ │ │ -355 │ │ │ │ -356// Convenience typedef │ │ │ │ -357using Pose2Pair = std::pair; │ │ │ │ -358using Pose2Pairs = std::vector; │ │ │ │ -359 │ │ │ │ -360template <> │ │ │ │ -_3_6_1struct _t_r_a_i_t_s<_P_o_s_e_2> : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p {}; │ │ │ │ -362 │ │ │ │ -363template <> │ │ │ │ -_3_6_4struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p {}; │ │ │ │ -365 │ │ │ │ -366// bearing and range traits, used in RangeFactor │ │ │ │ -367template │ │ │ │ -_3_6_8struct _B_e_a_r_i_n_g<_P_o_s_e_2, T> : _H_a_s_B_e_a_r_i_n_g {}; │ │ │ │ -369 │ │ │ │ -370template │ │ │ │ -_3_7_1struct _R_a_n_g_e<_P_o_s_e_2, T> : _H_a_s_R_a_n_g_e {}; │ │ │ │ -372 │ │ │ │ -373} // namespace gtsam │ │ │ │ -374 │ │ │ │ -_G_T_S_A_M___M_A_K_E___A_L_I_G_N_E_D___O_P_E_R_A_T_O_R___N_E_W │ │ │ │ -#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW │ │ │ │ -This marks a GTSAM object to require alignment. │ │ │ │ -DDeeffiinniittiioonn types.h:308 │ │ │ │ -_L_i_e_._h │ │ │ │ -Base class and basic functions for Lie types. │ │ │ │ -_R_o_t_2_._h │ │ │ │ -2D rotation │ │ │ │ -_P_o_i_n_t_2_._h │ │ │ │ -2D Point │ │ │ │ -_B_e_a_r_i_n_g_R_a_n_g_e_._h │ │ │ │ -Bearing-Range product. │ │ │ │ +191template<> │ │ │ │ +_1_9_2struct _t_r_a_i_t_s<_S_t_e_r_e_o_C_a_m_e_r_a> : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d { │ │ │ │ +193}; │ │ │ │ +194 │ │ │ │ +195template<> │ │ │ │ +_1_9_6struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d │ │ │ │ +{ │ │ │ │ +197}; │ │ │ │ +198} │ │ │ │ +_S_t_e_r_e_o_P_o_i_n_t_2_._h │ │ │ │ +A 2D stereo point (uL,uR,v) │ │ │ │ +_C_a_l_3___S_2_S_t_e_r_e_o_._h │ │ │ │ +The most common 5DOF 3D->2D calibration + Stereo baseline. │ │ │ │ +_P_o_s_e_3_._h │ │ │ │ +3D Pose │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_w_e_d_g_e_<_ _P_o_s_e_2_ _> │ │ │ │ -Matrix wedge< Pose2 >(const Vector &xi) │ │ │ │ -specialization for pose2 wedge function (generic template in Lie.h) │ │ │ │ -DDeeffiinniittiioonn Pose2.h:341 │ │ │ │ -_g_t_s_a_m_:_:_P_o_i_n_t_2 │ │ │ │ -Vector2 Point2 │ │ │ │ +_g_t_s_a_m_:_:_P_o_i_n_t_3 │ │ │ │ +Vector3 Point3 │ │ │ │ As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just │ │ │ │ -typedef Point2 to Vector2... │ │ │ │ -DDeeffiinniittiioonn Point2.h:27 │ │ │ │ +typedef Point3 to Vector3... │ │ │ │ +DDeeffiinniittiioonn Point3.h:36 │ │ │ │ +_g_t_s_a_m_:_:_p_r_o_j_e_c_t │ │ │ │ +Point2_ project(const Point3_ &p_cam) │ │ │ │ +Expression version of PinholeBase::Project. │ │ │ │ +DDeeffiinniittiioonn expressions.h:131 │ │ │ │ +_g_t_s_a_m_:_:_K_e_y │ │ │ │ +std::uint64_t Key │ │ │ │ +Integer nonlinear key type. │ │ │ │ +DDeeffiinniittiioonn types.h:100 │ │ │ │ _g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ that can be centered ... │ │ │ │ DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p │ │ │ │ -A CRTP helper class that implements Lie group methods Prerequisites: methods │ │ │ │ -operator*,... │ │ │ │ -DDeeffiinniittiioonn Lie.h:37 │ │ │ │ -_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p │ │ │ │ -Both LieGroupTraits and Testable. │ │ │ │ -DDeeffiinniittiioonn Lie.h:229 │ │ │ │ +_g_t_s_a_m_:_:_L_i_e_G_r_o_u_p_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ +TangentVector localCoordinates(const Class &g) const │ │ │ │ +localCoordinates as required by manifold concept: finds tangent vector between │ │ │ │ +*this and g │ │ │ │ +DDeeffiinniittiioonn Lie.h:136 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d │ │ │ │ +Both ManifoldTraits and Testable. │ │ │ │ +DDeeffiinniittiioonn Manifold.h:120 │ │ │ │ _g_t_s_a_m_:_:_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n │ │ │ │ OptionalJacobian is an Eigen::Ref like class that can take be constructed using │ │ │ │ either a fixed size o... │ │ │ │ DDeeffiinniittiioonn OptionalJacobian.h:41 │ │ │ │ -_g_t_s_a_m_:_:_e_q_u_a_l_s │ │ │ │ -Template to create a binary predicate. │ │ │ │ -DDeeffiinniittiioonn Testable.h:111 │ │ │ │ -_g_t_s_a_m_:_:_B_e_a_r_i_n_g │ │ │ │ -DDeeffiinniittiioonn BearingRange.h:34 │ │ │ │ -_g_t_s_a_m_:_:_R_a_n_g_e │ │ │ │ -DDeeffiinniittiioonn BearingRange.h:40 │ │ │ │ -_g_t_s_a_m_:_:_H_a_s_B_e_a_r_i_n_g │ │ │ │ -DDeeffiinniittiioonn BearingRange.h:180 │ │ │ │ -_g_t_s_a_m_:_:_H_a_s_R_a_n_g_e │ │ │ │ -DDeeffiinniittiioonn BearingRange.h:194 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2 │ │ │ │ -A 2D pose (Point2,Rot2) │ │ │ │ -DDeeffiinniittiioonn Pose2.h:36 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_b_e_a_r_i_n_g │ │ │ │ -GTSAM_EXPORT Rot2 bearing(const Point2 &point, OptionalJacobian< 1, 3 > │ │ │ │ -H1=boost::none, OptionalJacobian< 1, 2 > H2=boost::none) const │ │ │ │ -Calculate bearing to a landmark. │ │ │ │ -DDeeffiinniittiioonn Pose2.cpp:245 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -Pose2 operator*(const Pose2 &p2) const │ │ │ │ -compose syntactic sugar │ │ │ │ -DDeeffiinniittiioonn Pose2.h:128 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_p_r_i_n_t │ │ │ │ -GTSAM_EXPORT void print(const std::string &s="") const │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o │ │ │ │ +The most common 5DOF 3D->2D calibration, stereo version. │ │ │ │ +DDeeffiinniittiioonn Cal3_S2Stereo.h:30 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3 │ │ │ │ +A 3D pose (R,t) : (Rot3,Point3) │ │ │ │ +DDeeffiinniittiioonn Pose3.h:37 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const Pose3 &pose, double tol=1e-9) const │ │ │ │ +assert equality up to a tolerance │ │ │ │ +DDeeffiinniittiioonn Pose3.cpp:157 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_p_r_i_n_t │ │ │ │ +void print(const std::string &s="") const │ │ │ │ print with optional string │ │ │ │ -DDeeffiinniittiioonn Pose2.cpp:50 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_r_o_t_a_t_i_o_n │ │ │ │ -const Rot2 & rotation() const │ │ │ │ -rotation │ │ │ │ -DDeeffiinniittiioonn Pose2.h:261 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_A_d_j_o_i_n_t_M_a_p │ │ │ │ -GTSAM_EXPORT Matrix3 AdjointMap() const │ │ │ │ -Calculate Adjoint map Ad_pose is 3*3 matrix that when applied to twist xi , │ │ │ │ -returns Ad_pose(xi) │ │ │ │ -DDeeffiinniittiioonn Pose2.cpp:126 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_L_o_g_m_a_p_D_e_r_i_v_a_t_i_v_e │ │ │ │ -static GTSAM_EXPORT Matrix3 LogmapDerivative(const Pose2 &v) │ │ │ │ -Derivative of Logmap. │ │ │ │ -DDeeffiinniittiioonn Pose2.cpp:179 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_y │ │ │ │ -double y() const │ │ │ │ -get y │ │ │ │ -DDeeffiinniittiioonn Pose2.h:246 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_L_o_g_m_a_p │ │ │ │ -static GTSAM_EXPORT Vector3 Logmap(const Pose2 &p, ChartJacobian H=boost::none) │ │ │ │ -Log map at identity - return the canonical coordinates of this rotation. │ │ │ │ -DDeeffiinniittiioonn Pose2.cpp:82 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_i_n_v_e_r_s_e │ │ │ │ -GTSAM_EXPORT Pose2 inverse() const │ │ │ │ -inverse │ │ │ │ -DDeeffiinniittiioonn Pose2.cpp:201 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ -GTSAM_EXPORT friend std::ostream & operator<<(std::ostream &os, const Pose2 &p) │ │ │ │ -Output stream operator. │ │ │ │ -DDeeffiinniittiioonn Pose2.cpp:55 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -Point2 operator*(const Point2 &point) const │ │ │ │ -syntactic sugar for transformFrom │ │ │ │ -DDeeffiinniittiioonn Pose2.h:234 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_P_o_s_e_2 │ │ │ │ -Pose2(double x, double y, double theta) │ │ │ │ -construct from (x,y,theta) │ │ │ │ -DDeeffiinniittiioonn Pose2.h:68 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_t │ │ │ │ -const Point2 & t() const │ │ │ │ -translation │ │ │ │ -DDeeffiinniittiioonn Pose2.h:252 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_t_r_a_n_s_l_a_t_i_o_n_I_n_t_e_r_v_a_l │ │ │ │ -static std::pair< size_t, size_t > translationInterval() │ │ │ │ -Return the start and end indices (inclusive) of the translation component of │ │ │ │ -the exponential map para... │ │ │ │ -DDeeffiinniittiioonn Pose2.h:309 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_P_o_s_e_2 │ │ │ │ -Pose2(double theta, const Point2 &t) │ │ │ │ -construct from rotation and translation │ │ │ │ -DDeeffiinniittiioonn Pose2.h:73 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_x │ │ │ │ -double x() const │ │ │ │ -get x │ │ │ │ -DDeeffiinniittiioonn Pose2.h:243 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_r │ │ │ │ -const Rot2 & r() const │ │ │ │ -rotation │ │ │ │ -DDeeffiinniittiioonn Pose2.h:255 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_P_o_s_e_2 │ │ │ │ -Pose2(const Vector &v) │ │ │ │ -Construct from canonical coordinates (Lie algebra) │ │ │ │ -DDeeffiinniittiioonn Pose2.h:91 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_A_d_j_o_i_n_t │ │ │ │ -Vector3 Adjoint(const Vector3 &xi) const │ │ │ │ -Apply AdjointMap to twist xi. │ │ │ │ -DDeeffiinniittiioonn Pose2.h:149 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_w_e_d_g_e │ │ │ │ -static Matrix3 wedge(double vx, double vy, double w) │ │ │ │ -wedge for SE(2): │ │ │ │ -DDeeffiinniittiioonn Pose2.h:183 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_r_o_t_a_t_i_o_n_I_n_t_e_r_v_a_l │ │ │ │ -static std::pair< size_t, size_t > rotationInterval() │ │ │ │ -Return the start and end indices (inclusive) of the rotation component of the │ │ │ │ -exponential map paramet... │ │ │ │ -DDeeffiinniittiioonn Pose2.h:316 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_a_d_j_o_i_n_t_M_a_p │ │ │ │ -static GTSAM_EXPORT Matrix3 adjointMap(const Vector3 &v) │ │ │ │ -Compute the [ad(w,v)] operator for SE2 as in [Kobilarov09siggraph], pg 19. │ │ │ │ -DDeeffiinniittiioonn Pose2.cpp:137 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_t_r_a_n_s_f_o_r_m_T_o │ │ │ │ -GTSAM_EXPORT Point2 transformTo(const Point2 &point, OptionalJacobian< 2, 3 > │ │ │ │ -Dpose=boost::none, OptionalJacobian< 2, 2 > Dpoint=boost::none) const │ │ │ │ -Return point coordinates in pose coordinate frame. │ │ │ │ -DDeeffiinniittiioonn Pose2.cpp:207 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_t_h_e_t_a │ │ │ │ -double theta() const │ │ │ │ -get theta │ │ │ │ -DDeeffiinniittiioonn Pose2.h:249 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_E_x_p_m_a_p_D_e_r_i_v_a_t_i_v_e │ │ │ │ -static GTSAM_EXPORT Matrix3 ExpmapDerivative(const Vector3 &v) │ │ │ │ -Derivative of Expmap. │ │ │ │ -DDeeffiinniittiioonn Pose2.cpp:148 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_R_o_t_a_t_i_o_n │ │ │ │ -Rot2 Rotation │ │ │ │ -Pose Concept requirements. │ │ │ │ -DDeeffiinniittiioonn Pose2.h:41 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_P_o_s_e_2 │ │ │ │ -Pose2() │ │ │ │ -default constructor = origin │ │ │ │ -DDeeffiinniittiioonn Pose2.h:55 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_t_r_a_n_s_f_o_r_m_F_r_o_m │ │ │ │ -GTSAM_EXPORT Point2 transformFrom(const Point2 &point, OptionalJacobian< 2, 3 > │ │ │ │ -Dpose=boost::none, OptionalJacobian< 2, 2 > Dpoint=boost::none) const │ │ │ │ -Return point coordinates in global frame. │ │ │ │ -DDeeffiinniittiioonn Pose2.cpp:226 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_a_d_j_o_i_n_t_T_r_a_n_s_p_o_s_e │ │ │ │ -static Vector3 adjointTranspose(const Vector3 &xi, const Vector3 &y) │ │ │ │ -The dual version of adjoint action, acting on the dual space of the Lie-algebra │ │ │ │ -vector space. │ │ │ │ -DDeeffiinniittiioonn Pose2.h:168 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_E_x_p_m_a_p │ │ │ │ -static GTSAM_EXPORT Pose2 Expmap(const Vector3 &xi, ChartJacobian H=boost:: │ │ │ │ -none) │ │ │ │ -Exponential map at identity - create a rotation from canonical coordinates . │ │ │ │ -DDeeffiinniittiioonn Pose2.cpp:66 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_I_d_e_n_t_i_t_y │ │ │ │ -static Pose2 Identity() │ │ │ │ -identity for group operation │ │ │ │ -DDeeffiinniittiioonn Pose2.h:122 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_A_l_i_g_n │ │ │ │ -static boost::optional< Pose2 > Align(const Point2Pairs &abPointPairs) │ │ │ │ -Create Pose2 by aligning two point pairs A pose aTb is estimated between pairs │ │ │ │ -(a_point,... │ │ │ │ -DDeeffiinniittiioonn Pose2.cpp:330 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_P_o_s_e_2 │ │ │ │ -Pose2(const Rot2 &r, const Point2 &t) │ │ │ │ -construct from r,t │ │ │ │ -DDeeffiinniittiioonn Pose2.h:78 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_a_d_j_o_i_n_t │ │ │ │ -static Vector3 adjoint(const Vector3 &xi, const Vector3 &y) │ │ │ │ -Action of the adjointMap on a Lie-algebra vector y, with optional derivatives. │ │ │ │ -DDeeffiinniittiioonn Pose2.h:161 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_P_o_s_e_2 │ │ │ │ -Pose2(const Pose2 &pose) │ │ │ │ -copy constructor │ │ │ │ -DDeeffiinniittiioonn Pose2.h:60 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_t_r_a_n_s_l_a_t_i_o_n │ │ │ │ -const Point2 & translation() const │ │ │ │ -translation │ │ │ │ -DDeeffiinniittiioonn Pose2.h:258 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_P_o_s_e_2 │ │ │ │ -Pose2(const Matrix &T) │ │ │ │ -Constructor from 3*3 matrix. │ │ │ │ -DDeeffiinniittiioonn Pose2.h:81 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_2_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ -DDeeffiinniittiioonn Pose2.h:198 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_2 │ │ │ │ -Rotation matrix NOTE: the angle theta is in radians unless explicitly stated. │ │ │ │ -DDeeffiinniittiioonn Rot2.h:36 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_2_:_:_t_h_e_t_a │ │ │ │ -double theta() const │ │ │ │ -return angle (RADIANS) │ │ │ │ -DDeeffiinniittiioonn Rot2.h:187 │ │ │ │ +DDeeffiinniittiioonn Pose3.cpp:152 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn StereoCamera.h:26 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a │ │ │ │ +A stereo camera class, parameterize by left camera pose and stereo calibration. │ │ │ │ +DDeeffiinniittiioonn StereoCamera.h:47 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_S_t_e_r_e_o_C_a_m_e_r_a │ │ │ │ +StereoCamera() │ │ │ │ +Default constructor allocates a calibration! │ │ │ │ +DDeeffiinniittiioonn StereoCamera.h:72 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_D_i_m │ │ │ │ +static size_t Dim() │ │ │ │ +Dimensionality of the tangent space. │ │ │ │ +DDeeffiinniittiioonn StereoCamera.h:110 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_p_r_i_n_t │ │ │ │ +void print(const std::string &s="") const │ │ │ │ +print │ │ │ │ +DDeeffiinniittiioonn StereoCamera.h:89 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ +Vector6 localCoordinates(const StereoCamera &t2) const │ │ │ │ +Local coordinates of manifold neighborhood around current value. │ │ │ │ +DDeeffiinniittiioonn StereoCamera.h:120 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const StereoCamera &camera, double tol=1e-9) const │ │ │ │ +equals │ │ │ │ +DDeeffiinniittiioonn StereoCamera.h:95 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_d_i_m │ │ │ │ +size_t dim() const │ │ │ │ +Dimensionality of the tangent space. │ │ │ │ +DDeeffiinniittiioonn StereoCamera.h:105 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_r_e_t_r_a_c_t │ │ │ │ +StereoCamera retract(const Vector &v) const │ │ │ │ +Updates a with tangent space delta. │ │ │ │ +DDeeffiinniittiioonn StereoCamera.h:115 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_M_e_a_s_u_r_e_m_e_n_t │ │ │ │ +StereoPoint2 Measurement │ │ │ │ +Some classes template on either PinholeCamera or StereoCamera, and this typedef │ │ │ │ +informs those classes... │ │ │ │ +DDeeffiinniittiioonn StereoCamera.h:55 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_c_a_l_i_b_r_a_t_i_o_n │ │ │ │ +const Cal3_S2Stereo & calibration() const │ │ │ │ +Return shared pointer to calibration. │ │ │ │ +DDeeffiinniittiioonn StereoCamera.h:80 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_b_a_s_e_l_i_n_e │ │ │ │ +double baseline() const │ │ │ │ +baseline │ │ │ │ +DDeeffiinniittiioonn StereoCamera.h:134 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_p_o_s_e │ │ │ │ +const Pose3 & pose() const │ │ │ │ +pose │ │ │ │ +DDeeffiinniittiioonn StereoCamera.h:129 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_C_a_m_e_r_a_:_:_d_e_f_a_u_l_t_E_r_r_o_r_W_h_e_n_T_r_i_a_n_g_u_l_a_t_i_n_g_B_e_h_i_n_d_C_a_m_e_r_a │ │ │ │ +Vector defaultErrorWhenTriangulatingBehindCamera() const │ │ │ │ +for Nonlinear Triangulation │ │ │ │ +DDeeffiinniittiioonn StereoCamera.h:174 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2 │ │ │ │ +A 2D stereo point, v will be same for rectified images. │ │ │ │ +DDeeffiinniittiioonn StereoPoint2.h:32 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_o_s_e_2_._h │ │ │ │ + * _S_t_e_r_e_o_C_a_m_e_r_a_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00374.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Pose2.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Pose3.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,39 +96,39 @@ │ │ │
    │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Namespaces | │ │ │ Functions
    │ │ │ -
    Pose2.cpp File Reference
    │ │ │ +
    Pose3.cpp File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    2D Pose │ │ │ +

    3D Pose │ │ │ More...

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │

    │ │ │ Functions

    │ │ │ -std::ostream & gtsam::operator<< (std::ostream &os, const Pose2 &pose)
     
    │ │ │ +std::ostream & gtsam::operator<< (std::ostream &os, const Pose3 &pose)
     
    │ │ │

    Detailed Description

    │ │ │ -

    2D Pose

    │ │ │ +

    3D Pose

    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,21 +1,21 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Pose2.cpp File Reference │ │ │ │ -2D Pose _M_o_r_e_._._. │ │ │ │ +Pose3.cpp File Reference │ │ │ │ +3D Pose _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _P_o_s_e_2 &pose) │ │ │ │ +std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _P_o_s_e_3 &pose) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -2D Pose │ │ │ │ +3D Pose │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_o_s_e_2_._c_p_p │ │ │ │ + * _P_o_s_e_3_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00377.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Point3.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SO3.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,99 +94,89 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Typedefs | │ │ │ Functions
    │ │ │ -
    Point3.h File Reference
    │ │ │ +
    SO3.cpp File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    3D Point │ │ │ +

    3*3 matrix representation of SO(3) │ │ │ More...

    │ │ │ - │ │ │ -

    Go to the source code of this file.

    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Classes

    struct  gtsam::Range< Point3, Point3 >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Typedefs

    │ │ │ -typedef Vector3 gtsam::Point3
     As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point3 to Vector3.
     
    │ │ │ -typedef std::vector< Point3, Eigen::aligned_allocator< Point3 > > gtsam::Point3Vector
     
    │ │ │ -using gtsam::Point3Pair = std::pair< Point3, Point3 >
     
    │ │ │ -using gtsam::Point3Pairs = std::vector< Point3Pair >
     
    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ Functions

    │ │ │ -ostream & gtsam::operator<< (ostream &os, const gtsam::Point3Pair &p)
     
    │ │ │ -double gtsam::distance3 (const Point3 &p1, const Point3 &q, OptionalJacobian< 1, 3 > H1=boost::none, OptionalJacobian< 1, 3 > H2=boost::none)
     distance between two points
     
    │ │ │ -double gtsam::norm3 (const Point3 &p, OptionalJacobian< 1, 3 > H=boost::none)
     Distance of the point from the origin, with Jacobian.
     
    │ │ │ -Point3 gtsam::normalize (const Point3 &p, OptionalJacobian< 3, 3 > H=boost::none)
     normalize, with optional Jacobian
     
    Point3 gtsam::cross (const Point3 &p, const Point3 &q, OptionalJacobian< 3, 3 > H_p=boost::none, OptionalJacobian< 3, 3 > H_q=boost::none)
     cross product
     
    │ │ │ -double gtsam::dot (const Point3 &p, const Point3 &q, OptionalJacobian< 1, 3 > H_p=boost::none, OptionalJacobian< 1, 3 > H_q=boost::none)
     dot product
     
    │ │ │ -template<class CONTAINER >
    Point3 gtsam::mean (const CONTAINER &points)
     mean
     
    │ │ │ -Point3Pair gtsam::means (const std::vector< Point3Pair > &abPointPairs)
     Calculate the two means of a set of Point3 pairs.
     
    │ │ │ +GTSAM_EXPORT Matrix99 gtsam::so3::Dcompose (const SO3 &R)
     (constant) Jacobian of compose wrpt M
     
    GTSAM_EXPORT Matrix3 gtsam::so3::compose (const Matrix3 &M, const SO3 &R, OptionalJacobian< 9, 9 > H=boost::none)
     Compose general matrix with an SO(3) element.
     
    │ │ │

    Detailed Description

    │ │ │ -

    3D Point

    │ │ │ -
    Author
    Alireza Fathi
    │ │ │ +

    3*3 matrix representation of SO(3)

    │ │ │ +
    Author
    Frank Dellaert
    │ │ │
    │ │ │ -Christian Potthast
    │ │ │ +Luca Carlone │ │ │
    │ │ │ -Frank Dellaert
    │ │ │ -
    │ │ │ +Duy Nguyen Ta │ │ │ +
    Date
    December 2014
    │ │ │ +

    Function Documentation

    │ │ │ + │ │ │ +

    ◆ compose()

    │ │ │ + │ │ │ +
    │ │ │ +
    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
    GTSAM_EXPORT Matrix3 gtsam::so3::compose (const Matrix3 & M,
    const SO3R,
    OptionalJacobian< 9, 9 > H = boost::none 
    )
    │ │ │ +
    │ │ │ + │ │ │ +

    Compose general matrix with an SO(3) element.

    │ │ │ +

    We only provide the 9*9 derivative in the first argument M.

    │ │ │ + │ │ │ +
    │ │ │ +
    │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,72 +1,41 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Point3.h File Reference │ │ │ │ -3D Point _M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -struct   _g_t_s_a_m_:_:_R_a_n_g_e_<_ _P_o_i_n_t_3_,_ _P_o_i_n_t_3_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +SO3.cpp File Reference │ │ │ │ +3*3 matrix representation of SO(3) _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ - typedef Vector3  ggttssaamm::::PPooiinntt33 │ │ │ │ - As of GTSAM 4, in order to make GTSAM more │ │ │ │ -  lean, it is now possible to just typedef │ │ │ │ - Point3 to Vector3. │ │ │ │ -  │ │ │ │ -typedef std::vector< _P_o_i_n_t_3, Eigen:: │ │ │ │ - aligned_allocator< _P_o_i_n_t_3 > >  ggttssaamm::::PPooiinntt33VVeeccttoorr │ │ │ │ -  │ │ │ │ - using  ggttssaamm::::PPooiinntt33PPaaiirr = std::pair< _P_o_i_n_t_3, │ │ │ │ - _P_o_i_n_t_3 > │ │ │ │ -  │ │ │ │ - using  ggttssaamm::::PPooiinntt33PPaaiirrss = std::vector< │ │ │ │ - Point3Pair > │ │ │ │ -  │ │ │ │ FFuunnccttiioonnss │ │ │ │ - ostream &  ggttssaamm::::ooppeerraattoorr<<<< (ostream &os, const gtsam::Point3Pair &p) │ │ │ │ -  │ │ │ │ - double  ggttssaamm::::ddiissttaannccee33 (const _P_o_i_n_t_3 &p1, const _P_o_i_n_t_3 &q, │ │ │ │ - _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 3 > H1=boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 3 > │ │ │ │ - H2=boost::none) │ │ │ │ -  distance between two points │ │ │ │ -  │ │ │ │ - double  ggttssaamm::::nnoorrmm33 (const _P_o_i_n_t_3 &p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 3 > H=boost:: │ │ │ │ - none) │ │ │ │ -  Distance of the point from the origin, with Jacobian. │ │ │ │ -  │ │ │ │ - _P_o_i_n_t_3  ggttssaamm::::nnoorrmmaalliizzee (const _P_o_i_n_t_3 &p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 3, 3 > │ │ │ │ - H=boost::none) │ │ │ │ -  normalize, with optional Jacobian │ │ │ │ -  │ │ │ │ - _P_o_i_n_t_3  _g_t_s_a_m_:_:_c_r_o_s_s (const _P_o_i_n_t_3 &p, const _P_o_i_n_t_3 &q, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< │ │ │ │ - 3, 3 > H_p=boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 3, 3 > H_q=boost::none) │ │ │ │ -  cross product │ │ │ │ -  │ │ │ │ - double  ggttssaamm::::ddoott (const _P_o_i_n_t_3 &p, const _P_o_i_n_t_3 &q, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, │ │ │ │ - 3 > H_p=boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 3 > H_q=boost::none) │ │ │ │ -  dot product │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _P_o_i_n_t_3  ggttssaamm::::mmeeaann (const CONTAINER &points) │ │ │ │ -  mean │ │ │ │ +GTSAM_EXPORT Matrix99  ggttssaamm::::ssoo33::::DDccoommppoossee (const _S_O_3 &R) │ │ │ │ +  (constant) Jacobian of compose wrpt M │ │ │ │   │ │ │ │ -Point3Pair  ggttssaamm::::mmeeaannss (const std::vector< Point3Pair > &abPointPairs) │ │ │ │ -  Calculate the two means of a set of Point3 pairs. │ │ │ │ + GTSAM_EXPORT Matrix3  _g_t_s_a_m_:_:_s_o_3_:_:_c_o_m_p_o_s_e (const Matrix3 &M, const _S_O_3 &R, │ │ │ │ + _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 9, 9 > H=boost::none) │ │ │ │ +  Compose general matrix with an SO(3) element. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -3D Point │ │ │ │ +3*3 matrix representation of SO(3) │ │ │ │ Author │ │ │ │ - Alireza Fathi │ │ │ │ - Christian Potthast │ │ │ │ Frank Dellaert │ │ │ │ + Luca Carlone │ │ │ │ + Duy Nguyen Ta │ │ │ │ + Date │ │ │ │ + December 2014 │ │ │ │ +********** FFuunnccttiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? ccoommppoossee(()) ********** │ │ │ │ +GTSAM_EXPORT Matrix3 gtsam::so3:: ( const Matrix3 &  MM, │ │ │ │ +compose │ │ │ │ + const _S_O_3 &  RR, │ │ │ │ + _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 9, 9 >  HH = boost::none  │ │ │ │ + ) │ │ │ │ +Compose general matrix with an SO(3) element. │ │ │ │ +We only provide the 9*9 derivative in the first argument M. │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_o_i_n_t_3_._h │ │ │ │ + * _S_O_3_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00377.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,11 +1,4 @@ │ │ │ │ var a00377 = [ │ │ │ │ - ["gtsam::Range< Point3, Point3 >", "a03152.html", null], │ │ │ │ - ["Point3", "a00377.html#aaa8ed89fd60ea4601d9de63c4811525b", null], │ │ │ │ - ["cross", "a00377.html#a86bf6ed2ffb0ecc42a7deb8922f4ca4f", null], │ │ │ │ - ["distance3", "a00377.html#aa42f7ec660b7353de39f9c86a26711cc", null], │ │ │ │ - ["dot", "a00377.html#a7dc820e4e47218768f104b43a184a1bd", null], │ │ │ │ - ["mean", "a00377.html#a300205092710091b8745c0a145da20a1", null], │ │ │ │ - ["means", "a00377.html#a57f778b84bc6106471006421d289b832", null], │ │ │ │ - ["norm3", "a00377.html#ac37b6f807985ffd25217e33f6136fe58", null], │ │ │ │ - ["normalize", "a00377.html#abb52bb00c68909fc1147e5d112e8c2ae", null] │ │ │ │ + ["compose", "a00377.html#a72fc8b10f24d82aa8a4c99f99403fe5e", null], │ │ │ │ + ["Dcompose", "a00377.html#a7c7e26b6d07ec0f16363c196247b294d", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00380.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Point3.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Rot3.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,64 +94,84 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ +Classes | │ │ │ Namespaces | │ │ │ +Macros | │ │ │ +Typedefs | │ │ │ Functions
    │ │ │ -
    Point3.cpp File Reference
    │ │ │ +
    Rot3.h File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    3D Point │ │ │ +

    3D rotation represented as a rotation matrix or quaternion │ │ │ More...

    │ │ │ + │ │ │ +

    Go to the source code of this file.

    │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Classes

    class  gtsam::Rot3
     Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIONS is not defined, or as a quaternion if it is defined. More...
     
    struct  gtsam::Rot3::CayleyChart
     
    struct  gtsam::Rot3::ChartAtOrigin
     
    struct  gtsam::traits< Rot3 >
     
    struct  gtsam::traits< const Rot3 >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Macros

    │ │ │ +#define ROT3_DEFAULT_COORDINATES_MODE   Rot3::CAYLEY
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Typedefs

    │ │ │ +using gtsam::Rot3Vector = std::vector< Rot3, Eigen::aligned_allocator< Rot3 > >
     std::vector of Rot3s, mainly for wrapper
     
    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ Functions

    │ │ │ -double gtsam::distance3 (const Point3 &p1, const Point3 &q, OptionalJacobian< 1, 3 > H1=boost::none, OptionalJacobian< 1, 3 > H2=boost::none)
     distance between two points
     
    │ │ │ -double gtsam::norm3 (const Point3 &p, OptionalJacobian< 1, 3 > H=boost::none)
     Distance of the point from the origin, with Jacobian.
     
    │ │ │ -Point3 gtsam::normalize (const Point3 &p, OptionalJacobian< 3, 3 > H=boost::none)
     normalize, with optional Jacobian
     
    Point3 gtsam::cross (const Point3 &p, const Point3 &q, OptionalJacobian< 3, 3 > H_p=boost::none, OptionalJacobian< 3, 3 > H_q=boost::none)
     cross product
     
    │ │ │ -double gtsam::dot (const Point3 &p, const Point3 &q, OptionalJacobian< 1, 3 > H_p=boost::none, OptionalJacobian< 1, 3 > H_q=boost::none)
     dot product
     
    │ │ │ -Point3Pair gtsam::means (const std::vector< Point3Pair > &abPointPairs)
     Calculate the two means of a set of Point3 pairs.
     
    │ │ │ -ostream & gtsam::operator<< (ostream &os, const gtsam::Point3Pair &p)
     
    pair< Matrix3, Vector3 > gtsam::RQ (const Matrix3 &A, OptionalJacobian< 3, 9 > H=boost::none)
     [RQ] receives a 3 by 3 matrix and returns an upper triangular matrix R and 3 rotation angles corresponding to the rotation matrix Q=Qz'*Qy'*Qx' such that A = R*Q = R*Qz'*Qy'*Qx'.
     
    │ │ │

    Detailed Description

    │ │ │ -

    3D Point

    │ │ │ +

    3D rotation represented as a rotation matrix or quaternion

    │ │ │ +
    Author
    Alireza Fathi
    │ │ │ +
    │ │ │ +Christian Potthast
    │ │ │ +
    │ │ │ +Frank Dellaert
    │ │ │ +
    │ │ │ +Richard Roberts
    │ │ │ +
    │ │ │ +Luca Carlone
    │ │ │ +
    │ │ │ +Varun Agrawal
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,45 +1,56 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Point3.cpp File Reference │ │ │ │ -3D Point _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Rot3.h File Reference │ │ │ │ +3D rotation represented as a rotation matrix or quaternion _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ + class   _g_t_s_a_m_:_:_R_o_t_3 │ │ │ │ + _R_o_t_3 is a 3D rotation represented as a rotation matrix if the │ │ │ │ +  preprocessor symbol GTSAM_USE_QUATERNIONS is not defined, or as a │ │ │ │ + quaternion if it is defined. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_R_o_t_3_:_:_C_a_y_l_e_y_C_h_a_r_t │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_R_o_t_3_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _R_o_t_3_ _> │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _R_o_t_3_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ - double  ggttssaamm::::ddiissttaannccee33 (const _P_o_i_n_t_3 &p1, const _P_o_i_n_t_3 &q, │ │ │ │ - _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 3 > H1=boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 3 > │ │ │ │ - H2=boost::none) │ │ │ │ -  distance between two points │ │ │ │ -  │ │ │ │ - double  ggttssaamm::::nnoorrmm33 (const _P_o_i_n_t_3 &p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 3 > H=boost:: │ │ │ │ - none) │ │ │ │ -  Distance of the point from the origin, with Jacobian. │ │ │ │ -  │ │ │ │ - _P_o_i_n_t_3  ggttssaamm::::nnoorrmmaalliizzee (const _P_o_i_n_t_3 &p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 3, 3 > │ │ │ │ - H=boost::none) │ │ │ │ -  normalize, with optional Jacobian │ │ │ │ -  │ │ │ │ - _P_o_i_n_t_3  _g_t_s_a_m_:_:_c_r_o_s_s (const _P_o_i_n_t_3 &p, const _P_o_i_n_t_3 &q, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< │ │ │ │ - 3, 3 > H_p=boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 3, 3 > H_q=boost::none) │ │ │ │ -  cross product │ │ │ │ -  │ │ │ │ - double  ggttssaamm::::ddoott (const _P_o_i_n_t_3 &p, const _P_o_i_n_t_3 &q, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, │ │ │ │ - 3 > H_p=boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 3 > H_q=boost::none) │ │ │ │ -  dot product │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  RROOTT33__DDEEFFAAUULLTT__CCOOOORRDDIINNAATTEESS__MMOODDEE   Rot3::CAYLEY │ │ │ │   │ │ │ │ -Point3Pair  ggttssaamm::::mmeeaannss (const std::vector< Point3Pair > &abPointPairs) │ │ │ │ -  Calculate the two means of a set of Point3 pairs. │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +using  ggttssaamm::::RRoott33VVeeccttoorr = std::vector< _R_o_t_3, Eigen::aligned_allocator< _R_o_t_3 > │ │ │ │ + > │ │ │ │ +  std::vector of Rot3s, mainly for wrapper │ │ │ │   │ │ │ │ - ostream &  ggttssaamm::::ooppeerraattoorr<<<< (ostream &os, const gtsam::Point3Pair &p) │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +pair< Matrix3, Vector3 >  _g_t_s_a_m_:_:_R_Q (const Matrix3 &A, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 3, 9 > │ │ │ │ + H=boost::none) │ │ │ │ + [RQ] receives a 3 by 3 matrix and returns an upper │ │ │ │ +  triangular matrix R and 3 rotation angles │ │ │ │ + corresponding to the rotation matrix Q=Qz'*Qy'*Qx' │ │ │ │ + such that A = R*Q = R*Qz'*Qy'*Qx'. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -3D Point │ │ │ │ +3D rotation represented as a rotation matrix or quaternion │ │ │ │ + Author │ │ │ │ + Alireza Fathi │ │ │ │ + Christian Potthast │ │ │ │ + Frank Dellaert │ │ │ │ + Richard Roberts │ │ │ │ + Luca Carlone │ │ │ │ + Varun Agrawal │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_o_i_n_t_3_._c_p_p │ │ │ │ + * _R_o_t_3_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00380.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,8 +1,8 @@ │ │ │ │ var a00380 = [ │ │ │ │ - ["cross", "a00380.html#a86bf6ed2ffb0ecc42a7deb8922f4ca4f", null], │ │ │ │ - ["distance3", "a00380.html#aa42f7ec660b7353de39f9c86a26711cc", null], │ │ │ │ - ["dot", "a00380.html#a7dc820e4e47218768f104b43a184a1bd", null], │ │ │ │ - ["means", "a00380.html#a57f778b84bc6106471006421d289b832", null], │ │ │ │ - ["norm3", "a00380.html#ac37b6f807985ffd25217e33f6136fe58", null], │ │ │ │ - ["normalize", "a00380.html#abb52bb00c68909fc1147e5d112e8c2ae", null] │ │ │ │ + ["gtsam::Rot3::CayleyChart", "a03232.html", null], │ │ │ │ + ["gtsam::Rot3::ChartAtOrigin", "a03236.html", null], │ │ │ │ + ["gtsam::traits< Rot3 >", "a03240.html", null], │ │ │ │ + ["gtsam::traits< const Rot3 >", "a03244.html", null], │ │ │ │ + ["Rot3Vector", "a00380.html#a52e26554234edf7de94a5e43dd0bcbf9", null], │ │ │ │ + ["RQ", "a00380.html#a5172b5b6d51bd5348c7e551e1376f60a", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00383.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Point2.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Rot3Q.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -93,93 +93,27 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    │ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Typedefs | │ │ │ -Functions
    │ │ │ -
    Point2.h File Reference
    │ │ │ +
    Rot3Q.cpp File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    2D Point │ │ │ +

    Rotation (internal: quaternion representation*) │ │ │ More...

    │ │ │ - │ │ │ -

    Go to the source code of this file.

    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Classes

    struct  gtsam::Range< Point2, Point2 >
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Typedefs

    │ │ │ -typedef Vector2 gtsam::Point2
     As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point2 to Vector2.
     
    │ │ │ -using gtsam::Point2Pair = std::pair< Point2, Point2 >
     
    │ │ │ -using gtsam::Point2Pairs = std::vector< Point2Pair >
     
    │ │ │ -typedef std::vector< Point2, Eigen::aligned_allocator< Point2 > > gtsam::Point2Vector
     
    │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Functions

    │ │ │ -ostream & gtsam::operator<< (ostream &os, const gtsam::Point2Pair &p)
     
    │ │ │ -double gtsam::norm2 (const Point2 &p, OptionalJacobian< 1, 2 > H=boost::none)
     Distance of the point from the origin, with Jacobian.
     
    │ │ │ -double gtsam::distance2 (const Point2 &p1, const Point2 &q, OptionalJacobian< 1, 2 > H1=boost::none, OptionalJacobian< 1, 2 > H2=boost::none)
     distance between two points
     
    │ │ │ -Point2 gtsam::operator* (double s, const Point2 &p)
     multiply with scalar
     
    │ │ │ -boost::optional< Point2gtsam::circleCircleIntersection (double R_d, double r_d, double tol)
     
    │ │ │ -list< Point2gtsam::circleCircleIntersection (Point2 c1, Point2 c2, boost::optional< Point2 > fh)
     
    │ │ │ -Point2Pair gtsam::means (const std::vector< Point2Pair > &abPointPairs)
     Calculate the two means of a set of Point2 pairs.
     
    list< Point2gtsam::circleCircleIntersection (Point2 c1, double r1, Point2 c2, double r2, double tol=1e-9)
     Intersect 2 circles.
     
    │ │ │

    Detailed Description

    │ │ │ -

    2D Point

    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ +

    Rotation (internal: quaternion representation*)

    │ │ │ +
    Author
    Richard Roberts
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,70 +1,15 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Point2.h File Reference │ │ │ │ -2D Point _M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -struct   _g_t_s_a_m_:_:_R_a_n_g_e_<_ _P_o_i_n_t_2_,_ _P_o_i_n_t_2_ _> │ │ │ │ -  │ │ │ │ -NNaammeessppaacceess │ │ │ │ -namespace   _g_t_s_a_m │ │ │ │ -  Global functions in a separate testing namespace. │ │ │ │ -  │ │ │ │ -TTyyppeeddeeffss │ │ │ │ - typedef Vector2  ggttssaamm::::PPooiinntt22 │ │ │ │ - As of GTSAM 4, in order to make GTSAM more │ │ │ │ -  lean, it is now possible to just typedef │ │ │ │ - Point2 to Vector2. │ │ │ │ -  │ │ │ │ - using  ggttssaamm::::PPooiinntt22PPaaiirr = std::pair< _P_o_i_n_t_2, │ │ │ │ - _P_o_i_n_t_2 > │ │ │ │ -  │ │ │ │ - using  ggttssaamm::::PPooiinntt22PPaaiirrss = std::vector< │ │ │ │ - Point2Pair > │ │ │ │ -  │ │ │ │ -typedef std::vector< _P_o_i_n_t_2, Eigen:: │ │ │ │ - aligned_allocator< _P_o_i_n_t_2 > >  ggttssaamm::::PPooiinntt22VVeeccttoorr │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ - ostream &  ggttssaamm::::ooppeerraattoorr<<<< (ostream &os, const gtsam:: │ │ │ │ - Point2Pair &p) │ │ │ │ -  │ │ │ │ - double  ggttssaamm::::nnoorrmm22 (const _P_o_i_n_t_2 &p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, │ │ │ │ - 2 > H=boost::none) │ │ │ │ -  Distance of the point from the origin, with │ │ │ │ - Jacobian. │ │ │ │ -  │ │ │ │ - double  ggttssaamm::::ddiissttaannccee22 (const _P_o_i_n_t_2 &p1, const _P_o_i_n_t_2 &q, │ │ │ │ - _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 2 > H1=boost::none, │ │ │ │ - _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 2 > H2=boost::none) │ │ │ │ -  distance between two points │ │ │ │ -  │ │ │ │ - _P_o_i_n_t_2  ggttssaamm::::ooppeerraattoorr** (double s, const _P_o_i_n_t_2 &p) │ │ │ │ -  multiply with scalar │ │ │ │ -  │ │ │ │ -boost::optional< _P_o_i_n_t_2 >  ggttssaamm::::cciirrcclleeCCiirrcclleeIInntteerrsseeccttiioonn (double R_d, double │ │ │ │ - r_d, double tol) │ │ │ │ -  │ │ │ │ - list< _P_o_i_n_t_2 >  ggttssaamm::::cciirrcclleeCCiirrcclleeIInntteerrsseeccttiioonn (_P_o_i_n_t_2 c1, _P_o_i_n_t_2 │ │ │ │ - c2, boost::optional< _P_o_i_n_t_2 > fh) │ │ │ │ -  │ │ │ │ - Point2Pair  ggttssaamm::::mmeeaannss (const std::vector< Point2Pair > │ │ │ │ - &abPointPairs) │ │ │ │ -  Calculate the two means of a set of Point2 pairs. │ │ │ │ -  │ │ │ │ - list< _P_o_i_n_t_2 >  _g_t_s_a_m_:_:_c_i_r_c_l_e_C_i_r_c_l_e_I_n_t_e_r_s_e_c_t_i_o_n (_P_o_i_n_t_2 c1, double │ │ │ │ - r1, _P_o_i_n_t_2 c2, double r2, double tol=1e-9) │ │ │ │ -  Intersect 2 circles. │ │ │ │ -  │ │ │ │ +Rot3Q.cpp File Reference │ │ │ │ +Rotation (internal: quaternion representation*) _M_o_r_e_._._. │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -2D Point │ │ │ │ +Rotation (internal: quaternion representation*) │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + Richard Roberts │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_o_i_n_t_2_._h │ │ │ │ + * _R_o_t_3_Q_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00386.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Point2.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Pose2.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,63 +94,75 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ +Classes | │ │ │ Namespaces | │ │ │ +Typedefs | │ │ │ Functions
    │ │ │ -
    Point2.cpp File Reference
    │ │ │ +
    Pose2.h File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    2D Point │ │ │ +

    2D Pose │ │ │ More...

    │ │ │ + │ │ │ +

    Go to the source code of this file.

    │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Classes

    class  gtsam::Pose2
     A 2D pose (Point2,Rot2) More...
     
    struct  gtsam::Pose2::ChartAtOrigin
     
    struct  gtsam::traits< Pose2 >
     
    struct  gtsam::traits< const Pose2 >
     
    struct  gtsam::Bearing< Pose2, T >
     
    struct  gtsam::Range< Pose2, T >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

    │ │ │ +Typedefs

    │ │ │ +using gtsam::Pose2Pair = std::pair< Pose2, Pose2 >
     
    │ │ │ +using gtsam::Pose2Pairs = std::vector< Pose2Pair >
     
    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ Functions

    │ │ │ -double gtsam::norm2 (const Point2 &p, OptionalJacobian< 1, 2 > H=boost::none)
     Distance of the point from the origin, with Jacobian.
     
    │ │ │ -double gtsam::distance2 (const Point2 &p1, const Point2 &q, OptionalJacobian< 1, 2 > H1=boost::none, OptionalJacobian< 1, 2 > H2=boost::none)
     distance between two points
     
    │ │ │ -boost::optional< Point2gtsam::circleCircleIntersection (double R_d, double r_d, double tol)
     
    │ │ │ -list< Point2gtsam::circleCircleIntersection (Point2 c1, Point2 c2, boost::optional< Point2 > fh)
     
    list< Point2gtsam::circleCircleIntersection (Point2 c1, double r1, Point2 c2, double r2, double tol=1e-9)
     Intersect 2 circles.
     
    │ │ │ -Point2Pair gtsam::means (const std::vector< Point2Pair > &abPointPairs)
     Calculate the two means of a set of Point2 pairs.
     
    │ │ │ -ostream & gtsam::operator<< (ostream &os, const gtsam::Point2Pair &p)
     
    │ │ │ +template<>
    Matrix gtsam::wedge< Pose2 > (const Vector &xi)
     specialization for pose2 wedge function (generic template in Lie.h)
     
    │ │ │

    Detailed Description

    │ │ │ -

    2D Point

    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ +

    2D Pose

    │ │ │ +
    Author
    : Frank Dellaert
    │ │ │ +
    │ │ │ +: Richard Roberts
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,48 +1,46 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -Point2.cpp File Reference │ │ │ │ -2D Point _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Pose2.h File Reference │ │ │ │ +2D Pose _M_o_r_e_._._. │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ + class   _g_t_s_a_m_:_:_P_o_s_e_2 │ │ │ │ +  A 2D pose (Point2,_R_o_t_2) _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_P_o_s_e_2_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _P_o_s_e_2_ _> │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _P_o_s_e_2_ _> │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_B_e_a_r_i_n_g_<_ _P_o_s_e_2_,_ _T_ _> │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_R_a_n_g_e_<_ _P_o_s_e_2_,_ _T_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ - double  ggttssaamm::::nnoorrmm22 (const _P_o_i_n_t_2 &p, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, │ │ │ │ - 2 > H=boost::none) │ │ │ │ -  Distance of the point from the origin, with │ │ │ │ - Jacobian. │ │ │ │ -  │ │ │ │ - double  ggttssaamm::::ddiissttaannccee22 (const _P_o_i_n_t_2 &p1, const _P_o_i_n_t_2 &q, │ │ │ │ - _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 2 > H1=boost::none, │ │ │ │ - _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 1, 2 > H2=boost::none) │ │ │ │ -  distance between two points │ │ │ │ -  │ │ │ │ -boost::optional< _P_o_i_n_t_2 >  ggttssaamm::::cciirrcclleeCCiirrcclleeIInntteerrsseeccttiioonn (double R_d, double │ │ │ │ - r_d, double tol) │ │ │ │ -  │ │ │ │ - list< _P_o_i_n_t_2 >  ggttssaamm::::cciirrcclleeCCiirrcclleeIInntteerrsseeccttiioonn (_P_o_i_n_t_2 c1, _P_o_i_n_t_2 │ │ │ │ - c2, boost::optional< _P_o_i_n_t_2 > fh) │ │ │ │ -  │ │ │ │ - list< _P_o_i_n_t_2 >  _g_t_s_a_m_:_:_c_i_r_c_l_e_C_i_r_c_l_e_I_n_t_e_r_s_e_c_t_i_o_n (_P_o_i_n_t_2 c1, double │ │ │ │ - r1, _P_o_i_n_t_2 c2, double r2, double tol=1e-9) │ │ │ │ -  Intersect 2 circles. │ │ │ │ -  │ │ │ │ - Point2Pair  ggttssaamm::::mmeeaannss (const std::vector< Point2Pair > │ │ │ │ - &abPointPairs) │ │ │ │ -  Calculate the two means of a set of Point2 pairs. │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +using  ggttssaamm::::PPoossee22PPaaiirr = std::pair< _P_o_s_e_2, _P_o_s_e_2 > │ │ │ │   │ │ │ │ - ostream &  ggttssaamm::::ooppeerraattoorr<<<< (ostream &os, const gtsam:: │ │ │ │ - Point2Pair &p) │ │ │ │ +using  ggttssaamm::::PPoossee22PPaaiirrss = std::vector< Pose2Pair > │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template<> │ │ │ │ + Matrix  ggttssaamm::::wweeddggee<< PPoossee22 >> (const Vector &xi) │ │ │ │ +  specialization for pose2 wedge function (generic template in _L_i_e_._h) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -2D Point │ │ │ │ +2D Pose │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + : Frank Dellaert │ │ │ │ + : Richard Roberts │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_o_i_n_t_2_._c_p_p │ │ │ │ + * _P_o_s_e_2_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00386.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,6 +1,8 @@ │ │ │ │ var a00386 = [ │ │ │ │ - ["circleCircleIntersection", "a00386.html#a93d4e38a582b6f32fc4f301df10721d5", null], │ │ │ │ - ["distance2", "a00386.html#afd1282dfb080cb393ae60188b4582cb2", null], │ │ │ │ - ["means", "a00386.html#a9e357cda5287fae1438f86bc4df27a80", null], │ │ │ │ - ["norm2", "a00386.html#afee4e6aa4aba9b6a6b421ddd75b52dfc", null] │ │ │ │ + ["gtsam::Pose2::ChartAtOrigin", "a03160.html", null], │ │ │ │ + ["gtsam::traits< Pose2 >", "a03164.html", null], │ │ │ │ + ["gtsam::traits< const Pose2 >", "a03168.html", null], │ │ │ │ + ["gtsam::Bearing< Pose2, T >", "a03172.html", null], │ │ │ │ + ["gtsam::Range< Pose2, T >", "a03176.html", null], │ │ │ │ + ["wedge< Pose2 >", "a00386.html#a4b78f4db0e05f3ca838ee4da6187710e", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00389.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/PinholeSet.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SOn.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,48 +94,38 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Classes | │ │ │ Namespaces
    │ │ │ -
    PinholeSet.h File Reference
    │ │ │ +
    SOn.cpp File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    A CameraSet of either CalibratedCamera, PinholePose, or PinholeCamera. │ │ │ +

    Definitions of dynamic specializations of SO(n) │ │ │ More...

    │ │ │ - │ │ │ -

    Go to the source code of this file.

    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Classes

    class  gtsam::PinholeSet< CAMERA >
     PinholeSet: triangulates point and keeps an estimate of it around. More...
     
    struct  gtsam::traits< PinholeSet< CAMERA > >
     
    struct  gtsam::traits< const PinholeSet< CAMERA > >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │

    Detailed Description

    │ │ │ -

    A CameraSet of either CalibratedCamera, PinholePose, or PinholeCamera.

    │ │ │ -
    Author
    Frank Dellaert
    │ │ │ +

    Definitions of dynamic specializations of SO(n)

    │ │ │ +
    Author
    Frank Dellaert
    │ │ │ +
    │ │ │ +Varun Agrawal
    │ │ │ +
    Date
    March 2019
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,30 +1,23 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -PinholeSet.h File Reference │ │ │ │ -A CameraSet of either CalibratedCamera, PinholePose, or PinholeCamera. _M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_P_i_n_h_o_l_e_S_e_t_<_ _C_A_M_E_R_A_ _> │ │ │ │ -  _P_i_n_h_o_l_e_S_e_t: triangulates point and keeps an estimate of it around. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _P_i_n_h_o_l_e_S_e_t_<_ _C_A_M_E_R_A_ _>_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _P_i_n_h_o_l_e_S_e_t_<_ _C_A_M_E_R_A_ _>_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +SOn.cpp File Reference │ │ │ │ +Definitions of dynamic specializations of SO(n) _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A CameraSet of either CalibratedCamera, PinholePose, or PinholeCamera. │ │ │ │ +Definitions of dynamic specializations of SO(n) │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ + Varun Agrawal │ │ │ │ + Date │ │ │ │ + March 2019 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_i_n_h_o_l_e_S_e_t_._h │ │ │ │ + * _S_O_n_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00392.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/PinholePose.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Rot3M.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,54 +94,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Classes | │ │ │ Namespaces
    │ │ │ -
    PinholePose.h File Reference
    │ │ │ +
    Rot3M.cpp File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    Pinhole camera with known calibration. │ │ │ +

    Rotation (internal: 3*3 matrix representation*) │ │ │ More...

    │ │ │ - │ │ │ -

    Go to the source code of this file.

    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Classes

    class  gtsam::PinholeBaseK< CALIBRATION >
     A pinhole camera class that has a Pose3 and a fixed Calibration. More...
     
    class  gtsam::PinholePose< CALIBRATION >
     A pinhole camera class that has a Pose3 and a fixed Calibration. More...
     
    struct  gtsam::traits< PinholePose< CALIBRATION > >
     
    struct  gtsam::traits< const PinholePose< CALIBRATION > >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │

    Detailed Description

    │ │ │ -

    Pinhole camera with known calibration.

    │ │ │ -
    Author
    Yong-Dian Jian
    │ │ │ +

    Rotation (internal: 3*3 matrix representation*)

    │ │ │ +
    Author
    Alireza Fathi
    │ │ │ +
    │ │ │ +Christian Potthast
    │ │ │ +
    │ │ │ +Frank Dellaert
    │ │ │
    │ │ │ -Frank Dellaert
    │ │ │ -
    Date
    Feb 20, 2015
    │ │ │ +Richard Roberts
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,37 +1,23 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -PinholePose.h File Reference │ │ │ │ -Pinhole camera with known calibration. _M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_K_<_ _C_A_L_I_B_R_A_T_I_O_N_ _> │ │ │ │ -  A pinhole camera class that has a _P_o_s_e_3 and a ffiixxeedd Calibration. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ - class   _g_t_s_a_m_:_:_P_i_n_h_o_l_e_P_o_s_e_<_ _C_A_L_I_B_R_A_T_I_O_N_ _> │ │ │ │ -  A pinhole camera class that has a _P_o_s_e_3 and a ffiixxeedd Calibration. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _P_i_n_h_o_l_e_P_o_s_e_<_ _C_A_L_I_B_R_A_T_I_O_N_ _>_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _P_i_n_h_o_l_e_P_o_s_e_<_ _C_A_L_I_B_R_A_T_I_O_N_ _>_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +Rot3M.cpp File Reference │ │ │ │ +Rotation (internal: 3*3 matrix representation*) _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Pinhole camera with known calibration. │ │ │ │ +Rotation (internal: 3*3 matrix representation*) │ │ │ │ Author │ │ │ │ - Yong-Dian Jian │ │ │ │ + Alireza Fathi │ │ │ │ + Christian Potthast │ │ │ │ Frank Dellaert │ │ │ │ - Date │ │ │ │ - Feb 20, 2015 │ │ │ │ + Richard Roberts │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_i_n_h_o_l_e_P_o_s_e_._h │ │ │ │ + * _R_o_t_3_M_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00395.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/PinholeCamera.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SimpleCamera.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,51 +94,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Classes | │ │ │ Namespaces
    │ │ │ -
    PinholeCamera.h File Reference
    │ │ │ +
    SimpleCamera.cpp File Reference
    │ │ │
    │ │ │
    │ │ │ │ │ │ -

    Base class for all pinhole cameras. │ │ │ +

    A simple camera class with a Cal3_S2 calibration. │ │ │ More...

    │ │ │ - │ │ │ -

    Go to the source code of this file.

    │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

    │ │ │ -Classes

    class  gtsam::PinholeCamera< Calibration >
     A pinhole camera class that has a Pose3 and a Calibration. More...
     
    struct  gtsam::traits< PinholeCamera< Calibration > >
     
    struct  gtsam::traits< const PinholeCamera< Calibration > >
     
    struct  gtsam::Range< PinholeCamera< Calibration >, T >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │

    Detailed Description

    │ │ │ -

    Base class for all pinhole cameras.

    │ │ │ -
    Author
    Yong-Dian Jian
    │ │ │ -
    Date
    Jan 27, 2012
    │ │ │ +

    A simple camera class with a Cal3_S2 calibration.

    │ │ │ +
    Date
    June 30, 2012
    │ │ │ +
    Author
    Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,33 +1,22 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -PinholeCamera.h File Reference │ │ │ │ -Base class for all pinhole cameras. _M_o_r_e_._._. │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_<_ _C_a_l_i_b_r_a_t_i_o_n_ _> │ │ │ │ -  A pinhole camera class that has a _P_o_s_e_3 and a Calibration. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _P_i_n_h_o_l_e_C_a_m_e_r_a_<_ _C_a_l_i_b_r_a_t_i_o_n_ _>_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _P_i_n_h_o_l_e_C_a_m_e_r_a_<_ _C_a_l_i_b_r_a_t_i_o_n_ _>_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_R_a_n_g_e_<_ _P_i_n_h_o_l_e_C_a_m_e_r_a_<_ _C_a_l_i_b_r_a_t_i_o_n_ _>_,_ _T_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +SimpleCamera.cpp File Reference │ │ │ │ +A simple camera class with a Cal3_S2 calibration. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Base class for all pinhole cameras. │ │ │ │ - Author │ │ │ │ - Yong-Dian Jian │ │ │ │ +A simple camera class with a Cal3_S2 calibration. │ │ │ │ Date │ │ │ │ - Jan 27, 2012 │ │ │ │ + June 30, 2012 │ │ │ │ + Author │ │ │ │ + Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_i_n_h_o_l_e_C_a_m_e_r_a_._h │ │ │ │ + * _S_i_m_p_l_e_C_a_m_e_r_a_._c_p_p │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00416.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cyclic.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/StereoPoint2.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,46 +95,55 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ Classes | │ │ │ -Namespaces
    │ │ │ -
    Cyclic.h File Reference
    │ │ │ +Namespaces | │ │ │ +Typedefs
    │ │ │ +
    StereoPoint2.h File Reference
    │ │ │ │ │ │
    │ │ │ │ │ │ -

    Cyclic group, i.e., the integers modulo N. │ │ │ +

    A 2D stereo point (uL,uR,v) │ │ │ More...

    │ │ │ │ │ │

    Go to the source code of this file.

    │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │

    │ │ │ Classes

    class  gtsam::Cyclic< N >
     Cyclic group of order N. More...
    class  gtsam::StereoPoint2
     A 2D stereo point, v will be same for rectified images. More...
     
    struct  gtsam::traits< Cyclic< N > >
     Define cyclic group to be a model of the Additive Group concept. More...
    struct  gtsam::traits< StereoPoint2 >
     
    struct  gtsam::traits< const StereoPoint2 >
     
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

    │ │ │ Namespaces

    namespace  gtsam
     Global functions in a separate testing namespace.
     
    │ │ │ + │ │ │ + │ │ │ + │ │ │

    │ │ │ +Typedefs

    │ │ │ +typedef std::vector< StereoPoint2gtsam::StereoPoint2Vector
     
    │ │ │

    Detailed Description

    │ │ │ -

    Cyclic group, i.e., the integers modulo N.

    │ │ │ +

    A 2D stereo point (uL,uR,v)

    │ │ │ +
    Date
    Jan 26, 2010
    │ │ │
    Author
    Frank Dellaert
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,29 +1,34 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -Cyclic.h File Reference │ │ │ │ -Cyclic group, i.e., the integers modulo N. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ +StereoPoint2.h File Reference │ │ │ │ +A 2D stereo point (uL,uR,v) _M_o_r_e_._._. │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _g_t_s_a_m_:_:_C_y_c_l_i_c_<_ _N_ _> │ │ │ │ -  _C_y_c_l_i_c group of order N. _M_o_r_e_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2 │ │ │ │ +  A 2D stereo point, v will be same for rectified images. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _C_y_c_l_i_c_<_ _N_ _>_ _> │ │ │ │ -  Define cyclic group to be a model of the Additive Group concept. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _S_t_e_r_e_o_P_o_i_n_t_2_ _> │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _S_t_e_r_e_o_P_o_i_n_t_2_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +typedef std::vector< _S_t_e_r_e_o_P_o_i_n_t_2 >  ggttssaamm::::SStteerreeooPPooiinntt22VVeeccttoorr │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Cyclic group, i.e., the integers modulo N. │ │ │ │ +A 2D stereo point (uL,uR,v) │ │ │ │ + Date │ │ │ │ + Jan 26, 2010 │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _C_y_c_l_i_c_._h │ │ │ │ + * _S_t_e_r_e_o_P_o_i_n_t_2_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00416.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,4 @@ │ │ │ │ var a00416 = [ │ │ │ │ - ["gtsam::Cyclic< N >", "a03060.html", "a03060"], │ │ │ │ - ["gtsam::traits< Cyclic< N > >", "a03064.html", null] │ │ │ │ + ["gtsam::traits< StereoPoint2 >", "a03356.html", null], │ │ │ │ + ["gtsam::traits< const StereoPoint2 >", "a03360.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00416_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cyclic.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/StereoPoint2.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,114 +98,187 @@ │ │ │
    No Matches
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ -
    Cyclic.h
    │ │ │ +
    StereoPoint2.h
    │ │ │
    │ │ │
    │ │ │ Go to the documentation of this file.
    1/* ----------------------------------------------------------------------------
    │ │ │
    2
    │ │ │
    3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
    │ │ │
    4 * Atlanta, Georgia 30332-0415
    │ │ │
    5 * All Rights Reserved
    │ │ │
    6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
    │ │ │
    7
    │ │ │
    8 * See LICENSE for the license information
    │ │ │
    9
    │ │ │
    10 * -------------------------------------------------------------------------- */
    │ │ │
    11
    │ │ │ -
    18#pragma once
    │ │ │ -
    19
    │ │ │ -
    20#include <gtsam/base/Group.h>
    │ │ │ -
    21#include <gtsam/base/Testable.h>
    │ │ │ -
    22
    │ │ │ -
    23#include <cassert>
    │ │ │ -
    24#include <iostream> // for cout :-(
    │ │ │ -
    25
    │ │ │ -
    26namespace gtsam {
    │ │ │ -
    27
    │ │ │ -
    29template<size_t N>
    │ │ │ -
    │ │ │ -
    30class Cyclic {
    │ │ │ -
    31 size_t i_;
    │ │ │ -
    32public:
    │ │ │ -
    │ │ │ -
    34 Cyclic(size_t i) :
    │ │ │ -
    35 i_(i) {
    │ │ │ -
    36 assert(i < N);
    │ │ │ -
    37 }
    │ │ │ -
    │ │ │ -
    │ │ │ -
    39 Cyclic():i_(0) {
    │ │ │ -
    40 }
    │ │ │ -
    │ │ │ -
    41 static Cyclic Identity() { return Cyclic();}
    │ │ │ -
    42
    │ │ │ -
    │ │ │ -
    44 operator size_t() const {
    │ │ │ -
    45 return i_;
    │ │ │ -
    46 }
    │ │ │ +
    19#pragma once
    │ │ │ +
    20
    │ │ │ + │ │ │ +
    22#include <gtsam/base/VectorSpace.h>
    │ │ │ +
    23#include <boost/serialization/nvp.hpp>
    │ │ │ +
    24
    │ │ │ +
    25namespace gtsam {
    │ │ │ +
    26
    │ │ │ +
    │ │ │ +
    32class GTSAM_EXPORT StereoPoint2 {
    │ │ │ +
    33private:
    │ │ │ +
    34
    │ │ │ +
    35 double uL_, uR_, v_;
    │ │ │ +
    36
    │ │ │ +
    37public:
    │ │ │ +
    38 enum { dimension = 3 };
    │ │ │ +
    41
    │ │ │ +
    │ │ │ + │ │ │ +
    44 uL_(0), uR_(0), v_(0) {
    │ │ │ +
    45 }
    │ │ │
    │ │ │ +
    46
    │ │ │
    │ │ │ -
    48 Cyclic operator+(const Cyclic& h) const {
    │ │ │ -
    49 return (i_ + h.i_) % N;
    │ │ │ +
    48 StereoPoint2(double uL, double uR, double v) :
    │ │ │ +
    49 uL_(uL), uR_(uR), v_(v) {
    │ │ │
    50 }
    │ │ │
    │ │ │ -
    │ │ │ -
    52 Cyclic operator-(const Cyclic& h) const {
    │ │ │ -
    53 return (N + i_ - h.i_) % N;
    │ │ │ -
    54 }
    │ │ │ -
    │ │ │ -
    │ │ │ -
    56 Cyclic operator-() const {
    │ │ │ -
    57 return (N - i_) % N;
    │ │ │ -
    58 }
    │ │ │ -
    │ │ │ -
    │ │ │ -
    60 void print(const std::string& s = "") const {
    │ │ │ -
    61 std::cout << s << i_ << std::endl;
    │ │ │ -
    62 }
    │ │ │ -
    │ │ │ +
    51
    │ │ │ +
    │ │ │ +
    53 explicit StereoPoint2(const Vector3& v) :
    │ │ │ +
    54 uL_(v(0)), uR_(v(1)), v_(v(2)) {}
    │ │ │ +
    │ │ │ +
    55
    │ │ │ +
    59
    │ │ │ +
    61 void print(const std::string& s = "") const;
    │ │ │ +
    62
    │ │ │
    │ │ │ -
    64 bool equals(const Cyclic& other, double tol = 1e-9) const {
    │ │ │ -
    65 return other.i_ == i_;
    │ │ │ -
    66 }
    │ │ │ -
    │ │ │ -
    67};
    │ │ │ +
    64 bool equals(const StereoPoint2& q, double tol = 1e-9) const {
    │ │ │ +
    65 return (std::abs(uL_ - q.uL_) < tol && std::abs(uR_ - q.uR_) < tol
    │ │ │ +
    66 && std::abs(v_ - q.v_) < tol);
    │ │ │ +
    67 }
    │ │ │
    │ │ │
    68
    │ │ │ -
    70template<size_t N>
    │ │ │ -
    │ │ │ -
    71struct traits<Cyclic<N> > : internal::AdditiveGroupTraits<Cyclic<N> >, //
    │ │ │ -
    72 Testable<Cyclic<N> > {
    │ │ │ -
    73};
    │ │ │ -
    │ │ │ -
    74
    │ │ │ -
    75} // \namespace gtsam
    │ │ │ -
    76
    │ │ │ -
    Concept check for values that can be used in unit tests.
    │ │ │ -
    Concept check class for variable types with Group properties.
    │ │ │ +
    72
    │ │ │ +
    │ │ │ +
    74 inline static StereoPoint2 Identity() {
    │ │ │ +
    75 return StereoPoint2();
    │ │ │ +
    76 }
    │ │ │ +
    │ │ │ +
    77
    │ │ │ +
    │ │ │ + │ │ │ +
    80 return StereoPoint2(-uL_, -uR_, -v_);
    │ │ │ +
    81 }
    │ │ │ +
    │ │ │ +
    82
    │ │ │ +
    │ │ │ +
    84 inline StereoPoint2 operator +(const Vector3& v) const {
    │ │ │ +
    85 return StereoPoint2(uL_ + v[0], uR_ + v[1], v_ + v[2]);
    │ │ │ +
    86 }
    │ │ │ +
    │ │ │ +
    87
    │ │ │ +
    │ │ │ +
    89 inline StereoPoint2 operator +(const StereoPoint2& b) const {
    │ │ │ +
    90 return StereoPoint2(uL_ + b.uL_, uR_ + b.uR_, v_ + b.v_);
    │ │ │ +
    91 }
    │ │ │ +
    │ │ │ +
    92
    │ │ │ +
    │ │ │ +
    94 inline StereoPoint2 operator -(const StereoPoint2& b) const {
    │ │ │ +
    95 return StereoPoint2(uL_ - b.uL_, uR_ - b.uR_, v_ - b.v_);
    │ │ │ +
    96 }
    │ │ │ +
    │ │ │ +
    97
    │ │ │ +
    101
    │ │ │ +
    103 inline bool operator ==(const StereoPoint2& q) const {return uL_== q.uL_ && uR_==q.uR_ && v_ == q.v_;}
    │ │ │ +
    104
    │ │ │ +
    106 inline double uL() const {return uL_;}
    │ │ │ +
    107
    │ │ │ +
    109 inline double uR() const {return uR_;}
    │ │ │ +
    110
    │ │ │ +
    112 inline double v() const {return v_;}
    │ │ │ +
    113
    │ │ │ +
    │ │ │ +
    115 Vector3 vector() const {
    │ │ │ +
    116 return Vector3(uL_, uR_, v_);
    │ │ │ +
    117 }
    │ │ │ +
    │ │ │ +
    118
    │ │ │ +
    │ │ │ +
    120 Point2 point2() const {
    │ │ │ +
    121 return Point2(uL_, v_);
    │ │ │ +
    122 }
    │ │ │ +
    │ │ │ +
    123
    │ │ │ +
    │ │ │ +
    125 Point2 right() const {
    │ │ │ +
    126 return Point2(uR_, v_);
    │ │ │ +
    127 }
    │ │ │ +
    │ │ │ +
    128
    │ │ │ +
    131 inline StereoPoint2 inverse() const { return StereoPoint2()- (*this);}
    │ │ │ +
    132 inline StereoPoint2 compose(const StereoPoint2& p1) const { return *this + p1;}
    │ │ │ +
    133 inline StereoPoint2 between(const StereoPoint2& p2) const { return p2 - *this; }
    │ │ │ +
    134 inline Vector localCoordinates(const StereoPoint2& t2) const { return Logmap(between(t2)); }
    │ │ │ +
    135 inline StereoPoint2 retract(const Vector& v) const { return compose(Expmap(v)); }
    │ │ │ +
    136 static inline Vector Logmap(const StereoPoint2& p) { return p.vector(); }
    │ │ │ +
    137 static inline StereoPoint2 Expmap(const Vector& d) { return StereoPoint2(d(0), d(1), d(2)); }
    │ │ │ +
    139
    │ │ │ +
    141 GTSAM_EXPORT friend std::ostream &operator<<(std::ostream &os, const StereoPoint2& p);
    │ │ │ +
    142
    │ │ │ +
    143private:
    │ │ │ +
    144
    │ │ │ +
    148
    │ │ │ +
    150 friend class boost::serialization::access;
    │ │ │ +
    151 template<class ARCHIVE>
    │ │ │ +
    152 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
    │ │ │ +
    153 ar & BOOST_SERIALIZATION_NVP(uL_);
    │ │ │ +
    154 ar & BOOST_SERIALIZATION_NVP(uR_);
    │ │ │ +
    155 ar & BOOST_SERIALIZATION_NVP(v_);
    │ │ │ +
    156 }
    │ │ │ +
    157
    │ │ │ +
    159
    │ │ │ +
    160};
    │ │ │ +
    │ │ │ +
    161
    │ │ │ +
    162typedef std::vector<StereoPoint2> StereoPoint2Vector;
    │ │ │ +
    163
    │ │ │ +
    164template<>
    │ │ │ +
    165struct traits<StereoPoint2> : public internal::VectorSpace<StereoPoint2> {};
    │ │ │ +
    166
    │ │ │ +
    167template<>
    │ │ │ +
    168struct traits<const StereoPoint2> : public internal::VectorSpace<StereoPoint2> {};
    │ │ │ +
    169}
    │ │ │ +
    T between(const T &t1, const T &t2)
    binary functions
    Definition lieProxies.h:36
    │ │ │ +
    2D Point
    │ │ │
    Global functions in a separate testing namespace.
    Definition chartTesting.h:28
    │ │ │ +
    void print(const Matrix &A, const string &s, ostream &stream)
    print without optional string, must specify cout yourself
    Definition Matrix.cpp:156
    │ │ │ +
    Vector2 Point2
    As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point2 to Vector2...
    Definition Point2.h:27
    │ │ │
    A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
    Definition concepts.h:30
    │ │ │ -
    A helper that implements the traits interface for GTSAM types.
    Definition Testable.h:151
    │ │ │ -
    Cyclic group of order N.
    Definition Cyclic.h:30
    │ │ │ -
    bool equals(const Cyclic &other, double tol=1e-9) const
    equals with an tolerance, prints out message if unequal
    Definition Cyclic.h:64
    │ │ │ -
    void print(const std::string &s="") const
    print with optional string
    Definition Cyclic.h:60
    │ │ │ -
    Cyclic()
    Default constructor yields identity.
    Definition Cyclic.h:39
    │ │ │ -
    Cyclic(size_t i)
    Constructor.
    Definition Cyclic.h:34
    │ │ │ -
    Cyclic operator-(const Cyclic &h) const
    Subtraction modulo N.
    Definition Cyclic.h:52
    │ │ │ -
    Cyclic operator+(const Cyclic &h) const
    Addition modulo N.
    Definition Cyclic.h:48
    │ │ │ -
    Cyclic operator-() const
    Inverse.
    Definition Cyclic.h:56
    │ │ │ +
    VectorSpace provides both Testable and VectorSpaceTraits.
    Definition VectorSpace.h:207
    │ │ │ +
    A 2D stereo point, v will be same for rectified images.
    Definition StereoPoint2.h:32
    │ │ │ +
    double uR() const
    get uR
    Definition StereoPoint2.h:109
    │ │ │ +
    StereoPoint2(const Vector3 &v)
    construct from 3D vector
    Definition StereoPoint2.h:53
    │ │ │ +
    Point2 right() const
    convenient function to get a Point2 from the right image
    Definition StereoPoint2.h:125
    │ │ │ +
    Vector3 vector() const
    convert to vector
    Definition StereoPoint2.h:115
    │ │ │ +
    double uL() const
    get uL
    Definition StereoPoint2.h:106
    │ │ │ +
    StereoPoint2(double uL, double uR, double v)
    constructor
    Definition StereoPoint2.h:48
    │ │ │ +
    bool equals(const StereoPoint2 &q, double tol=1e-9) const
    equals
    Definition StereoPoint2.h:64
    │ │ │ +
    StereoPoint2 operator-() const
    inverse
    Definition StereoPoint2.h:79
    │ │ │ +
    double v() const
    get v
    Definition StereoPoint2.h:112
    │ │ │ +
    Point2 point2() const
    convenient function to get a Point2 from the left image
    Definition StereoPoint2.h:120
    │ │ │ +
    static StereoPoint2 Identity()
    identity
    Definition StereoPoint2.h:74
    │ │ │ +
    StereoPoint2()
    default constructor
    Definition StereoPoint2.h:43
    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,118 +1,217 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Cyclic.h │ │ │ │ +StereoPoint2.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ 3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 4 * Atlanta, Georgia 30332-0415 │ │ │ │ 5 * All Rights Reserved │ │ │ │ 6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -18#pragma once │ │ │ │ -19 │ │ │ │ -20#include <_g_t_s_a_m_/_b_a_s_e_/_G_r_o_u_p_._h> │ │ │ │ -21#include <_g_t_s_a_m_/_b_a_s_e_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ -22 │ │ │ │ -23#include │ │ │ │ -24#include // for cout :-( │ │ │ │ -25 │ │ │ │ -26namespace _g_t_s_a_m { │ │ │ │ -27 │ │ │ │ -29template │ │ │ │ -_3_0class _C_y_c_l_i_c { │ │ │ │ -31 size_t i_; │ │ │ │ -32public: │ │ │ │ -_3_4 _C_y_c_l_i_c(size_t i) : │ │ │ │ -35 i_(i) { │ │ │ │ -36 assert(i < N); │ │ │ │ -37 } │ │ │ │ -_3_9 _C_y_c_l_i_c():i_(0) { │ │ │ │ -40 } │ │ │ │ -41 static _C_y_c_l_i_c Identity() { return _C_y_c_l_i_c();} │ │ │ │ -42 │ │ │ │ -_4_4 operator size_t() const { │ │ │ │ -45 return i_; │ │ │ │ -46 } │ │ │ │ -_4_8 _C_y_c_l_i_c _o_p_e_r_a_t_o_r_+(const _C_y_c_l_i_c& h) const { │ │ │ │ -49 return (i_ + h.i_) % N; │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +21#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_i_n_t_2_._h> │ │ │ │ +22#include │ │ │ │ +23#include │ │ │ │ +24 │ │ │ │ +25namespace _g_t_s_a_m { │ │ │ │ +26 │ │ │ │ +_3_2class GTSAM_EXPORT _S_t_e_r_e_o_P_o_i_n_t_2 { │ │ │ │ +33private: │ │ │ │ +34 │ │ │ │ +35 double uL_, uR_, v_; │ │ │ │ +36 │ │ │ │ +37public: │ │ │ │ +38 enum { dimension = 3 }; │ │ │ │ +41 │ │ │ │ +_4_3 _S_t_e_r_e_o_P_o_i_n_t_2() : │ │ │ │ +44 uL_(0), uR_(0), v_(0) { │ │ │ │ +45 } │ │ │ │ +46 │ │ │ │ +_4_8 _S_t_e_r_e_o_P_o_i_n_t_2(double uL, double uR, double v) : │ │ │ │ +49 uL_(uL), uR_(uR), v_(v) { │ │ │ │ 50 } │ │ │ │ -_5_2 _C_y_c_l_i_c _o_p_e_r_a_t_o_r_-(const _C_y_c_l_i_c& h) const { │ │ │ │ -53 return (N + i_ - h.i_) % N; │ │ │ │ -54 } │ │ │ │ -_5_6 _C_y_c_l_i_c _o_p_e_r_a_t_o_r_-() const { │ │ │ │ -57 return (N - i_) % N; │ │ │ │ -58 } │ │ │ │ -_6_0 void _p_r_i_n_t(const std::string& s = "") const { │ │ │ │ -61 std::cout << s << i_ << std::endl; │ │ │ │ -62 } │ │ │ │ -_6_4 bool _e_q_u_a_l_s(const _C_y_c_l_i_c& other, double tol = 1e-9) const { │ │ │ │ -65 return other.i_ == i_; │ │ │ │ -66 } │ │ │ │ -67}; │ │ │ │ +51 │ │ │ │ +_5_3 explicit _S_t_e_r_e_o_P_o_i_n_t_2(const Vector3& v) : │ │ │ │ +54 uL_(v(0)), uR_(v(1)), v_(v(2)) {} │ │ │ │ +55 │ │ │ │ +59 │ │ │ │ +61 void _p_r_i_n_t(const std::string& s = "") const; │ │ │ │ +62 │ │ │ │ +_6_4 bool _e_q_u_a_l_s(const _S_t_e_r_e_o_P_o_i_n_t_2& q, double tol = 1e-9) const { │ │ │ │ +65 return (std::abs(uL_ - q.uL_) < tol && std::abs(uR_ - q.uR_) < tol │ │ │ │ +66 && std::abs(v_ - q.v_) < tol); │ │ │ │ +67 } │ │ │ │ 68 │ │ │ │ -70template │ │ │ │ -_7_1struct _t_r_a_i_t_s<_C_y_c_l_i_c > : internal::AdditiveGroupTraits >, // │ │ │ │ -72 _T_e_s_t_a_b_l_e > { │ │ │ │ -73}; │ │ │ │ -74 │ │ │ │ -75} // \namespace gtsam │ │ │ │ -76 │ │ │ │ -_T_e_s_t_a_b_l_e_._h │ │ │ │ -Concept check for values that can be used in unit tests. │ │ │ │ -_G_r_o_u_p_._h │ │ │ │ -Concept check class for variable types with Group properties. │ │ │ │ +72 │ │ │ │ +_7_4 inline static _S_t_e_r_e_o_P_o_i_n_t_2 _I_d_e_n_t_i_t_y() { │ │ │ │ +75 return _S_t_e_r_e_o_P_o_i_n_t_2(); │ │ │ │ +76 } │ │ │ │ +77 │ │ │ │ +_7_9 _S_t_e_r_e_o_P_o_i_n_t_2 _o_p_e_r_a_t_o_r_-() const { │ │ │ │ +80 return _S_t_e_r_e_o_P_o_i_n_t_2(-uL_, -uR_, -v_); │ │ │ │ +81 } │ │ │ │ +82 │ │ │ │ +_8_4 inline _S_t_e_r_e_o_P_o_i_n_t_2 operator +(const Vector3& v) const { │ │ │ │ +85 return _S_t_e_r_e_o_P_o_i_n_t_2(uL_ + v[0], uR_ + v[1], v_ + v[2]); │ │ │ │ +86 } │ │ │ │ +87 │ │ │ │ +_8_9 inline _S_t_e_r_e_o_P_o_i_n_t_2 operator +(const _S_t_e_r_e_o_P_o_i_n_t_2& b) const { │ │ │ │ +90 return _S_t_e_r_e_o_P_o_i_n_t_2(uL_ + b.uL_, uR_ + b.uR_, v_ + b.v_); │ │ │ │ +91 } │ │ │ │ +92 │ │ │ │ +_9_4 inline _S_t_e_r_e_o_P_o_i_n_t_2 operator -(const _S_t_e_r_e_o_P_o_i_n_t_2& b) const { │ │ │ │ +95 return _S_t_e_r_e_o_P_o_i_n_t_2(uL_ - b.uL_, uR_ - b.uR_, v_ - b.v_); │ │ │ │ +96 } │ │ │ │ +97 │ │ │ │ +101 │ │ │ │ +_1_0_3 inline bool operator ==(const _S_t_e_r_e_o_P_o_i_n_t_2& q) const {return uL_== q.uL_ && │ │ │ │ +uR_==q.uR_ && v_ == q.v_;} │ │ │ │ +104 │ │ │ │ +_1_0_6 inline double _u_L() const {return uL_;} │ │ │ │ +107 │ │ │ │ +_1_0_9 inline double _u_R() const {return uR_;} │ │ │ │ +110 │ │ │ │ +_1_1_2 inline double _v() const {return v_;} │ │ │ │ +113 │ │ │ │ +_1_1_5 Vector3 _v_e_c_t_o_r() const { │ │ │ │ +116 return Vector3(uL_, uR_, v_); │ │ │ │ +117 } │ │ │ │ +118 │ │ │ │ +_1_2_0 _P_o_i_n_t_2 _p_o_i_n_t_2() const { │ │ │ │ +121 return _P_o_i_n_t_2(uL_, v_); │ │ │ │ +122 } │ │ │ │ +123 │ │ │ │ +_1_2_5 _P_o_i_n_t_2 _r_i_g_h_t() const { │ │ │ │ +126 return _P_o_i_n_t_2(uR_, v_); │ │ │ │ +127 } │ │ │ │ +128 │ │ │ │ +131 inline _S_t_e_r_e_o_P_o_i_n_t_2 inverse() const { return _S_t_e_r_e_o_P_o_i_n_t_2()- (*this);} │ │ │ │ +132 inline StereoPoint2 compose(const StereoPoint2& p1) const { return *this + │ │ │ │ +p1;} │ │ │ │ +133 inline StereoPoint2 _b_e_t_w_e_e_n(const StereoPoint2& p2) const { return p2 - │ │ │ │ +*this; } │ │ │ │ +134 inline Vector localCoordinates(const StereoPoint2& t2) const { return │ │ │ │ +Logmap(_b_e_t_w_e_e_n(t2)); } │ │ │ │ +135 inline StereoPoint2 retract(const Vector& v) const { return compose(Expmap │ │ │ │ +(v)); } │ │ │ │ +136 static inline Vector Logmap(const StereoPoint2& p) { return p.vector(); } │ │ │ │ +137 static inline StereoPoint2 Expmap(const Vector& d) { return StereoPoint2(d │ │ │ │ +(0), d(1), d(2)); } │ │ │ │ +139 │ │ │ │ +141 GTSAM_EXPORT friend std::ostream &operator<<(std::ostream &os, const │ │ │ │ +StereoPoint2& p); │ │ │ │ +142 │ │ │ │ +143private: │ │ │ │ +144 │ │ │ │ +148 │ │ │ │ +_1_5_0 friend class boost::serialization::access; │ │ │ │ +151 template │ │ │ │ +152 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ +153 ar & BOOST_SERIALIZATION_NVP(uL_); │ │ │ │ +154 ar & BOOST_SERIALIZATION_NVP(uR_); │ │ │ │ +155 ar & BOOST_SERIALIZATION_NVP(v_); │ │ │ │ +156 } │ │ │ │ +157 │ │ │ │ +159 │ │ │ │ +160}; │ │ │ │ +161 │ │ │ │ +162typedef std::vector StereoPoint2Vector; │ │ │ │ +163 │ │ │ │ +164template<> │ │ │ │ +_1_6_5struct _t_r_a_i_t_s<_S_t_e_r_e_o_P_o_i_n_t_2> : public _i_n_t_e_r_n_a_l_:_:_V_e_c_t_o_r_S_p_a_c_e {}; │ │ │ │ +166 │ │ │ │ +167template<> │ │ │ │ +_1_6_8struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_: │ │ │ │ +_V_e_c_t_o_r_S_p_a_c_e {}; │ │ │ │ +169} │ │ │ │ +_g_t_s_a_m_:_:_t_e_s_t_i_n_g_:_:_b_e_t_w_e_e_n │ │ │ │ +T between(const T &t1, const T &t2) │ │ │ │ +binary functions │ │ │ │ +DDeeffiinniittiioonn lieProxies.h:36 │ │ │ │ +_P_o_i_n_t_2_._h │ │ │ │ +2D Point │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ +_g_t_s_a_m_:_:_p_r_i_n_t │ │ │ │ +void print(const Matrix &A, const string &s, ostream &stream) │ │ │ │ +print without optional string, must specify cout yourself │ │ │ │ +DDeeffiinniittiioonn Matrix.cpp:156 │ │ │ │ +_g_t_s_a_m_:_:_P_o_i_n_t_2 │ │ │ │ +Vector2 Point2 │ │ │ │ +As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just │ │ │ │ +typedef Point2 to Vector2... │ │ │ │ +DDeeffiinniittiioonn Point2.h:27 │ │ │ │ _g_t_s_a_m_:_:_t_r_a_i_t_s │ │ │ │ A manifold defines a space in which there is a notion of a linear tangent space │ │ │ │ that can be centered ... │ │ │ │ DDeeffiinniittiioonn concepts.h:30 │ │ │ │ -_g_t_s_a_m_:_:_T_e_s_t_a_b_l_e │ │ │ │ -A helper that implements the traits interface for GTSAM types. │ │ │ │ -DDeeffiinniittiioonn Testable.h:151 │ │ │ │ -_g_t_s_a_m_:_:_C_y_c_l_i_c │ │ │ │ -Cyclic group of order N. │ │ │ │ -DDeeffiinniittiioonn Cyclic.h:30 │ │ │ │ -_g_t_s_a_m_:_:_C_y_c_l_i_c_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const Cyclic &other, double tol=1e-9) const │ │ │ │ -equals with an tolerance, prints out message if unequal │ │ │ │ -DDeeffiinniittiioonn Cyclic.h:64 │ │ │ │ -_g_t_s_a_m_:_:_C_y_c_l_i_c_:_:_p_r_i_n_t │ │ │ │ -void print(const std::string &s="") const │ │ │ │ -print with optional string │ │ │ │ -DDeeffiinniittiioonn Cyclic.h:60 │ │ │ │ -_g_t_s_a_m_:_:_C_y_c_l_i_c_:_:_C_y_c_l_i_c │ │ │ │ -Cyclic() │ │ │ │ -Default constructor yields identity. │ │ │ │ -DDeeffiinniittiioonn Cyclic.h:39 │ │ │ │ -_g_t_s_a_m_:_:_C_y_c_l_i_c_:_:_C_y_c_l_i_c │ │ │ │ -Cyclic(size_t i) │ │ │ │ -Constructor. │ │ │ │ -DDeeffiinniittiioonn Cyclic.h:34 │ │ │ │ -_g_t_s_a_m_:_:_C_y_c_l_i_c_:_:_o_p_e_r_a_t_o_r_- │ │ │ │ -Cyclic operator-(const Cyclic &h) const │ │ │ │ -Subtraction modulo N. │ │ │ │ -DDeeffiinniittiioonn Cyclic.h:52 │ │ │ │ -_g_t_s_a_m_:_:_C_y_c_l_i_c_:_:_o_p_e_r_a_t_o_r_+ │ │ │ │ -Cyclic operator+(const Cyclic &h) const │ │ │ │ -Addition modulo N. │ │ │ │ -DDeeffiinniittiioonn Cyclic.h:48 │ │ │ │ -_g_t_s_a_m_:_:_C_y_c_l_i_c_:_:_o_p_e_r_a_t_o_r_- │ │ │ │ -Cyclic operator-() const │ │ │ │ -Inverse. │ │ │ │ -DDeeffiinniittiioonn Cyclic.h:56 │ │ │ │ +_g_t_s_a_m_:_:_i_n_t_e_r_n_a_l_:_:_V_e_c_t_o_r_S_p_a_c_e │ │ │ │ +VectorSpace provides both Testable and VectorSpaceTraits. │ │ │ │ +DDeeffiinniittiioonn VectorSpace.h:207 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2 │ │ │ │ +A 2D stereo point, v will be same for rectified images. │ │ │ │ +DDeeffiinniittiioonn StereoPoint2.h:32 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_u_R │ │ │ │ +double uR() const │ │ │ │ +get uR │ │ │ │ +DDeeffiinniittiioonn StereoPoint2.h:109 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_S_t_e_r_e_o_P_o_i_n_t_2 │ │ │ │ +StereoPoint2(const Vector3 &v) │ │ │ │ +construct from 3D vector │ │ │ │ +DDeeffiinniittiioonn StereoPoint2.h:53 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_r_i_g_h_t │ │ │ │ +Point2 right() const │ │ │ │ +convenient function to get a Point2 from the right image │ │ │ │ +DDeeffiinniittiioonn StereoPoint2.h:125 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_v_e_c_t_o_r │ │ │ │ +Vector3 vector() const │ │ │ │ +convert to vector │ │ │ │ +DDeeffiinniittiioonn StereoPoint2.h:115 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_u_L │ │ │ │ +double uL() const │ │ │ │ +get uL │ │ │ │ +DDeeffiinniittiioonn StereoPoint2.h:106 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_S_t_e_r_e_o_P_o_i_n_t_2 │ │ │ │ +StereoPoint2(double uL, double uR, double v) │ │ │ │ +constructor │ │ │ │ +DDeeffiinniittiioonn StereoPoint2.h:48 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const StereoPoint2 &q, double tol=1e-9) const │ │ │ │ +equals │ │ │ │ +DDeeffiinniittiioonn StereoPoint2.h:64 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_o_p_e_r_a_t_o_r_- │ │ │ │ +StereoPoint2 operator-() const │ │ │ │ +inverse │ │ │ │ +DDeeffiinniittiioonn StereoPoint2.h:79 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_v │ │ │ │ +double v() const │ │ │ │ +get v │ │ │ │ +DDeeffiinniittiioonn StereoPoint2.h:112 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_p_o_i_n_t_2 │ │ │ │ +Point2 point2() const │ │ │ │ +convenient function to get a Point2 from the left image │ │ │ │ +DDeeffiinniittiioonn StereoPoint2.h:120 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_I_d_e_n_t_i_t_y │ │ │ │ +static StereoPoint2 Identity() │ │ │ │ +identity │ │ │ │ +DDeeffiinniittiioonn StereoPoint2.h:74 │ │ │ │ +_g_t_s_a_m_:_:_S_t_e_r_e_o_P_o_i_n_t_2_:_:_S_t_e_r_e_o_P_o_i_n_t_2 │ │ │ │ +StereoPoint2() │ │ │ │ +default constructor │ │ │ │ +DDeeffiinniittiioonn StereoPoint2.h:43 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _C_y_c_l_i_c_._h │ │ │ │ + * _S_t_e_r_e_o_P_o_i_n_t_2_._h │ │ │ │ * Generated on Tue Jan 9 2024 05:51:35 for gtsam by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00419.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cyclic.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Line3.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,35 +94,57 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │
    │ │ │ -Namespaces
    │ │ │ -
    Cyclic.cpp File Reference
    │ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Functions
    │ │ │ +
    Line3.h File Reference
    � TRUNCATED DUE TO SIZE LIMIT: 10485760 bytes